pygmt.datasets.load_earth_relief

pygmt.datasets.load_earth_relief(resolution='01d', registration=None)[source]

Load Earth relief grids (topography and bathymetry) in various resolutions.

The grids are downloaded to a user data directory (usually ~/.gmt/) the first time you invoke this function. Afterwards, it will load the data from the cache. So you’ll need an internet connection the first time around.

These grids can also be accessed by passing in the file name '@earth_relief_XXm' or '@earth_relief_XXs' to any grid plotting/processing function.

Parameters
  • resolution (str) – The grid resolution. The suffix d, m and s stand for arc-degree, arc-minute and arc-second. It can be '01d', '30m', '20m', '15m', '10m', '06m', '05m', '04m', '03m', '02m', '01m', '30s' or '15s'.

  • registration (str) – Grid registration type. Either pixel for pixel registration or gridline for gridline registration. Default is None, which returns a pixel registered grid.

Returns

grid (xarray.DataArray) – The Earth relief grid. Coordinates are latitude and longitude in degrees. Relief is in meters.