atlantisfmsy_plot: Plot catches as a function of the fishing mortality

View source: R/atlantisfmsy_plots.R

atlantisfmsy_plotR Documentation

Plot catches as a function of the fishing mortality

Description

Use the Fmsy simulation to plot the catches of a given functional group as a function of the fishing mortality. On this figure, the Fmsy value is displayed as well as the current F value used in the calibrated model.

Usage

atlantisfmsy_plot(
  func_grp,
  folder_path,
  model_path,
  exe_name,
  fmax,
  compareFsq = F,
  compareYFsq = F,
  Fsq_dir = NULL,
  YFsq = NULL,
  shading = F,
  perc = F,
  addarrow = F,
  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).

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

compareFsq

If TRUE compare Fmsy value with Fsq (status-quo) the fishing mortality applied in the calibrated model. A dashed line is drawn to mark the position of Fsq and it's value is displayed with a precision of two decimals. Default: FALSE.

compareYFsq

If TRUE in addition to compare Fmsy and Fsq, the yield at Fmsy and Fsq is displayed with dashed line and the yield (here Landing) values is diplayed with one decimal precision. Default: FALSE. WARNING: If TRUE you need to provide the parameter Fsq_dir or YFsq described below. If no value is provided for those two parameters the function will look into the output directory of your calibrated model to find the yield (Landing) in the Catch.txt file. This imply that you had previously run the calibrated model for at least the burnin_time + 30 years and that you stored fishery summary output with 365 days periodicity.

Fsq_dir

If compareYFsq is TRUE. You can provide here the fool path (directory + file names + extension) to the Catch.txt produced by the calibrated model following the requirement described above. Default: NULL.

YFsq

If compareYFsq is TRUE. You can provide here the average yearly yield (Landing) in tons over the period 55-60 years of the functional group func_grp produced by the calibrated model following the requirement described previously. Default: NULL.

shading

If TRUE shade the area gain (in green) or lost (in red) by moving from Fsq to Fmsy. Only applied if compareYFsq is TRUE. Default: FALSE.

perc

If TRUE display the percentage of change between Fsq and Fmsy and/or yield at Fsq and Fmsy. Default: FALSE.

addarrow

If TRUE display arrow between Fsq and Fmsy and Yield at Fsq and Fmsy. Default: FALSE. Only displayed if perc is TRUE.

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

gt A TableGrod object ("gtable") plotting the yield (Landing) as a function of the fishing mortality and plot the figure.

Warning

If the Fmsy simulation is not completed the function return an error message.

See Also

atlantis_paraselect for parameters file selection, atlantis_openfile to open a parameters file and selecta parameter, 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, read.table to open table stored in text files (.txt, .csv ...), https://ggplot2.tidyverse.org/ for more information on the package ggplot2 and https://www.rdocumentation.org/packages/grid/versions/3.5.1 for additional inforamtion on the package grid.


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