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

Make xscen.utils.change_units() update unit name on equal units #373

Merged
merged 7 commits into from
Apr 11, 2024

Conversation

vindelico
Copy link
Collaborator

@vindelico vindelico commented Mar 22, 2024

Make xscen.utils.change_units() update unit name on equal units

Pull Request Checklist:

  • This PR addresses an already opened issue (for bug fixes / features)
    • This PR fixes #xyz
  • (If applicable) Documentation has been added / updated (for bug fixes / features).
  • (If applicable) Tests have been added.
  • This PR does not seem to break the templates.
  • CHANGES.rst has been updated (with summary of main changes).
    • Link to issue (:issue:number) and pull request (:pull:number) has been added.

What kind of change does this PR introduce?

During unit conversion xscen.utils.change_units will adopt the name from the variables_and_units dictionary if the physical units are equal but their names are not (ex. degC <-> ˚C)

Useful for harmonizing unit names when processing datasets of varying origin.

Does this PR introduce a breaking change?

No.

Other information:

There is no testing for xscen.utils (yet). Right?

@vindelico vindelico merged commit ea3df9f into main Apr 11, 2024
23 checks passed
@vindelico vindelico deleted the update_unit_name_on_equal_units branch April 11, 2024 20:38
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 this pull request may close these issues.

3 participants