Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 2003 briercl #2034

Merged
merged 28 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5a7caa2
Per #2003, fix the logic of the log message to state the number of cl…
JohnHalleyGotway Jan 20, 2022
7949663
Per #2003, set block_size = Nx * Ny to make these commands run faster.
JohnHalleyGotway Jan 20, 2022
063d2ac
Per #2003, add climatology_SERIES_ANALYSIS_PROB to unit_climatology.x…
JohnHalleyGotway Jan 25, 2022
807a120
Per #2003, add the climo_cdf dictionary for Series-Analysis. Seems th…
JohnHalleyGotway Jan 25, 2022
b1ca99c
Per #2003, add the Series-Analysis config file used by the new test i…
JohnHalleyGotway Jan 25, 2022
21cabab
Merge branch 'develop' into feature_2003_briercl
JohnHalleyGotway Jan 25, 2022
9fa4712
Merge branch 'develop' into feature_2003_briercl
JohnHalleyGotway Jan 27, 2022
44c2a93
Merge branch 'develop' into feature_2003_briercl
JohnHalleyGotway Jan 28, 2022
a7c639a
Per #2003, this gets BRIERCL and BSS to appear in the Series-Analysis…
JohnHalleyGotway Jan 28, 2022
54a40b8
Per #2003, replace PairBase::climo_cdf from a ClimoCDFInfo object wit…
JohnHalleyGotway Jan 28, 2022
9757ae7
Per #2003, update the vx_statistics library code to handle the ClimoC…
JohnHalleyGotway Jan 28, 2022
fe5a1b6
Per #2003, update the Ensemble-Stat, Grid-Stat, Point-Stat, and Stat-…
JohnHalleyGotway Jan 28, 2022
c11ce3e
Per #2003, working a bit backwards here. Updating the Series-Analysis…
JohnHalleyGotway Jan 28, 2022
06bc393
Per #2003, if block_size is <= 0, automatically reset it to the numbe…
JohnHalleyGotway Jan 29, 2022
59f1c93
Per #2003, add climo_cdf dictionaries to all existing Series-Analysis…
JohnHalleyGotway Jan 29, 2022
59d74d5
Per #2003, ci-run-unit, add support for the climo_cdf.direct_prob con…
JohnHalleyGotway Jan 29, 2022
37b6a97
ci-run-unit Merge branch 'develop' into feature_2003_briercl
JohnHalleyGotway Jan 29, 2022
459a651
Per #2003, error out if no climo prob thresholds are provided when ne…
JohnHalleyGotway Jan 31, 2022
e76ac6b
Per #2003, no code changes, just comments.
JohnHalleyGotway Jan 31, 2022
9ba6b95
Per #2003, ci-run-unit, when aggregating MPR or ORANK lines in Stat-A…
JohnHalleyGotway Jan 31, 2022
4ffaca3
ci-run-unit
JohnHalleyGotway Jan 31, 2022
fa63461
Per #2003, correct the derivation logic for the direct climo probabil…
JohnHalleyGotway Jan 31, 2022
2788ead
Per #2003, correct logic for letting block_size = grid dimension. Can…
JohnHalleyGotway Jan 31, 2022
3f6b150
Per #2003, ci-run-unit, add a test for series_analysis on probability…
JohnHalleyGotway Jan 31, 2022
0eaed5b
Per #2003, tighten up the logic in Series-Analysis for allocating Pai…
JohnHalleyGotway Jan 31, 2022
8db67cb
Per #2003, update the block_size in SeriesAnalysisConfig_climo to set…
JohnHalleyGotway Jan 31, 2022
c3e2703
Per #2003, a little config file cleanup. Remove climo_cdf.write_bins …
JohnHalleyGotway Jan 31, 2022
edcdfd2
Per #2003, this change is unrelated but was requested by John Opatz. …
JohnHalleyGotway Jan 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions met/data/config/GridStatConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ climo_cdf = {
cdf_bins = 1;
center_bins = FALSE;
write_bins = TRUE;
direct_prob = FALSE;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions met/data/config/PointStatConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ climo_cdf = {
cdf_bins = 1;
center_bins = FALSE;
write_bins = TRUE;
direct_prob = FALSE;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
11 changes: 9 additions & 2 deletions met/data/config/SeriesAnalysisConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ climo_stdev = {
file_name = [];
}

climo_cdf = {
cdf_bins = 1;
center_bins = FALSE;
direct_prob = FALSE;
}

////////////////////////////////////////////////////////////////////////////////

//
Expand All @@ -111,8 +117,9 @@ mask = {
}

//
// Number of grid points to be processed concurrently. Set smaller to use
// less memory but increase the number of passes through the data.
// Number of grid points to be processed concurrently. Set smaller to use less
// memory but increase the number of passes through the data. If set <= 0, all
// grid points are processed concurrently.
//
block_size = 1024;

Expand Down
32 changes: 24 additions & 8 deletions met/docs/Users_Guide/config_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1307,8 +1307,8 @@ over the "climo_mean" setting and then updating the "file_name" entry.
The "climo_cdf" dictionary specifies how the the climatological mean
("climo_mean") and standard deviation ("climo_stdev") data are used to
evaluate model performance relative to where the observation value falls
within the climatological distribution. This dictionary consists of 3
entries:
within the climatological distribution. This dictionary consists of the
following entries:

(1)
The "cdf_bins" entry defines the climatological bins either as an integer
Expand All @@ -1320,6 +1320,8 @@ entries:
(3)
The "write_bins" entry may be set to TRUE or FALSE.

(4) The "direct_prob" entry may be set to TRUE or FALSE.

MET uses the climatological mean and standard deviation to construct a normal
PDF at each observation location. The total area under the PDF is 1, and the
climatological CDF value is computed as the area of the PDF to the left of
Expand Down Expand Up @@ -1348,11 +1350,11 @@ an even number of bins can only be uncentered. For example:
5 centered bins (cdf_bins = 5; center_bins = TRUE;) yields:
0.0, 0.125, 0.375, 0.625, 0.875, 1.0

When multiple climatological bins are used, statistics are computed
separately for each bin, and the average of the statistics across those bins
is written to the output. When "write_bins" is true, the statistics for each
bin are also written to the output. The bin number is appended to the
contents of the VX_MASK output column.
When multiple climatological bins are used for Point-Stat and Grid-Stat,
statistics are computed separately for each bin, and the average of the
statistics across those bins is written to the output. When "write_bins"
is true, the statistics for each bin are also written to the output.
The bin number is appended to the contents of the VX_MASK output column.

Setting the number of bins to 1 effectively disables this logic by grouping
all pairs into a single climatological bin.
Expand All @@ -1363,6 +1365,7 @@ all pairs into a single climatological bin.
cdf_bins = 11; or an array of floats
center_bins = TRUE; or FALSE
write_bins = FALSE; or TRUE
direct_prob = FALSE; or TRUE
}

.. _climato_data:
Expand All @@ -1381,7 +1384,18 @@ directly to compute Brier Skill Score (BSS).
When "climo_mean" and "climo_stdev" are both set to non-probability fields,
the MET tools use the mean, standard deviation, and observation event
threshold to derive a normal approximation of the climatological
probabilities. Those derived probability values are used to compute BSS.
probabilities.

The "direct_prob" option controls the derivation logic. When "direct_prob" is
true, the climatological probability is computed directly from the
climatological distribution at each point as the area to the left of
the event threshold value. For greater-than or greater-than-or-equal-to
thresholds, 1.0 minus the area is used. When "direct_prob" is false, the
"cdf_bins" values are sampled from climatological distribution. The probability
is computed as the proportion of those samples which meet the threshold criteria.
In this way, the number of bins impacts the resolution of the climatological
probabilities. These derived probability values are used to compute the
climatological Brier Score and Brier Skill Score.

.. _mask_missing_flag:

Expand Down Expand Up @@ -3593,6 +3607,8 @@ Computation may be memory intensive, especially for large grids.
The "block_size" entry sets the number of grid points to be processed
concurrently (i.e. in one pass through a time series). Smaller values
require less memory but increase the number of passes through the data.
If set less than or equal to 0, it is automatically reset to the number
of grid points, and they are all processed concurrently.

.. code-block:: none

Expand Down
3 changes: 1 addition & 2 deletions met/docs/Users_Guide/series-analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ ____________________

block_size = 1024;

Number of grid points to be processed concurrently. Set smaller to use less memory but increase the number of passes through the data. The amount of memory the Series-Analysis tool consumes is determined by the size of the grid, the length of the series, and the block_size entry defined above. The larger this entry is set the faster the tool will run, subject to the amount of memory available on the machine.

Number of grid points to be processed concurrently. Set smaller to use less memory but increase the number of passes through the data. The amount of memory the Series-Analysis tool consumes is determined by the size of the grid, the length of the series, and the block_size entry defined above. The larger this entry is set the faster the tool will run, subject to the amount of memory available on the machine. If set less than or equal to 0, it is automatically reset to the number of grid points, and they are all processed concurrently.

____________________

Expand Down
10 changes: 6 additions & 4 deletions met/src/basic/vx_config/config_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,11 @@ struct RegridInfo {
//

struct ClimoCDFInfo {
bool flag; // Flag to turn on/off climo CDF logic
int n_bin; // Number of climo CDF cdf bins
ThreshArray cdf_ta; // Array of CDF thresholds
bool write_bins; // Flag for writing the individual bins
bool flag; // Flag to turn on/off climo CDF logic
int n_bin; // Number of climo CDF cdf bins
ThreshArray cdf_ta; // Array of CDF thresholds
bool write_bins; // Flag for writing the individual bins
bool direct_prob; // Flag for the direct computation of probs

ClimoCDFInfo();
void clear();
Expand Down Expand Up @@ -665,6 +666,7 @@ static const char conf_key_climo_cdf[] = "climo_cdf";
static const char conf_key_cdf_bins[] = "cdf_bins";
static const char conf_key_center_bins[] = "center_bins";
static const char conf_key_write_bins[] = "write_bins";
static const char conf_key_direct_prob[] = "direct_prob";
static const char conf_key_time_interp_method[] = "time_interp_method";
static const char conf_key_day_interval[] = "day_interval";
static const char conf_key_hour_interval[] = "hour_interval";
Expand Down
7 changes: 6 additions & 1 deletion met/src/basic/vx_config/config_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,7 @@ void ClimoCDFInfo::clear() {
n_bin = 0;
cdf_ta.clear();
write_bins = false;
direct_prob = false;
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1589,9 +1590,13 @@ ClimoCDFInfo parse_conf_climo_cdf(Dictionary *dict) {
center = cdf_dict->lookup_bool(conf_key_center_bins);

// Conf: write_bins
// Used by Grid-Stat and Point-Stat but not by Ensemble-Stat
// Used by Grid-Stat and Point-Stat
// Not used by Ensemble-Stat or Series-Analysis
info.write_bins = cdf_dict->lookup_bool(conf_key_write_bins, false, false);

// Conf: direct_prob
info.direct_prob = cdf_dict->lookup_bool(conf_key_direct_prob, false, false);

// Check that at least one value is provided
if(bins.n() == 0) {
mlog << Error << "\nparse_conf_climo_cdf() -> "
Expand Down
2 changes: 1 addition & 1 deletion met/src/libcode/vx_statistics/compute_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ void compute_pctinfo(const PairDataPoint &pd, bool pstd_flag,
// Use input climatological probabilities or derive them
if(cmn_flag) {
if(cprob_in) climo_prob = *cprob_in;
else climo_prob = derive_climo_prob(pd.cdf_info,
else climo_prob = derive_climo_prob(pd.cdf_info_ptr,
pd.cmn_na, pd.csd_na,
pct_info.othresh);
}
Expand Down
2 changes: 1 addition & 1 deletion met/src/libcode/vx_statistics/ens_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ void RPSInfo::set(const PairDataEnsemble &pd) {
climo_pct.zero_out();

// Derive climatological probabilities
if(cmn_flag) climo_prob = derive_climo_prob(pd.cdf_info,
if(cmn_flag) climo_prob = derive_climo_prob(pd.cdf_info_ptr,
pd.cmn_na, pd.csd_na,
fthresh[i]);

Expand Down
Loading