; =========================================== ; hov_4.ncl ; =========================================== 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/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" begin ;============================================= ; data processing ;============================================= fili = "chi200_ud_smooth.nc" ; filename f = addfile (fili , "r") ; add file scale = 1.e6 ; scale factor chi = f->CHI ; get chi chi = chi/scale ; scale for convenience ; =========================== ; Create plot: Same as example 3 but ; with "custom" labeling ; =========================== wks = gsn_open_wks ("ps", "hov" ) res = True ; plot mods desired res@gsnDraw = False ; don't draw res@gsnFrame = False ; don't advance frame res@cnLevelSelectionMode = "ManualLevels" ; manually select contours res@cnMinLevelValF = -10. ; min level res@cnMaxLevelValF = 10. ; max leve res@tmYLMode = "Explicit" ; Define own tick mark labels. res@tmYLValues = (/ 0. , 30., 61., 89., 120., 150. /) res@tmYLLabels = (/"DEC","JAN","FEB","MAR" ,"APR","MAY" /) plot = gsn_csm_hov(wks, chi(:,{100:220}), res) ; create plot plot = ShadeLtGtContour(plot, -7, 3, 4.5, 17) ; add shading from <-8 and ; > 4 contours draw(wks) frame(wks) end