Skip to content

Invert Ambaum (2020) in dewpoint, consistent with saturation_vapor_pressure - #4153

Open
LemonCondor wants to merge 4 commits into
Unidata:mainfrom
LemonCondor:dewpoint-ambaum
Open

LemonCondor wants to merge 4 commits into
Unidata:mainfrom
LemonCondor:dewpoint-ambaum

Conversation

@LemonCondor

Copy link
Copy Markdown

Description Of Changes

dewpoint still inverted the Bolton (1980) fit while saturation_vapor_pressure uses Ambaum (2020) since #3726, so the two are no longer inverses: dewpoint(saturation_vapor_pressure(T)) - T is about -0.02 K at 20 °C and -0.2 K at 50 °C, and relative_humidity_from_dewpoint / dewpoint_from_relative_humidity do not round-trip (#3976).

With x = T0 / T, the liquid-water Ambaum formula used by _saturation_vapor_pressure_liquid (latent heat varying linearly with temperature) reduces to a ln x - b x = ln(e / e_s0) - b with a = (Cp_l - Cp_v) / Rv and b = Lv / (Rv T0) + a. This has an exact solution on the -1 branch of the Lambert W function (already used in this module for the Romps LCL), so dewpoint now inverts it in closed form, without iteration and without adding a parameter.

  • dewpoint(saturation_vapor_pressure(T)) matches T to ~1e-13 K from -80 °C to 60 °C.
  • dewpoint(0 hPa) gives 0 K (Bolton gave -243.5 °C).
  • Values change by at most a few tenths of a kelvin over the meteorological range; expected values in tests and docstring examples are updated accordingly. In test_ccl_with_ml two nearly tangent intersections (784.1 and 782.7 hPa) merge into one.

Checklist

…essure

dewpoint still inverted the Bolton (1980) fit while saturation_vapor_pressure
uses Ambaum (2020), so the two were no longer inverses (up to -0.2 K at 50 C).
The liquid-water Ambaum formula has an exact solution on the -1 branch of the
Lambert W function, which dewpoint now uses. Expected values that depend on
dewpoint are updated.

Closes Unidata#3976
@LemonCondor
LemonCondor requested a review from a team as a code owner October 12, 2026 18:34
@LemonCondor
LemonCondor requested review from dcamron and removed request for a team October 12, 2026 18:34
@CLAassistant

CLAassistant commented Oct 12, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

The mixing ratio lines are computed with dewpoint and move by a fraction
of a pixel. Images taken from the CI results of the previous commit.

Signed-off-by: Guillaume Marty <279286709+LemonCondor@users.noreply.github.com>
Signed-off-by: Guillaume Marty <279286709+LemonCondor@users.noreply.github.com>
Signed-off-by: Guillaume Marty <279286709+LemonCondor@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement dewpoint consistent with Ambaum (2020) formula

2 participants