Repository navigation
Invert Ambaum (2020) in dewpoint, consistent with saturation_vapor_pressure - #4153
Open
LemonCondor wants to merge 4 commits into
Open
LemonCondor wants to merge 4 commits into
LemonCondor wants to merge 4 commits into
Conversation
…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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description Of Changes
dewpointstill inverted the Bolton (1980) fit whilesaturation_vapor_pressureuses Ambaum (2020) since #3726, so the two are no longer inverses:dewpoint(saturation_vapor_pressure(T)) - Tis about -0.02 K at 20 °C and -0.2 K at 50 °C, andrelative_humidity_from_dewpoint/dewpoint_from_relative_humiditydo 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 toa ln x - b x = ln(e / e_s0) - bwitha = (Cp_l - Cp_v) / Rvandb = 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), sodewpointnow inverts it in closed form, without iteration and without adding a parameter.dewpoint(saturation_vapor_pressure(T))matchesTto ~1e-13 K from -80 °C to 60 °C.dewpoint(0 hPa)gives 0 K (Bolton gave -243.5 °C).test_ccl_with_mltwo nearly tangent intersections (784.1 and 782.7 hPa) merge into one.Checklist
test_dewpoint_saturation_vapor_pressure_inverse,test_dewpoint_relative_humidity_roundtrip; both fail on main)