A helper function to define strata for stock assessment from GEBCO and ETOPO bathymetry grids.

strataPolygon(
  bathy,
  depths,
  boundary,
  geostrata = NULL,
  fragment.area = NULL,
  bathy.crs = 4326,
  silent = FALSE
)

Arguments

bathy

String giving the path to the bathymetry NetCDF file.

depths

Numeric vector giving the cut points for depth strata (see cut. Data outside the cut range will be dropped. Use limits of length two exceeding the depths of the region to avoid depth categorization (c(0, 1000) for instance).

boundary

A st_polygon object, text string defining the file path to a spatial polygon or a numeric vector of length 4 giving the boundaries for the overall region. Should be given as decimal degrees. If numeric vector, the first element defines the minimum longitude, the second element the maximum longitude, the third element the minimum latitude and the fourth element the maximum latitude of the bounding box.

geostrata

A data frame defining the minimum and maximum longitude and latitude for geographically bounded strata. The data frame has to have four numeric columns and optionally one character or factor column. The character or factor column defines the names for geostrata, the default being LETTERS[1:nrow(geostrata)]. The numeric columns must be ordered as lon.min, lon.max, lat.min, lat.max. Column names do not matter. Each row in the data frame will be interpreted as separate geographically bounded strata. Use NULL to ignore geostrata.

fragment.area

Single numeric value specifying a threshold (area in km2) for disconnected polygons and holes which should be removed from the strata. Set to NULL to bypass the removal.

bathy.crs

The coordinate reference system for the bathy raster. Defaults to decimal degrees.

silent

A logical indicating whether the function should be run without returning messages from the operations.

Value

A list of length two containing sf objects of the estimated strata with information for them, including areas, and geostrata polygons.

Details

Uses GEBCO or ETOPO1 bathymetry grids to define the depth strata. Download the desired grid from the links. The bathymetry grids must be in NetCDF format and defined using decimal degrees.

References

GEBCO Compilation Group (2019) GEBCO 2019 15-arcsecond grid (doi:10.5285/836f016a-33be-6ddc-e053-6c86abc0788e). URL: https://www.gebco.net/data_and_products/gridded_bathymetry_data/gebco_2019/gebco_2019_info.html.

ETOPO1 1 Arc-Minute Global Relief Model. https://doi.org/10.7289/V5C8276M.

Author

Mikko Vihtakari