Allow providing lapse rate argument
This commit is contained in:
parent
929e6b4351
commit
b45a6f27c5
1 changed files with 2 additions and 2 deletions
|
@ -50,9 +50,9 @@ def pressure_height(pressure: float) -> float:
|
|||
"""
|
||||
return (1 - (pressure / 1013.25) ** 0.190284) * 145366.45 * 0.3048
|
||||
|
||||
def lapse(temp: float, delta: float) -> float:
|
||||
def lapse(temp: float, delta: float, rate=LAPSE_RATE_DRY) -> float:
|
||||
"""
|
||||
Return the temperature of a parcel cooled at the dry lapse rate for a
|
||||
given increase in height (in meters).
|
||||
"""
|
||||
return temp - (LAPSE_RATE_DRY * delta)
|
||||
return temp - (rate * delta)
|
||||
|
|
Loading…
Add table
Reference in a new issue