You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -519,7 +523,7 @@ FUNCTION void get_growth2(const int y)
519
523
// SS_Label_Info_16.2.4.1.4 #calc approximation to mean size at maxage to account for growth after reaching the maxage (accumulator age)
520
524
// note that seasonal adjustment to VBK is dropped
521
525
current_size = Ave_Size(styr, 1, g, nages);
522
-
if (Linf_decay >-997.) // decay rate has been readandnot using "-999" for the 3.24 approach whih=ch sets decay = -0.2
526
+
if (Linf_decay >0.0001) // decay rate has been read. Should be an estimate of initial Z
523
527
{
524
528
temp1 = 1.0;
525
529
temp4 = 1.0;
@@ -552,15 +556,15 @@ FUNCTION void get_growth2(const int y)
552
556
}
553
557
Ave_Size(styr, 1, g, nages) = temp / temp1; // this is weighted mean size at nages
554
558
}
555
-
else // decay code set to -998 which omits growth in the plus group
559
+
elseif (Linf_decay == -998.) // decay code set to -998 which omits growth in the plus group
556
560
{
557
561
// no adjustment
558
562
}
559
563
#ifdef DO_ONCE
560
564
if (do_once == 1)
561
565
echoinput <<" adjusted size in plusgroup: "<< Ave_Size(styr, 1, g, nages) <<" using decay of: "<< Linf_decay << endl;
562
566
#endif
563
-
} // end initial year calcs
567
+
} // end initial year calcs
564
568
565
569
// SS_Label_Info_16.2.4.2 #loop seasons for growth calculation
566
570
for (s = 1; s <= nseas; s++)
@@ -580,9 +584,8 @@ FUNCTION void get_growth2(const int y)
580
584
else
581
585
add_age = 0; // advance age ornot
582
586
// growth to next season
583
-
// following line incorrectly adjusted for season duration
584
587
VBK_by_seas = (mfexp(VBK_work * VBK_seas(s)) - 1.0); // for use inside the growth equation
585
-
588
+
echoinput<<"ready to update growth by season "<< y << endl;
586
589
switch (Grow_type)
587
590
{
588
591
case 1: // standard von Bertallanfy
@@ -732,14 +735,16 @@ FUNCTION void get_growth2(const int y)
732
735
}
733
736
734
737
// SS_Label_Info_16.2.4.2.1.2 #after age loop, if(s=nseas) get weighted average for size_at_maxage from carryover fish and fish newly moving into this age
735
-
// this code needs to execute every year, so should move to ss_popdyn. Positioned here, it is only updated in years in which there is time-vary growth
736
-
if (s == nseas)
738
+
// there should be an option to execute this update every year, so code below should move to ss_popdyn. Positioned here, it is only updated in years in which there is time-vary growth
739
+
if (y > styr && s == nseas) // do plus group mean size update
737
740
{
738
-
if (y > styr &&Linf_decay != -998.)
741
+
if (Linf_decay != -998.)
739
742
{
740
-
if (do_once == 1)
741
-
warnstream <<"plus group mean size is being updated in years with time-vary growth; can turn this off with Linf_decay = -998";
742
-
write_message (NOTE, 0);
743
+
if (do_once == 1 && timevary_MG_firstyr == y)
744
+
{
745
+
warnstream <<"plus group mean size is updated in years with time-vary growth beginning in: "<< y <<"; can turn this off with Linf_decay = -998";
746
+
write_message (NOTE, 0);
747
+
}
743
748
// 3.24 code
744
749
if (do_once == 1)
745
750
echoinput << niter <<""<< y <<" plus group calc: "
0 commit comments