Commit 1ae39322 authored by Carl Schreck's avatar Carl Schreck

Automated Nightly Commit - Sat Aug 24 00:01:26 EDT 2019

parent eeec6129
...@@ -16,33 +16,36 @@ begin ; main ...@@ -16,33 +16,36 @@ begin ; main
print_clock( "Here we go!" ) print_clock( "Here we go!" )
; These are some parameters that could be useful to have up top ; These are some parameters that could be useful to have up top
; months = (/ 11, 12, 1, 2, 3 /) months = 7
months = ispan(1,12,1) ; months = ispan(1,12,1)
waveName = "mjo" waveName = "kelvin"
varName = "trmm" varName = "chi200"
thresh = -1.5 thresh = -1.5
minLon = 100 minLon = 335
maxLon = 100 maxLon = 335
minLat = -10 minLat = 10
maxLat = 10 maxLat = 20
if( varName.eq."olr" ) then if( varName.eq."olr" ) then
inPath = "~/data/nasa_ymc/fcst_verif/olr.k09.nc" inPath = "~/data/nasa_ymc/fcst_verif/olr.k09.nc"
elseif( varName.eq."trmm" ) then elseif( varName.eq."trmm" ) then
inPath = "~/data/nasa_ymc/fcst_verif/rain.k09.nc" inPath = "~/data/nasa_ymc/fcst_verif/rain.k09.nc"
else
inPath = "~/data/cfsr/waves/" + varName + ".anom.waves.nc"
end if end if
inFile = addfile( inPath, "r" ) inFile = addfile( inPath, "r" )
inTime = inFile->time inTime = inFile->time
baseData = dim_standardize_n_Wrap( dim_avg_n_Wrap( \ baseData = dim_standardize_n_Wrap( dim_avg_n_Wrap( \
inFile->$waveName$(month_ind(inTime,months), \ inFile->$waveName$(:,{minLat:maxLat},{minLon:maxLon}), \
{minLat:maxLat},{minLon:maxLon}), \
(/ 1, 2 /) ), 0, 0 ) (/ 1, 2 /) ), 0, 0 )
monthBaseData = baseData(month_ind(inTime,months))
printVarSummary(baseData) printVarSummary(monthBaseData)
compDates := composite_dates( baseData, thresh ) compDates := composite_dates( monthBaseData, thresh )
outString = cd_string( compDates, "%Y, %N, %D, " ) + baseData({compDates}) outString = cd_string( compDates, "%Y, %N, %D, " ) \
+ monthBaseData({compDates})
print( outString ) print( outString )
print_clock( "Writing" ) print_clock( "Writing" )
...@@ -52,6 +55,21 @@ begin ; main ...@@ -52,6 +55,21 @@ begin ; main
asciiwrite( outPath, outString ) asciiwrite( outPath, outString )
print( outPath ) print( outPath )
year = toint(cd_string(compDates,"%Y"))
minYear = toint(cd_string(inTime(0),"%Y"))
maxYear = toint(cd_string(inTime(dimsizes(inTime)-1),"%Y"))
years = ispan(minYear,maxYear,1)
matches = years * 0
do y = 0, dimsizes(years)-1
matches(y) = num(year.eq.years(y))
print( years(y) + " " + matches(y) )
end do
do m = 0, max(matches)
nmatch = num(matches.eq.m)
print( m + " " + nmatch + " " + ( nmatch * 1. / dimsizes(years) ) )
end do
print_clock( "Thank you, come again." ) print_clock( "Thank you, come again." )
end; main end; main
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment