<div dir="ltr"><div class="gmail_default" style="font-size:small">I was unable to run your script because of an error:</div><div class="gmail_default">







<p class="gmail-p1" style="font-size:small"><span class="gmail-s1"><font face="monospace, monospace">fatal:Subscript out of range, error in subscript #0</font></span></p>
<p class="gmail-p1" style="font-size:small"><span class="gmail-s1"><font face="monospace, monospace">fatal:An error occurred reading zcordinate</font></span></p>
<p class="gmail-p1" style="font-size:small"><span class="gmail-s1"><font face="monospace, monospace">fatal:[&quot;Execute.c&quot;:8575]:Execute: Error occurred at or near line 256 in file wrf_CrossSection_WSPplusVecter_positive90tilt_smooth_for2ndMax_combine_another.ncl</font></span></p><p class="gmail-p1" style="font-size:small"><span class="gmail-s1">I made a small modification to get it to run.</span></p><p class="gmail-p1" style="font-size:small"><span class="gmail-s1">For starters, you </span>cannot use &quot;gsn&quot; resources in a &quot;setvalues&quot; call. &quot;gsn&quot; resources are only meant to be passed to various gsn_xxxx or wrf_xxx routines (in some cases).</p><p class="gmail-p1" style="font-size:small">Part of the issue is that you are trying to use wrf_xxxx routines for plotting some highly customized plots. The wrf_xxxx routines are really meant to be used as &quot;black box&quot; type of scripts without a lot of plot customizations.  I always tell users that if they want to do major customizations, to use the gsn_csm_xxx scripts.</p><p class="gmail-p1" style="font-size:small">However, having said all that, the real issue is that whenever you set gsnMaximize to True, this is going to cause your plots to be maximized in whatever output device you are sending it to, including having the plot rotated if it fits better in a landscape orientation.</p><p class="gmail-p1" style="font-size:small">Many of the wrf_xxxx plotting routines set gsnMaximize to True under the hood, so in order to turn this off, you have to set gsnMaximize to FAlse.  wrf_overlays is one of those routines that sets gsnMaximize to True, so I suggest setting this resource before you call wrf_overlays:</p><p class="gmail-p1">  pltres@gsnMaximize = False</p><p class="gmail-p1">Remove *all* other settings of gsnMaximize set in your code, and any references to gsnPaperOrientation, wkOrientation, and gsnOrientation (which is not a valid resource, byt the way). Since &quot;portrait&quot; is the default mode, you don&#39;t need to set any orientation resources.</p><p class="gmail-p1"><br></p><p class="gmail-p1">--Mary</p><p class="gmail-p1"><br></p><p class="gmail-p1"><br></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 5, 2017 at 8:57 AM, Xiaoming Hu <span dir="ltr">&lt;<a href="mailto:xhu@ou.edu" target="_blank">xhu@ou.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 bgcolor="#FFFFFF" text="#996633">
    <div class="m_-7573275015846317441moz-cite-prefix">Hello Mary<br>
      <br>
         Thanks a lot!<br>
         I actually used  &quot;vpYF&quot;             : 0.9-ispecies*0.3484, see
      below:<br>
      <br>
      &quot;<br>
              plot =
