-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix LFRic time coordinate metadata #1117
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small observation. Let me know when you want a proper review on this.
THanks, did you say you were working off this branch for a more general cube time merge fix? |
Co-authored-by: James Frost <[email protected]>
I'll get this reviewed and merged first. |
There was a problem hiding this 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. The comments are minor formatting things, and I'm happy for you to merge after addressing them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some additional tests are needed.
Co-authored-by: James Frost <[email protected]>
Update 11/02: Have added tests, but some are not raising the correct errors as expected by pytest. |
I have fixed the tests, weirdly the LFRic cube ( |
I have significantly rewritten the callback to use more conditionals rather than try except blocks, as read will take various data with missing coords and we dont want to keep raising keyerrors. So its more of a defensive function that tests if coords exist before proceeding to next step. cube.attributes returns empty list if no attributes, so shouldn't throw up errors in Now ready to review now this is more defensive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looking sensible. A couple code changes suggested, mainly to the tests.
Co-authored-by: James Frost <[email protected]>
Co-authored-by: James Frost <[email protected]>
Co-authored-by: James Frost <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There are some conflicts though. Are you happy to fix them or shall I? |
Hmm, I see "This branch has no conflicts with the base branch" |
Strange. Try merging it; hopefully it is just on my end. |
Fixes LFRic coordinate metadata, by adding
forecast_period
andforecast_reference_time
, summarised in #1113Contribution checklist
Aim to have all relevant checks ticked off before merging. See the developer's guide for more detail.