change_f {ss3sim} | R Documentation |
Alter fishing mortality (F) using the SS control file
Description
Alter fishing mortality (F) for a Stock Synthesis simulation
via changes to the control file. The argument years
is the only
argument that must be a vector, where other vectors, e.g., fisheries
,
will be repeated if a single value is provided.
Usage
change_f(years, fisheries, fvals, seasons = 1, ses = 0.005,
ctl_file_in, ctl_file_out = "control_fishing.ss")
Arguments
years |
*Vector of integers that will map to each |
fisheries |
*Vector of integers that will map to each |
fvals |
*Vector of F values to be entered into the
SS control file. A single value will be repeated for every value in |
seasons |
Vector of seasons to be entered into the
SS control file. A single value will be repeated for every value in |
ses |
Vector of fishing level standard errors (ses) to be entered into the
SS control file. A single value will be repeated for every value in |
ctl_file_in |
A string providing the path to the input SS |
ctl_file_out |
A string providing the path to the output SS control file. If the value is |
Details
Using the control file depends on (1) the starter file is set up to read parameters from the control file rather than the par file and (2) the data file having a dummy catch entry for every year, fishery combination that will be specified in the control file. F values currently in the control file will be removed and the newly specified values will replace them. Users do not need to specify values for years in which there will be zero fishing because SS will be parameterized to assume no fishing in missing years.
The control file is currently read in using readLines
but will
eventually shift to using code specific to Stock Synthesis to alter
a structured list.
If used with run_ss3sim
, the case file should be named
F
. A suggested (default) case letter is F
.
Value
Modified SS control file.
Which arguments to specifiy in case files
All function argument descriptions that start with an asterisk (*) will be passed
through the case files to run_ss3sim
. If one of these arguments
is not specified in a case file, then a value of NULL
will be passed,
which may or may not be an appropriate value. Other arguments will be ignored
if specified.
Author(s)
Kelli Faye Johnson
See Also
Other change functions: change_data
,
change_em_binning
, change_e
,
change_f_par
, change_o
,
change_retro
, change_tv
Examples
d <- system.file(file.path("extdata", "models"), package = "ss3sim")
change_f(years = 1:50, fisheries = 1, fvals = 0.2,
ctl_file_in = file.path(d, "cod-om", "codOM.ctl"),
ctl_file_out = file.path(tempdir(), "control_fishing.ss"))