Skip to content

Saturation vapor pressure ​

The saturation vapor pressure is the partial pressure of water vapor in equilibrium with a flat surface of liquid water (or ice) at temperature . It defines the saturation specific humidity

that is used by Large-scale condensation, Convection, the cloud diagnostics in Radiation and the Surface fluxes of humidity. Several formulations of are implemented, which differ in accuracy and in whether they include an ice phase. The formulation is a property of the atmosphere, stored in model.atmosphere.saturation.

Clausius-Clapeyron and its approximations ​

The Clausius-Clapeyron (or more precisely Clapeyron) relation is exact for any phase transition

with latent heat and the specific volumes of vapor and liquid. Three approximations lead to the formula commonly called Clausius-Clapeyron:

  1. the condensed volume is negligible,   (error ),

  2. the vapor is an ideal gas,   (error ),

  3. the latent heat is constant.

The last is by far the largest error: decreases by about 2.4 kJ/kg per Kelvin. Integrating with a constant overestimates by about 2.4% at 30˚C and 4% at 40˚C. Other formulations either integrate with linear in temperature, or are empirical fits (Magnus or Tetens type) to reference data of pure water vapor, e.g. . The presence of dry air changes by only ≈0.4%, the so-called enhancement factor, which is ignored here.

Implemented formulations ​

julia
using SpeedyWeather
subtypes(SpeedyWeather.AbstractSaturationVaporPressure)
4-element Vector{Any}:
 ClausiusClapeyronConstantL
 ClausiusClapeyronLinearL
 IFSMixedPhase
 MagnusBolton
FormulationFormulaPhasesNotes
ClausiusClapeyronConstantLliquid from the atmosphere; +2–4% at 30–40˚C
ClausiusClapeyronLinearLliquid, linear in , ≈0.1% accurate
IFSMixedPhase (default)  ,  liquid, ice, mixedas in the ECMWF IFS (),   between -23˚C and 0˚C
MagnusBolton, in ˚Cliquid, ≈0.1% accurate between -35˚C and 35˚C

For Romps (2017) the exponents are    and     with at the triple point. All coefficients are fields of the respective formulation and can be changed by keyword. In Pa for the four formulations in the order above

julia
atmosphere = EarthAtmosphere(Float64)
formulations = (ClausiusClapeyronConstantL, ClausiusClapeyronLinearL, IFSMixedPhase, MagnusBolton)
for T in (233.15, 253.15, 273.15, 293.15, 313.15)
    e = [SpeedyWeather.saturation_vapor_pressure(F(Float64), T, atmosphere) for F in formulations]
    println(round(T - 273.15), "˚C: ", join(round.(e, digits = 2), ", "))
end
-40.0˚C: 20.31, 19.01, 12.82, 18.96
-20.0˚C: 127.41, 125.53, 103.4, 125.74
0.0˚C: 610.78, 611.21, 610.77, 611.2
20.0˚C: 2364.3, 2340.34, 2335.84, 2336.95
40.0˚C: 7699.01, 7390.75, 7380.23, 7394.9

For reference, give 19.0 (12.8 over ice), 125.6 (103.2 over ice), 611.2, 2339 and 7385 Pa at these temperatures.

Here is an overview of the accuracy of each formulation against quantified as relative error. The IFS formulation considers a mixed phase between -23˚ and 0˚C which we therefore also apply to the the reference and other formulations too to compare on a single axis from -100˚ to +100˚ covering both vapor saturation over ice and liquid water.

<img width="2000" height="1040" alt="image" src="https://github.com/user-attachments/assets/dcfe9a46-0708-484f-bc52-a9e9724624da" />

User interface ​

The default is IFSMixedPhase, as it is the only formulation with an ice phase and accurate to within 0.7% (relative to Goff-Gratch over ice below -23˚C, liquid above 0˚C, blended in between) between -100˚C and 100˚C. Clausius-Clapeyron with a constant latent heat was the default in previous versions, use saturation = ClausiusClapeyronConstantL(spectral_grid) to reproduce them. Choose another formulation through the atmosphere

julia
spectral_grid = SpectralGrid(truncation = 32, nlayers = 8)
saturation = IFSMixedPhase(spectral_grid)       # or MagnusBolton, ClausiusClapeyronLinearL, ...
atmosphere = EarthAtmosphere(spectral_grid; saturation)
model = PrimitiveWetModel(spectral_grid; atmosphere)
model.atmosphere.saturation
IFSMixedPhase{Float32}(611.21f0, 273.16f0, 250.16f0, 17.502f0, 32.19f0, 22.587f0, -0.7f0)

Coefficients are changed by keyword, e.g. ClausiusClapeyronConstantL(spectral_grid, e₀ = 611.2). The functions

julia
T = 280f0       # temperature [K]
p = 85000f0     # pressure [Pa]
SpeedyWeather.saturation_vapor_pressure(T, atmosphere),         # [Pa]
SpeedyWeather.grad_saturation_vapor_pressure(T, atmosphere),    # deₛ/dT [Pa/K]
SpeedyWeather.saturation_humidity(T, p, atmosphere)             # [kg/kg]
(990.81415f0, 68.04642f0, 0.007250079f0)

evaluate the chosen formulation, which each also provides its derivative via SpeedyWeather.grad(saturation, T, atmosphere). The derivative is analytical, cheap and branch-free, so it can be used inside kernels and differentiated through.

The derivative of the saturation humidity follows from it as

available as SpeedyWeather.grad_saturation_humidity(T, p, atmosphere). The Large-scale condensation uses it for its implicit correction and for limiting reevaporation, so that both stay consistent with the chosen formulation.

Convection still assumes constant latent heat

The moist-adiabatic lapse rate in Convection still uses   implicitly, which is exact only for ClausiusClapeyronConstantL.

Define your own formulation ​

A new formulation is a subtype of SpeedyWeather.AbstractSaturationVaporPressure with a method for saturation_vapor_pressure(svp, T, atmosphere) and grad(svp, T, atmosphere)

julia
@kwdef struct ConstantSaturation{NF} <: SpeedyWeather.AbstractSaturationVaporPressure
    e₀::NF = 1000
end

SpeedyWeather.saturation_vapor_pressure(svp::ConstantSaturation, T, atmosphere) = svp.e₀
SpeedyWeather.grad(svp::ConstantSaturation, T, atmosphere) = zero(svp.e₀)

atmosphere = EarthAtmosphere(spectral_grid, saturation = ConstantSaturation{spectral_grid.NF}())
SpeedyWeather.saturation_vapor_pressure(T, atmosphere)
1000.0f0

The atmosphere argument provides constants like atmosphere.latent_heat_condensation and atmosphere.R_vapor if a formulation should be consistent with them. A struct with a single field (as here) has to be created with its number format, e.g. ConstantSaturation{Float32}(), as ConstantSaturation(spectral_grid) is ambiguous with the struct's positional constructor. Use ifelse rather than if to stay branch-free.