Skip to content

Fix platform-dependent geovector heads with +n - #9300

Merged
Esteban82 merged 3 commits into
masterfrom
fix-met-uv
Nov 17, 2026
Merged

Esteban82 merged 3 commits into
masterfrom
fix-met-uv

Conversation

@Esteban82

Copy link
Copy Markdown
Member

I looked into why grdvector/met_uv fails on Linux and Windows.

Claude found that with +n a head longer than the vector is shrunk to exactly the vector length, so the dr > h_length_limit check that follows compares two values that are equal up to round-off, and whether the head is drawn depends on each platform’s floating-point results.

There were several ways to fix it; I chose comparing against h_length_limit * (1.0 + GMT_CONV8_LIMIT) (both geovector functions in src/gmt_plot.c) because it makes what is drawn independent of the platform. The fix also affects psxy/flowvectors, where two tiny heads that were skipped are now drawn, so I updated the baselines of both tests and removed the known-failure flags from met_uv.

Tested with: CI. met_uv and flowvectors pass on Linux, macOS and Windows against the new baselines, with identical PostScript on all three (run 43902481512).

Generated with Claude Code (Claude Sonnet 5.5; review by Claude Opus 5.5)

Esteban82 and others added 3 commits November 16, 2026 12:58
…st the vector length

After +n rescaling the head length equals the limit, so the test that skips
the head was decided by floating-point noise (differing per platform).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The geovector head fix now draws two tiny heads (records 14 and 289)
that were skipped due to round-off; the output is identical on Linux,
macOS and Windows (CI run 41692804604).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Esteban82 Esteban82 added bug Something isn't working maintenance Boring but important stuff for the core devs labels Nov 17, 2026
@Esteban82
Esteban82 requested review from a team, joa-quim and seisman November 17, 2026 01:07
@Esteban82
Esteban82 merged commit 6355f3e into master Nov 17, 2026
25 of 30 checks passed
@Esteban82
Esteban82 deleted the fix-met-uv branch November 17, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants