Skip to content

Issue 8235. Certain -I -R in grdlandmask create horizontal bands - #9162

Merged
joa-quim merged 5 commits into
masterfrom
issue-8235
Aug 28, 2026
Merged

Issue 8235. Certain -I -R in grdlandmask create horizontal bands#9162
joa-quim merged 5 commits into
masterfrom
issue-8235

Conversation

@joa-quim

Copy link
Copy Markdown
Member

Fix #8235

Assisted-by: Claude Opus 5.0

joa-quim and others added 2 commits August 25, 2026 19:56
The candidate column range of a shoreline polygon came with two fallbacks: a
col_min above nx1 was reset to 0, and a col_max at or below 0, or below
col_min, was reset to nx1.  With -I...+n the node counts often give
non-terminating grid spacings, so a polygon bound can round just outside the
valid range - and the fallback then turned that near miss into the full grid
width, ran the winding test over unrelated nodes and produced the mask
artifacts in the report.

Global grids keep the old wrap-around handling.  For a non-global grid the
interval is now clipped to [0,nx1] when it really overlaps the grid, and the
polygon is skipped when it does not.  Shoreline classification is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@joa-quim joa-quim added the AI-assisted All (or most) of the code was written by Artificial Intelligence. label Aug 28, 2026
@joa-quim
joa-quim requested a review from a team August 28, 2026 11:24
@Esteban82

Copy link
Copy Markdown
Member

It didn't work form me. I got the same figure.

@joa-quim

Copy link
Copy Markdown
Member Author

Hmm, I had a quite long fight with Claude and it seemed to work at the end. Will recheck but this is high tokens consuming for a minor important bug.

@joa-quim

Copy link
Copy Markdown
Member Author

Please try again. I had forgotten to commit the latest changes.

@Esteban82 Esteban82 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now it works.

@Esteban82 Esteban82 added the add-changelog Add PR to the changelog label Aug 28, 2026
@Esteban82 Esteban82 added this to the 6.8.0 milestone Aug 28, 2026
@joa-quim
joa-quim enabled auto-merge (squash) August 28, 2026 16:36
@joa-quim
joa-quim disabled auto-merge August 28, 2026 16:37
@joa-quim
joa-quim merged commit 42dfb3f into master Aug 28, 2026
9 of 10 checks passed
@joa-quim
joa-quim deleted the issue-8235 branch August 28, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-changelog Add PR to the changelog AI-assisted All (or most) of the code was written by Artificial Intelligence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Certain -I -R in grdlandmask screw up.

2 participants