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

coord_on_land: fix buffer for global grids #542

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

tovogt
Copy link
Collaborator

@tovogt tovogt commented Oct 5, 2022

Changes proposed in this PR:

  • In u_coord.coord_on_land, use the more stable latlon_bounds function to add a buffer around the specified coordinates to avoid problems with global grids where the buffer would increase the bounds beyond 360 degrees in width.

This PR fixes issue #539

PR Author Checklist

PR Reviewer Checklist

Copy link
Member

@chahank chahank left a comment

Choose a reason for hiding this comment

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

Great, thanks for the fix!

@emanuel-schmid Should this maybe go directly into main as it is a bug?

@emanuel-schmid emanuel-schmid merged commit 72eb8f0 into develop Oct 7, 2022
@emanuel-schmid
Copy link
Collaborator

emanuel-schmid commented Oct 7, 2022

I'll cherry pick it into main.
er - maybe not. deviation from main is vast and cherry-picking doesn't work as expected.
Merging would too likely lead to other bugs. I leave it as it is and we'll fix the bug in main with the next release.

@emanuel-schmid emanuel-schmid deleted the feature/fix_coord_on_land_buffer branch October 7, 2022 14:22
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.

Centroids.set_on_land() ValueError: longitude extent range is greater than 360: -180.5 to 180.5
3 participants