write_SS_dat: Read SS dat

View source: R/write_SS_dat.R

write_SS_datR Documentation

Read SS dat

Description

A wrapper function to read in an SS .dat file, modify it to add a catch vector, survey CPUE, CAAL and length comp data from a survey, and age and length comp data from a fishery using the atlantisom functions to take data from atlantis.

Usage

write_SS_dat(
  model_dir,
  datfile_name,
  survey_ts,
  fishery_ts,
  survey_config,
  fishery_config,
  fleets = c(2, 1),
  survey_lencomp,
  fishery_lencomp
)

Arguments

model_dir

the directory (relative to inst extdata) your SS files are in

datfile_name

the name of your stock synthesis .dat file

survey_ts

a data frame with columns atoutput and time where atoutput is survey CPUE in biomass (tons)

fishery_ts

a data frame with columns atoutput and time where atoutput is fished catch in biomass (tons)

survey_config

the name of your survey config fils

fishery_config

the name of your fishery config file

fleets

a vector corresponding to the index of your fishing fleet followed by the index of your survey fleet

survey_lencomp

output from the atlantisom calc_age2length() function for the survey

fishery_lencomp

output from the atlantisom calc_age2length() function for the fishery

Value

stocksynthesis.data the dat file list object


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