diff --git a/met/src/libcode/vx_statistics/compute_stats.cc b/met/src/libcode/vx_statistics/compute_stats.cc index b6c193b90e..e147c30908 100644 --- a/met/src/libcode/vx_statistics/compute_stats.cc +++ b/met/src/libcode/vx_statistics/compute_stats.cc @@ -121,7 +121,12 @@ void compute_cntinfo(const SL1L2Info &s, bool aflag, CNTInfo &cnt_info) { cnt_info.rmse.v = sqrt(cnt_info.mse.v); // Compute Scatter Index (SI) - cnt_info.si.v = cnt_info.rmse.v / cnt_info.me.v; + if(!is_eq(cnt_info.me.v, 0.0)) { + cnt_info.si.v = cnt_info.rmse.v / cnt_info.me.v; + } + else { + cnt_info.si.v = bad_data_double; + } // Compute normal confidence intervals cnt_info.compute_ci(); @@ -348,7 +353,13 @@ void compute_cntinfo(const PairDataPoint &pd, const NumArray &i_na, // // Compute Scatter Index (SI) // - cnt_info.si.v = cnt_info.rmse.v / cnt_info.me.v; + if(!is_eq(cnt_info.me.v, 0.0)) { + cnt_info.si.v = cnt_info.rmse.v / cnt_info.me.v; + } + else { + cnt_info.si.v = bad_data_double; + } + // // Only compute the Kendall Tau and Spearman's Rank corrleation