Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: add warning for age 0 maturity #654

Open
Rick-Methot-NOAA opened this issue Feb 3, 2025 · 1 comment
Open

[Bug]: add warning for age 0 maturity #654

Rick-Methot-NOAA opened this issue Feb 3, 2025 · 1 comment
Assignees
Labels
biology forecast in progress This is being worked on in a branch

Comments

@Rick-Methot-NOAA
Copy link
Collaborator

Rick-Methot-NOAA commented Feb 3, 2025

Describe the solution you would like.

A user with an EWAA model had mature fish occurring at age 0.
It was annual model, with spawn_seas = 1.0 and settlement also at month 1.0.
During the time series, the age 0 fish do not get created until after SSB is calculated, so the SSB does not include any age 0 fish even though they are mature.
During the forecast, the multiple loops cause the age 0 fish to get populated in the first loop and then exist in later loops, so get included in the SSB.
This needs to be detected in the code and a hard warning issued.
@alexjensen-NOAA

Describe alternatives you have considered

none obvious

Statistical validity, if applicable

NA

Describe if this is needed for a management application

yes, upcoming assessment

Additional context

No response

@Rick-Methot-NOAA Rick-Methot-NOAA added biology forecast in progress This is being worked on in a branch labels Feb 3, 2025
@Rick-Methot-NOAA Rick-Methot-NOAA self-assigned this Feb 3, 2025
@Rick-Methot-NOAA
Copy link
Collaborator Author

Rick-Methot-NOAA commented Feb 4, 2025

I added an extra write statement to test what is happening with this setup. The N at age 0 is always 0.0 during the time series when SSB is calculated, but during forecast, it is 0.0 in the first ABC_loop, then populated during that loop and that value gets used for the SSB calc for ABCloops 2 and 3. Robust logic to zero this out in each ABC_loop will be tricky because of possibility of multiple seasons and multiple settlement events.

If spawnseason was set to month 2 and recruitment also to month 2, there already is this error message (even without maturity at age 0.0):

Warning 1 Fatal Error! Cannot have spawn_time_seas after beginning of a season and settlements in the same season
++ put spawning at beginning of the season, or move settlements to next season
Also see warning.sso
Exiting SS3!

So, I will add a similar warning with month 1 if age 0 fish are mature. Unfortunately, the existing warning happens in readcontrol, but SS3 does not know at that time if maturity at age 0 is positive or not. So new warning will need to be in prelim calcs.

@iantaylor-NOAA bringing Ian into the discussion

@Rick-Methot-NOAA Rick-Methot-NOAA changed the title [Feature]: add warning for age 0 maturity [Bug]: add warning for age 0 maturity Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
biology forecast in progress This is being worked on in a branch
Projects
None yet
Development

No branches or pull requests

1 participant