Commit 3503bc01 authored by Carl Schreck's avatar Carl Schreck
Browse files

Automated Nightly Commit - Wed Dec 10 00:01:07 EST 2014

parent 6695cc48
......@@ -7,13 +7,13 @@ echo $JOB_NAME `date`
NCL_DIR=`pwd`
mkdir log
for PREFIX in olr mjo er kelvin low
for PREFIX in olr mjo er kelvin low high
do
for SERIES_TYPE in pct total
for SERIES_TYPE in pct total anom
do
NCL_OPTION="seriesType=\"$SERIES_TYPE\" prefix=\"$PREFIX\""
JOB_NAME="$PREFIX"."$VAR_NAME"
JOB_NAME="$PREFIX"."$SERIES_TYPE"
qsub \
-N $JOB_NAME \
......
......@@ -7,9 +7,9 @@ echo $JOB_NAME `date`
NCL_DIR=`pwd`
mkdir log
for VAR_NAME in olr mjo er kelvin low
for VAR_NAME in high
do
for SENSOR in claus
for SENSOR in avhrr hirs
do
NCL_OPTION="varName=\"$VAR_NAME\" sensor=\"$SENSOR\""
......
......@@ -42,7 +42,7 @@ begin ; draw_series
+ i_sensor + ".20S-20N.nc"
if( i_seriesType.eq."pct" ) then
varName = "total"
totalPath = "/home/carl/data/olr/compare/time_series/olr." \
totalPath = "/home/carl/data/olr/compare/time_series/high." \
+ i_sensor + ".20S-20N.nc"
else
varName = i_seriesType
......
......@@ -16,7 +16,7 @@ load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl"
load "$CJS_NCL_LIB/lib.cjs_graphics.ncl"
load "$CJS_NCL_LIB/print_clock.ncl"
load "/home/carl/projects/olr_cdr/sub.draw_series.ncl"
load "/home/carl/projects/olr_cdr/compare/sub.draw_series.ncl"
begin ; main
......@@ -24,12 +24,12 @@ begin ; main
; These are some parameters that could be useful to have up top
if(.not.isvar("prefix") )then
prefix = "olr"
prefix = "high"
end if
if(.not.isvar("seriesType") )then
seriesType = "anom"
end if
sensor = (/ "hirs", "avhrr", "claus" /)
sensor = (/ "hirs", "avhrr" /)
plotType = "png"
plotName = "figures/" + seriesType + "." + prefix
......
......@@ -25,10 +25,10 @@ begin ; main
; These are some parameters that could be useful to have up top
if(.not.isvar( "sensor" ) ) then
sensor = "claus"
sensor = "hirs"
end if
if(.not.isvar("varName") ) then
varName = "olr"
varName = "high"
end if
if( varName.eq."olr" ) then
fileName = "olr.anom.nc"
......
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; all_diff.ncl
; Carl Schreck (cjschrec@ncsu.edu)
; December 2014
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Description: Read in the original and the obs4mips versions and calculate the
; difference
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl"
load "$CJS_NCL_LIB/lib.cjs_graphics.ncl"
load "$CJS_NCL_LIB/print_clock.ncl"
begin ; main
print_clock( "Here we go!" )
; These are some parameters that could be useful to have up top
cdrPath = "/home/carl/data/olr/cdr/daily/v01r02/olr.total.nc"
mipPath = "/home/carl/data/olr/obs4mips/olr_daily_*.nc"
monthPath = "/home/carl/data/olr/obs4mips/olr_monthly.nc"
cdrVar = "olr"
mipVar = "rlut"
print_clock( "Opening" )
mipFiles = addfiles( systemfunc( "ls " + mipPath ), "r" )
cdrFile = addfile( cdrPath, "r" )
monthFile = addfile( monthPath, "r" )
print_clock( "Lat" )
mipLat = mipFiles[0]->lat
cdrLat = cdrFile->lat
printMinMax( mipLat-cdrLat, False )
print_clock( "Lon" )
mipLon = mipFiles[0]->lon
cdrLon = cdrFile->lon
printMinMax( mipLon-cdrLon, False )
print_clock( "Time" )
mipTime = mipFiles[:]->time
cdrTime = cdrFile->time
; printVarSummary( mipTime )
; printVarSummary( cdrTime )
mipTime = (/ cd_convert( mipTime, cdrTime@units ) /)
printMinMax( mipTime-cdrTime, False )
print_clock( "Reading CDR" )
cdrData = cdrFile->$cdrVar$
; printVarSummary(cdrData)
cdrMissing = dim_num_n( ismissing(cdrData), (/ 1, 2 /) )
if( True )
print_clock( "Reading MIPS" )
mipData = mipFiles[:]->$mipVar$
; printVarSummary(mipData)
mipMissing = dim_num_n( ismissing(mipData), (/ 1, 2 /) )
print_clock( "Data" )
printMinMax( mipData-cdrData, False )
print_clock( "Missing" )
diffMissing = mipMissing - cdrMissing
printMinMax( diffMissing, False )
missInd = ind( diffMissing.ne.0 )
print( cd_string( cdrTime(missInd), "" ) + " " + diffMissing(missInd) )
return
end if
print_clock( "Reading Monthly" )
monthlyMip = monthFile->$mipVar$
print_clock( "Calculating monthly" )
yyyymmMip = toint( cd_string( monthlyMip&time, "%Y%N" ) )
yyyymmCdr = toint( cd_string( cdrTime, "%Y%N" ) )
monthlyCdr = new( dimsizes(monthlyMip), typeof(cdrData) )
do t = 0, dimsizes(yyyymmMip)-1
thisMonthInd := ind( yyyymmMip(t).eq.yyyymmCdr )
monthlyCdr(t,:,:) = dim_avg_n( cdrData(thisMonthInd,:,:), 0 )
; print( yyyymmMip(t) + " " + num( monthlyCdr(t,:,:).ne.monthlyMip(t,:,:) ) )
end do
print_clock( "Difference" )
monthlyDiff = monthlyMip - monthlyCdr
print( yyyymmMip + " " + dim_min_n( monthlyDiff, (/ 1, 2 /) ) + " " \
+ dim_max_n( monthlyDiff, (/ 1, 2 /) ) )
printMinMax( monthlyDiff, False )
print_clock( "Thank you, come again." )
end; main
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; blank.ncl
; Carl Schreck (cjschrec@ncsu.edu)
; December 2014
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Description: Empty file to start NCL scripts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl"
load "$CJS_NCL_LIB/lib.cjs_graphics.ncl"
load "$CJS_NCL_LIB/print_clock.ncl"
begin ; main
print_clock( "Here we go!" )
; These are some parameters that could be useful to have up top
plotType = "png"
plotName = "plot"
plotDpi = 200
yyyymmdd = 20130729
cdrPath = "/home/carl/data/olr/cdr/daily/v01r02/olr.total.nc"
mipPath = "/home/carl/data/olr/obs4mips/olr_daily_*.nc"
cdrVar = "olr"
mipVar = "rlut"
print_clock( "Reading MIP" )
mipFiles = addfiles( systemfunc( "ls " + mipPath ), "r" )
mipTime = mipFiles[:]->time
mipYyyymmdd = toint( cd_string( mipTime, "%Y%N%D" ) )
mipInd = ind( mipYyyymmdd.eq.yyyymmdd )
mipData = mipFiles[:]->$mipVar$(mipInd,:,:)
mipData@long_name = "Obs4MIPs"
print_clock( "Reading CDR" )
cdrFile = addfile( cdrPath, "r" )
cdrTime = cdrFile->time
cdrYyyymmdd = toint( cd_string( cdrTime, "%Y%N%D" ) )
cdrInd = ind( cdrYyyymmdd.eq.yyyymmdd )
cdrData = cdrFile->$cdrVar$(cdrInd,:,:)
cdrData@long_name = "CDR"
diffData = mipData - cdrData
copy_VarMeta( mipData, diffData )
diffData@long_name = mipData@long_name + " minus " + cdrData@long_name
; Customize base plot
res = True
res@mpMinLatF = -90
res@mpMaxLatF = 90
; Customize panel
panRes = True
print_clock( "Drawing the plot" )
; ...allows png or gif to work
if( isStrSubset( plotType, "png" ).or.isStrSubset( plotType, "gif" ) ) then
plotTypeLocal = "eps"
else
plotTypeLocal = plotType
end if
; ...open the workstation
wks = gsn_open_wks( plotTypeLocal, plotName )
; gsn_define_colormap( wks, "default" )
mipPlot = cjs_draw_shaded_map( wks, mipData, res )
cdrPlot = cjs_draw_shaded_map( wks, cdrData, res )
diffPlot = cjs_draw_shaded_map( wks, diffData, res )
gsn_panel( wks, (/ mipPlot, cdrPlot, diffPlot /), (/ 3, 1 /), panRes )
print_clock( "Convert the image, if necessary" )
delete(wks)
if( isStrSubset( plotType, "png" ).or.isStrSubset( plotType, "gif" ) ) then
system( "convert -trim -border 5x5 -bordercolor white " \
+ "+repage -density " + plotDpi + " " \\
+ plotName + ".eps " + plotName + "." + plotType )
if( .not.isStrSubset( plotType, "e" ) ) then
system( "rm -f " + plotName + ".eps" )
end if
end if
print_clock( "Thank you, come again." )
end; main
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; blank.ncl
; Carl Schreck (cjschrec@ncsu.edu)
; December 2014
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Description: Empty file to start NCL scripts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl"
load "$CJS_NCL_LIB/lib.cjs_graphics.ncl"
load "$CJS_NCL_LIB/print_clock.ncl"
begin ; main
print_clock( "Here we go!" )
; These are some parameters that could be useful to have up top
plotType = "png"
plotName = "plot"
plotDpi = 200
yyyymm = 201306
cdrPath = "/home/carl/data/olr/cdr/daily/v01r02/olr.total.nc"
mipPath = "/home/carl/data/olr/obs4mips/olr_monthly.nc"
cdrVar = "olr"
mipVar = "rlut"
print_clock( "Reading MIP" )
mipFile = addfile( mipPath, "r" )
mipTime = mipFile->time
mipYyyymm = toint( cd_string( mipTime, "%Y%N" ) )
mipInd = ind( mipYyyymm.eq.yyyymm )
mipData = mipFile->$mipVar$(mipInd,:,:)
mipData@long_name = "Obs4MIPs"
print_clock( "Reading CDR" )
cdrFile = addfile( cdrPath, "r" )
cdrTime = cdrFile->time
cdrYyyymm = toint( cd_string( cdrTime, "%Y%N" ) )
cdrInd = ind( cdrYyyymm.eq.yyyymm )
cdrData = dim_avg_n_Wrap( cdrFile->$cdrVar$(cdrInd,:,:), 0 )
cdrData@long_name = "CDR"
diffData = mipData - cdrData
copy_VarMeta( mipData, diffData )
diffData@long_name = mipData@long_name + " minus " + cdrData@long_name
; Customize base plot
res = True
; Customize panel
panRes = True
print_clock( "Drawing the plot" )
; ...allows png or gif to work
if( isStrSubset( plotType, "png" ).or.isStrSubset( plotType, "gif" ) ) then
plotTypeLocal = "eps"
else
plotTypeLocal = plotType
end if
; ...open the workstation
wks = gsn_open_wks( plotTypeLocal, plotName )
; gsn_define_colormap( wks, "default" )
mipPlot = cjs_draw_shaded_map( wks, mipData, res )
cdrPlot = cjs_draw_shaded_map( wks, cdrData, res )
diffPlot = cjs_draw_shaded_map( wks, diffData, res )
gsn_panel( wks, (/ mipPlot, cdrPlot, diffPlot /), (/ 3, 1 /), panRes )
print_clock( "Convert the image, if necessary" )
delete(wks)
if( isStrSubset( plotType, "png" ).or.isStrSubset( plotType, "gif" ) ) then
system( "convert -trim -border 5x5 -bordercolor white " \
+ "+repage -density " + plotDpi + " " \\
+ plotName + ".eps " + plotName + "." + plotType )
if( .not.isStrSubset( plotType, "e" ) ) then
system( "rm -f " + plotName + ".eps" )
end if
end if
print_clock( "Thank you, come again." )
end; main
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