netsse.model.bathymetry#
Retrieve and process bathymetry information.
Copyright (C) 2023-2026 Technical University of Denmark, R.E.G. Mounet
This code is part of the NetSSE software.
NetSSE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
NetSSE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
To credit the author, users are encouraged to use below reference:
Mounet, R. E. G., & Nielsen, U. D. NetSSE: An open-source Python package
for network-based sea state estimation from ships, buoys, and other
observation platforms (version 2.2). Technical University of Denmark,
GitLab. February 2026. https://doi.org/10.11583/DTU.26379811.
Last updated on 20-02-2026 by R.E.G. Mounet
Functions#
|
Retrieve, read, and process a zip file from Natural Earth containing bathymetry shapefiles. |
Module Contents#
- netsse.model.bathymetry.load_bathymetry(lonmin, lonmax, latmin, latmax, zip_file_url=None)[source]#
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_bathymetryPlot the bathymetry map.
References
North American Cartographic Information Society. âAWS Marketplace: Natural Earthâ. Amazon Sustainability Data Initiative, https://registry.opendata.aws/naturalearth (accessed on 25-03-2025).
Natural Earth (2009-2025). Free vector and raster map data. https://www.naturalearthdata.com/ (accessed on 25-03-2025).
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)