;*************************************************************** ; climo_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" ;**************************************************************** begin ;**************************************************** ; open file and read in monthly data ;**************************************************** f = addfile ("xieArkin-T42.nc", "r") P = f->prc ;**************************************************** ; use functions in contributed.ncl ;**************************************************** Pclm = clmMonTLL (P(0:215,:,:)) ; time must be multiple of 12 Pzone = dim_avg_Wrap(Pclm(lat|:,month|:,lon|:)) ;****************************************** ; generate colormap using rgb triplets ;****************************************** wks = gsn_open_wks("ps" ,"climo") ; open ps file colors = (/ (/255,255,255/),(/0,0,0/),(/255,255,255/), (/244,255,244/), \ (/217,255,217/), (/163,255,163/), (/106,255,106/), \ (/43,255,106/), (/0,224,0/), (/0,134,0/),(/255,255,0/),\ (/255,127,0/) /) * 1.0 ; we multiply by 1 to make colors float colors = colors/255. ; normalize (required by NCL) gsn_define_colormap(wks, colors) ; generate color map ;****************************************** ; plot resources ;***************************************** res = True ; plot mods desired res@cnFillOn = True ; turn on color res@gsnSpreadColors = True ; use full color table res@cnLinesOn = False ; no contour lines res@tmXBMode = "Explicit" ; label independently res@tmXBValues = ispan(0,11,1) res@tmXBLabels = (/"J","F","M","A","M","J","J","A","S",\ "O","N","D"/) res@tiMainString = "Zonaly Averaged Annual Cycle" res@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels res@cnLevels = (/0.5,1.0,2.0,3.0,4.0,5.0,6.5,7.5/) plot = gsn_csm_lat_time(wks, Pzone, res ) end