;************************************************* ; aspect ration, ymin/ymax, zonal mean ;************************************************ 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 "$HAO_NCL_LIB/axis.ncl" load "$HAO_NCL_LIB/halfzp2full.ncl" ;************************************************ begin in = addfile("/chewy/d/murphys/files/months_ut.nc","r") x = in->TN ; read in data x = halfzp("TN",x) ; interp to full zp lat2plt = -30 ; lat to plot ; the *_Wrap functions are located in contributed.ncl zx = dim_avg_Wrap(x) ; calc zonal mean ;***************************************** ; begin plot ;***************************************** wks = gsn_open_wks("ps","zput") ; open a ps file gsn_define_colormap(wks,"gui_default") res = True res@cnFillOn = True ; turn on color res@gsnSpreadColors = True ; use full range of color map res@lbLabelAutoStride = True ; nice lb labels res@cnLineLabelPlacementMode = "constant" ; constant contour labeling res@amOrthogonalPosF = 0.04 res@trYMinF = -4 res@tiMainString = "lat = "+lat2plt + " zonal mean" res@tiMainOffsetYF = 0.03 ; move title up/ room for text ; create explicit bottom ut axis in the form of ut(months) res@tmXBMode = "Explicit" ; we label the bottom axis values = (/1,32,60,91,121,152,182,213,244,274,305,335/) res@sfXArray = (/in->mtime(:,0)/) res@tmXBValues = values res@tmXBLabels = (/"Jan","Feb","Mar","Apr","May","Jun","Jul",\ "Aug","Sep","Oct","Nov","Dec"/) ; since we want a lat vs. time plot, we need to reorder the array ; so that lat and time are the first two dimensions. xswap = zx(lev|:,time|:,lat|:) plot = gsn_csm_contour(wks,xswap({-4:},:,{lat2plt}), res) end