grdlandmask creates invalid grids
So far I have found 2 cases.
1 is easy to reproduce (ocean = 0, region entirely in ocean):
grdlandmask -Df -I1k/1k -Gnoland.grd -R178/179/-44/-43 -N0/1/1/1/1/1
2 i'm not sure why this produces the same result, it's mostly on land:
grdlandmask -Df -I1k/1k -Gonland.grd -R175.48974146199942/176.90855324281694/-38.87590617470688/-37.75431698422648 -N0/1/1/1/1/1
I'm pretty sure these do not work (can't be plotted as 1 or 0 using grdimage)
However, I tested them as follows (which is dependant on h5py and hdf libraries working):
import h5py as h
f = h.File('noland.grd', 'r')
ends up with:
IOError: Unable to open file (File signature not found)
I have uploaded the results of the above commands with gmt 5.4.1
- Status changed from New to Feedback
Could you explain what you mean by "'m pretty sure these do not work (can't be plotted as 1 or 0 using grdimage)"?. Both of the grids are fine; the first has all zeros while the second has a mix of 0 and 1. Both grids plot in GMT as well as open in Panoply. Same as your grids. Perhaps the Python function cannot open NetCDF COARDS grids?