load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" begin a = addfile("./geo_em.d01.nc","r") ; Open a file type = "x11" wks = gsn_open_wks(type,"plt_geo") ; Create a plot workstation res = True ; Set some Basic Plot options res@MainTitle = "GEOGRID FIELDS" res@InitTime = False ; Do not plot time or footers res@Footer = False pltres = True ; Set plot options mpres = True ; Set map options mpres@mpGeophysicalLineColor = "Black" mpres@mpNationalLineColor = "Black" mpres@mpUSStateLineColor = "Black" vNames = getfilevarnames (a) ; Get names of all variables on file nNames = dimsizes (vNames) ; Number of variables on the file do n=0,nNames-1 ; Loop through each variable gsn_define_colormap(wks,"BlAqGrYeOrReVi200") v = a->$vNames(n)$ ; Read the variable to memory opts = res ; Set plot options to be used by all variables opts@cnFillOn = True opts@cnFillMode = "AreaFill" dimv = dimsizes(v) ; dimension size of the variable rank = dimsizes(dimv) ; rank [ie: number of dimensions] dNames = getfilevardims(a,vNames(n)) ndnames = dimsizes(dNames) if ( vNames(n) .eq. "HGT_M") ;control print (vNames(n)) ; print variable name opts@FieldTitle = vNames(n) +" : "+ v@description ; overwrite field name contour = wrf_contour(a,wks,v(0,:,:),opts) plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres) end if ;control delete (v) delete (dimv) delete (rank) delete (opts) delete (dNames) end do end