nmfs-ost / ss3-source-code

The source code for Stock Synthesis (SS3).
https://nmfs-ost.github.io/ss3-website/
Creative Commons Zero v1.0 Universal
36 stars 16 forks source link

[Bug]: check length-at-age output when settlement is at age 1. #505

Closed Rick-Methot-NOAA closed 11 months ago

Rick-Methot-NOAA commented 11 months ago

Describe the bug

unexpected kink in length-at-age output when settlement is at age 1 was observed in a model at the ICES course.

To Reproduce

Expected behavior

smooth curve

Screenshots

No response

Which OS are you seeing the problem on?

Which version of SS3 are you seeing the problem on?

3.30.21

Additional Context

I could not find a problem when I checked this out using petrale model which uses Recr at age 0 and Amin = 1. Compared to a revised model that had recr at age 1 and amin at age 0 (which is relative to the age at recruitment. Calculated mean size-at-age matches at age 1 and above. Below age 1 they differ because one of the models has no fish below age 1 so assigns a mean size for those ages to be same as size at recruitment. image

Despite the comparable results, I think we should steer the community towards: spawn in year Y then recruit at age 1 in year Y+1. That is a much more common practice in other models. The SS3 usage of recruitment at age 0 was largely driven by the need to accommodate the Santa Cruz juvenile (age 0) rockfish survey. Then it got enshrined in the "simple" example. Your thoughts on this appreciated @nmfs-stock-synthesis/developers

Rick-Methot-NOAA commented 11 months ago

I did see one anomaly regarding the calc of Linf when A2 is 17 rather than 999 and recr is at age 1.

At first I suspected an error in the very complex growth logic, then realized that A2, like A1, is post-settlement. So when I changed recruitment age to 1 and A1 to 0, I also needed to change A2 from 17 to 16. With that change, I get the same size-at-age vector for both configurations. Relief! I was sweating that one.

Revised description of A2 in .ssnew is below; edit manual to match. @e-gugliotti-NOAA 0 #_Age(post-settlement) for L1 (aka Amin); first growth parameter is size at this age; linear growth below this 16 #_Age(post-settlement) for L2 (aka Amax); 999 to treat as Linf @e-gugliotti-NOAA FYI: @nmfs-stock-synthesis/developers

e-perl-NOAA commented 11 months ago

Right now the manual has the following:

1 & & Growth Amin (A1): Reference age for first size-at-age L1 (post-settlement) parameter. 
25 & & Growth Amax (A2): Reference age for second size-at-age parameter L2 (999 to use as L infinity).

Are you wanting the wording to be exactly how it is in the revised description that you put above? Something like this:

1 & & Age (post-settlement) for L1 (a.k.a. Amin). First growth parameter is the size at this age; linear growth below this.
25 & & Age (post-settlement) for L2 (a.k.a. Amax). Use 999 to treat as L infinity (Linf).
Rick-Methot-NOAA commented 11 months ago

The important change to make is to add "post-settlement" to the Amax line.