-
Notifications
You must be signed in to change notification settings - Fork 50
Regrid ancillary variables #3205
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
thanks @bouweandela - I am a bit puzzled as to why all the rechunking - why not perform a single rechunk of the
ancillary_resultat the end, after regridding? What are you going to do if the cube data is not chunked (one single slab)?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 initial rechunk is needed to avoid getting huge chunks out of regridding when regridding to a higher resolution. The final rechunk is to align the chunks inside the cube, this gives better performance when combining one of the ancillary variables with the main variable in some later preprocessing step (e.g. area statistics).
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.
yes, that much I understood myself - but the question is why is the first rechunk needed since I thought the ancil data is chunked like the main var data? They have different chunking? That's insane if they do - they are both produced by the same model with the same data specs
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.
side note: huge chunks will not be a problem for CMIP7 anymore since the data will pass through cmip7_repack, so we'll have to be a bit more careful then
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.
BTW I saw your comment from the other PR #3204 - don't hold the merge of this hanging on my rechunking comments, we'll have to rethink that for CMIP7 light anyway - I am just being a bit anal π
Uh oh!
There was an error while loading. Please reload this page.
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.
There is nothing in iris that enforces that.
Regridding is done on a per chunk basis: one chunk is regridded to one other chunk. Even if the input chunks are reasonably sized, the output chunks may be too large when the resolution is increased by regridding. I believe this has been addressed in iris in SciTools/iris#6730, but I do not see the corresponding changes in iris-esmf-regrid, so it's probably best to keep our own regridding code. This applies to CMIP7 just the same.
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.
that's mental! Thanks, bud - not auto scaling chunks upon regridding is bad, not having chunks harmonized between main var and ancil var, equally. OK nevermind my comments above π