diff --git a/lib/xmet/thermo.py b/lib/xmet/thermo.py index e14dfb6..c4fe55f 100644 --- a/lib/xmet/thermo.py +++ b/lib/xmet/thermo.py @@ -5,7 +5,8 @@ from typing import Callable from xmet.series import Series from xmet.units import rad, deg, kelvin, celsius -LAPSE_RATE_DRY = 9.8 / 1000 # degrees C per km +LAPSE_RATE_DRY = 9.8 / 1000 # degrees C per km +LAPSE_RATE_MAGIC_FACTOR = 1.09 # adjustment for accuracy PRESSURE_MAX = 1050 # millibar PRESSURE_MSL = 1013.25 @@ -130,7 +131,8 @@ def loft_parcel(start_temp: float, except OverflowError: break - temp = lapse(temp, height - last_height, 1.09*rate) + temp = lapse(temp, height - last_height, + LAPSE_RATE_MAGIC_FACTOR*rate) yield temp, pressure