Add docstrings to Series derivations

This commit is contained in:
XANTRONIX 2025-03-08 14:36:46 -05:00
parent 53ea99803e
commit 36d4d17da2

View file

@ -145,6 +145,10 @@ def loft_parcel(start_temp: float,
pressure -= step
def follow_dry_adiabat(temp: float, pressure: float) -> Series:
"""
Follow a dry adiabat starting at a given temp and pressure level, returning
a Series object depicting the data points in descending pressure order.
"""
series = Series()
for level in loft_parcel(temp, pressure, lambda t, p: LAPSE_RATE_DRY):
@ -155,6 +159,11 @@ def follow_dry_adiabat(temp: float, pressure: float) -> Series:
return series
def follow_moist_adiabat(temp: float, pressure: float) -> Series:
"""
Follow a moist adiabat starting at a given temp and pressure level,
returning a Series object depicting the data points in descending pressure
order.
"""
series = Series()
for level in loft_parcel(temp, pressure, moist_lapse_rate):
@ -165,6 +174,11 @@ def follow_moist_adiabat(temp: float, pressure: float) -> Series:
return series
def follow_saturated_mixing_ratio(temp: float, pressure: float) -> Series:
"""
Follow a line of constant saturated mixing ratio calculated from a given
temp and pressure level, returning a Series object depicting the data
points in descending pressure order.
"""
series = dict()
ratio = saturated_mixing_ratio(temp, pressure)