Question for cape_2d and cape_3d

552 views
Skip to first unread message

Yuqi Zhang

unread,
Nov 29, 2020, 5:41:35 PM11/29/20
to wrfpython-talk
Hi everyone,

I'm a Ph.D student in University of Kansas. I recently found this wrf-python package very useful to process WRF data, especially for some variables need to be derived from wrf, such as CAPE, CIN and LCL. After reading the instruction of wrf-python website, I still have some questions for function cape_2d and cape_3d.

1. Does cape_3d provide the CAPE and CIN with the parcel properties from each level? That is to say, if I want to get the CAPE and CIN for the surface parcel, I need to pick the results from the lowest level?

2. I found some grids in WRF produce missing value in CAPE and CIN from cape_3d on surface while there're still some positive value on the low levels. When I check using another python package called MetPy to get the surface CAPE and CIN, it seems these surface values are neither 0 or negative. I'm wondering why this happens and does it mean the cape_3d function will overwrite all negative or 0 values as missing value? I guess this may relate to the meaningful existence of cape_2d which only use max theta-e level parcel. However, I'm a hydrology student and don't know too much about the atmosphere aspect. Can someone help to explain the meaning of using 'max' parcel instead of surface?
 
3. What is the parcel properties for LCL and LFC? The cape_2d instruction says it use the parcel properties from the max theta-e level to derive the CAPE and CIN. Would it also use the same 'max' parcel to derive the LCL and LFC? If it's so, is there any functions that can help to get LCL for the surface parcel?

I'm still a new user for this package. I would be very appreciate if someone can help to explain. 

Yuqi

Alison Cobb

unread,
Jan 11, 2021, 1:19:58 PM1/11/21
to wrfpython-talk
Hi,
I do not have an answer to this query but also find it odd that I get nan values from cape_2d. If there is no CAPE here, are these nans equivalent to a zero value?
Thanks,
Alison

Michaela Sizemore

unread,
Jan 11, 2021, 7:26:04 PM1/11/21
to wrfpython-talk, acc...@ucsd.edu
Hi,
To answer Yuqi's questions:
1) I believe the answer is yes, cape_3d provides CAPE and CIN from each level. However, it appears that these metrics are calculated as a whole from the wrfin dataset. That is to say that CAPE and CIN will be automatically calculated from the bottom most level of the parcel to the top and the data will be given in one whole variable rather than defined by say a user input for levels. 

2) I may be missing some understanding for this question, but will assist with what I can and if I miss something, definitely let me know! 
Overall, the cape function will "overwrite" the 0 and negative numbers with a "mask". This is because, from my understanding, CAPE and CIN should not have values below 0 as CAPE (Convective Available Potential Energy) is the positive version of CIN (Convective Inhibition) which both deal with how buoyant/convective a parcel is: higher CAPE = more convective/buoyant, higher CIN = less convective/buoyant. When looking at the mathematical calculation of each, you will see they are integrals as each represents the total "area" above or under the curve of the parcel on a skew-t diagram which is why negative values are then masked as 'nan' so they do not get used in any further calculations or projections used later on with this data. I do not have a full answer for your question regarding the use of 'max' parcel, but my best guess is that using cape_2d is a more condensed version of cape_3d, so the max parcel is used in place of maybe more refined data that is used in cape_3d and not cape_2d.

3) Again, not very sure the differences with using max parcel past potentially being a rougher estimate of the cape and cin values. Overall, I would say that there isn't a direct way to get the surface parcel only. But I will say, I'm not sure it would make much sense to only calculate lcl for just the surface level parcel as lcl is generally a metric that is computed for/with the whole profile of the parcels path. I will, however, highlight a difference between MetPy and wrf-python when calculating these metrics (cape_2d into lcl and lfc), the results you will get from the wrf-python version will be a very large list of numbers where as MetPy will be a single value. This is because wrf-python calculates the lcl and lfc for every point in the domain while MetPy will calculate for one parcel in one position. This is what makes wrf-python so convenient for mapping data while MetPy is very convenient for skew-t diagrams (and other functions respectively). To circle back to the start of this answer, If you wanted to calculate for one specific height at one specific point using wrf-python, you would need to do some data trimming in Python to make the data set contain the data for the specific area and time, then run cape_2d or _3d, then plot the data output from those functions.

Hopefully this was helpful, but I will be around if you need further help with this!
Michaela 

Alison Cobb

unread,
Jan 11, 2021, 7:39:42 PM1/11/21
to wrfpython-talk
Thanks a lot for your reply. Yes that makes sense that values below zero are masked. Thanks for clarifying.
Alison

On Sunday, November 29, 2020 at 2:41:35 PM UTC-8, Yuqi Zhang wrote:
Reply all
Reply to author
Forward
0 new messages