gadget-framework / gadget3

TMB-based gadget implemtation
GNU General Public License v2.0
8 stars 6 forks source link

Look at spawning model in stock synthesis #136

Open lentinj opened 6 months ago

lentinj commented 6 months ago

Have a look at the SS3 spawning model, see if we could incorporate some of it in gadget3.

@bthe did you have a link to anything high-level, or would it need rummaging through the code?

https://repository.library.noaa.gov/view/noaa/23884/noaa_23884_DS1.pdf page 98 onwards (search for "ricker")

lentinj commented 6 months ago

Will has already had a go at this here:

https://github.com/gadget-framework/spatial-stock-assessment-workshop/blob/main/MODEL/g3/spawn_helpers.R

Needs some checking, but these could be adapted into functions to go into gadget3:

g3a_spawn_recruitment_bevertonholt_ss3 <- function (
         h = g3_parameterized('srr_h', by_stock = by_stock),
         R0 = g3_parameterized('R0', by_stock = by_stock),
         B0 = g3_parameterized('B0', by_stock = by_stock),
         by_stock = TRUE) {
     list(
         s = quote( sum(stock_ss(stock__wgt) *
stock_ss(stock__spawningnum)) ),
         r = ~B0 * (1L - h) + s * (5L * h - 1) - s )
}