<div dir="ltr">Dear Guido,<div><br></div><div>I used in Pa and the result is undef. I sent a e-mail to <a href="mailto:wrfhelp@ucar.edu">wrfhelp@ucar.edu</a>.<br></div><div><br></div><div>Thanks,</div><div><br></div><div>Guilherme.</div><br><div class="gmail_quote"><div dir="ltr">Em qua, 6 de abr de 2016 às 07:21, Guido Cioni &lt;<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>&gt; escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Guilherme, you should pose this question on the ncl-talk dedicated to WRF (<a href="mailto:wrfhelp@ucar.edu" target="_blank">wrfhelp@ucar.edu</a>). <div><div><br></div><div>It seems that the problem is related to <font face="Menlo">THTE</font> but, judging from the code, it appears that this variable is computed based on pressure, so that if you pass the wrong units you will eventually get a NaN. I think that you are using hPa instead of Pa judging from the output message that you get (<b>1016.5871875000000</b>). Try to use the correct units and see if you still get an error. If it’s still the case please try to</div><div><br><div><ul><li>pass to the function only a subset of the data in order to see if the vertical levels are too much for the routine to handle. In my case I omitted the first 30 upper vertical levels doing that:  <font face="Menlo">values=wrf_cape_2d(pres(:,31:149,:,:),temp(:,31:149,:,:),qvap(:,31:149,:,:),z(:,31:149,:,:),z(:,149,:,:),pres(:,149,:,:),False)</font>. I was getting a different error but maybe it’s worth trying also in your case..</li><li>do you have missing values in the data used for the computation of CAPE? Please mind that there is no control on missing data in that function, so that you need to remove them before.</li></ul><div>Cheers</div><div><br></div><div>P.S. Just for reference, you can found the code of the deprecated function, which I believe it is included in the new one, here <a href="https://www.ncl.ucar.edu/Support/talk_archives/2010/att-0235/rip_cape.f" target="_blank">https://www.ncl.ucar.edu/Support/talk_archives/2010/att-0235/rip_cape.f</a> </div><div><br></div><div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Guido Cioni</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://guidocioni.altervista.org" target="_blank">http://guidocioni.altervista.org</a> </div>

</div>
<br><div><blockquote type="cite"></blockquote></div></div></div></div></div><div style="word-wrap:break-word"><div><div><div><div><blockquote type="cite"><div>On 05 Apr 2016, at 21:35, Guilherme Martins &lt;<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a>&gt; wrote:</div><br></blockquote></div></div></div></div></div><div style="word-wrap:break-word"><div><div><div><div><blockquote type="cite"><div><div dir="ltr">Hi users,<div><br></div><div>I&#39;m using the wrf_cape_2d function to calculate CAPE. I wrote a script and when I run it I receive the mesage below.</div><div><br></div><div><div><b>capecalc3d: Outside of lookup table bounds. prs,thte=   1016.5871875000000                            NaN</b></div></div><div><br></div><div>I compared my units and variables with the link below and everything it&#39;s okay.</div><div><br></div><div><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_cape_2d.shtml#Description" target="_blank">http://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_cape_2d.shtml#Description</a><br></div><div><br></div><div>Can anyone give me any tip?</div><div><br></div><div>My script is in attachment.</div><div><br></div><div>Thanks,</div><div><br></div><div>Guiherme.</div></div><div dir="ltr">-- <br></div><div dir="ltr"><div><font size="2"><div>------------------------------------------------------------------------------------------</div><div>Dr. Guilherme Martins</div><div>Instituto Nacional de Pesquisas Espaciais (INPE)<br></div></font></div><div><font size="2">Centro de Ciência do Sistema Terrestre (CCST) - Prédio CES<br></font>Grupo de Superfície-Biosfera-Atmosfera (GSBA)<font size="2"><br></font></div><div>Telefone (INPE/CP): +55 12 3186-9520 || Celular (TIM): +55 12 98152-8580<br>E-mail: <a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a> || <a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a><br>Skype: guilherme.martins.<br>Homepage: <a href="https://sites.google.com/site/jgmsantos" target="_blank">https://sites.google.com/site/jgmsantos</a><br>Currículo Lattes: <a href="http://lattes.cnpq.br/5997657584785803" target="_blank">http://lattes.cnpq.br/5997657584785803</a><span><br></span>------------------------------------------------------------------------------------------</div></div>
</div></blockquote></div></div></div></div></div><div style="word-wrap:break-word"><div><div><div><div><blockquote type="cite"><div><span>&lt;ex01_wrf_cape_2d.ncl&gt;</span>_______________________________________________<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" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></div></blockquote></div><br></div></div></div></div></blockquote></div></div><div dir="ltr">-- <br></div><div dir="ltr"><div><font size="2"><div>------------------------------------------------------------------------------------------</div><div>Dr. Guilherme Martins</div><div>Instituto Nacional de Pesquisas Espaciais (INPE)<br></div></font></div><div><font size="2">Centro de Ciência do Sistema Terrestre (CCST) - Prédio CES<br></font>Grupo de Superfície-Biosfera-Atmosfera (GSBA)<font size="2"><br></font></div><div>Telefone (INPE/CP): +55 12 3186-9520 || Celular (TIM): +55 12 98152-8580<br>E-mail: <a href="mailto:guilherme.martins@inpe.br">guilherme.martins@inpe.br</a> || <a href="mailto:jgmsantos@gmail.com">jgmsantos@gmail.com</a><br>Skype: guilherme.martins.<br>Homepage: <a href="https://sites.google.com/site/jgmsantos">https://sites.google.com/site/jgmsantos</a><br>Currículo Lattes: <a href="http://lattes.cnpq.br/5997657584785803">http://lattes.cnpq.br/5997657584785803</a><span><br></span>------------------------------------------------------------------------------------------</div></div>