Skip to content

Commit

Permalink
Per #2152, sneaking in one unrelated change to improve error messages…
Browse files Browse the repository at this point in the history
… that caused confusion in the dtcenter/METplus#1601 discussion.
  • Loading branch information
JohnHalleyGotway committed May 5, 2022
1 parent a94432b commit 82b0c86
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions met/src/basic/vx_util/thresh_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,10 @@ bool check_prob_thresh(const ThreshArray &ta, bool error_out) {
mlog << Error << "\ncheck_prob_thresh() -> "
<< "When verifying a probability field, you must "
<< "select at least 3 thresholds beginning with 0.0 "
<< "and ending with 1.0.\n\n";
<< "and ending with 1.0 (current setting: "
<< ta.get_str() << ").\n"
<< "Consider using the ==p shorthand notation for bins "
<< "of equal width.\n\n";
exit(1);
}
else {
Expand All @@ -641,7 +644,10 @@ bool check_prob_thresh(const ThreshArray &ta, bool error_out) {
mlog << Error << "\ncheck_prob_thresh() -> "
<< "When verifying a probability field, all "
<< "thresholds must be greater than or equal to, "
<< "using \"ge\" or \">=\".\n\n";
<< "using \"ge\" or \">=\" (current setting: "
<< ta.get_str() << ").\n"
<< "Consider using the ==p shorthand notation for bins "
<< "of equal width.\n\n";
exit(1);
}
else {
Expand All @@ -653,8 +659,11 @@ bool check_prob_thresh(const ThreshArray &ta, bool error_out) {
if(ta[i].get_value() < 0.0 || ta[i].get_value() > 1.0) {
if(error_out) {
mlog << Error << "\ncheck_prob_thresh() -> "
<< "When verifying a probability field, all "
<< "thresholds must be between 0 and 1.\n\n";
<< "When verifying a probability field, all thresholds "
<< "must be between 0 and 1 (current setting: "
<< ta.get_str() << ").\n"
<< "Consider using the ==p shorthand notation for bins "
<< "of equal width.\n\n";
exit(1);
}
else {
Expand Down

0 comments on commit 82b0c86

Please sign in to comment.