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 #2279 point_weight_flag #2993

Merged
merged 56 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
09f802e
Per #2887, update NumArray::vals() to return a reference to the vecto…
JohnHalleyGotway Aug 28, 2024
38a5d4e
Per #2887, switch over the whole ContingencyTable class heirarchy fro…
JohnHalleyGotway Aug 28, 2024
5e1d81d
Add ContingencyTable::is_integer() member function to check whether t…
JohnHalleyGotway Aug 28, 2024
32f3601
Per #2887, update parse_stat_line.cc to get it to compile after chang…
JohnHalleyGotway Aug 28, 2024
5834afd
Per #2887, update PCTInfo::clear() logic.
JohnHalleyGotway Aug 28, 2024
f2a1fd0
Merge remote-tracking branch 'origin/develop' into feature_2887_categ…
JohnHalleyGotway Sep 3, 2024
8c629e6
Per #2887, update ctc_by_row() logic to create reproducible results w…
JohnHalleyGotway Sep 3, 2024
b98276a
Per #2887, update logic of define_prob_bins() to add a final >=1.0 th…
JohnHalleyGotway Sep 3, 2024
dacd1d2
Per #2887, update roc_auc() function to match the develop branch
JohnHalleyGotway Sep 3, 2024
a5403e2
Per #2887, fix bug if computation of far()
JohnHalleyGotway Sep 3, 2024
2a68914
Per #2887, replaced all ==0 integer equality checks with calls to is_…
JohnHalleyGotway Sep 4, 2024
1b8cd06
Merge remote-tracking branch 'origin/develop' into feature_2887_categ…
JohnHalleyGotway Sep 6, 2024
7bce8b8
Per #2887, address some of the 34 SonarQube code smells flagged for t…
JohnHalleyGotway Sep 9, 2024
f0395b0
Per #2887, update run_sonarqube.sh to specify the target CXX standard…
JohnHalleyGotway Sep 9, 2024
8e1ecef
Per #2887, update to SonarQube version 6.1.0.4477 released on 6/27/2024.
JohnHalleyGotway Sep 9, 2024
1144765
Per #2887, updating build_met_sonarqube.sh to specify --std=c++11 sin…
JohnHalleyGotway Sep 9, 2024
29673cf
Merge remote-tracking branch 'origin/develop' into feature_2887_categ…
JohnHalleyGotway Sep 10, 2024
1548c75
Per #2887, swap in a much simpler implementation of the ORSS statisti…
JohnHalleyGotway Sep 10, 2024
ec99867
Merge remote-tracking branch 'origin/develop' into feature_2887_categ…
JohnHalleyGotway Oct 3, 2024
210eab2
Merge remote-tracking branch 'origin/develop' into feature_2887_categ…
JohnHalleyGotway Oct 3, 2024
33ddd51
Per #2887, update grid_stat and library code to actually apply the gr…
JohnHalleyGotway Oct 3, 2024
97cfbfa
Per #2887, fix the handling of bad data in the ORSS equation.
JohnHalleyGotway Oct 4, 2024
17dc1b7
Per #2887, add Npairs member to the ContingencyTable class, eliminate…
JohnHalleyGotway Oct 4, 2024
ace7c1b
Per #2887, reset Npairs = 0 for ContingencyTable::zero_out()
JohnHalleyGotway Oct 7, 2024
55dbd06
Per #2883, need to call set_n_pairs() in a few spots to set ECLV TOTA…
JohnHalleyGotway Oct 7, 2024
e44a100
Per #2887, call set_n_pairs() when aggregating PCT data in Series-Ana…
JohnHalleyGotway Oct 7, 2024
8e3e6c7
Per #2887, update stat_analysis to parse the TOTAL column for the PCT…
JohnHalleyGotway Oct 7, 2024
d1772df
Pet #2882, call set_n_pairs() after set_size() ci-run-unit
JohnHalleyGotway Oct 7, 2024
1bd61df
Per #2887, reconfigure existing Ensemble-Stat unit test to request pr…
JohnHalleyGotway Oct 8, 2024
88a8c22
Per #2887, update Ensemble-Stat test to provide climo stdev data
JohnHalleyGotway Oct 8, 2024
7b9ab8c
Per #2887, add grid_weight_flag to the list of config options for Gri…
JohnHalleyGotway Oct 8, 2024
2ec2e22
Per #2887, disable FHO output if grid_weight_flag != NONE.
JohnHalleyGotway Oct 8, 2024
940c9e2
Per #2887, revise the existing unit_grid_weight.xml unit tests for Gr…
JohnHalleyGotway Oct 8, 2024
9e4f00f
Merge remote-tracking branch 'origin/develop' into feature_2279_point…
JohnHalleyGotway Oct 9, 2024
4bbe2ae
Per #2279, add the MaskSID struct to store information about station …
JohnHalleyGotway Oct 9, 2024
d3069d0
Per #2279, add new PointWeightType enumeration along with code to par…
JohnHalleyGotway Oct 9, 2024
f5f4d99
Per #2279, adding point_weight_flag option to all Point-Stat and Ense…
JohnHalleyGotway Oct 10, 2024
d520fef
Per #2279, add point_weight_flag to the Point-Stat and Ensemble-Stat …
JohnHalleyGotway Oct 10, 2024
b2ed2a6
Per #2279, use the default_weight contstant instead of the literal 1.…
JohnHalleyGotway Oct 10, 2024
0edcd65
Per #2279, add stubs for actually applying the point_weight_flag sett…
JohnHalleyGotway Oct 10, 2024
d5a26b5
Per #2279, fix PairBase to actually set point weight values parsed fr…
JohnHalleyGotway Oct 10, 2024
9806e0a
Per #2279, trying to fix 2 sonarqurqube bugs
JohnHalleyGotway Oct 10, 2024
eabaaaf
Per #2279, fix a couple bugs parsing the SID weights and add a new un…
JohnHalleyGotway Oct 11, 2024
5723b18
Per #2279, fix small bug ci-run-unit
JohnHalleyGotway Oct 11, 2024
3beab1f
Per #2279, add ensemble_stat calls to unit_point_weight.xml
JohnHalleyGotway Oct 11, 2024
764164b
Merge remote-tracking branch 'origin/develop' into feature_2279_point…
JohnHalleyGotway Oct 11, 2024
25ca869
Merge remote-tracking branch 'origin/develop' into feature_2279_point…
JohnHalleyGotway Oct 11, 2024
a0c1dc4
Per #2279, add documentation about the point_weight_flag configuratio…
JohnHalleyGotway Oct 11, 2024
b086ae0
Per #2279, working on debug and warning messages.
JohnHalleyGotway Oct 11, 2024
458c6df
Merge remote-tracking branch 'origin/develop' into feature_2279_point…
JohnHalleyGotway Oct 14, 2024
13fe94a
Per #2279, tweak the user's guide
JohnHalleyGotway Oct 14, 2024
02302be
Per #2279, switch MaskSID::sid_list from a vector of pairs to a simpl…
JohnHalleyGotway Oct 14, 2024
40e805b
Per #2279, fix the madis2nc call to parse_sid_mask()
JohnHalleyGotway Oct 14, 2024
39b60f3
Per #2279, move MaskSID from vx_config over into dedicated vx_util/ma…
JohnHalleyGotway Oct 15, 2024
cf13262
Per #2279, another change to make it compile.
JohnHalleyGotway Oct 15, 2024
9ecea77
Per #2279, more tweaks to get it to compile.
JohnHalleyGotway Oct 15, 2024
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
4 changes: 3 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
- jobid: 'job1'
tests: 'ascii2nc_indy pb2nc_indy tc_dland tc_pairs tc_stat plot_tc tc_rmw rmw_analysis tc_diag tc_gen'
- jobid: 'job2'
tests: 'met_test_scripts mode_multivar mode_graphics mtd regrid airnow gsi_tools netcdf modis series_analysis wwmca_regrid gen_vx_mask grid_weight interp_shape grid_diag grib_tables lidar2nc shift_data_plane trmm2nc aeronet wwmca_plot ioda2nc gaussian'
tests: 'met_test_scripts mode_multivar mode_graphics mtd regrid airnow gsi_tools netcdf modis series_analysis wwmca_regrid gen_vx_mask interp_shape grid_diag grib_tables lidar2nc shift_data_plane trmm2nc aeronet wwmca_plot ioda2nc gaussian'
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -310,6 +310,8 @@ jobs:
tests: 'ensemble_stat stat_analysis_es'
- jobid: 'job5'
tests: 'ugrid'
- jobid: 'job6'
tests: 'grid_weight point_weight'
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 4 additions & 0 deletions data/config/ConfigConstants
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ NONE = 1;
COS_LAT = 2;
AREA = 3;

// Point weight flag settings
NONE = 1;
SID = 2;

// Duplicate flag settings
NONE = 1;
UNIQUE = 2;
Expand Down
8 changes: 5 additions & 3 deletions data/config/EnsembleStatConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,10 @@ rng = {

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

grid_weight_flag = NONE;
output_prefix = "";
version = "V12.0.0";
grid_weight_flag = NONE;
point_weight_flag = NONE;

output_prefix = "";
version = "V12.0.0";

////////////////////////////////////////////////////////////////////////////////
7 changes: 4 additions & 3 deletions data/config/GridStatConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,9 @@ nc_pairs_flag = {
////////////////////////////////////////////////////////////////////////////////

grid_weight_flag = NONE;
tmp_dir = "/tmp";
output_prefix = "";
version = "V12.0.0";

tmp_dir = "/tmp";
output_prefix = "";
version = "V12.0.0";

////////////////////////////////////////////////////////////////////////////////
8 changes: 5 additions & 3 deletions data/config/PointStatConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,10 @@ output_flag = {

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

tmp_dir = "/tmp";
output_prefix = "";
version = "V12.0.0";
point_weight_flag = NONE;

tmp_dir = "/tmp";
output_prefix = "";
version = "V12.0.0";

////////////////////////////////////////////////////////////////////////////////
44 changes: 35 additions & 9 deletions docs/Users_Guide/config_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1847,15 +1847,18 @@ in the following ways:
embedded within another quoted string. Any such embedded quotes must
be escaped using a preceeding backslash character.

* The "sid" entry is an array of strings which define groups of
observation station ID's over which to compute statistics. Each entry
in the array is either a filename of a comma-separated list.

* For a filename, the strings are whitespace-separated. The first
string is the mask "name" and the remaining strings are the station
* The "sid" entry is an array of strings which define groups of observation station
ID's over which to compute statistics. Each station ID string can be followed by an
optional numeric weight enclosed in parenethesis and used by the "point_weight_flag"
configuration option. Each entry in the "sid" "array is either a filename or a
comma-separated list.

* For an ASCII filename, the strings contained within it are whitespace-separated.
The first string is the mask "name" and the remaining strings are the station
ID's to be used.
* For a comma-separated list, optionally use a colon to specify a name.
For "MY_LIST:SID1,SID2", name = MY_LIST and values = SID1 and SID2.
For "MY_LIST:SID1(WGT1),SID2(WGT2)", name = MY_LIST which consists of
two station ID's (SID1 and SID2) and optional numeric weights (WGT1 and WGT2).
* For a comma-separated list of length one with no name specified, the
mask "name" and value are both set to the single station ID string.
For "SID1", name = SID1 and value = SID1.
Expand All @@ -1865,6 +1868,7 @@ in the following ways:
For "SID1,SID2", name = MASK_SID and values = SID1 and SID2.
* The "name" of the station ID mask is written to the VX_MASK column
of the MET output files.

* The "llpnt" entry is either a single dictionary or an array of
dictionaries. Each dictionary contains three entries, the "name" for
the masking region, "lat_thresh", and "lon_thresh". The latitude and
Expand Down Expand Up @@ -2353,8 +2357,9 @@ NBRCTC), partial sums (SL1L2, SAL1L2, VL1L2, and VAL1L2), and statistics
It is meant to account for grid box area distortion and is often applied
to global Lat/Lon grids. It is only applied for grid-to-grid verification
in Grid-Stat and Ensemble-Stat and is not applied for grid-to-point
verification. It can only be defined once at the highest level of config
file context and applies to all verification tasks for that run.
verification, which is controlled by the "point_weight_flag" option.
It can only be defined once at the highest level of config file context
and applies to all verification tasks for that run.

Three grid weighting options are currently supported:

Expand Down Expand Up @@ -2391,6 +2396,27 @@ versions of MET.

grid_weight_flag = NONE;

point_weight_flag
-----------------

The "point_weight_flag" is similar to the "grid_weight_flag", described above,
but applies to grid-to-point verification in Point-Stat and Ensemble-Stat.
It is not applied for grid-to-grid verification which is controlled by the
"grid_weight_flag" option. It can only be defined once at the highest level
of config file context and applies to all verification tasks for that run.

While only one point weighting option is currently supported, additional
methods are planned for future versions:

* NONE to disable point weighting using a constant weight of 1.0 (default).

* SID to use the weights defined by the station ID masking configuration option,
"mask.sid".

.. code-block:: none

point_weight_flag = NONE;

hss_ec_value
------------

Expand Down
14 changes: 13 additions & 1 deletion docs/Users_Guide/ensemble-stat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,25 @@ ____________________
obs_perc_value = 50;
message_type_group_map = [...];
grid_weight_flag = NONE;
point_weight_flag = NONE;
output_prefix = "";
version = "VN.N";


The configuration options listed above are common to many MET tools and are described in :numref:`config_options`.

Note that the **HIRA** interpolation method is only supported in Ensemble-Stat.
.. note::

The **HIRA** interpolation method is only supported in Ensemble-Stat.

.. note::

The "grid_weight_flag" and "point_weight_flag" options described in
:numref:`config_options` define how matched pairs are weighted for
grid-to-grid and grid-to-point verification in Ensemble-Stat. These
weights currently only apply to the computation of probabilistic
outputs (PCT, PSTD, PJC, and PRC) but no other Ensemble-Stat output
line types.

_____________________

Expand Down
1 change: 1 addition & 0 deletions docs/Users_Guide/point-stat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ ________________________
obs_summary = NONE;
obs_perc_value = 50;
message_type_group_map = [...];
point_weight_flag = NONE;
tmp_dir = "/tmp";
output_prefix = "";
version = "VN.N";
Expand Down
8 changes: 5 additions & 3 deletions internal/test_unit/config/EnsembleStatConfig
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ rng = {

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

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

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

////////////////////////////////////////////////////////////////////////////////
8 changes: 5 additions & 3 deletions internal/test_unit/config/EnsembleStatConfig_MASK_SID
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,10 @@ rng = {

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

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

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

////////////////////////////////////////////////////////////////////////////////
8 changes: 5 additions & 3 deletions internal/test_unit/config/EnsembleStatConfig_climo
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,10 @@ rng = {

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

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

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

////////////////////////////////////////////////////////////////////////////////
8 changes: 5 additions & 3 deletions internal/test_unit/config/EnsembleStatConfig_grid_weight
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,10 @@ rng = {

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

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

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

////////////////////////////////////////////////////////////////////////////////
8 changes: 5 additions & 3 deletions internal/test_unit/config/EnsembleStatConfig_one_cdf_bin
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,10 @@ rng = {

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

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

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

////////////////////////////////////////////////////////////////////////////////
Loading
Loading