Skip to content

coord_on_land: fix buffer for global grids#542

Merged
emanuel-schmid merged 1 commit intodevelopfrom
feature/fix_coord_on_land_buffer
Oct 7, 2022
Merged

coord_on_land: fix buffer for global grids#542
emanuel-schmid merged 1 commit intodevelopfrom
feature/fix_coord_on_land_buffer

Conversation

@tovogt
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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