sharppy / SHARPpy

Sounding/Hodograph Analysis and Research Program in Python
https://sharppy.github.io/SHARPpy/index.html
Other
216 stars 112 forks source link

[BUG] Incorrect CAP calculation #216

Open chird opened 3 years ago

chird commented 3 years ago

I think that the calculation of CAP isn't correct.

https://github.com/sharppy/SHARPpy/blob/19175269ab11fe06c917b5d10376862a4716e1db/sharppy/sharptab/params.py#L1933

In my opinion it must be mcap = -mli. It should be the difference between the profile's and parcel's virtual temperature. But with the current implementation, it is 2 times the profile's virtual temperature minus the parcel's virtual temperature.