Skip to content

Commit

Permalink
Add high/low discard scenario figs
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed Aug 20, 2024
1 parent 23f316f commit 2a1c118
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ss3/02-outside-ss3-r4ss.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fit_ss3 <- function(model_dir = "model1",

mods <- c("A1", "A0",
"A2_USgrowth", "A3_highmat", "A4_USgrowth_highmat", "A5_highdiscard",
"A6_IPHC+CPUE", "A7_SYNonly", "A8_HBLLonly", "A9_lowM", "A10_highM", "A11_low_zfrac", "A12_high_zfrac", "A13_extraSD",
"A6_IPHC+CPUE", "A7_SYNonly", "A8_HBLLonly", "A9_lowM", "A10_highM", "A11_low_zfrac", "A12_high_zfrac", "A13_extraSD", "A14_lowdiscard",
"B1_1990inc", "B2_2010step", "B3_2005step", "B4_1990inc_lowM", "B5_2010step_lowM")

# # Make sure starter matches...
Expand Down
7 changes: 4 additions & 3 deletions ss3/03-outside-ss3-figures.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ for (set_to_plot in c("growth", "index", "M", "zfrac")) {
if (set_to_plot == "growth") {

# Set A models with growth and maturity scenarios
mods <- c("A0", "A2_USgrowth", "A3_highmat", "A4_USgrowth_highmat", "A5_highdiscard")
mods <- c("A0", "A2_USgrowth", "A3_highmat", "A4_USgrowth_highmat", "A14_lowdiscard", "A5_highdiscard")

model_name <- c("(A0) BC growth\n(base)", "(A2) US growth", "(A3) BC growth,\nhigh maturity", "(A4) USgrowth,\nhigh maturity", "(A5) 100% discard\nmortality")
model_name <- c("(A0) BC growth\n(base)", "(A2) US growth", "(A3) BC growth,\nhigh maturity", "(A4) USgrowth,\nhigh maturity", "(A14) Low discard\nmortality", "(A5) High discard\nmortality")

fig_dir <- "figs/ss3/set_a_mat"

Expand Down Expand Up @@ -221,7 +221,7 @@ for (set_to_plot in c("growth", "index", "M", "zfrac")) {
select(Sex, Yr, `0`) %>%
rename(M = `0`) %>%
mutate(scen = model_name[x]) |>
mutate(scen = forcats::fct_inorder(scen))
mutate(scen = factor(scen, levels = model_name))
})

rr <- Minc |>
Expand Down Expand Up @@ -304,6 +304,7 @@ for (set_to_plot in c("growth", "index", "M", "zfrac")) {
g <- Map(SS3_index, multi_rep, model_name, figure = FALSE) %>%
bind_rows() %>%
mutate(scen = forcats::fct_inorder(scen)) |>
mutate(scen = factor(scen, levels = model_name)) |>
left_join(fleet_names, by = "Fleet_name") %>%
ggplot(aes(Yr, Obs, ymin = exp(log(Obs) - 1.96 * SE), ymax = exp(log(Obs) + 1.96 * SE))) +
geom_linerange() +
Expand Down
6 changes: 4 additions & 2 deletions ss3/99-model-names.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
mods <- c(
"A1", "A0",
"A2_USgrowth", "A3_highmat", "A4_USgrowth_highmat", "A5_highdiscard",
"A6_IPHC+CPUE", "A7_SYNonly", "A8_HBLLonly", "A9_lowM", "A10_highM", "A11_low_zfrac", "A12_high_zfrac", "A13_extraSD",
"A6_IPHC+CPUE", "A7_SYNonly", "A8_HBLLonly", "A9_lowM", "A10_highM", "A11_low_zfrac",
"A12_high_zfrac", "A13_extraSD", "A14_lowdiscard",
"B1_1990inc", "B2_2010step", "B3_2005step", "B4_1990inc_lowM", "B5_2010step_lowM"
)

Expand All @@ -11,7 +12,7 @@ model_name <- c(
"(A2) US growth",
"(A3) BC growth, high maturity",
"(A4) US growth, high maturity",
"(A5) 100% discard m.",
"(A5) High discard mortality",
"(A6) IPHC + CPUE",
"(A7) SYN only",
"(A8) HBLL only",
Expand All @@ -24,6 +25,7 @@ model_name <- c(
# "(A12) zfrac = 0.6, Beta = 2",
"(A12) High productivity",
"(A13) Extra SD on IPHC",
"(A14) Low discard mortality",
"(B1) M = 0.074, inc. 1990",
"(B2) M = 0.074, step 2010",
"(B3) M = 0.074, step 2005",
Expand Down

0 comments on commit 2a1c118

Please sign in to comment.