From 317826b0f8e7d5e8db1e9e9de5881945828af073 Mon Sep 17 00:00:00 2001 From: Ian Taylor Date: Fri, 19 Jan 2024 13:30:36 -0800 Subject: [PATCH] add warning when addtocomp is not > 0 --- SS_readdata_330.tpl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SS_readdata_330.tpl b/SS_readdata_330.tpl index 811c15ef..3f04317b 100644 --- a/SS_readdata_330.tpl +++ b/SS_readdata_330.tpl @@ -1402,6 +1402,11 @@ min_tail_L(1, f) = min_tail_L(0, f); min_tail_L(2, f) = min_tail_L(0, f); *(ad_comm::global_datafile) >> min_comp_L(0, f); + if (min_comp_L(0, f) <= 0) { + warnstream << "addtocomp input for length comps fleet " << f << + " is " << min_comp_L(0, f) << " but should be > 0 to avoid log(0) in likelihood"; + write_message(WARN, 0); + } min_comp_L(1, f) = min_comp_L(0, f); min_comp_L(2, f) = min_comp_L(0, f); *(ad_comm::global_datafile) >> CombGender_L(0, f); @@ -2280,6 +2285,11 @@ { *(ad_comm::global_datafile) >> min_tail_A(f); *(ad_comm::global_datafile) >> min_comp_A(f); + if (min_comp_A(f) <= 0) { + warnstream << "addtocomp input for age comps fleet " << f << + " is " << min_comp_A(f) << " but should be > 0 to avoid log(0) in likelihood"; + write_message(WARN, 0); + } *(ad_comm::global_datafile) >> CombGender_A(f); *(ad_comm::global_datafile) >> AccumBin_A(f); *(ad_comm::global_datafile) >> Comp_Err_A(f);