change_f_par: Alter the fishing mortality (_F_) values in an SS3 '.par'...

Description Usage Arguments Value Which arguments to specifiy in case files Author(s) See Also Examples

View source: R/change_f_par.r

Description

Takes an SS3 .par file and changes the F values for specified years. If used with run_ss3sim the case file should be named F. A suggested (default) case letter is F.

Usage

1
2
change_f_par(years, years_alter, fvals, par_file_in = "ss.par",
  par_file_out = "ss.par")

Arguments

years

*Vector of years for which F values are specified, if there is more than one fleet or season the catches must be ordered by season:year:fishery (e.g., season1year1fishery1, season2year1fishery1, season1year2fishery1). The actual vector does not have to correspond to true years but must be the correct length (e.g., instead of 2000:2004 you can use 1:5). Use this argument to create an index to old values. years_alter will use values in this vector. For example, with two seasons and one fishery that operates for 4 years you could use the following: 1:8.

years_alter

*Vector of years for the which F values will be altered. If there is more than one fishery or season, use the mapping system created in years because actual year values cannot be recycled. For example, to change the second season of the second year in the example above, use: 4.

fvals

*Vector of F values to be entered into ss.par file, where length(fvals) == length(years_alter) must be true.

par_file_in

A string providing the path to the input SS .par file.

par_file_out

A string providing the path to the output SS .par file.

Value

A modified SS3 .par 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)

Curry James Cunningham

See Also

Other change functions: change_data, change_em_binning, change_e, change_f, change_o, change_retro, change_tv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Create a temporary folder for the output:
temp_path <- file.path(tempdir(), "ss3sim-f-example")
dir.create(temp_path, showWarnings = FALSE)

# Find the example .par file in the package data:
d <- system.file("extdata", package = "ss3sim")
par_file <- paste0(d, "/change_f/ss3.par")

change_f_par(years = 1:49, years_alter = 2, fvals = 9999, par_file_in =
par_file, par_file_out = paste0(temp_path, "/test.par"))

ss3sim documentation built on Nov. 9, 2019, 1:06 a.m.