;************************************************ 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 t2plt = 2 ; time index to plot lat2plt = 56 ; lat value to plot ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("ps" ,"zplon") ; open a ps file gsn_define_colormap(wks,"gui_default") 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@lbLabelAutoStride = True ; nice stride on label bar res@tiMainString = "UT = "+in->ut(t2plt)+" Lat = "+lat2plt res@gsnDraw = False ; don't draw yet res@gsnFrame = False ; don't advance frame yet res@trYMinF = -2 ; limit y axis ; calc min/max of data minx = min(x(t2plt,:,{lat2plt},:)) maxx = max(x(t2plt,:,{lat2plt},:)) plot = gsn_csm_contour(wks,x(t2plt,:,{lat2plt},:), res) ; add a text string that indicates the time type. The addition of a ; color and the resulting label bar makes the default label disappear ; so we have to add one manually. txres = True ; text mods desired txres@txFontHeightF = 0.018 ; increase font a bit for this label gsn_text_ndc(wks,"min = "+minx+" max = "+maxx,.5,.92,txres) draw(plot) frame(wks) end