From 840a214fd63358117f06799a8edc68285a280e42 Mon Sep 17 00:00:00 2001 From: Rick Methot Date: Tue, 9 Sep 2025 16:24:12 -0700 Subject: [PATCH 1/2] deprecate old spawn_recr table --- SS_write_report.tpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SS_write_report.tpl b/SS_write_report.tpl index a56371b5..bb526aab 100644 --- a/SS_write_report.tpl +++ b/SS_write_report.tpl @@ -1800,6 +1800,7 @@ FUNCTION void write_bigoutput() var /= (n_rmse(1) + 1.0e-09); dvariable steepness = SRparm(2); + /* SS2out << endl << pick_report_name(19); SS2out << " Function: " << SR_fxn << " RecDev_method: " << do_recdev << " sum_recdev: " << sum_recdev << endl @@ -1910,7 +1911,8 @@ FUNCTION void write_bigoutput() SS2out << endl; } - SS2out << endl << "#Expanded_Spawn_Recr_report" << endl << pick_report_name(19) << endl; + */ + SS2out << endl << pick_report_name(19) << endl; SS2out << SR_fxn << " # SR_Function" << endl; SS2out << N_SRparm2 << " # N_SRparms" << endl; SS2out << "#" << endl << "#_SRparm parm_label value phase TV_year" << endl; @@ -3164,8 +3166,10 @@ FUNCTION void write_bigoutput() selmax(f, 2) = float(s);} // save y.s if (fleet_type(f) <= 2) + { SS2out << "F " << f << " " << y << " " << s << " " << sx(g) << " " << g << " " << y << "_" << f << "_F" << Hrate(f, t) * save_sel_num(t, f, g) << endl; SS2out << "Fdead " << f << " " << y << " " << s << " " << sx(g) << " " << g << " " << y << "_" << f << "_Fdead" << Hrate(f, t) * save_F_dead(t, f, g) << endl; + } SS2out << "bodywt " << f << " " << y << " " << s << " " << sx(g) << " " << g << " " << y << "_" << f << "_bodywt" << Wt_Age_t(t, f, g) << endl; } } From ee56269b5c8a5d64bec7ea19e3639a23227a6364 Mon Sep 17 00:00:00 2001 From: Rick Methot Date: Wed, 10 Sep 2025 10:30:48 -0700 Subject: [PATCH 2/2] cleanup code --- SS_write_report.tpl | 112 -------------------------------------------- 1 file changed, 112 deletions(-) diff --git a/SS_write_report.tpl b/SS_write_report.tpl index bb526aab..f9855ffc 100644 --- a/SS_write_report.tpl +++ b/SS_write_report.tpl @@ -1800,118 +1800,6 @@ FUNCTION void write_bigoutput() var /= (n_rmse(1) + 1.0e-09); dvariable steepness = SRparm(2); - /* - SS2out << endl - << pick_report_name(19); - SS2out << " Function: " << SR_fxn << " RecDev_method: " << do_recdev << " sum_recdev: " << sum_recdev << endl - << SRparm(1) << " Ln(R0) " << mfexp(SRparm(1)) << endl - << steepness << " steepness" << endl - << Bmsy / SSB_virgin << " Bmsy/Bzero "; - if (SR_fxn == 8) - { - dvariable Shepherd_c; - dvariable Shepherd_c2; - dvariable Hupper; - Shepherd_c = SRparm(3); - Shepherd_c2 = pow(0.2, Shepherd_c); - Hupper = 1.0 / (5.0 * Shepherd_c2); - temp = 0.2 + (SRparm(2) - 0.2) / (0.8) * (Hupper - 0.2); - SS2out << " Shepherd_c: " << Shepherd_c << " steepness_limit: " << Hupper << " Adjusted_steepness: " << temp; - } - else if (SR_fxn == 9) - { - SS2out << " Ricker_Power: " << SRparm(3); - } - - SS2out << endl; - SS2out << sigmaR << " sigmaR" << endl; - SS2out << init_equ_steepness << " # 0/1 to use steepness in initial equ recruitment calculation" << endl; - - SS2out << SRparm(N_SRparm2 - 1) << " init_eq: see below" << endl - << recdev_start << " " << recdev_end << " main_recdev:start_end" << endl - << recdev_adj(1) << " " << recdev_adj(2, 5) << " breakpoints_for_bias_adjustment_ramp " << endl; - - temp = sigmaR * sigmaR; // sigmaR^2 - SS2out << "ERA N RMSE RMSE^2/sigmaR^2 mean_BiasAdj est_rho Durbin-Watson" << endl; - SS2out << "main " << n_rmse(1) << " " << rmse(1) << " " << square(rmse(1)) / temp << " " << rmse(2) << " " << cross / var << " " << Durbin; - if (wrote_bigreport == 0) // first time writing bigreport - { - if (rmse(1) < 0.5 * sigmaR && rmse(2) > (0.01 + 2.0 * square(rmse(1)) / temp)) - { - warnstream << "Main recdev biasadj is >2 times ratio of rmse to sigmaR"; - SS2out << " # " << warnstream.str() ; - write_message (WARN, 0); - } - } - SS2out << endl; - - SS2out << "early " << n_rmse(3) << " " << rmse(3) << " " << square(rmse(3)) / temp << " " << rmse(4); - if (wrote_bigreport == 0) // first time writing bigreport - { - if (rmse(3) < 0.5 * sigmaR && rmse(4) > (0.01 + 2.0 * square(rmse(3)) / temp)) - { - warnstream << "Early recdev biasadj is >2 times ratio of rmse to sigmaR"; - SS2out << " # " << warnstream.str(); - write_message (WARN, 0); - } - } - SS2out << endl; - - SS2out << "Yr SpawnBio exp_recr with_regime bias_adjusted pred_recr dev biasadjuster era mature_bio mature_num raw_dev" << endl; - SS2out << "S/Rcurve " << SSB_virgin << " " << Recr_virgin << endl; - y = styr - 2; - SS2out << "Virg " << SSB_yr(y) << " " << exp_rec(y) << " - " << 0.0 << " Virg " << SSB_B_yr(y) << " " << SSB_N_yr(y) << " 0.0 " << endl; - y = styr - 1; - SS2out << "Init " << SSB_yr(y) << " " << exp_rec(y) << " - " << 0.0 << " Init " << SSB_B_yr(y) << " " << SSB_N_yr(y) << " " << 0.0 << endl; - - if (recdev_first < styr) - { - for (y = recdev_first; y <= styr - 1; y++) - { - SS2out << y << " " << SSB_yr(styr - 1) << " " << exp_rec(styr - 1, 1) << " " << exp_rec(styr - 1, 2) << " " << exp_rec(styr - 1, 3) * mfexp(-biasadj(y) * half_sigmaRsq) << " " << exp_rec(styr - 1, 3) * mfexp(recdev(y) - biasadj(y) * half_sigmaRsq) << " " - << recdev(y) << " " << biasadj(y) << " Init_age " << SSB_B_yr(styr - 1) << " " << SSB_N_yr(styr - 1) << " " << recdev(y) << endl; // newdev approach uses devs for initial agecomp directly - } - } - for (y = styr; y <= YrMax; y++) - { - SS2out << y << " " << SSB_yr(y) << " " << exp_rec(y) << " "; - if (recdev_do_early > 0 && y >= recdev_early_start && y <= recdev_early_end) - { - SS2out << log(exp_rec(y, 4) / exp_rec(y, 3)) << " " << biasadj(y) << " Early " << SSB_B_yr(y) << " " << SSB_N_yr(y) << " " << recdev(y); - } - else if (y >= recdev_start && y <= recdev_end) - { - SS2out << log(exp_rec(y, 4) / exp_rec(y, 3)) << " " << biasadj(y) << " Main " << SSB_B_yr(y) << " " << SSB_N_yr(y) << " " << recdev(y); - } - else if (Do_Forecast > 0 && y > recdev_end) - { - SS2out << log(exp_rec(y, 4) / exp_rec(y, 3)) << " " << biasadj(y); - if (y <= endyr) - { - SS2out << " Late "; - } - else - { - SS2out << " Fore "; - } - SS2out << SSB_B_yr(y) << " " << SSB_N_yr(y) << " "; - if (do_recdev > 0) - { - SS2out << Fcast_recruitments(y); - } - else - { - SS2out << " 0.0"; - } - } - else - { - SS2out << " _ _ Fixed"; - } - SS2out << endl; - } - - */ SS2out << endl << pick_report_name(19) << endl; SS2out << SR_fxn << " # SR_Function" << endl; SS2out << N_SRparm2 << " # N_SRparms" << endl;