Skip to content

Commit 9b7536f

Browse files
committed
Implement analytic satvap
1 parent 1c98db5 commit 9b7536f

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
@@ -1507,7 +1507,7 @@ def saturation_vapor_pressure(temperature):
15071507
>>> from metpy.calc import saturation_vapor_pressure
15081508
>>> from metpy.units import units
15091509
>>> saturation_vapor_pressure(25 * units.degC).to('hPa')
1510-
<Quantity(31.6742944, 'hectopascal')>
1510+
<Quantity(31.623456, 'hectopascal')>
15111511
15121512
See Also
15131513
--------
@@ -1518,14 +1518,21 @@ def saturation_vapor_pressure(temperature):
15181518
Instead of temperature, dewpoint may be used in order to calculate
15191519
the actual (ambient) water vapor (partial) pressure.
15201520
1521-
The formula used is that from [Bolton1980]_ for T in degrees Celsius:
1522-
1523-
.. math:: 6.112 e^\frac{17.67T}{T + 243.5}
1521+
Implemented solution from [Ambaum2020]_, Eq. 13,
1522+
.. math:: e = e_{s0} \frac{T_0}{T}^{(c_{pl} - c_{pv}) / R_v} \exp{
1523+
\frac{L_0}{R_v T_0} - \frac{L}{R_v T}}
15241524
15251525
"""
1526-
# Converted from original in terms of C to use kelvin.
1527-
return mpconsts.nounit.sat_pressure_0c * np.exp(
1528-
17.67 * (temperature - 273.15) / (temperature - 29.65)
1526+
latent_heat = water_latent_heat_vaporization._nounit(temperature)
1527+
temp_ratio = mpconsts.nounit.T0 / temperature
1528+
heat_power = (mpconsts.nounit.Cp_l - mpconsts.nounit.Cp_v) / mpconsts.nounit.Rv
1529+
exp_term = ((mpconsts.nounit.Lv / mpconsts.nounit.T0 - latent_heat / temperature)
1530+
/ mpconsts.nounit.Rv)
1531+
1532+
return (
1533+
mpconsts.nounit.sat_pressure_0c
1534+
* temp_ratio ** heat_power
1535+
* np.exp(exp_term)
15291536
)
15301537

15311538

0 commit comments

Comments
 (0)