<div dir="ltr"><div class="gmail_default"><font face="arial, helvetica, sans-serif">Hi Katie,</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Good catch!  I think I was using the domain area from the first file for all three files.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">I was afraid there was a bug in your data, so I went overboard and created three plots to make sure there wasn&#39;t.  I think it&#39;s all okay.  :-)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Here are the three plots and their images:</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default">[1] <span style="font-family:arial,helvetica,sans-serif;font-variant-ligatures:no-common-ligatures">plot_WRF_terrain_post_gsn_native.ncl</span></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">This plots all three data sets using the native map projection defined on each file. This is the corrected version of what I sent you yesterday.<br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">[2] </font><span style="font-family:arial,helvetica,sans-serif;font-variant-ligatures:no-common-ligatures">plot_WRF_terrain_post_gsn_latlon.ncl</span></div><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">This plots all three data sets over a basic lat/lon projection. Since it&#39;s not using the native projection on the files, it reads XLAT_M and XLONG_M to correctly plot the data.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif">[3] </span><span style="font-family:arial,helvetica,sans-serif">plot_WRF_terrain_post_gsn_native_dom1.ncl</span></div><div class="gmail_default"><p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">This plots all three data sets using the map projection defined on the biggest domain (domain 1). Again, since I&#39;m not using the native projection for the two domains, I use XLAT and XLONG to correctly plot everything.</font></span></p></div><div class="gmail_default" style="font-size:small">See attached</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 1, 2016 at 12:06 PM, Holman, Kathleen <span dir="ltr">&lt;<a href="mailto:kholman@usbr.gov" target="_blank">kholman@usbr.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">This is interesting.  The main problem with the &quot;gsn&quot; script and plot you sent is that the state boundaries are in the wrong places for the middle and bottom panels.  Those are the nests of the WRF simulation, and cover less and less area (in the state of California).  </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Turning pnlres@gsnMaximize = True does put the figures in a portrait orientation, however the figures are then three different sizes.  I tried the pnlres@gsnPanelScalePlotIndex option to force the figures to the same size, but this had no effect.  I also tried forcing the plot heights using res@vpWidthF and res@vpHeightF, which also did not fix the problem.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">In the end, the three plots do show up in portrait mode now.  </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks for your help, Mary!!</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 1, 2016 at 11:11 AM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Thanks for providing the files, Katie, it looks like there&#39;s a bug, and I admit I&#39;m stumped by this one because &quot;portrait&quot; mode should have been the default with your plots, since the panel area is higher than it is wide.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">There are some cases where your plots suddenly go into landscape mode, for example if I add this:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">pnlres@gsnPanelBoxes = True</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">This resource draws a red box around each object in a panel plot so you can see how much room it is taking up. Sometimes there&#39;s &quot;invisible&quot; white space around a plot (like with a blank title) and this resource helps you see those.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">A quick fix is to add this resource to your panel plot:</div><div class="gmail_default" style="font-size:small">







