Skip to content

Commit

Permalink
Per #2232, add SPREAD_MD to the ECNT line type from Ensemble-Stat and…
Browse files Browse the repository at this point in the history
… computed for HiRA.
  • Loading branch information
JohnHalleyGotway committed Nov 2, 2022
1 parent 5dc4e4d commit 28838ab
Show file tree
Hide file tree
Showing 13 changed files with 95 additions and 51 deletions.
2 changes: 1 addition & 1 deletion data/table_files/met_header_columns_V11.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ V11.0 : STAT : PJC : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID
V11.0 : STAT : PRC : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL (N_THRESH) THRESH_[0-9]* PODY_[0-9]* POFD_[0-9]*
V11.0 : STAT : PSTD : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL (N_THRESH) BASER BASER_NCL BASER_NCU RELIABILITY RESOLUTION UNCERTAINTY ROC_AUC BRIER BRIER_NCL BRIER_NCU BRIERCL BRIERCL_NCL BRIERCL_NCU BSS BSS_SMPL THRESH_[0-9]*
V11.0 : STAT : ECLV : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL BASER VALUE_BASER (N_PTS) CL_[0-9]* VALUE_[0-9]*
V11.0 : STAT : ECNT : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL N_ENS CRPS CRPSS IGN ME RMSE SPREAD ME_OERR RMSE_OERR SPREAD_OERR SPREAD_PLUS_OERR CRPSCL CRPS_EMP CRPSCL_EMP CRPSS_EMP CRPS_EMP_FAIR MAE MAE_OERR BIAS_RATIO N_GE_OBS ME_GE_OBS N_LT_OBS ME_LT_OBS
V11.0 : STAT : ECNT : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL N_ENS CRPS CRPSS IGN ME RMSE SPREAD ME_OERR RMSE_OERR SPREAD_OERR SPREAD_PLUS_OERR CRPSCL CRPS_EMP CRPSCL_EMP CRPSS_EMP CRPS_EMP_FAIR SPREAD_MD MAE MAE_OERR BIAS_RATIO N_GE_OBS ME_GE_OBS N_LT_OBS ME_LT_OBS
V11.0 : STAT : RPS : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL N_PROB RPS_REL RPS_RES RPS_UNC RPS RPSS RPSS_SMPL RPS_COMP
V11.0 : STAT : RHIST : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL (N_RANK) RANK_[0-9]*
V11.0 : STAT : PHIST : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL BIN_SIZE (N_BIN) BIN_[0-9]*
Expand Down
29 changes: 25 additions & 4 deletions docs/Users_Guide/appendixC.rst
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ CRPS

Called "CRPS", "CRPSCL", "CRPS_EMP", "CRPS_EMP_FAIR" and "CRPSCL_EMP" in ECNT output :numref:`table_ES_header_info_es_out_ECNT`

The continuous ranked probability score (CRPS) is the integral, over all possible thresholds, of the Brier scores (:ref:`Gneiting et al., 2004 <Gneiting-2004>`). In MET, the CRPS is calculated two ways: using a normal distribution fit to the ensemble forecasts (CRPS and CRPSCL), and using the empirical ensemble distribution (CRPS_EMP and CRPSCL_EMP). The empirical ensemble CRPS is also adjusted by subtracting 1/2(m) times the mean absolute difference of the ensemble members (where m is the ensemble size), this is saved as CRPS_EMP_FAIR. In some cases, use of other distributions would be better.
The continuous ranked probability score (CRPS) is the integral, over all possible thresholds, of the Brier scores (:ref:`Gneiting et al., 2004 <Gneiting-2004>`). In MET, the CRPS is calculated two ways: using a normal distribution fit to the ensemble forecasts (CRPS and CRPSCL), and using the empirical ensemble distribution (CRPS_EMP and CRPSCL_EMP). The empirical ensemble CRPS can be adjusted (bias corrected) by subtracting 1/(2*m) times the mean absolute difference of the ensemble members, where m is the ensemble size. This is reported as a separate statistic called CRPS_EMP_FAIR. In some cases, use of other distributions would be better.

WARNING: The normal distribution is probably a good fit for temperature and pressure, and possibly a not horrible fit for winds. However, the normal approximation will not work on most precipitation forecasts and may fail for many other atmospheric variables.

Expand All @@ -987,13 +987,34 @@ Closed form expressions for the CRPS are difficult to define when using data rat

In this equation, the y represents the event threshold. The estimated mean and standard deviation of the ensemble forecasts ( :math:`\mu \text{ and } \sigma`) are used as the parameters of the normal distribution. The values of the normal distribution are represented by the probability density function (PDF) denoted by :math:`\Phi` and the cumulative distribution function (CDF), denoted in the above equation by :math:`\phi`.

The overall CRPS is calculated as the average of the individual measures. In equation form: :math:`\text{CRPS} = \text{average(crps) } = \frac{1}{N} \sum_i^N \text{crps}_i`.
The overall CRPS is calculated as the average of the individual measures. In equation form:

.. math:: \text{CRPS} = \text{average(crps) } = \frac{1}{N} \sum_{i=1}^N \text{crps}_i

The score can be interpreted as a continuous version of the mean absolute error (MAE). Thus, the score is negatively oriented, so smaller is better. Further, similar to MAE, bias will inflate the CRPS. Thus, bias should also be calculated and considered when judging forecast quality using CRPS.

To calculate CRPS_EMP_FAIR (bias adjusted, empirical ensemble CRPS)
To calculate crps_emp_fair (bias adjusted, empirical ensemble CRPS) for each individual observation with m ensemble members:

.. math:: \text{crps_emp_fair}_i = \text{crps_emp}_i - \frac{1}{2*m} * \frac{1}{m*(m-1)} \sum_{i \ne j}|f_{i} - f_{j}|

The overall CRPS_EMP_FAIR is calculated as the average of the individual measures. In equation form:

.. math:: \text{CRPS_EMP_FAIR} = \text{average(crps_emp_fair) } = \frac{1}{N} \sum_{i=1}^N \text{crps_emp_fair}_i

Ensemble Mean Absolute Difference
---------------------------------

Called "SPREAD_MD" in ECNT output :numref:`table_ES_header_info_es_out_ECNT`

The ensemble mean absolute difference is an alternative measure of ensemble spread. It is computed for each individual observation (denoted by a lowercase spread_md) with m ensemble members:

.. math:: \text{spread_md}_i = \frac{1}{m*(m-1)} \sum_{i \ne j}|f_{i} - f_{j}|

The overall SPREAD_MD is calculated as the average of the individual measures. In equation form:

.. math:: \text{SPREAD_MD} = \text{average(spread_md) } = \frac{1}{N} \sum_{i=1}^N \text{spread_md}_i

.. math:: \text{CRPS_EMP_FAIR} = \text{CRPS_EMP} - \frac{1}{2*n} * \frac{1}{n*(n-1)} \sum|f_{i} - f_{j}|
A perfect forecast would have ensemble mean absolute difference = 0.

CRPS Skill Score
----------------
Expand Down
19 changes: 11 additions & 8 deletions docs/Users_Guide/ensemble-stat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Often, the goal of ensemble forecasting is to reproduce the distribution of obse

The relative position (RELP) is a count of the number of times each ensemble member is closest to the observation. For stochastic or randomly derived ensembles, this statistic is meaningless. For specified ensemble members, however, it can assist users in determining if any ensemble member is performing consistently better or worse than the others.

The ranked probability score (RPS) is included in the Ranked Probability Score (RPS) line type. It is the mean of the Brier scores computed from ensemble probabilities derived for each probability category threshold (prob_cat_thresh) specified in the configuration file. The continuous ranked probability score (CRPS) is the average the distance between the forecast (ensemble) cumulative distribution function and the observation cumulative distribution function. It is an analog of the Brier score, but for continuous forecast and observation fields. The CRPS statistic is computed using two methods: assuming a normal distribution defined by the ensemble mean and spread (:ref:`Gneiting et al., 2004 <Gneiting-2004>`) and using the empirical ensemble distribution (:ref:`Hersbach, 2000 <Hersbach-2000>`). The CRPS statistic using the empirical ensemble distribution can be adjusted (bias corrected) by subtracting 1/2(m) times the mean absolute difference of the ensemble members (where m is the ensemble size), this is saved as a separate stastics called CRPS_EMP_FAIR. The CRPS (and CRPS FAIR) statistic is included in the Ensemble Continuous Statistics (ECNT) line type, along with other statistics quantifying the ensemble spread and ensemble mean skill.
The ranked probability score (RPS) is included in the Ranked Probability Score (RPS) line type. It is the mean of the Brier scores computed from ensemble probabilities derived for each probability category threshold (prob_cat_thresh) specified in the configuration file. The continuous ranked probability score (CRPS) is the average the distance between the forecast (ensemble) cumulative distribution function and the observation cumulative distribution function. It is an analog of the Brier score, but for continuous forecast and observation fields. The CRPS statistic is computed using two methods: assuming a normal distribution defined by the ensemble mean and spread (:ref:`Gneiting et al., 2004 <Gneiting-2004>`) and using the empirical ensemble distribution (:ref:`Hersbach, 2000 <Hersbach-2000>`). The CRPS statistic using the empirical ensemble distribution can be adjusted (bias corrected) by subtracting 1/(2*m) times the mean absolute difference of the ensemble members, where m is the ensemble size. This is reported as a separate statistic called CRPS_EMP_FAIR. The empirical CRPS and its fair version are included in the Ensemble Continuous Statistics (ECNT) line type, along with other statistics quantifying the ensemble spread and ensemble mean skill.

The Ensemble-Stat tool can derive ensemble relative frequencies and verify them as probability forecasts all in the same run. Note however that these simple ensemble relative frequencies are not actually calibrated probability forecasts. If probabilistic line types are requested (output_flag), this logic is applied to each pair of fields listed in the forecast (fcst) and observation (obs) dictionaries of the configuration file. Each probability category threshold (prob_cat_thresh) listed for the forecast field is applied to the input ensemble members to derive a relative frequency forecast. The probability category threshold (prob_cat_thresh) parsed from the corresponding observation entry is applied to the (gridded or point) observations to determine whether or not the event actually occurred. The paired ensemble relative freqencies and observation events are used to populate an Nx2 probabilistic contingency table. The dimension of that table is determined by the probability PCT threshold (prob_pct_thresh) configuration file option parsed from the forecast dictionary. All probabilistic output types requested are derived from the this Nx2 table and written to the ascii output files. Note that the FCST_VAR name header column is automatically reset as "PROB({FCST_VAR}{THRESH})" where {FCST_VAR} is the current field being evaluated and {THRESH} is the threshold that was applied.

Expand Down Expand Up @@ -622,26 +622,29 @@ The format of the STAT and ASCII output of the Ensemble-Stat tool are described
- The Continuous Ranked Probability Skill Score (empirical distribution)
* - 41
- CRPS_EMP_FAIR
- The Continuous Ranked Probability Skill Score (empirical distribution) adjusted by subtracting 1/2(m) times the mean absolute difference of the ensemble members (m is the ensemble size)
- The Continuous Ranked Probability Score (empirical distribution) adjusted by the mean absolute difference of the ensemble members
* - 42
- SPREAD_MD
- The pairwise Mean Absolute Difference of the unperturbed ensemble members
* - 43
- MAE
- The Mean Absolute Error of the ensemble mean (unperturbed or supplied)
* - 43
* - 44
- MAE_OERR
- The Mean Absolute Error of the PERTURBED ensemble mean (e.g. with Observation Error)
* - 44
* - 45
- BIAS_RATIO
- The Bias Ratio
* - 45
* - 46
- N_GE_OBS
- The number of ensemble values greater than or equal to their observations
* - 46
* - 47
- ME_GE_OBS
- The Mean Error of the ensemble values greater than or equal to their observations
* - 47
* - 48
- N_LT_OBS
- The number of ensemble values less than their observations
* - 48
* - 49
- ME_LT_OBS
- The Mean Error of the ensemble values less than or equal to their observations

Expand Down
2 changes: 1 addition & 1 deletion internal/test_unit/hdr/met_11_0.hdr
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PJC : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_L
PRC : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL N_THRESH _VAR_
PSTD : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL N_THRESH BASER BASER_NCL BASER_NCU RELIABILITY RESOLUTION UNCERTAINTY ROC_AUC BRIER BRIER_NCL BRIER_NCU BRIERCL BRIERCL_NCL BRIERCL_NCU BSS BSS_SMPL _VAR_
ECLV : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL BASE N_PTS _VAR_
ECNT : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL N_ENS CRPS CRPSS IGN ME RMSE SPREAD ME_OERR RMSE_OERR SPREAD_OERR SPREAD_PLUS_OERR CRPSCL CRPS_EMP CRPSCL_EMP CRPSS_EMP CRPS_EMP_FAIR MAE MAE_OERR BIAS_RATIO N_GE_OBS ME_GE_OBS N_LT_OBS ME_LT_OBS
ECNT : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL N_ENS CRPS CRPSS IGN ME RMSE SPREAD ME_OERR RMSE_OERR SPREAD_OERR SPREAD_PLUS_OERR CRPSCL CRPS_EMP CRPSCL_EMP CRPSS_EMP CRPS_EMP_FAIR SPREAD_MD MAE MAE_OERR BIAS_RATIO N_GE_OBS ME_GE_OBS N_LT_OBS ME_LT_OBS
RPS : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL N_PROB RPS_REL RPS_RES RPS_UNC RPS RPSS RPSS_SMPL RPS_COMP
RHIST : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL CRPS IGN N_RANK CRPSS SPREAD _VAR_
PHIST : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL BIN_SIZE N_BIN _VAR_
Expand Down
7 changes: 4 additions & 3 deletions src/basic/vx_util/stat_column_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,10 @@ static const char * ecnt_columns [] = {
"RMSE", "SPREAD", "ME_OERR",
"RMSE_OERR", "SPREAD_OERR", "SPREAD_PLUS_OERR",
"CRPSCL", "CRPS_EMP", "CRPSCL_EMP",
"CRPSS_EMP", "CRPS_EMP_FAIR", "MAE",
"MAE_OERR", "BIAS_RATIO", "N_GE_OBS",
"ME_GE_OBS", "N_LT_OBS", "ME_LT_OBS"
"CRPSS_EMP", "CRPS_EMP_FAIR", "SPREAD_MD",
"MAE", "MAE_OERR", "BIAS_RATIO",
"N_GE_OBS", "ME_GE_OBS", "N_LT_OBS",
"ME_LT_OBS"
};

static const char * rps_columns [] = {
Expand Down
24 changes: 14 additions & 10 deletions src/libcode/vx_stat_out/stat_columns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4225,9 +4225,10 @@ void write_ecnt_cols(const ECNTInfo &ecnt_info,
// RMSE, SPREAD, ME_OERR,
// RMSE_OERR, SPREAD_OERR, SPREAD_PLUS_OERR,
// CRPSCL, CRPS_EMP, CRPSCL_EMP,
// CRPSS_EMP CRPS_EMP_FAIR, MAE,
// MAE_OERR, BIAS RATIO, N_GE_OBS,
// ME_GE_OBS, N_LT_OBS, ME_LT_OBS
// CRPSS_EMP CRPS_EMP_FAIR, SPREAD_MD,
// MAE, MAE_OERR, BIAS_RATIO,
// N_GE_OBS, ME_GE_OBS, N_LT_OBS,
// ME_LT_OBS
//
at.set_entry(r, c+0, // Total Number of Pairs
ecnt_info.n_pair);
Expand Down Expand Up @@ -4280,25 +4281,28 @@ void write_ecnt_cols(const ECNTInfo &ecnt_info,
at.set_entry(r, c+16, // Empirical ensemble CRPS FAIR
ecnt_info.crps_emp_fair);

at.set_entry(r, c+17, // MAE for unperturbed ensemble mean
at.set_entry(r, c+17, // Mean absolute difference measure of spread
ecnt_info.spread_md);

at.set_entry(r, c+18, // MAE for unperturbed ensemble mean
ecnt_info.mae);

at.set_entry(r, c+18, // MAE for mean of perturbed members
at.set_entry(r, c+19, // MAE for mean of perturbed members
ecnt_info.mae_oerr);

at.set_entry(r, c+19, // Bias Ratio
at.set_entry(r, c+20, // Bias Ratio
ecnt_info.bias_ratio);

at.set_entry(r, c+20, // Number of ensemble values >= observations
at.set_entry(r, c+21, // Number of ensemble values >= observations
ecnt_info.n_ge_obs);

at.set_entry(r, c+21, // ME of ensemble values >= observations
at.set_entry(r, c+22, // ME of ensemble values >= observations
ecnt_info.me_ge_obs);

at.set_entry(r, c+22, // Number of ensemble values < observations
at.set_entry(r, c+23, // Number of ensemble values < observations
ecnt_info.n_lt_obs);

at.set_entry(r, c+23, // ME of ensemble values < observations
at.set_entry(r, c+24, // ME of ensemble values < observations
ecnt_info.me_lt_obs);

return;
Expand Down
18 changes: 11 additions & 7 deletions src/libcode/vx_statistics/ens_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,14 @@ void ECNTInfo::init_from_scratch() {
void ECNTInfo::clear() {

othresh.clear();
n_ens = n_pair = 0;
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 = mae = rmse = spread = bad_data_double;
me_oerr = mae_oerr = rmse_oerr = spread_oerr = bad_data_double;
spread_plus_oerr = bad_data_double;
n_ens = n_pair = 0;
crps_emp = crpscl_emp = crpss_emp = bad_data_double;
crps_emp_fair = spread_md = bad_data_double;
crps_gaus = crpscl_gaus = crpss_gaus = bad_data_double;
ign = bad_data_double;
me = mae = rmse = spread = bad_data_double;
me_oerr = mae_oerr = rmse_oerr = spread_oerr = bad_data_double;
spread_plus_oerr = bad_data_double;

n_ge_obs = n_lt_obs = 0;
me_ge_obs = me_lt_obs = bias_ratio = bad_data_double;
Expand All @@ -203,6 +204,7 @@ void ECNTInfo::assign(const ECNTInfo &c) {
crpscl_emp = c.crpscl_emp;
crpss_emp = c.crpss_emp;
crps_emp_fair = c.crps_emp_fair;
spread_md = c.spread_md;

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

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;

spread_md = pd.spread_md_na.wmean(pd.wgt_na);

crpscl_emp = pd.crpscl_emp_na.wmean(pd.wgt_na);
crpss_emp = (is_bad_data(crps_emp) ||
Expand Down
Loading

0 comments on commit 28838ab

Please sign in to comment.