Skip to content

Unit handling #2

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

Closed
ccarouge opened this issue Aug 10, 2021 · 2 comments
Closed

Unit handling #2

ccarouge opened this issue Aug 10, 2021 · 2 comments

Comments

@ccarouge
Copy link
Member

The code tries to handle temperature in C and K but the handling isn't great or complete.

This line in wetbulb will break if ta is in C:
delta_t=(ta-t_dewpoint)/steps
At this point, ta is still in C but t_dewpoint is in K.

Possible solution: add a function to convert ta to K.

@aidanheerdegen
Copy link
Member

Was wondering if it might be useful to use Pint and then noticed pint-xarray is a thing, and pint in cf-xarray is a work in progress.

@greensh16
Copy link
Contributor

Now using metpy which solves this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants