atlantis_fleetopen: Test if the fleets are active.

View source: R/atlantisfmsy_check.R

atlantis_fleetopenR Documentation

Test if the fleets are active.

Description

Test if at least one fleet is open in Atlantis. It opens the harvest parameters file to check the value of the the parameter XXX_tStart for each fleet. If the value of XXX_tStart is inferior to run_time the fleet is considered active. It opens as well the fishing fleet .csv file to obtain the characteristic of each fleet and add a column named active_flt to store the result of the test.

Usage

atlantis_fleetopen(
  path,
  exe_name,
  harvest_filename,
  run_time,
  batch_file = NULL
)

Arguments

path

The directory of the batch or shell 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).

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.

Value

fishing_para A dataframe containing data from the fishing fleet csv file plus an extra column to indicate if the fleet is active (1) or not (0) named active_flt.

See Also

atlantis_paraselect for parameters file selection, atlantis_openfile to open a parameter file and select a parameter, str_split_fixed to split a chain of characters, ex_number to extract number from a chain of characters, and read.table to open table stored in text files (.txt, .csv ...).

Examples

atlantis_fleetopen("C:/Atlantis/AtlantisEEC/AtlantisEECF_v3",
                   "atlantismain", "AEEC_harvest.prm", 18250, "runAtlantis.bat")
atlantis_fleetopen("/home/Atlantis/AtlantisEEC/AtlantisEECF_v3",
                   "atlantisNew", "AEEC_harvest.prm", 18250, "runAtlantis.sh")


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