How to paste seafloor age grids together?

Hello GMT community,

I would like to fill the gaps in the age grid model of Eagles et al. 2004 (eagles_pacarray.png) with that of Muller et al. 2008 (muller_pacarray.png) ages. I’m still learning GMT and have got the following command:

gmt grdpaste -Geagles_n_muller.n -V -fg

The error I receive is:
grdpaste [ERROR]: Grid intervals do not match!

How do I go about resampling the grids for even intervals and adding the models together?

Thank you for your help!


I think you are misunderstanding what grdpaste does. Imagine you have a AB.grd grid and use grdcut to split it into

grdcut AB.grd -R<1st-half-AB-domain> -GA.grd


grdcut AB.grd -R<2nd-half-AB-domain> -GB.grd

then you undo the previous ops with

grdpaste A.grd B.grd -GAB.grd

Next thing is … I don’t see any holes in fig1 that could be filled with data from fig2

Thank you for the clarification @Joaquim!

I was thinking about filling the gap in contour intervals in Figure 1 in the northeast region and the contours north of the Osbourn Trough. The purpose to eventually look at the age/depth curves for the bathymetry like in example 49 of the example gallery ( I thought with the gap in data in the northeast region that’s why I couldn’t use the strategy of ex49 with Figure 1’s age grid.

There are no holes in the grids so your intention seems to be to replace parts of a grid with data coming from another another. That’s more tricky. It will require creating a mask grid with a polygon delimiting the patch to be replaced, mask grid 1, do the opposite masking in grid 2, convert both to xyz with grd2xyz, cat the two ensembles and convert to grid again with xyz2grd.

The depth grids (plotted with grdimage) don’t have holes. However at least one age grid obviously has holes, the one on the top panel, plotted as contour lines. So I assume the topic starter wants to fill in the gap(s) in the top panel’s age grid gaps with the bottom panel age grid data.

Yes that’s correct @mkononets and @Joaquim do you think I could make a polygon of the area in Google Earth, kml2gmt that polygon and proceed to do as you suggest?
Thank you!

First a disclaimer: I don’t have too much experience doing different stuff with grids.

I would propose the following, assuming the gaps in are filled with NaNs

  1. based on the error message grdpaste [ERROR]: Grid intervals do not match! the needs to be resampled at the same grid interval as the gmt has grdsample to do it. can be used to specify the same spacial extent and grid interval (as far as I can understand). Something like:
gmt grdsample
  1. use grdmath ‘grid calculator’ to fill in the gaps in using
gmt grdmath AND =
  1. plot all three age grids (, and using grdimage next to each other to inspect the result.

It looks that one mail I sent by mobile didn’t come through.
If you are on Windows, with Mirone that operation, after loading the grid with the holes, is a pair of clicks only.

Thank you @mkononets !!

Sorry I’m on OSX @Joaquim but I will have to get Mirone on my home computer. New grid looks awesome! Thank you for your help.

Just wondering if you are using the latest 2020 Seton et al age grid (@earth_age_01m as accessible in GMT) or if that is the old 2008. Looks like it has Osborne trough at < 90 in the Muller-only plot. Much changed in that area with Seton et al I think.

@pwessel we decided to go with the 2008 grid at first because the Seton 2020 cross-cuts the bathymetry in our area. Here’s another figure that shows the contours in the array. The Eagles 2004 grid looks to be more favorable because the Osbourn Trough doesn’t appear to extend that far east in the bathymetry + gravity.

Great, just checking.