Skip to content

Commit

Permalink
Reduced PB value for OceanQuahog to reflect their long lifespan. Made…
Browse files Browse the repository at this point in the history
… downstream changes to all impacted files and the resulting balanced model
  • Loading branch information
MaxGrezlik committed Jul 30, 2024
1 parent 038b6fa commit ff3e72a
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 4 deletions.
27 changes: 24 additions & 3 deletions R/GB_alternate_balancing.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,24 @@ GB.params.adj$model[Group %in% aggEE, EE := 0.8]
GB.params.adj$model[Group %in% c('AtlHerring', 'AtlMackerel'),
Biomass := Biomass * 10]

# Step 02 - Ocean Quahog -------------------------------------
GB.new <- rpath(GB.params.adj, eco.name = 'Georges Bank')
check.mort(GB.new, 'OceanQuahog')
# Macrobenthos and Megabenthos. Some AmLobster and OtherDemersals
# Move predation on OceanQuahog to AtlScallop and SurfClam
GB.params.adj$diet[Group == 'OceanQuahog', Macrobenthos := 0.0002] # removed 0.005
GB.params.adj$diet[Group == 'AtlScallop', Macrobenthos := Macrobenthos + 0.0025]
GB.params.adj$diet[Group == 'SurfClam', Macrobenthos := Macrobenthos + 0.0025]

GB.params.adj$diet[Group == 'OceanQuahog', Megabenthos := Megabenthos - 0.028]
GB.params.adj$diet[Group == 'SurfClam', Megabenthos := Megabenthos + 0.028]

GB.params.adj$diet[Group == 'OceanQuahog', AmLobster := AmLobster - 0.02]
GB.params.adj$diet[Group == 'SurfClam', AmLobster := AmLobster + 0.01]
GB.params.adj$diet[Group == 'Detritus', AmLobster := AmLobster + 0.01]

GB.params.adj$diet[Group == 'OceanQuahog', OtherDemersals := OtherDemersals - 0.06]
GB.params.adj$diet[Group == 'OtherDemersals', OtherDemersals := OtherDemersals + 0.06]


#Step 02 - Deal with OceanPout, AmPlaice, and WitchFlounder----
Expand Down Expand Up @@ -432,9 +450,12 @@ GB.params.adj$model[Group == 'RedHake', Biomass := Biomass * 2]

# Step 18 - EE < 1.5 -----------------

# Haddock, Microzooplankton, LgCopepods, SmCopepods, Loligo
# OceanQuahog, Haddock, Microzooplankton, LgCopepods, SmCopepods, Loligo
# AmPlaice, Scup, AtlHerring, Detritus, WinterFlounder, YTFlounder

# OceanQuahog
GB.params.adj$model[Group == 'OceanQuahog', PB := 0.02]

# Haddock
check.mort(GB.new, 'Haddock')
# increase B
Expand Down Expand Up @@ -475,7 +496,7 @@ GB.params.adj$model[Group %in% c('Microzooplankton', 'LgCopepods','SmCopepods'),

#Increase unassim to 0.3 for other detritavores
GB.params.adj$model[Group %in% c('AmLobster', 'Macrobenthos', 'Megabenthos',
'AtlScallop', 'OceanQuahog', 'OtherShrimps'),
'AtlScallop', 'OtherShrimps'),
Unassim := 0.3]

# Loligo
Expand Down Expand Up @@ -518,7 +539,7 @@ GB.params.adj$model[Group == 'YTFlounder', Biomass := Biomass * 1.1]
GB.params.adj$diet[Group == 'Odontocetes', Sharks := Sharks + 0.025]


# EDITED TO HERE ------------
# Check EEs and params -------------------------------------
GB.new <- rpath(GB.params.adj, eco.name = 'Georges Bank')
check.rpath.params(GB.params.adj)
check.ee(GB.new)
Expand Down
13 changes: 12 additions & 1 deletion data-raw/R/GBRpath_bioparams.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@

#Required packages--------------------------------------------------------------
#remotes::install_github("ropensci/rfishbase")
library(rfishbase); library(data.table)
library(rfishbase); library(data.table); library(here)
load(here('data-raw', 'Species_codes.RData'))

#Load prebal functions
source(here('R', 'PreBal.R'))

#User functions-----------------------------------------------------------------
rightcase <- function(x){
out <- c()
Expand Down Expand Up @@ -116,6 +119,14 @@ surf <- copy(GB.double[RPATH == 'OceanQuahog', ])
surf[, RPATH := 'SurfClam']
GB.double <- rbindlist(list(GB.double, surf))

# OceanQuahog PB value too high for such a long-lived species
# Frequently reach 200 years old (Butler et al., 2013)
pbcalc(200)

GB.double[RPATH == 'OceanQuahog', PB := 0.0125]
# Adjust QB so P/Q is 0.1
GB.double[RPATH == 'OceanQuahog', QB := 0.125]

GB.params <- rbindlist(list(GB.params, GB.double))

#FishBase-----------------------------------------------------------------------
Expand Down
Binary file modified data/GB.init.rda
Binary file not shown.
Binary file modified data/GB.params.rda
Binary file not shown.
Binary file modified data/alternate.GB.bal.rda
Binary file not shown.
Binary file modified data/alternate.GB.params.bal.rda
Binary file not shown.
Binary file modified data/bio.input.rda
Binary file not shown.
Binary file modified data/bioparam.input.rda
Binary file not shown.
Binary file modified data/diet.input.rda
Binary file not shown.

0 comments on commit ff3e72a

Please sign in to comment.