Open hechentao opened 1 month ago
$-\int_{LFC}^{EL} (Tp - T{env}) d\log p = \int_{EL}^{LFC} (Tp - T{env}) d\log p$ Does anything check whether the pressures are increasing and reverse them (and the data) if not?
in _find_append_zero_crossings
:
https://github.com/Unidata/MetPy/blob/d27e97cfd211acbfcf0190bb82992443859ac19a/src/metpy/calc/thermo.py#L2509-L2512
What went wrong?
CAPE formula: $\text{CAPE} = -Rd \int{LFC}^{EL} (T{{v}{parcel}} - T{{v}{env}}) d\text{ln}(p)$ And in the code:
I didn't find anything about negative signs. Did I not understand this code thoroughly myself?
Operating System
Windows
Version
1.6.2
Python Version
3.8.19
Code to Reproduce
Errors, Traceback, and Logs
No response