<div dir="ltr"><div dir="ltr"><div>Output missing values are <b>normal</b> for the WRF CAPE and CIN functions.  Please refer to NCL documentation for the <b>specific</b> functions <b>wrf_cape_2d</b> and <b>wrf_cape_3d</b>.  The descriptions are confusing.  They are trying to say in essence, "Missing values are returned for out-of-range values".  It is also not clear what "out of range" means.  With a quick look at the fortran code, it seems that "out of range" means very low energy values by a combination of two different tests.</div><div><br></div><div>I recently used <b>wrf_cape_2d</b> with global grids from a climate model.  Spot checking gave these results which are similar to Jiali's graphical results.</div><div><br></div><div>CAPE:  64% to 71% missing <b>globally</b>.   Minimum value = <b>0.10000 J/kg</b>.</div><div><div>CIN:     77% to 80% missing<span class="gmail-Apple-converted-space"> </span><b>globally</b>.   Minimum value =<span class="gmail-Apple-converted-space"> </span><b>0.10000 J/kg</b>.</div><br class="gmail-Apple-interchange-newline"></div><div>The large difference in proportion missing between Jiali's case and mine may be explained because Jiali's region is central US, a land region with a reputation for high convective activity.  Presumably a distribution of global grid points including oceans and arctic regions averages to much less convective energy per grid point, therefore more out-of-range low values.  Also I suspect that the proportion missing has a seasonal variation, but I did not do enough checks to confirm this.</div><div><br></div><div>On a final note, there was an undocumented change in the code for the CAPE and CIN functions, somewhere between NCL versions 6.5.0 and 6.6.2.  The two versions produce significantly different numeric results!  The fortran 90 CAPE code in 6.6.2 is obviously more modern than the corresponding fortran 77 code in 6.5.0.  I recommend that only NCL version 6.6.2 or later should be used to calculate CAPE and CIN.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 9, 2021 at 8:39 PM Barry Lynn via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">My guess would be that some locations do not meet the criteria within the code for calculating CAPE -- these points are ignored.  For instance, if the iteration fails within.<div><br></div><div>Barry</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 10, 2021 at 3:11 AM Dennis Shea via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>NCL developers did not write CAPE_{2D/3D) fortran subroutines called by NCL. I have no experience with these functions.</div><div><br></div><div>I have attached the fortran code invoked by NCL. Perhaps the following subroutines will provide some insight.</div><div><br></div><div>DCAPECALC3D</div><div><div>DCAPECALC2D</div><div><br></div><div>Note that at the top of the code a disclaimer is issued:</div><div><br></div><div>"! Also, be advised that missing data values are not checked during the computation."</div><div>===</div><div>Perhaps some input variable has _FillValue</div><div><br></div><div>Good Luck</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 9, 2021 at 10:21 AM Wang, Jiali via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11pt">Dear NCL users,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">I have been using wrf_get_uservar to get cape_2d and cape_3d for my research domain, over the Great Lakes region. There are water bodies and land. I noticed there are many missing values in both cape_2d and
 3d outcomes. See some examples attached. I have also tried to use wrf_cape_2d to calculate cape_2d, and I made sure the PSFC is converted to hPa. The outcome is almost the same, with lots of missing values. Missing values are located over different places
 at different times. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">However, it seems the missing value is not expected?
<a href="https://www.ncl.ucar.edu/Support/talk_archives/2013/2422.html" target="_blank">https://www.ncl.ucar.edu/Support/talk_archives/2013/2422.html</a>
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Can you advice what is the correct way to calculate CAPE or whether I am getting reasonable results?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Thank you!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Jiali</span></p></div></div></blockquote></div></blockquote></div></blockquote></div></div>