Skip to contents

Set up the data input file to be passed to MakeADFun. This function runs data cross-validation tests and appends several inputs to the data list including model dimensions and processed inputs:

Usage

get_data(data_in)

Arguments

data_in

A list containing the data inputs. 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, sel_CPUE_yrs. Optional: af_data (defaults to sbt::age_freq).

Value

A list ready to be passed to 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

af_obs, lf_obs

Age-frequency and length-frequency observations

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, troll_obs

Survey indices

Details

  • n_year: derived from first_yr and last_yr

  • n_season: set to 2

  • n_length: not in use

  • 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_yal: 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

This function produces the data input file to be passed to MakeADFun.