Subset gridpoint masking and distance and geographic methods for all grid types#493
Subset gridpoint masking and distance and geographic methods for all grid types#493tlogan2000 wants to merge 20 commits into
Conversation
|
Welcome, new contributor! It appears that this is your first Pull Request. To give credit where it's due, we ask that you add your information to the
Please make sure you've read our contributing guide. We look forward to reviewing your Pull Request shortly ✨ |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
@aulemahal does this potentially solve #452 as well? Haven't looked at what was done but |
|
|
||
| else: | ||
| raise ( | ||
| Exception( |
There was a problem hiding this comment.
| Exception( | |
| ValueError( |
Not your core, but WTH is this bare Exception raising ??
There was a problem hiding this comment.
The bare exceptions are bugs to be squashed.
There was a problem hiding this comment.
Not sure I fully understand your answer. Is my solution wanted or would you recommend something else ?
There was a problem hiding this comment.
Is this resolved?
Co-authored-by: Pascal Bourgault <bourgault.pascal@ouranos.ca>
Co-authored-by: Pascal Bourgault <bourgault.pascal@ouranos.ca>
|
@tlogan2000 I fixed it! The test simply needed to be removed, now it doesn't fail anymore. |
|
Ok, I was being funny. But I believe this test was superfluous. It originates from this section of Thus, the warning is not directed to us, and it's addressed anyway in the upstream code. Also, it's a FYI @Zeitsperre EDIT: For the record, we're also not required to support numpy < 2 as per the SPEC0 calendar, so in a modern environment, the warning shouldn't be raised anyway. |
|
@aulemahal I'm planning on splitting core tools out of here and dropping |
|
I think this PR can go without a modernization. After the drop, we could revisit everything in a more systematic way, in another PR. |
Pull Request Checklist:
What kind of change does this PR introduce?:
subset_gridpointwhere selected points must be within the mask (True)Does this PR introduce a breaking change?:
The default method is set for
distance(more accurate but could potentially be slower for large grids). As such the default behaviour is different for regular lat, lon grids potentially causing small differences in selected locations (most likely close to poles if at all present)Other information: