atlantisfmsy_inisimu: F simulations up to the collapse of the stock.

View source: R/atlantisfmsy_core.R

atlantisfmsy_inisimuR Documentation

F simulations up to the collapse of the stock.

Description

In the directory folder_path, it creates the folder AtlantisMSY and the sub-folder named after the functional group func_grp where all simulations will take place. The calibrated model files from the directory model_path is copied into this newly created folder. Then a series of values of F between F = 0 to F = fmax with an incrementation of 0.4 y-1 are tested. When the stock collapse, the function stop and return the directory of the simulation folder.

Usage

atlantisfmsy_inisimu(
  func_grp,
  folder_path,
  model_path,
  exe_name,
  harvest_filename,
  run_time,
  f_prop,
  fmax,
  fmin,
  fishing_para,
  save_time = NULL,
  batch_file = NULL
)

Arguments

func_grp

The code of the Atlantis functional group for which Fmsy will be estimated.

folder_path

The working directory: where the Fmsy 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).

harvest_filename

The name of the harvest parameters file with its extension (ex: file.prm).

run_time

The total duration of the simulation in days (burnin_time + 10950).

f_prop

The proportion of the total fishing pressure applied per each fleet. The order of the fleets is the same as the one used in Atlantis.

fmax

The maximal value of F the simulation is going to test in y-1. WARNING: only work if fmax < 10 y-1 (see atlantis_bachchange).

fmin

The minimum value of F to test in y-1 (only used when the simulation are restarted after an interruption). The default value is 0.

fishing_para

A dataframe containing data from the fishing fleet csv file plus two extra columns, one to indicate if the fleet is active (1) or not (0) named active_flt and one named effortmodel containing the effortmodel option used for each fleet (output from the function atlantis_checkf).

save_time

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

Value

simu_path The directory of the simulation folder, and run first set of simulations that are stored in the output folder.

Warning

Only work if fmax < 10 y-1, see atlantis_bachchange).

See Also

atlantisfmsy_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 in the harvest pramaters file, atlantis_bachchange to change output names in the batch/shell file, and atlantis_avbiomsp to estimate the functional group biomass.

Examples

atlantisfmsy_inisimu("COD", "C:/Atlantis/AtlantisEEC/",
 "C:/Atlantis/AtlantisEEC/AtlantisEECF_v3", "atlantismain",
  "AEEC_harvest.prm", 18250, c(0.2, 0.45, 0.05, 0.12, 0.08, 0.1), 4, 0,
   fishing_para, "runAtlantis.bat")
atlantisfmsy_inisimu("COD", "/home/Atlantis/AtlantisEEC/",
 "/home/Atlantis/AtlantisEEC/AtlantisEECF_v3", "atlantisNew",
  "AEEC_harvest.prm", 18250, c(0.2, 0.45, 0.05, 0.12, 0.08, 0.1), 4, 0,
   fishing_para, "runAtlantis.sh")

## Not run: atlantisfmsy_inisimu("COD", "C:/Atlantis/AtlantisEEC/",
 "C:/Atlantis/AtlantisEEC/AtlantisEECF_v3", "atlantismain",
  "AEEC_harvest.prm", 18250, c(0.2, 0.45, 0.05, 0.12, 0.08, 0.1), 10, 0,
   fishing_para)
## End(Not run)

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