wrf_overlays(a,wks,(/contour_<wbr>theta,vector,contour_ter,<wbr>contour_ter3/),pltres)<br>
            setvalues contour_theta<br>
               &quot;vpHeightF&quot;        : 0.34<br>
      ;         &quot;vpYF&quot;             : 0.93-ispecies*0.34084<br>
               &quot;vpYF&quot;             : 0.9-ispecies*0.3484<br>
      ;         &quot;vpWidthF&quot;         : 0.35<br>
      ;         &quot;vpXF&quot;             : 0.15+ispecies*0.355<br>
               &quot;tiMainOffsetYF&quot;   : -0.01<br>
      ;         &quot;gsnRightString&quot;   : &quot;RString&quot; ; res@TimeLabel<br>
               &quot;gsnPaperOrientation&quot; : &quot;portrait&quot;<br>
              &quot;tmXBLabelFontHeightF&quot;    : 0.0182<br>
              &quot;tiYAxisFontHeightF&quot;      : 0.01820  ; effective<br>
              &quot;tmYLLabelFontHeightF&quot;    : 0.0182<br>
              &quot;tiXAxisFontHeightF&quot;      : 0.0182<br>
              &quot;tiYAxisOffsetXF&quot; : 0.012<br>
              &quot;tmYLLabelDeltaF&quot; : -0.8<br>
      <br>
             end setvalues<br>
      &quot;<br>
      <br>
        I tested &quot;res@gsnMaximize = True&quot; as you suggested, I still
      got   (when output eps)<br>
          <img src="cid:part1.94CD790A.AAC6AF66@ou.edu" alt=""><br>
      But if I output png, then it is portrait (i.e., rotated)<br>
      <br>
      I put my script and input data at <br>
