The Operating Model is based on the ICES stock assessment. All coding is done using R (R Core Team 2021) and FLR (Kell et al. 2007) in Rmarkdown (Xie, Allaire, and Grolemund 2018), and summarised in as vignettes. The information (data, files, etc.) required to re-do the analysis, is available at ???, including the ICES assessment data set, and the inputs and outputs from the ecosystem models.
Code for cleaning the input data, and R libraries used for the analysis, are contained in the ‘Rmd’ files such as this one. Only Key steps in the analysis are shown in the documents generated, code used for plotting are not echoed in the output but can be found in the ‘Rmd’ file.
This vignette is divided into sections for Installation of the required libraries, sourcing bespoke functions, and loading the data, before the Operating Condition is conducted. Hypotheses about Natural Mortality and Stock Rcruitment are then fitted.
Details on Funding, Software Versions andReferences can be found at the end of the document.
Libraries (i.e. packages) can be installed from gihtub using the
remotes
package:
install.packages("remotes")
library(remotes)
install.packages("ggplot2")
install.packages("plyr")
install.packages("dplyr")
install.packages("reshape")
remotes::install_github("flr/FLCore")
remotes::install_github("flr/ggplotFL")
remotes::install_github("flr/FLBRP")
remotes::install_github("flr/FLasher")
remotes::install_github("flr/FLAssess")
remotes::install_github("flr/FLife")
remotes::install_github("flr/mydas")
remotes::install_github("flr/FLCandy")
remotes::install_github("flr/FLSRTMB")
install.packages("patchwork")
remotes::install_github("james-thorson/FishLife")
remotes::install_github('fishfollower/SAM/stockassessment', ref='components')
remotes::install_github("flr/FLfse/FLfse")
library(FLCore)
library(ggplotFL)
library(FLBRP)
library(FLasher)
library(FLAssess)
library(plyr)
library(dplyr)
library(reshape)
library(FLife)
library(FLBRP)
library(FLCandy)
library(FLSRTMB)
library(patchwork)
library(stockassessment)
library(FLfse)
library(FishLife)
theme_set(theme_bw(16))
Figure 1 Harvest Control Rule
The data are the ICES inputs and historical estimates (ICES 2023) generated by “10_ICES” which runs the ICES assessment
load("../data/inputs/ices/icesRefs.RData")
par=as(model.frame(mcf(FLQuants(ftar=refs[["fmsy"]],
btrig=refs[["msybtrigger"]],
fmin=refs[["fmsy"]]%=%0.005,
bmin=refs[["blim"]]%=%0,
blim=refs[["blim"]])),drop=T)[,-1],"FLPar")
par["ftar"][ is.na(par["ftar"])] =min(par["ftar"], na.rm=T)
par["btrig"][is.na(par["btrig"])]=min(par["btrig"],na.rm=T)
par["blim"][ is.na(par["blim"])] =min(par["blim"], na.rm=T)
ref2021=FLPar(laply(refs,window, end=2021, start=2021))
dimnames(ref2021)$params=c("Flim","Fpa","Fmsy","Fcap","Blim","Bpa","MSYBtrigger")
Figure 2 MSE
SRR
Natural Mortality
0: 35.973680: 15.3876 -0.916291 0.510959
1: 29.225133: 15.7514 -0.623011 0.592835
2: 28.700658: 15.7089 -0.678998 0.560722
3: 28.638368: 15.6370 -0.698069 0.539666
4: 28.578389: 15.6685 -0.712532 0.548767
5: 28.577976: 15.6704 -0.716610 0.547163
6: 28.577667: 15.6713 -0.714185 0.543177
7: 28.577617: 15.6731 -0.715863 0.539109
8: 28.577589: 15.6728 -0.715362 0.539157
9: 28.577579: 15.6726 -0.715074 0.539587
10: 28.577577: 15.6722 -0.715119 0.540031
11: 28.577577: 15.6725 -0.715068 0.540165
12: 28.577576: 15.6723 -0.715071 0.540368
13: 28.577576: 15.6723 -0.715100 0.540237
14: 28.577576: 15.6723 -0.715089 0.540295
15: 28.577576: 15.6723 -0.715089 0.540295
0: 39.374447: 15.5488 -0.916291 0.510959
1: 38.095193: 16.2918 -0.275592 0.704385
2: 33.783807: 16.4059 -0.636587 0.377767
3: 31.700316: 15.9923 -0.543698 0.112467
4: 30.072045: 15.7799 -0.613141 0.559709
5: 29.484364: 15.8570 -0.672751 0.580482
6: 29.439253: 15.8806 -0.693798 0.580702
7: 29.426027: 15.8961 -0.697177 0.553345
8: 29.422824: 15.9020 -0.695097 0.531525
9: 29.422723: 15.9032 -0.694400 0.532169
10: 29.422723: 15.9031 -0.694470 0.532498
11: 29.422722: 15.9031 -0.694417 0.532421
12: 29.422722: 15.9031 -0.694422 0.532413
0: 48.996588: 15.4068 -0.916291 0.510959
1: 38.182769: 16.0848 -0.217375 0.738777
2: 33.995388: 16.0396 -0.414074 0.684156
3: 32.247514: 15.9040 -0.780724 0.535730
4: 31.400201: 15.9285 -0.658757 0.543214
5: 31.391126: 16.0119 -0.657886 0.450580
6: 31.372662: 15.9709 -0.645180 0.486445
7: 31.371230: 15.9794 -0.648485 0.494866
8: 31.370599: 15.9741 -0.645797 0.495457
9: 31.370538: 15.9745 -0.647327 0.493442
10: 31.370525: 15.9750 -0.646817 0.493459
11: 31.370525: 15.9749 -0.646877 0.493745
12: 31.370525: 15.9749 -0.646893 0.493731
13: 31.370525: 15.9749 -0.646892 0.493732
0: 37.519724: 15.8440 -0.916291 0.510959
1: 31.134508: 16.1755 -0.584999 0.562270
2: 30.607971: 16.1189 -0.631992 0.538100
3: 30.498232: 16.0954 -0.691931 0.495161
4: 30.473554: 16.0906 -0.667779 0.489843
5: 30.473423: 16.1014 -0.675628 0.468473
6: 30.472204: 16.0952 -0.664860 0.466184
7: 30.471224: 16.0971 -0.667664 0.467096
8: 30.471101: 16.0977 -0.668198 0.470473
9: 30.471060: 16.0971 -0.669011 0.470283
10: 30.471059: 16.0971 -0.669035 0.470147
11: 30.471059: 16.0971 -0.669003 0.470112
12: 30.471059: 16.0971 -0.669015 0.470133
13: 30.471059: 16.0971 -0.669016 0.470141
[1] "Reference Prior"
[1] "Reference h=0.9"
[1] "Reference Depensation"
[1] "Environmental\nDriver Prior"
[1] "High M Prior"
R version 4.2.1 (2022-06-23)
FLCore: 2.6.19.9097
ggplotFL: 2.7.0.9131
FLBRP: 2.5.9.9020
FLasher: 0.7.1.9218
FLAssess: 2.6.3
FLife: 3.4.0
mydas: 1.2.2
FLCandy: 0.1.0
FLSRTMB: 1.1.4.9013
plyr: 1.8.9
dplyr: 1.1.3
reshape: 0.8.9
FLfse: 1.0.2
stockassessment: 0.5.4
FishLife: 2.6.3
patchwork: 1.1.3
Compiled: Tue Nov 21 10:23:59 2023
Git Hash: 52e4837