Skip to content

Commit

Permalink
Per #2204, print a warning message if the user requests a time_summar…
Browse files Browse the repository at this point in the history
…y sum when vld_thresh != 1.0.
  • Loading branch information
JohnHalleyGotway committed Jul 8, 2022
1 parent 6d5e4e1 commit 497307d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/libcode/vx_summary/summary_obs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 497307d

Please sign in to comment.