Implement lapse() in thermo.py
This commit is contained in:
parent
863360e5e8
commit
c61846ea1c
1 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,6 @@
|
|||
LAPSE_RATE_MOIST = 4.0 # degrees C per km
|
||||
LAPSE_RATE_DRY = 9.8
|
||||
|
||||
def vapor_pressure(dewpoint: float) -> float:
|
||||
return 6.11 * 10 * (
|
||||
(7.5 * dewpoint) / (237.3 * dewpoint)
|
||||
|
@ -20,3 +23,6 @@ def saturated_mixing_ratio(temp: float, pressure: float) -> float:
|
|||
|
||||
def lcl(temp: float, dewpoint: float) -> float:
|
||||
return (temp - dewpoint) / 0.008
|
||||
|
||||
def lapse(temp: float, rate: float, delta: float) -> float:
|
||||
return temp - (rate * (delta / 1000))
|
||||
|
|
Loading…
Add table
Reference in a new issue