[ncl-talk] CAPE calculation

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Tue Nov 9 21:37:58 MST 2021


Output missing values are *normal* for the WRF CAPE and CIN functions.
Please refer to NCL documentation for the *specific* functions *wrf_cape_2d*
and *wrf_cape_3d*.  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.

I recently used *wrf_cape_2d* with global grids from a climate model.  Spot
checking gave these results which are similar to Jiali's graphical results.

CAPE:  64% to 71% missing *globally*.   Minimum value = *0.10000 J/kg*.
CIN:     77% to 80% missing *globally*.   Minimum value = *0.10000 J/kg*.

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.

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.


On Tue, Nov 9, 2021 at 8:39 PM Barry Lynn via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> 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.
>
> Barry
>
> On Wed, Nov 10, 2021 at 3:11 AM Dennis Shea via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> NCL developers did not write CAPE_{2D/3D) fortran subroutines called by
>> NCL. I have no experience with these functions.
>>
>> I have attached the fortran code invoked by NCL. Perhaps the following
>> subroutines will provide some insight.
>>
>> DCAPECALC3D
>> DCAPECALC2D
>>
>> Note that at the top of the code a disclaimer is issued:
>>
>> "! Also, be advised that missing data values are not checked during the
>> computation."
>> ===
>> Perhaps some input variable has _FillValue
>>
>> Good Luck
>>
>>
>> On Tue, Nov 9, 2021 at 10:21 AM Wang, Jiali via ncl-talk <
>> ncl-talk at mailman.ucar.edu> wrote:
>>
>>> Dear NCL users,
>>>
>>>
>>>
>>> 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.
>>>
>>>
>>>
>>> However, it seems the missing value is not expected?
>>> https://www.ncl.ucar.edu/Support/talk_archives/2013/2422.html
>>>
>>>
>>>
>>> Can you advice what is the correct way to calculate CAPE or whether I am
>>> getting reasonable results?
>>>
>>>
>>>
>>> Thank you!
>>>
>>> Jiali
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211109/0a864254/attachment.html>


More information about the ncl-talk mailing list