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.

  • verbose (str) –

    Select verbosity level [Default is w], which modulates the messages written to stderr. Choose among 7 levels of verbosity:

    • q - Quiet, not even fatal error messages are produced

    • e - Error messages only

    • w - Warnings [Default]

    • t - Timings (report runtimes for time-intensive algorthms);

    • i - Informational messages (same as “verbose=True”)

    • c - Compatibility warnings

    • d - Debugging messages

Returns

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