[ncl-talk] Page Orientation with WRF Panel Plots
Holman, Kathleen
kholman at usbr.gov
Tue Nov 29 11:34:55 MST 2016
Hi,
I am trying to produce a portrait, three-panel plot of terrain heights from
a nested WRF simulation. When my workstation output type is set to x11,
the plots show up as a 3x1 column. However, when I change the workstation
output type to pdf or ps, the plots are forced into landscape mode and some
of the images are cut off. The plots come out as a 3x1 column that is
rotated clockwise 90 degrees. I have tried setting the gsnPaperOrientation
option to "portrait" in four different setting locations with no success.
I receive no error messages when running the script, yet my settings are
not being realized.
Has anyone found a way to force WRF panel plots into a specific paper
orientation?
----------
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
; type = "x11"
type = "pdf"
; type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"panel_plot_geo_domains") ; Create a plot
workstation
gsn_define_colormap(wks,"rainbow")
plot = new(3,graphic)
fdir = "/home/kholman/WRF/WPS3.7/"
res = True ; Create some plot resources
res at cnFillOn = True ; Create a color fill plot
res at cnLineLabelsOn = False
res at NoHeaderFooter = True
res at gsnSpreadColors = True
res at lbLabelBarOn = False
res at ContourParameters = (/0., 3500., 250./)
res at gsnPaperOrientation = "Portrait"
pltres = True
pltres at PanelPlot = True
pltres at gsnPaperOrientation = "Portrait"
mpres = True
mpres at mpGeophysicalLineColor = "Black" ; Overwrite basic map settings
mpres at mpGridLineColor = "Gray"
mpres at mpLimbLineColor = "Gray"
mpres at mpNationalLineColor = "Black"
mpres at mpPerimLineColor = "Black"
mpres at mpUSStateLineColor = "Black"
mpres at gsnPaperOrientation = "Portrait"
do j = 1,3
a = addfile(fdir+"geo_em.d0"+j+".nc","r") ; Open a file
ter = a->HGT_M(0,:,:) ; Read the variable to memory
contour = wrf_contour(a,wks,ter,res)
plot(j-1) = wrf_map_overlays(a,wks,(/contour/),pltres,mpres) ;
Create plot
delete([/ter/])
end do
pnlres = True
pnlres at txString = ""
pnlres at gsnPanelYWhiteSpacePercent = 5 ; Add white space b/w plots.
pnlres at gsnPanelLabelBar = True ; Turn on common labelbar
pnlres at lbLabelAutoStride = True ; Spacing of lbar labels.
pnlres at lbBoxMinorExtentF = 0.15
pnlres at gsnPaperOrientation = "Portrait"
gsn_panel(wks,(/plot/),(/3,1/),pnlres)
end
--
Katie Holman, PhD
Meteorologist
Bureau of Reclamation
Technical Service Center
P.O. Box 25007, 86-68250
Denver, CO 80225-0007
303-445-2571
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161129/9fd194c1/attachment.html
More information about the ncl-talk
mailing list