Commit 3dea9731 authored by Carl Schreck's avatar Carl Schreck

Automated Nightly Commit - Sat Dec 15 00:00:25 EST 2018

parent 35924d5e
......@@ -27,31 +27,31 @@ begin
mis = -999
mis@_FillValue = -999
ymin = -30
ymax = 30
ymin = -20
ymax = 20
if( .not.isvar("filtName") ) then
filtName = "k09"
end if
obsPerDay = 4
obsPerDay = 1
if( .not.isvar("varName") ) then
varName = "rain"
end if
print( varName )
basePath = "~/data/trmm/trmm3b42"
pathIn = basePath + ".std.nc"
pathOut = basePath + ".waves.std.nc"
; pathIn = basePath + varName + ".anom.nc"
; pathOut = basePath + varName + "." + filtName + ".nc"
basePath = "~/data/nasa_ymc/fcst_verif/"
; pathIn = basePath + ".std.nc"
; pathOut = basePath + ".waves.std.nc"
pathIn = basePath + varName + ".anom.nc"
pathOut = basePath + varName + "." + filtName + ".nc"
; pathIn = basePath + "anom/" + varName + ".anom.nc"
; pathOut = basePath + "waves/" + varName + ".anom.waves.nc"
calcHigh = False
calcLow = False
calcHigh = True
calcLow = True
calcMrg = False
calcMjo = False
calcMjo = True
calcKelvin = True
calcEr = False
calcEr = True
calcMtd = False
calcTd = False
calcWig = False
......@@ -66,7 +66,8 @@ begin
lat@actual_range = (/ min(lat), max(lat) /)
; Open the output files
setfileoption( "nc", "Format", "LargeFile" )
; setfileoption("nc","Format","NetCDF4")
; setfileoption("nc","CompressionLevel",1)
if( makeNewFile ) then
system( "rm " + pathOut )
fout = addfile( pathOut, "c" )
......@@ -89,6 +90,8 @@ begin
end if
printVarSummary(data)
fout->unfilt = data
if( calcHigh ) then
print_clock( "Filtering High..." )
......@@ -211,10 +214,57 @@ begin
print_clock( "Writing MJO... " )
fout->mjo = mjo
sumOfModes = data
sumOfModes = low + mjo
sumOfModes@long_name = "Low+MJO"
fout->low_mjo = sumOfModes
; delete(mjo)
end if
if( calcEr ) then
print_clock( "Filtering ER..." )
er = data
er@long_name = "Equatorial Rossby Waves in " + str_upper(varName)
if( filtName.eq."wk99" ) then
er@filter = "Wheeler & Kiladis (1999)"
er@wavenumber = (/ -10, -1 /)
er@period = (/ 9.7, 48 /)
er@depth = (/ 8, 90 /)
else
er@filter = "Kiladis et al. (2009 Rev. Geophys.)"
er@wavenumber = (/ -10, -1 /)
er@period = (/ 9.7, 72 /)
if( filtName.eq."k09" ) then
er@depth = (/ mis, 90 /)
else ; wide
er@depth = (/ mis, mis /)
end if
end if
do y = 0, ( dimsizes(lat) - 1 )
; print_clock( y + " " + ( dimsizes(lat) - 1 ) + " " )
er(time|:,{lat|lat(y)},lon|:) = (/ kf_filter( \\
data(time|:,{lat|lat(y)},lon|:), obsPerDay, \\
er@period(0), er@period(1), \\
er@wavenumber(0), er@wavenumber(1), \\
er@depth(0), er@depth(1), \\
"er" ) /)
end do
print_clock( "Writing ER... " )
fout->er = er
sumOfModes = sumOfModes + er
sumOfModes@long_name = "Low+MJO+ER"
fout->low_mjo_er = sumOfModes
; delete(er)
end if
if( calcKelvin ) then
print_clock( "Filtering KELVIN..." )
......@@ -255,47 +305,14 @@ begin
print_clock( "Writing KELVIN... " )
fout->kelvin = kelvin
sumOfModes = sumOfModes + kelvin
sumOfModes@long_name = "Low+MJO+ER+Kelvin"
fout->low_mjo_er_kelvin = sumOfModes
; delete(kelvin)
end if
if( calcEr ) then
print_clock( "Filtering ER..." )
er = data
er@long_name = "Equatorial Rossby Waves in " + str_upper(varName)
if( filtName.eq."wk99" ) then
er@filter = "Wheeler & Kiladis (1999)"
er@wavenumber = (/ -10, -1 /)
er@period = (/ 9.7, 48 /)
er@depth = (/ 8, 90 /)
else
er@filter = "Kiladis et al. (2009 Rev. Geophys.)"
er@wavenumber = (/ -10, -1 /)
er@period = (/ 9.7, 72 /)
if( filtName.eq."k09" ) then
er@depth = (/ mis, 90 /)
else ; wide
er@depth = (/ mis, mis /)
end if
end if
do y = 0, ( dimsizes(lat) - 1 )
; print_clock( y + " " + ( dimsizes(lat) - 1 ) + " " )
er(time|:,{lat|lat(y)},lon|:) = (/ kf_filter( \\
data(time|:,{lat|lat(y)},lon|:), obsPerDay, \\
er@period(0), er@period(1), \\
er@wavenumber(0), er@wavenumber(1), \\
er@depth(0), er@depth(1), \\
"er" ) /)
end do
print_clock( "Writing ER... " )
fout->er = er
; delete(er)
end if
if( calcMtd ) then
print_clock( "Filtering MRG/TD..." )
......@@ -379,11 +396,6 @@ begin
delete(wig)
end if
print_clock( "Writing Sum of modes" )
sumOfModes = low + mjo + kelvin + er
copy_VarMeta( data, sumOfModes )
sumOfModes@long_name = "Sum of modes in " + str_upper( varName )
fout->sumOfModes = sumOfModes
......
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