# Load packages
list_rpackage <- c("knitr", "ggplot2", "devtools", "reader", "viridis", "akfishcondition")
which_not_installed <- which(list_rpackage %in% rownames(installed.packages()) == FALSE)

if(length(which_not_installed) > 1){
    install.packages(list_rpackage[which_not_installed], dep = TRUE)
    # install akfishcondition from S.Rohan repo
    if ("akfishcondition" %in% list_rpackage[which_not_installed]){
        devtools::install_github("sean-rohan-NOAA/akfishcondition")
        }
    }

# load the packages from the list
lapply(list_rpackage, require, character.only = TRUE)

# Unzip map files
unzip(system.file("extdata/2021_ESR.zip", package = "akfishcondition"))

if(!dir.exists("plots")) {
  dir.create("plots")
}

# Load data
goa_ann_mean_resid_df <- akfishcondition:::GOA_INDICATOR$FULL_REGION
goa_stratum_resids_df <- akfishcondition:::GOA_INDICATOR$STRATUM

Contributed by Cecilia O'Leary^1^, Ned Laman^1^, and Sean Rohan^1^

^1^ Resource Assessment and Conservation Engineering Division, Groundfish Assessment Program, Alaska Fisheries Science Center, National Marine Fisheries Service, NOAA, Seattle, WA
Contact: Last updated: October 2020

Description of Indicator: Length-weight residuals represent how heavy a fish is per unit body length and are an indicator of somatic growth variability (Brodeur et al., 2004). Therefore, length-weight residuals represent an integration of prior prey availability and growth conditions. Positive length-weight residuals indicate better condition (i.e., heavier per unit length) and negative residuals indicate poorer condition (i.e., lighter per unit length). Fish condition calculated as length-weight residuals reflects fish growth trajectories which can have implications for biological productivity due to growth, reproduction, and mortality (Paul and Paul, 1999; Boldt and Haldorson, 2004). In addition, variability in growth and consequent body condition can act as a key indicator of population health reflecting how populations respond to environmental and anthropogenic factors (Brosset et al., 2017).

```rFigure 1. National Marine Fisheries Service (NMFS) Alaska Fisheries Science Center Resource Assessment and Conservation Engineering (AFSC/RACE) Groundfish Assessment Program (GAP) Gulf of Alaska summer bottom trawl survey area with International North Pacific Fisheries Commission (INPFC) statistical fishing strata delineated by the red lines.", echo = FALSE} knitr::include_graphics("MapGOA.png")

Paired lengths and weights of individual fishes were examined from the Alaska Fisheries Science Center biennial Resource Assessment and Conservation Engineering (AFSC/RACE) - Groundfish Assessment Program’s (GAP) bottom trawl survey of the Gulf of Alaska (GOA). Analyses focused on walleye pollock (*Gadus chalcogrammus*), Pacific cod (*Gadus macrocephalus*), arrowtooth flounder (*Atheresthes stomias*), southern rock sole (*Lepidopsetta bilineata*), northern rockfish (*Sebastes polyspinis*), Pacific ocean perch (*Sebastes alutus*), and dusky rockfish (*Sebastes variabilis*) collected in trawls with satisfactory performance at standard survey stations. Data were combined in the former International North Pacific Fisheries Commission (INPFC) strata; Shumagin, Chirikof, Kodiak, Yakutat and Southeast (Figure 1). 

Length-weight relationships for each of the seven species were estimated within each stratum across all AFSC/RACE GAP GOA bottom trawl survey years where data were available (19842021). Groundfish condition was calculated from a linear regression of log-transformed exponential growth, _W_ = _aL_^_b_^, where _W_ is weight (g) and _L_ is fork length (mm) and a bias correction was applied when predicting weights priori to calculating residuals. Stratum mean residuals were weighted in proportion to stratum biomass and stratum-year combinations with samples sizes <10 were eliminated from indicator calculations although they were included when establishing length-weight relationships. A different slope was estimated for each stratum to account for spatial-temporal variation in growth and bottom trawl survey sampling. Length-weight relationships for 100--250 mm fork length (1--2 year old) walleye pollock were established independent of the adult life history stages caught. Bias-corrected weights-at-length (log scale) were estimated from the model and subtracted from observed weights to compute individual residuals per fish. Length-weight residuals were averaged for each stratum and weighted in proportion to INPFC stratum biomass based on stratified area-swept expansion of summer bottom trawl survey catch per unit effort (CPUE). Average length-weight residuals were compared by stratum and year to evaluate spatial variation in fish condition. As in previous years, confidence intervals for the condition indicator reflect uncertainty based on length-weight residuals, but now better reflect sample sizes and stratum biomasses among years. Confidence intervals do not account for uncertainty in stratum biomass estimates. Combinations of stratum and year with <10 samples were used for length-weight relationships but excluded from indicator calculations. Code used to calculate the condition indicator is available at ([https://www.github.com/sean-rohan-noaa/akfishcondition](https://www.github.com/sean-rohan-noaa/akfishcondition)).

**Methodological changes**: The method used to calculate groundfish condition this year (2021) is the same as the method that was adopted in 2020, and differs from ESR's prior to 2019 in that: 1) different regression slopes were estimated for each stratum, 2) a bias-correction was applied to estimated weights prior to calculating residuals, 3) stratum mean residuals were weighted in proportion to stratum biomass, and 4) stratum-year combinations with sample size < 10 were not used in indicator calculations.

**Status and Trends**: Residual body condition varied among survey years for all species considered (Figure 2). Fish condition indicators for all seven species were below average in 2021, but with the same condition or reduction in magnitude for most species in 2021 relative to 2019. Residual body condition for pollock, Pacific cod, and arrowtooth flounder remained constant relative to 2019. Southern rock sole residual body condition improved over the last four years, but the final two years remained a constant below average condition. Residual body condition for dusky and northern rockfish also improved, but are still below average. Finally, Pacific ocean perch residual body condition is below average and trending downward in the final four years. Prior to 2015, residual body condition indexes of these GOA species vary from survey to survey, cycling between negative and positive residuals with no clear temporal trends. Residual body condition of 100250 mm walleye pollock in the GOA is strikingly positive during early years in the time series, but has remained mostly neutral or slightly negative since the early 1990s. Overall, GOA fish condition remains below average.

```rFigure 2. Biomass-weighted residual body condition index across survey years (1984-2021) for seven Gulf of Alaska groundfish species collected on the National Marine Fisheries Service (NMFS) Alaska Fisheries Science Center Resource Assessment and Conservation Engineering (AFSC/RACE) Groundfish Assessment Program (GAP) standard summer bottom trawl survey. Filled bars denote weighted length-weight residuals, error bars denote two standard errors.",  message = FALSE, warning = FALSE}
goa_ann_mean_resid_df$display_name <- akfishcondition::set_plot_order(goa_ann_mean_resid_df$common_name, region = "GOA")

fig2 <- ggplot() + 
  geom_bar(data = goa_ann_mean_resid_df, 
               aes(x = year, 
                   y = mean_wt_resid), 
           stat = "identity", 
           fill = "plum", 
           color = "black",
           width = 0.8) +
  geom_errorbar(data = goa_ann_mean_resid_df, 
               aes(x = year, 
                   ymax = mean_wt_resid + 2*se_wt_resid,
                   ymin = mean_wt_resid - 2*se_wt_resid),
           width = 0.8) +
  geom_hline(yintercept = 0) +
    # geom_point(data = old_indicator_dat, 
    #          aes(x = year, 
    #              y = ymeans)) +
  facet_wrap(~display_name, ncol = 2, scales = "free_y") +
  scale_x_continuous(name = "Year") +
  scale_y_continuous(name = "Length-weight residual (ln(g))") +
  theme_condition_index()
print(fig2)
png(here::here("plots", "GOAbyyear.png"),width=6,height=7,units="in",res=300)
print(fig2 + theme_pngs())
dev.off()

The general patterns of above and below average residual body condition index across recent survey years for the GOA as described above were also apparent in the spatial condition indicators across INPFC strata (Figure 3). The relative contribution of stratum-specific residual body condition to the overall trends (indicated by the height of each colored bar segment) does not demonstrate a clear pattern. Although, for many species, the direction of residual body condition (positive or negative) was synchronous among strata within years. For example, residual body condition for small pollock (100--250 mm) in Shumagin and Southeast were positive while other locations trended negative. Residual body condition for southern rock sole in Yakutat and Southeast were also positive, while the rest of the regions trended negative. While Pacific cod residuals trended negative again, residual body condition in the Kodiak strata remained positive. All other fish residual body condition was negative across all strata. Patterns of fish distribution are also apparent in the stratum condition indexes. For example, northern rockfish have primarily been collected from the Shumagin and Chirikof strata in recent surveys.

```rFigure 3. Residual body condition index for seven Gulf of Alaska groundfish species collected on the National Marine Fisheries Service (NMFS) Alaska Fisheries Science Center Resource Assessment and Conservation Engineering (AFSC/RACE) Groundfish Assessment Program (GAP) standard summer bottom trawl survey (1984--2021) grouped by International North Pacific Fisheries Commission (INPFC) statistical sampling strata.", message = FALSE, warning = FALSE} goa_stratum_resids_df$display_name <- akfishcondition::set_plot_order(goa_stratum_resids_df$common_name, region = "GOA") fig3 <- ggplot(data = goa_stratum_resids_df, aes(x = year, y = stratum_resid_mean, fill = set_stratum_order(trimws(inpfc_stratum), region = "GOA"))) + geom_hline(yintercept = 0) + geom_bar(stat = "identity", color = "black", position = "stack", width = 0.8) + facet_wrap(~display_name, ncol = 2, scales = "free_y") + scale_x_continuous(name = "Year") + scale_y_continuous(name = "Length-weight residual (ln(g))") + scale_fill_brewer(name = "Stratum", palette = "BrBG") + theme_condition_index() print(fig3)

```r
png(here::here("plots", "goa_condition_by_stratum.png"),width=6,height=7,units="in",res=300)
print(fig3 + theme_pngs())
dev.off()

for(i in 1:length(unique(goa_stratum_resids_df$display_name))) {

  png(paste0("./plots/GOA_condition_", gsub(">", "gt", unique(goa_stratum_resids_df$display_name)[i]), ".png"), width = 6, height = 7, units = "in", res = 300)
  print(
    ggplot(data = goa_stratum_resids_df %>% 
             dplyr::filter(display_name == unique(goa_stratum_resids_df$display_name)[i]),
           aes(x = year, 
               y = stratum_resid_mean, 
               fill = set_stratum_order(trimws(inpfc_stratum), region = "GOA"),
               ymin = stratum_resid_mean - 2*stratum_resid_se,
               ymax = stratum_resid_mean + 2*stratum_resid_se)) +
      geom_hline(yintercept = 0) +
      geom_bar(stat = "identity", color = "black", position = "stack", width = 0.8) +
      geom_errorbar(width = 0.8) +
      facet_wrap(~set_stratum_order(trimws(inpfc_stratum), region = "GOA"), 
                 ncol = 2, 
                 scales = "free_y") +
      ggtitle(unique(goa_stratum_resids_df$display_name)[i]) +
      scale_x_continuous(name = "Year") +
      scale_y_continuous(name = "Length-weight residual (ln(g))") +
      scale_fill_brewer(name = "Stratum", palette = "BrBG", drop = FALSE) +
      theme_pngs() + 
      theme(legend.position = "none",
            title = element_text(hjust = 0.5)))
  dev.off()
}

Factors causing observed trends: Factors that could affect residual fish body condition presented here include temperature, trawl survey timing, stomach fullness, movement in or out of the survey area, or variable somatic growth. Following an unprecedented warming event from 2014--2016 (Bond et al., 2015; Stabeno et al., 2019; Barbeaux et al., 2020), there has been a general trend of warming ocean temperatures in the survey area and sea surface temperature anomaly data continue to reflect temperatures above average historical conditions through 2021 (NOAA 2021); these warmer temperatures could be affecting fish growth conditions in this region. Changing ocean conditions along with normal patterns of movement can cause the proportion of the population resident in the sampling area during the annual bottom trawl survey to vary. Recorded changes attributed to the marine heatwave included species abundances, sizes, growth rates, weight/body condition, reproductive success, and species composition (Suryan et al., 2021). Warmer ocean temperatures can lead to lower energy (leaner) prey, increased metabolic needs of younger fish, and therefore slower growth for juveniles, as observed in Pacific cod (Barbeaux et al., 2020). Additionally, spatial and temporal trends in fish growth over the season become confounded with survey progress since the first length-weight data are generally collected in late May and the bottom trawl survey is conducted throughout the summer months moving from west to east. In addition, spatial variability in residual condition may also reflect local environmental features which can influence growth and prey availability in the areas surveyed (e.g., warm core eddies in the central GOA; Atwood et al., 2010). The fish condition computations presented here begin to, but do not wholly, account for spatio-temporal trends in the data contributed by survey sampling logistics nor do they resolve sources of variability in the underlying populations.

Implications: Variations in body condition likely have implications for fish survival. In Prince William Sound, the condition of herring prior to the winter may influence their survival (Paul and Paul, 1999). The condition of GOA groundfish may similarly contribute to survival and recruitment. As future years are added to the time series, the relationship between length-weight residuals and subsequent survival will be examined further. It is important that residual body condition for most species in these analyses was computed for all sizes and sexes combined. Requirements for growth and survivorship differ for different fish life stages and some species have sexually dimorphic or even regional growth patterns. It may be more informative to examine life-stage (e.g., early juvenile, subadult, and adult phases) and sex-specific body condition in the future.

The trend toward lowered body condition for many GOA species over the last three to four RACE/AFSC GAP bottom trawl surveys is a potential cause for concern. It could indicate poor overwinter survival or may reflect the influence of locally changing environmental conditions depressing fish growth, local production, or survivorship. Indications are that the Warm Blob (Bond et al., 2015; Stabeno et al., 2019) has been followed by subsequent years with elevated water temperatures (e.g., Barbeaux et al., 2020; NOAA, 2021) which may be related to changes in fish condition in the species examined. As we continue to add years of fish condition to the record and expand on our knowledge of the relationships between condition, growth, production, and survival, we hope to gain more insight into the overall health of fish populations in the GOA.

Research priorities: Due to programmatic constraints, we did not transition the groundfish condition indicator to use a spatio-temporal model with spatial random effects (VAST) in 2021. Efforts are underway to redevelop the groundfish condition indicator for next year's (2022) ESR, using a spatio-temporal model with spatial random effects (VAST; Thorson and Barnett, 2017) and this change should provide more precise biomass expansion, improved estimates of uncertainty, and should better account for spatial-temporal variation in length-weight samples from bottom trawl surveys. Revised indicators will be presented alongside a retrospective analysis to compare the current condition indicator to a VAST-based condition indicator. In addition, research is presently being planned to explore standardization of statistical methods for calculating condition indicators, and to examine relationships among morphometric condition indicators, bioenergetic indicators, and physiological measures of fish condition (Hurst et al., 2021). The Condition Congress Steering Committee provided four recommendations for the future of fish condition research at AFSC: intercalibration of existing condition indices, development of projects to link physiological measurements of condition to demographic outcomes, management-directed research, and standardizing formulation and description of metrics (Hurst et al. 2021). Future research priorities should consider this provided guidance.



sean-rohan-NOAA/akfishcondition documentation built on June 9, 2025, 3:54 p.m.