atlantisfmsy_fmaxcatch: Find F with the maximum catch and estimate the next F values...

View source: R/atlantisfmsy_core.R

atlantisfmsy_fmaxcatchR Documentation

Find F with the maximum catch and estimate the next F values to simulate.

Description

It looks into the output files ...TOTCATCH.nc and determine the value of F (which is coded in the output files name, see atlantis_bachchange) that result on the maximum catch for the functional group considered func_grp. Then it determines the two next values of F that need to be tested.

Usage

atlantisfmsy_fmaxcatch(
  func_grp,
  path,
  exe_name,
  run_time,
  fmax,
  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).

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).

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

It writes on the drive, in the output folder, the file Fnext_simu.txt containing the functional group code func_grp (sp), the current F value with a maximum catch (F), and the two next F value to run (Ft1 and Ft2). It writes as well the file Fmsy_XXX.txt containing the functional group code func_grp (sp), the current F value with a maximum catch (F), and the yearly average catch over the last 5 years of simulation (yield).

See Also

atlantis_paraselect for parameters file selection, nc_open to open netCDF4 files, ncvar_get to extract variables from netCDF4 files, nc_close to close netCDF4 files, aggregate to aggregate data and write.table to write table on the drive.

Examples

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

## Not run: atlantisfmsy_fmaxcatch("COD", "C:/Atlantis/AtlantisEEC/AtlantisMSY/COD",
 "atlantismain", 18250, 10, "runAtlantis.bat")
## End(Not run)
## Not run: atlantisfmsy_fmaxcatch("COD", "/home/Atlantis/AtlantisEEC/AtlantisMSY/COD",
 "atlantisNew", 18250, 10, "runAtlantis.sh")
## End(Not run)

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