-
Notifications
You must be signed in to change notification settings - Fork 38
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
Refactored mask regridding for irregular grids (fixes #772) #865
Conversation
Since now mask regridding always takes place, even if there is nothing masked in source, this test is no longer needed.
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. Did you want to include a unit test that shows that the bug has been solved?
Does this pull request completely solve #772, or are there remaining issues to be tackled?
cheers @zklaus 🍺 Unfortunately I have gotten rid of my test data set and I think it's prob best if @thomascrocker tested it anyway since he'll pay more attention to the issues he's already seen - @thomascrocker could you give it one more test please mate? I agree with @bouweandela in comment - nice fix! |
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.
approval pending testing and unit test inclusion (if Klaus deems it necessary, I think it'd be good to have one but am not too fussed)
Thanks for sorting the fix out. I'm up against a Christmas deadline at the moment, but I'll make sure to test this with my data in the new year. |
Happy new year all! |
hey fellas, what's the status here: will the work needed to address the attributes be done in a separate PR? I'd advocate we merge this now and do the remainder of the work in a separate PR if it's not inter-dependent with the code changes here 🍺 |
I was just looking into regridding again with CORDEX and had a go at using this branch. There are a couple of problems.. Some (but not all) of the CORDEX data on ESGF, for example: |
Thanks @thomascrocker. You are right. We are dealing with this precise problem at the moment at our institute. I think the best approach is probably to store known-good latitude-longitude coords including bounds under a hash of the rlat, rlon coords. In principle it should be straight-forward to calculate the bounds from the 1d bounds using Unfortunately, this might have to wait until after the June release. |
Thanks, that's a good idea. The MOHC EUR-11 domain files for example do have the correct lat and lon coords, with bounds, so I may see if I can hack together a dataset fix that reads that information and applies it to all CORDEX data on that domain. |
Is the problem with the bounds somehow overlapping with #184? |
Yes you're right. Good spot, it's the same problem. Although as I've mentioned not all CORDEX data is missing bounds, data from some institutes does have it. @zklaus is correct though that despite the fact that CORDEX runs over the same domain should all be on the same grid, there are often very small rounding error style differences in the grid specification from one institute to another, so the approach of storing template grid specifications for each domain somewhere and then applying them as a fix to CORDEX data on load is a good idea to save the inevitable errors that would result from doing any multi model statistics or arithmetic. |
I did not mean this pull request, I meant: would the solution proposed in #865 (comment) replace #184? |
Well, yes, though it was basically already proposed in #184 (comment) and seems to have been picked up subsequently by @mwjury, but in a slightly unorthodox way by attaching some textfiles containing python code in comments on the ticket. Can we perhaps move forward like this: Let's finish this PR ignoring the issue of missing bounds on cordex. Let's attack that in #184. For that purpose, could you, @thomascrocker, head over there and sort out with @mwjury how to solve it? |
Makes sense to keep this PR as fixing the specific regridding issue, and keep #184 to deal with coord bounds. I will put any further work on that problem there. |
Codecov Report
@@ Coverage Diff @@
## main #865 +/- ##
=======================================
Coverage 88.24% 88.24%
=======================================
Files 194 194
Lines 9831 9838 +7
=======================================
+ Hits 8675 8682 +7
Misses 1156 1156
Continue to review full report at Codecov.
|
this is looking good @zklaus 🍺 |
Tasks
yamllint
to check that your YAML files do not contain mistakes. No yaml files added or changed.Related to #772