pygmt.grdinfo

pygmt.grdinfo(grid, **kwargs)[source]

Get information about a grid.

Can read the grid from a file or given as an xarray.DataArray grid.

Full option list at https://docs.generic-mapping-tools.org/latest/grdinfo.html

Parameters

grid (str or xarray.DataArray) – The file name of the input grid or the grid loaded as a DataArray.

Returns

info (str) – A string with information about the grid.