<div dir="ltr"><div class="gmail_default" style="font-family:&quot;times new roman&quot;,serif;font-size:large">Dear Bill,</div><div class="gmail_default" style="font-family:&quot;times new roman&quot;,serif;font-size:large"><br>Thanks so much for your response!</div><div class="gmail_default" style="font-family:&quot;times new roman&quot;,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:&quot;times new roman&quot;,serif;font-size:large">I&#39;ve check in several ways that, all of the units are correct. And non missing value, non strange value. The problem still exists.</div><div class="gmail_default" style="font-family:&quot;times new roman&quot;,serif;font-size:large">Here are the result for printVarSummary on each of my input variables:</div><div class="gmail_default">







<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Variable: p</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Type: float</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Total Size: 595200 bytes</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            148800 values</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number of Dimensions: 4</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Dimensions and sizes:<span class="gmail-Apple-tab-span">        </span>[hour | 8] x [lev | 24] x [lat | 31] x [lon | 25]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Coordinates: </font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            hour: [0..21]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lev: [10000..100000]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lat: [-48.31578947368421..8.526315789473685]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lon: [ 270.. 330]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number Of Attributes: 1</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  units :<span class="gmail-Apple-tab-span">        </span>Pa</font></span></p>
<p class="gmail-p2"><font face="arial, helvetica, sans-serif"><span class="gmail-s1"></span><br></font></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Variable: T</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Type: float</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Total Size: 595200 bytes</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            148800 values</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number of Dimensions: 4</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Dimensions and sizes:<span class="gmail-Apple-tab-span">        </span>[hour | 8] x [lev | 24] x [lat | 31] x [lon | 25]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Coordinates: </font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            hour: [0..21]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lev: [10000..100000]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lat: [-48.31578947368421..8.526315789473685]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lon: [ 270.. 330]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number Of Attributes: 5</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  day :<span class="gmail-Apple-tab-span">        </span>1</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  year :<span class="gmail-Apple-tab-span">        </span>1</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  units :<span class="gmail-Apple-tab-span">        </span>K</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  long_name :<span class="gmail-Apple-tab-span">        </span>Temperature</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  _FillValue :<span class="gmail-Apple-tab-span">        </span>9.96921e+36</font></span></p>
<p class="gmail-p2"><font face="arial, helvetica, sans-serif"><span class="gmail-s1"></span><br></font></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Variable: Q</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Type: float</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Total Size: 595200 bytes</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            148800 values</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number of Dimensions: 4</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Dimensions and sizes:<span class="gmail-Apple-tab-span">        </span>[hour | 8] x [lev | 24] x [lat | 31] x [lon | 25]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Coordinates: </font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            hour: [0..21]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lev: [10000..100000]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lat: [-48.31578947368421..8.526315789473685]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lon: [ 270.. 330]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number Of Attributes: 5</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  day :<span class="gmail-Apple-tab-span">        </span>1</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  year :<span class="gmail-Apple-tab-span">        </span>1</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  units :<span class="gmail-Apple-tab-span">        </span>kg/kg</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  long_name :<span class="gmail-Apple-tab-span">        </span>Specific humidity</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  _FillValue :<span class="gmail-Apple-tab-span">        </span>9.96921e+36</font></span></p>
<p class="gmail-p2"><font face="arial, helvetica, sans-serif"><span class="gmail-s1"></span><br></font></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Variable: Z</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Type: float</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Total Size: 595200 bytes</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            148800 values</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number of Dimensions: 4</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Dimensions and sizes:<span class="gmail-Apple-tab-span">        </span>[hour | 8] x [lev | 24] x [lat | 31] x [lon | 25]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Coordinates: </font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            hour: [0..21]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lev: [10000..100000]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lat: [-48.31578947368421..8.526315789473685]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            lon: [ 270.. 330]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number Of Attributes: 5</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  day :<span class="gmail-Apple-tab-span">        </span>1</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  year :<span class="gmail-Apple-tab-span">        </span>1</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  units :<span class="gmail-Apple-tab-span">        </span>m</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  long_name :<span class="gmail-Apple-tab-span">        </span>Geopotential Height (above sea level)</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  _FillValue :<span class="gmail-Apple-tab-span">        </span>9.96921e+36</font></span></p>
<p class="gmail-p2"><font face="arial, helvetica, sans-serif"><span class="gmail-s1"></span><br></font></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Variable: zs</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Type: float</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Total Size: 24800 bytes</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            6200 values</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number of Dimensions: 3</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Dimensions and sizes:<span class="gmail-Apple-tab-span">        </span>[8] x [31] x [25]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Coordinates: </font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number Of Attributes: 2</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  units :<span class="gmail-Apple-tab-span">        </span>m</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  _FillValue :<span class="gmail-Apple-tab-span">        </span>1e+15</font></span></p>
<p class="gmail-p2"><font face="arial, helvetica, sans-serif"><span class="gmail-s1"></span><br></font></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Variable: ps</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Type: float</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Total Size: 24800 bytes</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">            6200 values</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number of Dimensions: 3</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Dimensions and sizes:<span class="gmail-Apple-tab-span">        </span>[8] x [31] x [25]</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Coordinates: </font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">Number Of Attributes: 1</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">  units :<span class="gmail-Apple-tab-span">        </span>Pa</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif"> capecalc3d: Outside of lookup table bounds. prs,thte=   925.000000000000     </font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif">   856.034700407579     </font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="arial, helvetica, sans-serif"><br></font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="times new roman, serif" size="4">Thanks again!</font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="times new roman, serif" size="4">Best,</font></span></p><p class="gmail-p1"><span class="gmail-s1"><font face="times new roman, serif" size="4">Kai</font></span></p></div><img src="http://t.sidekickopen65.com/e1t/o/5/f18dQhb0S7ks8dDMPbW2n0x6l2B9gXrN7sKj6v4fhhMW1p7Y9C7dSGy-W4X9YsK1pctGFW8NqsSQ1k1H6H0?si=4754807383916544&amp;pi=02e16246-a903-4cde-eb8d-b3de50929a20" style="display:none!important" height="1" width="1"></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 12, 2016 at 10:41 AM, Bill Ladwig <span dir="ltr">&lt;<a href="mailto:ladwig@ucar.edu" target="_blank">ladwig@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 Kai,<div><br></div><div>wrf_cape_2d requires the pressure argument (first argument) to be in units of Pa and the surface pressure argument (6th argument) to be in units of hPa, so double check that.  Temperature needs to be in Kelvin.  Height is in meters.  Water vapor mixing ratio is in units of kg/kg.  The error message you are getting is indicating that theta-e is being calculated to 856.03 K, which is obviously nonsensical, so one of your input arrays is in the wrong units, contains missing values, or has a bogus number in it.  This algorithm relies on lookup tables, which is why things can go wrong in a hurry if something is not right.  If you&#39;re still having problems, please reply with the result for printVarSummary on each of your input variables.</div><div><br></div><div>Hope this helps,</div><div><br></div><div>Bill</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Sep 9, 2016 at 8:34 PM, Kai Zhang <span dir="ltr">&lt;<a href="mailto:kzkaizhang@gmail.com" target="_blank">kzkaizhang@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_default" style="font-family:&quot;times new roman&quot;,serif;font-size:large">Dear NCL support,</div><div class="gmail_default" style="font-family:&quot;times new roman&quot;,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:&quot;times new roman&quot;,serif;font-size:large">I am currently using function wrf_cape_2d to calculate CIN and CAPE. But I cannot stop getting errors:</div><div class="gmail_default" style="font-family:&quot;times new roman&quot;,serif;font-size:large">







<p><span>&quot;capecalc3d: Outside of lookup table bounds. prs,thte=   925.000000000000     </span>856.034700407579&quot;</p><p>I am sure that I got units for each variable correctly. </p><p>It is weird that, if I change &quot;p (unit: Pa)&quot; to &quot;p (unit: hPa)&quot;, I can get it run smoothly. But the CIN and CAPE calculated are obviously wrong.</p><p>Do you know why?</p><p><br></p><p>Thanks a lot for your help!</p><p>Best,</p><p>Kai</p></div>
<img src="http://t.sidekickopen65.com/e1t/o/5/f18dQhb0S7ks8dDMPbW2n0x6l2B9gXrN7sKj6v4fhhMW1p7Y9C7dSGy-W4X9YsK1pctGFW8NqsSQ1k1H6H0?si=4754807383916544&amp;pi=5a3a3138-7c1f-4942-8f23-e57478f7b21f" style="display:none!important" height="1" width="1"></div>
<br></div></div>______________________________<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></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span><div>-------------------------------------------------------------------------------</div><div>Kai Zhang</div><div>The University of Texas at Austin, TX (2012 - )</div><div>Graduate Research Assistant,</div><div>Jackson School of Geosciences</div><div><div>BS, Peking University, China (2008 - 2012)</div><div>Dept. Atmospheric and Oceanic Science, School of Physics</div></div><div><div>Cellphone: +1 512 520 6902</div><div><a href="https://sites.google.com/site/kaizhanghomepage/" target="_blank">https://sites.google.com/site/kaizhanghomepage/</a><br></div><div>Email: <a href="mailto:zhangkai@utexas.edu" style="color:rgb(17,85,204)" target="_blank">kzkaizhang@utexas.edu</a></div></div><div>          <a href="mailto:kzkaizhang@gmail.com" target="_blank">kzkaizhang@gmail.com</a></div><div><br></div></span></div></div></div></div>
</div>