MetPy icon indicating copy to clipboard operation
MetPy copied to clipboard

Use virtual temperature for CAPE Calculation

Open zhixiaozhang opened this issue 2 years ago • 3 comments

The MetPy documentation indicates that Convective Available Potential Energy (CAPE) is calculated using the environmental temperature (Te) profile. However, by AMS definition (https://glossary.ametsoc.org/wiki/Convective_available_potential_energy), CAPE is calculated based on environmental VIRTUAL temperature (Tve) instead of Te. Is that feasible to make the CAPE definition in MetPy consistent with AMS using Tve? This will include the effect of moisture on air density and thus positive buoyancy contributing to CAPE.

zhixiaozhang avatar Sep 10 '21 00:09 zhixiaozhang

The virtual temperature correction has definitely been on the todo list for awhile, it just hasn't risen to the top of the list yet.

dopplershift avatar Sep 10 '21 16:09 dopplershift

Thank you for the update. That will be great to see this improvement in the future.

zhixiaozhang avatar Sep 10 '21 17:09 zhixiaozhang

@dopplershift just discovered this issue myself! I was wondering if you had a workaround in the meantime?

For example, is it possible to simply calculate the parcel's temperature profile and then convert that to virtual temperature and pass it to mpcalc.cape_cin()? Sorry if I'm being a bit dim...

Edit: I just came across a similar issue in the ACT package, and they appear to have fixed it by passing the virtual temperature to surface_based_cape_cin(). I just wanted to check if this is correct? As in, does it adjust both the environment and parcel profiles?

AndrewILWilliams avatar Dec 05 '21 20:12 AndrewILWilliams

@AndrewILWilliams I took a look at the ACT approach you mentioned, and I don't think it's correct. I need to take a closer look to be sure, but unless I'm completely misreading the code it sure looks like they are just calculating the virtual temperature of the environment and passing that to the surface_based_cape_cin() function. That part is correct, but internally, that function currently only computes the parcel's temperature profile, and uses that in the CAPE calculation, when it should be computing the parcel's temperature profile based on the actual surface temperature, dewpoint, and pressure, and then computing the virtual temperature of the resulting parcel profile. Then, the parcel virtual temp profile should be used along with the environmental virtual temp profile to correctly compute the CAPE. So the way the ACT code is doing it is only getting halfway there. They are comparing the parcel's temperature profile (although computed using the surface virtual T and uncorrected dewpoint, so the LCL will be wrong too...) and using that with the environmental virtual temperature profile to compute the CAPE, which is incorrect.

Meteodan avatar Mar 10 '23 00:03 Meteodan