;************************************************* ; demonstrates how to manually set contour intervals ;************************************************ load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.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/pyrj001.nc","r") x = in->VN ; read in data x = halfzp("VN",x) ; convert to full zp ut = in->ut ; required for local time axis l2plt = 5 ; 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,"BlWhRe") ; choose colormap res = True ; plot mods desired res@cnFillOn = True ; add color res@cnLineLabelsOn = True ; turn on line labels res@cnLineLabelBackgroundColor = "white" ; white background around label res@gsnSpreadColors = True ; use full range of color map res@lbLabelAutoStride = True ; nice lb labels res@mpFillOn = False ; turn off map fill ; these four resources set the contour min and max res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels res@cnMinLevelValF = -30. ; set min contour level res@cnMaxLevelValF = 30. ; set max contour level res@cnLevelSpacingF = 2. ; set contour spacing plot = gsn_csm_contour_map_ce(wks,x(t2plt,l2plt,:,:), res) end