-
Notifications
You must be signed in to change notification settings - Fork 32
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
BUG: UndefinedUnitError: 'Celsius' is not defined in the unit registry #158
Comments
MetPy seemed to had a similar issue and raised it to Pint (the library handling unit): hgrecco/pint#1081 It seems "Celsius" should be written in lowercase "celsius" according to standards. There is also some effort to backport to the As a workaround you could rewrite the "units" in your dataset:
|
I think you can also dynamically update the registry with:
|
Just quick note, is it spelled Celsius (not Celcius) :) |
oopsi, fixing it. |
I'm closing this as 2 PR are in progress in xclim and cf-xarray:
|
Description
Using E-OBS to calculate SU, I have this error:
UndefinedUnitError: 'Celsius' is not defined in the unit registry
Minimal reproducible example
summer_days = icclim.index(in_files=listOfFileNames, indice_name="SU", slice_mode='JJA')
Output received
The text was updated successfully, but these errors were encountered: