Skip to content

plot: warn when ASCII cells are not square (#161) - #249

Merged
filippi merged 2 commits into
forefireAPI:devfrom
antonio-leblanc:fix/ascii-cellsize
Nov 3, 2026
Merged

filippi merged 2 commits into
forefireAPI:devfrom
antonio-leblanc:fix/ascii-cellsize

Conversation

@antonio-leblanc

Copy link
Copy Markdown
Collaborator

writeASCII ignored NEY and assumed square cells. It now warns when x and y spacing differ; output unchanged. Unit test added.

Part of #161.

- writeASCII took the cellsize from the x extent alone: NEY was dropped
- an ASCII grid carries one cellsize, so a non-square grid cannot be written correctly, we warn instead of staying quiet
- test in tests/unit/test_commands.cpp: 2000 x 1000 m domain, size=20,20 -> dx 100, dy 50
- ctest 12/12, NetCDF OFF build
@HugoFara

HugoFara commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

I'll have a look tomorrow, thanks for spotting!

@HugoFara HugoFara added the bug Confirmed incorrect behavior label Nov 2, 2026
…orefireAPI#161)

- matches the other warnings in src/, so a later move of WARNING lines to stderr (forefireAPI#165) picks it up
- ctest 12/12
@filippi
filippi merged commit 3f90433 into forefireAPI:dev Nov 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Confirmed incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants