This function creates survey observations for an Ecosim scenario.

create_survey(
  file_path,
  skip_nrows,
  species,
  species_labels,
  years,
  survey_num,
  survey_time,
  selectivity = NULL,
  catchability,
  CV,
  sample_num,
  waa_path,
  lw_a = 0.01,
  lw_b = 3,
  length_bin,
  mid_length_bin,
  nbin,
  bin_width,
  length_CV
)

Arguments

file_path

A character string shows path to Ecosim biomass output file (e.g., biomass_monthly.csv) is located.

skip_nrows

integer; the number of lines of the data file to skip before reading data.

species

The species to create fishery for. A vector of column names from the catch_annual.csv.

species_labels

Customized names for species columns.

years

A vector of years for extracting EwE data.

survey_num

Number of surveys.

survey_time

Survey years and months. A list of data frame for defining survey time. Each list represent a survey. For each data frame, columns represent year and month.

selectivity

Selectivity-at-age. A list of data frame defining selectivity-at-age for a species over time. Each list represent a survey. For each data frame, columns represent age classes and rows represent years.

CV

Coefficient of variation of survey indices. A vector of CVs for individual surveys.

sample_num

Annual sample size. A vector of sample sizes for individual surveys.

waa_path

A character string shows path to Ecosim weight output file (e.g., weight_monthly.csv) is located.

lw_a

Length-weight coefficients a. W=a*L^b. Default EwE value is 0.01.

lw_b

Length-weight coefficients b. W=a*L^b. Default EwE value is 3.

length_bin

A vector of length bins.

mid_length_bin

A vector of middle point of the length bins.

nbin

Total number of bins.

bin_width

Width of bins.

length_CV

CV about length.

cathability

Catchability of survey indices. A vector of catchability values for individual surveys.

Value

A data list that includes survey indices and composition data from the EwE operating model, and observed survey indices and composition data for each survey. Each survey has time series catch with lognormal error and composition data with sampling error.

Details

The function takes biomass data from an Ecosim scenario. The biomass data are read in from Ecosim biomass_annual.csv or biomass_monthly.csv. The function reads in total biomass-at-age data of a specific species by age classes and time.