Commit 6a3eaf71 authored by Carl Schreck's avatar Carl Schreck
Browse files

Automated Nightly Commit - Thu Oct 15 00:00:16 EDT 2015

parent 740b2e11
......@@ -16,6 +16,7 @@ function calc_meanvar( \
i_meanNotVar [1] : logical \
)
begin ; calc_meanvar
print_clock( "Calculating for " + i_inPath )
; These are some parameters that could be useful to have up top
timeUnits = "days since 1800-01-01 00:00:00"
minTime = cd_inv_calendar( i_minYear, 01, 01, 00, 0, 0, timeUnits, 0 )
......
......@@ -11,6 +11,7 @@ load "/home/carl/projects/olr_cdr/compare/sub.calc_meanvar.ncl"
undef ( "draw_meanvar" )
function draw_meanvar( \
io_wks [1] : graphic, \
i_meanNotVar [1] : logical, \
i_res [1] : logical, \
i_cntRes [1] : logical \
......@@ -33,8 +34,10 @@ begin ; draw_meanvar
hirsData = calc_meanvar( hirsPath, varName, minYear, maxYear, i_meanNotVar )
avhrrData = calc_meanvar( avhrrPath, varName, minYear, maxYear, i_meanNotVar )
avhrrRegrid = copy_Gridding( hirsData, avhrrData )
diffData = hirsData - avhrrData
hirsRegrid = copy_Gridding( avhrrData, hirsData )
diffData = hirsRegrid - avhrrData
copy_VarCoords( avhrrData, diffData )
; Customize base plot
res = True
......@@ -46,12 +49,9 @@ begin ; draw_meanvar
res@gsnMinorLonSpacing = 15
res@gsnRightString = minYear + " - " + maxYear
res@cnFillPalette = "CBR_wet"
if( meanNotVar ) then
res@gsnSpreadColorStart = 10
res@gsnSpreadColorEnd = 0
end if
res@cnFillPalette = "colorbrewer_coldhot"
res@pmLabelBarOrthogonalPosF = 0
if( i_res ) then
copy_VarAtts( i_res, res )
end if
......@@ -60,9 +60,12 @@ begin ; draw_meanvar
if( i_cntRes ) then
copy_VarAtts( i_cntRes, cntRes )
end if
cntRes@gsnContourNegLineDashPattern = 0
cntRes@cnLinePalette = "gsltod"
cntRes@cnMonoLineColor = False
retVal = cjs_draw_shaded_map( wks, hirsData, res )
cjs_add_contours( wks, retVal, diffData, cntRes )
retVal = cjs_draw_shaded_map( io_wks, diffData, res )
cjs_add_contours( io_wks, retVal, hirsData, cntRes )
return(retVal)
end; draw_meanvar
......
......@@ -30,8 +30,6 @@ begin ; main
plotName = "figures/total_meanvar_map"
print_clock( "Drawing the plot" )
; ...allows png or gif to work
if( ( plotType.eq."png" ).or.( plotType.eq."gif" ) ) then
plotTypeLocal = "eps"
......@@ -46,15 +44,15 @@ begin ; main
res = True
res@gsnLeftString = "Mean"
cntRes = True
cntRes@cnLevels = ispan(-5,5,1) * 5
meanPlot = draw_meanvar( meanNotVar, res, cntRes )
res@cnLevels = ispan(-5,5,1) * 5
meanPlot = draw_meanvar( wks, meanNotVar, res, cntRes )
meanNotVar = False
res = True
res@gsnLeftString = "Variance"
cntRes = True
cntRes@cnLevels = ispan(-5,5,1) * 50
varPlot = draw_meanvar( meanNotVar, res, cntRes )
res@cnLevels = ispan(-5,5,1) * 50
varPlot = draw_meanvar( wks, meanNotVar, res, cntRes )
; Customize panel
......
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