I want to use NCL to calculate the average annual precipitation from a output of RegCM model (nc file) that has a daily output. I have written the following script on NCL. But the final map is different from the map drawn in Ward. please guide me.
; These files are loaded by default in NCL V6.2.0 and newer
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/contrib/cd_string.ncl"
begin
;----------------------------------------------------------------------
; Read data
;----------------------------------------------------------------------
filename = "ATM.1974010100.nc"
a = addfile(filename,"r")
pre1 = a->pr(:,:,:)
; u1 = a->TPRATE_P11_L1_GLL0_acc(50,68,:,:)
; u2 = a->TPRATE_P11_L1_GLL0_acc(50,44,:,:)
;printVarSummary(u)
wks = gsn_open_wks("pdf","regcm") ; send graphics to PNG file
;----------------------------------------------------------------------
; Set some map resources
;----------------------------------------------------------------------
res = True
res@gsnMaximize = False ; maximize plot in frame
res@gsnDraw = False
res@gsnFrame = False
res@cnFillOn = True ; turn on contour fill
res@cnFillPalette = "BlGrYeOrReVi200"
;res@cnFillPalette = "wgne15"
res@cnLinesOn = False ; turn off contour lines
res@cnLineLabelsOn = False ; turn off contour labels
res@lbLabelBarOn = True ; turn on labelbar
;*************************
;bar
res@cnLevelSpacingF = 50 ; set finer contour spacing
;res@cnLevelSelectionMode = "ExplicitLevels" ; use explicit levels
; res@lbOrientation = "Vertical" ; vertical labelbar
;===================
res@mpOutlineBoundarySets = "National"
res@pmTickMarkDisplayMode = "conditional"
res@mpNationalLineThicknessF = 1.0 ; interior boundaries
res@mpGeophysicalLineThicknessF = 1.0 ; lines separating land/ocean
;=================
res@gsnAddCyclic = False
res@trYReverse = True
res@cnConstFEnableFill = False
res@cnConstFLabelOn = True
;=================
res@mpLimitMode = "LatLon"
res@mpMinLatF = 0
res@mpMaxLatF = 60
res@mpMinLonF = 0
res@mpMaxLonF = 120
res@mpFillOn = True
res@mpOutlineOn = True
res@tiMainString = "16 to 27 october 2017" ; set the main title
pre1=dim_avg_n_Wrap(pre1(:,:,:), 0)
plot = gsn_csm_contour_map(wks,pre1,res)
draw(plot)
frame(wks)
end
******Thanks in advance