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

Robust Units Handeling #59

Open
jhamman opened this issue Apr 9, 2015 · 3 comments
Open

Robust Units Handeling #59

jhamman opened this issue Apr 9, 2015 · 3 comments

Comments

@jhamman
Copy link
Member

jhamman commented Apr 9, 2015

Current, RVIC is using an ad hoc input/output units scheme, checking for a few known combinations of unit strings (e.g. 'mm', 'kg m-2 s-1', etc). There are a few Python projects that have wrapped the UDUNITS library that support conversion of a range of units.

Two packages that come to mind:

One of these should be included in read_forcings.py and history.py to handle the units conversion that is currently done in a more sophisticated way.

CC: @bartnijssen, @mrstu
related: #55

@jhamman jhamman added this to the someday milestone Apr 9, 2015
@jhamman jhamman assigned jhamman and unassigned jhamman Apr 9, 2015
@jhamman
Copy link
Member Author

jhamman commented Apr 9, 2015

@mrstu, have you used either of these projects?

@ocefpaf
Copy link

ocefpaf commented Jun 10, 2015

@jhamman Scitools iris provides a python wrapper for udunits that is now available as a stand alone module called (https://github.com/SciTools/cf_units).

cf-units is similar to cfunits-python python, but better maintained, lager community, and easier to install (no hard coded path, etc). We have conda binaries for Win, OSX and, Linux. (Sorry no python 3 yet!)

Check this out for some examples.

@jhamman
Copy link
Member Author

jhamman commented Jun 10, 2015

Thanks @ocefpaf -

cf_units looks like it will be the best options moving forward. Once there is Python 3 support, I'll give it a try here.

related: SciTools/cf-units#22

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

No branches or pull requests

2 participants