Skip to content

Commit 317826b

Browse files
add warning when addtocomp is not > 0
1 parent dae5c94 commit 317826b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

SS_readdata_330.tpl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,11 @@
14021402
min_tail_L(1, f) = min_tail_L(0, f);
14031403
min_tail_L(2, f) = min_tail_L(0, f);
14041404
*(ad_comm::global_datafile) >> min_comp_L(0, f);
1405+
if (min_comp_L(0, f) <= 0) {
1406+
warnstream << "addtocomp input for length comps fleet " << f <<
1407+
" is " << min_comp_L(0, f) << " but should be > 0 to avoid log(0) in likelihood";
1408+
write_message(WARN, 0);
1409+
}
14051410
min_comp_L(1, f) = min_comp_L(0, f);
14061411
min_comp_L(2, f) = min_comp_L(0, f);
14071412
*(ad_comm::global_datafile) >> CombGender_L(0, f);
@@ -2280,6 +2285,11 @@
22802285
{
22812286
*(ad_comm::global_datafile) >> min_tail_A(f);
22822287
*(ad_comm::global_datafile) >> min_comp_A(f);
2288+
if (min_comp_A(f) <= 0) {
2289+
warnstream << "addtocomp input for age comps fleet " << f <<
2290+
" is " << min_comp_A(f) << " but should be > 0 to avoid log(0) in likelihood";
2291+
write_message(WARN, 0);
2292+
}
22832293
*(ad_comm::global_datafile) >> CombGender_A(f);
22842294
*(ad_comm::global_datafile) >> AccumBin_A(f);
22852295
*(ad_comm::global_datafile) >> Comp_Err_A(f);

0 commit comments

Comments
 (0)