Skip to content

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
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