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
Update to Treat RH as a Unitless Ratio in Existing Functions #677
Conversation
As discussed in PR #669, for consistency with the rest of the library, relative humidity should be treated as a unitless ratio in [0, 1]. It was noticed that some previous functions in thermo.py treated it as a percentage. This aims to correct that.
Looks like this needs some updates to some existing tests in order to pass. Are you interested in fixing those? |
Yes, I would be interested, but I am uncertain as to what needs to be done. Would you be able to let me know what tests are failing where? (All tests with py.test are passing for me locally on Python 3.6.3) |
I retriggered AppVeyor and Travis to see if it was just a transient error. If not, we'll dig in and point you in the right direction. Thanks for letting us know that the tests pass locally for you. |
So as you would <sarcasm> clearly expect </sarcasm> from this error message: Traceback (most recent call last):
File "isentropic_example.py", line 156, in <module>
cmap=plt.cm.gist_earth_r)
File "/Users/rmay/miniconda3/envs/py36/lib/python3.6/site-packages/cartopy/mpl/geoaxes.py", line 1338, in contourf
for col in result.collections
File "/Users/rmay/miniconda3/envs/py36/lib/python3.6/site-packages/matplotlib/transforms.py", line 724, in union
raise ValueError("'bboxes' cannot be empty")
ValueError: 'bboxes' cannot be empty The problem is in this line: MetPy/examples/isentropic_example.py Lines 107 to 115 in 0e8d73f
The |
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.
Just need to fix the example.
@dopplershift For future reference, would this sort of issue be something I could catch locally if I tried building the docs, and not just doing |
Yes, that would do it. If you have all of the dependencies (like cartopy), it should be as straightforward as doing:
That should work even on windows. But there's nothing wrong with not doing that and letting our CI (continuous integration) setup catch those kind of things--it's just slower than running locally. |
Awesome! Thanks for more good work. |
As discussed in PR #669, for consistency with the rest of the library, relative humidity should be treated as a unitless ratio in [0, 1]. It was noticed that some previous functions in thermo.py treated it as a percentage. This aims to correct that.