From 46fc4ee4357ef8a42f92783f5fa11944ce8ef630 Mon Sep 17 00:00:00 2001 From: Richard Methot Date: Thu, 17 Oct 2024 16:07:03 -0700 Subject: [PATCH] latest update --- SS_benchfore.tpl | 25 +++++++++++++------------ SS_param.tpl | 2 +- SS_write_ssnew.tpl | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/SS_benchfore.tpl b/SS_benchfore.tpl index c2293f20..08c9c645 100644 --- a/SS_benchfore.tpl +++ b/SS_benchfore.tpl @@ -767,7 +767,8 @@ FUNCTION void Get_Benchmarks(const int show_MSY) if (show_MSY == 1) { report5 << "SR_parms for benchmark: " << SR_parm_work << endl - << "Benchmark biology averaged over years: " << Bmark_Yr(1) << " " << Bmark_Yr(2) << " flag for updating SSBpR0 = " << SR_update_SSBpR0_bmark << endl; + << "Benchmark biology averaged over years: " << Bmark_Yr(1) << " " << Bmark_Yr(2) << endl << + "input.SR_update_SSBpR0_rd: " << SR_update_SSBpR0_rd << "flag for updating SSBpR0_Bmark: " << SR_update_SSBpR0_bmark << endl; Equ_SpawnRecr_Result = Equil_Spawn_Recr_Fxn(SR_parm_work, SSB_virgin, Recr_virgin, SSBpR_virgin); // returns 2 element vector containing equilibrium biomass and recruitment at this SPR report5 << " Virgin SSB, R0, SPR0: " << SSB_virgin << " " << Recr_virgin << " " << SSBpR_virgin << " equil: " << Equ_SpawnRecr_Result << endl; if ( SR_update_SSBpR0_bmark == 1) @@ -2176,10 +2177,16 @@ FUNCTION void Get_Forecast() { H4010_top = H4010_top_rd; } + if (Fcast_Loop_Control(5) <= 1) + {HCR_anchor = SSB_unf;} + else if (Fcast_Loop_Control(5) ==2) + {HCR_anchor = SSB_virgin;} report5 << "#" << endl; report5 << "N_forecast_yrs: " << N_Fcast_Yrs << endl; - report5 << "OY_Control_Rule " - << " Inflection: " << H4010_top << " Intercept: " << H4010_bot << " Scale: " << H4010_scale_vec(endyr + 1) << "; "; + report5 << "OY_Control_Rule: Inflection: " << H4010_top << " Intercept: " << H4010_bot << " Scale: " << H4010_scale_vec(endyr + 1) << endl + << "Control_rule_anchor_approach: " << Fcast_Loop_Control(5) << " HCR_anchor: " << HCR_anchor << endl; + report5 << "#" << endl; + switch (HarvestPolicy) { case 0: // none @@ -2209,13 +2216,7 @@ FUNCTION void Get_Forecast() break; } } - if (Fcast_Loop_Control(5) <= 1) - {HCR_anchor = SSB_unf;} - else if (Fcast_Loop_Control(5) ==2) - {HCR_anchor = SSB_virgin;} - report5 << "Control_rule_anchor_approach: " << Fcast_Loop_Control(5) << " HCR_anchor: " << HCR_anchor << endl; - report5 << "#" << endl; - } + } int jloop; if (fishery_on_off == 1 || Do_Dyn_Bzero > 0) @@ -2264,7 +2265,7 @@ FUNCTION void Get_Forecast() if (HarvestPolicy == 0) report5 << "pop year ABC_Loop season No_buffer bio-all bio-Smry SpawnBio Depletion recruit-0 "; if (HarvestPolicy <= 2) - report5 << "pop year ABC_Loop season Ramp&Buffer bio-all bio-Smry SpawnBio Depletion recruit-0 "; + report5 << "pop year ABC_Loop season Ramp&Buffer Buffer2 bio-all bio-Smry SpawnBio Depletion recruit-0 "; if (HarvestPolicy >= 3) report5 << "pop year ABC_Loop season Ramp bio-all bio-Smry SpawnBio Depletion recruit-0 "; for (int ff = 1; ff <= N_catchfleets(0); ff++) @@ -3134,7 +3135,7 @@ FUNCTION void Get_Forecast() } if (show_MSY == 1) { - report5 << p << " " << y << " " << ABC_Loop << " " << s << " " << ABC_buffer(y) << " " << totbio << " " << smrybio << " "; + report5 << p << " " << y << " " << ABC_Loop << " " << s << " " << ABC_buffer(y) << " " << H4010_scale_vec(y) << " " << totbio << " " << smrybio << " "; if (s == spawn_seas) { report5 << SSB_current << " "; diff --git a/SS_param.tpl b/SS_param.tpl index 3c6147ea..9a86f578 100644 --- a/SS_param.tpl +++ b/SS_param.tpl @@ -235,7 +235,7 @@ PARAMETER_SECTION init_bounded_vector Fcast_recruitments(recdev_end+1,s,recdev_LO,recdev_HI,Fcast_recr_PH2) init_bounded_vector Fcast_impl_error(endyr+1,j,-1,1,k) vector ABC_buffer(endyr+1,YrMax); - number HCR_anchor // basis (denominator) bor inflection in control rule + number HCR_anchor // basis (denominator) for inflection in control rule. Select virgin SSB or benchmark SSB // SPAWN-RECR: define some spawning biomass and recruitment entities number SSB_virgin diff --git a/SS_write_ssnew.tpl b/SS_write_ssnew.tpl index d8a61230..e7080a9a 100644 --- a/SS_write_ssnew.tpl +++ b/SS_write_ssnew.tpl @@ -1631,9 +1631,9 @@ FUNCTION void write_nucontrol() NuFore << HarvestPolicy << " # Control rule method (0: none; 1: ramp does catch=f(SSB), buffer on F; 2: ramp does F=f(SSB), buffer on F; 3: ramp does catch=f(SSB), buffer on catch; 4: ramp does F=f(SSB), buffer on catch) " << endl; NuFore << "# values for top, bottom and buffer exist, but not used when Policy=0" << endl; NuFore << H4010_top_rd << " # Control rule inflection for constant F (as frac of Bzero, e.g. 0.40); must be > control rule cutoff, or set to -1 to use Bmsy/SSB_unf " << endl; - NuFore << "# Also see HCR_anchor below" << endl; NuFore << H4010_bot << " # Control rule cutoff for no F (as frac of Bzero, e.g. 0.10) " << endl; NuFore << H4010_scale_rd << " # Buffer: enter Control rule target as fraction of Flimit (e.g. 0.75), negative value invokes list of [year, scalar] with filling from year to YrMax " << endl; + NuFore << "# Also see HCR_anchor below" << endl; if (H4010_scale_rd < 0) { j = H4010_scale_vec_rd.size() - 1;