From bbe7f8e4c0a86ef6fdd3bd13318bb9b2dd002d03 Mon Sep 17 00:00:00 2001 From: iantaylor-NOAA Date: Tue, 26 Aug 2025 09:47:13 -0700 Subject: [PATCH 1/8] turn off extra switches when Do_More_Std == 1 --- SS_readcontrol_330.tpl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SS_readcontrol_330.tpl b/SS_readcontrol_330.tpl index 52e3eaa2..57b0ddbe 100644 --- a/SS_readcontrol_330.tpl +++ b/SS_readcontrol_330.tpl @@ -5636,6 +5636,14 @@ Do_Dyn_Bzero = More_Std_Input(12); Do_se_smrybio = More_Std_Input(13); } + else + { + // if Do_More_Std == 1, these options should be turned off + Do_NatM_Std = 0; + NatM_Std_Cnt = 0; + Do_Dyn_Bzero = 0; + Do_se_smrybio = 0; + } // clang-format off END_CALCS From 3980415ce50c9b3491d9aff7d2675d48be7a0dec Mon Sep 17 00:00:00 2001 From: iantaylor-NOAA Date: Tue, 26 Aug 2025 12:18:05 -0700 Subject: [PATCH 2/8] revise switches for extra std inputs - suggestion from https://github.com/nmfs-ost/ss3-source-code/pull/713#pullrequestreview-3156740744 --- SS_readcontrol_330.tpl | 41 +++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/SS_readcontrol_330.tpl b/SS_readcontrol_330.tpl index 57b0ddbe..4d8493e3 100644 --- a/SS_readcontrol_330.tpl +++ b/SS_readcontrol_330.tpl @@ -5585,24 +5585,21 @@ // clang-format on Extra_Std_N = 0; - // don't read any extra std inputs - if (Do_More_Std == 0) - { - Do_Selex_Std = 0; - Selex_Std_AL = 1; - Selex_Std_Year = endyr; - Selex_Std_Cnt = 0; - Do_Growth_Std = 0; - Growth_Std_Cnt = 0; - Do_NatAge_Std = 0; - NatAge_Std_Cnt = 0; - NatAge_Std_Year = endyr; - Do_NatM_Std = 0; - NatM_Std_Cnt = 0; - Do_Dyn_Bzero = 0; - Do_se_smrybio = 0; - Do_se_LnSSB = 0; - } + // Itialize all switches for extra std inputs + Do_Selex_Std = 0; + Selex_Std_AL = 1; + Selex_Std_Year = endyr; + Selex_Std_Cnt = 0; + Do_Growth_Std = 0; + Growth_Std_Cnt = 0; + Do_NatAge_Std = 0; + NatAge_Std_Cnt = 0; + NatAge_Std_Year = endyr; + Do_NatM_Std = 0; + NatM_Std_Cnt = 0; + Do_Dyn_Bzero = 0; + Do_se_smrybio = 0; + Do_se_LnSSB = 0; // read standard extra std inputs (only option prior to 3.30.15) if (Do_More_Std > 0) @@ -5636,14 +5633,6 @@ Do_Dyn_Bzero = More_Std_Input(12); Do_se_smrybio = More_Std_Input(13); } - else - { - // if Do_More_Std == 1, these options should be turned off - Do_NatM_Std = 0; - NatM_Std_Cnt = 0; - Do_Dyn_Bzero = 0; - Do_se_smrybio = 0; - } // clang-format off END_CALCS From 3c2e2c42272d27b4b177bcce5ea2e1561c95fca8 Mon Sep 17 00:00:00 2001 From: Richard Methot Date: Tue, 26 Aug 2025 15:44:34 -0700 Subject: [PATCH 3/8] more robust retro_yr usage --- SS_readcontrol_330.tpl | 20 +++++++++----------- SS_write_report.tpl | 1 - 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/SS_readcontrol_330.tpl b/SS_readcontrol_330.tpl index 4d8493e3..df5009ea 100644 --- a/SS_readcontrol_330.tpl +++ b/SS_readcontrol_330.tpl @@ -5620,19 +5620,17 @@ if (Do_NatAge_Std == 0) NatAge_Std_Cnt = 0; Do_NatM_Std = 0; // value replaced below if Do_More_Std==2 NatM_Std_Cnt = 0; // value replaced below if Do_More_Std==2 - } - - // read additional extra std inputs for NatM (added in 3.30.15) - if (Do_More_Std == 2) - { - Do_NatM_Std = More_Std_Input(10); - NatM_Std_Cnt = More_Std_Input(11); - if (Do_NatM_Std <= 0) { - NatM_Std_Cnt = 0; + // read additional extra std inputs for NatM (added in 3.30.15) + if (Do_More_Std == 2) + { + Do_NatM_Std = More_Std_Input(10); + NatM_Std_Cnt = More_Std_Input(11); + if (Do_NatM_Std <= 0) NatM_Std_Cnt = 0; + Do_Dyn_Bzero = More_Std_Input(12); + Do_se_smrybio = More_Std_Input(13); } - Do_Dyn_Bzero = More_Std_Input(12); - Do_se_smrybio = More_Std_Input(13); } + // clang-format off END_CALCS diff --git a/SS_write_report.tpl b/SS_write_report.tpl index 2ccfc224..d706a7dc 100644 --- a/SS_write_report.tpl +++ b/SS_write_report.tpl @@ -1741,7 +1741,6 @@ FUNCTION void write_bigoutput() double cross = 0.0; double Durbin = 0.0; double var = 0.0; - warning << recdev_first << " "< Date: Wed, 27 Aug 2025 10:25:08 -0700 Subject: [PATCH 4/8] add more echoinput checks --- SS_readcontrol_330.tpl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SS_readcontrol_330.tpl b/SS_readcontrol_330.tpl index df5009ea..9addfd44 100644 --- a/SS_readcontrol_330.tpl +++ b/SS_readcontrol_330.tpl @@ -1608,6 +1608,7 @@ // labels for the types are found in: MGtype_Lbl LOCAL_CALCS // clang-format on + echoinput<<"start assigning MGparm_type"< 0) mgp_type(MGP_CGD + 1, N_MGparm) = 5; // note that it fills until end of MGparm list, but some get overwritten if (N_platoon > 1 && sd_ratio_rd < 0) mgp_type(sd_ratio_param_ptr) = 2; if (Use_AgeKeyZero > 0) mgp_type(AgeKeyParm, N_MGparm) = 6; if (catch_mult_pointer > 0) mgp_type(catch_mult_pointer, N_MGparm) = 7; for (f = frac_female_pointer; f <= frac_female_pointer + N_GP - 1; f++) mgp_type(f) = 4; + echoinput<<"fracfemale: "< 0) mgp_type(predparm_pointer(1), predparm_pointer(1) + N_predparms - 1) = 1; echoinput << "mgparm_type for each parm:"< Date: Wed, 27 Aug 2025 10:56:48 -0700 Subject: [PATCH 5/8] think I fixed it --- SS_readcontrol_330.tpl | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/SS_readcontrol_330.tpl b/SS_readcontrol_330.tpl index 9addfd44..ac337ab2 100644 --- a/SS_readcontrol_330.tpl +++ b/SS_readcontrol_330.tpl @@ -1619,18 +1619,21 @@ Ip += N_natMparms; mgp_type(Ip, Ip + N_growparms - 1) = 2; // growth parms - echoinput<<"new check on Lmin: "< Date: Wed, 27 Aug 2025 13:13:34 -0700 Subject: [PATCH 6/8] remove Lmin check --- SS_readcontrol_330.tpl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SS_readcontrol_330.tpl b/SS_readcontrol_330.tpl index ac337ab2..b687e4e0 100644 --- a/SS_readcontrol_330.tpl +++ b/SS_readcontrol_330.tpl @@ -1620,7 +1620,8 @@ 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 - if ( gp == 1 && WTage_rd == 0) + /* + if ( gp == 1 && WTage_rd == 0) { echoinput<<"new check on Lmin: "< Date: Thu, 28 Aug 2025 12:03:18 -0700 Subject: [PATCH 7/8] restore Lmin check --- SS_readcontrol_330.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SS_readcontrol_330.tpl b/SS_readcontrol_330.tpl index b687e4e0..945ba2b2 100644 --- a/SS_readcontrol_330.tpl +++ b/SS_readcontrol_330.tpl @@ -1620,7 +1620,7 @@ 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 - /* + if ( gp == 1 && WTage_rd == 0) { echoinput<<"new check on Lmin: "< Date: Thu, 28 Aug 2025 12:51:11 -0700 Subject: [PATCH 8/8] remove debug output --- SS_readcontrol_330.tpl | 8 -------- 1 file changed, 8 deletions(-) diff --git a/SS_readcontrol_330.tpl b/SS_readcontrol_330.tpl index 945ba2b2..3e76b021 100644 --- a/SS_readcontrol_330.tpl +++ b/SS_readcontrol_330.tpl @@ -1623,8 +1623,6 @@ if ( gp == 1 && WTage_rd == 0) { - echoinput<<"new check on Lmin: "< 0) mgp_type(MGP_CGD + 1, N_MGparm) = 5; // note that it fills until end of MGparm list, but some get overwritten if (N_platoon > 1 && sd_ratio_rd < 0) mgp_type(sd_ratio_param_ptr) = 2; if (Use_AgeKeyZero > 0) mgp_type(AgeKeyParm, N_MGparm) = 6; if (catch_mult_pointer > 0) mgp_type(catch_mult_pointer, N_MGparm) = 7; for (f = frac_female_pointer; f <= frac_female_pointer + N_GP - 1; f++) mgp_type(f) = 4; - echoinput<<"fracfemale: "< 0) mgp_type(predparm_pointer(1), predparm_pointer(1) + N_predparms - 1) = 1; echoinput << "mgparm_type for each parm:"<