From f9e17db955bc0b9acc9bc2685853a68278900668 Mon Sep 17 00:00:00 2001 From: Seth Linden Date: Mon, 12 Sep 2022 10:26:21 -0600 Subject: [PATCH] Per issue #2206, in set() function, added checks for crps_emp and crps_emp_fair, for values of 0.0. SL --- src/libcode/vx_statistics/ens_stats.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libcode/vx_statistics/ens_stats.cc b/src/libcode/vx_statistics/ens_stats.cc index e9811b5fd3..3167c814b9 100644 --- a/src/libcode/vx_statistics/ens_stats.cc +++ b/src/libcode/vx_statistics/ens_stats.cc @@ -231,8 +231,11 @@ void ECNTInfo::set(const PairDataEnsemble &pd) { // Compute empirical CRPS scores crps_emp = pd.crps_emp_na.wmean(pd.wgt_na); - // Stub in for now? + if(is_eq(crps_emp, 0.0)) crps_emp = 0.0; + crps_emp_fair = pd.crps_emp_fair_na.wmean(pd.wgt_na); + if(is_eq(crps_emp_fair, 0.0)) crps_emp_fair = 0.0; + crpscl_emp = pd.crpscl_emp_na.wmean(pd.wgt_na); crpss_emp = (is_bad_data(crps_emp) || is_bad_data(crpscl_emp) ||