;---------------------------------------------------------------------- ; Read and plot a variable read off the (ds083.3) ; gdas1.fnl0p25.2016030100.f00.grib2 file ; ; Data is rectilinear, 720 x 1440 (lat x lon) ;---------------------------------------------------------------------- begin ;---Read data dir = "../Data/" filename = "gdas1.fnl0p25.2016030100.f00.grib2" a = addfile(dir+filename,"r") print(getfilevarnames(a)) ; Print all variables on the file var_name = "RH_P0_L200_GLL0" var = a->$var_name$ ;---Print some information about the variable. printVarSummary(var) printMinMax(var,0) wks = gsn_open_wks("x11","gdas1_fnl_plot_" + var_name + "_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" ; much faster plotting! res@tiMainString = filename + " : " + var_name plot = gsn_csm_contour_map(wks,var,res) res@cnFillPalette = "MPL_jet" ; chose a different color map plot = gsn_csm_contour_map(wks,var,res) res@cnLevelSpacingF = 2.5 ; Change the contour levels plot = gsn_csm_contour_map(wks,var,res) end