Looking for assistance implementing the attached bathymetry gridding workflow

The workflow uses blockmedian, grdtrack, grdsurface and grdmath however as a new user I’m struggling a bit with implementing the documentation. For example, I’m running a test decimating an xyz file using blockmedian but the output is not 0.0001 degrees as per my command line example here gmt blockmedian nowra1.xyz -I0.0001 -R150/151/-36/-35 > nowra1_median_10mv2.xyz. It would be great if someone could provide some guidance and show me how to implement this workflow on some example files so I can learn how to implement on larger bathymetry datasets. Thank you kindly in advance.

GMT_Bathy_Grid_Dev.pdf (386.7 KB)

block* modules do not grid, they compute mean, median or modal values and positions, hence do not yield x,y that are multiples of your binning intervals. This output is meant to be used with surface or similar gridders that will estimate values at the nodes. If the output of blockm* were at the nodes then we would introduce spatial aliasing, which is not a good thing (hence a separate gridding step).

Thank you for responding. That makes sense. After running BLOCKMEDIAN, I have run the surface module but when I open the output in QGIS the spatial extent does not reflect the r coordinates I have used. The command lines I’ve used are:

gmt blockmedian -I0.0001 -R150.85/150.91/-35.06/-35.02 -V nowra1.xyz > nowra1_median_10mv4.xyz

gmt surface nowra1_median_10mv3.xyz -R150.85/150.91/-35.06/-35.02 -I0.0001 -Gnowra1_median_10mv8.tif

I’ve uploaded the output tif

nowra1_median_10mv8.tif (501.9 KB)

If you do

grdinfo nowra1_median_10mv8.tif
nowra1_median_10mv8.tif: Title: Data gridded with continuous surface splines in tension
nowra1_median_10mv8.tif: Command: gmt surface nowra1_median_10mv3.xyz -R150.85/150.91/-35.06/-35.02 -T0.25 -I0.0001 -Gnowra1_median_10mv8.tif
nowra1_median_10mv8.tif: Remark:
nowra1_median_10mv8.tif: Gridline node registration used [Cartesian grid]
nowra1_median_10mv8.tif: Grid file format: nf = GMT netCDF format (32-bit float), CF-1.7
nowra1_median_10mv8.tif: x_min: 150.85 x_max: 150.91 x_inc: 0.0001 name: x n_columns: 601
nowra1_median_10mv8.tif: y_min: -35.06 y_max: -35.02 y_inc: 0.0001 name: y n_rows: 401
nowra1_median_10mv8.tif: v_min: -115.243110657 v_max: 46.9633789062 name: z
nowra1_median_10mv8.tif: scale_factor: 1 add_offset: 0
nowra1_median_10mv8.tif: format: netCDF-4 chunk_size: 151,134 shuffle: on deflation_level: 3
nowra1_median_10mv8.tif: Default CPT:

you’ll see that coordinates exactly what you asked for. You will see also that you gave a .tif extension to a netCDF file and that is why QGis gets confused.

Thank you @Joaquim that response was a great help.