-
Notifications
You must be signed in to change notification settings - Fork 413
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
Most unstable parcel #473
Most unstable parcel #473
Conversation
9b8411c
to
8cba6bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good--I love how simple the implementation is.
- You have conflicts against master
- Should this return height as well? Or even just the index of the most unstable parcel?
|
Ok - on second thought I don't know about the index. It's really the index of the LAYER which could be an interpolated thing. Therefore I think just returning the height will be the most straight forward. |
Could we return the index only? Then the user can decide what they want to do with that information. Or I suppose returning the index could be its own function.... |
Could also only return the height if the height was given.... |
metpy/calc/thermo.py
Outdated
theta_e = equivalent_potential_temperature(p_layer, T_layer) | ||
max_idx = np.argmax(theta_e) | ||
if heights is not None: | ||
mu_height = heights[max_idx] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually correct if the layer doesn't start at the bottom?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope.... hmm. Then it's back to the infamous get_layer
I see what you mean about the index being confusing given the layer specification--fine, no returning index. |
e7ad475
to
31ecb6b
Compare
Calculates the most unstable parcel (pressure, temperature, dew point) by maximizing theta-e.