-
Couldn't load subscription status.
- Fork 297
Merge dataless #6741
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
base: main
Are you sure you want to change the base?
Merge dataless #6741
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6741 +/- ##
==========================================
+ Coverage 90.29% 90.32% +0.02%
==========================================
Files 91 91
Lines 24656 24674 +18
Branches 4618 4623 +5
==========================================
+ Hits 22264 22286 +22
+ Misses 1620 1618 -2
+ Partials 772 770 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Status Update Fri 2023-10-10I'm currently using this branch to add some more extensive documentation, since I felt I needed a decent location to describe the properties of merging with dataless cubes. Also, I want to at least refer to #6739 Hence put this in draft for a while... |
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 Patrick 👍🏼
Just a few comments.
| # We expect that the "parts" should **all be the same** | ||
| assert data.shape == part_shape | ||
| assert data.dtype == part_dtype |
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.
The assertion on shape is only made for dataful cubes; there is no check that the dataless cube shape is consistent. Should that be happening here too?
Can cubes of different shape end up in this function?
| else: | ||
| # We expect that the "parts" should **all be the same** | ||
| assert data.shape == part_shape | ||
| assert data.dtype == part_dtype |
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.
Raise exception instead?
Ruff S101: Favour exceptions over asserts
|
|
||
| Most notably, dataless cubes can be used as the target "grid cube" for most regridding | ||
| schemes, since in that case the cube's coordinates are all that the method uses. | ||
| See also :meth:`iris.util.make_gridcube`. |
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.
The implication seems to be that make_gridcube should be able to return dataless cubes, this doesn't look like part of this PR, is there a plan to implement this? If not, it might be worth clarifying what is relevant here about make_gridcube.
Closes #6740
TBH this might have targetted "save_dataless" #6739 instead.
But now it can just wait till after that one