Skip to content

Commit

Permalink
Only remove trawl survey catch in forecasts (not numbers based ones)
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed Sep 18, 2024
1 parent fb624a3 commit 5714760
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ss3/09-outside-ss3-forecast.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@ make_f_catch <- function(dir, total, years = 10, debug_mode = FALSE) {
suppressWarnings(
dat <- SS_readdat(paste0("ss3/", dir, "/data.ss"), verbose = FALSE)
)

bratio_dat <- filter(dat$catch, year >= 2018) |> # last 5
filter(fleet %in% c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) |> # active fleets catching dogfish
group_by(fleet) |>
summarise(m = mean(catch, na.rm = TRUE))

# keep surveys and iRec and salmon bycatch constant at average levels:
temp1 <- filter(bratio_dat, fleet %in% c(6, 7, 8, 9, 10)) # surveys + salmon
# keep trawl survey
temp1 <- filter(bratio_dat, fleet %in% c(8)) # (weight-based) survey catch (synoptic)
temp1$catch_or_F_before_mortality <- temp1$m
total_constant_catch <- sum(temp1$m)
total_constant_catch <- sum(temp1$m[!temp1$fleet %in% c(9, 10)]) # exclude salmon and iREC (not in quota and in numbers)
total_remaining_quota <- total - total_constant_catch

if (total_remaining_quota > 0) {
Expand Down

0 comments on commit 5714760

Please sign in to comment.