VAST_mesh: Create grid and mesh for VASTWestCoast

View source: R/VAST_mesh.R

VAST_meshR Documentation

Create grid and mesh for VASTWestCoast

Description

Create the input grid and the mesh based on the survey and format all objects as needed for VASTWestCoast.

Usage

VAST_mesh(
  data,
  survey,
  savedir = getwd(),
  numknots,
  range.depth = c(-35, -Inf),
  range.lat = c(-Inf, Inf)
)

Arguments

data

A data frame extracted from the NWFSC data warehouse using get_data. These points will be used as starting locations for the knot locations in the final mesh. Locations do not need to be positive tows, and all tow locations can be included, which is the default.

survey

A character value supplying the survey name. The value is typically an acronym. See createMatrix() for a list of defaults.

savedir

A file path to the directory where the results will be saved. The default is the current working directory. The path can be relative or absolute.

numknots

The desired number of knots to have in the resulting mesh. This will be approximate because the distance between points used for knots will be used to solve to the ideal number of knots using a while loop. Thus, expect the resulting number of knots to be within plus or minus five percent of this input value. See get_mesh() for specifics. The desired value is typically stored in the settings list; see, get_settings() and is known as "n_x" in make_settings().

range.depth

A vector of two numeric values specifying the range of depth values of interest. Values must be in meters and negative values represent those below sea level and positive values are assumed to be above sea level. The first entry is the shallow value and the second entry is the deeper cutoff. The default value is c(-35, -Inf), which truncates the data to depths deeper than 35 m with no limit on how deep they can be.

range.lat

A vector of two numeric values specifying the range of latitude values of interest. Values must be in decimal degrees. The first entry is the smaller value, i.e., southern border, and the second entry is the larger value, i.e., northern border. The default value is c(-Inf, Inf), which leads to a range of the entire coast and if the input argument is being used to truncate the data, the data is not changed. To limit the data to California use c(32.5, 42) and to limit the data to Washington and Oregon use c(42, 49). These ranges typically match up with the outer ranges of all combined strata you wish to predict to, but this does not have to be the case.

Value

A list with two elements is returned, the first is a input grid for "extrapolation_args" and the second is an anisotropic INLA triangulation mesh for "spatial_args". Each of these list elements are also plotted and the plots are saved in savedir.

Author(s)

Kelli F. Johnson

See Also

See get_inputgrid, get_mesh, plot.inputgrid, and plot.mesh.


nwfsc-assess/VAST_WestCoast documentation built on July 4, 2023, 5:45 p.m.