Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analytic Saturation Vapor Pressure #3726

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dcamron
Copy link
Member

@dcamron dcamron commented Dec 25, 2024

Dependent on #3725.

In a Christmas Eve sprint, I implemented the analytic saturation vapor pressure from Ambaum 2020, per recommendations from #626. Lots of updated test values, and these may change further, but I wanted to get the changes out there quickly so we could evaluate their impacts, as well as get the changes into the full test matrix.

All departures are small in relative magnitude, but some callouts for potential scrutiny:

  • test_sensitive_sounding
  • test_lfc_ml
  • test_el and its extensions
  • any test involving cape_cin (mentioned in issue above as impacted, and needs LCL changes to see full picture.)
  • test_dewpoint_specific_humidity_xarray (I reduced the precision instead of redefining the test data)

test_equivalent_potential_temperature_masked worked before. The calculations work on the individual masked array elements but for some reason it blows up on the full array. numpy.ma.exp offered no help. If anyone has any insight here it had me pulling my hair out a bit.

I'm not touching image tests until the other PR goes in and we tackle a review here, and maybe not even until LCL.

I'll include an implementation and tests for the saturation vapor pressure over ice in this PR as well.

Happy holidays! 🎅

  • Tests added
  • Fully documented

@dcamron dcamron added Type: Maintenance Updates and clean ups (but not wrong) Area: Calc Pertains to calculations Subarea: Thermo Pertains to thermodynamic calculations and their physical correctness labels Dec 25, 2024
@dcamron dcamron requested a review from a team as a code owner December 25, 2024 00:21
@dcamron dcamron requested review from dopplershift and removed request for a team December 25, 2024 00:21
src/metpy/constants/default.py Dismissed Show dismissed Hide dismissed
src/metpy/constants/default.py Dismissed Show dismissed Hide dismissed
@dcamron dcamron changed the title Analytic satvap Analytic Saturation Vapor Pressure Dec 25, 2024
@dcamron dcamron force-pushed the analytic-satvap branch 3 times, most recently from 1a9b663 to 2e3383f Compare December 26, 2024 18:04
@dcamron dcamron mentioned this pull request Dec 30, 2024
3 tasks
@dopplershift dopplershift added this to the 1.7.0 milestone Jan 2, 2025
@dopplershift
Copy link
Member

I think it makes sense to do this by itself. I don't understand why the test is failing with overflow in exp(). I can get the test suite to fail, but I can't get it to warn when running in a notebook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Calc Pertains to calculations Subarea: Thermo Pertains to thermodynamic calculations and their physical correctness Type: Maintenance Updates and clean ups (but not wrong)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants