From 379c7f876ba049cc0584fc0d90353094d87cd323 Mon Sep 17 00:00:00 2001 From: "Richard.Methot" <1365818351113302@mil> Date: Mon, 8 Sep 2025 13:27:41 -0700 Subject: [PATCH] fix for one year models --- SS_objfunc.tpl | 14 +++++++------- SS_popdyn.tpl | 4 +++- SS_readcontrol_330.tpl | 3 ++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/SS_objfunc.tpl b/SS_objfunc.tpl index 7d6315e3..89cb4fd7 100644 --- a/SS_objfunc.tpl +++ b/SS_objfunc.tpl @@ -1191,25 +1191,25 @@ FUNCTION void Process_STDquant() case 1: { depletion /= (depletion_level * SSB_virgin); - Mgmt_quant(19) = SSB_virgin; + if (Do_Benchmark > 0 ) Mgmt_quant(19) = SSB_virgin; break; } case 2: { depletion /= (depletion_level * Bmsy); - Mgmt_quant(19) = Bmsy; + if (Do_Benchmark > 0 ) Mgmt_quant(19) = Bmsy; break; } case 3: { depletion /= (depletion_level * SSB_yr(styr)); - Mgmt_quant(19) = SSB_yr(styr); + if (Do_Benchmark > 0 ) Mgmt_quant(19) = SSB_yr(styr); break; } case 4: { depletion /= (depletion_level * SSB_yr(endyr)); - Mgmt_quant(19) = SSB_yr(endyr); + if (Do_Benchmark > 0 ) Mgmt_quant(19) = SSB_yr(endyr); break; } case 5: // dynamic Bzero @@ -1221,13 +1221,13 @@ FUNCTION void Process_STDquant() depletion(STD_Yr_Reverse_Dep(y)) /= ( depletion_level * Extra_Std(Do_Dyn_Bzero + y - (styr - 2))); // warning< 0 ) Mgmt_quant(19) = 1.; break; } case 6: // depletion based on benchmark unfished SSB { depletion /= (depletion_level * SSB0_4_SRR); - Mgmt_quant(19) = SSB0_4_SRR; + if (Do_Benchmark > 0 ) Mgmt_quant(19) = SSB0_4_SRR; break; } } @@ -1438,7 +1438,7 @@ FUNCTION void Process_STDquant() } } } - } + } } //******************************************************************** diff --git a/SS_popdyn.tpl b/SS_popdyn.tpl index 3a65b37b..a6dcc6b8 100644 --- a/SS_popdyn.tpl +++ b/SS_popdyn.tpl @@ -130,7 +130,8 @@ FUNCTION void get_initial_conditions() Make_AgeLength_Key(s, subseas); } } - + if ( endyr > styr ) + { // SS_Label_Info_16.2.4.3 #propagate Ave_Size from early years forward until first year that has time-vary growth k = styr + 1; do @@ -147,6 +148,7 @@ FUNCTION void get_initial_conditions() t = styr + (k - styr) * nseas; Ave_Size(t, 1) = Ave_Size(t - nseas, 1); // prep for time-vary next yr } + } } if (MG_active(3) > 0) get_wtlen(); // stores values for all seasons diff --git a/SS_readcontrol_330.tpl b/SS_readcontrol_330.tpl index 1bfa9ab2..ac7ecde3 100644 --- a/SS_readcontrol_330.tpl +++ b/SS_readcontrol_330.tpl @@ -1615,8 +1615,9 @@ mgp_type(Ip, Ip + N_growparms - 1) = 2; // growth parms // check on out of bound Lmin values. Only check females because males can be offset from females + // allow for AFIX < 0 because those models are inputting the age at L=0, which must be negative - if ( gp == 1 && WTage_rd == 0) + if ( gp == 1 && WTage_rd == 0 && AFIX >= 0.0) { if (MGparm_1(Ip,1) < len_bins(1)) {