Tutorial: Getting bathymetry

One of the first steps for setting up an Ecospace scenario is to get a depth base map along with cell water area. Here’s a short example of how you may access bathymetry and cell water area maps.

We here use publicly available bathymetry data sets obtained from the GEBCO website. GEBCO provides a global terrain model for ocean and land, providing elevation data, in meters, on a 15 arc-second interval grid. It is accompanied by a Type Identifier (TID) Grid that gives information on the types of source data that the GEBCO_2023 Grid is based on. The data set is updated annually.

  • Go to GEBCO’s global ocean and land terrain models’ website, then download data for area of interest. The resolution at the GEBCO website is 15 arc-seconds, so about 463 m N-S for each cell. Select a custom area, then Esri ASCII, Grid format, and add to basket. View and download the data.
  • In the downloaded folder, there will be an .asc file, that’s the one we want for Ecospace. Here’s an example of how this can be done,
  • Open R-Studio and create a new R script file, save the file
  • Load the terra package
    • library(terra)
  • Set your working directory, e.g.,
    • work.dir = dirname(rstudioapi::getActiveDocumentContext()$path)
    • setwd(work.dir)
  • Read in the map, e.g.,
    • map = -rast (filename)
      • where filename is the name of the downloaded .asc file
      • For Ecospace we want depths to be positive, hence the minus sign in front of raster
  • The map is fairly high resolution, so you’ll likely want to aggregate it. Aggregation is by default by averaging, so we need to get rid of the land values before aggregating,
    • map[map<0] = NaN
  • You can see the map using,
    • plot(map)
      • See Figure 1.

Figure 1
. High resolution raster map as extracted from the GEBCO website. The area shown is the central part of Howe Sound near Vancouver BC. For each cell, the water area is a GIS parameter that is used in the R calculations.

 

  • To aggregate the map, decide on how many times (X) you want to reduce the number of rows and how many times (Y) you want to reduce the number of cols. (or try till you have something suitable), e.g.,
    • facto = c(X,Y)
    • low_res_map = aggregate(map, facto, FUN=mean, na.rm=TRUE, na.action=NULL)
      • excluding land cells from averaging with na.rm
    • plot(low_res_map)
      • See Figure 2.

Figure 2
. Low resolution raster map as calculated using the R code in this tutorial. The map is aggregated with a 4 by 4 factor, so it has 1/16 of the resolution of Figure 1. For each aggregated cell, the water area is calculated based on water area in each cell in the high resolution that was extracted from the GEBCO website.

 

  • Calculate the proportion of cells that have water
    • prop_water_cells = aggregate(not.na(map), facto, fun=sum) / facto[1] / facto[2]
  • Get the cell area; it is in m2, so change to km2
    • cell_area = cellSize(low_res_map)/10^6
    • water_area = prop_water_cells * cell_area
  • Finally save to asc file
    • writeRaster(low_res_map, ‘my_depth_map.asc’, overwrite=TRUE)
    • writeRaster(water_area, ‘my_water_area_map.asc’, overwrite=TRUE)
  • Open the .asc file with Excel, and read the number of rows and cols from the header
  • Now open EwE, and create a new Ecospace scenario
  • Open Ecospace > Input > Maps
    • Click Edit basemap, and set the rows and cols to the same as in the .asc file
    • Double click the Depth layer
    • The values will likely all be 1, click the top-left corner and set all to 0 (=land), this is because the Ecospace import will not always overwrite water with land
    • Click Import > From ASCII grid > import your asc file > OK
  • Water area is used in calculations of results across the map, so not for displaying densities on maps, but for extraction of, e.g., catches or biomasses for functional groups
  • That should be it.

Attribution

GEBCO Compilation Group (2023) GEBCO 2023 Grid  https://www.gebco.net/

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Ecosystem Modelling with Ecosim (EwE) Copyright © 2024 by Ecopath International Initiative is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book