;************************************************* ; makes neg contours dashed and zero line double thickness ;************************************************ 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 "/home/tgcm/ncl/web_ex/func_lib/halfzp2full.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/tgcmproc_s12ut_diffs_zp.nc","r") x = in->UN x = halfzp("UN",x) ; convert to full zp ut = in->ut ; required for local time axis l2plt = 10 ; level index to plot t2plt = 0 ; time index to plot ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("ps" ,"ce") ; open a ps file gsn_define_colormap(wks,"BlAqGrYeOrRevi200") res = True ; plot mods desired res@tiMainString = "A color plot with local time axis" res@cnFillOn = True ; add color res@gsnSpreadColors = True ; use full range of color map res@lbLabelAutoStride = True ; nice lb labels res@mpFillOn = False ; turn off map fill res@gsnDraw = False ; don't draw yet res@gsnFrame = False ; don't advance frame yet ; data files from tgcmproc have a cyclic point already added. The gsn_csm ; map templates add this for us, so we need to turn it off. res@gsnAddCyclic = False ; calc min/max of data minx = min(x(t2plt,l2plt,:,:)) maxx = max(x(t2plt,l2plt,:,:)) plot = gsn_csm_contour_map_ce(wks,x(t2plt,l2plt,:,:), res) plot = ZeroNegDashLineContour(plot) ; a shea_util.ncl function ; 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,.16,txres) draw(plot) frame(wks) end