pygmt.datasets.load_earth_relief¶
-
pygmt.datasets.
load_earth_relief
(resolution='01d', pixel_reg=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
ands
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'
.pixel_reg (bool) – Grid registration type. Either
True
for pixel registration orFalse
for gridline registration. Default isNone
, which returns a pixel registered grid for GMT 6.1 or newer. Only a gridline registered grid is possible for GMT 6.0.
- Returns
grid (xarray.DataArray) – The Earth relief grid. Coordinates are latitude and longitude in degrees. Relief is in meters.