;---------------------------------------------------------------------- ; Read and plot a variable read off a Global Precipitation Climatology ; Project (GPCP) daily precipitation estimates file. ;---------------------------------------------------------------------- begin ;---Read data filename = "http://rda.ucar.edu/thredds/dodsC/files/g/ds728.2/netcdf/gpcp_v2.2.2015.nc" a = addfile(filename,"r") precip = a->Precip(0,:,:) ; time x lat x lon printVarSummary(precip) printMinMax(precip,0) wks = gsn_open_wks("x11","gpcp_opendap_plot_precip_ncl") ;---Set some plot options res = True res@cnFillOn = True ; turn on contour fill res@cnLinesOn = False ; turn off contour lines res@cnLineLabelsOn = False ; turn off line labels res@cnFillMode = "RasterFill" ; Can be much faster than "AreaFill" res@tiMainString = filename res@tiMainFontHeightF = 0.018 ; smaller title res@gsnLeftString ="Precipitation Estimate" ; precip@long_name too long! res@cnLevelSelectionMode = "ExplicitLevels" res@cnLevels = (/0.1,1,2.5,5,10,15,20,25,50,75/) ; "mm/day" res@cnFillPalette = (/"Snow","PaleTurquoise","PaleGreen","SeaGreen3" ,"Yellow", \ "Orange","HotPink","Red","Violet", "Purple", "Brown"/) ;--"precip" is a 2D array. Only plot first timestep plot = gsn_csm_contour_map(wks,precip,res) end