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

92/Refactor pressure level modifications #94

Merged
merged 18 commits into from
Sep 24, 2024
Merged

Conversation

truth-quark
Copy link
Collaborator

Resolves #92.

This PR covers a few tasks:

  • extracts pressure level modification functionality to a standalone function
  • adds partial unit testing
  • rearranges the um2netcdf module slightly
  • partial code cleanup

Known gaps:

This work exposes a (possibly one off) case where iris funcs return a new cube. Moving the pressure level fixes into process() requires modifying the list of cubes being processed to patch the new cube in. This is noted in the code. The tests are also moderately loose, related to the complexity with testing iris components.

It's likely addressing this will have to be deferred until the code is restructured & tested, to allow workflow refactoring.

Otherwise, any comments welcome!

@truth-quark truth-quark self-assigned this Aug 30, 2024
CodeGat
CodeGat previously approved these changes Aug 30, 2024
Copy link

@CodeGat CodeGat left a comment

Choose a reason for hiding this comment

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

Looks logical to me.

umpost/um2netcdf.py Outdated Show resolved Hide resolved
test/test_um2netcdf.py Outdated Show resolved Hide resolved
blimlim
blimlim previously approved these changes Sep 18, 2024
Copy link
Collaborator

@blimlim blimlim left a comment

Choose a reason for hiding this comment

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

Changes look good to me. One small question but not really a necessary change

test/test_um2netcdf.py Outdated Show resolved Hide resolved
test/test_um2netcdf.py Outdated Show resolved Hide resolved
@truth-quark
Copy link
Collaborator Author

This one needs a final review before merging. @blimlim @marc-white would either of you mind going over the latest changes & conversation threads?

Copy link

@marc-white marc-white left a comment

Choose a reason for hiding this comment

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

I think we're good to go at this point!

@truth-quark
Copy link
Collaborator Author

I think we're good to go at this point!

Argh, GitHub seems to need someone else to resolve the conversations before it'll let me merge...

@truth-quark truth-quark merged commit 120dc47 into main Sep 24, 2024
4 checks passed
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.

Refactor: cubewrite() pressure level correction to tested function
4 participants