require(knitr)
  knitr::opts_chunk$set(
    root.dir = data_root,
    echo = FALSE,
    out.width="6.2in",
#     dev.args = list(type = "cairo"),
    fig.retina = 2,
    dpi=192
  )

  # inits and data loading (front load all required data)

  require(aegis)

  year.assessment = params$year.assessment
  year_previous = year.assessment - 1
  p = bio.snowcrab::load.environment( year.assessment=year.assessment )
  SCD = project.datadirectory("bio.snowcrab")
  media_loc = params$media_loc

  # fishery_model_results = file.path( "/home", "jae", "projects", "dynamical_model", "snowcrab", "outputs" )
  fishery_model_results = file.path( SCD, "fishery_model" )

  sn_env = snowcrab_load_key_results_to_memory( year.assessment, debugging=params$debugging, loc_dde=params$loc_dde, return_as_list=TRUE  ) 

  attach(sn_env)

  # predator diet data
  diet_data_dir = file.path( SCD, "data", "diets" )
  require(data.table) # for speed
  require(lubridate)
  require(stringr) 
  require(gt)  # table formatting
  library(janitor)
  require(ggplot2)
  require(aegis) # map-related 
  require(bio.taxonomy)  # handle species codes

  # assimilate the CSV data tables:
  # diet = get_feeding_data( diet_data_dir, redo=TRUE )  # if there is a data update
  diet = get_feeding_data( diet_data_dir, redo=FALSE )
  tx = taxa_to_code("snow crab")  
  # matching codes are 
  #  spec    tsn                  tx                   vern tx_index
  #1  528 172379        BENTHODESMUS           BENTHODESMUS     1659
  #2 2522  98427        CHIONOECETES SPIDER QUEEN SNOW UNID      728
  #3 2526  98428 CHIONOECETES OPILIO        SNOW CRAB QUEEN      729
  # 2 and 3 are correct

  snowcrab_predators = diet[ preyspeccd %in% c(2522, 2526), ]  # n=159 oservations out of a total of 58287 observations in db (=0.28% of all data)
  snowcrab_predators$Species = code_to_taxa(snowcrab_predators$spec)$vern
  snowcrab_predators$Predator = factor(snowcrab_predators$Species)

  counts = snowcrab_predators[ , .(Frequency=.N), by=.(Species)]
  setorderv(counts, "Frequency", order=-1)

  # species composition
  psp = speciescomposition_parameters( yrs=p$yrs, runlabel="1999_present" )
  pca = speciescomposition_db( DS="pca", p=psp )  

  pcadata = as.data.frame( pca$loadings )
  pcadata$vern = stringr::str_to_title( taxonomy.recode( from="spec", to="taxa", tolookup=rownames( pcadata ) )$vern )

  # bycatch summaries
  o_cfaall = observer.db( DS="bycatch_summary", p=p,  yrs=p$yrs, region="cfaall" )
  o_cfanorth = observer.db( DS="bycatch_summary", p=p,  yrs=p$yrs, region="cfanorth" )   
  o_cfasouth = observer.db( DS="bycatch_summary", p=p,  yrs=p$yrs, region="cfasouth" )   
  o_cfa4x = observer.db( DS="bycatch_summary", p=p,  yrs=p$yrs, region="cfa4x" )   

Components of Snow Crab status in Maritimes Region {.c}

Life history {.c}

Life history {.c}

fn1=file.path( media_loc, "snowcrab_zoea.png" )
fn2=file.path( media_loc, "snowcrab_male.png" )
fn3=file.path( media_loc, "snowcrab_male_and_female.png" )
knitr::include_graphics( c(fn1, fn2, fn3) ) 
# \@ref(fig:photos)  

Life history: stages{.c}

loc = file.path( Sys.getenv("HOME"), "projects", "dynamical_model", "snowcrab", "media" )
fn1=file.path( loc, "life_history.png" )
knitr::include_graphics( fn1 ) 
# \@ref(fig:lifehistory)  

Life history: male growth stanzas {.c}

loc = file.path( Sys.getenv("HOME"), "projects", "dynamical_model", "snowcrab", "media" )
fn1=file.path( loc, "life_history_male.png" )
knitr::include_graphics( fn1 ) 
# \@ref(fig:lifehistory_male)  

Life history: growth modes{.c}

loc = file.path( Sys.getenv("HOME"), "bio.data", "bio.snowcrab", "output" )
fn1=file.path( loc, "size_structure", "growth_summary.png" )
knitr::include_graphics( c(fn1) ) 
# \@ref(fig:lifehistory_male)  

Life history: notable traits

Life history: movement (mark-recapture) {.c}

\begin{small} \begin{columns} \begin{column}{.48\textwidth}

fn1=file.path( media_loc, "movement0.png" )
fn2=file.path( media_loc, "movement.png" )
knitr::include_graphics( c(fn1, fn2) ) 
# \@ref(fig:movementtracks)  

\end{column}

\begin{column}{.48\textwidth}

fn1=file.path( media_loc, "snowcrab_movement_distances.png" )
fn2=file.path( media_loc, "snowcrab_movement_rates.png" )
knitr::include_graphics( c(fn1, fn2) ) 
# \@ref(fig:movement)  

\end{column} \end{columns} \end{small}

Life history: clustering {.c}

\begin{small} \begin{columns} \begin{column}{.48\textwidth} ```r aggregation for moulting and migration and Alaska red king crab \emph{Paralithodes camtschaticus} aggregation in Alaska for egg release, migrations.' } fn1=file.path( media_loc, "australian_leptomithrax_gaimardii.png" ) fn2=file.path( media_loc, "kingcrab_aggregation.png" ) knitr::include_graphics( c(fn1, fn2 ) )

\@ref(fig:aggregation)

- *Other* crab species show "Mounding" for protection from predation (larval, moulting and females)

- Narrow habitat preferences force them to move and cluster when environment is poor
\end{column}

\begin{column}{.48\textwidth}
```r
fn = file.path(p$project.outputdir, "maps", "map_highdensity_locations.png" )
knitr::include_graphics( fn ) 
# \@ref(fig:aggregation)  
if (0) {
    # high density locations directly from databases
    M = snowcrab.db( DS="set.complete", p=p ) 
    setDT(M)
    i = which(M$totno.all > 2.5*10^5)
    H = M[i, .( plon, plat, towquality, dist, distance, surfacearea, vessel, yr, z, julian, no.male.all, no.female.all, cw.mean, totno.all, totno.male.imm, totno.male.mat, totno.female.imm, totno.female.mat, totno.female.primiparous, totno.female.multiparous, totno.female.berried)]
    H$log10density = log10(H$totno.all)
    library(ggplot2)
    cst = coastline_db( p=p, project_to=st_crs(pg) ) 
    isodepths = c(100, 200, 300)
    isob = isobath_db( DS="isobath", depths=isodepths, project_to=st_crs(pg))
    isob$level = as.factor( isob$level)
    plt = ggplot() +
      geom_sf( data=cst, show.legend=FALSE ) +
      geom_sf( data=isob, aes( alpha=0.1, fill=level), lwd=0.1, show.legend=FALSE) +
    geom_point(data=H, aes(x=plon, y=plat, colour=log10density), size=5) +
      coord_sf(xlim = c(270, 940 ), ylim = c(4780, 5200 )) +
    theme(legend.position=c(0.08, 0.8)) 
    png(filename=fn, width=1000,height=600, res=144)
      (plt)
    dev.off()
}

\begin{block}{Uncertainty} Historical snow crab high density locations
\end{block} \end{column} \end{columns} \end{small}

Ecosystem change

Ecosystem change: Predators {.c}

Ecosystem change: Predators - Atlantic Halibut {.c}

include_graphics( file.path( SCD, 'assessments', year.assessment, 'timeseries', 'survey', 'ms.no.30.pdf') )
# \@ref(fig:halibut-timeseries)

Ecosystem change: Predators - Atlantic Halibut ... {.c}

loc = file.path( SCD, 'output', 'maps', 'survey', 'snowcrab', 'annual', 'bycatch', 'ms.no.30' )
yrsplot = setdiff( year.assessment + c(0:-9), 2020)
fn4 = file.path( loc, paste( 'ms.no.30', yrsplot[4], 'png', sep='.') )
fn3 = file.path( loc, paste( 'ms.no.30', yrsplot[3], 'png', sep='.') )
fn2 = file.path( loc, paste( 'ms.no.30', yrsplot[2], 'png', sep='.') )
fn1 = file.path( loc, paste( 'ms.no.30', yrsplot[1], 'png', sep='.') )
include_graphics( c(  fn3, fn2, fn1) )
# \@ref(fig:halibut-map)  

\begin{block}{Uncertainty} Higher predation mortality seems likely (more encounters with warmer-water species) \end{block}

Ecosystem change: Predators - Thorny skate {.c}

include_graphics( file.path( SCD, 'assessments', year.assessment, 'timeseries', 'survey', 'ms.no.201.pdf') )
# \@ref(fig:thornyskate-timeseries)

Ecosystem change: Predators - Thorny skate ... {.c}

loc = file.path( SCD, 'output', 'maps', 'survey', 'snowcrab', 'annual', 'bycatch', 'ms.no.201' )
yrsplot = setdiff( year.assessment + c(0:-9), 2020)
fn4 = file.path( loc, paste( 'ms.no.201', yrsplot[4], 'png', sep='.') )
fn3 = file.path( loc, paste( 'ms.no.201', yrsplot[3], 'png', sep='.') )
fn2 = file.path( loc, paste( 'ms.no.201', yrsplot[2], 'png', sep='.') )
fn1 = file.path( loc, paste( 'ms.no.201', yrsplot[1], 'png', sep='.') )
include_graphics( c(  fn3, fn2, fn1) )
# \@ref(fig:thornyskate-map)  

\begin{block}{Uncertainty} Higher predation mortality seems likely (more encounters with warmer-water species) \end{block}

Ecosystem change: Co-occurring - Northern shrimp {.c}

include_graphics( file.path( SCD, 'assessments', year.assessment, 'timeseries', 'survey', 'ms.no.2211.pdf') )
# \@ref(fig:Shrimp-timeseries)

Ecosystem change: Co-occurring - Northern shrimp ... {.c}

loc = file.path( SCD, 'output', 'maps', 'survey', 'snowcrab', 'annual', 'bycatch', 'ms.no.2211' )
yrsplot = setdiff( year.assessment + c(0:-9), 2020)
fn4 = file.path( loc, paste( 'ms.no.2211', yrsplot[4], 'png', sep='.') )
fn3 = file.path( loc, paste( 'ms.no.2211', yrsplot[3], 'png', sep='.') )
fn2 = file.path( loc, paste( 'ms.no.2211', yrsplot[2], 'png', sep='.') )
fn1 = file.path( loc, paste( 'ms.no.2211', yrsplot[1], 'png', sep='.') )
include_graphics( c( fn3, fn2, fn1) )
# \@ref(fig:Shrimp-map)  

Shrimp with similar habitat preferences have declined, possibly due to large-scaled habitat variations and predation.

\begin{block}{Uncertainty} Sampling was incomplete in 2020 and 2022 in S-ENS. \end{block}

Ecosystem change: species composition

spc_loc = file.path( data_root, 'aegis', 'speciescomposition', 'maps', '1999_present' )
fn1 = file.path( spc_loc, 'speciescomposition_pca1_spatial_effect.png') 
fn2 = file.path( spc_loc, 'speciescomposition_pca2_spatial_effect.png')
ts_loc = file.path( data_root, 'aegis', 'speciescomposition', 'figures' )
fn3 = file.path( ts_loc, 'pca1_timeseries.png') 
fn4 = file.path( ts_loc, 'pca2_timeseries.png') 
knitr::include_graphics( c(fn1,  fn3  ) ) 
# \@ref(fig:habitat3)  

\begin{block}{Uncertainty} Sampling was incomplete in 2020 and 2022 in S-ENS. \end{block}

Ecosystem change: Bottom Temperature {.c}

knitr::include_graphics( file.path( SCD, 'assessments', year.assessment, 'timeseries', 'survey', 't.pdf') )
# \@ref(fig:bottom-temperatures-survey)

\begin{block}{Uncertainty} Sampling was incomplete in 2020 and 2022 in S-ENS. \end{block}

Ecosystem change: Bottom Temperature ... {.c}

Ecosystem considerations: Bottom Temperature ... {.c}

loc = file.path( data_root, 'aegis', 'temperature', 'maps', '1999_present' )
yrsplot =  year.assessment + c(0:-10)
fn10 = file.path( loc, paste( 'Bottom-temperature-',  yrsplot[10], '-0.75',  '.png', sep='') )
fn9  = file.path( loc, paste( 'Bottom-temperature-',  yrsplot[9],  '-0.75',  '.png', sep='') )
fn8  = file.path( loc, paste( 'Bottom-temperature-',  yrsplot[8],  '-0.75',  '.png', sep='') )
fn7  = file.path( loc, paste( 'Bottom-temperature-',  yrsplot[7],  '-0.75',  '.png', sep='') )
fn6  = file.path( loc, paste( 'Bottom-temperature-',  yrsplot[6],  '-0.75',  '.png', sep='') )
fn5  = file.path( loc, paste( 'Bottom-temperature-',  yrsplot[5],  '-0.75',  '.png', sep='') )
fn4  = file.path( loc, paste( 'Bottom-temperature-',  yrsplot[4],  '-0.75',  '.png', sep='') )
fn3  = file.path( loc, paste( 'Bottom-temperature-',  yrsplot[3],  '-0.75',  '.png', sep='') )
fn2  = file.path( loc, paste( 'Bottom-temperature-',  yrsplot[2],  '-0.75',  '.png', sep='') )
fn1  = file.path( loc, paste( 'Bottom-temperature-',  yrsplot[1],  '-0.75',  '.png', sep='') )
knitr::include_graphics( c(  fn3, fn2, fn1) )
# \@ref(fig:bottom-temperatures-map)
# *Spatial variations in bottom temperature estimated from a historical analysis of temperature data for 1 September.*

\begin{block}{Uncertainty} * Groundfish surveys were not conducted in 2020 and 2022 in the snow crab domain.

Ecosystem considerations: Bottom Temperature ... {.c}

Persistent spatial gradient of almost $15^\circ$C in bottom temperatures in the Maritimes Region.

Variable due to confluence of the warm, high salinity Gulf Stream from the S-SE along the shelf edge; cold, low salinity Labrador Current; and cold low salinity St. Lawrence outflow from the N-NE, as well as a nearshore Nova Scotia current, running from the NE.

loc = file.path( data_root, 'aegis', 'temperature', 'maps', '1999_present' )
knitr::include_graphics( file.path( loc, 'Predicted_habitat_probability_persistent_spatial_effect.png') )
# \@ref(fig:bottom-temperatures-spatialeffect)

Ecosystem considerations: Bottom Temperature ... {.c}

\begin{columns} \begin{column}{.6\textwidth}

knitr::include_graphics( file.path( SCD, 'assessments', year.assessment, 'timeseries', 'temperature_bottom.pdf') )
# \@ref(fig:bottom-temperatures)

\end{column} \begin{column}{.4\textwidth}

\vspace{12mm}

\begin{footnotesize} \textbf{Figure}: Temporal variations in bottom temperature estimated from a historical analysis of temperature data. Red horizontal line is at $7^\circ$C. Presented are 95\% Credible Intervals of spatial variability in temperature at each time slice, after adjustment for spatiotemporal autocorrelation. \end{footnotesize} \end{column} \end{columns}

Human interactions

Human interactions: Every known population is exploited worldwide {.c}

Human interactions: Management Approach

\begin{columns} \begin{column}{.46\textwidth} \begin{tiny}

loc = file.path( Sys.getenv("HOME"), "projects", "dynamical_model", "snowcrab", "media" )
fn1=file.path( loc, "area_map.png" )
knitr::include_graphics( fn1 ) 
# \@ref(fig:area_map)  

\end{tiny} \end{column} \begin{column}{.52\textwidth} \begin{footnotesize} \begin{itemize} \item Precautionary Approach, Fish Stock Provisions, 2022 \item Spatial refugia (slope edge, MPAs) \item Temporal refugia (fishing seasons) \item Biological refugia: most life stages protected \begin{itemize} \begin{scriptsize} \item Conservative exploitation since mid-2000s \item Spawning stock legally and completely protected \item Market-driven protection for 10+ yrs
\end{scriptsize} \end{itemize} \item Evidence-based decision making: trawl survey, assessment \item Distributed knowledge network: traditional, historical, scientific
\item Satellite VMS; biodegradeable mesh (ghost-fishing); weighted lines (entanglement), etc ... \end{itemize} \end{footnotesize} \end{column} \end{columns}

Human interactions: Fishing effort {.c}

Similar between r year.assessment and r year_previous in terms of spatial distribution. In S-ENS, there was, however, a minor spatial contraction to inshore areas and away from the area 23-24 boundary.

\begin{tiny}

loc0= file.path( SCD, "output", "maps", "logbook", "snowcrab", "annual", "effort" )
fn1 = file.path( loc0, paste( "effort", year_previous,   "png", sep=".") ) 
fn2 = file.path( loc0, paste( "effort", year.assessment, "png", sep=".") ) 
include_graphics(  c(fn1, fn2) )
#  \@ref(fig:landings-map) 

\end{tiny}

Human interactions: Fishing effort ... {.c}

\begin{tiny}

fn1=file.path( SCD, "assessments", year.assessment, "timeseries", "fishery",   "effort.ts.pdf" )
knitr::include_graphics( fn1 ) 
# \@ref(fig:effort-timeseries)  

\end{tiny}

Human interactions: Fishery landings and TACs {.c}

\begin{tiny}

loc0= file.path( SCD, "output", "maps", "logbook", "snowcrab", "annual", "landings" )
fn1 = file.path( loc0, paste( "landings", year_previous,   "png", sep=".") ) 
fn2 = file.path( loc0, paste( "landings", year.assessment, "png", sep=".") ) 
knitr::include_graphics( c(fn1, fn2 ) )
#  \@ref(fig:landings-map)  

\end{tiny}

Human interactions: Fishery landings and TACs ... {.c}

In 2022, landings in all areas were below respective TACs.

\begin{tiny}

include_graphics( file.path( SCD, "assessments", year.assessment, "timeseries", "fishery",   "landings.ts.pdf" ) )
# \@ref(fig:landings-timeseries)

\end{tiny}

Human interactions: Fishery catch rates

loc0= file.path( SCD, "output", "maps", "logbook", "snowcrab", "annual", "cpue" )
fn1 = file.path( loc0, paste( "cpue", year_previous,   "png", sep=".") ) 
fn2 = file.path( loc0, paste( "cpue", year.assessment, "png", sep=".") ) 
knitr::include_graphics( c(fn1, fn2 ) )
# \@ref(fig:cpue-map)  

Human interactions: Fishery catch rates ...

\begin{tiny}

include_graphics( file.path( SCD, "assessments", year.assessment, "timeseries", "fishery",   "cpue.ts.pdf" ) ) 
# \@ref(fig:cpue-timeseries)  

\end{tiny}

Human interactions: At-Sea-Observed information

\begin{tiny}

loc = file.path( SCD, "output", "maps", "observer.locations" )
yrsplot = year.assessment + c(0:-4)
fn4 = file.path( loc, paste( "observer.locations", yrsplot[4], "png", sep=".") )
fn3 = file.path( loc, paste( "observer.locations", yrsplot[3], "png", sep=".") )
fn2 = file.path( loc, paste( "observer.locations", yrsplot[2], "png", sep=".") )
fn1 = file.path( loc, paste( "observer.locations", yrsplot[1], "png", sep=".") )
include_graphics( c( fn4, fn3, fn2, fn1) )
# \@ref(fig:observer-locations-map)   

\end{tiny}

\vspace{5mm}

Bycatch: last assessment was in 2017 and levels were << 1% by weight.

Stock status {.c}

Stock status: survey {.c}

\begin{tiny}

loc = file.path( SCD, "output", "maps", "survey.locations" )
yrsplot = setdiff( year.assessment + c(0:-9), 2020)
fn6 = file.path( loc, paste( "survey.locations", yrsplot[6], "png", sep=".") )
fn5 = file.path( loc, paste( "survey.locations", yrsplot[5], "png", sep=".") )
fn4 = file.path( loc, paste( "survey.locations", yrsplot[4], "png", sep=".") )
fn3 = file.path( loc, paste( "survey.locations", yrsplot[3], "png", sep=".") )
fn2 = file.path( loc, paste( "survey.locations", yrsplot[2], "png", sep=".") )
fn1 = file.path( loc, paste( "survey.locations", yrsplot[1], "png", sep=".") )
include_graphics( c(fn3, fn2, fn1) )
# \@ref(fig:survey-locations-map)  

\end{tiny}

Stock status: Viable Habitat ... {.c}

loc = file.path( SCD, 'modelled', '1999_present_fb', 'predicted.presence_absence' )
yrsplot =  year.assessment + c(0:-10)
fn10 = file.path( loc, paste( 'Predicted_presence_absence_', yrsplot[10], '.png', sep='') )
fn9 = file.path( loc, paste( 'Predicted_presence_absence_', yrsplot[9], '.png', sep='') )
fn8 = file.path( loc, paste( 'Predicted_presence_absence_', yrsplot[8], '.png', sep='') )
fn7 = file.path( loc, paste( 'Predicted_presence_absence_', yrsplot[7], '.png', sep='') )
fn6 = file.path( loc, paste( 'Predicted_presence_absence_', yrsplot[6], '.png', sep='') )
fn5 = file.path( loc, paste( 'Predicted_presence_absence_', yrsplot[5], '.png', sep='') )
fn4 = file.path( loc, paste( 'Predicted_presence_absence_', yrsplot[4], '.png', sep='') )
fn3 = file.path( loc, paste( 'Predicted_presence_absence_', yrsplot[3], '.png', sep='') )
fn2 = file.path( loc, paste( 'Predicted_presence_absence_', yrsplot[2], '.png', sep='') )
fn1 = file.path( loc, paste( 'Predicted_presence_absence_', yrsplot[1], '.png', sep='') )
include_graphics( c(  fn3, fn2, fn1) )
# \@ref(fig:fb-habitat-map)  
# *Figure XXX. Habitat viability (probability; fishable Snow Crab)* 

Stock status: Viable Habitat ... {.c}

loc = file.path( SCD, 'modelled', '1999_present_fb', 'aggregated_habitat_timeseries' )
include_graphics( file.path( loc, 'habitat_M0.png') )
# \@ref(fig:fb-habitat-timeseries)

Stock status: Sex ratios (proportion female, mature)

\begin{small} \begin{columns} \begin{column}{.48\textwidth}

\vspace{2mm} \begin{itemize} \item Mostly male-dominated: larger size may be protective against predation? \item Imbalance indicates differential mortality: predation, competition and fishing \item In 4X, sex ratios are balanced.
\end{itemize} \end{column} \begin{column}{.48\textwidth}

include_graphics( file.path( SCD, "assessments", year.assessment, "timeseries", "survey", "sexratio.mat.pdf") )
# \@ref(fig:sexratio-mature)

\end{column} \end{columns} \end{small}

yrsplot = setdiff( year.assessment + c(0:-4), 2020)
loc = file.path( SCD, "output", "maps", "survey", "snowcrab", "annual", "sexratio.mat" )
fn4 = file.path( loc, paste( "sexratio.mat", yrsplot[4], "png", sep=".") )
fn3 = file.path( loc, paste( "sexratio.mat", yrsplot[3], "png", sep=".") )
fn2 = file.path( loc, paste( "sexratio.mat", yrsplot[2], "png", sep=".") )
fn1 = file.path( loc, paste( "sexratio.mat", yrsplot[1], "png", sep=".") )
include_graphics( c( fn3, fn2, fn1 ) )
# \@ref(fig:sexratio-map) 

Stock status: Biomass Density {.c}

Note that high and low biomass density areas fluctuate with time

\begin{tiny}

loc = file.path( SCD, 'output', 'maps', 'survey', 'snowcrab', 'annual', 'R0.mass')
yrsplot =  setdiff(year.assessment + c(0:-9), 2020 ) 
fn6 = file.path( loc, paste( 'R0.mass', yrsplot[6], 'png', sep='.') )
fn5 = file.path( loc, paste( 'R0.mass', yrsplot[5], 'png', sep='.') )
fn4 = file.path( loc, paste( 'R0.mass', yrsplot[4], 'png', sep='.') )
fn3 = file.path( loc, paste( 'R0.mass', yrsplot[3], 'png', sep='.') )
fn2 = file.path( loc, paste( 'R0.mass', yrsplot[2], 'png', sep='.') )
fn1 = file.path( loc, paste( 'R0.mass', yrsplot[1], 'png', sep='.') )
include_graphics( c(  fn3, fn2, fn1) )

\end{tiny}

Stock status: Biomass Density ... {.c}

\begin{tiny}

fn = file.path(SCD,'assessments', year.assessment, 'timeseries','survey','R0.mass.pdf')
include_graphics( c(fn) )
#\@ref(fig:fbGMTS)

\end{tiny}

Stock status: Biomass Index (aggregate)

A contraction of spatial range in 4X and the western parts of S-ENS were also evident in 2021 to 2022.

loc = file.path( SCD, 'modelled', '1999_present_fb', 'predicted_biomass_densities' )
yrsplot =  year.assessment + c(0:-10)
fn10 = file.path( loc, paste( 'biomass', yrsplot[10], 'png', sep='.') )
fn9 = file.path( loc, paste( 'biomass', yrsplot[9], 'png', sep='.') )
fn8 = file.path( loc, paste( 'biomass', yrsplot[8], 'png', sep='.') )
fn7 = file.path( loc, paste( 'biomass', yrsplot[7], 'png', sep='.') )
fn6 = file.path( loc, paste( 'biomass', yrsplot[6], 'png', sep='.') )
fn5 = file.path( loc, paste( 'biomass', yrsplot[5], 'png', sep='.') )
fn4 = file.path( loc, paste( 'biomass', yrsplot[4], 'png', sep='.') )
fn3 = file.path( loc, paste( 'biomass', yrsplot[3], 'png', sep='.') )
fn2 = file.path( loc, paste( 'biomass', yrsplot[2], 'png', sep='.') )
fn1 = file.path( loc, paste( 'biomass', yrsplot[1], 'png', sep='.') )
include_graphics( c( fn3, fn2, fn1) )

Stock status: Biomass Index (aggregate) ... {.c}

\begin{tiny}

include_graphics( file.path( SCD, 'modelled', '1999_present_fb', 'aggregated_biomass_timeseries' , 'biomass_M0.png') )
# \@ref(fig:fbindex-timeseries)

\end{tiny}

Stock status: Modelled Biomass (pre-fishery) ... {.c}

\begin{tiny}

loc = file.path( SCD, 'fishery_model', year.assessment, 'logistic_discrete_historical' )
fn1 = file.path( loc, 'plot_predictions_cfanorth.pdf' ) 
fn2 = file.path( loc, 'plot_predictions_cfasouth.pdf' ) 
fn3 = file.path( loc, 'plot_predictions_cfa4x.pdf' ) 
include_graphics(c(fn1, fn2, fn3) )
# \@ref(fig:logisticPredictions)

\end{tiny}

Stock status: Model 2 {.c}

  odir = file.path( fishery_model_results, year.assessment, "size_structured_dde_normalized" )
  fn1 = file.path( odir, "plot_predictions_everything_cfanorth.pdf" ) 
  fn2 = file.path( odir, "plot_predictions_everything_cfasouth.pdf" ) 
  fn3 = file.path( odir, "plot_predictions_everything_cfa4x.pdf" ) 
  include_graphics(c(fn1, fn2, fn3) )
  # \@ref(fig:dde-predictions-everything)

Stock status: Fishing Mortality ... {.c}

  odir = file.path( fishery_model_results, year.assessment, "logistic_discrete_historical" )
  fn1 = file.path( odir, "plot_fishing_mortality_cfanorth.pdf" ) 
  fn2 = file.path( odir, "plot_fishing_mortality_cfasouth.pdf" ) 
  fn3 = file.path( odir, "plot_fishing_mortality_cfa4x.pdf" ) 
include_graphics(c(fn1, fn2, fn3) )
# \@ref(fig:logisticFishingMortality)

Stock status: Fishery Footprint {.c}

  odir = file.path( fishery_model_results, year.assessment, "size_structured_dde_normalized" )
  fn1 = file.path( odir, "plot_trace_footprint_projections_cfanorth__1.0__.pdf" ) 
  fn2 = file.path( odir, "plot_trace_footprint_projections_cfasouth__1.0__.pdf" ) 
  fn3 = file.path( odir, "plot_trace_footprint_projections_cfa4x__1.0__.pdf" ) 
  include_graphics(c(fn1, fn2, fn3) )
  # \@ref(fig:dde-fisheryfootprint)

Stock status: Reference Points {.c}

include_graphics( file.path( params$media_loc, 'harvest_control_rules.png') ) 
# \@ref(fig:ReferencePoints)

Stock status: Reference Points ... {.c}

  odir = file.path( fishery_model_results, year.assessment, "logistic_discrete_historical" )
  fn1 = file.path( odir, 'plot_hcr_cfanorth.pdf' ) 
  fn2 = file.path( odir, 'plot_hcr_cfasouth.pdf' ) 
  fn3 = file.path( odir, 'plot_hcr_cfa4x.pdf' ) 
  include_graphics(c(fn1, fn2, fn3) )
#  \@ref(fig:logistic-hcr)

References

\begin{tiny}

Banerjee, S., Carlin, B. P., and Gelfand, A. E.. 2004. Hierarchical Modeling and Analysis for Spatial Data. Monographs on Statistics and Applied Probability. Chapman and Hall/CRC.

Besag, Julian. 1974. Spatial interaction and the statistical analysis of lattice systems. Journal of the Royal Statistical Society Series B (Methodological) 1974: 192-236.

Canada Gazette. 2022. Regulations Amending the Fishery (General) Regulations. Part II, Volume 156, Number 8.

Canada Gazette. 2016. St. Anns Bank Marine Protected Area Regulations. Canada Gazette, Part I, Vol 150, Issue 51: 4143-4149.

Choi, J.S. 2020. A Framework for the assessment of Snow Crab (Chioneocete opilio) in Maritimes Region (NAFO Div 4VWX) . DFO Can. Sci. Advis. Sec. Res. Doc. 2020/nnn. v + xxx p.

Choi, J.S. 2022. Reconstructing the Decline of Atlantic Cod with the Help of Environmental Variability in the Scotian Shelf of Canada. bioRxiv. https://doi.org/10.1101/2022.05.05.490753.

Choi, J. S., and B. C. Patten. 2001. Sustainable Development: Lessons from the Paradox of Enrichment. Ecosystem Health 7: 163–77.

Choi, Jae S., B. Cameron, K. Christie, A. Glass, and E. MacEachern. 2022. Temperature and Depth Dependence of the Spatial Distribution of Snow Crab. bioRxiv. https://doi.org/10.1101/2022.12.20.520893.

Choi, Jae S. 2023. A Multi-Stage, Delay Differential Model of Snow Crab Population Dynamics in the Scotian Shelf of Atlantic Canada. bioRxiv. https://doi.org/10.1101/2023.02.13.528296.

DFO. 2013. Integrated Fisheries Management Plan for Eastern Nova Scotia and 4X Snow Crab (Chionoecetes Opillio.)

\end{tiny}

References ...

\begin{tiny}

DFO. 2018. Stock Status Update of Atlantic Halibut (Hippoglossus hippoglossus) on the Scotian Shelf and Southern Grand Banks in NAFO Divisions 3NOPs4VWX5Zc. DFO Can. Sci. Advis. Sec. Sci. Resp. 2018/022.

Hebert M, Miron G, Moriyasu M, Vienneau R, and DeGrace P. Efficiency and ghost fishing of Snow Crab (Chionoecetes opilio) traps in the Gulf of St. Lawrence. Fish Res. 2001; 52(3): 143-153. 10.1016/S0165-7836(00)00259-9

Riebler, A., Sørbye, S.H., Simpson D., and Rue, H. 2016. An intuitive Bayesian spatial model for disease mapping that accounts for scaling. Statistical methods in medical research 25: 1145-1165.

Simpson, D., Rue, H., Riebler, A., Martins, T.G., and Sørbye, SH. 2017. Penalising Model Component Complexity: A Principled, Practical Approach to Constructing Priors. Statist. Sci. 32: 1-28.

\end{tiny}

END



jae0/snowcrab documentation built on Feb. 27, 2024, 2:42 p.m.