create_fishery_subset: Create fishery subset from Atlantis output

View source: R/create_fishery_subset.R

create_fishery_subsetR Documentation

Create fishery subset from Atlantis output

Description

Create a subset of the fishery observations for an Atlantis scenario.

Usage

create_fishery_subset(dat, time, fleets, species, boxes)

Arguments

dat

A data.frame of numbers at age containing the following columns:

  • species

  • agecl

  • polygon

  • layer

  • time

  • atoutput

The data.frame is generated from either create_survey or create_fishery_subset.

time

The timing of the survey (a vector indicating specific time steps, which are typically associated with years) i.e., seq(365,10*3650,365) would be an annual survey for 10 years

fleets

which fleet indices to aggregate in the output (NULL aggregates all fleets)

species

The species to sample in the survey (a vector)

boxes

A vector of box numbers

Details

The function takes fishery catch data from an Atlantis scenario where the data was read in from Atlantis output using load_nc within run_truth. One does not need to use these functions to create dat, rather you must only ensure that the structure of dat is the same. Currently, the function subsets the data by fleet, polygon and time (there are not layers in fishery outputs). The input is fishery observations (either catch nums or catch bio outputs of run_truth), so nothing else needs to be done. Atlantis already applies a fishery efficiency and selectivity internally. This function works for specific defined species, specific defined polygons, and specific defined time.

Value

The function returns a subsetted matrix aggregated over fleets with the columns as the input data, i.e.,:

  • species

  • agecl

  • polygon

  • layer

  • time

  • atoutput

This function is for a vector of defined species Returns only boxes where fishery was sampled

Author(s)

Poseidon


r4atlantis/atlantisom documentation built on Nov. 12, 2023, 2:59 a.m.