You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
grdmask with region '-Rg' not recognising longitudes more than 180 #8340
We are having a problem where grdmask is not recognising topologies that have a longitude between 180-360 when the region is set to '-Rg'. However it seems to work fine with region set it '-Rd'.
To demonstrate I have attached a folder with a script and a sample topology file: grdmask_issue.zip
The topology file contained in the above file (test_topology.xy) defines three polygons- two that have longitudes <180 and one >180. For completeness, here is the contents of test_topology.xy:
> An example of a polygon that works fine with grdmask
0 0
0 -5
5 -5
5 0
0 0
> This works too
170 -20
170 -25
180 -25
180 -20
170 -20
> An example of a polygon between 181 and 360 that doesn't plot
189 -20
189 -25
194 -25
194 -20
189 -20
The below line of code will not recognise the polygon >180:
A work around would be to do the grdmask command with '-Rd' then use grdedit -S -Rg to have it back to the 0-360 longitude range, however I just thought I'd report this bug to see if anyone has any idea what's going on.
Actual outcome
Only polygons that exist within longitudes <180 will be masked by grdmask
Expected outcome
All polygons that exist from 0-360 longitude should be masked.
System information
Operating system: MacOS Monterey (on an M1 Apple Silicon Chip)
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. We appreciate that you took the time to contribute!
Activity
welcome commentedon Jan 31, 2024
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. We appreciate that you took the time to contribute!
Please make sure you read our Contributing Guide and abide by our Code of Conduct.
joa-quim commentedon Apr 25, 2026
Sorry for the long silence. PR #9001 should fix this, but let's see if doesn't break something else.
joa-quim commentedon Apr 26, 2026
Fixed by #9001