; Example script - plot terrain (using some basic WRF scripts) ; Map info is now added via the special "wrf_map_overlays" function ; November 2008 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/wrf/WRFUserARW.ncl" ; Add special wrf functions begin a = addfile("/DK/dk20/veiga/WRF-OUTPUT/EXPS-SENSIBILIDADE/30SET2013/CTRL/wrfout_d04_2013-09-29_12:00:00.nc","r") y = a->XLAT(1,:,1) x = a->XLONG(1,1,:) type = "pdf" ; type = "pdf" ; type = "ps" ; type = "ncgm" wks = gsn_open_wks(type,"plt_geo_4") ; Create a plot workstation opts = True ; Set some Basic Plot options opts@MainTitle = "GEOGRID FIELDS" ter = a->T2(40,:,:) ; Read the variable to memory res = opts ; Use basic options for this field res@cnFillOn = True ; Create a color fill plot res@Footer = False ; Set Footers off contour = wrf_contour(a,wks,ter,res) res@pmTickMarkDisplayMode = "Always" ; Turn on map tickmarks res@mpDataSetName = "Earth..4" ; This new database contains ; divisions for other countries. res@mpDataBaseVersion = "MediumRes" ; Medium resolution database res@mpOutlineOn = True ; Turn on map outlines res@mpOutlineSpecifiers = (/"Brazil:states"/) res@mpFillOn = True ; Turn on map fill res@mpFillBoundarySets = "National" res@mpFillAreaSpecifiers = (/"Brazil:states"/) res@tiMainString = "States of Brazil" res@mpMaxLatF = y(68) ; South America limits res@mpMinLatF = y(0) res@mpMaxLonF = x(68) res@mpMinLonF = x(0) res@cnFillOn = True ; turn on color res@cnLinesOn = False ; turn contour lines res@gsnSpreadColors = True ; use entire color map res@lbLabelAutoStride = True ; let NCL determine label spacing pltres = True ; Set plot options ;mpres = True ; Set map options ;mpres@mpGeophysicalLineColor = "Black" ; Overwrite basic map settings ;mpres@mpGridLineColor = "Black" ;mpres@mpLimbLineColor = "Black" ;mpres@mpNationalLineColor = "Black" ;mpres@mpPerimLineColor = "Black" ;mpres@mpUSStateLineColor = "Black" plot = wrf_map_overlays(a,wks,(/contour/),res,pltres) ; Plot the data over a map background end