Skip to content

grdmath: do not error because on an unused -I when using -R<gridfile> - #8994

Merged
joa-quim merged 1 commit into
masterfrom
fix-8987
Apr 21, 2026
Merged

joa-quim merged 1 commit into
masterfrom
fix-8987

Conversation

@joa-quim

Copy link
Copy Markdown
Member

See issue #8987

Don't know why the removed test condition was set, but removing seems harmless and let -Rgrid be used. Tests do not show any regression.

See issue #8987

Don't know why the removed test condition was set, but removing seems harmless and let -Rgrid be used. Tests do not show any regression.

@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.

It partially works.

Now I got this error instead:

grdmath [ERROR]: Cannot use -r when grid files are specified.

I used this script:

gmt grdmath -Rd -I10 X Y MUL = grid.tif=gd:GTiff
gmt grdmath -Rgrid.tif 0 = trash.nc
gmt grdmath -Rgrid.tif 1 trash.nc ADD = trash2.nc

@joa-quim

Copy link
Copy Markdown
Member Author

Yep, but that is a separate issue. It now fails on the next test (after the one I removed). But maybe this one is right.

@joa-quim

Copy link
Copy Markdown
Member Author

Just to be clear. I will not touch in the -r case.

@Esteban82
Esteban82 self-requested a review April 21, 2026 18:51

@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.

Ok, so I understand that I could approve this.

@joa-quim
joa-quim merged commit 4916de4 into master Apr 21, 2026
11 of 14 checks passed
@joa-quim
joa-quim deleted the fix-8987 branch April 21, 2026 19:23
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.

2 participants