Topography and bathymetry of Southern Africa

Topography and bathymetry of Southern Africa#

This dataset consists in a regular grid with topography and bathymetry over Southern Africa. It was generated by cropping the ETOPO1 global topography grid to the desired area. The topography and bathymetry heights are referenced to sea level (what can be considered as the geoid).

Original source: ETOPO1

Pre-processing: Source code for preparation of the original dataset for redistribution in Ensaio

import pygmt
import xarray as xr

import ensaio

Download and cache the data and return the path to it on disk

/home/runner/work/_temp/cache/ensaio/v1/southern-africa-topography.nc

Load the netCDF file with xarray (netcdf4 is required)

<xarray.DataArray 'topography' (latitude: 1182, longitude: 1371)>
array([[-5039., -5027., -5014., ..., -3846., -3867., -3873.],
       [-5036., -5021., -5007., ..., -3839., -3863., -3872.],
       [-5031., -5016., -5001., ..., -3835., -3860., -3870.],
       ...,
       [-2906., -2901., -2884., ...,   173.,   134.,   118.],
       [-2908., -2906., -2888., ...,   132.,   119.,   118.],
       [-2912., -2910., -2894., ...,   122.,   120.,   128.]],
      dtype=float32)
Coordinates:
  * longitude  (longitude) float64 10.92 10.93 10.95 10.97 ... 33.72 33.73 33.75
  * latitude   (latitude) float64 -36.0 -35.98 -35.97 ... -16.35 -16.33 -16.32
Attributes:
    Conventions:    CF-1.8
    title:          Topographic and bathymetric height for Southern Africa ob...
    crs:            WGS84
    source:         Downloaded from NOAA website (https://ngdc.noaa.gov/mgg/g...
    license:        public domain
    references:     https://doi.org/10.7289/V5C8276M
    long_name:      topographic height above mean sea level
    standard_name:  height_above_mean_sea_level
    description:    height topography/bathymetry referenced to mean sea level
    units:          m
    actual_range:   [-5685.  3376.]
    noaa_metadata:  Conventions: COARDS/CF-1.0\ntitle: ETOPO1_Ice_g_gmt4.grd\...


Make a PyGMT map of the topography and bathymetry data

fig = pygmt.Figure()
fig.grdimage(data, cmap="etopo1", projection="M15c")
fig.colorbar(frame='af+l"topography [m]"', position="JCR")
fig.basemap(frame=True)
fig.coast(shorelines="0.1p", area_thresh=1e4)
fig.show()
southern africa topography

Total running time of the script: (0 minutes 5.615 seconds)

Gallery generated by Sphinx-Gallery