;;;; ; ; Concepts illustrated: ; - Reading a GPCP 1DD netCDF file ; - Plot a user specified date ;---------------------------------------------------------------------- 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/esmf/ESMF_regridding.ncl" ;************************************************************** a = addfile("outputfile.nc","r") b = addfile("30day_SRFmeanDJF.nc","r") prec = a->temp prec1 = b->tpr wks = gsn_open_wks("ps","precipitation_bias") res = True res@tfDoNDCOverlay = True ; do not transform res@cnFillOn = True ; color plot desired res@cnLinesOn = False ; no contour lines res@mpGeophysicalLineColor = "red" ; color of continental outlines res@mpPerimOn = True ; draw box around map ;res@mpGeophysicalLineColor = "Navy" ; color of cont. outlines res@mpGridLineDashPattern = 2 ; lat/lon lines as dashed ; res@mpOutlineBoundarySets = "National" ; turn on country boundaries res@gsnAddCyclic = False ; regional data don't add res@pmTickMarkDisplayMode = "Always" ; res@lbAutoManage = True ; res@mpMaxLatF = 33.0770798 ; choose subregion res@mpMinLatF = -22.4560108 res@mpMaxLonF = 62.3800049 res@mpMinLonF = -2.38000488 res@cnLevelSelectionMode = "ManualLevels" ; manual levels res@cnMinLevelValF = 0 ; min level res@cnMaxLevelValF = 475 ; max level res@cnLevelSpacingF = 25 ; interval ; colors = (/"firebrick","peachpuff","orangered","navyblue","peru",\ ; "yellow","wheat1","gray55","thistle","coral","dodgerblue", \ ; "seagreen","maroon","gold","turquoise","mediumorchid"/) res@tiMainFuncCode = "~" ; ; resP = True res@tiMainString = "DJF_mean_precipitation" ;+ ut_string(times(i), ""); ; plot = gsn_csm_contour_map(wks,prec(:,:),res) ; plot = gsn_csm_contour_map(wks,prec1(nt,:,:),res) plot = gsn_csm_contour_map(wks,prec-prec1,res ) ; resP@gsnPanelLabelBar = False ; add common label bar ; resP@lbLabelAngleF = 270 ; angle labels