-
Notifications
You must be signed in to change notification settings - Fork 41
"Unit expression cannot have a scaling factor." #446
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
Comments
Might be a separate issue, but I also just realised that |
Hi @VeckoTheGecko, I believe the However, As for the "C" issue, indeed the unit registry of |
A PR adding this info to https://cf-xarray.readthedocs.io/en/latest/units.html would be very welcome!
I think overriding Coulomb does make sense for the Climate world. I haven't actually seen |
Thanks for the advice and quick responses @aulemahal and @dcherian ! I misunderstood the package thinking it had parity with UDUNITS. I've now solved my issue by switching to For anyone else finding this, I found the following code useful to list all units in cf_xarray: from pint import application_registry as ureg
import cf_xarray.units
for unit in ureg:
print(unit) |
I've been working with a dataset with units of "bar" and "amp hours". Looking through the CF conventions on units, it mentions that the conventions use the same units that UDUNITS supports (databases for units). Since bar and amp hours aren't noted in these databases, instead opting for
100 kPa
and3600 C
respectively, which seems to be valid in UDUNITS world .When using cf_xarray with this, I get the pint error:
My questions:
<my_units>
to SI then quantifying? Registering extra quantities? (I am very new to the world of pint, and would greatly appreciate any links to helpful resources or a quick code snippet)Issue tracker searches I've tried:
The text was updated successfully, but these errors were encountered: