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

Adjust user-provided parcel temperature profile for NaN values in EL and LFC #3056

Merged
merged 2 commits into from
Jun 8, 2023

Conversation

23ccozad
Copy link
Contributor

EL and LFC are functions that take a pressure profile, temperature profile, dewpoint profile, and an optional parcel temperature profile. When a missing value (np.NaN) is found in any of the profiles, the data point is removed, along with the data point at that level in all the other profiles as well.

A bug described in #2921 shows that a missing value in any of the ambient profiles did not lead to the removal of a data point in the optional parcel temperature profile (when the user chose to provide that optional profile).

This PR introduces some rearrangements to the EL and LFC calculations to resolve that issue. Four new tests for NaN values in these calculations are also added.

Checklist

@23ccozad 23ccozad marked this pull request as ready for review May 29, 2023 02:59
@23ccozad 23ccozad requested a review from a team as a code owner May 29, 2023 02:59
@23ccozad 23ccozad requested review from dcamron and removed request for a team May 29, 2023 02:59
Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

@dopplershift dopplershift added this to the July 2023 milestone Jun 8, 2023
@dopplershift dopplershift added Type: Bug Something is not working like it should Area: Calc Pertains to calculations labels Jun 8, 2023
@dopplershift dopplershift merged commit 5b3a062 into Unidata:main Jun 8, 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 Type: Bug Something is not working like it should
Projects
None yet
Development

Successfully merging this pull request may close these issues.

el and lfc don't adjust profile for nans
2 participants