The function calculates the Convective Available Potential Energy (CAPE) using R. It returns a vector of CAPE, convective inhibition (CIN), pressure at lifted condensation level (LCL),and level of free convection (LFC).
Arguments
- t_parcel
Parcel temperature [K].
- dwpt_parcel
Parcel dew point temperature [K].
- mr_parcel
Parcel mixing ratio [kg/kg].
- p_profile
Pressure profile from sounding or modelling [hPa].
- t_profile
Temperature profile from sounding or modelling [K].
- mr_profile
Mixing ratio profile from sounding or modelling [kg/kg].
- vtc
logical refers is virtual temperature correction due to Doswell and Rasmussen (1994).
Examples
data("radiosonde")
t_profile <- radiosonde$temp + 273.15 # K
dwpt_profile <- radiosonde$dpt + 273.15 # K
p_profile <- radiosonde$pressure # hPa
# Mixing ratio
mr_profile <- mixing_ratio_from_dewpoint(dwpt_profile, p_profile)
cape_f(t_profile[1], dwpt_profile[1], mr_profile[1],
p_profile, t_profile, mr_profile,
vtc = TRUE
)
#> CAPE CIN p_LCL p_LFC
#> 6439.63999 25.91901 915.00000 915.00000