Compute the tsunami travel time given a bathymetry grid and a source location.
The function takes a bathymetry grid and source coordinates, converts ocean depth to wave speed using the shallow-water approximation (\(v = \sqrt{g \cdot |z|}\)), and propagates the wavefront outward from the source using a concentric rim expansion algorithm. Optionally, voids left by the initial expansion are filled with secondary W→E and S→N sweeps. Travel times are computed using great-circle distances for geographic grids.
The result is returned as a GMTgrid with travel times in hours (NaN where the wave does not reach, e.g., on land).
Args
G: A GMTgrid with bathymetry (z positive up, in meters). Ocean cells must have negative z values. The grid should not contain NaNs.
source: [lon, lat], or (lon,lat) (or [x, y]) of the tsunami source location. Must fall inside the grid.
geo: If true (default), coordinates are geographic (degrees) and distances are computed on the sphere. Set to false for Cartesian grids.
fill_voids: Fill voids left by the initial wavefront expansion (default true). This performs additional W→E and S→N sweeps to reach areas shadowed by coastlines or islands.
Returns
A GMTgrid with the same region, spacing and layout as the input, containing travel times in hours. Land cells and unreachable ocean cells are set to NaN.
Examples
Compute tsunami travel time from a source south of Portugal: