Skip to content

Commit 1679703

Browse files
committed
Implement analytic satvap
1 parent 9451c3f commit 1679703

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/metpy/calc/thermo.py

+14-7
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ def saturation_vapor_pressure(temperature):
15451545
>>> from metpy.calc import saturation_vapor_pressure
15461546
>>> from metpy.units import units
15471547
>>> saturation_vapor_pressure(25 * units.degC).to('hPa')
1548-
<Quantity(31.6742944, 'hectopascal')>
1548+
<Quantity(31.623456, 'hectopascal')>
15491549
15501550
See Also
15511551
--------
@@ -1556,14 +1556,21 @@ def saturation_vapor_pressure(temperature):
15561556
Instead of temperature, dewpoint may be used in order to calculate
15571557
the actual (ambient) water vapor (partial) pressure.
15581558
1559-
The formula used is that from [Bolton1980]_ for T in degrees Celsius:
1560-
1561-
.. math:: 6.112 e^\frac{17.67T}{T + 243.5}
1559+
Implemented solution from [Ambaum2020]_, Eq. 13,
1560+
.. math:: e = e_{s0} \frac{T_0}{T}^{(c_{pl} - c_{pv}) / R_v} \exp{
1561+
\frac{L_0}{R_v T_0} - \frac{L}{R_v T}}
15621562
15631563
"""
1564-
# Converted from original in terms of C to use kelvin.
1565-
return mpconsts.nounit.sat_pressure_0c * np.exp(
1566-
17.67 * (temperature - 273.15) / (temperature - 29.65)
1564+
latent_heat = water_latent_heat_vaporization._nounit(temperature)
1565+
temp_ratio = mpconsts.nounit.T0 / temperature
1566+
heat_power = (mpconsts.nounit.Cp_l - mpconsts.nounit.Cp_v) / mpconsts.nounit.Rv
1567+
exp_term = ((mpconsts.nounit.Lv / mpconsts.nounit.T0 - latent_heat / temperature)
1568+
/ mpconsts.nounit.Rv)
1569+
1570+
return (
1571+
mpconsts.nounit.sat_pressure_0c
1572+
* temp_ratio ** heat_power
1573+
* np.exp(exp_term)
15671574
)
15681575

15691576

0 commit comments

Comments
 (0)