Merging grd files

How would I merge two or more grid files in pyGMT? Would I use the grdcut and grdpaste commands like in GMT? I can’t find this in the documentation.

PyGMT has grdcut (see, but grdpaste is not wrapped yet. If you’re using Jupyter though, you can try a using an exclamation mark to run GMT command, e.g. !gmt grdpaste -V -fg.

Depending on how you want to merge your grid files though, there may be a way to do it using xarray too. See Do you want to mosaic different tiles, concatenate along some dimension, take the mean of a stack of grids, etc? I’m assuming you’re working on the GMRT grids from Importing GMRT data as a grid in pyGMT?

Hi @weiji14, thank you for all this! I ended up not needed to make a mosaic because I got the whole file downloaded - it seems like GMRT only allows downloads up to 1GB…

I do want to overlay/stack two bathymetry datasets though, do you know how to do this?