<p class="m_314189671972452753m_-5927135345069817327gmail-p1"><span class="m_314189671972452753m_-5927135345069817327gmail-s1">pnlres@gsnMaximize    = True</span></p><p class="m_314189671972452753m_-5927135345069817327gmail-p1">Finally, you can remove the pltres@gsnPaperOrientation setting, because this is likely having no effect.</p><p class="m_314189671972452753m_-5927135345069817327gmail-p1">HOWEVER, after having said all this, I decided to create a &quot;gsn&quot; version of this script, to see if it handled the paneling a little better. The wrf_contour/wrf_map_overlays procedures are really tailored do to single plots with nice titles, and are not easy to customize when you want to throw them in a panel.</p><p class="m_314189671972452753m_-5927135345069817327gmail-p1">Please see the attached &quot;gsn&quot; version of the script.  I use &quot;wrf_map_resources&quot; so you can get the same map projection as what&#39;s defined on the file. But, I then use gsn_csm_contour_map to plot the data. One thing I noticed is that with the &quot;gsn&quot; version, you now get US states for every plot.  I&#39;m not sure if you wanted this or not?</p><span class="m_314189671972452753HOEnZb"><font color="#888888"><div>--Mary</div><div><br></div></font></span></div><div><div class="m_314189671972452753h5"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">The filename of my NCL script is &quot;plot_WRF_terrain_post.ncl&quot; without double quotes.  </div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">  Katie</div></div><div class="m_314189671972452753m_-5927135345069817327gmail-HOEnZb"><div class="m_314189671972452753m_-5927135345069817327gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 29, 2016 at 4:22 PM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-size:small">Hi Katie,</div><div style="font-size:small"><br></div><div style="font-size:small">I tried to reproduce this problem using some geo_em files I have with your script, but there&#39;s something weird going on.</div><div style="font-size:small"><br></div><div style="font-size:small">Can you provide your geo_em* files?  You can use our ftp, if the files are not too large:</div><div style="font-size:small"><br></div><div><div>    ftp <a href="http://ftp.cgd.ucar.edu" target="_blank">ftp.cgd.ucar.edu</a></div><div>    &lt;log in as &quot;anonymous&quot;&gt;</div><div>    &lt;Use email address as password&gt;</div><div>    cd incoming</div><div>    put &lt;your files&gt;</div><div>    quit</div><div>    </div><div>Please note you can&#39;t list the contents of this directory; I&#39;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.</div><div><br></div><div>Thanks,</div><div><br></div><div>--Mary</div><div><br></div><div style="font-size:small"><br></div></div><div style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Nov 29, 2016 at 11:34 AM, Holman, Kathleen <span dir="ltr">&lt;<a href="mailto:kholman@usbr.gov" target="_blank">kholman@usbr.gov</a>&gt;</span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="m_314189671972452753m_-5927135345069817327gmail-m_9034160802105134570h5"><div dir="ltr"><div style="font-family:tahoma,sans-serif">Hi,</div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">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 &quot;portrait&quot; in four different setting locations with no success.  I receive no error messages when running the script, yet my settings are not being realized.  </div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">Has anyone found a way to force WRF panel plots into a specific paper orientation?  </div><div><br></div><div><div style="font-family:tahoma,sans-serif">​----------</div></div><div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/wrf/WRFUserARW.ncl&quot;</div><div><br></div><div>begin</div><div><br></div><div>; type = &quot;x11&quot;</div><div> type = &quot;pdf&quot;</div><div>; type = &quot;ps&quot;</div><div>; type = &quot;ncgm&quot;</div><div>wks = gsn_open_wks(type,&quot;panel_plot_<wbr>geo_domains&quot;)     ; Create a plot workstation</div><div><br></div><div>gsn_define_colormap(wks,&quot;rainb<wbr>ow&quot;)</div><div>plot = new(3,graphic)</div><div><br></div><div>fdir = &quot;/home/kholman/WRF/WPS3.7/&quot;</div><div><br></div><div>res = True                              ; Create some plot resources</div><div>res@cnFillOn = True                      ; Create a color fill plot</div><div>res@cnLineLabelsOn = False</div><div>res@NoHeaderFooter = True</div><div>res@gsnSpreadColors = True</div><div>res@lbLabelBarOn = False</div><div>res@ContourParameters = (/0., 3500., 250./)</div><div>res@gsnPaperOrientation = &quot;Portrait&quot;</div><div><br></div><div>pltres = True</div><div>pltres@PanelPlot = True</div><div>pltres@gsnPaperOrientation = &quot;Portrait&quot;</div><div><br></div><div>mpres = True</div><div>mpres@mpGeophysicalLineColor      = &quot;Black&quot;  ; Overwrite basic map settings</div><div>mpres@mpGridLineColor             = &quot;Gray&quot;</div><div>mpres@mpLimbLineColor             = &quot;Gray&quot;</div><div>mpres@mpNationalLineColor         = &quot;Black&quot;</div><div>mpres@mpPerimLineColor            = &quot;Black&quot;</div><div>mpres@mpUSStateLineColor          = &quot;Black&quot;</div><div>mpres@gsnPaperOrientation = &quot;Portrait&quot;</div><div><br></div><div>do j = 1,3</div><div><span class="m_314189671972452753m_-5927135345069817327gmail-m_9034160802105134570m_-616566970392981153m_8414815611371091160gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>a = addfile(fdir+&quot;geo_em.d0&quot;+j+&quot;.n<wbr>c&quot;,&quot;r&quot;)   ; Open a file</div><div><br></div><div><span class="m_314189671972452753m_-5927135345069817327gmail-m_9034160802105134570m_-616566970392981153m_8414815611371091160gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>ter = a-&gt;HGT_M(0,:,:)                    ; Read the variable to memory</div><div><span class="m_314189671972452753m_-5927135345069817327gmail-m_9034160802105134570m_-616566970392981153m_8414815611371091160gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>contour = wrf_contour(a,wks,ter,res)</div><div><br></div><div><span class="m_314189671972452753m_-5927135345069817327gmail-m_9034160802105134570m_-616566970392981153m_8414815611371091160gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>plot(j-1) = wrf_map_overlays(a,wks,(/conto<wbr>ur/),pltres,mpres)          ; Create plot</div><div><span class="m_314189671972452753m_-5927135345069817327gmail-m_9034160802105134570m_-616566970392981153m_8414815611371091160gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>delete([/ter/])</div><div>end do</div><div><br></div><div>pnlres                            = True</div><div>pnlres@txString                   = &quot;&quot; </div><div>pnlres@gsnPanelYWhiteSpacePerc<wbr>ent = 5       ; Add white space b/w plots.</div><div>pnlres@gsnPanelLabelBar           = True    ; Turn on common labelbar</div><div>pnlres@lbLabelAutoStride          = True    ; Spacing of lbar labels.</div><div>pnlres@lbBoxMinorExtentF          = 0.15</div><div>pnlres@gsnPaperOrientation = &quot;Portrait&quot;</div><div><br></div><div>gsn_panel(wks,(/plot/),(/3,1/)<wbr>,pnlres)</div><div><br></div><div>end</div></div><span class="m_314189671972452753m_-5927135345069817327gmail-m_9034160802105134570m_-616566970392981153HOEnZb"><font color="#888888"><div><br></div><div><br></div><div><br></div>-- <br><div class="m_314189671972452753m_-5927135345069817327gmail-m_9034160802105134570m_-616566970392981153m_8414815611371091160gmail_signature"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">Katie Holman, PhD<br></font></div><div><font face="arial, helvetica, sans-serif">Meteorologist</font></div><div><font face="arial, helvetica, sans-serif">Bureau of Reclamation<br></font></div><div><div><font face="arial, helvetica, sans-serif">Technical Service Center<br></font></div><div><font face="arial, helvetica, sans-serif">P.O. Box 25007, 86-68250</font></div><div><font face="arial, helvetica, sans-serif">Denver, CO 80225-0007</font></div><div><font face="arial, helvetica, sans-serif"><a href="tel:303-445-2571" value="+13034452571" target="_blank">303-445-2571</a></font></div></div><div><br></div></div></div>
</font></span></div>
<br></div></div><span>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_314189671972452753m_-5927135345069817327gmail-m_9034160802105134570gmail_signature"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">Katie Holman, PhD<br></font></div><div><font face="arial, helvetica, sans-serif">Meteorologist</font></div><div><font face="arial, helvetica, sans-serif">Bureau of Reclamation<br></font></div><div><div><font face="arial, helvetica, sans-serif">Technical Service Center<br></font></div><div><font face="arial, helvetica, sans-serif">P.O. Box 25007, 86-68250</font></div><div><font face="arial, helvetica, sans-serif">Denver, CO 80225-0007</font></div><div><font face="arial, helvetica, sans-serif"><a href="tel:303-445-2571" value="+13034452571" target="_blank">303-445-2571</a></font></div></div><div><br></div></div></div>
</div>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_314189671972452753gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">Katie Holman, PhD<br></font></div><div><font face="arial, helvetica, sans-serif">Meteorologist</font></div><div><font face="arial, helvetica, sans-serif">Bureau of Reclamation<br></font></div><div><div><font face="arial, helvetica, sans-serif">Technical Service Center<br></font></div><div><font face="arial, helvetica, sans-serif">P.O. Box 25007, 86-68250</font></div><div><font face="arial, helvetica, sans-serif">Denver, CO 80225-0007</font></div><div><font face="arial, helvetica, sans-serif"><a href="tel:303-445-2571" value="+13034452571" target="_blank">303-445-2571</a></font></div></div><div><br></div></div></div>
</div>
</div></div></blockquote></div><br></div>