You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CAPE formula:
$\text{CAPE} = -R_d \int_{LFC}^{EL} (T_{{v}{parcel}} - T{{v}_{env}}) d\text{ln}(p)$
And in the code:
# Difference between the parcel path and measured temperature profiles
y = (parcel_profile - temperature).to(units.degK)
# Estimate zero crossings
x, y = _find_append_zero_crossings(np.copy(pressure), y)
# CAPE
# Only use data between the LFC and EL for calculation
p_mask = _less_or_close(x.m, lfc_pressure) & _greater_or_close(x.m, el_pressure)
x_clipped = x[p_mask].magnitude
y_clipped = y[p_mask].magnitude
cape = (mpconsts.Rd
* units.Quantity(np.trapz(y_clipped, np.log(x_clipped)), 'K')).to(units('J/kg'))
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
None
Errors, Traceback, and Logs
No response
The text was updated successfully, but these errors were encountered:
$-\int_{LFC}^{EL} (T_p - T_{env}) d\log p = \int_{EL}^{LFC} (T_p - T_{env}) d\log p$
Does anything check whether the pressures are increasing and reverse them (and the data) if not?
What went wrong?
CAPE formula:
$\text{CAPE} = -R_d \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
None
Errors, Traceback, and Logs
No response
The text was updated successfully, but these errors were encountered: