Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
jimianelli committed Nov 14, 2024
1 parent e583777 commit 924e0f0
Show file tree
Hide file tree
Showing 10 changed files with 107 additions and 54 deletions.
12 changes: 6 additions & 6 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ project:

website:
page-navigation: true
title: "Eastern Bering Sea walleye pollock stock assessment"
title: "Assessment of walleye pollock in the eastern Bering Sea"
site-url: "https://nmfs-opensci.github.io/NOAA-quarto-simple"
repo-url: "https://github.com/afsc-assessments/ebs_pollock_safe"
repo-actions: [edit, source, issue]
Expand Down Expand Up @@ -53,6 +53,7 @@ website:
#text: Alternative software platforms
- href: doc/sept.qmd
text: September 2024 EBS pollock assessment

lightbox: true
engine: knitr
date: now
Expand All @@ -68,15 +69,15 @@ format:
toc: true
toc-title: 'Contents'
embed-resources: false
#numbering: true
#number-sections: true
#numbering: false
#number-sections: false
code-summary: "Show the code"
code-fold: true
pdf:
documentclass: scrreprt
papersize: letter
#numbering: true
#number-sections: true
#numbering: false
#number-sections: false
header-includes:
- \counterwithout{figure}{chapter}
- \usepackage{fancyhdr}
Expand All @@ -100,4 +101,3 @@ filters:
- include-files.lua
- quarto


4 changes: 2 additions & 2 deletions doc/data/fig_captions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ bts_3d.png,14,bts_3d,Bottom trawl survey pollock catch in kg per hectare for 202
bts_age_comp.png,15,bts_age,"Pollock abundance levels by age and year as estimated directly from the NMFS bottom-trawl surveys (1990--2019,2021-2024). The 2012 and 2018 year-classes are shaded differently.",,
avo_map_yr.pdf,16,data_avomap, Maps of acoustic vessel-of-opportunity (AVO) index data 2006-2024. Grid cell size and shading is proportional to pollock backscatter.,,
vastage.png,17,vastage,Pollock abundance levels by age and year as estimated directly from the NMFS bottom-trawl surveys (1990--2019, 2021--2024) using standard 'design-based' (DB) and VAST approaches.,
ats_usv.png,18,ats_usv,Geographic dipiction of backscatter intensity as measured from USVs in 2020.,,
ats_vast.png,19,ats_vast,VAST model predicted log-density of pollock abundance based on acoustic backscatter from NMFS acoustic-trawl surveys (1994--2018) and from the 2020 USV transects.,,
ATS_maps.png,18,ats_maps,"Heat map of acoustic-trawl survey relative pollock biomass, 2004-2024.",,
ats_data.png,19,ats_data,"Acoustic-trawl EBS pollock biomass estimates by year used in this assessment. Error bars represent approximate 95% confidence bounds.",
fsh_wtage_comb.pdf,20,fsh_wtage_comb,"Recent fishery average weight-at-age anomaly (relative to the mean) by strata for ages 3--10, 2019--2023. Vertical shape reflects uncertainty in the data (wider shapes being more precise), colors are consistent with cohorts.",,
fsh_wtage_strata,21,fsh_wtage_strata,"Fishery average weight-at-age anomaly (relative to the mean) across strata and combined for all ages (3--10), and available years (1991--2023). Vertical shape reflects uncertainty in the data (wider shapes being more precise), colors are consistent with cohorts.",,
,22,fsh_wtage_strata_yr,"Recent fishery average weight-at-age anomaly (relative to the mean) by strata for ages 3--10, 2019--2023. Vertical shape reflects uncertainty in the data (wider shapes being more precise), colors are consistent with cohorts.",,
Expand Down
Binary file modified doc/figs/fsh_lw_anom_str_yr_box.pdf
Binary file not shown.
Binary file modified doc/figs/fsh_lw_anom_yr_box.pdf
Binary file not shown.
Binary file modified doc/modeleq.pdf
Binary file not shown.
54 changes: 38 additions & 16 deletions doc/modeleq.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ total catch biomass $(Y_t)$ can be described as:s
N_{t+1,A} &= N_{t,A-1} e^{-Z_{t,A-1}} + N_{t,A} e^{-Z_{t,A}} , &1 \le t \le T \\
Z_{t,a} &= F_{t,a} + M_{t,a} \\
C_{t,.} &= \sum_{a=1}^A{C_{t,a}} \\
p_{t,a} &= \frac{C_{t,a} } {C_{t,.} } \\
Y_{t} &= \sum_{a=1}^A{w_{t,a}C_{t,a}} \\
p_{t,a} &= \frac{C_{t,a} } {C_{t,.} }
\end{align}
```
where
Expand Down Expand Up @@ -77,7 +76,6 @@ process as in Dorn et al. (2000):
```{=tex}
\begin{align}
\delta_t^\mu - \delta_{t+1}^\mu &\sim \mathcal{N}(0,\,\sigma_{\delta^\mu}^{2}) \\
\\
\alpha_t^\mu - \alpha_{t+1}^\mu &\sim \mathcal{N}(0,\,\sigma_{\alpha^\mu}^{2}) \\
\beta_t^\mu - \beta_{t+1}^\mu &\sim \mathcal{N}(0,\,\sigma_{\beta^\mu}^{2})
\end{align}
Expand All @@ -93,9 +91,13 @@ above, but the lognormal penalty was applied to the resulting
selectivities-at-age directly. The extent of this variability was
evaluated in the context of the impact on age-specific survey
catchability/availability and contrasted with an independent estimate of
pollock availability to the bottom trawl survey. \begin{align}
{ln(s_{t,a})} - {ln(s_{t+1,a})} &\sim \mathcal{N}(0,\,\sigma_{sel}^{2}) \\
\end{align} In 2008 the AT survey selectivity approach was modified. As
pollock availability to the bottom trawl survey.

\begin{align}
{ln(s_{t,a})} - {ln(s_{t+1,a})} &\sim \mathcal{N}(0,\,\sigma_{sel}^{2})
\end{align}

In 2008 the AT survey selectivity approach was modified. As
an option, the age one pollock observed in this trawl can be treated as
an index and are not considered part of the age composition (which then
ranges from age 2-15). This was done to improve some interaction with
Expand Down Expand Up @@ -243,7 +245,12 @@ adjusted from the original estimates by the ratio of the expected
recruitment given spawning biomass (with and without fishing) and the
estimated stock-recruitment curve. I.e., the recruitment under no
fishing is modified as:
$$R_t' = \hat{R}_t\frac{f(B_{t-1}')}{f(B_{t-1})}$$ where $R_t$ is the

\begin{align}
R_t' = \hat{R}_t\frac{f(B_{t-1}')}{f(B_{t-1})}
\end{align}

where $R_t$ is the
original recruitment estimate in year $t$ with $B_{t-1}'$ and $B_{t-1}$
representing the stock-recruitment function given spawning biomass under
no fishing and under the estimated fishing intensity, respectively.
Expand All @@ -262,7 +269,9 @@ provides an estimate of the effective number of ages. This is computed for each
year as a measure of different age groups contributing to the spawning population
as:

$$ H_i = \exp(-\sum p_a \cdot \log(p_a)) $$
\begin{align}
H_i = \exp(-\sum p_a \cdot \log(p_a))
\end{align}

where $p_a$ is the proportion of mature fish biomass-at-age $a$ in year $i$.

Expand Down Expand Up @@ -327,9 +336,12 @@ nll(i) = -0.5\sum_{a=1}^A\sum_{t=1}^T{
\right\}}
\end{align}
```
where \begin{align}
\eta_{ta} &= p_{ta}(1-p_{ta})\\
\text{and} \\
where
\begin{align}
\eta_{ta} &= p_{ta}(1-p_{ta})
\end{align}
and
\begin{align}
\tau_t^2 &= 1/n_t
\end{align} which gives the variance for $p_{ta}$ \begin{align}
(\eta_{ta}+0.1/A)\tau_t^2
Expand Down Expand Up @@ -377,11 +389,11 @@ nll(i) &= \sum_t{\frac{\ln(u_t^s/\hat N_t^s)^2}{2\sigma_{s,t}^2}}
optionally biomass) estimate with variance $\sigma_{s,t}$ from survey
$s$ in year $t$ or optionally, the normal distribution can be selected:
\begin{align}
nll(i) &= \sum_t{\frac{(u_t^s - \hat N_t^s)^2}{2\sigma_{s,t}^2}}. \\
nll(i) &= \sum_t{\frac{(u_t^s - \hat N_t^s)^2}{2\sigma_{s,t}^2}}.
\end{align}

The AT survey and AVO index is modeled using a lognormal distribution
whereas for the BTS survey, a normal distribution was applied.
whereas for the BTS survey, a multivariate log-normal distribution was applied.

For model configurations in which the BTS data are corrected for
estimated efficiency, a multivariate lognormal distribution was used.
Expand Down Expand Up @@ -433,7 +445,10 @@ each age $i$, $i$= (1, 2,...,15), given actual observed mean and
variances in weight-at-age over the period 1991-`r thisyr-1`. The values
of based on available data and (if this option is selected) estimates
the parameters subject to the natural constraint:
$$w_{ta}^{future} \sim \mathcal{N}(\bar{w_{a}},\,\sigma_{w_a}^{2})$$

\begin{align}
w_{ta}^{future} \sim \mathcal{N}(\bar{w_{a}},\,\sigma_{w_a}^{2})
\end{align}

Note that this converges to the mean values over the time series of data
(no other likelihood component within the model is affected by future
Expand All @@ -448,8 +463,9 @@ data and both cohort and year effects. The model for this is:
\hat{w}_{ta} &= \bar w_a e^{\upsilon_t} & a=1, \, t \ge 1964 \\
\hat{w}_{ta} &= \hat{w}_{t-1,a-1} + \Delta_a e^{\psi_t} & a > 1, \, t > 1964 \\
\Delta_a &= \bar w_{a+1} - \bar w_a & a<A \\
\bar w_a &= \alpha \left\{L_1+ \left(L_2-L_1\right)\left(\frac{1-K^{a-1}}{1-K^{A-1}}\right)\right\}^3 \\
\end{align} where the fixed effects parameters are $L_1, L_2, K,$ and
\bar w_a &= \alpha \left\{L_1+ \left(L_2-L_1\right)\left(\frac{1-K^{a-1}}{1-K^{A-1}}\right)\right\}^3
\end{align}
where the fixed effects parameters are $L_1, L_2, K,$ and
$\alpha$ while the random effects parameters are $\upsilon_t$ and
$\psi_t$.

Expand Down Expand Up @@ -478,3 +494,9 @@ presented for the evaluation of $B_{20\%}$) with feedback (via future
catch specifications) using the control rule and assessment model would
be required.

## Tier 3 projections

Tier 3 projections were calculated using the projection model where the
average weight-at-age and selectivity was specified the same way as in
the Tier 1 calculations but omits estimates of uncertainty in the mean
recruitment and the selectivity- and weight-at-age values used.
13 changes: 10 additions & 3 deletions doc/preamble.tex
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{lastpage}
\fancyhf{}
\lhead{\textit{November 2024 Plan Team}}
\rhead{\textit{EBS pollock }}
\chead{\textit{--Draft--}}
\cfoot{\textit{\thepage}}
\rfoot{}
\lfoot{}
\setlength{\footskip}{4cm} # Lower the footer
% \usepackage{lipsum}
% \usepackage{lastpage}
\usepackage{booktabs}
\pagestyle{fancy}
\fancyhf{}
\usepackage{booktabs}
\usepackage{longtable}

\usepackage{rotating}
Expand Down
Binary file modified docs/ebswp.pdf
Binary file not shown.
59 changes: 32 additions & 27 deletions ebswp.qmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "1. Stock assessment for eastern Bering Sea walleye pollock"
title: "1. Assessment of walleye pollock in the eastern Bering Sea"
subtitle: "Draft for November 2024 Plan Team review"
author:
- name: James Ianelli
Expand All @@ -18,7 +18,7 @@ author:
- name: Sarah Steinessen
- name: Carey McGilliard
- name: Elizabeth Siddon
date: 11/05/2024
date: 11/11/2024
date-format: "MMMM YYYY"
bibliography: doc/references.bib
header-includes:
Expand All @@ -37,7 +37,6 @@ filters:
- highlight-text
format:
pdf:
#documentclass: article # or `report`, `book`, etc.
classoption: notitlepage # Ensures title is on the same page as content
number-pages: TRUE
number-sections: TRUE
Expand All @@ -50,18 +49,17 @@ format:
extra_dependencies: rotating
header-includes:
- \usepackage{fancyhdr}
- \pagestyle{fancy}
# - \pagestyle{fancy}
- \fancyhf{}
- \lhead{\textit{November 2024 Plan Team}}
- \rhead{\textit{EBS pollock }}
- \chead{\textit{--Draft--}}
- \cfoot{\textit{\thepage}}
- \rfoot{}
- \lfoot{}
- \setlength{\footskip}{4cm} % Lower the footer
- \setlength{\footskip}{4cm} # Lower the footer
editor_options:
chunk_output_type: console
#css: mystyle.css
editor:
markdown:
wrap: 72
Expand All @@ -71,19 +69,20 @@ editor:
<div style="margin-bottom: 1.5in;"></div>
\vspace{0.5in}

> **This report may be cited as:**
> Ianelli, J. et al. 2024. Assessment of the eastern Bering Sea walleye pollock. North Pacific Fishery Management Council, Anchorage, AK. Available [here](https://www.npfmc.org/library/safe-reports/).

<!-- This report may be cited as: Ianelli, J. et al. 2024. Assessment of the eastern -->
<!-- Bering Sea walleye pollock. North Pacific Fishery Management Council, Anchorage, -->
<!-- AK. Available [here](https://www.npfmc.org/library/safe-reports/). -->
<!-- ---------------------- -->
**This report may be cited as:**
Ianelli, J., T. Honkalehto, S. Wassermann, A. McCarthy, S. Steinessen,
C. McGilliard, and E. Siddon. 2024. Assessment of walleye pollock in the
eastern Bering Sea. North Pacific Fishery Management Council,
Anchorage, AK. Available [here](https://www.npfmc.org/library/safe-reports/).

\vspace{2.5in}
date: 11/15/2024


\vspace{2.0in}
<!-- \medskip % or \bigskip for larger spacing -->

<div style="margin-bottom: 4.5in;"></div>

*This information is distributed solely for the purpose of pre-dissemination
peer review under applicable information quality guidelines. It has not been
formally disseminated by the National Marine Fisheries Service and should not
Expand Down Expand Up @@ -900,10 +899,11 @@ add transects on the northwestern shelf where historically most
juveniles have been observed. This resulted in transects at 20 nmi
spacing between 172° W and the US-Russia maritime boundary. The area
east of 170°W was surveyed from 11-22 June and west of 170°W was
surveyed from the 23rd of June through July 17.
surveyed from the 23rd of June through July 17. The survey estimated densities
by area are shown in @fig-ATS_maps.

The survey estimate of pollock for 2024 was 11.4
billion fish with a biomass of 2.87 million t. This represents a 25%
billion fish with a biomass of 2.87 million t (@fig-ats_data). This represents a 25%
decrease in biomass from the 2022 estimate of 3.8 million t (with the
abundance estimate at 9.67 billion fish). The 2024 biomass estimate is
10% below the survey mean of 3.2 million tons for all surveys from 1994-2022.
Expand Down Expand Up @@ -4059,14 +4059,15 @@ print(tab,
byc <- read.csv("doc/data/pollock_catch.csv")[, c(1, 6, 9, 4, 10, 11)]
names(byc) <- c("Year", "target", "gear", "NMFS_area", "Catch", "wed")
byc <- byc %>% filter(NMFS_area < 540)
byc <- byc %>% filter(NMFS_area < 540, NMFS_area!=518, NMFS_area>499, target!="")
ntmp <- unique(byc$target)
ntmp
poll <- ntmp[c(1, 5)]
pcod <- ntmp[c(2)]
rsole <- ntmp[c(6)]
yfsole <- ntmp[c(13)]
oflat <- ntmp[c(3, 7, 9, 15, 16, 17, 18)]
ospp <- ntmp[c(4, 8, 11, 12, 14)]
yfsole <- ntmp[c(12)]
oflat <- ntmp[c(3, 7, 8, 14:17)]
ospp <- ntmp[c(4, 9, 10, 11, 13)]
byc <- byc %>%
filter(!target %in% poll) %>%
Expand All @@ -4086,6 +4087,7 @@ byc <- byc %>%
summarise(Catch = sum(Catch), .groups = "drop")
byc <- byc %>% pivot_wider(names_from = target, values_from = Catch)
byc <- data.frame(byc)
byc$Total=rowSums(byc[,2:6],na.rm=TRUE)
# byc <- read.csv("data/byc_of_pollock.csv",header=T)
for (i in 2:length(byc[1, ])) {
Expand Down Expand Up @@ -4275,12 +4277,15 @@ i <- i + 1
printfig("bts_lenfreq.png", 83)
#printfig("vastage_vs_db.png", 27)
# printfig("wtage_bts.png",94);
printfig("ATS_maps.png", 18)
printfig("ats_data.pdf", 19)
printfig("at_age.png", 74)
printfig("AVO_Series_change.png", 99)
printfig("cog_AVO_ATS.png", 103)
printfig("avo_map_yr.png", 16)
printfig("fsh_lw_month.png", 23)
printfig("fsh_lw_anom_str_yr_box.png", 24)
#fsh_lw_anom_yr_box
printfig("fsh_lw_anom_yr_box.pdf", 25)
printfig("fsh_wtage_comb.pdf", 20)
printfig("fsh_wtage_data_pred.png", 88)
Expand Down Expand Up @@ -4344,13 +4349,13 @@ printfig("tier3_proj_alt3.png", 54)

\clearpage

<!-- ```{r, results='asis'} -->
<!-- #| echo: false -->
<!-- a <- knitr::knit_child("doc/modeleq.qmd", quiet = T) -->
<!-- cat(a, sep = "\n") -->
<!-- ``` -->
```{r, results='asis'}
#| echo: false
a <- knitr::knit_child("doc/modeleq.qmd", quiet = T)
cat(a, sep = "\n")
```

<!-- \clearpage -->
\clearpage

```{r, results='asis'}
#| echo: false
Expand All @@ -4373,7 +4378,7 @@ a <- knitr::knit_child("doc/params.qmd", quiet = T)
cat(a, sep = "\n")
```

<!-- \clearpage -->
\clearpage

# List of contents, tables and figures {#sec-contents}

Expand Down
19 changes: 19 additions & 0 deletions tools/Do_Plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ if (doplots) {
p3 + coord_cartesian(ylim = c(0, 7000))
p3 <- p0/p1 / p2/p3 + plot_layout(axis_titles = "collect");p3
ggsave("doc/figs/mod_bridge.pdf", plot = p3, width = 6, height = 8.0, units = "in")

A <- M
df <- data.frame(year = A$yr_ats)
df$obs <- A$ob_ats
df$pre <- A$eb_ats
df$lb <- A$ob_ats/exp(2.*sqrt(log(1+(A$sd_ob_ats)^2/(A$ob_ats)^2)))
df$ub <- A$ob_ats*exp(2.*sqrt(log(1+(A$sd_ob_ats)^2/(A$ob_ats)^2)))
library(scales);library(ggthemes)
p <- ggplot(df) + labs(y = "Acoustic trawl index", x = "Year")
p <- p + expand_limits(y = 0)
p <- p + geom_point(aes(x=year, y=obs),size=3,color="darkred") +
geom_errorbar(aes(x = year, ymax = ub, ymin = lb),width=.5) +
scale_y_continuous(label = comma, limits = c(0, 8600)) +
scale_x_continuous(breaks= seq(1990,2025,by=5)) + theme_few(base_size = 14)
p
ggsave("~/_mymods/afsc-assessments/ebs_pollock_safe/doc/figs/ats_data.pdf",
plot = p, width = 8, height = 5.0, units = "in")

#---BTS Fit---------------------
# Comparing base with 2 vast configurations
Expand Down Expand Up @@ -90,11 +107,13 @@ if (doplots) {

p1 <- plot_ats(modlst[c(1,2)]) + ggthemes::theme_few() +
scale_x_continuous(limits = c(1990, 2025))
p1
ggsave("doc/figs/mod_ats_bridging.pdf", plot = p1, width = 5.2, height = 3.7, units = "in")

# p1 <- p1+ geom_vline(xintercept=2006.5,color="grey",size=1)
# p1 <- p1+scale_y_log10()
p1 <- plot_ats(modlst[c(2)]) + ggthemes::theme_few(base_size = 13)
p1
ggsave("doc/figs/mod_ats_biom.pdf", plot = p1, width = 9.2, height = 3.7, units = "in")
p1 <- plot_avo(modlst[c(thismod)], ylim = c(0, 5)) + xlim(c(2005, 2025))
p1 + theme_few(base_size = 19)
Expand Down

0 comments on commit 924e0f0

Please sign in to comment.