Skip to content

Conversation

@dopplershift
Copy link
Member

Description Of Changes

When e_s >= p, we're outside liquid phase equilibrium and saturation mixing ratio is undefined. Instead of returning negative values in this case, warn and return NaNs for these cases. Fixes a problem found in #3751.

Checklist

  • Tests added
  • Fully documented

@dopplershift dopplershift added Type: Enhancement Enhancement to existing functionality Area: Calc Pertains to calculations labels Feb 14, 2025
@dopplershift dopplershift added this to the 1.7.0 milestone Feb 14, 2025
@dopplershift dopplershift requested a review from a team as a code owner February 14, 2025 18:17
@dopplershift dopplershift requested review from dcamron and removed request for a team February 14, 2025 18:17
dcamron
dcamron previously approved these changes Feb 14, 2025
@dcamron dcamron self-requested a review February 14, 2025 18:36
@dcamron dcamron dismissed their stale review February 14, 2025 18:36

Need to address test failures.

This corresponds to being outside the region of liquid phase water
equilibrium, where e_s >= p. Detect this case, warn, and instead return
NaN.
@dcamron dcamron merged commit eb803e8 into Unidata:main Feb 14, 2025
35 checks passed
@dopplershift dopplershift deleted the sat-mix branch February 14, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Calc Pertains to calculations Type: Enhancement Enhancement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants