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

Use units_metadata where appropriate. #1822

Open
2 tasks done
aulemahal opened this issue Jul 4, 2024 · 1 comment · May be fixed by #1836
Open
2 tasks done

Use units_metadata where appropriate. #1822

aulemahal opened this issue Jul 4, 2024 · 1 comment · May be fixed by #1836
Assignees
Labels
enhancement New feature or request

Comments

@aulemahal
Copy link
Collaborator

Addressing a Problem?

It can sometimes be ambiguous whether a temperature represents a difference or an absolute measure.

Potential Solution

The CF conventions have a special way to distinguish between the two : http://cfconventions.org/Data/cf-conventions/cf-conventions-1.11/cf-conventions.html#temperature-units

Additional context

This would be complementary to #1804. That PR removed the ambiguous case that resulted in errors with pint. However, the new attribute could help in making the distinction more explicit. See discussion on the PR.

Contribution

  • I would be willing/able to open a Pull Request to contribute this feature.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@aulemahal aulemahal added the enhancement New feature or request label Jul 4, 2024
@huard
Copy link
Collaborator

huard commented Jul 10, 2024

One issue is that pint2cfunits returns a string, while here we'd need to return a dict with units and unis_metadata.

One option would be to create pint2cfattrs, which would return a dict. This would not break anything.

@huard huard linked a pull request Jul 11, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants