gadget-framework / gadget2

Gadget is the Globally applicable Area Disaggregated General Ecosystem Toolbox
GNU General Public License v2.0
18 stars 20 forks source link

Specifying stocks to receive recruits when doesspawn==1 #21

Closed pfrater closed 5 years ago

pfrater commented 6 years ago

I have a 2 stock model of a single species (immature and mature) with doesspawn==1 in the mature stock. I'd like to have the mature stock spawn recruits into the immature stock, but the model only seems to work when I specify the mature stock in spawnstocksandratios (i.e. when I specify the immature stock in spawnstocksandratios, then population goes exctinct after first 2 years of model due to receiving no recruits). Here is what my spawnfile looks like with the model that does NOT work.

  ; Generated by Rgadget 0.5
  spawnsteps      1
  spawnareas      1
  firstspawnyear  1980
  lastspawnyear   2010
  spawnstocksandratios    imm     1
  proportionfunction      exponential     #mat.spawn.alpha        #mat.spawn.l50
  mortalityfunction       constant        0
  weightlossfunction      constant        0
  recruitment     bevertonholt    #mat.bh.mu      #mat.bh.lam
  stockparameters #mat.linf       #mat.k  2.1e-06 3.3437

When I change spawnstocksandratios to spawnstocksandratios mat 1 then the population of the mature stock persists, but the immature stock crashes and remains at 0 after all individuals have entered into the mature population (i.e. there are no recruits coming into the immature stock).

How do I make the mature stock spawn, but have those recruits go into the immature population?

The Gadget User Guide is vague on how to specify this. Note that I have tried the following:

spawnstocksandratios imm 1 mat 0
spawnstocksandratios imm 1
mat 0
vbartolino commented 6 years ago

From my past experience and understanding you should use: spawnstocksandratios imm 1 In this way fish should be added to the immature stock. Have you checked that fish are allowed to move from imm to mat?

A difference I can notice is that when I tried SR in my model I also used: proportionfunction constant 1

pfrater commented 6 years ago

Thanks Valerio. In the stockfile for the immature stock I have

doesmove  1
transitionstocksandratios mat 1
transitionstep  4

The first age class goes to 0 after the first year of the model, so I know it's an issue with the recruits (spawned from the mature stock) getting into the immature stock.

I've also tried it with proportionfunction constant 1 and it does not work like that either.

jmbegley commented 6 years ago

The spawn file that you have provided looks OK to me, and the tests that I have run in the past show the spawning function for a mature stock generating new recruits into an immature stock.

What are the values of the Beverton Holt parameters for your model? (#mat.bh.mu and #mat.bh.lam)?

pfrater commented 6 years ago

mat.bh.mu is 4e+08

mat.bh.lam is 1.067416e+08

I've also tweaked with the initial numbers in the mat stock to ensure a sufficient number of fish.

vbartolino commented 6 years ago

the first two parameters afters stockparameters (in the spawnfile) should be the mean length and std.dev of the recruits and not #mat.linf #mat.k

Could that be the issue?

pfrater commented 6 years ago

Okay. I've got this figured out. The parameter #mat.bh.mu was just not high enough. At 4e+08 it just wasn't adding enough fish into the stock to sustain it at all. Thanks @jmbegley. I had to increase it a few orders of magnitude to make it work.

Yes, @vbartolino, you are correct about the stockparameters. I noticed this also and had corrected it, but the problem was just related to #mat.bh.mu.

Thanks, all. Sorry for the confusion.

jmbegley commented 6 years ago

Glad you've got it sorted. Perhaps the spawner function should be altered to generate a warning message if the calculated number of recruits is too low.