-
Notifications
You must be signed in to change notification settings - Fork 21
[Feature]: Add warning to avoid use of negative length for the Lmin parameter #682
Description
Issue description
The attached model simple_small_neg_length.zip replicates an issue that @gertsevv (Vlada Gertseva) and @shcaba (Jason Cope) ran into for an assessment where the length at age 0 was estimated to be negative (here I fixed L_at_Amin = -30 which caused ages 0-2 to have negative length). The Wt_Beg, Wt_Mid, Len_Mat, and MatFecund values in Biology_at_age_in_endyr all show strange values as illustrated in the plot below based on MatFecund.
I'm not sure what warnings or changes would be helpful, but a few ideas include
- add warning or error if length is negative at any age (you could still have L_at_Amin be negative if Amin is negative)
- add warning or error if length is negative at any age greater than or equal to First_Mature_Age
- change biology calculations to set maturity and fecundity equal to zero if length is negative.
Summary of issue history, discussion, and major aspects of code development
This is the first I've come across this.
Items to do
- Add warning or error
- Change biology calculations?
The new warning is added in the readcontrol tests. It is only applied to females because male parameter can legitimately be less than 0 as an offet from females.
looks like this:
Warning 4 Fatal Error! parm init value for Lmin: -10.1 cannot be less than population min length bin 10
Does documentation already exist in the SS3 User Manual?
Yes, the link to the section in the SS3 User Manual is provided below.
Documentation to add to the SS3 User Manual OR link to existing documentation
Maybe add text to the description of some of the control file settings for Amin, L_at_Amin, and/or First_Mature_Age.
Are r4ss changes needed?
No, this issue doesn't require changes to r4ss
Are SSI changes needed?
No, this issue doesn't require changes to SSI
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status
