From eed1cdf560eb58183ed7a01b9c462942991114b6 Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Tue, 18 Mar 2025 10:22:21 -0400 Subject: [PATCH] Reformat mixing_ratio_temp() --- lib/xmet/thermo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/xmet/thermo.py b/lib/xmet/thermo.py index c0fe75a..02e800f 100644 --- a/lib/xmet/thermo.py +++ b/lib/xmet/thermo.py @@ -64,8 +64,9 @@ def mixing_ratio_temp(ratio: float, pressure: float) -> float: w = ratio * 1000.0 x = math.log10(w * pressure / (622.0 + w)) - return celsius(math.pow(10.0, ((c1 * x) + c2)) - c3 + \ - (c4 * math.pow((math.pow(10, (c5 * x)) - c6), 2))) + temp = (10.0 ** ((c1 * x) + c2)) - c3 + (c4 * ((10 ** (c5 * x)) - c6) ** 2) + + return celsius(temp) def lcl(temp: float, dewpoint: float) -> float: """