<div dir="ltr"><div><div><div>I&#39;ll look.   dpres_plevel was changed to handle a &#39;pathological&#39; case over the Himalayas.<br><br></div><div>That said  ... I should have changed the documentation to:<br><br><em style="margin:0px;padding:0px;color:rgb(0,0,0);font-family:verdana,sans-serif;font-size:13.3333px;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">ptop</em><span style="color:rgb(0,0,0);font-family:verdana,sans-serif;font-size:13.3333px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline;float:none"></span><p style="margin:10px 0px 20px;padding:0px;color:rgb(51,51,51);font-family:verdana,sans-serif;font-weight:normal;font-size:13.3333px;line-height:12pt;font-variant-ligatures:normal;font-variant-caps:normal;font-style:normal;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" class="gmail-indent">A scalar specifying the top of the column. Must be: (a)  .le. min(plev) and (b) have the same units as<span class="gmail-Apple-converted-space"> </span><em style="margin:0px;padding:0px">plev</em>.</p><p style="margin:10px 0px 20px;padding:0px;color:rgb(51,51,51);font-family:verdana,sans-serif;font-weight:normal;font-size:13.3333px;line-height:12pt;font-variant-ligatures:normal;font-variant-caps:normal;font-style:normal;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" class="gmail-indent">---<br></p></div><div>&#39;ptop&#39; was always meant to be   ptop .le. min(plevel)<br><br></div><div>It was never meant to be an arbitrary *tweener* level.  Hence the name ... ptop<br><br>plev = (/200., 800 /)<br>pbot = 800.<br>ptop = min(plev)     ; should be &lt;= min(plev)                              <br>dp    = dpres_plevel(plev, pbot, ptop, 0)<br>print(&quot;plev=&quot;+plev+&quot; dp=&quot;+dp)               <br><br>---<br>(0)     plev=200 dp=300<br>(1)     plev=800 dp=300<br>--<br>ptop = 50<br>dp = dpres_plevel(plev, pbot, ptop, 0)<br>print(&quot;plev=&quot;+plev+&quot; dp=&quot;+dp)   <br><br>(0)     plev=200 dp=450<br>(1)     plev=800 dp=300<br><br></div><div><br></div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 3, 2017 at 5:23 PM, David Ahijevych <span dir="ltr">&lt;<a href="mailto:ahijevyc@ucar.edu" target="_blank">ahijevyc@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">Hi, <div><br></div><div>I enjoy using the dpres_plevel_Wrap function to calculate weighted-averages, but the function changed from 6.3.0 to 6.4.0. <div><br></div><div>Here is a simple script :</div><div><br></div><div><div>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl&quot;</div><div>plev = (/200., 800 /)</div><div>pbot = 800.</div><div>ptop = 250.</div><div>dp = dpres_plevel_Wrap(plev, pbot, ptop, 0)</div><div>print(&quot;plev=&quot;+plev+&quot; dp=&quot;+dp)</div></div><div><br></div><div><br></div><div>In 6.3.0, the result is</div></div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">(0)<span class="m_7093132981062599207gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>plev=200 dp=250</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">(1)<span class="m_7093132981062599207gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>plev=800 dp=300</span></p></div><div><span style="font-variant-ligatures:no-common-ligatures">In 6.4.0 the result is</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">(0)<span class="m_7093132981062599207gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>plev=200 dp=9.96921e+36</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">(1)<span class="m_7093132981062599207gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>plev=800 dp=9.96921e+36</span></p><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">I think the 6.3.0 way is correct. </span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">Dave</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div></span></div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>