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

Harmonise variable names from UM Stash to LFRic variable and long_name #898

Merged
merged 12 commits into from
Nov 14, 2024

Conversation

ukmo-huw-lewis
Copy link
Contributor

@ukmo-huw-lewis ukmo-huw-lewis commented Nov 7, 2024

Adding variable name callback to make use of LFRic variable standard names across CSET

Contribution checklist

Aim to have all relevant checks ticked off before merging. See the developer's guide for more detail.

  • Documentation has been updated to reflect change.
  • New code has tests, and affected old tests have been updated.
  • All tests and CI checks pass.
  • Ensured the pull request title is descriptive.
  • Conda lock files have been updated if dependencies have changed.
  • Attributed any Generative AI, such as GitHub Copilot, used in this PR.
  • Marked the PR as ready to review.

@ukmo-huw-lewis ukmo-huw-lewis linked an issue Nov 7, 2024 that may be closed by this pull request
Copy link
Contributor

github-actions bot commented Nov 7, 2024

Coverage

@ukmo-huw-lewis ukmo-huw-lewis changed the title Templating for harmonising variable names Harmonise variable names from UM Stash to LFRic variable and long_name Nov 12, 2024
@ukmo-huw-lewis ukmo-huw-lewis marked this pull request as ready for review November 12, 2024 11:57
@ukmo-huw-lewis ukmo-huw-lewis self-assigned this Nov 12, 2024
Copy link
Contributor

@daflack daflack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, and the test makes sense. It might be worth getting @jfrost-mo to have a quick look at it from a more detailed technical perspective. Also needs rebasing to be up-to-date with main.

Copy link
Member

@jfrost-mo jfrost-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking like a good change. My main comment is to better handle the case where the STASH code isn't in the STASH_TO_LFRIC dictionary.

Once you've addressed the comments I'll re-review.

src/CSET/operators/_stash_to_lfric.py Outdated Show resolved Hide resolved
src/CSET/operators/read.py Outdated Show resolved Hide resolved
tests/operators/test_read.py Outdated Show resolved Hide resolved
@ukmo-huw-lewis
Copy link
Contributor Author

Agree with James' further technical suggestions, and have committed those to branch. Have successfully rerun tests.
Return to @daflack for review check/sign-off prior to merging.

Copy link
Contributor

@daflack daflack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Just one minor comment, and there appears to be one test failing.

src/CSET/operators/read.py Outdated Show resolved Hide resolved
Copy link
Contributor

@daflack daflack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just needs one more test to make sure the exception is raised when no stash is present works then it will be good to go.

@ukmo-huw-lewis
Copy link
Contributor Author

New test added, and checked working as intended. Ready for review

Copy link
Contributor

@daflack daflack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and makes sense to me. @jfrost-mo do you want one final check before approval?

Copy link
Member

@jfrost-mo jfrost-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. I've commented with a couple minor documentation tweak, but happy for you to merge when done.

src/CSET/operators/read.py Outdated Show resolved Hide resolved
src/CSET/operators/read.py Outdated Show resolved Hide resolved
@ukmo-huw-lewis ukmo-huw-lewis merged commit 43022c2 into main Nov 14, 2024
8 checks passed
@ukmo-huw-lewis ukmo-huw-lewis deleted the 897-harmonise-variable-naming-across-lfric-and-um branch November 14, 2024 09:41
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.

Harmonise variable naming across LFRic and UM
3 participants