Skip to content

Commit

Permalink
calculate best_f and load into abc
Browse files Browse the repository at this point in the history
the function returns the same value at various levels of last_f but breaks if I pass the actual last_f (0.427) from the assessment. My guess is that was either a holdover or calculated incorrectly in 2020.
  • Loading branch information
mkapur-noaa committed Jul 1, 2024
1 parent 14d8934 commit a244f3b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
16 changes: 12 additions & 4 deletions 2024/safe/08-abc.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,9 @@ Competitors for FHS prey resources include other benthic foragers, like northern
*Together, the most recent data available suggest there are no apparent ecosystem concerns, although predation pressure may be rising – level 1.*





### Fishery performance

There is no ESP for this stock complex, but we note that the fishery has consistently caught only a small fraction of the ABC (average 16% over last 5 years). We did not examine CPUE trends nor spatial patterns of fishing. There are no changes in the duration of fishing openings. *Altogether, we see no cause for concern and give this consideration a level 1 as well.*
There is no ESP for this stock complex, but we note that the fishery has consistently caught only a small fraction of the ABC (averaging less than 20% over the last five years). We did not examine CPUE trends nor spatial patterns of fishing. There are no changes in the duration of fishing openings. *Altogether, we see no cause for concern and give this consideration a level 1 as well.*

### Risk Table Summary and ABC recommendation

Expand All @@ -133,14 +130,25 @@ There is no ESP for this stock complex, but we note that the fishery has consist
#### Overfishing

The stock is not being subjected to overfishing, because the catch in 2019 (15,858 t) is less than the 2019 OFL (80,918 t).


The official catch estimate for the most recent complete year (`r year-1`) is `r prettyNum(c0,big.mark=",")` t. This is less than the `r year-1` OFL of `r prettyNum(82699,big.mark=",")` t. *The stock is not subject to overfishing.*

#### Overfished (Harvest Scenario 6)

The results of scenarios 6 and 7 above indicate that the stock is not overfished and is not approaching an overfished condition.


The minimum stock size threshold (MSST) for POP is given by the $B_{35\%}$ which is `r prettyNum(b35_25,big.mark=",")` in `r year`. The estimated stock spawning biomass in `r year` is nearly double the MSST at `r prettyNum(ssb_25,big.mark=",")`. *The stock is not overfished*.

#### Approaching Overfished (Harvest Scenario 7)

With regard to assessing the current stock level, the expected stock size in the current year of scenario 6 is 146,307 t, which is higher than B35% (71,280 t), so the stock is not currently overfished. The expected spawning stock size in the year 2033 of scenario 7 (76,046 t) is greater than B35%; thus, the stock is not approaching an overfished condition.

The F that would have produced a catch for `r year-1` equal to the `r year-1` OFL for `r year-1` (`r prettyNum(ofl_23_23, big.mark = ',')`) was `r f_best`.


The mean estimated stock spawning biomass in `r year+2` is above the MSST. *The stock is not approaching an overfished state*.


Expand Down
37 changes: 37 additions & 0 deletions 2024/safe/bsai_fhs_2024.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,44 @@ c1 <- pcatch[1] # estimated catch in current year
c2 <- pcatch[2] # proj catch year + 1
c3 <- pcatch[3] # proj catch year + 2
# Best F (for SARA files & stock status section) ----
# Use this year's model to recalculate the F for the previous year
## that would have produced the specified OFL for the previous year
# provide naa, waa, etc from terminal year of model - can rip from Proj
projdat <- readLines(here::here(year,'model_runs','03b_projection', "projection_data.dat"))
ages <- 1:as.numeric(unlist(strsplit(projdat[grep("number of ages", projdat)]," "))[1])
naa_f <- as.numeric(unlist(strsplit(projdat[29]," "))[ages])
naa_m <- as.numeric(unlist(strsplit(projdat[30]," "))[ages])
waa_f <- as.numeric(unlist(strsplit(projdat[23]," "))[ages]) ## fishery WAA
waa_m <- as.numeric(unlist(strsplit(projdat[24]," "))[ages])
saa_f <- waa_f <- as.numeric(unlist(strsplit(projdat[26]," "))[ages])
saa_m <- waa_f <- as.numeric(unlist(strsplit(projdat[27]," "))[ages])
mort <- as.numeric(unlist(strsplit(projdat[14]," "))[ages])
ofl_23_23 <- 48161 ## last model's OFL for last year (2023 model for 2023 https://www.npfmc.org/wp-content/PDFdocuments/SAFE/2023/GOAflathead.pdf)
afscassess::best_f(data = data.frame(age = ages,
naa1 = naa_f,
naa2 = naa_m,
waa1 = waa_f,
waa2 = waa_m,
saa1 = saa_f,
saa2 = saa_m),
m = mort, m2 = mort,
type = 3, ## two sex, one year
f_ratio= NULL, ## only one gear
last_ofl = ofl_23_23,
last_f = 0.1
) %>%
strsplit(., " ") %>%
unlist() %>%
last(.) %>%
as.numeric() %>%
round(.,3) -> f_best
```





```{r, child="01-summary.Rmd", eval = T}
```
Expand Down

0 comments on commit a244f3b

Please sign in to comment.