atlantis_fsimu: Run set of fishing strategies scenarios.

View source: R/atlantisfmsy_fscenarios.R

atlantis_fsimuR Documentation

Run set of fishing strategies scenarios.

Description

Run a predefine set of fishing scenarios on a several functional groups using Fmsy multipliers or F per functional group. Unselected functional groups remains at the same fishing level as in the initial model. F distribution across fleet isn't changed.

Usage

atlantis_fsimu(
  func_grp,
  folder_path,
  model_path,
  exe_name,
  burnin_time,
  label,
  batch_file = NULL,
  fmult,
  fref = rep(1, length(fmult)),
  save_time = NULL
)

Arguments

func_grp

The code of Atlantis functional groups for which F scenarios will be run.

folder_path

The working directory: where the F simulations will be run and stored.

model_path

The directory of the calibrated model (containing all the parameters files and one bach file. Forcing files can be stored in a direct parent directory of model_path). WARNING: Only working if the forcing folder is in the main model directory model_path or if it is in the direct parent directory. If not please either modify this package or modify the path structure of your Atlantis input forcing parameters file.

exe_name

The name of the atlantis executable you used (ex: atlantismain, atlantisNew, atlantisMerged).

burnin_time

The time in days needed for the model to pseudo-stabilize before starting the additional 30 years of simulation.

label

Name of the scenarios (used to set names of output folder and files).

batch_file

The name of the batch/shell file with extension you are using to run your model. If not provided, the function will search for the unique batch file in your folder_path. Default: NULL.

fmult

Set of F multipliers, one value per functional groups in func_grp. If wants to be used as set of fishing mortalities (in y-1), don't supply values for fref.

fref

Set of reference F (in y-1), one value per functional groups in func_grp. If you want to apply fmult to Fstatus-quo set the value as NULL. Default: 1.

save_time

The number of days to save from the end of the simulation. Default: NULL.

Value

Atlantis outputs for every scenarios defined previously. function(func_grp, folder_path, model_path, exe_name, burnin_time, label, batch_file = NULL, fmult, fref = rep(1,length(fmult)))

Warning

At the moment, the package is not designed to run on OSX, it only works on Linux and Windows (To run on OSX these functions need to be modified: atlantisfmsy_simu, atlantisfmsy_restart, atlantisfmsy_modelcopy, atlantis_bachchange, and atlantis_paraselect). As well if you are not providing the name of your bach/shell file, this package required that only one batch/shell file is in the model directory (if more than one batch/shell files are present please remove them, leave only the one used to run the calibrated model).

See Also

atlantis_checkmodule to check if all the modules are on (physics, biology, and fishery), atlantis_fgrpon to check if the functional group is active, atlantis_fgrpimp to check if the functional group is fished and impacted, atlantis_paraselect for parameters file selection, atlantis_fleetopen to check if fleets are active, atlantis_checkf to check the formulation of the fishing pressure used (i.e. F, effort, dynamics model...), atlantis_fdistri to extract the distribution of fishing pressure amongst fleets, atlantisf_modelcopy to create the simulation directory and copy the calibrated model inside it, atlantis_runtime to modify the runtime in the run parameters file, atlantis_wsummary to modify periodicity of summary outputs, atlantis_fchange to change the value of F, atlantis_bachchange to change the name of output files, str_split_fixed to split a chain of characters, ex_number to extract number from a chain of characters, nc_open to open netCDF4 files, ncvar_get to extract variables from netCDF4 files, nc_close to close netCDF4 files, and read.table to open table stored in text files (.txt, .csv ...).

Examples

atlantisf_simu(c("COD","LBT"), "C:/Atlantis/AtlantisEEC/Fmsy",
                  "C:/Atlantis/AtlantisEEC/AtlantisEECF_v3",
                  "atlantismain", 7300, "HTL", "runAtlantis.bat", c(1,2,3))
atlantisf_simu(c("COD","LBT"), "/home/Atlantis/AtlantisEEC/Fmsy",
                  "/home/Atlantis/AtlantisEEC/AtlantisEECF_v3",
                  "atlantisNew", 7300, "HTL", "runAtlantis.sh", c(1,2,3))


rgirardi/atlantisfmsy documentation built on Aug. 30, 2022, 9:11 a.m.