Use exponentiation in vapor pressure calculation

This commit is contained in:
XANTRONIX 2025-02-26 22:49:26 -05:00
parent a8d1e75216
commit 8969154ecf

View file

@ -2,12 +2,12 @@ LAPSE_RATE_MOIST = 4.0 # degrees C per km
LAPSE_RATE_DRY = 9.8
def vapor_pressure(dewpoint: float) -> float:
return 6.11 * 10 * (
return 6.11 * 10 ** (
(7.5 * dewpoint) / (237.3 * dewpoint)
)
def saturated_vapor_pressure(temp: float) -> float:
return 6.11 * 10 * (
return 6.11 * 10 ** (
(7.5 * temp) / (237.3 * temp)
)