Adjust units in mixing ratios to kilograms
This commit is contained in:
parent
bc9a2977a5
commit
6bb92a45b8
1 changed files with 6 additions and 6 deletions
|
@ -19,21 +19,21 @@ def saturated_vapor_pressure(temp: float) -> float:
|
||||||
|
|
||||||
def mixing_ratio(dewpoint: float, pressure: float) -> float:
|
def mixing_ratio(dewpoint: float, pressure: float) -> float:
|
||||||
"""
|
"""
|
||||||
Return the amount, in grams, of water vapor versus dry air in a parcel of
|
Return the amount, in kilograms, of water vapor versus dry air in a parcel
|
||||||
a given dewpoint and pressure.
|
of a given dewpoint and pressure.
|
||||||
"""
|
"""
|
||||||
e = vapor_pressure(dewpoint)
|
e = vapor_pressure(dewpoint)
|
||||||
|
|
||||||
return 621.97 * (e / (pressure - e))
|
return (0.62197 * e) / (pressure - e)
|
||||||
|
|
||||||
def saturated_mixing_ratio(temp: float, pressure: float) -> float:
|
def saturated_mixing_ratio(temp: float, pressure: float) -> float:
|
||||||
"""
|
"""
|
||||||
Return the maximum amount, in grams, of water vapor a parcel of a given
|
Return the maximum amount, in kilograms, of water vapor a parcel of a
|
||||||
temperature and pressure can hold.
|
given temperature and pressure can hold.
|
||||||
"""
|
"""
|
||||||
es = saturated_vapor_pressure(temp)
|
es = saturated_vapor_pressure(temp)
|
||||||
|
|
||||||
return 621.97 * (es / (pressure - es))
|
return (0.62197 * es) / (pressure - es)
|
||||||
|
|
||||||
def lcl(temp: float, dewpoint: float) -> float:
|
def lcl(temp: float, dewpoint: float) -> float:
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Reference in a new issue