atlantis_avbiomsp: Test if the functional group biomass collapsed.

View source: R/atlantisfmsy_check.R

atlantis_avbiomspR Documentation

Test if the functional group biomass collapsed.

Description

It opens the output file BiomIndx.txt and calculates the average biomass of the selected functional group func_grp over the 5 last years of simulation. If the average biomass is smaller than 0.1 metric tons, the stock is considered collapsed and it returns 0.

Usage

atlantis_avbiomsp(func_grp, path, exe_name, run_time, batch_file = NULL)

Arguments

func_grp

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

path

The directory of the batch or shell file.

exe_name

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

run_time

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

batch_file

The name of the batch/shell file 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

biom_sp The average biomass of the 5 last years of simulation. Return 0 if biom_sp < 0.1.

See Also

atlantis_paraselect for parameters file selection, and read.table to open table stored in text files (.txt, .csv ...).

Examples

atlantis_avbiomsp("COD", "C:/Atlantis/AtlantisEEC/AtlantisMSY/COD",
                  "atlantismain", 18250, "runAtlantis.bat")
atlantis_avbiomsp("COD", "/home/Atlantis/AtlantisEEC/AtlantisMSY/COD",
                  "atlantisNew", 18250, "runAtlantis.sh")


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