Last updated on Aug 22, 2025.

netsse.model.bathymetry.load_bathymetry#

netsse.model.bathymetry.load_bathymetry(lonmin, lonmax, latmin, latmax, zip_file_url=None)#

Retrieve, read, and process a zip file from Natural Earth containing bathymetry shapefiles.

The function reads the shapefiles contained in the zip file using the cartopy.io.shapereader module. The shapefiles are sorted by depth, from the surface to the bottom. The function returns a dictionary containing the shapefiles and a list of the depths in the shapefiles.

Parameters:
  • lonmin (float) – Minimum longitude of the area of interest in degrees East.

  • lonmax (float) – Maximum longitude of the area of interest in degrees East.

  • latmin (float) – Minimum latitude of the area of interest in degrees North.

  • latmax (float) – Maximum latitude of the area of interest in degrees North.

  • zip_file_url (str, optional) – URL of the zip file containing the shapefiles. By default, the function accesses the bathymetry data from Natural Earth through the Amazon Web Services (https://registry.opendata.aws/naturalearth).

Returns:

  • depths (list) – List of the depths in the shapefiles for the specified area.

  • shp_dict (dict) – Dictionary containing the shapefiles.

See also

netsse.tools.viz.plot_bathymetry

Plot the bathymetry map.

References

  1. North American Cartographic Information Society. “AWS Marketplace: Natural Earth”. Amazon Sustainability Data Initiative, https://registry.opendata.aws/naturalearth (accessed on 25-03-2025).

  2. Natural Earth (2009-2025). Free vector and raster map data. https://www.naturalearthdata.com/ (accessed on 25-03-2025).

  3. Met Office (2010-2015). Cartopy: a cartographic Python library with a Matplotlib interface. Exeter, Devon, UK. https://scitools.org.uk/cartopy (accessed on 25-03-2025).

Example

>>> depths, shp_dict = load_bathymetry(lonmin=0, lonmax=10, latmin=50, latmax=60)