Skip to content

Commit

Permalink
Update develop-ref after #2861 (#2863)
Browse files Browse the repository at this point in the history
* 2673 Moved dvariable declaration after include

* #2673 Move down namespace below include

* Feature #2395 wdir (#2820)

* Per #2395, add new columns to VL1L2, VAL1L2, and VCNT line types for wind direction statistics. Work still in progress.

* Per #2395, write the new VCNT columns to the output and document the additions to the VL1L2, VAL1L2, and VCNT columns.

* Per #2395, add the definition of new statistics to Appendix G.

* Per #2395, update file version history.

* Per #2395, tweak warning message about zero wind vectors and update grid-stat and point-stat to log calls to the do_vl1l2() function.

* Per #2395, refine the weights for wind direction stats, ignoring the undefined directions.

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Update src/tools/core/stat_analysis/parse_stat_line.cc

* Update src/tools/core/stat_analysis/aggr_stat_line.cc

* Recent changes to branch protection rules for the develop branch have broken the logic of the update_truth.yml GHA workflow. Instead of submitting a PR to merge develop into develop-ref directly, use an intermediate update_truth_for_develop branch.

* Feature #2280 ens_prob (#2823)

* Per #2280, update to support probability threshold strings like ==8, where 8 is the number of ensemble members, to create probability bins centered on the n/8 for n = 0 ... 8.

* Per #2280, update docs about probability threshold settings.

* Per #2280, use a loose tolerance when checking for consistent bin widths.

* Per #2280, add a new unit test for grid_stat to demonstrate processing the output from gen_ens_prod.

* Per #2280, when verifying NMEP probability forecasts, smooth the obs data first.

* Per #2280, only request STAT output for the PCT line type to match unit_grid_stat.xml and minimize the new output files.

* Per #2280, update config option docs.

* Per #2280, update config option docs.

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Change 0 to nullptr

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 Removed the redundant parentheses with return

* #2673 restored return statement

* #2673 Added std namespace

* #2673 Moved down 'using namespace' statement. Removed trailing spaces

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Moved down 'using namespace' statement.

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Added std namespace

* #2673 Changed literal 1 to boolean value, true

* Feature #2673 enum_to_string (#2835)

* Feature #2583 ecnt (#2825)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Revert #2825 since more documentation and testing is needed (#2837)

This reverts commit 108a895.

* Feature #2583 ecnt fix IGN_OERR_CORR (#2838)

* Unrelated to #2583, fix typo in code comments.

* Per #2583, add hooks write 3 new ECNT columns for observation error data.

* Per #2583, make error messages about mis-matched array lengths more informative.

* Per #2583, switch to more concise variable naming conventions of ign_oerr_cnv, ign_oerr_cor, and dawid_seb.

* Per #2583, fix typo to enable compilation

* Per #2583, define the 5 new ECNT column names.

* Per #2583, add 5 new columns to the ECNT table in the Ensemble-Stat chapter

* Per #2583, update stat_columns.cc to write these 5 new ECNT columns

* Per #2583, update ECNTInfo class to compute the 5 new ECNT statistics.

* Per #2583, update stat-analysis to parse the 5 new ECNT columns.

* Per #2583, update aggregate_stat logic for 5 new ECNT columns.

* Per #2583, update PairDataEnsemble logic for 5 new ECNT columns

* Per #2583, update vx_statistics library with obs_error handling logic for the 5 new ECNT columns

* Per #2583, changes to make it compile

* Per #2583, changes to make it compile

* Per #2583, switch to a consistent ECNT column naming convention with OERR at the end. Using IGN_CONV_OERR and IGN_CORR_OERR.

* Per #2583, define ObsErrorEntry::variance() with a call to the dist_var() utility function.

* Per #2583, update PairDataEnsemble::compute_pair_vals() to compute the 5 new stats with the correct inputs.

* Per #2583, add DEBUG(10) log messages about computing these new stats.

* Per #2583, update Stat-Analysis to compute these 5 new stats from the ORANK line type.

* Per #2583, whitespace and comments.

* Per #2583, update the User's Guide.

* Per #2583, remove the DS_ADD_OERR and DS_MULT_OERR ECNT columns and rename DS_OERR as DSS, since observation error is not actually involved in its computation.

* Per #2583, minor update to Appendix C

* Per #2583, rename ECNT line type statistic DSS to IDSS.

* Per #2583, fix a couple of typos

* Per #2583, more error checking.

* Per #2583, remove the ECNT IDSS column since its just 2*pi*IGN, the existing ignorance score, and only provides meaningful information when combined with the other Dawid-Sebastiani statistics that have already been removed.

* Per #2583, add Eric's documentation of these new stats to Appendix C. Along the way, update the DOI links in the references based on this APA style guide: https://apastyle.apa.org/style-grammar-guidelines/references/dois-urls#:~:text=Include%20a%20DOI%20for%20all,URL%2C%20include%20only%20the%20DOI.

* Per #2583, fix new equations with embedded underscores for PDF by defining both html and pdf formatting options.

* Per #2583, update the ign_conv_oerr equation to include a 2
*pi multiplier for consistency with the existing ignorance score. Also, fix the documented equations.

* Per #2583, remove log file that was inadvertently added on this branch.

* Per #2583, simplify ObsErrorEntry::variance() implementation. For the distribution type of NONE, return a variance of 0.0 rather than bad data, as discussed with @michelleharrold and @JeffBeck-NOAA on 3/8/2024.

* Per #2583, updates to ensemble-stat.rst recommended by @michelleharrold and @JeffBeck-NOAA.

* Per #2583, implement changes to the IGN_CORR_OERR corrected as directed by @ericgilleland.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Update the pull request template to include a question about expected impacts to existing METplus Use Cases.

* #2830 Changed enum Builtin to enum class

* #2830 Converted enum to enum class at config_constants.h

* Feature #2830 bootstrap enum (#2843)

* Bugfix #2833 develop azimuth (#2840)

* Per #2833, fix n-1 bug when defining the azimuth delta for range/azimuth grids.

* Per #2833, when definng TcrmwData:range_max_km, divide by n_range - 1 since the range values start at 0.

* Per #2833, remove max_range_km from the TC-RMW config file. Set the default rmw_scale to NA so that its not used by default. And update the documentation. Still actually need to make the logic of the code work as it should.

* Per #2833, update tc_rmw to define the range as either a function of rmw or using explicit spacing in km.

* Per #2833, update the TCRMW Config files to remove the max_range_km entry, and update the unit test for one call to use RMW ranges and the other to use ranges defined in kilometers.

* Per #2833, just correct code comments.

* Per #2833, divide by n - 1 when computing the range delta, rather than n.

* Per #2833, correct the handling of the maximum range in the tc-rmw tool. For fixed delta km, need to define the max range when setting up the grid at the beginning.

---------

Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* #2830 Changed enum PadSize to enum class

* #2830 Removed redundant parantheses

* #2830 Removed commenyted out code

* #2830 Use auto

* #2830 Changed enum to enum class for DistType, InterpMthd, GridTemplates, and NormalizeType

* #2830 Moved enum_class_as_integer from header file to cc files

* #2830 Added enum_as_int.hpp

* #2830 Added enum_as_int.hpp

* Deleted enum_class_as_integer and renamed it to enum_class_as_int

* Removed redundant paranthese

* #2830 Changed enum to enumclass

* #2830 Changed enum_class_as_integer to enum_class_as_int

* Feature #2379 sonarqube gha (#2847)

* Per #2379, testing initial GHA SonarQube setup.

* Per #2379, switch to only analyzing the src directory.

* Per #2379, move more config logic from sonar-project.properties into the workflow. #ci-skip-all

* Per #2379, try removing + symbols

* Per #2379, move projectKey into xml workflow and remove sonar-project.properties.

* Per #2379, try following the instructions at https://github.com/sonarsource-cfamily-examples/linux-autotools-gh-actions-sq/blob/main/.github/workflows/build.yml ci-skip-all

* Per #2379, see details of progress described in this issue comment: #2379 (comment)

* Unrelated to #2379, just removing spurious space that gets flagged as a diff when re-running enum_to_string on seneca.

* Per #2379, try running SonarQube through GitHub.

* Per #2379, remove empty env section and also disable the testing workflow temporarily during sonarqube development.

* Per #2379, fix docker image name.

* Per #2379, delete unneeded script.

* Per #2379, update GHA to scan Python code and push to the correct SonarQube projects.

* Per #2379, update GHA SonarQube project names

* Per #2379, update the build job name

* Per #2379, update the comile step name

* Per #2379, switch to consistent SONAR variable names.

* Per #2379, fix type in sed expressions.

* Per #2379, just rename the log artifact

* Per #2379, use time_command wrapper instead of run_command.

* Per #2379, fix bad env var name

* Per #2379, switch from egrep to grep.

* Per #2379, just try cat-ting the logfile

* Per #2379, test whether cat-ting the log file actually works.

* Per #2379, revert back

* Per #2379, mention SonarQube in the PR template. Make workflow name more succinct.

* Per #2379, add SONAR_REFERENCE_BRANCH setting to define the sonar.newCode.referenceBranch property. The goal is to define the comparison reference branch for each SonarQube scan.

* Per #2379, have the sonarqube.yml job print the reference branch it's using

* Per #2379, intentionally introduce a new code smell to see if SonarQube correctly flag it as appearing in new code.

* Per #2379, trying adding the SonarQube quality gate check.

* Per #2379, add logic for using the report-task.txt output files to check the quality gate status for both the python and cxx scans.

* Per #2379 must use unique GHA id's

* Per #2379, working on syntax for quality gate checks

* Per #2379, try again.

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try again

* Per #2379, try yet again

* Per #2379

* Per #2379, add more debug

* Per #2379, remove -it option from docker run commands

* Per #2379, again

* Per #2379, now that the scan works as expected, remove the intentional SonarQube code smell as well as debug logging.

* Hotfix related to #2379. The sonar.newCode.referenceBranch and sonar.branch.name cannot be set to the same string! Only add the newCode definition when they differ.

* #2830 Changed enum STATJobType to enum class

* #2830 Changed STATLineType to enum class

* #2830 Changed Action to enum class

* #2830 Changed ModeDataType to enum class

* #2830 Changed StepCase to enum class

* #2830 Changed enum to enum class

* #2830 Changed GenesisPairCategory to enum class

* #2830 Removed rediundabt parenrthese

* #2830 Reduced same if checking

* #2830 Cleanup

* #2830 USe empty() instead of lebgth checking

* #2830 Adjusted indentations

* Feature #2379 develop sonarqube updates (#2850)

* Per #2379, move rgb2ctable.py into the python utility scripts directory for better organization and to enable convenient SonarQube scanning.

* Per #2379, remove point.py from the vx_python3_utils directory which cleary was inadvertenlty added during development 4 years ago. As far as I can tell it isn't being called by any other code and doesn't belong in the repository. Note that scripts/python/met/point.py has the same name but is entirely different.

* Per #2379, update the GHA SonarQube scan to do a single one with Python and C++ combined. The nightly build script is still doing 2 separate scans for now. If this all works well, they could also be combined into a single one.

* Per #2379, eliminate MET_CONFIG_OPTIONS from the SonarQube workflow since it doesn't need to be and probably shouldn't be configurable.

* Per #2379, trying to copy report-task.txt out of the image

* Per #2379, update build_met_sonarqube.sh to check the scan return status

* Per #2379, fix bash assignment syntax

* Per #2379, remove unused SCRIPT_DIR envvar

* Per #2379, switch to a single SonarQube scan for MET's nightly build as well

* Feature 2654 ascii2nc polar buoy support (#2846)

* Added iabp data type, and modified file_handler to filter based on time range, which was added as a command line option

* handle time using input year, hour, min, and doy

* cleanup and switch to position day of year for time computations

* Added an ascii2nc unit test for iabp data

* Added utility scripts to pull iabp data from the web and find files in a time range

* Modified iabp_handler to always output a placeholder 'location' observation with value 1

* added description of IABP data python utility scripts

* Fixed syntax error

* Fixed Another syntax error.

* Slight reformat of documentation

* Per #2654, update the Makefiles in scripts/python/utility to include all the python scripts that should be installed.

* Per #2654, remove unused code from get_iabp_from_web.py that is getting flagged as a bug by SonarQube.

* Per #2654, fix typo in docs

---------

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>

* Feature #2786 rpss_from_prob (#2861)

* Per #2786, small change to a an error message unrelated to this development.

* Per #2786, add RPSInfo::set_climo_prob() function to derive the RPS line type from climatology probability bins. And update Ensemble-Stat to call it.

* Per #2786, minor change to clarify error log message.

* Per #2786, for is_prob = TRUE input, the RPS line type is the only output option. Still need to update docs!

* Per #2786, add new call to Ensemble-Stat to test computing RPS from climo probabilities

* Per #2786, use name rps_climo_bin_prob to be very explicit.

* Per #2786, redefine logic of RPSInfo::set_climo_bin_prob() to match the CPC definition. Note that reliability, resolution, uncertainty, and RPSS based on the sample climatology are all set to bad data. Need to investigate whether they can be computed using these inputs.

* Per #2786, remove the requirement that any fcst.prob_cat_thresh thresholds must be defined. If they are defined, pass them through to the FCST_THRESH output column. If not, write NA. Add check to make sure the event occurs in exactly 1 category.

* Per #2786, don't enforce fcst.prob_cat_thresh == obs.prob_cat_thresh for probabilistic inputs. And add more is_prob checks so that only the RPS line type can be written when given probabilistic inputs.

* updated documentation

* Per #2786, call rescale_probability() function to convert from 0-100 probs to 0-1 probs.

---------

Co-authored-by: j-opatz <jopatz@ucar.edu>

---------

Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: Howard Soh <hsoh@ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>
Co-authored-by: davidalbo <dave@ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com>
  • Loading branch information
8 people committed Apr 17, 2024
1 parent b5c883c commit 45958b7
Show file tree
Hide file tree
Showing 8 changed files with 429 additions and 25 deletions.
34 changes: 31 additions & 3 deletions docs/Users_Guide/ensemble-stat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ When computing the CRPS skill score for (:ref:`Gneiting et al., 2004 <Gneiting-2

The climatological distribution is also used for the RPSS. The forecast RPS statistic is computed from a probabilistic contingency table in which the probabilities are derived from the ensemble member values. In a simliar fashion, the climatogical probability for each observed value is derived from the climatological distribution. The area of the distribution to the left of the observed value is interpreted as the climatological probability. These climatological probabilities are also evaluated using a probabilistic contingency table from which the reference RPS score is computed. The skill scores are derived by comparing the forecast statistic to the reference climatology statistic.

The Ensemble-Stat tool also allows the computation of RPS and RPSS utilizing an ensemble forecast in probabilistic space. This unique ability is for users with ensemble data that is formulated relative to climatology; it does not require the use of any climatological datasets, instead relying on the assumption that each ensemble member has a climatologically equal chance of occurring. Each ensemble member's field should contain values in the range [0, 1] or [0, 100]. However, when MET encounters a probability field with a range [0, 100], it will automatically rescale it to be [0, 1]. The sum of all ensemble member fields should equal 1 (if range is [0, 1]) or 100 (if range is [0, 100]). When calculating RPS, the ensemble member field values are cumulatively summed in the order that they are evaluated by Ensemble-Stat. Each of these sums is then used to calculate a squared probability error relative to observations and their appropriate thresolds. Note that it is expected each observation point or observation gridpoint will indicate exactly one climatological probability bin where the observation occurred. The cumulative sum and squared probability errors are also calculated for climatology using an even, constant probability bin width that is equal to 1 divided by the number of ensemble members (ex. three ensemble members are evaluated with three climatology probability bins of width 0.333). The accompanying skill score is derived by comparing the forecast RPS to the reference climatology RPS.

Ensemble Observation Error
--------------------------

Expand Down Expand Up @@ -197,14 +199,23 @@ For each **field** listed in the forecast field, give the name and vertical or a

_______________________

.. code-block:: none
is_prob = TRUE;
While **is_prob** is not a unique setting to the Ensemble-Stat tool, setting this boolean to **TRUE** in the **fcst** dictionary field does allow users the ability to pass ensemble member data in probabilistic space relative to a climatology. Doing so will disable the requirement for setting **prob_cat_thresh** in the **fcst** dictionary field but does require that the **obs** dictionary field contain a **prob_cat_thresh** array with the same number of inequality entries as ensemble members being evaluated. These inequalities must be monotonically increasing and of the same inequality type. Using this feature will disable all **output_flag** line type outputs requested other than the RPS. Additionally the RPS line type columns decomposing the RPS into Reliability, Resolution, and Uncertainty, as well as the RPSS relative to a sample climatology, will have entries of N/A.

_______________________

.. code-block:: none
ens_member_ids = [];
control_id = "";
The **ens_member_ids** array is only used if reading a single file that contains all ensemble members.
It should contain a list of string identifiers that are substituted into the **ens** and/or **fcst** dictionary fields
It should contain a list of string identifiers that are substituted into the **fcst** dictionary field
to determine which data to read from the file.
The length of the array determines how many ensemble members will be processed for a given field.
Each value in the array will replace the text **MET_ENS_MEMBER_ID**.
Expand Down Expand Up @@ -237,6 +248,23 @@ Each value in the array will replace the text **MET_ENS_MEMBER_ID**.
];
}
The **ens_member_ids** array can also be used to control the **name** field of the **fcst** dictionary. When used in this manner, Ensemble-Stat will use the first string of **ens_member_ids** to set the **FCST_VAR** column in line type output. Users may find it useful to override this behavior using **set_attr_name**:

.. code-block:: none
fcst = {
ens_thresh = 0.75;
vld_thresh = 1.0;
field = [
{
name = "MET_ENS_MEMBER_ID";
level = "(*,*)";
set_attr_name = "TMEAN_TERCILES";
}
];
}
**control_id** is a string that is substituted in the same way as the **ens_member_ids** values
to read a control member. This value is only used when the **-ctrl** command line argument is
Expand Down Expand Up @@ -688,10 +716,10 @@ The format of the STAT and ASCII output of the Ensemble-Stat tool are described
- RPS Uncertainty, mean of the uncertainties for each RPS threshold
* - 30
- RPS
- Ranked Probability Score, mean of the Brier Scores for each RPS threshold
- Ranked Probability Score, mean of the Brier Scores for each RPS threshold OR mean of the climatology-based probabilistic ensemble members
* - 31
- RPSS
- Ranked Probability Skill Score relative to external climatology
- Ranked Probability Skill Score relative to external climatology OR relative to a fixed climatology value of one divided by the number of ensemble members when using climatology-based probabilistic ensemble members
* - 32
- RPSS_SMPL
- Ranked Probability Skill Score relative to sample climatology
Expand Down
223 changes: 223 additions & 0 deletions internal/test_unit/config/EnsembleStatConfig_rps_climo_bin_prob
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
////////////////////////////////////////////////////////////////////////////////
//
// Ensemble-Stat configuration file.
//
// For additional information, please see the MET User's Guide.
//
////////////////////////////////////////////////////////////////////////////////

//
// Output model name to be written
//
model = "GEFS";

//
// Output description to be written
// May be set separately in each "obs.field" entry
//
desc = "${DESC}";

//
// Output observation type to be written
//
obtype = "ANALYS";

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

//
// Verification grid
//
regrid = {
to_grid = NONE;
method = NEAREST;
width = 1;
vld_thresh = 0.5;
shape = SQUARE;
}

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

//
// IDs for ensemble members
// Only set if processing a single file with all ensembles
//
ens_member_ids = [ "below", "normal", "above" ];
control_id = "";

//
// May be set separately in each "fcst.field" and "obs.field" entry
//
censor_thresh = [];
censor_val = [];
prob_cat_thresh = [];

//
// May be set separately in each "fcst.field" entry
//
prob_pct_thresh = [ ==0.25 ];

//
// May be set separately in each "obs.field" entry
//
nc_var_str = "";
eclv_points = 0.05;

//
// Forecast and observation fields to be verified
//
fcst = {
ens_thresh = 0.75;
vld_thresh = 1.0;

field = [
{
name = "MET_ENS_MEMBER_ID";
level = "(*,*)";
is_prob = TRUE;
set_attr_name = "TMEAN_TERCILES";
}
];
}
obs = {
field = [
{
name = "category";
level = "(*,*)";
prob_cat_thresh = [ ==-1, ==0, ==1 ];
set_attr_name = "TMEAN_CATEGORY";
}
];
}

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

//
// Point observation filtering options
// May be set separately in each "obs.field" entry
//
message_type = [ "ADPSFC" ];
sid_inc = [];
sid_exc = [];
obs_thresh = [ NA ];
obs_quality_inc = [];
obs_quality_exc = [];
duplicate_flag = NONE;
obs_summary = NONE;
obs_perc_value = 50;
skip_const = FALSE;

//
// Observation error options
// Set dist_type to NONE to use the observation error table instead
// May be set separately in each "obs.field" entry
//
obs_error = {
flag = FALSE;
dist_type = NONE;
dist_parm = [];
inst_bias_scale = 1.0;
inst_bias_offset = 0.0;
min = NA;
max = NA;
}

//
// Ensemble bin sizes
// May be set separately in each "obs.field" entry
//
ens_ssvar_bin_size = 1.0;
ens_phist_bin_size = 0.05;

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

//
// Point observation time window
//
obs_window = {
beg = -5400;
end = 5400;
}

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

//
// Verification masking regions
//
mask = {
grid = [ "FULL" ];
poly = [];
sid = [];
llpnt = [];
}

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

//
// Confidence interval settings
//
ci_alpha = [ 0.05 ];

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

//
// Interpolation methods
//
interp = {
field = BOTH;
vld_thresh = 1.0;
shape = SQUARE;

type = [
{
method = NEAREST;
width = 1;
}
];
}

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

//
// Statistical output types
// May be set separately in each "obs.field" entry
//
output_flag = {
ecnt = NONE;
rps = STAT;
rhist = NONE;
phist = NONE;
orank = NONE;
ssvar = NONE;
relp = NONE;
pct = NONE;
pstd = NONE;
pjc = NONE;
prc = NONE;
eclv = NONE;
}

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

//
// Gridded verification output types
// May be set separately in each "obs.field" entry
//
nc_orank_flag = FALSE;

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

//
// Random number generator
//
rng = {
type = "mt19937";
seed = "1";
}

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

grid_weight_flag = NONE;
output_prefix = "${OUTPUT_PREFIX}";
version = "V12.0.0";

////////////////////////////////////////////////////////////////////////////////
20 changes: 20 additions & 0 deletions internal/test_unit/xml/unit_ensemble_stat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,24 @@
</output>
</test>

<!-- Compute RPS line type using probabilistic inputs. -->

<test name="ensemble_stat_RPS_CLIMO_BIN_PROB">
<exec>&MET_BIN;/ensemble_stat</exec>
<env>
<pair><name>DESC</name> <value>RPS_CLIMO_BIN_PROB</value></pair>
<pair><name>OUTPUT_PREFIX</name> <value>RPS_CLIMO_BIN_PROB</value></pair>
</env>
<param> \
1 \
&DATA_DIR_MODEL;/cpc_climo_prob/gefs-00z_aer-rfcst-cal_tmean_20210101_week2_cats_33-67ptile.nc \
&CONFIG_DIR;/EnsembleStatConfig_rps_climo_bin_prob \
-grid_obs &DATA_DIR_MODEL;/cpc_climo_prob/tmean_07d_20210115_cats_33-67ptile.nc \
-outdir &OUTPUT_DIR;/ensemble_stat -v 1
</param>
<output>
<stat>&OUTPUT_DIR;/ensemble_stat/ensemble_stat_RPS_CLIMO_BIN_PROB_20210101_000000V.stat</stat>
</output>
</test>

</met_test>
4 changes: 2 additions & 2 deletions src/basic/vx_util/thresh_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,8 @@ bool check_prob_thresh(const ThreshArray &ta, bool error_out) {
<< "select at least 3 thresholds which include the range [0, 1] "
<< "(current setting: " << ta.get_str() << ").\n"
<< "Consider using the \"==n\" shorthand notation to specify "
<< "probability bins of equal width, for n < 1, or the integer "
<< "number of ensemble members, for n > 1.\n\n";
<< "probability bins of equal width for n < 1, or the integer "
<< "number of ensemble members for n > 1.\n\n";
exit(1);
}
else {
Expand Down
Loading

0 comments on commit 45958b7

Please sign in to comment.