make_grid: Make a depth stratified survey grid

Description Usage Arguments Value Examples

View source: R/make_grid.R

Description

This function sets up a depth stratified survey grid. A simple gradient in depth is simulated using spline with a shallow portion, shelf and deep portion. Adding covariance to the depth simulation is an option.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
make_grid(
  x_range = c(-140, 140),
  y_range = c(-140, 140),
  res = c(3.5, 3.5),
  shelf_depth = 200,
  shelf_width = 100,
  depth_range = c(0, 1000),
  n_div = 1,
  strat_breaks = seq(0, 1000, by = 40),
  strat_splits = 2,
  method = "spline"
)

Arguments

x_range

Range (min x, max x) in x dimension in km

y_range

Range (min y, max y) in y dimension in km

res

Resolution, in km, of the grid cells

shelf_depth

Approximate depth of the shelf in m

shelf_width

Approximate width of the shelf in km

depth_range

Range (min depth, max depth) in depth in m

n_div

Number of divisions to include

strat_breaks

Define strata given these depth breaks

strat_splits

Number of times to horizontally split strat (i.e. easy way to increase the number of strata)

method

Use a "spline" or "loess" to generate a smooth gradient or simply use "linear" interpolation?

Value

Returns RasterBrick of the same structure as survey_grid

Examples

1
2
3
4
5
r <- make_grid(res = c(10, 10))
raster::plot(r)

p <- raster::rasterToPolygons(r$strat, dissolve = TRUE)
sp::plot(p)

SimSurvey documentation built on Jan. 16, 2021, 5:31 p.m.