Skip to content

Commit

Permalink
Per #1905, correct ssvar logic for skipping the ensemble control member.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Oct 30, 2021
1 parent 872c50f commit 07e7d51
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions met/src/libcode/vx_statistics/pair_data_ensemble.cc
Original file line number Diff line number Diff line change
Expand Up @@ -652,11 +652,14 @@ void PairDataEnsemble::compute_ssvar() {
for(i=0; i<o_na.n(); i++) {

// Check if point should be skipped
// Exclude the control member from the variance
if(skip_ba[i] || i == ctrl_index) continue;
if(skip_ba[i]) continue;

// Store ensemble values for the current observation
for(j=0, cur.erase(); j<n_ens; j++) cur.add(e_na[j][i]);
// Exclude the control member from the variance
for(j=0, cur.erase(); j<n_ens; j++) {
if(j == ctrl_index) continue;
cur.add(e_na[j][i]);
}

// Build a variance point
ens_ssvar_pt pt;
Expand Down

0 comments on commit 07e7d51

Please sign in to comment.