<a class="m_-7573275015846317441moz-txt-link-freetext" href="http://www.caps.ou.edu/micronet/WRF-UCM/FocusON_OKC/WRFV3.7.1/with_rr_fixed/wrfNARR2d_UCM_Snudge_WangRec53wave.2002_2015Mean/wrf_CrossSection_WSPplusVecter_positive90tilt_smooth_for2ndMax_combine_another.ncl" target="_blank">http://www.caps.ou.edu/<wbr>micronet/WRF-UCM/FocusON_OKC/<wbr>WRFV3.7.1/with_rr_fixed/<wbr>wrfNARR2d_UCM_Snudge_<wbr>WangRec53wave.2002_2015Mean/<wbr>wrf_CrossSection_<wbr>WSPplusVecter_positive90tilt_<wbr>smooth_for2ndMax_combine_<wbr>another.ncl</a><br>
<a class="m_-7573275015846317441moz-txt-link-freetext" href="http://www.caps.ou.edu/micronet/WRF-UCM/FocusON_OKC/WRFV3.7.1/with_rr_fixed/wrfNARR2d_UCM_Snudge_WangRec53wave.2002_2015Mean/wrfout_d02_21_ncea_14yrAugmean_wrfNARR2d_UCM_Snudge_WangRec53wave.nc" target="_blank">http://www.caps.ou.edu/<wbr>micronet/WRF-UCM/FocusON_OKC/<wbr>WRFV3.7.1/with_rr_fixed/<wbr>wrfNARR2d_UCM_Snudge_<wbr>WangRec53wave.2002_2015Mean/<wbr>wrfout_d02_21_ncea_<wbr>14yrAugmean_wrfNARR2d_UCM_<wbr>Snudge_WangRec53wave.nc</a><br>
      You should be able to run the script.<br>
      <br>
      Thanks a lot!<br>
      Xiaoming <br>
      <a class="m_-7573275015846317441moz-txt-link-freetext" href="http://xiaominghu.oucreate.com/" target="_blank">http://xiaominghu.oucreate.<wbr>com/</a><div><div class="h5"><br>
      <br>
      On 01/05/2017 09:23 AM, Mary Haley wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_default" style="font-size:small">Hi Xiaoming,</div>
        <div class="gmail_default" style="font-size:small"><br>
        </div>
        <div class="gmail_default" style="font-size:small">I assume you
          are using gsn_panel to do the final draw of these two plots.</div>
        <div class="gmail_default" style="font-size:small"><br>
        </div>
        <div class="gmail_default" style="font-size:small">If so, you
          want to set gsnMaximize to True *and* set gsnPaperOrientation.</div>
        <div class="gmail_default" style="font-size:small"><br>
        </div>
        <div class="gmail_default" style="font-size:small">I&#39;ve included
          a short script that illustrates this. Change the &quot;orientation&quot;
          variable to the desired orientation and run the script.</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>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Jan 4, 2017 at 11:18 AM,
          xiaoming Hu <span dir="ltr">&lt;<a href="mailto:yuanfangcan@hotmail.com" target="_blank">yuanfangcan@hotmail.com</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 id="m_-7573275015846317441m_2086245024400280268divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
                <p>Interesting, I got <span>different orientations
                    depending on output png or eps. If I output png, I
                    got portrait, but I got landscape if I output eps.</span></p>
                <p><span><br>
                  </span></p>
                <p><span>See my output figure</span></p>
                <p><span><a href="http://www.caps.ou.edu/micronet/WRF-UCM/FocusON_OKC/WRFV3.7.1/with_rr_fixed/wrfNARR2d_UCM_Snudge_WangRec53wave.2002_2015Mean/wrfout_d02_W_crossSN90_2ndMax_smooth_partial_8.png" class="m_-7573275015846317441m_2086245024400280268OWAAutoLink" id="m_-7573275015846317441m_2086245024400280268LPlnk126675" target="_blank">http://www.caps.ou.edu/microne<wbr>t/WRF-UCM/FocusON_OKC/WRFV3.7.<wbr>1/with_rr_fixed/wrfNARR2d_UCM_<wbr>Snudge_WangRec53wave.2002_<wbr>2015Mean/wrfout_d02_W_<wbr>crossSN90_2ndMax_smooth_<wbr>partial_8.png</a><br>
                  </span></p>
                <p><br>
                </p>
                <p><a href="http://www.caps.ou.edu/micronet/WRF-UCM/FocusON_OKC/WRFV3.7.1/with_rr_fixed/wrfNARR2d_UCM_Snudge_WangRec53wave.2002_2015Mean/wrfout_d02_W_crossSN90_2ndMax_smooth_partial_8.eps" class="m_-7573275015846317441m_2086245024400280268OWAAutoLink" id="m_-7573275015846317441m_2086245024400280268LPlnk285887" target="_blank">http://www.caps.ou.edu/microne<wbr>t/WRF-UCM/FocusON_OKC/WRFV3.7.<wbr>1/with_rr_fixed/wrfNARR2d_UCM_<wbr>Snudge_WangRec53wave.2002_<wbr>2015Mean/wrfout_d02_W_<wbr>crossSN90_2ndMax_smooth_<wbr>partial_8.eps</a><br>
                </p>
                <p><br>
                </p>
                <p>See my script:</p>
                <p><a href="http://www.caps.ou.edu/micronet/WRF-UCM/FocusON_OKC/WRFV3.7.1/with_rr_fixed/wrfNARR2d_UCM_Snudge_WangRec53wave.2002_2015Mean/wrf_CrossSection_WSPplusVecter_positive90tilt_smooth_for2ndMax_combine_another.ncl" class="m_-7573275015846317441m_2086245024400280268OWAAutoLink" id="m_-7573275015846317441m_2086245024400280268LPlnk507481" target="_blank">http://www.caps.ou.edu/microne<wbr>t/WRF-UCM/FocusON_OKC/WRFV3.7.<wbr>1/with_rr_fixed/wrfNARR2d_UCM_<wbr>Snudge_WangRec53wave.2002_<wbr>2015Mean/wrf_CrossSection_WSPp<wbr>lusVecter_positive90tilt_smoot<wbr>h_for2ndMax_combine_another.<wbr>ncl</a><br>
                </p>
                <p><br>
                </p>
                <p>I tried a few resources (including <span style="font-size:12pt">gsnPaperOrientation<wbr>,  </span><span style="font-size:12pt">wkOrientation = &quot;portrait&quot; </span>)
                  to rotate the eps orientation, but all failed.
                  Currently landscape, I want portrait. </p>
                <p><br>
                </p>
                <p>Any suggestions?</p>
                <p><br>
                </p>
                <p> Thanks a lot!</p>
                <span class="m_-7573275015846317441HOEnZb"><font color="#888888">
                    <p>Xiaoming </p>
                    <p><br>
                    </p>
                  </font></span></div>
            </div>
            <br>
            ______________________________<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>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <p><br>
    </p>
  </div></div></div>

</blockquote></div><br></div>