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

Refactor moist_lapse #2263

Merged
merged 1 commit into from
Jan 18, 2022
Merged

Refactor moist_lapse #2263

merged 1 commit into from
Jan 18, 2022

Conversation

dopplershift
Copy link
Member

@dopplershift dopplershift commented Dec 17, 2021

Description Of Changes

This ports to use the better-supported solve_ivp interface from scipy. This allows us to simplify the logic around using a reference temperature as a starting point, and gets away from warnings/errors when desired values are too close to this starting point. This required tweaking a couple of tests (image tests are hyper sensitive and there was one test that didn't set required digits like the rest.)

Checklist

This ports to use the better-supported solve_ivp interface from scipy.
This allows us to simplify the logic around using a reference
temperature as a starting point, and gets away from warnings/errors when
desired values are too close to this starting point.
@dopplershift dopplershift added Type: Enhancement Enhancement to existing functionality Area: Calc Pertains to calculations labels Dec 17, 2021
@dopplershift dopplershift added this to the 1.2.0 milestone Dec 17, 2021
@dopplershift dopplershift requested a review from a team as a code owner December 17, 2021 22:44
@dopplershift dopplershift requested review from dcamron and removed request for a team December 17, 2021 22:44
Copy link
Member

@dcamron dcamron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I think I've chewed through this on my own well-enough, and I like where this gets us. @jthielen feel free to pick up #2064 with this going in!

@dcamron dcamron merged commit eca8905 into Unidata:main Jan 18, 2022
@dopplershift dopplershift deleted the moist-lapse branch January 18, 2022 20:26
dopplershift added a commit that referenced this pull request Jul 21, 2023
This test was added in #2263, but not sure if the functionality worked
before then. Regardless, scipy now disallows passing nan for initial
values to solve_ivp, so instead of trying to hack around it, just let
the scipy error persist and don't trigger it in our code.
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