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

Add "Celsius" to pint registry #1067

Closed
1 task done
bzah opened this issue May 2, 2022 · 3 comments · Fixed by #1068
Closed
1 task done

Add "Celsius" to pint registry #1067

bzah opened this issue May 2, 2022 · 3 comments · Fixed by #1068

Comments

@bzah
Copy link
Contributor

bzah commented May 2, 2022

Generic Issue

  • xclim version: 0.36

Description

The E-OBS datasets sometimes uses "Celsius" unit. It is not the standard way of writing this unit and therefore is not accepted by xclim due to the capitalized 'C'.

As it is seems to be a commonly used datasets, I would like to add "Celsius" in the pint unit registry.

Proposed changed

In units.py, update the corresponding alias to units.define("@alias degC = C = deg_C = Celsius")

Code of Conduct

  • I agree to follow this project's Code of Conduct
@aulemahal
Copy link
Collaborator

I agree with this. You might want to also open an issue/PR in cf-xarray. Our goal is to upstream the unit handling there when some issues about formatting are solved. But if they don't want to include, we can always add the alias here.

@Zeitsperre
Copy link
Collaborator

Related: #890

@huard
Copy link
Collaborator

huard commented May 2, 2022

I suggest to make a PR here for this, so we have a fix for this fairly quickly, and then follow-up with cf-xarray to future proof this.

@bzah bzah mentioned this issue May 3, 2022
7 tasks
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

Successfully merging a pull request may close this issue.

4 participants