Skip to contents

Validates and transforms raw assessment inputs into the complete data list consumed by sbt_model() through RTMB::MakeADFun(). The assessment dimensions are fixed at two seasons, six fisheries, and ages 0–30. Important derived fields include:

Usage

get_data(data_in)

Arguments

data_in

A named list containing the data inputs. It must include: last_yr (integer), scenarios_LL1, scenarios_surf, catch_LL1_case (integer), catch_surf_case (integer), sel_LL1_yrs, sel_LL2_yrs, sel_LL3_yrs, sel_LL4_yrs, sel_Ind_yrs, sel_Aus_yrs, and sel_CPUE_yrs, and the raw data tables length_mean, length_sd, catch, catch_UA, POPs, paly, HSPs, GTs, aerial_survey, aerial_cov, troll, cpue, age_freq, length_freq, tag_reporting, tag_releases, and tag_recaptures. Optional configuration inputs include: af_data (legacy alias for age_freq), cpue_q_yrs (absolute years where CPUE catchability blocks begin), cpue_sel_fishery (selectivity row used by the CPUE abundance index, default 7), cpue_lf_sel_fishery (selectivity row used by CPUE length-composition predictions, default 7), cpue_lf_switch (CPUE length-composition likelihood switch, default lf_switch; set to 0 to report predictions with zero likelihood contribution); M_switch (1 = direct anchors or 2 = M10-scaled length based); and the four fixed smooth-wall settings harvest_wall_strength, harvest_wall_onset, harvest_wall_ceiling, and harvest_wall_scale. Omitting all four sets them to 0, 0.85, the biological harvest-rate limit (currently 0.9), and 0.01, respectively. Thus the wall is disabled by default. Partial settings are rejected.

Value

A named list ready for RTMB::MakeADFun(). Key elements include:

n_year, n_season, n_age, n_fishery

Integer scalars defining model dimensions

catch_obs_ysf

Numeric array \[n_catch x n_season x n_fishery\] of observed catches

length_mu_ysa, length_sd_a

Length-at-age parameters

weight_fya

Numeric array \[n_fishery x n_year x n_age\] of weight-at-age in tonnes per fish

af_obs, lf_obs

Age-frequency and model-binned length-frequency observations

lf_raw

Raw length-frequency observations retained for sliced-AF diagnostics

tag_release_cta, tag_recap_ctaa

Tagging release and recapture arrays

pop_obs, hsp_obs, gt_obs

Close-kin genetics observations (POPs, HSPs, GTs)

cpue_obs, aerial_survey, aerial_cov, troll_obs

Survey indices and the processed aerial-survey covariance matrix

cpue_lfs, cpue_lf_years, cpue_n

CPUE length compositions, their model-year indices, and effective sample sizes

cpue_sel_fishery

Integer selectivity row used by the CPUE abundance index

cpue_lf_sel_fishery

Integer selectivity row used by CPUE length-composition predictions

cpue_lf_switch

Integer likelihood switch used only for CPUE length compositions

harvest_wall_strength,harvest_wall_onset, harvest_wall_ceiling,harvest_wall_scale

Validated preventive-wall settings, materialized even when omitted by the caller

Details

  • n_year: derived from first_yr and last_yr

  • n_season: set to 2

  • n_length: retained for compatibility and currently set to 1

  • n_age: derived from min_age and max_age

  • n_fishery: set to 6

  • age_a: sequence of modeled ages derived from min_age and max_age

  • length_mu_ysa: derived from the length_mean input

  • length_sd_a: derived from the length_sd input

  • dl_l: length-bin integration weights derived from length_mu_ysa and length_sd_a

  • weight_fya: derived from length_mu_ysa and length_sd_a

  • catch_obs_ysf: derived from catch, catch_UA, scenarios_LL1, and scenarios_surf

  • sel_change_year_fy: derived from sel_change_sd_fy

Assessment source tables are not bundled with sbt. Supply every source table explicitly, for example from an authorised private data release. The function performs assessment-specific alignment and consistency checks, but callers should still supply finite, nonnegative uncertainty values and preserve the row alignment of length-frequency metadata and observations. Validation failures stop before an RTMB objective is created.