Commit 6695cc48 authored by Carl Schreck's avatar Carl Schreck
Browse files

New subdirectory for obs4mips

parent 72179334
......@@ -9,10 +9,10 @@ mkdir log
for PREFIX in olr mjo er kelvin low
do
for VAR_NAME in anom
for SERIES_TYPE in pct total
do
NCL_OPTION="varName=\"$VAR_NAME\" prefix=\"$PREFIX\""
NCL_OPTION="seriesType=\"$SERIES_TYPE\" prefix=\"$PREFIX\""
JOB_NAME="$PREFIX"."$VAR_NAME"
qsub \
......
......@@ -40,6 +40,14 @@ begin ; draw_series
longSmooth = shortSmooth*5
inPath = "/home/carl/data/olr/compare/time_series/" + i_prefix + "." \
+ i_sensor + ".20S-20N.nc"
if( i_seriesType.eq."pct" ) then
varName = "total"
totalPath = "/home/carl/data/olr/compare/time_series/olr." \
+ i_sensor + ".20S-20N.nc"
else
varName = i_seriesType
end if
res = i_res
res@gsnLeftString = i_prefix
......@@ -78,10 +86,28 @@ begin ; draw_series
inTime := floor(inFile->time)
startInd = buffer
endInd = dimsizes(inTime)-1-buffer
inData := inFile->$i_seriesType$(startInd:endInd)
inData := inFile->$varName$(startInd:endInd)
yData(sensorCounter,{inTime(startInd):inTime(endInd)}) = inData
end do
if( i_seriesType.eq."pct" ) then
totalData = new( dimsizes(yData), float )
copy_VarMeta( yData, totalData )
do sensorCounter = 0, dimsizes(i_sensor)-1
inFile = addfile( totalPath(sensorCounter), "r" )
inTime := floor(inFile->time)
startInd = buffer
endInd = dimsizes(inTime)-1-buffer
inData := inFile->$varName$(startInd:endInd)
totalData(sensorCounter,{inTime(startInd):inTime(endInd)}) = inData
end do
yData = 100. * yData / totalData
yData@units = "% of total variance"
end if
print_clock("Trending")
trendData = new( dimsizes(yData), double )
do sensorCounter = 0, dimsizes(i_sensor)-1
......@@ -91,6 +117,7 @@ begin ; draw_series
end do
print_clock("Smoothing")
yData = linmsg( yData, 1 )
yData = runave_n_Wrap( yData, shortSmooth, 0, 1 )
smoothData = runave_n_Wrap( yData, longSmooth, 0, 1 )
......
......@@ -32,7 +32,7 @@ begin ; main
sensor = (/ "hirs", "avhrr", "claus" /)
plotType = "png"
plotName = "figures/" + prefix + "." + seriesType
plotName = "figures/" + seriesType + "." + prefix
plotDpi = 200
timeUnits = "days since 1800-01-01 00:00:00"
......
Supports Markdown
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