[ncl-talk] Page Orientation with WRF Panel Plots

Mary Haley haley at ucar.edu
Tue Nov 29 16:22:48 MST 2016


Hi Katie,

I tried to reproduce this problem using some geo_em files I have with your
script, but there's something weird going on.

Can you provide your geo_em* files?  You can use our ftp, if the files are
not too large:

    ftp ftp.cgd.ucar.edu
    <log in as "anonymous">
    <Use email address as password>
    cd incoming
    put <your files>
    quit

Please note you can't list the contents of this directory; I'll need to
know the exact name of the file(s) in order to retrieve it (them). You can
email me offline with the filenames, if you are concerned about publicizing
them for any reason.

Thanks,

--Mary




On Tue, Nov 29, 2016 at 11:34 AM, Holman, Kathleen <kholman at usbr.gov> wrote:

> 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
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161129/70638be1/attachment.html 


More information about the ncl-talk mailing list