From 497307dc1c47d4dab72ee8c1be5cc56b6743a922 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Fri, 8 Jul 2022 16:18:32 -0600 Subject: [PATCH] Per #2204, print a warning message if the user requests a time_summary sum when vld_thresh != 1.0. --- src/libcode/vx_summary/summary_obs.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libcode/vx_summary/summary_obs.cc b/src/libcode/vx_summary/summary_obs.cc index 6267a5e78c..a8fd7d6c24 100644 --- a/src/libcode/vx_summary/summary_obs.cc +++ b/src/libcode/vx_summary/summary_obs.cc @@ -368,6 +368,15 @@ vector< SummaryCalc* > SummaryObs::getSummaryCalculators(const TimeSummaryInfo & } else if (type == "sum") { calculators.push_back(new SummaryCalcSum); + + // Check for vld_thresh = 1.0 + if (!is_eq(info.vld_thresh, 1.0)) { + mlog << Warning << "\nIn the \"time_summary\" dictionary, " + << "consider setting \"vld_thresh\" (" << info.vld_thresh + << ") to 1.0 for the \"sum\" type to better handle " + << "missing data.\n\n"; + } + } else if (type[0] == 'p') { calculators.push_back(new SummaryCalcPercentile(type));