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

Check for duplicate levels in isentropic_interpolation_as_dataset #3323

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

sgdecker
Copy link
Contributor

Description Of Changes

A duplicate-level check is added, using the same approach as in _parcel_profile_helper.

Checklist

Fixes Unidata#3309 by provided the user with a warning when interpolation to
a duplicate isentropic surface is requested.  This is likely a mistake
on the part of the user, but by issuing a warning rather than an
error, computations can proceed if the duplication was really
intended.

The code used here is an adaptation of the duplicate-level check found
in _parcel_profile_helper elsewhere in thermo.py.
@sgdecker sgdecker requested a review from a team as a code owner December 14, 2023 15:08
@sgdecker sgdecker requested review from dopplershift and removed request for a team December 14, 2023 15:08
@sgdecker
Copy link
Contributor Author

Please let me know if you'd like me to try to appease the bot.

@dopplershift
Copy link
Member

@sgdecker We discussed #3309 on our MetPy dev call this morning and arrived at the solution to issue a warning...and then saw your PR. 😆 Thanks for submitting it! Looks good. I went ahead and pushed a commit that did the refactor to appease the bot.

@dcamron This will need your review since I committed here.

Move common test data to a fixture to reduce noise in tests.
@dopplershift dopplershift added this to the December 2023 milestone Dec 14, 2023
@dopplershift dopplershift added Type: Enhancement Enhancement to existing functionality Area: Calc Pertains to calculations Area: Xarray Pertains to xarray integration labels Dec 14, 2023
@dcamron dcamron merged commit 34d14b2 into Unidata:main Dec 14, 2023
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Calc Pertains to calculations Area: Xarray Pertains to xarray integration Type: Enhancement Enhancement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

isentropic_interpolation_as_dataset returns unplottable dataset
3 participants