Skip to content

Commit

Permalink
Per issue #2206, added code for crps_emp_fair. SL
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Linden committed Sep 12, 2022
1 parent ea93131 commit 32c060a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libcode/vx_statistics/ens_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void ECNTInfo::clear() {

othresh.clear();
n_ens = n_pair = 0;
crps_emp = crpscl_emp = crpss_emp = bad_data_double;
crps_emp = crpscl_emp = crpss_emp = crps_emp_fair = bad_data_double;
crps_gaus = crpscl_gaus = crpss_gaus = bad_data_double;
ign = bad_data_double;
me = rmse = spread = bad_data_double;
Expand All @@ -199,7 +199,8 @@ void ECNTInfo::assign(const ECNTInfo &c) {
crps_emp = c.crps_emp;
crpscl_emp = c.crpscl_emp;
crpss_emp = c.crpss_emp;

crps_emp_fair = c.crps_emp_fair;

crps_gaus = c.crps_gaus;
crpscl_gaus = c.crpscl_gaus;
crpss_gaus = c.crpss_gaus;
Expand Down Expand Up @@ -230,6 +231,8 @@ void ECNTInfo::set(const PairDataEnsemble &pd) {

// Compute empirical CRPS scores
crps_emp = pd.crps_emp_na.wmean(pd.wgt_na);
// Stub in for now?
crps_emp_fair = pd.crps_emp_fair_na.wmean(pd.wgt_na);
crpscl_emp = pd.crpscl_emp_na.wmean(pd.wgt_na);
crpss_emp = (is_bad_data(crps_emp) ||
is_bad_data(crpscl_emp) ||
Expand Down

0 comments on commit 32c060a

Please sign in to comment.