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

Added function to calculate richardson number. #1346

Merged
merged 1 commit into from
May 4, 2020

Conversation

joernu76
Copy link
Contributor

@joernu76 joernu76 commented Apr 1, 2020

See #647 and #628

Description Of Changes

Checklist

  • Closes #xxxx
  • Tests added
  • Fully documented

@kgoebber
Copy link
Collaborator

kgoebber commented Apr 7, 2020

Hi @joernu76 thank you for the contribution!

Most everything looks good and the failing tests are not related to your PR.

Your PR calculates the gradient Richardson number and is not exactly the same as the Bulk Richardson number (which is what is addressed in #628 and #647). In order to keep these two different methods of calculating a Richardson value, how about naming the function in your PR gradient_richardson_number? This would reduce any ambiguity related to what is actually being calculated with the function and leaves open the opportunity to add the other at a future point.

Other thoughts @jthielen?

Copy link
Collaborator

@jthielen jthielen 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 overall! I agree with @kgoebber's comment regarding this being gradient (or flux as Holton puts it) Richardson number.

Just a few suggestions to incorporate @kgoebber's renaming suggestion, and a few clean-ups to make the code style (e.g., argument names and order, documentation conventions) more consistent.

docs/references.rst Outdated Show resolved Hide resolved
src/metpy/calc/thermo.py Outdated Show resolved Hide resolved
src/metpy/calc/thermo.py Outdated Show resolved Hide resolved
src/metpy/calc/thermo.py Outdated Show resolved Hide resolved
src/metpy/calc/thermo.py Outdated Show resolved Hide resolved
src/metpy/calc/thermo.py Outdated Show resolved Hide resolved
src/metpy/calc/thermo.py Outdated Show resolved Hide resolved
tests/calc/test_thermo.py Outdated Show resolved Hide resolved
tests/calc/test_thermo.py Outdated Show resolved Hide resolved
@joernu76 joernu76 force-pushed the richardson branch 2 times, most recently from 8dc0195 to fffa7ff Compare April 7, 2020 06:49
@joernu76
Copy link
Contributor Author

joernu76 commented Apr 7, 2020

I agree with all the comments. Thanks for the helpful suggestions. I added all the commits using the github buttons (nice, I am using mostly open source gitlab). I typically would rebase the commits to the HEAD manually, but I assume this can be done from the GUI by the merger, if requested.

@dopplershift dopplershift added Area: Calc Pertains to calculations Type: Feature New functionality labels Apr 16, 2020
src/metpy/calc/thermo.py Outdated Show resolved Hide resolved
tests/calc/test_thermo.py Outdated Show resolved Hide resolved
@dopplershift
Copy link
Member

(Well for some reason it didn't ask me to leave an overall review comment). Apologies on the delay in feedback. This looks really good. Just a couple minor issues to resolve. Feel free to rebase the commits together if you like, or we can just squash them together when we merge.

@dopplershift
Copy link
Member

One other thing, can you add the name of the function to docs/_templates/overrides/metpy.calc.rst. This way gradient_richardson_number will appear in one of the tables here--probably should be under "Turbulence".

@joernu76
Copy link
Contributor Author

joernu76 commented May 4, 2020

Will provide something today!

Apply suggestions from code review
Fixed flake8 errors of pipeline and accomodated further suggestions.
Rebased to fix merge conflicts

Co-Authored-By: Jon Thielen <github@jont.cc>

See Unidata#647 and Unidata#628
@joernu76
Copy link
Contributor Author

joernu76 commented May 4, 2020

Some CI stages fail, but I doubt that this is caused by my changes.

Copy link
Collaborator

@jthielen jthielen left a comment

Choose a reason for hiding this comment

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

The changes look good to me!

@dopplershift Are the Travis and codecov failures due to the recent Cartopy v0.18.0 release?

@dopplershift
Copy link
Member

@jthielen sigh Looks like it. :rage4: I'll merge over CI failures.

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 great! Thanks for the contribution @joernu76 !

@dopplershift dopplershift added this to the 1.0 milestone May 4, 2020
@dopplershift dopplershift merged commit 3cd8bd0 into Unidata:master May 4, 2020
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: Feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants