From fe4b980ac9dd55eab34c64aca7237489bb5007fc Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Wed, 5 Mar 2025 00:34:56 -0500 Subject: [PATCH] Fix typos in vapor pressure routines --- lib/xmet/thermo.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/xmet/thermo.py b/lib/xmet/thermo.py index 540ad00..b5b8c27 100644 --- a/lib/xmet/thermo.py +++ b/lib/xmet/thermo.py @@ -8,18 +8,14 @@ def vapor_pressure(dewpoint: float) -> float: """ Return the pressure of vapor in a parcel of a given dewpoint. """ - return 6.11 * 10 ** ( - (7.5 * dewpoint) / (237.3 * dewpoint) - ) + return 6.11 * 10 ** ((7.5 * dewpoint) / (237.3 + dewpoint)) def saturated_vapor_pressure(temp: float) -> float: """ Return the pressure at which the vapor and condensation of a parcel of a given temperature are at equilibrium. """ - return 6.11 * 10 ** ( - (7.5 * temp) / (237.3 * temp) - ) + return 6.11 * 10 ** ((7.5 * temp) / (237.3 + temp)) def mixing_ratio(dewpoint: float, pressure: float) -> float: """