Use saturated mixing ratio in moist lapse rate
This commit is contained in:
parent
6bb92a45b8
commit
5a22a5fd37
1 changed files with 2 additions and 2 deletions
|
@ -59,11 +59,11 @@ def lapse(temp: float, delta: float, rate=LAPSE_RATE_DRY) -> float:
|
|||
def moist_lapse_rate(temp: float, dewpoint: float, pressure: float) -> float:
|
||||
g = 9.8076
|
||||
Hv = 2501000
|
||||
r = mixing_ratio(dewpoint, pressure)
|
||||
Rsd = 287
|
||||
Rsw = 461.5
|
||||
Cpd = 1003.5
|
||||
r = saturated_mixing_ratio(dewpoint, pressure)
|
||||
T = kelvin(temp)
|
||||
|
||||
return g * (1 + (Hv * r) / (Rsd * T)) \
|
||||
/ (Cpd + ((Hv**2 * r) / (Rsw * T**2)))
|
||||
/ (Cpd + (((Hv**2) * r) / (Rsw * (T**2))))
|
||||
|
|
Loading…
Add table
Reference in a new issue