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
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)
GMT version (gmt --version): 6.4.0
The text was updated successfully, but these errors were encountered:
👋 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!
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:
The below line of code will not recognise the polygon >180:
gmt grdmask -Rg test_topology.xy -I0.25 -N0/0/1 -r -Vd -GRg_flat_slab_mask.nc
While the below line will recognise all polygons:
gmt grdmask -Rd test_topology.xy -I0.25 -N0/0/1 -r -Vd -GRd_flat_slab_mask.nc
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
gmt --version
): 6.4.0The text was updated successfully, but these errors were encountered: