Repository navigation
791 bug irregular forecast when using dynamic b0 - #792
Merged
Rick-Methot-NOAA merged 3 commits intoNov 17, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A critical issue remains: dynamic B0 forecasts with allocation groups can divide zero by zero when fisheries are disabled, producing non-finite allocation multipliers and adjusted catches.
1 open issue
What changed in this PR
This PR addresses #791 by preventing forecast catches from introducing fishing mortality into Stock Synthesis’s dynamic B0 calculations.
Changes:
- Zero fishing rates and bypass catch tuning when fisheries are disabled.
- Add conditional comment prefixes to extra standard-deviation reporting settings in generated control files.
- Clean up formatting without changing the affected predator-mortality logic.
| File | Description |
|---|---|
| SS_write.tpl | Remove a blank line in dynamic B0 output code. |
| SS_write_ssnew.tpl | Write inactive reporting settings with conditional comment prefixes. |
| SS_benchfore.tpl | Disable fishing rates and catch tuning during dynamic B0 forecasts. |
Review effort: Balanced
Rick-Methot-NOAA
deleted the
791-bug-irregular-forecast-when-using-dynamic-b0
branch
November 17, 2026 00:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Concisely describe what has been changed/addressed in the pull request.
What tests have been done?
Examine the spawnbio output in the dynamic Bzero section. Find that it now corrects the behavior noted in the issue
Where are the relevant files?
<-- - [x] No test files are required for this pull request. -->
What tests/review still need to be done?
None
Is there an input change for users to Stock Synthesis?
Additional information (optional).