;************************************************ 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/shea_util.ncl" load "$HAO_NCL_LIB/halfzp2full.ncl" load "$HAO_NCL_LIB/axis.ncl" load "$HAO_NCL_LIB/hao_contrib.ncl" ;************************************************ begin ;************************************************ ; before the data can be plotted, there is a ; sequence of things that have to be done to it: ;************************************************ in = addfile("/chewy/d/murphys/files/pyrj001.nc","r") x = in->UN ; read in data x = halfzp("UN",x) ; convert to full zp t2plt = 1 ; time index to plot slt = 4 ; lon to plot ; given a slt, determine equiviliant longitude. This function is ; located in hao_contrib.ncl lon2plt = slt2lon(in->ut(t2plt),slt) ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("ps" ,"zplat") ; open a ps file gsn_define_colormap(wks,"BlWhRe") ; choose colormap res = True ; plot mods desired res@cnLineLabelPlacementMode = "constant" ; best line label mode res@tiMainString = "UT = "+in->ut(t2plt)+" SLT = "+slt+\ " Lon = "+lon2plt res@cnFillOn = True ; add color res@gsnSpreadColors = True ; use full range of color map res@lbLabelAutoStride = True ; nice lb labels res@cnLineLabelsOn = True ; turn on line labels ; manually select contour levels res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels res@cnMinLevelValF = -180. ; set min contour level res@cnMaxLevelValF = 180. ; set max contour level res@cnLevelSpacingF = 20. ; set contour spacing ; adjust the aspect ratio of plot. with vpXF, we slide the plot over a little ; to make room for the expanded x dimension. res@vpWidthF = 0.8 res@vpHeightF = 0.4 res@vpXF = 0.1 ; add height axis. This function is located in axis.ncl res = h_axis(in->Z(t2plt,:,:,{lon2plt}),res) plot = gsn_csm_contour(wks,x(t2plt,:,:,{lon2plt}), res) end