;*********************************************** ;rainfall distribution for Extreme Severe cyclonic storm ;*********************************************** ; ; 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" begin ;************************************************ ; Read the file ;************************************************ f = addfile("ESCS.nc", "r") prc = f->pcp ;printVarSummary(prc) tot_prc = dim_sum_n_Wrap(prc,0) ;printVarSummary(tot_prc) ;************************************************ ; create colors ;************************************************* wks = gsn_open_wks("png","rainfallESCS") ; open a workstation and send data to png colors = (/ (/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/) /) / 255. ; be sure to make this a float! ;************************************************ ; create panel plots ;************************************************* res = True ; plot options desired res@cnFillOn = True ; turn on color fill res@cnLinesOn = False ; turn off contour lines res@cnFillPalette = colors res@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels res@cnLevels = (/5,10,15,20,25,30,35,40,45,50,55,60,70,80,90,100/) res@mpFillOn = True ; turn on gray continents res@pmTickMarkDisplayMode = "Always" res@mpLimitMode = "LatLon" ; select subregion res@mpMinLatF = -34. res@mpMaxLatF = 34. res@mpMinLonF = 5. res@mpMaxLonF = 130. res@mpProjection = "Mercator" res@lbOrientation = "horizontal" res@trGridType = "TriangularMesh" res@gsnMaximize = True res@gsnLeftString = "(d) ESCS" res@gsnPaperOrientation = "auto" res@mpShapeMode = "FreeAspect" res@vpWidthF = 0.90 res@vpHeightF = 0.70 res@tmYROn = False ; turn off right and top tickmarks res@tmXTOn = False plot = gsn_csm_contour_map(wks, tot_prc,res) ; create plot end