Skip to content

Commit

Permalink
Per #2170, port the bugfix over from the develop branch to the main_v…
Browse files Browse the repository at this point in the history
…10.1 branch.
  • Loading branch information
JohnHalleyGotway committed Jun 9, 2022
1 parent b62ea2a commit 87926a4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
7 changes: 7 additions & 0 deletions met/docs/Users_Guide/config_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ The configuration file language supports the following data types:
and 10 and "==1||==2" defines numbers exactly equal to 1 or 2.

* Percentile Thresholds:

* A threshold type (<, <=, ==, !-, >=, or >), followed by a percentile
type description (SFP, SOP, SCP, USP, CDP, or FBIAS), followed by a
numeric value, typically between 0 and 100.

* Note that the two letter threshold type abbreviations (lt, le, eq, ne,
gt, gt) are not supported for percentile thresholds.

* Thresholds may be defined as percentiles of the data being processed in
several places:
Expand Down
15 changes: 13 additions & 2 deletions met/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 87926a4

Please sign in to comment.