Skip to content

Commit 5b46850

Browse files
add new warning regarding growth in plusgroup
1 parent 6e3f302 commit 5b46850

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

SS_prelim.tpl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,16 @@
13191319
write_message (WARN, 0);
13201320
}
13211321
}
1322+
// check for vulnerability in plusgroup size
1323+
warning << Ave_Size(styr, 1, g, nages - 1) << " " << 0.99 * Ave_Size(styr, 1, g, nages) << endl;
1324+
if (Ave_Size(styr, 1, g, nages - 1) < 0.99 * Ave_Size(styr, 1, g, nages))
1325+
{
1326+
if ( Linf_decay == -998 && MG_active_firstyr(2) > 0 )
1327+
{
1328+
warnstream << "There is greater than 1% growth in plusgroup, timevary growth starts in : " << MG_active_firstyr(2) << " and Linf_decay = -998 disables updating plusgroup size; suggest setting a Linf_decay value like initial Z";
1329+
write_message (WARN, 0);
1330+
}
1331+
}
13221332
}
13231333
}
13241334
}

SS_readcontrol_330.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,6 +1689,7 @@
16891689
// stores years to calc non-constant MG parms (1=natmort; 2=growth; 3=wtlen & fec; 4=recr_dist&femfrac; 5=movement; 6=ageerrorkey; 7=catchmult)
16901690
ivector timevary_pass(styr-3,YrMax+1) // extracted column
16911691
ivector MG_active(0,7) // 0=all, 1=M, 2=growth 3=wtlen, 4=recr_dist&femfrac, 5=migration, 6=ageerror, 7=catchmult
1692+
ivector MG_active_firstyr(0,7) // first year in which a MGparm is timevarying
16921693
vector env_data_pass(1,2) // holds min-max year with env data
16931694
int do_densitydependent;
16941695

@@ -1724,6 +1725,7 @@
17241725
echoinput << "Now read env, block/trend, and dev adjustments to MGparms " << endl;
17251726
timevary_MG.initialize(); // stores years to calc non-constant MG parms (1=natmort; 2=growth; 3=wtlen & fec; 4=recr_dist; 5=movement)
17261727
MG_active.initialize();
1728+
MG_active_firstyr.initialize();
17271729
CGD_onoff = 0;
17281730
17291731
timevary_parm_start_MG = 0;
@@ -1829,6 +1831,7 @@
18291831
if (timevary_MG(y, f) > 0)
18301832
{
18311833
MG_active(f) = 1;
1834+
if (MG_active_firstyr(2) == 0 ) MG_active_firstyr(f) = y;
18321835
timevary_MG(y, 0) = 1; // tracks active status for all MG types
18331836
if(timevary_MG_firstyr == YrMax) timevary_MG_firstyr = y; // save for reporting in MSY and spawn_recruit output
18341837
}

0 commit comments

Comments
 (0)