Graphics: NCL – Example

plotgrids.ncl: A script to read the WPS namelist and plot corresponding domains.

NOTE - you do not need to download this script - it is available in WPS/util/plotgrids.ncl

-To reproduce the plot below - use this namelist

In this script note:

; Set the colors to be used
; Always keep the first two set - this controls front and background
; If you want to use other colors, add them to the end of the list - see NCL web pages for color names

colors = (/"white","black","White","ForestGreen","DeepSkyBlue","Red","Blue"/)
gsn_define_colormap(wks, colors)

; Set some map information, line information, grid spacing, and add a title
mpres = True
mpres@mpFillOn = True
mpres@mpFillColors = (/"background","DeepSkyBlue","ForestGreen","DeepSkyBlue", "transparent"/)
mpres@mpGeophysicalLineColor = "Black"
mpres@mpGridLineColor = "Black"
mpres@mpLimbLineColor = "Black"
mpres@mpNationalLineColor = "Black"
mpres@mpPerimLineColor = "Black"
mpres@mpUSStateLineColor = "Black"
mpres@mpGridSpacingF = 45
mpres@tiMainString = "WPS Domain Configuration"

; This controls the lines used for the nested domains
; The namelist we used had 4 nests (5 domains), and we want to set the colors of the domains as below
; name colors (which must be in defined color table above to use here
)
lnres = True
lnres@gsLineThicknessF = 2.5
lnres@domLineColors = (/ "white", "black" , "Red" , "Blue" /)

; Control the text written above the nested domains
; Currently there is no control over what is written
; There is some limited control over the offset of the test - in this example, we off-set the text for domain 5 a bit (off-set in mother domain grid points)

txres = True
txres@txFont = "helvetica-bold"
txres@txJust = "TopLeft"
txres@txPerimOn = False
txres@txFontHeightF = 0.015