timjmiller / wham

State-space, age-structured fish stock assessment model
https://timjmiller.github.io/wham
Other
32 stars 16 forks source link

prepare_wham_input does not use several values from ASAP3 data file #23

Closed brianstock-NOAA closed 4 years ago

brianstock-NOAA commented 4 years ago

ASAP3 data files have an entry for which ages to average F over to report total F, e.g.

# Age Range for Average F
3  5

Line 474 of prepare_wham_input does not use this:

data$Fbar_ages = 1:data$n_ages
brianstock-NOAA commented 4 years ago

Probably should also initialize NAA and F in first year at the values listed in the asap3 file:

input$data$Fbar_ages = seq(asap3$dat$Frep_ages[1], asap3$dat$Frep_ages[2])
input$par$log_N1_pars = log(asap3$dat$N1_ini)
input$par$log_F1 = log(asap3$dat$F1_ini)
brianstock-NOAA commented 4 years ago

Fixed in 70a698ef4b96abacb9043ddc930066b7711f51de. NAA in first year (input$par$log_N1_pars), F in first year (input$par$log_F1), and q (input$par$logit_q) are now initialized at values from asap3 file. Ages to average F over (input$data$Fbar_ages) is also now taken from asap3 file.

brianstock-NOAA commented 4 years ago

Also ce98e17971fa68738edba140145fa99d14256e70: if using mean recruitment (no SR function), initialize R0 at initial NAA-1.