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
38 stars 16 forks source link

Add more detail for "catches" warning #600

Closed iantaylor-NOAA closed 5 months ago

iantaylor-NOAA commented 5 months ago

The warning message here https://github.com/nmfs-ost/ss3-source-code/blob/aab179cd2062b6bde522733928ca94363f22d8d7/SS_expval.tpl#L492-L496 produces warnings like Warning 6 : 1 28 -3.07797e+10 catches -1.45154e+11 -3.95673e+10 -2.78354e+10 -3.80826e+10 -1.03808e+10 -7.30288e+09 which are not as informative as other warnings. It would be helpful to provide more detail on the reason for the warning (which seems to be negative value for the expected discards) as well as what steps might be taken to fix the problem.

Model shared with @Rick-Methot-NOAA by email.

Rick-Methot-NOAA commented 5 months ago

True that this warning is quite uninformative without looking at the code that generates it, and the information about the location in the code does not appear in the warning! So, improvements will be made.

The warning is generated when SS3 calculates discarded catch to be negative. SS3 gets discard by substracting retained catch from total encountered catch. The six values shown are: Enc_Catch_B Dead_Catch_B Retain_Catch_B Enc_Catch_N Dead_Catch_N Retain_Catch_N. Dead catch is retained catch plus the dead fraction of the discarded catch. But the displayed line is showing all of them to be negative, so something else must be incorrect about the model inputs.