get_mesh: Get Mesh for West Coast

View source: R/get_mesh.R

get_meshR Documentation

Get Mesh for West Coast

Description

Create a mesh for the US West Coast. This method provides a work around for needing a kmeans file.

Usage

get_mesh(data.inner, data.outer, numknots)

Arguments

data.inner

A data frame of points with at least two columns, "Lon" specifying the Longitude and "Lat" specifying the Latitude. The locations will be used to define the inner boundary of the triangulation mesh and starting seeds for the knot locations.

data.outer

A data frame of points with at least two columns, "Lon" specifying the Longitude and "Lat" specifying the Latitude. The locations will be used to define the outer boundary of the triangulation mesh.

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().

Value

An inla.mesh list object created with inla.mesh.create(). The resulting list has 8 default elements from INLA and a few additional elements that are added specifically for VASTWestCoast, including the coordinates used to create the mesh. Of most interest is probably the meta data, which is stored in "meta" and includes the call to inla.mesh.create() and the fmesher.args used internally. The call to get_mesh() is also stored in "call".

Users can compare the desired number of knots n.desired to the actual number of knots n. The number of knots should always be within plus or minus five percent of desired number unless a solution is not found within 100 tries, which is the current cap on the number of times the code will run through the while loop.

Author(s)

Kelli F. Johnson


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