;************************************************ 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" ;************************************************ 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->TN x = halfzp("TN",x) ; convert to full zp lat2plt = 56 ; lat value to plot ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("ps" ,"zplon") ; open a ps file gsn_define_colormap(wks,"gui_default") ; choose colormap plot = new(2,graphic) ; create plot array res = True ; plot mods desired res@cnLineLabelPlacementMode = "constant" ; best line label mode res@cnFillOn = True ; add color res@gsnSpreadColors = True ; use full range of color map res@cnLineLabelsOn = True ; contour line labels res@gsnDraw = False ; don't draw yet res@gsnFrame = False ; don't advance frame yet ;************************************* ; create first plot ;************************************* mtime = (/in->mtime/) t2plt = 0 res = set_lt_axis_cnplot(in->ut(t2plt),False,res) res = h_axis(in->Z(t2plt,:,{lat2plt},:),res) res@tiMainString = "day,hr,min = "+mtime(t2plt,0)+","+ mtime(t2plt,1)+","+\ mtime(t2plt,2) plot(0) = gsn_csm_contour(wks,x(t2plt,:,{lat2plt},:), res) ;************************************* ; create second plot ;************************************* t2plt = 2 res = set_lt_axis_cnplot(in->ut(t2plt),False,res) res = h_axis(in->Z(t2plt,:,{lat2plt},:),res) res@tiMainString = "day,hr,min = "+mtime(t2plt,0)+","+ mtime(t2plt,1)+","+\ mtime(t2plt,2) plot(1) = gsn_csm_contour(wks,x(t2plt,:,{lat2plt},:), res) ;************************************* ; create panel plot ;************************************* resP = True ; panel mods desired resP@gsnYWhiteSpaceF = 10 ; increase space between plots resP@txString = "TN (degK)"+" Lat = "+lat2plt ; common title resP@gsnMaximize = True ; make plot as big as possible gsn_panel(wks,plot,(/2,1/),resP) end