Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions SS_benchfore.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2676,7 +2676,6 @@ FUNCTION void Get_Forecast()
// SSB_pop_gp(y,p,GP4(g)) += fec(g)*elem_prod(natage(t,p,g),mfexp(-Z_rate(t,p,g)*spawn_time_seas)); // accumulates SSB by area and by growthpattern
// SSB_B_yr(y) += make_mature_bio(GP4(g))*elem_prod(natage(t,p,g),mfexp(-Z_rate(t,p,g)*spawn_time_seas));
// SSB_N_yr(y) += make_mature_numbers(GP4(g))*elem_prod(natage(t,p,g),mfexp(-Z_rate(t,p,g)*spawn_time_seas));
natage(t, p, g, 0) = 0.0; // these fish should not exist at beginning of year. They are created after spawning. Are here in array only due to Fcast_Loop1
SSB_pop_gp(y, p, GP4(g)) += fracfemale_mult * fec(g) * natage(t, p, g); // accumulates SSB by area and by growthpattern
SSB_B_yr(y) += fracfemale_mult * make_mature_bio(GP4(g)) * natage(t, p, g);
SSB_N_yr(y) += fracfemale_mult * make_mature_numbers(GP4(g)) * natage(t, p, g);
Expand Down Expand Up @@ -2762,9 +2761,9 @@ FUNCTION void Get_Forecast()
// if(y==endyr+1) natage(t+Settle_seas_offset(settle),p,g,Settle_age(settle))=0.0; // to negate the additive code
natage(t + Settle_seas_offset(settle), p, g, Settle_age(settle)) = Recruits * recr_dist(y, GP(g), settle, p) * platoon_distr(GP2(g)) *
mfexp(natM(t, p, GP3(g), Settle_age(settle)) * Settle_timing_seas(settle));
if (Fcast_Loop1 == jloop && ABC_Loop == ABC_Loop_end)

if (Fcast_Loop1 == jloop && ABC_Loop == ABC_Loop_end)
{
// if (Settle_seas(settle) == s) // delete because logic is flawed
Recr(p, t + Settle_seas_offset(settle)) += Recruits * recr_dist(y, GP(g), settle, p) * platoon_distr(GP2(g));
}
// the adjustment for mortality increases recruit value for elapsed time since begin of season because M will then be applied from beginning of season
Expand Down Expand Up @@ -3405,7 +3404,6 @@ FUNCTION void Get_Forecast()
mfexp(natM(t, p, GP3(g), Settle_age(settle)) * Settle_timing_seas(settle));
if (Fcast_Loop1 == jloop && ABC_Loop == ABC_Loop_end)
{
// if (Settle_seas(settle) == s) // delete because logic is flawed
Recr(p, t + Settle_seas_offset(settle)) += Recruits * recr_dist(y, GP(g), settle, p) * platoon_distr(GP2(g));
}
}
Expand Down Expand Up @@ -3691,7 +3689,6 @@ FUNCTION void Get_Forecast()
// report5<<" numbers "<<natage(t,p,g)<<" Zrate "<<Z_rate(t,p,g);
report5 << endl;
}

} // end loop of seasons

if (ABC_Loop == 2) // apply caps and store catches to allow calc of adjusted F to match this catch when doing ABC_loop=3, and then when doing Fcast_loop1=3
Expand Down
15 changes: 6 additions & 9 deletions SS_popdyn.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1080,13 +1080,11 @@ FUNCTION void get_time_series()
settle = settle_g(g);
for (p = 1; p <= pop; p++)
{
if (y == styr)
natage(t + Settle_seas_offset(settle), p, g, Settle_age(settle)) = 0.0; // to negate the additive code
natage(t + Settle_seas_offset(settle), p, g, Settle_age(settle)) +=
natage(t + Settle_seas_offset(settle), p, g, Settle_age(settle)) =
Recruits * recr_dist(y, GP(g), settle, p) * platoon_distr(GP2(g)) *
mfexp(natM(t, p, GP3(g), Settle_age(settle)) * Settle_timing_seas(settle));
Recr(p, t + Settle_seas_offset(settle)) += Recruits * recr_dist(y, GP(g), settle, p) * platoon_distr(GP2(g));
// the adjustment for mortality increases recruit value for elapsed time since begin of season because M will then be applied from beginning of season
// the adjustment for mortality increases stored value for elapsed time since begin of season because M will then be applied from beginning of season
Recr(p, t + Settle_seas_offset(settle)) += Recruits * recr_dist(y, GP(g), settle, p) * platoon_distr(GP2(g));
if (docheckup == 1)
echoinput << y << " Recruits, dist, surv, result " << Recruits << " " << recr_dist(y, GP(g), settle, p) << " " << mfexp(natM(t, p, GP3(g), Settle_age(settle)) * Settle_timing_seas(settle)) << " " << natage(t + Settle_seas_offset(settle), p, g, Settle_age(settle)) << " M "<<natM(t, p, GP3(g), Settle_age(settle)) * Settle_timing_seas(settle)<<endl;
}
Expand Down Expand Up @@ -1539,10 +1537,9 @@ FUNCTION void get_time_series()
settle = settle_g(g);
for (p = 1; p <= pop; p++)
{
if (y == styr)
natage(t + Settle_seas_offset(settle), p, g, Settle_age(settle)) = 0.0; // to negate the additive code

natage(t + Settle_seas_offset(settle), p, g, Settle_age(settle)) += Recruits * recr_dist(y, GP(g), settle, p) * platoon_distr(GP2(g)) *
// previous code zero'ed out the natage then used += to add recruits to natage.
// that is unnecessary, because each p,g,settle_age is unique
natage(t + Settle_seas_offset(settle), p, g, Settle_age(settle)) = Recruits * recr_dist(y, GP(g), settle, p) * platoon_distr(GP2(g)) *
mfexp(natM(t, p, GP3(g), Settle_age(settle)) * Settle_timing_seas(settle));
Recr(p, t + Settle_seas_offset(settle)) += Recruits * recr_dist(y, GP(g), settle, p) * platoon_distr(GP2(g));
if (docheckup == 1)
Expand Down
Loading