;---------------------------------------------------------------------- ; This is a very basic NCL template for creating contours over maps of ; a variable read off a WRF output file. This template plots one ; timestep of HGT from a WRF file. You can modify this script to ; plot other variables on the same file. ; ; This script calls wrf_user_getvar to read the variable, and ; wrf_map_resources to set the native WRF map projection ; resources, but then uses gsn_csm_xxxx scripts to do the plotting. ; ; This script sets very few other plotting resources. ;---------------------------------------------------------------------- ; Note: as of NCL V6.2.0, you don't need these four load commands ;---------------------------------------------------------------------- ;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/csm/contributed.ncl" ;load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" begin filename = "wrfout_d01_2002-07.nc" a = addfile(filename,"r") hgt = wrf_user_getvar(a,"HGT",0) ;---Open workstation wks = gsn_open_wks("x11","wrf_simple_native_gsn") ; "ps", "pdf", "png" ;---Set some resources res = True res@gsnMaximize = True ; Maximize plot in frame res@cnFillOn = True ; Turn on color fill res = wrf_map_resources(a,res) ; Set map resources needed for res@tfDoNDCOverlay = True ; native WRF map projection. res@gsnAddCyclic = False ; Don't add cyclic point plot = gsn_csm_contour_map(wks,hgt,res) end