Skip to content

Commit

Permalink
Per #2170, fix the agg ecnt logic in stat_analysis to write the ensem…
Browse files Browse the repository at this point in the history
…ble mean based stats that it computes.
  • Loading branch information
JohnHalleyGotway committed Jun 9, 2022
1 parent f90b73e commit 6052295
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/libcode/vx_statistics/ens_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ void ECNTInfo::set(const PairDataEnsemble &pd) {
double fbar, obar, ffbar, oobar, fobar;
NumArray cur;

// Initalize
clear();

// Store the number of ensemble members
n_ens = pd.n_ens;

Expand Down Expand Up @@ -257,9 +260,17 @@ void ECNTInfo::set(const PairDataEnsemble &pd) {
}
}

// Compute ensemble mean based statistics, if possible
// Check if the ensemble mean based statistics were
// already computed by Stat-Analysis
if(!is_bad_data(pd.me)) {
me = pd.me;
rmse = pd.rmse;
me_oerr = pd.me_oerr;
rmse_oerr = pd.rmse_oerr;
}
// If not, compute them from the pairs, if possible
// HiRA stores the ensemble mean as bad data
if(!pd.mn_na.is_const(bad_data_double)) {
else if(!pd.mn_na.is_const(bad_data_double)) {

// Compute ME and RMSE values
fbar = obar = ffbar = oobar = fobar = 0.0;
Expand Down

0 comments on commit 6052295

Please sign in to comment.