From a8d1e7521611923e5c2df8e7f8899fdfa301e20d Mon Sep 17 00:00:00 2001 From: XANTRONIX Development <dev@xantronix.com> Date: Wed, 26 Feb 2025 22:47:17 -0500 Subject: [PATCH] Add docstrings for better readability --- lib/xmet/thermo.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/xmet/thermo.py b/lib/xmet/thermo.py index 052e98f..1b9fd43 100644 --- a/lib/xmet/thermo.py +++ b/lib/xmet/thermo.py @@ -21,8 +21,16 @@ def saturated_mixing_ratio(temp: float, pressure: float) -> float: return 621.97 * (es / (pressure - es)) +""" +Return the height, in meters, at which a parcel of the given temperature is +cooled to the given dewpoint. +""" def lcl(temp: float, dewpoint: float) -> float: return (temp - dewpoint) / 0.008 +""" +Return the temperature of a parcel cooled at either the dry or moist lapse +rate for a given increase in height (in meters). +""" def lapse(temp: float, rate: float, delta: float) -> float: return temp - (rate * (delta / 1000))