From 4396e1dbba44565a6104b95c5d50ee814b1e668b Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Tue, 12 May 2026 19:14:37 +0000 Subject: [PATCH 01/36] Per #3335, add kde_ref_angle and write_weights options to the User's Guide and config file for Point-Stat and Ensemble-Stat. --- data/config/EnsembleStatConfig_default | 4 ++++ data/config/PointStatConfig_default | 4 ++++ docs/Users_Guide/config_options.rst | 30 ++++++++++++++++++++++++++ docs/Users_Guide/ensemble-stat.rst | 2 ++ docs/Users_Guide/point-stat.rst | 2 ++ 5 files changed, 42 insertions(+) diff --git a/data/config/EnsembleStatConfig_default b/data/config/EnsembleStatConfig_default index 5d15d1e852..ca5016e022 100644 --- a/data/config/EnsembleStatConfig_default +++ b/data/config/EnsembleStatConfig_default @@ -323,6 +323,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = ""; version = "V13.0.0"; diff --git a/data/config/PointStatConfig_default b/data/config/PointStatConfig_default index d547176e9d..c0c0986705 100644 --- a/data/config/PointStatConfig_default +++ b/data/config/PointStatConfig_default @@ -325,7 +325,11 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; +//////////////////////////////////////////////////////////////////////////////// + tmp_dir = "/tmp"; output_prefix = ""; version = "V13.0.0"; diff --git a/docs/Users_Guide/config_options.rst b/docs/Users_Guide/config_options.rst index 3b0d1cc264..2572006c9c 100644 --- a/docs/Users_Guide/config_options.rst +++ b/docs/Users_Guide/config_options.rst @@ -2769,10 +2769,40 @@ methods are planned for future versions: * SID to use the weights defined by the station ID masking configuration option, "mask.sid". +* KDE to apply a kernel density estimator to compute weights based on observation + density to avoid the impact of oversampling from data rich regions. + .. code-block:: none point_weight_flag = NONE; +kde_ref_angle +------------- + +The "kde_ref_angle" entry defines the reference angle used when computing the +weights for "point_weight_flag = KDE". This reference angle is defined in degrees +with a default value of 0.75. As described in :ref:`Haiden et al., 2012 `, +an increase of this parameter increases the weights of data-sparse regions in global +or continental-scale averages. + +.. code-block:: none + + kde_ref_angle = 0.75; + +write_weights +------------- + +When "point_weight_flag = KDE", described above, weights are computed once +using the location of all point observations used for any verification task. +The "write_weights" entry is a boolean that can be set to TRUE or FALSE (default). +If TRUE, the computed weights are written to an output ASCII file. That file +can be used to set the "mask.sid" station ID masking file option with +"point_weight_flag = SID" in future runs. + +.. code-block:: none + + write_weights = FALSE; + hss_ec_value ------------ diff --git a/docs/Users_Guide/ensemble-stat.rst b/docs/Users_Guide/ensemble-stat.rst index b2ed41a033..cc35ad990d 100644 --- a/docs/Users_Guide/ensemble-stat.rst +++ b/docs/Users_Guide/ensemble-stat.rst @@ -187,6 +187,8 @@ ____________________ obtype_as_group_val_flag = FALSE; grid_weight_flag = NONE; point_weight_flag = NONE; + kde_ref_angle = 0.75; + write_weights = FALSE; output_prefix = ""; version = "VN.N"; diff --git a/docs/Users_Guide/point-stat.rst b/docs/Users_Guide/point-stat.rst index 50a80be722..223b0a6093 100644 --- a/docs/Users_Guide/point-stat.rst +++ b/docs/Users_Guide/point-stat.rst @@ -370,6 +370,8 @@ ________________________ message_type_group_map = [ ... ]; obtype_as_group_val_flag = FALSE; point_weight_flag = NONE; + kde_ref_angle = 0.75; + write_weights = FALSE; tmp_dir = "/tmp"; output_prefix = ""; version = "VN.N"; From 46e6d75bbf164042ac4caa64aa5aae6895f8bb28 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Tue, 12 May 2026 19:54:39 +0000 Subject: [PATCH 02/36] Per #3335, update Point-Stat and Ensemble-Stat to parse the new point_weight_flag = KDE option and update unit_point_weight.xml to test out the new option. --- data/config/ConfigConstants | 1 + .../config/EnsembleStatConfig_point_weight | 4 +- .../config/PointStatConfig_point_weight | 4 +- .../config/PointStatConfig_prob_point_weight | 4 +- internal/test_unit/xml/unit_point_weight.xml | 85 +++++++++++++++++-- src/basic/vx_config/config_constants.h | 10 ++- src/basic/vx_config/config_util.cc | 1 + .../ensemble_stat/ensemble_stat_conf_info.cc | 8 ++ .../ensemble_stat/ensemble_stat_conf_info.h | 3 + .../core/point_stat/point_stat_conf_info.cc | 8 ++ .../core/point_stat/point_stat_conf_info.h | 2 + 11 files changed, 114 insertions(+), 16 deletions(-) diff --git a/data/config/ConfigConstants b/data/config/ConfigConstants index acf34b788a..1cf934d959 100644 --- a/data/config/ConfigConstants +++ b/data/config/ConfigConstants @@ -149,6 +149,7 @@ AREA = 3; // Point weight flag settings NONE = 1; SID = 2; +KDE = 3; // Duplicate flag settings NONE = 1; diff --git a/internal/test_unit/config/EnsembleStatConfig_point_weight b/internal/test_unit/config/EnsembleStatConfig_point_weight index de83a0eaa1..697b904f17 100644 --- a/internal/test_unit/config/EnsembleStatConfig_point_weight +++ b/internal/test_unit/config/EnsembleStatConfig_point_weight @@ -133,9 +133,9 @@ obs_window = { // Verification masking regions // mask = { - grid = []; + grid = [ ${MASK_GRID} ]; poly = []; - sid = [ "${CONFIG_DIR}/SID_CONUS_ADPSFC_ELEV.txt" ]; + sid = [ ${MASK_SID} ]; llpnt = []; } diff --git a/internal/test_unit/config/PointStatConfig_point_weight b/internal/test_unit/config/PointStatConfig_point_weight index a3cc332c7d..9b1d8ab970 100644 --- a/internal/test_unit/config/PointStatConfig_point_weight +++ b/internal/test_unit/config/PointStatConfig_point_weight @@ -57,9 +57,9 @@ obs = fcst; //////////////////////////////////////////////////////////////////////////////// mask = { - grid = []; + grid = [ ${MASK_GRID} ]; poly = []; - sid = [ "${CONFIG_DIR}/SID_CONUS_ADPUPA_ELEV.txt" ]; + sid = [ ${MASK_SID} ]; llpnt = []; } diff --git a/internal/test_unit/config/PointStatConfig_prob_point_weight b/internal/test_unit/config/PointStatConfig_prob_point_weight index b336022b93..64c1b14d35 100644 --- a/internal/test_unit/config/PointStatConfig_prob_point_weight +++ b/internal/test_unit/config/PointStatConfig_prob_point_weight @@ -63,9 +63,9 @@ obs = { //////////////////////////////////////////////////////////////////////////////// mask = { - grid = [ "FULL" ]; + grid = [ ${MASK_GRID} ]; poly = []; - sid = [ "${CONFIG_DIR}/SID_CONUS_ADPUPA_ELEV.txt" ]; + sid = [ ${MASK_SID} ]; llpnt = []; } diff --git a/internal/test_unit/xml/unit_point_weight.xml b/internal/test_unit/xml/unit_point_weight.xml index b034b54a3a..947e2f52d1 100644 --- a/internal/test_unit/xml/unit_point_weight.xml +++ b/internal/test_unit/xml/unit_point_weight.xml @@ -24,7 +24,8 @@ OUTPUT_PREFIX NO_WEIGHT DESC NO_WEIGHT POINT_WEIGHT NONE - CONFIG_DIR &CONFIG_DIR; + MASK_GRID "FULL" + MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPUPA_ELEV.txt" \ &DATA_DIR_MODEL;/grib2/sref_mn/sref_mean_2012040821_F015.grib2 \ @@ -43,7 +44,8 @@ OUTPUT_PREFIX SID_WEIGHT DESC SID_WEIGHT POINT_WEIGHT SID - CONFIG_DIR &CONFIG_DIR; + MASK_GRID + MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPUPA_ELEV.txt" \ &DATA_DIR_MODEL;/grib2/sref_mn/sref_mean_2012040821_F015.grib2 \ @@ -56,13 +58,34 @@ + + &MET_BIN;/point_stat + + OUTPUT_PREFIX KDE_WEIGHT + DESC KDE_WEIGHT + POINT_WEIGHT KDE + MASK_GRID "FULL" + MASK_SID + + \ + &DATA_DIR_MODEL;/grib2/sref_mn/sref_mean_2012040821_F015.grib2 \ + &OUTPUT_DIR;/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + &CONFIG_DIR;/PointStatConfig_point_weight \ + -outdir &OUTPUT_DIR;/point_weight -v 1 + + + &OUTPUT_DIR;/point_weight/point_stat_KDE_WEIGHT_150000L_20120409_120000V.stat + + + &MET_BIN;/point_stat OUTPUT_PREFIX PROB_NO_WEIGHT DESC NO_WEIGHT POINT_WEIGHT NONE - CONFIG_DIR &CONFIG_DIR; + MASK_GRID "FULL" + MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPUPA_ELEV.txt" \ &DATA_DIR_MODEL;/grib2/sref_pr/sref_prob_2012040821_F015.grib2 \ @@ -81,7 +104,8 @@ OUTPUT_PREFIX PROB_SID_WEIGHT DESC SID_WEIGHT POINT_WEIGHT SID - CONFIG_DIR &CONFIG_DIR; + MASK_GRID + MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPUPA_ELEV.txt" \ &DATA_DIR_MODEL;/grib2/sref_pr/sref_prob_2012040821_F015.grib2 \ @@ -94,13 +118,34 @@ + + &MET_BIN;/point_stat + + OUTPUT_PREFIX PROB_KDE_WEIGHT + DESC KDE_WEIGHT + POINT_WEIGHT KDE + MASK_GRID "FULL" + MASK_SID + + \ + &DATA_DIR_MODEL;/grib2/sref_pr/sref_prob_2012040821_F015.grib2 \ + &OUTPUT_DIR;/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + &CONFIG_DIR;/PointStatConfig_prob_point_weight \ + -outdir &OUTPUT_DIR;/point_weight -v 1 + + + &OUTPUT_DIR;/point_weight/point_stat_PROB_KDE_WEIGHT_150000L_20120409_120000V.stat + + + &MET_BIN;/ensemble_stat OUTPUT_PREFIX NO_WEIGHT DESC NO_WEIGHT POINT_WEIGHT NONE - CONFIG_DIR &CONFIG_DIR; + MASK_GRID "FULL" + MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPUPA_ELEV.txt" \ 6 \ @@ -125,7 +170,8 @@ OUTPUT_PREFIX SID_WEIGHT DESC SID_WEIGHT POINT_WEIGHT SID - CONFIG_DIR &CONFIG_DIR; + MASK_GRID + MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPUPA_ELEV.txt" \ 6 \ @@ -144,5 +190,30 @@ - + + &MET_BIN;/ensemble_stat + + OUTPUT_PREFIX KDE_WEIGHT + DESC KDE_WEIGHT + POINT_WEIGHT KDE + MASK_GRID "FULL" + MASK_SID + + \ + 6 \ + &DATA_DIR_MODEL;/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ + &DATA_DIR_MODEL;/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ + &CONFIG_DIR;/EnsembleStatConfig_point_weight \ + -point_obs &OUTPUT_DIR;/ascii2nc/gauge_2012041012_24hr.nc \ + -outdir &OUTPUT_DIR;/point_weight -v 1 + + + &OUTPUT_DIR;/point_weight/ensemble_stat_KDE_WEIGHT_20120410_120000V.stat + + + diff --git a/src/basic/vx_config/config_constants.h b/src/basic/vx_config/config_constants.h index 75e0629123..c81305166d 100644 --- a/src/basic/vx_config/config_constants.h +++ b/src/basic/vx_config/config_constants.h @@ -502,7 +502,8 @@ enum class GridWeightType { enum class PointWeightType { None, // Apply no point weighting - SID // Apply station ID weighting + SID, // Apply station ID weighting + KDE // Apply kernel density estimation weighting }; //////////////////////////////////////////////////////////////////////// @@ -697,6 +698,9 @@ static const char conf_key_cov_thresh[] = "cov_thresh"; static const char conf_key_ps_plot_flag[] = "ps_plot_flag"; static const char conf_key_nc_pairs_flag[] = "nc_pairs_flag"; static const char conf_key_grid_weight_flag[] = "grid_weight_flag"; +static const char conf_key_point_weight_flag[] = "point_weight_flag"; +static const char conf_key_kde_ref_angle[] = "kde_ref_angle"; +static const char conf_key_write_weights[] = "write_weights"; static const char conf_key_duplicate_flag[] = "duplicate_flag"; static const char conf_key_obs_summary[] = "obs_summary"; static const char conf_key_percentile[] = "obs_perc_value"; @@ -817,8 +821,7 @@ static const char conf_key_msl_agl_conversion_msl_to_agl[] = "msl_agl_conversio // Point-Stat specific parameter key names // -static const char conf_key_hira[] = "hira"; -static const char conf_key_point_weight_flag[] = "point_weight_flag"; +static const char conf_key_hira[] = "hira"; // // Pair-Stat specific parameter key names @@ -1402,6 +1405,7 @@ static const char conf_val_area[] = "AREA"; // Point weight flag values static const char conf_val_sid[] = "SID"; +static const char conf_val_kde[] = "KDE"; // Duplicate flag values static const char conf_val_unique[] = "UNIQUE"; diff --git a/src/basic/vx_config/config_util.cc b/src/basic/vx_config/config_util.cc index d9ec914550..2e4ba21100 100644 --- a/src/basic/vx_config/config_util.cc +++ b/src/basic/vx_config/config_util.cc @@ -2455,6 +2455,7 @@ PointWeightType parse_conf_point_weight_flag(Dictionary *dict) { // Convert integer to enumerated GridWeightType if(v == conf_const.lookup_int(conf_val_none)) t = PointWeightType::None; else if(v == conf_const.lookup_int(conf_val_sid)) t = PointWeightType::SID; + else if(v == conf_const.lookup_int(conf_val_kde)) t = PointWeightType::KDE; else { mlog << Error << "\n" << method_name << "Unexpected config file value of " << v << " for \"" diff --git a/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc b/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc index e02e8b512e..36a98b5054 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc +++ b/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc @@ -77,6 +77,8 @@ void EnsembleStatConfInfo::clear() { mask_sid_map.clear(); grid_weight_flag = GridWeightType::None; point_weight_flag = PointWeightType::None; + kde_ref_angle = bad_data_double; + write_weights = false; output_prefix.clear(); version.clear(); @@ -161,6 +163,12 @@ void EnsembleStatConfInfo::process_config(GrdFileType etype, // Conf: point_weight_flag point_weight_flag = parse_conf_point_weight_flag(&conf); + // Conf: kde_ref_angle + kde_ref_angle = conf.lookup_double(conf_key_kde_ref_angle); + + // Conf: write_weights + write_weights = conf.lookup_bool(conf_key_write_weights); + // Conf: output_prefix output_prefix = conf.lookup_string(conf_key_output_prefix); diff --git a/src/tools/core/ensemble_stat/ensemble_stat_conf_info.h b/src/tools/core/ensemble_stat/ensemble_stat_conf_info.h index d39594e50e..7a81d0b77a 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat_conf_info.h +++ b/src/tools/core/ensemble_stat/ensemble_stat_conf_info.h @@ -238,6 +238,9 @@ class EnsembleStatConfInfo { GridWeightType grid_weight_flag; // Grid weighting flag PointWeightType point_weight_flag; // Point weighting flag + double kde_ref_angle; // KDE reference angle + bool write_weights; // Write weights to output file + ConcatString output_prefix; // String to customize output file name ConcatString version; // Config file version diff --git a/src/tools/core/point_stat/point_stat_conf_info.cc b/src/tools/core/point_stat/point_stat_conf_info.cc index 1b8a7ecfbf..3597f731e3 100644 --- a/src/tools/core/point_stat/point_stat_conf_info.cc +++ b/src/tools/core/point_stat/point_stat_conf_info.cc @@ -72,6 +72,8 @@ void PointStatConfInfo::clear() { mask_area_map.clear(); mask_sid_map.clear(); point_weight_flag = PointWeightType::None; + kde_ref_angle = bad_data_double; + write_weights = false; tmp_dir.clear(); output_prefix.clear(); version.clear(); @@ -157,6 +159,12 @@ void PointStatConfInfo::process_config(GrdFileType ftype) { // Conf: point_weight_flag point_weight_flag = parse_conf_point_weight_flag(&conf); + // Conf: kde_ref_angle + kde_ref_angle = conf.lookup_double(conf_key_kde_ref_angle); + + // Conf: write_weights + write_weights = conf.lookup_bool(conf_key_write_weights); + // Conf: tmp_dir tmp_dir = parse_conf_tmp_dir(&conf); diff --git a/src/tools/core/point_stat/point_stat_conf_info.h b/src/tools/core/point_stat/point_stat_conf_info.h index dae49f782c..17576306a1 100644 --- a/src/tools/core/point_stat/point_stat_conf_info.h +++ b/src/tools/core/point_stat/point_stat_conf_info.h @@ -240,6 +240,8 @@ class PointStatConfInfo { std::map mask_sid_map; PointWeightType point_weight_flag; // Point weighting flag + double kde_ref_angle; // KDE reference angle + bool write_weights; // Write weights to output file ConcatString tmp_dir; // Directory for temporary files ConcatString output_prefix; // String to customize output file name From c04bee390feca386abbe95a348cdfaf8c77b160f Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Tue, 12 May 2026 20:09:39 +0000 Subject: [PATCH 03/36] Per #3335, save work in progress. --- src/tools/core/ensemble_stat/ensemble_stat.cc | 3 ++- src/tools/core/point_stat/point_stat.cc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tools/core/ensemble_stat/ensemble_stat.cc b/src/tools/core/ensemble_stat/ensemble_stat.cc index 550975473b..e609ad2e71 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat.cc +++ b/src/tools/core/ensemble_stat/ensemble_stat.cc @@ -80,7 +80,8 @@ // 047 10/14/24 Halley Gotway MET #2279 Add point_weight_flag option. // 048 10/15/24 Halley Gotway MET #2893 Write individual pair OBTYPE. // 049 09/11/25 Halley Gotway MET #3174 Orographic corrections. -// 050 01/27/26 Halley Gotway MET #3298 Add the FULL grid, if needed +// 050 01/27/26 Halley Gotway MET #3298 Add the FULL grid, if needed. +// 051 05/12/26 Halley Gotway MET #3335 Add point_weight_flag = KDE option. // //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/core/point_stat/point_stat.cc b/src/tools/core/point_stat/point_stat.cc index 981f842492..e31d5dbacf 100644 --- a/src/tools/core/point_stat/point_stat.cc +++ b/src/tools/core/point_stat/point_stat.cc @@ -109,7 +109,8 @@ // 057 10/14/24 Halley Gotway MET #2279 Add point_weight_flag option. // 058 10/15/24 Halley Gotway MET #2893 Write individual pair OBTYPE. // 069 09/11/25 Halley Gotway MET #3174 Orographic corrections. -// 070 01/27/26 Halley Gotway MET #3298 Add the FULL grid, if needed +// 070 01/27/26 Halley Gotway MET #3298 Add the FULL grid, if needed. +// 071 05/12/26 Halley Gotway MET #3335 Add point_weight_flag = KDE option. // //////////////////////////////////////////////////////////////////////// From e8accb9c924493dc674aa9a30755d549983c9bc5 Mon Sep 17 00:00:00 2001 From: JohnHalleyGotway Date: Wed, 13 May 2026 11:48:57 -0600 Subject: [PATCH 04/36] Per #3335, work in progress defining and using the PointWeightInfo class. --- data/config/PairStatConfig_default | 4 ++ docs/Users_Guide/pair-stat.rst | 2 + src/basic/vx_config/config_constants.h | 26 +++++++++ src/basic/vx_config/config_util.cc | 56 ++++++++++++++++--- src/basic/vx_config/config_util.h | 2 +- src/libcode/vx_statistics/pair_base.cc | 10 ++-- src/libcode/vx_statistics/pair_base.h | 4 +- .../vx_statistics/pair_data_ensemble.cc | 27 +++++---- .../vx_statistics/pair_data_ensemble.h | 2 +- src/libcode/vx_statistics/pair_data_point.cc | 39 +++++++------ src/libcode/vx_statistics/pair_data_point.h | 2 +- src/tools/core/ensemble_stat/ensemble_stat.cc | 19 +++++-- .../ensemble_stat/ensemble_stat_conf_info.cc | 14 +---- .../ensemble_stat/ensemble_stat_conf_info.h | 5 +- src/tools/core/pair_stat/pair_stat.cc | 3 +- .../core/pair_stat/pair_stat_conf_info.cc | 6 +- .../core/pair_stat/pair_stat_conf_info.h | 2 +- src/tools/core/point_stat/point_stat.cc | 21 ++++--- .../core/point_stat/point_stat_conf_info.cc | 14 +---- .../core/point_stat/point_stat_conf_info.h | 4 +- 20 files changed, 165 insertions(+), 97 deletions(-) diff --git a/data/config/PairStatConfig_default b/data/config/PairStatConfig_default index 7d2d2b9a9d..345ca428e1 100644 --- a/data/config/PairStatConfig_default +++ b/data/config/PairStatConfig_default @@ -213,6 +213,10 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; version = "V13.0.0"; diff --git a/docs/Users_Guide/pair-stat.rst b/docs/Users_Guide/pair-stat.rst index 76f351ac33..b9445cbd22 100644 --- a/docs/Users_Guide/pair-stat.rst +++ b/docs/Users_Guide/pair-stat.rst @@ -111,6 +111,8 @@ ________________________ model = "FCST"; desc = "NA"; point_weight_flag = NONE; + kde_ref_angle = 0.75; + write_weights = FALSE; tmp_dir = "/tmp"; version = "VN.N"; diff --git a/src/basic/vx_config/config_constants.h b/src/basic/vx_config/config_constants.h index c81305166d..72157a99c0 100644 --- a/src/basic/vx_config/config_constants.h +++ b/src/basic/vx_config/config_constants.h @@ -506,6 +506,32 @@ enum class PointWeightType { KDE // Apply kernel density estimation weighting }; +// +// Struct to store point_weight_flag KDE location information +// + +struct LatLonWgt { + double lat; + double lon; + double wgt; +}; + +struct PointWeightInfo { + PointWeightType type; + double kde_ref_angle; + bool write_weights; + std::map sid_wgt_map; + + PointWeightInfo() { clear(); } + ~PointWeightInfo() { clear(); } + PointWeightInfo(PointWeightInfo const &i) { *this = i; } + PointWeightInfo &operator=(const PointWeightInfo &a) noexcept; + + void clear(); + void add(const std::string &, double, double); + void compute_weights(); +}; + //////////////////////////////////////////////////////////////////////// // diff --git a/src/basic/vx_config/config_util.cc b/src/basic/vx_config/config_util.cc index 2e4ba21100..a8388fbd94 100644 --- a/src/basic/vx_config/config_util.cc +++ b/src/basic/vx_config/config_util.cc @@ -1339,6 +1339,37 @@ map parse_conf_string_map( /////////////////////////////////////////////////////////////////////////////// +PointWeightInfo &PointWeightInfo::operator=(const PointWeightInfo &a) noexcept { + if(this != &a) { + type = a.type; + kde_ref_angle = a.kde_ref_angle; + write_weights = a.write_weights; + sid_wgt_map = a.sid_wgt_map; + } + return *this; +} + +/////////////////////////////////////////////////////////////////////////////// + +void PointWeightInfo::clear() { + type = PointWeightType::None; + kde_ref_angle = bad_data_double; + write_weights = false; + sid_wgt_map.clear(); +} + +/////////////////////////////////////////////////////////////////////////////// + +void PointWeightInfo::add(const string &sid, double lat, double lon) { + + // Only add unique locations + if(!sid_wgt_map.count(sid)) { + sid_wgt_map[sid] = { lat, lon, bad_data_double }; + } +} + +/////////////////////////////////////////////////////////////////////////////// + TimeSummaryInfo &TimeSummaryInfo::operator=(const TimeSummaryInfo &a) noexcept { if(this != &a) { flag = a.flag; @@ -2438,10 +2469,9 @@ GridWeightType parse_conf_grid_weight_flag(Dictionary *dict) { /////////////////////////////////////////////////////////////////////////////// -PointWeightType parse_conf_point_weight_flag(Dictionary *dict) { - PointWeightType t = PointWeightType::None; - int v; - const char *method_name = "parse_conf_point_weight_flag() -> "; +PointWeightInfo parse_conf_point_weight(Dictionary *dict) { + PointWeightInfo info; + const char *method_name = "parse_conf_point_weight() -> "; if(!dict) { mlog << Error << "\n" << method_name @@ -2449,13 +2479,15 @@ PointWeightType parse_conf_point_weight_flag(Dictionary *dict) { exit(1); } + // Conf: point_weight_flag + // Get the integer flag value for the current entry - v = dict->lookup_int(conf_key_point_weight_flag); + int v = dict->lookup_int(conf_key_point_weight_flag); // Convert integer to enumerated GridWeightType - if(v == conf_const.lookup_int(conf_val_none)) t = PointWeightType::None; - else if(v == conf_const.lookup_int(conf_val_sid)) t = PointWeightType::SID; - else if(v == conf_const.lookup_int(conf_val_kde)) t = PointWeightType::KDE; + if(v == conf_const.lookup_int(conf_val_none)) info.type = PointWeightType::None; + else if(v == conf_const.lookup_int(conf_val_sid)) info.type = PointWeightType::SID; + else if(v == conf_const.lookup_int(conf_val_kde)) info.type = PointWeightType::KDE; else { mlog << Error << "\n" << method_name << "Unexpected config file value of " << v << " for \"" @@ -2463,7 +2495,13 @@ PointWeightType parse_conf_point_weight_flag(Dictionary *dict) { exit(1); } - return t; + // Conf: kde_ref_angle + info.kde_ref_angle = dict->lookup_double(conf_key_kde_ref_angle); + + // Conf: write_weights + info.write_weights = dict->lookup_bool(conf_key_write_weights); + + return info; } /////////////////////////////////////////////////////////////////////////////// diff --git a/src/basic/vx_config/config_util.h b/src/basic/vx_config/config_util.h index 3ed2fe9e7a..c02a1b7282 100644 --- a/src/basic/vx_config/config_util.h +++ b/src/basic/vx_config/config_util.h @@ -121,7 +121,7 @@ extern NbrhdInfo parse_conf_nbrhd(Dictionary *dict, const char *); extern EASProbInfo parse_conf_eas_prob(Dictionary *dict); extern HiRAInfo parse_conf_hira(Dictionary *dict); extern GridWeightType parse_conf_grid_weight_flag(Dictionary *dict); -extern PointWeightType parse_conf_point_weight_flag(Dictionary *dict); +extern PointWeightInfo parse_conf_point_weight(Dictionary *dict); extern DuplicateType parse_conf_duplicate_flag(Dictionary *dict); extern ObsSummary parse_conf_obs_summary(Dictionary *dict); extern ConcatString parse_conf_tmp_dir(Dictionary *dict); diff --git a/src/libcode/vx_statistics/pair_base.cc b/src/libcode/vx_statistics/pair_base.cc index dc4199f367..649db813f7 100644 --- a/src/libcode/vx_statistics/pair_base.cc +++ b/src/libcode/vx_statistics/pair_base.cc @@ -786,14 +786,14 @@ void PairBase::calc_obs_summary(){ //////////////////////////////////////////////////////////////////////// -void PairBase::set_point_weight(const PointWeightType wgt_flag) { +void PairBase::set_point_weight(const PointWeightInfo &info) { const char *method_name = "PairBase::set_point_weight() -> "; - if(!IsPointVx || wgt_flag == PointWeightType::None) return; + if(!IsPointVx || info.type == PointWeightType::None) return; // Apply the SID point weight type - if(wgt_flag == PointWeightType::SID && + if(info.type == PointWeightType::SID && mask_sid_ptr != nullptr) { mlog << Debug(4) @@ -1576,14 +1576,14 @@ void VxPairBase::calc_obs_summary() { //////////////////////////////////////////////////////////////////////// -void VxPairBase::set_point_weight(const PointWeightType wgt_flag) { +void VxPairBase::set_point_weight(const PointWeightInfo &info) { if(n_vx == 0) { mlog << Warning << "\nVxPairBase::set_point_weight() -> " << "set_size() has not been called yet!\n\n"; } - for(auto &x : pb_ptr) x->set_point_weight(wgt_flag); + for(auto &x : pb_ptr) x->set_point_weight(info); return; } diff --git a/src/libcode/vx_statistics/pair_base.h b/src/libcode/vx_statistics/pair_base.h index 26026faa88..23221ead15 100644 --- a/src/libcode/vx_statistics/pair_base.h +++ b/src/libcode/vx_statistics/pair_base.h @@ -213,7 +213,7 @@ class PairBase { void calc_obs_summary(); - void set_point_weight(const PointWeightType); + void set_point_weight(const PointWeightInfo &); }; //////////////////////////////////////////////////////////////////////// @@ -404,7 +404,7 @@ class VxPairBase { void print_obs_summary() const; void calc_obs_summary(); - void set_point_weight(const PointWeightType); + void set_point_weight(const PointWeightInfo &); bool is_keeper_sid(const char *, const char *); bool is_keeper_var(const char *, const char *, int); diff --git a/src/libcode/vx_statistics/pair_data_ensemble.cc b/src/libcode/vx_statistics/pair_data_ensemble.cc index 37336f12ea..9899a88320 100644 --- a/src/libcode/vx_statistics/pair_data_ensemble.cc +++ b/src/libcode/vx_statistics/pair_data_ensemble.cc @@ -1177,7 +1177,7 @@ void VxPairDataEnsemble::set_skip_const(bool tf) { //////////////////////////////////////////////////////////////////////// -void VxPairDataEnsemble::add_point_obs(const float *hdr_arr, +bool VxPairDataEnsemble::add_point_obs(const float *hdr_arr, const int *hdr_typ_arr, const char *hdr_typ_str, const char *hdr_sid_str, @@ -1186,6 +1186,7 @@ void VxPairDataEnsemble::add_point_obs(const float *hdr_arr, const float *obs_arr, const Grid &gr, const char *var_name) { + bool obs_used = false; // Check the observation VarInfo file type if(obs_info->file_type() != FileType_Gb1) { @@ -1206,38 +1207,38 @@ void VxPairDataEnsemble::add_point_obs(const float *hdr_arr, } // Check the station ID - if(!is_keeper_sid(pnt_obs_str.c_str(), hdr_sid_str)) return; + if(!is_keeper_sid(pnt_obs_str.c_str(), hdr_sid_str)) return obs_used; // Check observation variable - if(!is_keeper_var(pnt_obs_str.c_str(), var_name, nint(obs_arr[1]))) return; + if(!is_keeper_var(pnt_obs_str.c_str(), var_name, nint(obs_arr[1]))) return obs_used; // Check observation quality - if(!is_keeper_qty(pnt_obs_str.c_str(), obs_qty)) return; + if(!is_keeper_qty(pnt_obs_str.c_str(), obs_qty)) return obs_used; // Check valid time - if(!is_keeper_vld(pnt_obs_str.c_str(), hdr_ut)) return; + if(!is_keeper_vld(pnt_obs_str.c_str(), hdr_ut)) return obs_used; // Check observation value double obs_v = obs_arr[4]; - if(!is_keeper_obs(pnt_obs_str.c_str(), obs_v)) return; + if(!is_keeper_obs(pnt_obs_str.c_str(), obs_v)) return obs_used; // Check location double hdr_lat = hdr_arr[0]; double hdr_lon = hdr_arr[1]; double obs_x; double obs_y; - if(!is_keeper_grd(pnt_obs_str.c_str(), gr, hdr_lat, hdr_lon, obs_x, obs_y)) return; + if(!is_keeper_grd(pnt_obs_str.c_str(), gr, hdr_lat, hdr_lon, obs_x, obs_y)) return obs_used; // Check topo double hdr_elv = hdr_arr[2]; double topo_elv = bad_data_double; if(!is_keeper_topo(pnt_obs_str.c_str(), gr, obs_x, obs_y, - hdr_typ_str, hdr_elv, topo_elv)) return; + hdr_typ_str, hdr_elv, topo_elv)) return obs_used; // Check level double obs_lvl = obs_arr[2]; double obs_hgt = obs_arr[3]; - if(!is_keeper_lvl(pnt_obs_str.c_str(), hdr_typ_str, obs_lvl, obs_hgt)) return; + if(!is_keeper_lvl(pnt_obs_str.c_str(), hdr_typ_str, obs_lvl, obs_hgt)) return obs_used; // When verifying a vertical level forecast against a surface message type, // set the observation level value to bad data so that it's not used in the @@ -1313,11 +1314,13 @@ void VxPairDataEnsemble::add_point_obs(const float *hdr_arr, // Add the observation value // Weight is from the nearest grid point int n = three_to_one(i_msg_typ, i_mask, i_interp); - if(!pd[n].add_point_obs(hdr_typ_str, hdr_sid_str, + if(pd[n].add_point_obs(hdr_typ_str, hdr_sid_str, hdr_lat, hdr_lon, hdr_elv, obs_x, obs_y, hdr_ut, obs_lvl, obs_hgt, obs_v, obs_qty, cpi, default_weight)) { - + obs_used = true; + } + else { if(mlog.verbosity_level() >= REJECT_DEBUG_LEVEL) { mlog << Debug(REJECT_DEBUG_LEVEL) << "For " << fcst_info->magic_str() @@ -1337,7 +1340,7 @@ void VxPairDataEnsemble::add_point_obs(const float *hdr_arr, } // end for j } // end for i - return; + return obs_used; } //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_statistics/pair_data_ensemble.h b/src/libcode/vx_statistics/pair_data_ensemble.h index d59380f078..6d32e33fec 100644 --- a/src/libcode/vx_statistics/pair_data_ensemble.h +++ b/src/libcode/vx_statistics/pair_data_ensemble.h @@ -215,7 +215,7 @@ class VxPairDataEnsemble : public VxPairBase { void set_ctrl_index(int); void set_skip_const(bool); - void add_point_obs(const float *, const int *, const char *, + bool add_point_obs(const float *, const int *, const char *, const char *, unixtime, const char *, const float *, const Grid &, const char *); void add_ens(int, bool mn, const Grid &); diff --git a/src/libcode/vx_statistics/pair_data_point.cc b/src/libcode/vx_statistics/pair_data_point.cc index 76a25887aa..e74778653e 100644 --- a/src/libcode/vx_statistics/pair_data_point.cc +++ b/src/libcode/vx_statistics/pair_data_point.cc @@ -518,7 +518,7 @@ void VxPairDataPoint::set_size(int types, int masks, int interps) { //////////////////////////////////////////////////////////////////////// -void VxPairDataPoint::add_point_obs(const float *hdr_arr, +bool VxPairDataPoint::add_point_obs(const float *hdr_arr, const char *hdr_typ_str, const char *hdr_sid_str, unixtime hdr_ut, @@ -526,6 +526,7 @@ void VxPairDataPoint::add_point_obs(const float *hdr_arr, const float *obs_arr, const Grid &gr, const char *var_name) { + bool obs_used = false; // Increment the number of tries count n_try++; @@ -538,38 +539,38 @@ void VxPairDataPoint::add_point_obs(const float *hdr_arr, } // Check the station ID - if(!is_keeper_sid(pnt_obs_str.c_str(), hdr_sid_str)) return; + if(!is_keeper_sid(pnt_obs_str.c_str(), hdr_sid_str)) return obs_used; // Check observation variable - if(!is_keeper_var(pnt_obs_str.c_str(), var_name, nint(obs_arr[1]))) return; + if(!is_keeper_var(pnt_obs_str.c_str(), var_name, nint(obs_arr[1]))) return obs_used; // Check observation quality - if(!is_keeper_qty(pnt_obs_str.c_str(), obs_qty)) return; + if(!is_keeper_qty(pnt_obs_str.c_str(), obs_qty)) return obs_used; // Check valid time - if(!is_keeper_vld(pnt_obs_str.c_str(), hdr_ut)) return; + if(!is_keeper_vld(pnt_obs_str.c_str(), hdr_ut)) return obs_used; // Check observation value double orig_obs_v = obs_arr[4]; - if(!is_keeper_obs(pnt_obs_str.c_str(), orig_obs_v)) return; + if(!is_keeper_obs(pnt_obs_str.c_str(), orig_obs_v)) return obs_used; // Check location double hdr_lat = hdr_arr[0]; double hdr_lon = hdr_arr[1]; double obs_x; double obs_y; - if(!is_keeper_grd(pnt_obs_str.c_str(), gr, hdr_lat, hdr_lon, obs_x, obs_y)) return; + if(!is_keeper_grd(pnt_obs_str.c_str(), gr, hdr_lat, hdr_lon, obs_x, obs_y)) return obs_used; // Check topo double hdr_elv = hdr_arr[2]; double topo_elv = bad_data_double; if(!is_keeper_topo(pnt_obs_str.c_str(), gr, obs_x, obs_y, - hdr_typ_str, hdr_elv, topo_elv)) return; + hdr_typ_str, hdr_elv, topo_elv)) return obs_used; // Check level double obs_lvl = obs_arr[2]; double obs_hgt = obs_arr[3]; - if(!is_keeper_lvl(pnt_obs_str.c_str(), hdr_typ_str, obs_lvl, obs_hgt)) return; + if(!is_keeper_lvl(pnt_obs_str.c_str(), hdr_typ_str, obs_lvl, obs_hgt)) return obs_used; // Set flags bool precip_flag = fcst_info->is_precipitation() && @@ -665,14 +666,16 @@ void VxPairDataPoint::add_point_obs(const float *hdr_arr, // Add the forecast, climatological, and observation data // Weight is from the nearest grid point int n = three_to_one(i_msg_typ, i_mask, i_interp); - if(!pd[n].add_point_pair(hdr_typ_str, hdr_sid_str, - hdr_lat, hdr_lon, hdr_elv, - obs_x, obs_y, - bad_data_int, hdr_ut, - obs_lvl, obs_hgt, - fcst_v, obs_v, obs_qty, - cpi, default_weight)) { - + if(pd[n].add_point_pair(hdr_typ_str, hdr_sid_str, + hdr_lat, hdr_lon, hdr_elv, + obs_x, obs_y, + bad_data_int, hdr_ut, + obs_lvl, obs_hgt, + fcst_v, obs_v, obs_qty, + cpi, default_weight)) { + obs_used = true; + } + else { if(mlog.verbosity_level() >= REJECT_DEBUG_LEVEL) { mlog << Debug(REJECT_DEBUG_LEVEL) << "For " << fcst_info->magic_str() << " versus " @@ -711,7 +714,7 @@ void VxPairDataPoint::add_point_obs(const float *hdr_arr, } // end for i_mask } // end for i_msg_typ - return; + return obs_used; } //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_statistics/pair_data_point.h b/src/libcode/vx_statistics/pair_data_point.h index 5d4dd74988..1ca7fd5998 100644 --- a/src/libcode/vx_statistics/pair_data_point.h +++ b/src/libcode/vx_statistics/pair_data_point.h @@ -125,7 +125,7 @@ class VxPairDataPoint : public VxPairBase { void load_seeps_climo(const ConcatString &seeps_climo_name); void set_seeps_thresh(const SingleThresh &p1_thresh); - void add_point_obs(const float *, const char *, const char *, + bool add_point_obs(const float *, const char *, const char *, unixtime, const char *, const float *, const Grid &, const char *); }; diff --git a/src/tools/core/ensemble_stat/ensemble_stat.cc b/src/tools/core/ensemble_stat/ensemble_stat.cc index e609ad2e71..dd57a93608 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat.cc +++ b/src/tools/core/ensemble_stat/ensemble_stat.cc @@ -856,7 +856,7 @@ static void process_point_vx() { for(int i=0; i mask_sid_map; - PointWeightType point_weight_flag; // Point weighting flag + PointWeightInfo point_weight_info; // Point weighting information ConcatString tmp_dir; // Directory for temporary files ConcatString version; // Config file version diff --git a/src/tools/core/point_stat/point_stat.cc b/src/tools/core/point_stat/point_stat.cc index e31d5dbacf..bf9098e7ee 100644 --- a/src/tools/core/point_stat/point_stat.cc +++ b/src/tools/core/point_stat/point_stat.cc @@ -202,15 +202,13 @@ int met_main(int argc, char *argv[]) { process_fcst_climo_files(); // Process each observation netCDF file - for(i=0; iset_grib_code_or_var_index(obs_arr, org_grib_code); diff --git a/src/tools/core/point_stat/point_stat_conf_info.cc b/src/tools/core/point_stat/point_stat_conf_info.cc index 3597f731e3..427ddd5a6d 100644 --- a/src/tools/core/point_stat/point_stat_conf_info.cc +++ b/src/tools/core/point_stat/point_stat_conf_info.cc @@ -71,9 +71,7 @@ void PointStatConfInfo::clear() { obtype_as_group_val_flag = false; mask_area_map.clear(); mask_sid_map.clear(); - point_weight_flag = PointWeightType::None; - kde_ref_angle = bad_data_double; - write_weights = false; + point_weight_info.clear(); tmp_dir.clear(); output_prefix.clear(); version.clear(); @@ -156,14 +154,8 @@ void PointStatConfInfo::process_config(GrdFileType ftype) { // Conf: model model = parse_conf_string(&conf, conf_key_model); - // Conf: point_weight_flag - point_weight_flag = parse_conf_point_weight_flag(&conf); - - // Conf: kde_ref_angle - kde_ref_angle = conf.lookup_double(conf_key_kde_ref_angle); - - // Conf: write_weights - write_weights = conf.lookup_bool(conf_key_write_weights); + // Conf: point_weight_info + point_weight_info = parse_conf_point_weight(&conf); // Conf: tmp_dir tmp_dir = parse_conf_tmp_dir(&conf); diff --git a/src/tools/core/point_stat/point_stat_conf_info.h b/src/tools/core/point_stat/point_stat_conf_info.h index 17576306a1..db908d881b 100644 --- a/src/tools/core/point_stat/point_stat_conf_info.h +++ b/src/tools/core/point_stat/point_stat_conf_info.h @@ -239,9 +239,7 @@ class PointStatConfInfo { // Mapping of mask names to Station ID lists std::map mask_sid_map; - PointWeightType point_weight_flag; // Point weighting flag - double kde_ref_angle; // KDE reference angle - bool write_weights; // Write weights to output file + PointWeightInfo point_weight_info; // Point weighting information ConcatString tmp_dir; // Directory for temporary files ConcatString output_prefix; // String to customize output file name From ef831ea3a8f1ab178630a793b13ed60cb32579b8 Mon Sep 17 00:00:00 2001 From: JohnHalleyGotway Date: Wed, 13 May 2026 13:33:52 -0600 Subject: [PATCH 05/36] Per #3335, rename PointWeightFlag::add() as PointWeightFlag::add_location(). --- src/basic/vx_config/config_constants.h | 3 ++- src/basic/vx_config/config_util.cc | 2 +- src/tools/core/ensemble_stat/ensemble_stat.cc | 8 ++++---- src/tools/core/pair_stat/pair_stat.cc | 2 ++ src/tools/core/pair_stat/pair_stat_conf_info.cc | 2 ++ src/tools/core/point_stat/point_stat.cc | 6 +++--- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/basic/vx_config/config_constants.h b/src/basic/vx_config/config_constants.h index 72157a99c0..6011386eea 100644 --- a/src/basic/vx_config/config_constants.h +++ b/src/basic/vx_config/config_constants.h @@ -528,7 +528,8 @@ struct PointWeightInfo { PointWeightInfo &operator=(const PointWeightInfo &a) noexcept; void clear(); - void add(const std::string &, double, double); + bool need_location() const { return type == PointWeightType::KDE; } + void add_location(const std::string &, double, double); void compute_weights(); }; diff --git a/src/basic/vx_config/config_util.cc b/src/basic/vx_config/config_util.cc index a8388fbd94..bfbdb57420 100644 --- a/src/basic/vx_config/config_util.cc +++ b/src/basic/vx_config/config_util.cc @@ -1360,7 +1360,7 @@ void PointWeightInfo::clear() { /////////////////////////////////////////////////////////////////////////////// -void PointWeightInfo::add(const string &sid, double lat, double lon) { +void PointWeightInfo::add_location(const string &sid, double lat, double lon) { // Only add unique locations if(!sid_wgt_map.count(sid)) { diff --git a/src/tools/core/ensemble_stat/ensemble_stat.cc b/src/tools/core/ensemble_stat/ensemble_stat.cc index dd57a93608..973b95d652 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat.cc +++ b/src/tools/core/ensemble_stat/ensemble_stat.cc @@ -1142,10 +1142,10 @@ static void process_point_obs(int i_nc) { obs_qty_str.c_str(), obs_arr, grid, var_name.c_str())) { - // Update point_weight_flag KDE locations for any obs used - if(conf_info.point_weight_info.type == PointWeightType::KDE) { - conf_info.point_weight_info.add( - hdr_sid_str, hdr_arr[1], hdr_arr[2]); + // Update point weight locations + if(conf_info.point_weight_info.need_location()) { + conf_info.point_weight_info.add_location( + hdr_sid_str, hdr_arr[1], hdr_arr[2]); } } } diff --git a/src/tools/core/pair_stat/pair_stat.cc b/src/tools/core/pair_stat/pair_stat.cc index 101358c9f4..b605175120 100644 --- a/src/tools/core/pair_stat/pair_stat.cc +++ b/src/tools/core/pair_stat/pair_stat.cc @@ -686,6 +686,8 @@ static void process_ioda_pairs(const ConcatString &file_name) { } } + // JHG HERE + mlog << Debug(3) << "Keeping " << n_keep << " of " << n_read << " IODA pairs from \"" << file_name << "\".\n"; diff --git a/src/tools/core/pair_stat/pair_stat_conf_info.cc b/src/tools/core/pair_stat/pair_stat_conf_info.cc index 7225f49d9c..0cf5c6935e 100644 --- a/src/tools/core/pair_stat/pair_stat_conf_info.cc +++ b/src/tools/core/pair_stat/pair_stat_conf_info.cc @@ -566,6 +566,8 @@ bool PairStatConfInfo::add_mpr_line(STATLine l) { if(vx.add_mpr_line(l)) keep = true; } + // JHG HERE? + return keep; } diff --git a/src/tools/core/point_stat/point_stat.cc b/src/tools/core/point_stat/point_stat.cc index bf9098e7ee..a10d32da21 100644 --- a/src/tools/core/point_stat/point_stat.cc +++ b/src/tools/core/point_stat/point_stat.cc @@ -966,9 +966,9 @@ static void process_obs_file(int i_nc) { hdr_ut, obs_qty_str.c_str(), obs_arr, grid, var_name.c_str())) { - // Update point_weight_flag KDE locations for any obs used - if(conf_info.point_weight_info.type == PointWeightType::KDE) { - conf_info.point_weight_info.add( + // Update point weight locations + if(conf_info.point_weight_info.need_location()) { + conf_info.point_weight_info.add_location( hdr_sid_str, hdr_arr[1], hdr_arr[2]); } } From 0290f7098f6f623fbf62c2171a25fca1a1514efb Mon Sep 17 00:00:00 2001 From: JohnHalleyGotway Date: Wed, 13 May 2026 15:48:38 -0600 Subject: [PATCH 06/36] Per #3335, move PointWeightInfo into new vx_util/point_weight.h and .cc location. --- src/basic/vx_config/config_constants.h | 39 ---- src/basic/vx_config/config_util.cc | 68 ------- src/basic/vx_config/config_util.h | 1 - src/basic/vx_util/Makefile.am | 1 + src/basic/vx_util/Makefile.in | 37 +++- src/basic/vx_util/point_weight.cc | 168 ++++++++++++++++++ src/basic/vx_util/point_weight.h | 104 +++++++++++ src/basic/vx_util/vx_util.h | 1 + src/libcode/vx_statistics/pair_base.cc | 27 ++- src/tools/core/ensemble_stat/ensemble_stat.cc | 6 +- src/tools/core/point_stat/point_stat.cc | 6 +- 11 files changed, 332 insertions(+), 126 deletions(-) create mode 100644 src/basic/vx_util/point_weight.cc create mode 100644 src/basic/vx_util/point_weight.h diff --git a/src/basic/vx_config/config_constants.h b/src/basic/vx_config/config_constants.h index 6011386eea..4221a8f201 100644 --- a/src/basic/vx_config/config_constants.h +++ b/src/basic/vx_config/config_constants.h @@ -496,45 +496,6 @@ enum class GridWeightType { //////////////////////////////////////////////////////////////////////// -// -// Enumeration for point_weight_flag configuration parameter -// - -enum class PointWeightType { - None, // Apply no point weighting - SID, // Apply station ID weighting - KDE // Apply kernel density estimation weighting -}; - -// -// Struct to store point_weight_flag KDE location information -// - -struct LatLonWgt { - double lat; - double lon; - double wgt; -}; - -struct PointWeightInfo { - PointWeightType type; - double kde_ref_angle; - bool write_weights; - std::map sid_wgt_map; - - PointWeightInfo() { clear(); } - ~PointWeightInfo() { clear(); } - PointWeightInfo(PointWeightInfo const &i) { *this = i; } - PointWeightInfo &operator=(const PointWeightInfo &a) noexcept; - - void clear(); - bool need_location() const { return type == PointWeightType::KDE; } - void add_location(const std::string &, double, double); - void compute_weights(); -}; - -//////////////////////////////////////////////////////////////////////// - // // Enumeration for grid_decomp_flag configuration parameter // diff --git a/src/basic/vx_config/config_util.cc b/src/basic/vx_config/config_util.cc index bfbdb57420..3e60c014bb 100644 --- a/src/basic/vx_config/config_util.cc +++ b/src/basic/vx_config/config_util.cc @@ -1339,37 +1339,6 @@ map parse_conf_string_map( /////////////////////////////////////////////////////////////////////////////// -PointWeightInfo &PointWeightInfo::operator=(const PointWeightInfo &a) noexcept { - if(this != &a) { - type = a.type; - kde_ref_angle = a.kde_ref_angle; - write_weights = a.write_weights; - sid_wgt_map = a.sid_wgt_map; - } - return *this; -} - -/////////////////////////////////////////////////////////////////////////////// - -void PointWeightInfo::clear() { - type = PointWeightType::None; - kde_ref_angle = bad_data_double; - write_weights = false; - sid_wgt_map.clear(); -} - -/////////////////////////////////////////////////////////////////////////////// - -void PointWeightInfo::add_location(const string &sid, double lat, double lon) { - - // Only add unique locations - if(!sid_wgt_map.count(sid)) { - sid_wgt_map[sid] = { lat, lon, bad_data_double }; - } -} - -/////////////////////////////////////////////////////////////////////////////// - TimeSummaryInfo &TimeSummaryInfo::operator=(const TimeSummaryInfo &a) noexcept { if(this != &a) { flag = a.flag; @@ -2469,43 +2438,6 @@ GridWeightType parse_conf_grid_weight_flag(Dictionary *dict) { /////////////////////////////////////////////////////////////////////////////// -PointWeightInfo parse_conf_point_weight(Dictionary *dict) { - PointWeightInfo info; - const char *method_name = "parse_conf_point_weight() -> "; - - if(!dict) { - mlog << Error << "\n" << method_name - << "empty dictionary!\n\n"; - exit(1); - } - - // Conf: point_weight_flag - - // Get the integer flag value for the current entry - int v = dict->lookup_int(conf_key_point_weight_flag); - - // Convert integer to enumerated GridWeightType - if(v == conf_const.lookup_int(conf_val_none)) info.type = PointWeightType::None; - else if(v == conf_const.lookup_int(conf_val_sid)) info.type = PointWeightType::SID; - else if(v == conf_const.lookup_int(conf_val_kde)) info.type = PointWeightType::KDE; - else { - mlog << Error << "\n" << method_name - << "Unexpected config file value of " << v << " for \"" - << conf_key_point_weight_flag << "\".\n\n"; - exit(1); - } - - // Conf: kde_ref_angle - info.kde_ref_angle = dict->lookup_double(conf_key_kde_ref_angle); - - // Conf: write_weights - info.write_weights = dict->lookup_bool(conf_key_write_weights); - - return info; -} - -/////////////////////////////////////////////////////////////////////////////// - DuplicateType parse_conf_duplicate_flag(Dictionary *dict) { DuplicateType t = DuplicateType::None; int v; diff --git a/src/basic/vx_config/config_util.h b/src/basic/vx_config/config_util.h index c02a1b7282..3f8ea3f8e7 100644 --- a/src/basic/vx_config/config_util.h +++ b/src/basic/vx_config/config_util.h @@ -121,7 +121,6 @@ extern NbrhdInfo parse_conf_nbrhd(Dictionary *dict, const char *); extern EASProbInfo parse_conf_eas_prob(Dictionary *dict); extern HiRAInfo parse_conf_hira(Dictionary *dict); extern GridWeightType parse_conf_grid_weight_flag(Dictionary *dict); -extern PointWeightInfo parse_conf_point_weight(Dictionary *dict); extern DuplicateType parse_conf_duplicate_flag(Dictionary *dict); extern ObsSummary parse_conf_obs_summary(Dictionary *dict); extern ConcatString parse_conf_tmp_dir(Dictionary *dict); diff --git a/src/basic/vx_util/Makefile.am b/src/basic/vx_util/Makefile.am index 365e0e5ffc..56b997869d 100644 --- a/src/basic/vx_util/Makefile.am +++ b/src/basic/vx_util/Makefile.am @@ -62,6 +62,7 @@ libvx_util_a_SOURCES = ascii_table.cc ascii_table.h \ polyline.h polyline.cc \ mask_poly.h mask_poly.cc \ mask_sid.h mask_sid.cc \ + point_weight.h point_weight.cc \ read_fortran_binary.h read_fortran_binary.cc \ met_buffer.h met_buffer.cc \ smart_buffer.h smart_buffer.cc \ diff --git a/src/basic/vx_util/Makefile.in b/src/basic/vx_util/Makefile.in index 73f4596224..960901c5e7 100644 --- a/src/basic/vx_util/Makefile.in +++ b/src/basic/vx_util/Makefile.in @@ -129,14 +129,15 @@ am__libvx_util_a_SOURCES_DIST = ascii_table.cc ascii_table.h \ interp_mthd.h interp_util.cc interp_util.h two_to_one.cc \ two_to_one.h get_filenames.cc get_filenames.h util_constants.h \ bool_to_string.h empty_string.h polyline.h polyline.cc \ - mask_poly.h mask_poly.cc mask_sid.h mask_sid.cc \ - read_fortran_binary.h read_fortran_binary.cc met_buffer.h \ - met_buffer.cc smart_buffer.h smart_buffer.cc vx_util.h \ - CircularTemplate.h CircularTemplate.cc GridTemplate.h \ - GridTemplate.cc GridPoint.h GridPoint.cc GridOffset.h \ - GridOffset.cc observation.h observation.cc stat_column_defs.h \ - handle_openmp.h handle_openmp.cc RectangularTemplate.h \ - RectangularTemplate.cc python_line.h python_line.cc + mask_poly.h mask_poly.cc mask_sid.h mask_sid.cc point_weight.h \ + point_weight.cc read_fortran_binary.h read_fortran_binary.cc \ + met_buffer.h met_buffer.cc smart_buffer.h smart_buffer.cc \ + vx_util.h CircularTemplate.h CircularTemplate.cc \ + GridTemplate.h GridTemplate.cc GridPoint.h GridPoint.cc \ + GridOffset.h GridOffset.cc observation.h observation.cc \ + stat_column_defs.h handle_openmp.h handle_openmp.cc \ + RectangularTemplate.h RectangularTemplate.cc python_line.h \ + python_line.cc @ENABLE_PYTHON_TRUE@am__objects_1 = \ @ENABLE_PYTHON_TRUE@ libvx_util_a-python_line.$(OBJEXT) am__objects_2 = $(am__objects_1) @@ -174,6 +175,7 @@ am_libvx_util_a_OBJECTS = libvx_util_a-ascii_table.$(OBJEXT) \ libvx_util_a-polyline.$(OBJEXT) \ libvx_util_a-mask_poly.$(OBJEXT) \ libvx_util_a-mask_sid.$(OBJEXT) \ + libvx_util_a-point_weight.$(OBJEXT) \ libvx_util_a-read_fortran_binary.$(OBJEXT) \ libvx_util_a-met_buffer.$(OBJEXT) \ libvx_util_a-smart_buffer.$(OBJEXT) \ @@ -239,6 +241,7 @@ am__depfiles_remade = ./$(DEPDIR)/libvx_util_a-CircularTemplate.Po \ ./$(DEPDIR)/libvx_util_a-num_array.Po \ ./$(DEPDIR)/libvx_util_a-observation.Po \ ./$(DEPDIR)/libvx_util_a-ordinal.Po \ + ./$(DEPDIR)/libvx_util_a-point_weight.Po \ ./$(DEPDIR)/libvx_util_a-polyline.Po \ ./$(DEPDIR)/libvx_util_a-python_line.Po \ ./$(DEPDIR)/libvx_util_a-read_fortran_binary.Po \ @@ -506,6 +509,7 @@ libvx_util_a_SOURCES = ascii_table.cc ascii_table.h \ polyline.h polyline.cc \ mask_poly.h mask_poly.cc \ mask_sid.h mask_sid.cc \ + point_weight.h point_weight.cc \ read_fortran_binary.h read_fortran_binary.cc \ met_buffer.h met_buffer.cc \ smart_buffer.h smart_buffer.cc \ @@ -607,6 +611,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-num_array.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-observation.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-ordinal.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-point_weight.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-polyline.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-python_line.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvx_util_a-read_fortran_binary.Po@am__quote@ # am--include-marker @@ -1141,6 +1146,20 @@ libvx_util_a-mask_sid.obj: mask_sid.cc @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libvx_util_a-mask_sid.obj `if test -f 'mask_sid.cc'; then $(CYGPATH_W) 'mask_sid.cc'; else $(CYGPATH_W) '$(srcdir)/mask_sid.cc'; fi` +libvx_util_a-point_weight.o: point_weight.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libvx_util_a-point_weight.o -MD -MP -MF $(DEPDIR)/libvx_util_a-point_weight.Tpo -c -o libvx_util_a-point_weight.o `test -f 'point_weight.cc' || echo '$(srcdir)/'`point_weight.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvx_util_a-point_weight.Tpo $(DEPDIR)/libvx_util_a-point_weight.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='point_weight.cc' object='libvx_util_a-point_weight.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libvx_util_a-point_weight.o `test -f 'point_weight.cc' || echo '$(srcdir)/'`point_weight.cc + +libvx_util_a-point_weight.obj: point_weight.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libvx_util_a-point_weight.obj -MD -MP -MF $(DEPDIR)/libvx_util_a-point_weight.Tpo -c -o libvx_util_a-point_weight.obj `if test -f 'point_weight.cc'; then $(CYGPATH_W) 'point_weight.cc'; else $(CYGPATH_W) '$(srcdir)/point_weight.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvx_util_a-point_weight.Tpo $(DEPDIR)/libvx_util_a-point_weight.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='point_weight.cc' object='libvx_util_a-point_weight.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libvx_util_a-point_weight.obj `if test -f 'point_weight.cc'; then $(CYGPATH_W) 'point_weight.cc'; else $(CYGPATH_W) '$(srcdir)/point_weight.cc'; fi` + libvx_util_a-read_fortran_binary.o: read_fortran_binary.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvx_util_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libvx_util_a-read_fortran_binary.o -MD -MP -MF $(DEPDIR)/libvx_util_a-read_fortran_binary.Tpo -c -o libvx_util_a-read_fortran_binary.o `test -f 'read_fortran_binary.cc' || echo '$(srcdir)/'`read_fortran_binary.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvx_util_a-read_fortran_binary.Tpo $(DEPDIR)/libvx_util_a-read_fortran_binary.Po @@ -1462,6 +1481,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/libvx_util_a-num_array.Po -rm -f ./$(DEPDIR)/libvx_util_a-observation.Po -rm -f ./$(DEPDIR)/libvx_util_a-ordinal.Po + -rm -f ./$(DEPDIR)/libvx_util_a-point_weight.Po -rm -f ./$(DEPDIR)/libvx_util_a-polyline.Po -rm -f ./$(DEPDIR)/libvx_util_a-python_line.Po -rm -f ./$(DEPDIR)/libvx_util_a-read_fortran_binary.Po @@ -1554,6 +1574,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libvx_util_a-num_array.Po -rm -f ./$(DEPDIR)/libvx_util_a-observation.Po -rm -f ./$(DEPDIR)/libvx_util_a-ordinal.Po + -rm -f ./$(DEPDIR)/libvx_util_a-point_weight.Po -rm -f ./$(DEPDIR)/libvx_util_a-polyline.Po -rm -f ./$(DEPDIR)/libvx_util_a-python_line.Po -rm -f ./$(DEPDIR)/libvx_util_a-read_fortran_binary.Po diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc new file mode 100644 index 0000000000..1a62c52ac0 --- /dev/null +++ b/src/basic/vx_util/point_weight.cc @@ -0,0 +1,168 @@ +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* +// ** Copyright UCAR (c) 1992 - 2026 +// ** University Corporation for Atmospheric Research (UCAR) +// ** National Center for Atmospheric Research (NCAR) +// ** Research Applications Lab (RAL) +// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* + +/////////////////////////////////////////////////////////////////////////////// + +#include "vx_util.h" + +#include "config_file.h" +#include "config_constants.h" + +#include "point_weight.h" + +using namespace std; + +/////////////////////////////////////////////////////////////////////////////// +// +// Code for PointWeightInfo struct +// +/////////////////////////////////////////////////////////////////////////////// + +PointWeightInfo::PointWeightInfo() { + init_from_scratch(); +} + +//////////////////////////////////////////////////////////////////////// + +PointWeightInfo::~PointWeightInfo() { + clear(); +} + +//////////////////////////////////////////////////////////////////////// + +PointWeightInfo::PointWeightInfo(const PointWeightInfo &m) { + + init_from_scratch(); + + assign(m); +} + +//////////////////////////////////////////////////////////////////////// + +PointWeightInfo & PointWeightInfo::operator=(const PointWeightInfo &m) noexcept { + + if(this == &m) return *this; + + assign(m); + + return *this; +} + +//////////////////////////////////////////////////////////////////////// + +void PointWeightInfo::init_from_scratch() { + + clear(); + + return; +} + +//////////////////////////////////////////////////////////////////////// + +void PointWeightInfo::clear() { + Type = PointWeightType::None; + KDERefAngle = bad_data_double; + WriteWeights = false; + SIDWgtMap.clear(); +} + +//////////////////////////////////////////////////////////////////////// + +void PointWeightInfo::assign(const PointWeightInfo & m) { + Type = m.Type; + KDERefAngle = m.KDERefAngle; + WriteWeights = m.WriteWeights; + SIDWgtMap = m.SIDWgtMap; + + return; +} + +/////////////////////////////////////////////////////////////////////////////// + +void PointWeightInfo::add_sid(const string &sid, double lat, double lon) { + + // Add unique SID strings and initialize weights to bad data + if(!SIDWgtMap.count(sid)) { + SIDWgtMap[sid] = { lat, lon, bad_data_double }; + } +} + +/////////////////////////////////////////////////////////////////////////////// + +bool PointWeightInfo::has_sid(const string &sid, double &wgt) const { + bool found = false; + + if(SIDWgtMap.count(sid) == 0) { + wgt = bad_data_double; + } + else { + found = true; + wgt = SIDWgtMap.at(sid).wgt; + } + + return found; +} + +/////////////////////////////////////////////////////////////////////////////// + +void PointWeightInfo::compute_weights() { + + // Compute KDE weights + if(Type == PointWeightType::KDE) { + + +// JHG + } + +} + +/////////////////////////////////////////////////////////////////////////////// +// +// Utility functions +// +/////////////////////////////////////////////////////////////////////////////// + +PointWeightInfo parse_conf_point_weight(Dictionary *dict) { + PointWeightInfo info; + const char *method_name = "parse_conf_point_weight() -> "; + + if(!dict) { + mlog << Error << "\n" << method_name + << "empty dictionary!\n\n"; + exit(1); + } + + // Conf: point_weight_flag + + // Get the integer flag value for the current entry + int v = dict->lookup_int(conf_key_point_weight_flag); + + // Parse config constant values + MetConfig conf_const(replace_path(config_const_filename).c_str()); + + // Convert integer to enumerated GridWeightType + if(v == conf_const.lookup_int(conf_val_none)) info.set_type(PointWeightType::None); + else if(v == conf_const.lookup_int(conf_val_sid)) info.set_type(PointWeightType::SID); + else if(v == conf_const.lookup_int(conf_val_kde)) info.set_type(PointWeightType::KDE); + else { + mlog << Error << "\n" << method_name + << "Unexpected config file value of " << v << " for \"" + << conf_key_point_weight_flag << "\".\n\n"; + exit(1); + } + + // Conf: kde_ref_angle + info.set_kde_ref_angle(dict->lookup_double(conf_key_kde_ref_angle)); + + // Conf: write_weights + info.set_write_weights(dict->lookup_bool(conf_key_write_weights)); + + return info; +} + +/////////////////////////////////////////////////////////////////////////////// diff --git a/src/basic/vx_util/point_weight.h b/src/basic/vx_util/point_weight.h new file mode 100644 index 0000000000..0b3a47fc2a --- /dev/null +++ b/src/basic/vx_util/point_weight.h @@ -0,0 +1,104 @@ +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* +// ** Copyright UCAR (c) 1992 - 2026 +// ** University Corporation for Atmospheric Research (UCAR) +// ** National Center for Atmospheric Research (NCAR) +// ** Research Applications Lab (RAL) +// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* +//////////////////////////////////////////////////////////////////////// + +#ifndef __POINT_WEIGHT_H__ +#define __POINT_WEIGHT_H__ + +#include "vx_util.h" + +#include "config_constants.h" + +//////////////////////////////////////////////////////////////////////// + +// +// Enumeration for point_weight_flag configuration parameter +// + +enum class PointWeightType { + None, // Apply no point weighting + SID, // Apply station ID weighting + KDE // Apply kernel density estimation weighting +}; + +// +// Struct to store point location information +// +struct LatLonWgt { + double lat; + double lon; + double wgt; +}; + +//////////////////////////////////////////////////////////////////////// +// +// Class to store point weighting information +// +//////////////////////////////////////////////////////////////////////// + +class PointWeightInfo { + + void init_from_scratch(); + + void assign(const PointWeightInfo &); + + // Point weighting type + PointWeightType Type; + + // KDE Reference Angle + double KDERefAngle; + + // Write weights to output file + bool WriteWeights; + + // Mapping of SID name to location and weight values + std::map SIDWgtMap; + + public: + + PointWeightInfo(); + ~PointWeightInfo(); + PointWeightInfo(const PointWeightInfo &); + PointWeightInfo & operator=(const PointWeightInfo &a) noexcept; + + void clear(); + + void set_type(PointWeightType); + void set_kde_ref_angle(double); + void set_write_weights(bool); + + PointWeightType type() const; + double kde_ref_angle() const; + bool write_weights() const; + + bool need_sid() const; + void add_sid(const std::string &, double, double); + bool has_sid(const std::string &, double &) const; + void compute_weights(); +}; + +//////////////////////////////////////////////////////////////////////// + +inline void PointWeightInfo::set_type(PointWeightType t) { Type = t; } +inline void PointWeightInfo::set_kde_ref_angle(double a) { KDERefAngle = a; } +inline void PointWeightInfo::set_write_weights(bool b) { WriteWeights = b; } +inline PointWeightType PointWeightInfo::type() const { return Type; } +inline double PointWeightInfo::kde_ref_angle() const { return KDERefAngle; } +inline bool PointWeightInfo::write_weights() const { return WriteWeights; } +inline bool PointWeightInfo::need_sid() const { return Type == PointWeightType::KDE; } + +//////////////////////////////////////////////////////////////////////// + +extern PointWeightInfo parse_conf_point_weight(Dictionary *dict); + +//////////////////////////////////////////////////////////////////////// + +#endif // __POINT_WEIGHT_H__ + +//////////////////////////////////////////////////////////////////////// + diff --git a/src/basic/vx_util/vx_util.h b/src/basic/vx_util/vx_util.h index 75854c5360..dfa790d949 100644 --- a/src/basic/vx_util/vx_util.h +++ b/src/basic/vx_util/vx_util.h @@ -61,6 +61,7 @@ #include "polyline.h" #include "mask_poly.h" #include "mask_sid.h" +#include "point_weight.h" #include "read_fortran_binary.h" #include "stat_column_defs.h" diff --git a/src/libcode/vx_statistics/pair_base.cc b/src/libcode/vx_statistics/pair_base.cc index 649db813f7..ad866f60d8 100644 --- a/src/libcode/vx_statistics/pair_base.cc +++ b/src/libcode/vx_statistics/pair_base.cc @@ -787,13 +787,12 @@ void PairBase::calc_obs_summary(){ //////////////////////////////////////////////////////////////////////// void PairBase::set_point_weight(const PointWeightInfo &info) { - const char *method_name = "PairBase::set_point_weight() -> "; - if(!IsPointVx || info.type == PointWeightType::None) return; + if(!IsPointVx || info.type() == PointWeightType::None) return; // Apply the SID point weight type - if(info.type == PointWeightType::SID && + if(info.type() == PointWeightType::SID && mask_sid_ptr != nullptr) { mlog << Debug(4) @@ -818,7 +817,27 @@ void PairBase::set_point_weight(const PointWeightInfo &info) { } else { mlog << Warning << "\n" << method_name - << "no match found for station id: " + << "no point weight SID match found for station id: " + << sid_sa[i_obs] << "\n\n"; + } + } + } + // Apply the KDE point weight type + else if(info.type() == PointWeightType::KDE) { + + mlog << Debug(4) + << "Applying KDE point weights.\n"; + + // Loop through the point observations + for(int i_obs=0; i_obs Date: Wed, 13 May 2026 23:41:48 +0000 Subject: [PATCH 07/36] Per #3335, implement kde weights. --- src/basic/vx_util/point_weight.cc | 121 ++++++++++++++++++------- src/basic/vx_util/point_weight.h | 22 +++-- src/libcode/vx_statistics/pair_base.cc | 5 +- 3 files changed, 105 insertions(+), 43 deletions(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 1a62c52ac0..19b24b2111 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -24,7 +24,7 @@ using namespace std; /////////////////////////////////////////////////////////////////////////////// PointWeightInfo::PointWeightInfo() { - init_from_scratch(); + clear(); } //////////////////////////////////////////////////////////////////////// @@ -36,9 +36,6 @@ PointWeightInfo::~PointWeightInfo() { //////////////////////////////////////////////////////////////////////// PointWeightInfo::PointWeightInfo(const PointWeightInfo &m) { - - init_from_scratch(); - assign(m); } @@ -55,20 +52,12 @@ PointWeightInfo & PointWeightInfo::operator=(const PointWeightInfo &m) noexcept //////////////////////////////////////////////////////////////////////// -void PointWeightInfo::init_from_scratch() { - - clear(); - - return; -} - -//////////////////////////////////////////////////////////////////////// - void PointWeightInfo::clear() { Type = PointWeightType::None; KDERefAngle = bad_data_double; + SIDWeights.clear(); + WeightsComputed = false; WriteWeights = false; - SIDWgtMap.clear(); } //////////////////////////////////////////////////////////////////////// @@ -76,8 +65,9 @@ void PointWeightInfo::clear() { void PointWeightInfo::assign(const PointWeightInfo & m) { Type = m.Type; KDERefAngle = m.KDERefAngle; + SIDWeights = m.SIDWeights; + WeightsComputed = m.WeightsComputed; WriteWeights = m.WriteWeights; - SIDWgtMap = m.SIDWgtMap; return; } @@ -85,40 +75,107 @@ void PointWeightInfo::assign(const PointWeightInfo & m) { /////////////////////////////////////////////////////////////////////////////// void PointWeightInfo::add_sid(const string &sid, double lat, double lon) { + bool found = false; - // Add unique SID strings and initialize weights to bad data - if(!SIDWgtMap.count(sid)) { - SIDWgtMap[sid] = { lat, lon, bad_data_double }; + // Check for existing entry + for(auto it=SIDWeights.begin(); it != SIDWeights.end(); ++it) { + if(it->SID == sid) { + found = true; + break; + } + } + + // Add unique station ids + if(!found) { + SIDWeight e = {sid, lat, lon, bad_data_double}; + SIDWeights.emplace_back(e); + WeightsComputed = false; } } /////////////////////////////////////////////////////////////////////////////// bool PointWeightInfo::has_sid(const string &sid, double &wgt) const { + const char *method_name = "PointWeightInfo()::has_sid() -> "; bool found = false; - if(SIDWgtMap.count(sid) == 0) { - wgt = bad_data_double; + // Check that the weights have been computed + if(!WeightsComputed) { + mlog << Warning << "\n" << method_name + << "Accessing point weights before computing them!\n\n"; } - else { - found = true; - wgt = SIDWgtMap.at(sid).wgt; + + // Search for a matching entry + for(auto it=SIDWeights.begin(); it != SIDWeights.end(); ++it) { + if(it->SID == sid) { + found = true; + wgt = it->Wgt; + break; + } } + // Return bad data for no match + if(!found) wgt = bad_data_double; + return found; } +/////////////////////////////////////////////////////////////////////////////// +// +// Reference: +// Haiden, T., M.J. Rodwell, D.S. Richardson, A. Okagaki, T. Robinson, T. Hewson, 2012: +// Intercomparison of Global Model Precipitation Forecast Skill in 2010/11 +// Using the SEEPS Score. Monthly Weather Review, 140, 2720-2733. +// doi.org/10.1175/MWR-D-11-00301.1 +// /////////////////////////////////////////////////////////////////////////////// -void PointWeightInfo::compute_weights() { - - // Compute KDE weights - if(Type == PointWeightType::KDE) { - - -// JHG - } - +void PointWeightInfo::compute_kde_weights() { + + // Check for no work to do + if(Type != PointWeightType::KDE || WeightsComputed) return; + + // Store sums for the weights + vector dist_sum((int) SIDWeights.size(), 0.0); + + // Define e constant + const double e = exp(1.0); + +#pragma omp declare reduction(vec_double_plus : vector : \ + transform(omp_out.begin(), omp_out.end(), \ + omp_in.begin(), omp_out.begin(), \ + plus())) \ + initializer(omp_priv = decltype(omp_orig)(omp_orig.size())) + +#pragma omp parallel default (none) \ + shared(SIDWeights, KDERefAngle, dist_sum, e) + { + + // Compute the sums of the pairwise distances +#pragma omp for reduction(vec_double_plus: dist_sum) \ + collapse(2) + for(int i=0; i SIDWeights; + + // Keep track of whether the weights have already been computed + bool WeightsComputed; + // Write weights to output file bool WriteWeights; - // Mapping of SID name to location and weight values - std::map SIDWgtMap; - public: PointWeightInfo(); @@ -79,7 +81,7 @@ class PointWeightInfo { bool need_sid() const; void add_sid(const std::string &, double, double); bool has_sid(const std::string &, double &) const; - void compute_weights(); + void compute_kde_weights(); }; //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_statistics/pair_base.cc b/src/libcode/vx_statistics/pair_base.cc index ad866f60d8..4f834b414d 100644 --- a/src/libcode/vx_statistics/pair_base.cc +++ b/src/libcode/vx_statistics/pair_base.cc @@ -824,7 +824,10 @@ void PairBase::set_point_weight(const PointWeightInfo &info) { } // Apply the KDE point weight type else if(info.type() == PointWeightType::KDE) { - + + // Compute weights, if needed + info.compute_kde_weights(); + mlog << Debug(4) << "Applying KDE point weights.\n"; From 486d7067331bf491f764c163469b28839e32000d Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Thu, 14 May 2026 15:34:45 +0000 Subject: [PATCH 08/36] Per #3335, can pass PointWeightInfo as const since set_point_weight() calls compute_kde_weights() if they've not already been computed. --- src/libcode/vx_statistics/pair_base.cc | 4 ++-- src/libcode/vx_statistics/pair_base.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcode/vx_statistics/pair_base.cc b/src/libcode/vx_statistics/pair_base.cc index 4f834b414d..5657849772 100644 --- a/src/libcode/vx_statistics/pair_base.cc +++ b/src/libcode/vx_statistics/pair_base.cc @@ -786,7 +786,7 @@ void PairBase::calc_obs_summary(){ //////////////////////////////////////////////////////////////////////// -void PairBase::set_point_weight(const PointWeightInfo &info) { +void PairBase::set_point_weight(PointWeightInfo &info) { const char *method_name = "PairBase::set_point_weight() -> "; if(!IsPointVx || info.type() == PointWeightType::None) return; @@ -1598,7 +1598,7 @@ void VxPairBase::calc_obs_summary() { //////////////////////////////////////////////////////////////////////// -void VxPairBase::set_point_weight(const PointWeightInfo &info) { +void VxPairBase::set_point_weight(PointWeightInfo &info) { if(n_vx == 0) { mlog << Warning << "\nVxPairBase::set_point_weight() -> " diff --git a/src/libcode/vx_statistics/pair_base.h b/src/libcode/vx_statistics/pair_base.h index 23221ead15..c71d4fc77c 100644 --- a/src/libcode/vx_statistics/pair_base.h +++ b/src/libcode/vx_statistics/pair_base.h @@ -213,7 +213,7 @@ class PairBase { void calc_obs_summary(); - void set_point_weight(const PointWeightInfo &); + void set_point_weight(PointWeightInfo &); }; //////////////////////////////////////////////////////////////////////// @@ -404,7 +404,7 @@ class VxPairBase { void print_obs_summary() const; void calc_obs_summary(); - void set_point_weight(const PointWeightInfo &); + void set_point_weight(PointWeightInfo &); bool is_keeper_sid(const char *, const char *); bool is_keeper_var(const char *, const char *, int); From 885fb08a8a7da9ba3073a8045e16581b0377a3c5 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Thu, 14 May 2026 16:10:59 +0000 Subject: [PATCH 09/36] Per #3335, needed to switch ADPUPA to ADPSFC to revert back to previous functionality. --- internal/test_unit/xml/unit_point_weight.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/test_unit/xml/unit_point_weight.xml b/internal/test_unit/xml/unit_point_weight.xml index 947e2f52d1..f0f7841396 100644 --- a/internal/test_unit/xml/unit_point_weight.xml +++ b/internal/test_unit/xml/unit_point_weight.xml @@ -171,7 +171,7 @@ DESC SID_WEIGHT POINT_WEIGHT SID MASK_GRID - MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPUPA_ELEV.txt" + MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPSFC_ELEV.txt" \ 6 \ From 1a3c9da337033acb87346d1cf4cde43e4179cbc9 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Thu, 14 May 2026 18:04:31 +0000 Subject: [PATCH 10/36] Per #3335, add debug logging and pass (lat,lon) correctly. --- src/basic/vx_util/point_weight.cc | 14 ++++++++++++++ src/basic/vx_util/point_weight.h | 2 ++ src/libcode/vx_statistics/pair_base.cc | 5 +++-- src/tools/core/ensemble_stat/ensemble_stat.cc | 2 +- src/tools/core/point_stat/point_stat.cc | 2 +- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 19b24b2111..725b3fc879 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -135,6 +135,9 @@ void PointWeightInfo::compute_kde_weights() { // Check for no work to do if(Type != PointWeightType::KDE || WeightsComputed) return; + mlog << Debug(3) << "Computing KDE point weights using " << n() + << " observation locations.\n"; + // Store sums for the weights vector dist_sum((int) SIDWeights.size(), 0.0); @@ -174,6 +177,17 @@ void PointWeightInfo::compute_kde_weights() { } // End omp parallel + // Dump weights for high verbosity + if(mlog.verbosity_level() >= 7) { + mlog << Debug(7) << "Computed KDE weights for " << n() + << " observation locations:\n"; + for(int i=0; i Date: Thu, 14 May 2026 18:07:23 +0000 Subject: [PATCH 11/36] Per #3335, fix spacing --- src/basic/vx_util/point_weight.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 725b3fc879..0adf4d5017 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -182,8 +182,8 @@ void PointWeightInfo::compute_kde_weights() { mlog << Debug(7) << "Computed KDE weights for " << n() << " observation locations:\n"; for(int i=0; i Date: Fri, 15 May 2026 15:19:15 +0000 Subject: [PATCH 12/36] Per #3335, clean up and store the current version, even if there's concern with exactly how the weights are computed. --- src/basic/vx_util/point_weight.cc | 34 +++++++++++++++---------------- src/basic/vx_util/point_weight.h | 4 ++-- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 0adf4d5017..e6216b8604 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -139,7 +139,7 @@ void PointWeightInfo::compute_kde_weights() { << " observation locations.\n"; // Store sums for the weights - vector dist_sum((int) SIDWeights.size(), 0.0); + vector p_sum(n_stn(), 0.0); // Define e constant const double e = exp(1.0); @@ -151,29 +151,27 @@ void PointWeightInfo::compute_kde_weights() { initializer(omp_priv = decltype(omp_orig)(omp_orig.size())) #pragma omp parallel default (none) \ - shared(SIDWeights, KDERefAngle, dist_sum, e) + shared(SIDWeights, KDERefAngle, p_sum, e) { // Compute the sums of the pairwise distances -#pragma omp for reduction(vec_double_plus: dist_sum) \ +#pragma omp for reduction(vec_double_plus: p_sum) \ collapse(2) - for(int i=0; i= 7) { mlog << Debug(7) << "Computed KDE weights for " << n() << " observation locations:\n"; - for(int i=0; i Date: Fri, 15 May 2026 18:25:53 +0000 Subject: [PATCH 13/36] Per #3335, add logic to write the point weight output file. --- src/basic/vx_util/point_weight.cc | 55 ++++++++++++++++-- src/basic/vx_util/point_weight.h | 21 ++++--- src/libcode/vx_statistics/pair_base.cc | 8 +-- src/tools/core/ensemble_stat/ensemble_stat.cc | 14 +++-- src/tools/core/pair_stat/pair_stat.cc | 6 ++ src/tools/core/point_stat/point_stat.cc | 6 ++ src/tools/tc_utils/tc_stat/.tc_stat.cc.swp | Bin 0 -> 16384 bytes 7 files changed, 90 insertions(+), 20 deletions(-) create mode 100644 src/tools/tc_utils/tc_stat/.tc_stat.cc.swp diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index e6216b8604..d8c2292382 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -8,6 +8,8 @@ /////////////////////////////////////////////////////////////////////////////// +#include + #include "vx_util.h" #include "config_file.h" @@ -58,6 +60,7 @@ void PointWeightInfo::clear() { SIDWeights.clear(); WeightsComputed = false; WriteWeights = false; + WeightFilePrefix.clear(); } //////////////////////////////////////////////////////////////////////// @@ -68,6 +71,7 @@ void PointWeightInfo::assign(const PointWeightInfo & m) { SIDWeights = m.SIDWeights; WeightsComputed = m.WeightsComputed; WriteWeights = m.WriteWeights; + WeightFilePrefix = m.WeightFilePrefix; return; } @@ -135,7 +139,7 @@ void PointWeightInfo::compute_kde_weights() { // Check for no work to do if(Type != PointWeightType::KDE || WeightsComputed) return; - mlog << Debug(3) << "Computing KDE point weights using " << n() + mlog << Debug(3) << "Computing KDE point weights using " << n_stn() << " observation locations.\n"; // Store sums for the weights @@ -177,9 +181,9 @@ void PointWeightInfo::compute_kde_weights() { // Dump weights for high verbosity if(mlog.verbosity_level() >= 7) { - mlog << Debug(7) << "Computed KDE weights for " << n() + mlog << Debug(7) << "Computed KDE weights for " << n_stn() << " observation locations:\n"; - for(int i=0; i 0 || stat_at.ncols() > 0) return; // Create output file names for the stat file and optional text files - build_outfile_name(ens_valid_ut, "", tmp_str); + build_outfile_name(ens_valid_ut, "", base_name); + + // Store the output point weight file information + conf_info.point_weight_info.set_weight_file_prefix(base_name); ///////////////////////////////////////////////////////////////////// // @@ -1977,7 +1980,7 @@ static void setup_txt_files() { stat_out = (ofstream *) nullptr; // Build the file name - stat_file << tmp_str << stat_file_ext; + stat_file << base_name << stat_file_ext; // Create the output STAT file open_txt_file(stat_out, stat_file.c_str()); @@ -2011,7 +2014,7 @@ static void setup_txt_files() { txt_out[i] = (ofstream *) nullptr; // Build the file name - txt_file[i] << tmp_str << "_" << txt_file_abbr[i] + txt_file[i] << base_name << "_" << txt_file_abbr[i] << txt_file_ext; // Create the output text file @@ -2864,6 +2867,9 @@ static void add_var_att_local(VarInfo *info, NcVar *nc_var, bool is_int, static void finish_txt_files() { + // Write the point weight file + conf_info.point_weight_info.write_weights(); + // Write out the contents of the STAT AsciiTable and // close the STAT output files if(stat_out) { diff --git a/src/tools/core/pair_stat/pair_stat.cc b/src/tools/core/pair_stat/pair_stat.cc index b605175120..3863dd4003 100644 --- a/src/tools/core/pair_stat/pair_stat.cc +++ b/src/tools/core/pair_stat/pair_stat.cc @@ -257,6 +257,9 @@ static void setup_txt_files() { // Create output file names for the stat file and optional text files ConcatString base_name(build_outfile_name("")); + // Store the output point weight file information + conf_info.point_weight_info.set_weight_file_prefix(base_name); + ///////////////////////////////////////////////////////////////////// // // Setup the output STAT file @@ -1465,6 +1468,9 @@ static void do_pct(const PairStatVxOpt &vx_opt, const PairDataPoint *pd_ptr) { static void finish_txt_files() { + // Write the point weight file + conf_info.point_weight_info.write_weights(); + // Write out the contents of the STAT AsciiTable and // close the STAT output files if(stat_out) { diff --git a/src/tools/core/point_stat/point_stat.cc b/src/tools/core/point_stat/point_stat.cc index 48fa58509c..c82acf9f84 100644 --- a/src/tools/core/point_stat/point_stat.cc +++ b/src/tools/core/point_stat/point_stat.cc @@ -404,6 +404,9 @@ static void setup_txt_files() { // Create output file names for the stat file and optional text files build_outfile_name(fcst_valid_ut, fcst_lead_sec, "", base_name); + // Store the output point weight file information + conf_info.point_weight_info.set_weight_file_prefix(base_name); + ///////////////////////////////////////////////////////////////////// // // Setup the output STAT file @@ -2243,6 +2246,9 @@ static void do_hira_prob(int i_vx, const PairDataPoint *pd_ptr) { static void finish_txt_files() { + // Write the point weight file + conf_info.point_weight_info.write_weights(); + // Write out the contents of the STAT AsciiTable and // close the STAT output files if(stat_out) { diff --git a/src/tools/tc_utils/tc_stat/.tc_stat.cc.swp b/src/tools/tc_utils/tc_stat/.tc_stat.cc.swp new file mode 100644 index 0000000000000000000000000000000000000000..75f13cd9490b17053b77857cf20aab8a2cc27aeb GIT binary patch literal 16384 zcmeI3Yiu1y700)w34KtAs8qxU%HbNS>%{lzyqwsf&W)40b(|-DG!X z*@qps&`L;65fZ48sNe%H75V{$gjA3aNEGp^igUnyA(dTssWoiBmV8Km5e=_k7~YJB{R#>30Kw*Kx0)+(%3ltV8EKpdWu)wed;@~FZ z5hUK2-dIgPZy5T#nqG05esSpjOX>ZyY5J9+`)^8r-<^KWq!ncKq{+ocVS&N|g#`)= z6c#8fP*|X_Kw*Kx0)+(%3ltV8Ebtmwz_blx1ajZO0RZg(XY2nTz0EMb08Fq8Yy-c1 zt6^LQkAq|22q=U1fjhts@Q2$C6nB9Jn7$fcJviz^&jPw;09?;5qOu@J;Y}@Hy}pxC9;rli(n@ z1-y7O^a39TC%~QHg*O|`&hhsWl@79q4f&?1r0+nRlV%tR3WaAv5x+|^h#l!i z1QST5APY_+mmJ`)-{*kwC!>vVwl8vYaaihpGT{r4me$dXkc2+To%&sV_ zpZ)eNh*%jzrS=8p+vmD+wVn8(uw>VF9u#&vT6JQpC*S~?m8Ln9sz0A`z+{w_%E^XO zW$lg14Kr!F=Z0;bcAUH*{7A`QUv^ZPmh>$%UWh~PXIpg4#LYUS-EmxzW>Vu|4&A4n z>7cP99h?4}aq=hoY#>0NYbjNPCcy5c$$Vb&2i0Cbr6Q4fqh8q5q^q?OQl@j3na8hKFSon3lkR zwNb%{<6CZG3o5Y>^1!I}O8MlKi)}n$IdMHJ()j%2hQw~@*c%el!;(W{)9HgBmV+g- zqm%;`^4J&@Fq!xcT2SpBTGwkbTEp4QwLnB0lhyIefy|y6_XhKIFoy}#%S*(JfH#N1 zY!+8Blmt~=XE|RIZy>fK58)+fi{{@N1mQp2u3q2A&R5@CYwWHycN5)R(@V=`XF z=pw>lRvKweG#a#!1c3}=s_+2o*&*fLA<`F&Oy*ve*{Ihbw%NRf%<+jP&H9!MA=Hco z*^b%uWrW!z%EatpG4+XBbH5UEG89oP1K+v8>6vQH<~}+lJh>tU9g;es^r$CH8!uq& zjD4|aCB*LQYbRID(5401<8&pK&-hkm{aA!J`%5E@3Dm&ePV78{SEy`~)tc&Zxu5*_ z?qZUIb9-iV0VSkc&000i8Bu+6U#+o!qj54bbHRuo=y+z^w7ixThdnc+G+^i9{^D1o zBQpyv!W78Q8B4l}=l3gbq?Mz$8=Lg@F`SJKO&4!E6q*5E5HN}0mBZ;cc*nrYR$oqC z$=O}2kJlQT^zgh`)%sR&A#3_E@Qo$tJA4nbS z1$P6E0sIl`{qKWkz$&;0ydQ83;2FSifCs@*Fax%OUts*vxy<$5$|vxp3tTO8I>;mLj+Yl9}Z^ZKcw_6j)M ztM?1cfnA7n(;&Y|!LfD|n+1sZsIVNHPKUK#Kb<-7RqjW>IQo<=;IM)q?(Z#Bjavbm*ftXE<75iwNN%8_RXxNl6e9;RP4EE`}lz zbQo?mYmn}?s5TDN&Js6TVX)=A*Hy(TZ&~s>ukG?*G$Y8)J4~Zg)*D8qJ9@3ES4fpW zwTQfg2-cy|x*=)@Lf_?$FI3azXkmG<`Vxm^uA?5_k>jjfk&0+UED-@1bXu3|)caZ5 zYaCec)l~!8Sv8P|oL-FB+`);GDRMd%Os88F4%rP#S&CP&+!xAc(g?TS z(S%i{3)lh_)9cu$6cVh8qRrH0zN6ffp|?i_uD7Kewyxy{DtVkPw#+#ObJ5nFt^ Mk2k%U^^CgtA4>XenE(I) literal 0 HcmV?d00001 From e9a4650afc71675189faa1d7b4e548664ea48723 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Fri, 15 May 2026 20:41:51 +0000 Subject: [PATCH 14/36] Per #3335, update docs and unit tests to demonstrate writing the point_weights.txt output ASCII files. --- docs/Users_Guide/config_options.rst | 17 +- .../config/EnsembleStatConfig_point_weight | 4 + .../config/PointStatConfig_point_weight | 21 +- .../config/PointStatConfig_prob_point_weight | 21 +- internal/test_unit/run.log | 506 ++++++++++++++++++ internal/test_unit/unit_point_weight.sh | 171 ++++++ internal/test_unit/xml/unit_point_weight.xml | 2 + src/basic/vx_util/point_weight.cc | 44 +- src/basic/vx_util/point_weight.h | 2 + src/libcode/vx_statistics/pair_base.cc | 3 + 10 files changed, 759 insertions(+), 32 deletions(-) create mode 100644 internal/test_unit/run.log create mode 100644 internal/test_unit/unit_point_weight.sh diff --git a/docs/Users_Guide/config_options.rst b/docs/Users_Guide/config_options.rst index 2572006c9c..e791c2a975 100644 --- a/docs/Users_Guide/config_options.rst +++ b/docs/Users_Guide/config_options.rst @@ -2792,12 +2792,17 @@ or continental-scale averages. write_weights ------------- -When "point_weight_flag = KDE", described above, weights are computed once -using the location of all point observations used for any verification task. -The "write_weights" entry is a boolean that can be set to TRUE or FALSE (default). -If TRUE, the computed weights are written to an output ASCII file. That file -can be used to set the "mask.sid" station ID masking file option with -"point_weight_flag = SID" in future runs. +Point weights are either pre-defined ("point_weight_flag = SID") or computed based +on the station location density ("point_weight_flag = KDE). The "write_weights" +entry is a boolean that can be set to TRUE or FALSE (default). If TRUE, the weights +are written to an output ASCII file ending in "_point_weights.txt". That file can +be used to define the "mask.sid" station ID masking file in future runs. + +Note that "mask.sid" can be specified separately for each verification task, and, +technically, the same station could be assigned different weights for different +verification tasks. If the same station name appears in multiple "mask.sid" +lists, only the first weight encountered for each station is written to the +output. .. code-block:: none diff --git a/internal/test_unit/config/EnsembleStatConfig_point_weight b/internal/test_unit/config/EnsembleStatConfig_point_weight index 697b904f17..a87fd2b9ea 100644 --- a/internal/test_unit/config/EnsembleStatConfig_point_weight +++ b/internal/test_unit/config/EnsembleStatConfig_point_weight @@ -207,6 +207,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = ${POINT_WEIGHT}; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_point_weight b/internal/test_unit/config/PointStatConfig_point_weight index 9b1d8ab970..583f254e3e 100644 --- a/internal/test_unit/config/PointStatConfig_point_weight +++ b/internal/test_unit/config/PointStatConfig_point_weight @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + fcst = { sid_inc = []; sid_exc = []; @@ -101,6 +104,14 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// + +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = STAT; @@ -127,17 +138,13 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) -seeps_p1_thresh = NA; +point_weight_flag = ${POINT_WEIGHT}; +kde_ref_angle = 0.75; +write_weights = TRUE; //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - -point_weight_flag = ${POINT_WEIGHT}; - tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_prob_point_weight b/internal/test_unit/config/PointStatConfig_prob_point_weight index 64c1b14d35..17f26a8fc3 100644 --- a/internal/test_unit/config/PointStatConfig_prob_point_weight +++ b/internal/test_unit/config/PointStatConfig_prob_point_weight @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + fcst = { sid_inc = []; sid_exc = []; @@ -107,6 +110,14 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// + +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = NONE; @@ -133,17 +144,13 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) -seeps_p1_thresh = NA; +point_weight_flag = ${POINT_WEIGHT}; +kde_ref_angle = 1.5; +write_weights = FALSE; //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - -point_weight_flag = ${POINT_WEIGHT}; - tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/run.log b/internal/test_unit/run.log new file mode 100644 index 0000000000..ca3e5c336e --- /dev/null +++ b/internal/test_unit/run.log @@ -0,0 +1,506 @@ +DEBUG 1: Start point_stat V13.0.0 by johnhg(6088) at 2026-05-15 18:01:14Z with command: /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_point_weight -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 7 -log run.log +DEBUG 2: Defaulting unset OMP_NUM_THREADS to use 1 of 40 available threads. Recommend setting OMP_NUM_THREADS for faster runtimes. +DEBUG 2: OpenMP running on 1 thread(s). +DEBUG 1: Default Config File: /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/share/met/config/PointStatConfig_default +DEBUG 1: User Config File: /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_point_weight +DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new Met2dDataFile object of type "FileType_Gb2". +DEBUG 4: Switching the GRIB2 radius of the earth value of 6371.23 km to 6371.2 km for internal consistency. +DEBUG 4: +DEBUG 4: Lambert Conformal Grid Data: +DEBUG 4: hemisphere: N +DEBUG 4: scale_lat_1: 25 +DEBUG 4: scale_lat_2: 25 +DEBUG 4: lat_pin: 12.19 +DEBUG 4: lon_pin: 133.459 +DEBUG 4: x_pin: 0 +DEBUG 4: y_pin: 0 +DEBUG 4: lon_orient: 95 +DEBUG 4: d_km: 40.635 +DEBUG 4: r_km: 6371.2 +DEBUG 4: nx: 185 +DEBUG 4: ny: 129 +DEBUG 4: so2_angle: 0 +DEBUG 4: +DEBUG 4: MetGrib2DataFile::read_grib2_record_list() - processed 70 records from GRIB2 file: /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 +DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". +DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". +DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb1". +DEBUG 3: +DEBUG 3: Multiple GRIB2 table entries match lookup criteria (parm_name = TMP): +DEBUG 3: parm_name: TMP, index_a = 0, grib2_mtab = 1, grib2_cntr = 0, grib2_ltab = 0, index_b = 0, index_c = 0 +DEBUG 3: parm_name: TMP, index_a = 0, grib2_mtab = 1, grib2_cntr = 7, grib2_ltab = 1, index_b = 0, index_c = 0 +DEBUG 3: Using the first match found: parm_name: TMP, index_a = 0, grib2_mtab = 1, grib2_cntr = 0, grib2_ltab = 0, index_b = 0, index_c = 0 +DEBUG 3: +DEBUG 5: Parsed forecast field: +DEBUG 5: Parsed observation field: +DEBUG 5: Parsed thresholds: +DEBUG 5: Matched pair filter columns: (nul) +DEBUG 5: Matched pair filter thresholds: NA +DEBUG 5: Forecast categorical thresholds: >273,>283 +DEBUG 5: Observed categorical thresholds: >273,>283 +DEBUG 5: Forecast continuous thresholds: NA +DEBUG 5: Observed continuous thresholds: NA +DEBUG 5: Continuous threshold logic: UNION +DEBUG 5: Forecast wind speed thresholds: NA +DEBUG 5: Observed wind speed thresholds: NA +DEBUG 5: Wind speed threshold logic: UNION +DEBUG 4: ClimoCDFInfo::set_cdf_ta() -> Since "cdf_bins" = 1, no climatology CDF bins will be applied. +DEBUG 4: parse_conf_sid_list() -> Station ID "sid_inc" list contains 0 entries. +DEBUG 4: parse_conf_sid_list() -> Station ID "sid_exc" list contains 0 entries. +DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". +DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". +DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb1". +DEBUG 5: Parsed forecast field: +DEBUG 5: Parsed observation field: +DEBUG 5: Parsed thresholds: +DEBUG 5: Matched pair filter columns: (nul) +DEBUG 5: Matched pair filter thresholds: NA +DEBUG 5: Forecast categorical thresholds: >5 +DEBUG 5: Observed categorical thresholds: >5 +DEBUG 5: Forecast continuous thresholds: NA +DEBUG 5: Observed continuous thresholds: NA +DEBUG 5: Continuous threshold logic: UNION +DEBUG 5: Forecast wind speed thresholds: NA +DEBUG 5: Observed wind speed thresholds: NA +DEBUG 5: Wind speed threshold logic: UNION +DEBUG 4: ClimoCDFInfo::set_cdf_ta() -> Since "cdf_bins" = 1, no climatology CDF bins will be applied. +DEBUG 4: parse_conf_sid_list() -> Station ID "sid_inc" list contains 0 entries. +DEBUG 4: parse_conf_sid_list() -> Station ID "sid_exc" list contains 0 entries. +DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". +DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". +DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb1". +DEBUG 5: Parsed forecast field: +DEBUG 5: Parsed observation field: +DEBUG 5: Parsed thresholds: +DEBUG 5: Matched pair filter columns: (nul) +DEBUG 5: Matched pair filter thresholds: NA +DEBUG 5: Forecast categorical thresholds: >5 +DEBUG 5: Observed categorical thresholds: >5 +DEBUG 5: Forecast continuous thresholds: NA +DEBUG 5: Observed continuous thresholds: NA +DEBUG 5: Continuous threshold logic: UNION +DEBUG 5: Forecast wind speed thresholds: NA +DEBUG 5: Observed wind speed thresholds: NA +DEBUG 5: Wind speed threshold logic: UNION +DEBUG 4: ClimoCDFInfo::set_cdf_ta() -> Since "cdf_bins" = 1, no climatology CDF bins will be applied. +DEBUG 4: parse_conf_sid_list() -> Station ID "sid_inc" list contains 0 entries. +DEBUG 4: parse_conf_sid_list() -> Station ID "sid_exc" list contains 0 entries. +DEBUG 3: U-wind field array entry 2 matches V-wind field array entry 3. +DEBUG 3: V-wind field array entry 3 matches U-wind field array entry 2. +DEBUG 1: Forecast File: /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 +DEBUG 1: Observation File: /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc +DEBUG 3: MetGrib2DataFile::data_plane_array() -> Found exact match for "TMP/P850" in GRIB2 record 39 field 1 of GRIB2 file "/d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2" +DEBUG 4: +DEBUG 4: Data plane information: +DEBUG 4: plane min: 256.3 +DEBUG 4: plane max: 294.4 +DEBUG 4: scan mode: 64 +DEBUG 4: valid time: 20120409_120000 +DEBUG 4: lead time: 150000 +DEBUG 4: init time: 20120408_210000 +DEBUG 4: bitmap flag: 255 +DEBUG 4: +DEBUG 4: +DEBUG 4: Grid information: +DEBUG 4: Projection: Lambert Conformal +DEBUG 4: Nx: 185 +DEBUG 4: Ny: 129 +DEBUG 4: Lat_LL: 12.190 +DEBUG 4: Lon_LL: 133.459 +DEBUG 4: Lon_orient: 95.000 +DEBUG 4: Alpha: 406.820 +DEBUG 4: Cone: 0.423 +DEBUG 4: Bx: 104.0012 +DEBUG 4: By: 356.7313 +DEBUG 4: +DEBUG 4: Data plane information: +DEBUG 4: plane min: 256.3 +DEBUG 4: plane max: 294.4 +DEBUG 4: valid time: 20120409_120000 +DEBUG 4: lead time: 150000 +DEBUG 4: init time: 20120408_210000 +DEBUG 4: accum time: 000000 +DEBUG 4: +DEBUG 2: +DEBUG 2: -------------------------------------------------------------------------------- +DEBUG 2: +DEBUG 2: Reading data for TMP/P850. +DEBUG 2: Using the forecast grid as the verification grid +DEBUG 3: Grid Definition: Projection: Lambert Conformal Nx: 185 Ny: 129 Lat_LL: 12.190 Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 406.820 Cone: 0.423 Bx: 104.0012 By: 356.7313 +DEBUG 2: Processing masking regions. +DEBUG 3: Processing grid mask: FULL +DEBUG 4: parse_grid_mask() -> parsing grid mask "FULL" +DEBUG 2: For TMP/P850, found 1 forecast levels, 0 forecast climatology mean and 0 standard deviation level(s), and 0 observation climatology mean and 0 standard deviation level(s). +DEBUG 3: MetGrib2DataFile::data_plane_array() -> Found exact match for "UGRD/P850" in GRIB2 record 4 field 1 of GRIB2 file "/d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2" +DEBUG 4: +DEBUG 4: Data plane information: +DEBUG 4: plane min: -18.8 +DEBUG 4: plane max: 22.7 +DEBUG 4: scan mode: 64 +DEBUG 4: valid time: 20120409_120000 +DEBUG 4: lead time: 150000 +DEBUG 4: init time: 20120408_210000 +DEBUG 4: bitmap flag: 255 +DEBUG 4: +DEBUG 4: +DEBUG 4: Data plane information: +DEBUG 4: plane min: -17.4 +DEBUG 4: plane max: 21.8 +DEBUG 4: scan mode: 64 +DEBUG 4: valid time: 20120409_120000 +DEBUG 4: lead time: 150000 +DEBUG 4: init time: 20120408_210000 +DEBUG 4: bitmap flag: 255 +DEBUG 4: +DEBUG 3: MetGrib2DataFile::check_uv_rotation() -> Found pair match "VGRD/P850" in GRIB2 record 10 field 1 +DEBUG 3: Rotating U and V wind components from grid-relative to earth-relative. +DEBUG 4: +DEBUG 4: Grid information: +DEBUG 4: Projection: Lambert Conformal +DEBUG 4: Nx: 185 +DEBUG 4: Ny: 129 +DEBUG 4: Lat_LL: 12.190 +DEBUG 4: Lon_LL: 133.459 +DEBUG 4: Lon_orient: 95.000 +DEBUG 4: Alpha: 406.820 +DEBUG 4: Cone: 0.423 +DEBUG 4: Bx: 104.0012 +DEBUG 4: By: 356.7313 +DEBUG 4: +DEBUG 4: Data plane information: +DEBUG 4: plane min: -17.6582 +DEBUG 4: plane max: 20.8246 +DEBUG 4: valid time: 20120409_120000 +DEBUG 4: lead time: 150000 +DEBUG 4: init time: 20120408_210000 +DEBUG 4: accum time: 000000 +DEBUG 4: +DEBUG 2: +DEBUG 2: -------------------------------------------------------------------------------- +DEBUG 2: +DEBUG 2: Reading data for UGRD/P850. +DEBUG 2: For UGRD/P850, found 1 forecast levels, 0 forecast climatology mean and 0 standard deviation level(s), and 0 observation climatology mean and 0 standard deviation level(s). +DEBUG 3: MetGrib2DataFile::data_plane_array() -> Found exact match for "VGRD/P850" in GRIB2 record 10 field 1 of GRIB2 file "/d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2" +DEBUG 4: +DEBUG 4: Data plane information: +DEBUG 4: plane min: -17.4 +DEBUG 4: plane max: 21.8 +DEBUG 4: scan mode: 64 +DEBUG 4: valid time: 20120409_120000 +DEBUG 4: lead time: 150000 +DEBUG 4: init time: 20120408_210000 +DEBUG 4: bitmap flag: 255 +DEBUG 4: +DEBUG 4: +DEBUG 4: Data plane information: +DEBUG 4: plane min: -18.8 +DEBUG 4: plane max: 22.7 +DEBUG 4: scan mode: 64 +DEBUG 4: valid time: 20120409_120000 +DEBUG 4: lead time: 150000 +DEBUG 4: init time: 20120408_210000 +DEBUG 4: bitmap flag: 255 +DEBUG 4: +DEBUG 3: MetGrib2DataFile::check_uv_rotation() -> Found pair match "UGRD/P850" in GRIB2 record 4 field 1 +DEBUG 3: Rotating U and V wind components from grid-relative to earth-relative. +DEBUG 4: +DEBUG 4: Grid information: +DEBUG 4: Projection: Lambert Conformal +DEBUG 4: Nx: 185 +DEBUG 4: Ny: 129 +DEBUG 4: Lat_LL: 12.190 +DEBUG 4: Lon_LL: 133.459 +DEBUG 4: Lon_orient: 95.000 +DEBUG 4: Alpha: 406.820 +DEBUG 4: Cone: 0.423 +DEBUG 4: Bx: 104.0012 +DEBUG 4: By: 356.7313 +DEBUG 4: +DEBUG 4: Data plane information: +DEBUG 4: plane min: -17.2597 +DEBUG 4: plane max: 21.4671 +DEBUG 4: valid time: 20120409_120000 +DEBUG 4: lead time: 150000 +DEBUG 4: init time: 20120408_210000 +DEBUG 4: accum time: 000000 +DEBUG 4: +DEBUG 2: +DEBUG 2: -------------------------------------------------------------------------------- +DEBUG 2: +DEBUG 2: Reading data for VGRD/P850. +DEBUG 2: For VGRD/P850, found 1 forecast levels, 0 forecast climatology mean and 0 standard deviation level(s), and 0 observation climatology mean and 0 standard deviation level(s). +DEBUG 2: +DEBUG 2: -------------------------------------------------------------------------------- +DEBUG 2: +DEBUG 7: update_missing_values(T) hdr_typ(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [0 - 6] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000234 seconds +DEBUG 7: update_missing_values(T) hdr_sid(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [0 - 3546] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.00025 seconds +DEBUG 7: update_missing_values(T) hdr_vld(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [0 - 60] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000193 seconds +DEBUG 7: update_missing_values(T) hdr_lat(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [15.1 - 61.13] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000379 seconds +DEBUG 7: update_missing_values(T) hdr_lon(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [-147.27 - -50.03] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000377 seconds +DEBUG 7: update_missing_values(T) hdr_elv(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [0 - 12497] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000374 seconds +DEBUG 7: update_missing_values(T) hdr_prpt_typ(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [120 - 287] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000204 seconds +DEBUG 7: update_missing_values(T) hdr_irpt_typ(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [11 - 562] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000191 seconds +DEBUG 7: update_missing_values(T) hdr_inst_typ(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [49 - 111] Positive count: 0 +DEBUG 3: update_missing_values(T) hdr_inst_typ(data_type=i): found 11157 FillValues out of 11370 +DEBUG 7: update_missing_values(T) took 0.00025 seconds +DEBUG 3: Processing each "obs.field" name as a GRIB code abbreviation since the point observations are specified as GRIB codes. +DEBUG 2: Searching 120275 observations from 11370 messages. +DEBUG 7: update_missing_values(T) obs_hid(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [0 - 109] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000299 seconds +DEBUG 7: update_missing_values(T) obs_vid(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [0 - 8] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000292 seconds +DEBUG 7: update_missing_values(T) obs_lvl(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [4.8 - 1019] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000812 seconds +DEBUG 7: update_missing_values(T) obs_hgt(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [-45.104 - 35223.4] Positive count: 0 +DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 17267 FillValues out of 32768 +DEBUG 7: update_missing_values(T) took 0.000791 seconds +DEBUG 7: update_missing_values(T) obs_val(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [-45 - 35290] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000806 seconds +DEBUG 7: update_missing_values(T) obs_hid(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [109 - 279] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000338 seconds +DEBUG 7: update_missing_values(T) obs_vid(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [0 - 8] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000291 seconds +DEBUG 7: update_missing_values(T) obs_lvl(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [5.8 - 1021] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000813 seconds +DEBUG 7: update_missing_values(T) obs_hgt(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [-33.0859 - 34051.8] Positive count: 0 +DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 15923 FillValues out of 32768 +DEBUG 7: update_missing_values(T) took 0.000787 seconds +DEBUG 7: update_missing_values(T) obs_val(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [-33.4 - 34138] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000845 seconds +DEBUG 7: update_missing_values(T) obs_hid(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [279 - 6217] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000363 seconds +DEBUG 7: update_missing_values(T) obs_vid(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [0 - 9] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000291 seconds +DEBUG 7: update_missing_values(T) obs_lvl(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [72.2 - 1031.4] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000821 seconds +DEBUG 7: update_missing_values(T) obs_hgt(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [0 - 18221.9] Positive count: 0 +DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 8394 FillValues out of 32768 +DEBUG 7: update_missing_values(T) took 0.000856 seconds +DEBUG 7: update_missing_values(T) obs_val(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [-29.2 - 18247] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000812 seconds +DEBUG 7: update_missing_values(T) obs_hid(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [6218 - 11369] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000305 seconds +DEBUG 7: update_missing_values(T) obs_vid(data_type=i): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [0 - 9] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.00024 seconds +DEBUG 7: update_missing_values(T) obs_lvl(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [267.3 - 1025.2] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000608 seconds +DEBUG 7: update_missing_values(T) obs_hgt(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [0 - 9974.01] Positive count: 0 +DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 7476 FillValues out of 21971 +DEBUG 7: update_missing_values(T) took 0.000632 seconds +DEBUG 7: update_missing_values(T) obs_val(data_type=f): FillValue()=-9999 +DEBUG 7: update_missing_values(T) data range [-19.8 - 9999] Positive count: 0 +DEBUG 7: update_missing_values(T) took 0.000589 seconds +DEBUG 3: Computing KDE point weights using 97 observation locations. +DEBUG 7: Computed KDE weights for 97 observation locations: +DEBUG 7: [1] 72206 (30.48, 81.7) 148044 +DEBUG 7: [2] 72520 (40.53, 80.22) 1.59236e+06 +DEBUG 7: [3] 72597 (42.38, 122.88) 90166.5 +DEBUG 7: [4] 72518 (42.69, 73.83) 1922.58 +DEBUG 7: [5] 71600 (43.93, 60.02) 1.26723e+18 +DEBUG 7: [6] 71722 (46.3, 76) 4.20218e+13 +DEBUG 7: [7] 72764 (46.77, 100.76) 406501 +DEBUG 7: [8] 71836 (51.27, 80.65) 5.8257e+35 +DEBUG 7: [9] 71908 (53.9, 122.8) 6.21297e+18 +DEBUG 7: [10] 71867 (53.97, 101.1) 1.29969e+40 +DEBUG 7: [11] 71913 (58.75, 94.07) 5.09449e+52 +DEBUG 7: [12] 71945 (58.83, 122.6) 6.25449e+18 +DEBUG 7: [13] 72250 (25.92, 97.42) 475.528 +DEBUG 7: [14] 72208 (32.89, 80.03) 4.14362e+06 +DEBUG 7: [15] 72632 (42.7, 83.47) 94867.6 +DEBUG 7: [16] 74001 (34.6, 86.62) 29.0663 +DEBUG 7: [17] 72403 (38.98, 77.49) 54.93 +DEBUG 7: [18] 72572 (40.77, 111.95) 1.53258e+11 +DEBUG 7: [19] 72662 (44.07, 103.21) 1.73933e+10 +DEBUG 7: [20] 72712 (46.87, 68.01) 5.03064e+09 +DEBUG 7: [21] 71845 (51.45, 90.2) 2.26251e+14 +DEBUG 7: [22] 76644 (20.98, 89.65) 1.13331e+06 +DEBUG 7: [23] 76595 (21.02, 86.85) 1.13331e+06 +DEBUG 7: [24] 72201 (24.55, 81.79) 462.785 +DEBUG 7: [25] 76225 (28.63, 106.08) 2.52213e+08 +DEBUG 7: [26] 72230 (33.18, 86.78) 37.4944 +DEBUG 7: [27] 72388 (36.05, 115.18) 2.36721e+08 +DEBUG 7: [28] 72318 (37.21, 80.41) 13.2383 +DEBUG 7: [29] 72440 (37.24, 93.4) 255152 +DEBUG 7: [30] 72528 (42.94, 78.72) 1.66529e+06 +DEBUG 7: [31] 72645 (44.5, 88.11) 9.99018e+08 +DEBUG 7: [32] 72776 (47.46, 111.39) 8.46777e+17 +DEBUG 7: [33] 71934 (60.02, 111.93) 9.02764e+35 +DEBUG 7: [34] 72393 (34.75, 120.57) 1.00925e+09 +DEBUG 7: [35] 72305 (34.78, 76.88) 2.99635e+08 +DEBUG 7: [36] 72493 (37.74, 122.22) 1.01032e+09 +DEBUG 7: [37] 72456 (39.07, 95.63) 21279.4 +DEBUG 7: [38] 72476 (39.12, 108.52) 1.53258e+11 +DEBUG 7: [39] 72426 (39.42, 83.82) 2.51016e+08 +DEBUG 7: [40] 72501 (40.87, 72.86) 1922.19 +DEBUG 7: [41] 72649 (44.85, 93.56) 4.43333e+10 +DEBUG 7: [42] 72786 (47.68, 117.63) 2.49635e+06 +DEBUG 7: [43] 72261 (29.37, 100.92) 2.21128e+06 +DEBUG 7: [44] 72364 (31.87, 106.7) 2.52213e+08 +DEBUG 7: [45] 72340 (34.84, 92.26) 249641 +DEBUG 7: [46] 72317 (36.1, 79.94) 13.2383 +DEBUG 7: [47] 72451 (37.76, 99.97) 1.87686e+07 +DEBUG 7: [48] 74002 (39.47, 76.07) 38.6317 +DEBUG 7: [49] 72562 (41.13, 100.7) 1.50651e+09 +DEBUG 7: [50] 72681 (43.57, 116.21) 3.9706e+14 +DEBUG 7: [51] 72694 (44.91, 123.01) 90156.2 +DEBUG 7: [52] 72634 (44.91, 84.72) 94894.5 +DEBUG 7: [53] 76743 (17.98, 92.93) 1.79904e+15 +DEBUG 7: [54] 72558 (41.32, 96.37) 21451 +DEBUG 7: [55] 72797 (47.93, 124.56) 7.8738e+08 +DEBUG 7: [56] 71203 (49.95, 119.4) 2.49635e+06 +DEBUG 7: [57] 70398 (55.05, 131.59) 3.11717e+28 +DEBUG 7: [58] 78073 (25.05, 77.47) 8.45729e+06 +DEBUG 7: [59] 72210 (27.71, 82.4) 751313 +DEBUG 7: [60] 72251 (27.78, 97.51) 475.708 +DEBUG 7: [61] 72240 (30.13, 93.22) 28340.8 +DEBUG 7: [62] 72265 (31.94, 102.19) 2.19788e+06 +DEBUG 7: [63] 72327 (36.25, 86.56) 127.282 +DEBUG 7: [64] 72768 (48.21, 106.63) 8.46738e+17 +DEBUG 7: [65] 74455 (41.61, 90.58) 680.646 +DEBUG 7: [66] 71603 (43.87, 66.1) 5.82415e+09 +DEBUG 7: [67] 72659 (45.45, 98.41) 406510 +DEBUG 7: [68] 71811 (50.22, 66.27) 1.00515e+11 +DEBUG 7: [69] 71816 (53.3, 60.37) 8.34773e+19 +DEBUG 7: [70] 76458 (23.2, 106.42) 7.14351e+22 +DEBUG 7: [71] 72202 (25.76, 80.38) 462.586 +DEBUG 7: [72] 72274 (32.23, 110.96) 2.71185e+09 +DEBUG 7: [73] 72235 (32.32, 90.08) 1188.8 +DEBUG 7: [74] 78016 (32.37, 64.68) 1.43854e+88 +DEBUG 7: [75] 72402 (37.93, 75.47) 126.907 +DEBUG 7: [76] 71815 (48.55, 58.57) 1.24828e+18 +DEBUG 7: [77] 72747 (48.56, 93.4) 4.43271e+10 +DEBUG 7: [78] 71119 (53.55, 114.1) 4.92907e+31 +DEBUG 7: [79] 78526 (18.43, 65.99) 12.5063 +DEBUG 7: [80] 72248 (32.45, 93.84) 27977 +DEBUG 7: [81] 72215 (33.36, 84.57) 5070.04 +DEBUG 7: [82] 72357 (35.18, 97.44) 17487.5 +DEBUG 7: [83] 74560 (40.15, 89.34) 680.646 +DEBUG 7: [84] 74494 (41.66, 69.96) 8101.89 +DEBUG 7: [85] 74389 (43.89, 70.26) 8108.84 +DEBUG 7: [86] 71906 (58.1, 68.42) 7.764e+35 +DEBUG 7: [87] ASDE04 (19.2, 66.9) 12.5063 +DEBUG 7: [88] 76394 (25.87, 100.23) 1.24933e+06 +DEBUG 7: [89] 72233 (30.34, 89.83) 1188.81 +DEBUG 7: [90] 72214 (30.45, 84.3) 159157 +DEBUG 7: [91] 72249 (32.84, 97.3) 17487.4 +DEBUG 7: [92] 72293 (32.85, 117.12) 515408 +DEBUG 7: [93] 74004 (32.85, 114.4) 514199 +DEBUG 7: [94] 72363 (35.23, 101.71) 1.80328e+07 +DEBUG 7: [95] 71109 (50.68, 127.37) 8.61557e+11 +DEBUG 7: [96] 71823 (53.75, 73.67) 1.64475e+32 +DEBUG 7: [97] 71907 (58.47, 78.08) 1.6451e+32 +DEBUG 4: Applying KDE point weights computed using 97 observation locations. +DEBUG 4: Applying KDE point weights computed using 97 observation locations. +DEBUG 4: Applying KDE point weights computed using 97 observation locations. +DEBUG 2: +DEBUG 2: -------------------------------------------------------------------------------- +DEBUG 2: +DEBUG 2: Processing TMP/P850 versus TMP/P850, for observation type ADPUPA, over region FULL, for interpolation method NEAREST(1), using 97 matched pairs. +DEBUG 3: Number of matched pairs = 97 +DEBUG 3: Observations processed = 120275 +DEBUG 3: Rejected: station id = 0 +DEBUG 3: Rejected: obs var name = 107223 +DEBUG 3: Rejected: valid time = 0 +DEBUG 3: Rejected: bad obs value = 0 +DEBUG 3: Rejected: off the grid = 5 +DEBUG 3: Rejected: topography = 0 +DEBUG 3: Rejected: level mismatch = 12950 +DEBUG 3: Rejected: quality marker = 0 +DEBUG 3: Rejected: message type = 0 +DEBUG 3: Rejected: masking region = 0 +DEBUG 3: Rejected: bad fcst value = 0 +DEBUG 3: Rejected: bad climo mean = 0 +DEBUG 3: Rejected: bad climo stdev = 0 +DEBUG 3: Rejected: mpr filter = 0 +DEBUG 3: Rejected: duplicates = 0 +DEBUG 2: Computing Categorical Statistics. +DEBUG 2: Computing Multi-Category Statistics. +DEBUG 2: Computing Scalar Partial Sums and Continuous Statistics. +DEBUG 2: +DEBUG 2: -------------------------------------------------------------------------------- +DEBUG 2: +DEBUG 2: Processing UGRD/P850 versus UGRD/P850, for observation type ADPUPA, over region FULL, for interpolation method NEAREST(1), using 96 matched pairs. +DEBUG 3: Number of matched pairs = 96 +DEBUG 3: Observations processed = 120275 +DEBUG 3: Rejected: station id = 0 +DEBUG 3: Rejected: obs var name = 106252 +DEBUG 3: Rejected: valid time = 0 +DEBUG 3: Rejected: bad obs value = 0 +DEBUG 3: Rejected: off the grid = 5 +DEBUG 3: Rejected: topography = 0 +DEBUG 3: Rejected: level mismatch = 13921 +DEBUG 3: Rejected: quality marker = 0 +DEBUG 3: Rejected: message type = 1 +DEBUG 3: Rejected: masking region = 0 +DEBUG 3: Rejected: bad fcst value = 0 +DEBUG 3: Rejected: bad climo mean = 0 +DEBUG 3: Rejected: bad climo stdev = 0 +DEBUG 3: Rejected: mpr filter = 0 +DEBUG 3: Rejected: duplicates = 0 +DEBUG 2: Computing Categorical Statistics. +DEBUG 2: Computing Scalar Partial Sums and Continuous Statistics. +DEBUG 2: +DEBUG 2: -------------------------------------------------------------------------------- +DEBUG 2: +DEBUG 2: Processing VGRD/P850 versus VGRD/P850, for observation type ADPUPA, over region FULL, for interpolation method NEAREST(1), using 96 matched pairs. +DEBUG 3: Number of matched pairs = 96 +DEBUG 3: Observations processed = 120275 +DEBUG 3: Rejected: station id = 0 +DEBUG 3: Rejected: obs var name = 106252 +DEBUG 3: Rejected: valid time = 0 +DEBUG 3: Rejected: bad obs value = 0 +DEBUG 3: Rejected: off the grid = 5 +DEBUG 3: Rejected: topography = 0 +DEBUG 3: Rejected: level mismatch = 13921 +DEBUG 3: Rejected: quality marker = 0 +DEBUG 3: Rejected: message type = 1 +DEBUG 3: Rejected: masking region = 0 +DEBUG 3: Rejected: bad fcst value = 0 +DEBUG 3: Rejected: bad climo mean = 0 +DEBUG 3: Rejected: bad climo stdev = 0 +DEBUG 3: Rejected: mpr filter = 0 +DEBUG 3: Rejected: duplicates = 0 +DEBUG 2: Computing Categorical Statistics. +DEBUG 2: Computing Scalar Partial Sums and Continuous Statistics. +DEBUG 2: Computing Vector Partial Sums and Continuous Vector Statistics. +DEBUG 2: +DEBUG 2: -------------------------------------------------------------------------------- +DEBUG 2: +DEBUG 1: Output file: /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight/point_stat_KDE_WEIGHT_150000L_20120409_120000V.stat +DEBUG 1: Finish point_stat V13.0.0 by johnhg(6088) at 2026-05-15 18:01:19Z diff --git a/internal/test_unit/unit_point_weight.sh b/internal/test_unit/unit_point_weight.sh new file mode 100644 index 0000000000..c1141a4f16 --- /dev/null +++ b/internal/test_unit/unit_point_weight.sh @@ -0,0 +1,171 @@ +export 'DESC=NO_WEIGHT' +export 'MASK_GRID="FULL"' +export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPUPA_ELEV.txt"' +export 'OUTPUT_PREFIX=NO_WEIGHT' +export 'POINT_WEIGHT=NONE' +/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_point_weight \ + -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 +unset DESC +unset MASK_GRID +unset MASK_SID +unset OUTPUT_PREFIX +unset POINT_WEIGHT + + +export 'DESC=SID_WEIGHT' +export 'MASK_GRID=' +export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPUPA_ELEV.txt"' +export 'OUTPUT_PREFIX=SID_WEIGHT' +export 'POINT_WEIGHT=SID' +/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_point_weight \ + -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 +unset DESC +unset MASK_GRID +unset MASK_SID +unset OUTPUT_PREFIX +unset POINT_WEIGHT + + +export 'DESC=KDE_WEIGHT' +export 'MASK_GRID="FULL"' +export 'MASK_SID=' +export 'OUTPUT_PREFIX=KDE_WEIGHT' +export 'POINT_WEIGHT=KDE' +/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_point_weight \ + -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 +unset DESC +unset MASK_GRID +unset MASK_SID +unset OUTPUT_PREFIX +unset POINT_WEIGHT + + +export 'DESC=NO_WEIGHT' +export 'MASK_GRID="FULL"' +export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPUPA_ELEV.txt"' +export 'OUTPUT_PREFIX=PROB_NO_WEIGHT' +export 'POINT_WEIGHT=NONE' +/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_pr/sref_prob_2012040821_F015.grib2 \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_prob_point_weight \ + -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 +unset DESC +unset MASK_GRID +unset MASK_SID +unset OUTPUT_PREFIX +unset POINT_WEIGHT + + +export 'DESC=SID_WEIGHT' +export 'MASK_GRID=' +export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPUPA_ELEV.txt"' +export 'OUTPUT_PREFIX=PROB_SID_WEIGHT' +export 'POINT_WEIGHT=SID' +/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_pr/sref_prob_2012040821_F015.grib2 \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_prob_point_weight \ + -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 +unset DESC +unset MASK_GRID +unset MASK_SID +unset OUTPUT_PREFIX +unset POINT_WEIGHT + + +export 'DESC=KDE_WEIGHT' +export 'MASK_GRID="FULL"' +export 'MASK_SID=' +export 'OUTPUT_PREFIX=PROB_KDE_WEIGHT' +export 'POINT_WEIGHT=KDE' +/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_pr/sref_prob_2012040821_F015.grib2 \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_prob_point_weight \ + -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 +unset DESC +unset MASK_GRID +unset MASK_SID +unset OUTPUT_PREFIX +unset POINT_WEIGHT + + +export 'DESC=NO_WEIGHT' +export 'MASK_GRID="FULL"' +export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPUPA_ELEV.txt"' +export 'OUTPUT_PREFIX=NO_WEIGHT' +export 'POINT_WEIGHT=NONE' +/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/ensemble_stat \ + 6 \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/EnsembleStatConfig_point_weight \ + -point_obs /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/ascii2nc/gauge_2012041012_24hr.nc \ + -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 +unset DESC +unset MASK_GRID +unset MASK_SID +unset OUTPUT_PREFIX +unset POINT_WEIGHT + + +export 'DESC=SID_WEIGHT' +export 'MASK_GRID=' +export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPSFC_ELEV.txt"' +export 'OUTPUT_PREFIX=SID_WEIGHT' +export 'POINT_WEIGHT=SID' +/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/ensemble_stat \ + 6 \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/EnsembleStatConfig_point_weight \ + -point_obs /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/ascii2nc/gauge_2012041012_24hr.nc \ + -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 +unset DESC +unset MASK_GRID +unset MASK_SID +unset OUTPUT_PREFIX +unset POINT_WEIGHT + + +export 'DESC=KDE_WEIGHT' +export 'MASK_GRID="FULL"' +export 'MASK_SID=' +export 'OUTPUT_PREFIX=KDE_WEIGHT' +export 'POINT_WEIGHT=KDE' +/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/ensemble_stat \ + 6 \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ + /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ + /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/EnsembleStatConfig_point_weight \ + -point_obs /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/ascii2nc/gauge_2012041012_24hr.nc \ + -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 +unset DESC +unset MASK_GRID +unset MASK_SID +unset OUTPUT_PREFIX +unset POINT_WEIGHT + + diff --git a/internal/test_unit/xml/unit_point_weight.xml b/internal/test_unit/xml/unit_point_weight.xml index f0f7841396..9e8d523dbd 100644 --- a/internal/test_unit/xml/unit_point_weight.xml +++ b/internal/test_unit/xml/unit_point_weight.xml @@ -55,6 +55,7 @@ &OUTPUT_DIR;/point_weight/point_stat_SID_WEIGHT_150000L_20120409_120000V.stat + &OUTPUT_DIR;/point_weight/point_stat_SID_WEIGHT_150000L_20120409_120000V_SID_point_weights.txt @@ -75,6 +76,7 @@ &OUTPUT_DIR;/point_weight/point_stat_KDE_WEIGHT_150000L_20120409_120000V.stat + &OUTPUT_DIR;/point_weight/point_stat_KDE_WEIGHT_150000L_20120409_120000V_KDE_point_weights.txt diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index d8c2292382..1b4d93f1e3 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -79,22 +79,42 @@ void PointWeightInfo::assign(const PointWeightInfo & m) { /////////////////////////////////////////////////////////////////////////////// void PointWeightInfo::add_sid(const string &sid, double lat, double lon) { + + // Add unique station id locations with which to compute weights + if(!has_sid(sid)) { + SIDWeight e = {sid, lat, lon, bad_data_double}; + SIDWeights.emplace_back(e); + WeightsComputed = false; + } +} + +/////////////////////////////////////////////////////////////////////////////// + +void PointWeightInfo::add_wgt(const string &sid, double wgt) { + + // Add pre-computed weights for unique station ids + if(!has_sid(sid)) { + SIDWeight e = {sid, bad_data_double, bad_data_double, wgt}; + SIDWeights.emplace_back(e); + WeightsComputed = true; + } +} + +/////////////////////////////////////////////////////////////////////////////// + +bool PointWeightInfo::has_sid(const string &sid) const { + const char *method_name = "PointWeightInfo()::has_sid() -> "; bool found = false; - // Check for existing entry - for(auto it=SIDWeights.begin(); it != SIDWeights.end(); ++it) { - if(it->SID == sid) { + // Search for a matching entry + for(const auto &e : SIDWeights) { + if(e.SID == sid) { found = true; break; } } - // Add unique station ids - if(!found) { - SIDWeight e = {sid, lat, lon, bad_data_double}; - SIDWeights.emplace_back(e); - WeightsComputed = false; - } + return found; } /////////////////////////////////////////////////////////////////////////////// @@ -110,10 +130,10 @@ bool PointWeightInfo::has_sid(const string &sid, double &wgt) const { } // Search for a matching entry - for(auto it=SIDWeights.begin(); it != SIDWeights.end(); ++it) { - if(it->SID == sid) { + for(const auto &e : SIDWeights) { + if(e.SID == sid) { found = true; - wgt = it->Wgt; + wgt = e.Wgt; break; } } diff --git a/src/basic/vx_util/point_weight.h b/src/basic/vx_util/point_weight.h index 96d79a1f3e..fa8b1ab876 100644 --- a/src/basic/vx_util/point_weight.h +++ b/src/basic/vx_util/point_weight.h @@ -84,6 +84,8 @@ class PointWeightInfo { bool need_sid() const; void add_sid(const std::string &, double, double); + void add_wgt(const std::string &, double); + bool has_sid(const std::string &) const; bool has_sid(const std::string &, double &) const; void compute_kde_weights(); void write_weights() const; diff --git a/src/libcode/vx_statistics/pair_base.cc b/src/libcode/vx_statistics/pair_base.cc index 90d1599071..8ffc73fe1a 100644 --- a/src/libcode/vx_statistics/pair_base.cc +++ b/src/libcode/vx_statistics/pair_base.cc @@ -814,6 +814,9 @@ void PairBase::set_point_weight(PointWeightInfo &info) { double wgt; if(mask_sid_ptr->has_sid(sid_sa[i_obs], wgt)) { wgt_na.set(i_obs, wgt); + + // Store the pre-computed SID weights + info.add_wgt(sid_sa[i_obs], wgt); } else { mlog << Warning << "\n" << method_name From 47d1d3c4a0ae4b025f1ea8e3629f0c493d3e5831 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Fri, 15 May 2026 21:18:38 +0000 Subject: [PATCH 15/36] Per #3335, update all the MET Point-Stat and Ensemble-Stat config files. --- internal/test_unit/config/EnsembleStatConfig | 4 +++ .../config/EnsembleStatConfig_LAND_TOPO_MASK | 4 +++ .../EnsembleStatConfig_LAPSE_RATE_MSL_AGL | 4 +++ .../config/EnsembleStatConfig_MASK_SID | 4 +++ .../test_unit/config/EnsembleStatConfig_climo | 4 +++ .../config/EnsembleStatConfig_grid_weight | 6 ++++- .../config/EnsembleStatConfig_one_cdf_bin | 4 +++ .../config/EnsembleStatConfig_python | 4 +++ .../config/EnsembleStatConfig_qty_inc_exc | 4 +++ .../EnsembleStatConfig_rps_climo_bin_prob | 4 +++ .../EnsembleStatConfig_single_file_grib | 4 +++ .../config/EnsembleStatConfig_single_file_nc | 4 +++ .../config/GridStatConfig_ugrid_mpas | 2 +- .../config/GridStatConfig_ugrid_mpas_diag | 2 +- .../test_unit/config/PointStatConfig_APCP | 17 ++++++++++--- .../config/PointStatConfig_APCP_HIRA | 22 ++++++++++------ .../config/PointStatConfig_GTG_latlon | 20 ++++++++++----- .../test_unit/config/PointStatConfig_GTG_lc | 22 ++++++++++------ .../config/PointStatConfig_INTERP_OPTS | 22 ++++++++++------ .../config/PointStatConfig_LAND_TOPO_MASK | 22 ++++++++++------ .../config/PointStatConfig_LAPSE_RATE_MSL_AGL | 22 ++++++++++------ .../test_unit/config/PointStatConfig_MASK_SID | 22 ++++++++++------ .../config/PointStatConfig_MPR_OBTYPE | 22 ++++++++++------ .../test_unit/config/PointStatConfig_PHYS | 22 ++++++++++------ .../config/PointStatConfig_PHYS_pint | 22 ++++++++++------ .../test_unit/config/PointStatConfig_SEEPS | 24 +++++++++++------- .../test_unit/config/PointStatConfig_WINDS | 22 ++++++++++------ .../test_unit/config/PointStatConfig_aeronet | 22 ++++++++++------ .../test_unit/config/PointStatConfig_airnow | 16 ++++++++---- .../test_unit/config/PointStatConfig_climo | 22 ++++++++++------ .../config/PointStatConfig_climo_WMO | 22 ++++++++++------ .../config/PointStatConfig_climo_prob | 22 ++++++++++------ internal/test_unit/config/PointStatConfig_dup | 23 +++++++++++------ .../config/PointStatConfig_mpr_thresh | 22 ++++++++++------ .../config/PointStatConfig_obs_summary | 18 ++++++++----- .../config/PointStatConfig_obs_summary_all | 20 ++++++++++----- .../config/PointStatConfig_point_weight | 1 - .../test_unit/config/PointStatConfig_prob | 22 ++++++++++------ .../config/PointStatConfig_prob_point_weight | 1 - .../test_unit/config/PointStatConfig_python | 20 ++++++++++----- .../config/PointStatConfig_qty_inc_exc | 22 ++++++++++------ .../config/PointStatConfig_range_azimuth | 4 +++ .../config/PointStatConfig_sid_inc_exc | 24 +++++++++++------- ...ointStatConfig_ugrid_lfric_pressure_levels | 6 +++++ .../config/PointStatConfig_ugrid_mpas_diag | 23 ++++++++++------- .../config/PointStatConfig_ugrid_mpas_out | 23 ++++++++++------- .../config/PointStatConfig_ugrid_no_dataset | 23 ++++++++++------- .../config/ref_config/PointStatConfig_ADPUPA | 17 ++++++++++--- .../config/ref_config/PointStatConfig_ONLYSF | 17 ++++++++++--- .../config/ref_config/PointStatConfig_WINDS | 17 ++++++++++--- scripts/config/EnsembleStatConfig | 4 +++ scripts/config/PointStatConfig | 20 ++++++++++----- src/tools/tc_utils/tc_stat/.tc_stat.cc.swp | Bin 16384 -> 0 bytes 53 files changed, 521 insertions(+), 245 deletions(-) delete mode 100644 src/tools/tc_utils/tc_stat/.tc_stat.cc.swp diff --git a/internal/test_unit/config/EnsembleStatConfig b/internal/test_unit/config/EnsembleStatConfig index 612187fd12..e3a06ffe0d 100644 --- a/internal/test_unit/config/EnsembleStatConfig +++ b/internal/test_unit/config/EnsembleStatConfig @@ -228,6 +228,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/EnsembleStatConfig_LAND_TOPO_MASK b/internal/test_unit/config/EnsembleStatConfig_LAND_TOPO_MASK index 9cf9269ac0..114b0c0b10 100644 --- a/internal/test_unit/config/EnsembleStatConfig_LAND_TOPO_MASK +++ b/internal/test_unit/config/EnsembleStatConfig_LAND_TOPO_MASK @@ -290,6 +290,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/EnsembleStatConfig_LAPSE_RATE_MSL_AGL b/internal/test_unit/config/EnsembleStatConfig_LAPSE_RATE_MSL_AGL index 4056c1e0c0..f08f76fe67 100644 --- a/internal/test_unit/config/EnsembleStatConfig_LAPSE_RATE_MSL_AGL +++ b/internal/test_unit/config/EnsembleStatConfig_LAPSE_RATE_MSL_AGL @@ -307,6 +307,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/EnsembleStatConfig_MASK_SID b/internal/test_unit/config/EnsembleStatConfig_MASK_SID index 92c70c6e8d..4ac5e4415d 100644 --- a/internal/test_unit/config/EnsembleStatConfig_MASK_SID +++ b/internal/test_unit/config/EnsembleStatConfig_MASK_SID @@ -220,6 +220,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/EnsembleStatConfig_climo b/internal/test_unit/config/EnsembleStatConfig_climo index a195645ce6..8dd8ae8891 100644 --- a/internal/test_unit/config/EnsembleStatConfig_climo +++ b/internal/test_unit/config/EnsembleStatConfig_climo @@ -250,6 +250,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/EnsembleStatConfig_grid_weight b/internal/test_unit/config/EnsembleStatConfig_grid_weight index 4e1556c7b4..415c4d4fcd 100644 --- a/internal/test_unit/config/EnsembleStatConfig_grid_weight +++ b/internal/test_unit/config/EnsembleStatConfig_grid_weight @@ -240,8 +240,12 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = ${GRID_WEIGHT}; +grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/EnsembleStatConfig_one_cdf_bin b/internal/test_unit/config/EnsembleStatConfig_one_cdf_bin index 3e1d6fd8a8..f35a49231b 100644 --- a/internal/test_unit/config/EnsembleStatConfig_one_cdf_bin +++ b/internal/test_unit/config/EnsembleStatConfig_one_cdf_bin @@ -234,6 +234,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/EnsembleStatConfig_python b/internal/test_unit/config/EnsembleStatConfig_python index 8c9a7fa257..41836f294e 100644 --- a/internal/test_unit/config/EnsembleStatConfig_python +++ b/internal/test_unit/config/EnsembleStatConfig_python @@ -231,6 +231,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc b/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc index 849ec47fe1..441a2e3672 100644 --- a/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc +++ b/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc @@ -237,6 +237,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/EnsembleStatConfig_rps_climo_bin_prob b/internal/test_unit/config/EnsembleStatConfig_rps_climo_bin_prob index a3420a6ec4..9fa3daa3d6 100644 --- a/internal/test_unit/config/EnsembleStatConfig_rps_climo_bin_prob +++ b/internal/test_unit/config/EnsembleStatConfig_rps_climo_bin_prob @@ -218,6 +218,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/EnsembleStatConfig_single_file_grib b/internal/test_unit/config/EnsembleStatConfig_single_file_grib index 18a280f253..ea553a02e9 100644 --- a/internal/test_unit/config/EnsembleStatConfig_single_file_grib +++ b/internal/test_unit/config/EnsembleStatConfig_single_file_grib @@ -280,6 +280,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/EnsembleStatConfig_single_file_nc b/internal/test_unit/config/EnsembleStatConfig_single_file_nc index 63c0e3be9b..d5353a6aa2 100644 --- a/internal/test_unit/config/EnsembleStatConfig_single_file_nc +++ b/internal/test_unit/config/EnsembleStatConfig_single_file_nc @@ -285,6 +285,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/GridStatConfig_ugrid_mpas b/internal/test_unit/config/GridStatConfig_ugrid_mpas index fdccf5210c..97b1dca688 100644 --- a/internal/test_unit/config/GridStatConfig_ugrid_mpas +++ b/internal/test_unit/config/GridStatConfig_ugrid_mpas @@ -245,8 +245,8 @@ nc_pairs_flag = { seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// -// Unstructured Grid (optional ecept ugrid_dataset) +// Unstructured Grid (optional except ugrid_dataset) ugrid_dataset = "mpas"; //ugrid_max_distance_km = 30; //ugrid_map_config = ""; diff --git a/internal/test_unit/config/GridStatConfig_ugrid_mpas_diag b/internal/test_unit/config/GridStatConfig_ugrid_mpas_diag index b31f407bc8..de65286c22 100644 --- a/internal/test_unit/config/GridStatConfig_ugrid_mpas_diag +++ b/internal/test_unit/config/GridStatConfig_ugrid_mpas_diag @@ -245,8 +245,8 @@ nc_pairs_flag = { seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// -// Unstructured Grid (optional ecept ugrid_dataset) +// Unstructured Grid (optional except ugrid_dataset) ugrid_dataset = "mpas"; //ugrid_max_distance_km = 30; //ugrid_map_config = ""; diff --git a/internal/test_unit/config/PointStatConfig_APCP b/internal/test_unit/config/PointStatConfig_APCP index 513bdda037..7ae3c190f9 100644 --- a/internal/test_unit/config/PointStatConfig_APCP +++ b/internal/test_unit/config/PointStatConfig_APCP @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = FALSE; + cat_thresh = [ >0.254, >0.635, >1.270, >2.540 ]; message_type = "ADPSFC"; @@ -106,6 +109,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = >=0.1&&<=0.85; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = BOTH; ctc = BOTH; @@ -133,10 +143,11 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = FALSE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_APCP_HIRA b/internal/test_unit/config/PointStatConfig_APCP_HIRA index 8d6cee40fb..93da6f7b1a 100644 --- a/internal/test_unit/config/PointStatConfig_APCP_HIRA +++ b/internal/test_unit/config/PointStatConfig_APCP_HIRA @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = FALSE; + cat_thresh = [ >0.254, >2.540 ]; sid_inc = []; sid_exc = []; @@ -108,6 +111,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = STAT; @@ -133,17 +143,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = FALSE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_GTG_latlon b/internal/test_unit/config/PointStatConfig_GTG_latlon index 05dca546a6..08b6e5f908 100644 --- a/internal/test_unit/config/PointStatConfig_GTG_latlon +++ b/internal/test_unit/config/PointStatConfig_GTG_latlon @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + fcst = { field = [ @@ -127,6 +130,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = BOTH; ctc = BOTH; @@ -153,17 +163,13 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) -seeps_p1_thresh = NA; +point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - -point_weight_flag = NONE; - tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_GTG_lc b/internal/test_unit/config/PointStatConfig_GTG_lc index 8b5c9a160e..002e60a88f 100644 --- a/internal/test_unit/config/PointStatConfig_GTG_lc +++ b/internal/test_unit/config/PointStatConfig_GTG_lc @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + fcst = { field = [ @@ -135,6 +138,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = BOTH; ctc = BOTH; @@ -160,17 +170,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_INTERP_OPTS b/internal/test_unit/config/PointStatConfig_INTERP_OPTS index c6113700d0..13e5aa6111 100644 --- a/internal/test_unit/config/PointStatConfig_INTERP_OPTS +++ b/internal/test_unit/config/PointStatConfig_INTERP_OPTS @@ -40,6 +40,9 @@ wind_logic = UNION; cat_thresh = [ ]; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = FALSE; + fcst = { sid_inc = []; sid_exc = []; @@ -118,6 +121,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = NONE; @@ -143,17 +153,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = FALSE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK b/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK index 27fcf93d66..1ce39872e2 100644 --- a/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK +++ b/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + fcst = { sid_inc = []; sid_exc = []; @@ -183,6 +186,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = NONE; @@ -208,17 +218,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_LAPSE_RATE_MSL_AGL b/internal/test_unit/config/PointStatConfig_LAPSE_RATE_MSL_AGL index 0716daffcc..2155a0954d 100644 --- a/internal/test_unit/config/PointStatConfig_LAPSE_RATE_MSL_AGL +++ b/internal/test_unit/config/PointStatConfig_LAPSE_RATE_MSL_AGL @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + fcst = { sid_inc = []; sid_exc = []; @@ -208,6 +211,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = NONE; @@ -233,17 +243,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_MASK_SID b/internal/test_unit/config/PointStatConfig_MASK_SID index 55c8bac91b..450a965381 100644 --- a/internal/test_unit/config/PointStatConfig_MASK_SID +++ b/internal/test_unit/config/PointStatConfig_MASK_SID @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + fcst = { sid_inc = []; sid_exc = []; @@ -113,6 +116,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = BOTH; ctc = BOTH; @@ -138,17 +148,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_MPR_OBTYPE b/internal/test_unit/config/PointStatConfig_MPR_OBTYPE index a0042c5319..b77be64c5f 100644 --- a/internal/test_unit/config/PointStatConfig_MPR_OBTYPE +++ b/internal/test_unit/config/PointStatConfig_MPR_OBTYPE @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + // // Mapping of message type group name to comma-separated list of values. // @@ -124,6 +127,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = NONE; @@ -149,17 +159,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_PHYS b/internal/test_unit/config/PointStatConfig_PHYS index 88a82381a6..1713325236 100644 --- a/internal/test_unit/config/PointStatConfig_PHYS +++ b/internal/test_unit/config/PointStatConfig_PHYS @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + fcst = { sid_inc = []; sid_exc = []; @@ -114,6 +117,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = BOTH; ctc = BOTH; @@ -139,17 +149,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_PHYS_pint b/internal/test_unit/config/PointStatConfig_PHYS_pint index da5dce826a..34117748c7 100644 --- a/internal/test_unit/config/PointStatConfig_PHYS_pint +++ b/internal/test_unit/config/PointStatConfig_PHYS_pint @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + fcst = { field = [ @@ -109,6 +112,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = BOTH; ctc = BOTH; @@ -134,17 +144,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_SEEPS b/internal/test_unit/config/PointStatConfig_SEEPS index ee1d250682..37266d53c4 100644 --- a/internal/test_unit/config/PointStatConfig_SEEPS +++ b/internal/test_unit/config/PointStatConfig_SEEPS @@ -40,6 +40,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = FALSE; + cat_thresh = [ >0.254, >0.635, >1.270, >2.540 ]; message_type = "ADPSFC"; @@ -107,6 +110,14 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = ${SEEPS_P1_THRESH}; +seeps_point_climo_name = "${SEEPS_POINT_CLIMO_NAME}"; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = BOTH; ctc = BOTH; @@ -132,18 +143,13 @@ output_flag = { seeps_mpr = BOTH; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = ${SEEPS_P1_THRESH}; -seeps_point_climo_name = "${SEEPS_POINT_CLIMO_NAME}"; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = FALSE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_WINDS b/internal/test_unit/config/PointStatConfig_WINDS index d28f020aaf..81eb6af979 100644 --- a/internal/test_unit/config/PointStatConfig_WINDS +++ b/internal/test_unit/config/PointStatConfig_WINDS @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + // // Mapping of message type group name to comma-separated list of values. // @@ -133,6 +136,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = NONE; @@ -158,17 +168,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_aeronet b/internal/test_unit/config/PointStatConfig_aeronet index f935dc2f09..fa15f4fb40 100644 --- a/internal/test_unit/config/PointStatConfig_aeronet +++ b/internal/test_unit/config/PointStatConfig_aeronet @@ -40,6 +40,9 @@ wind_thresh = [ NA ]; //wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + // // Forecast and observation fields to be verified // @@ -175,6 +178,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -203,17 +213,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_airnow b/internal/test_unit/config/PointStatConfig_airnow index 29dfb568ea..ea86acd238 100644 --- a/internal/test_unit/config/PointStatConfig_airnow +++ b/internal/test_unit/config/PointStatConfig_airnow @@ -208,6 +208,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // May be set separately in each "obs.field" entry @@ -237,14 +244,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = ""; diff --git a/internal/test_unit/config/PointStatConfig_climo b/internal/test_unit/config/PointStatConfig_climo index da71df1111..3e49687c4c 100644 --- a/internal/test_unit/config/PointStatConfig_climo +++ b/internal/test_unit/config/PointStatConfig_climo @@ -40,6 +40,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + // // Forecast and observation fields to be verified // @@ -248,6 +251,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry): >=min_p1&&<=max_p1 +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -276,17 +286,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry): >=min_p1&&<=max_p1 - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_climo_WMO b/internal/test_unit/config/PointStatConfig_climo_WMO index dcdacc09c5..476fbea105 100644 --- a/internal/test_unit/config/PointStatConfig_climo_WMO +++ b/internal/test_unit/config/PointStatConfig_climo_WMO @@ -45,6 +45,9 @@ sid_exc = []; obs_quality_inc = []; obs_quality_exc = []; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + // // Forecast and observation fields to be verified // @@ -193,6 +196,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -221,17 +231,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_climo_prob b/internal/test_unit/config/PointStatConfig_climo_prob index 5364ce2c5a..2f678dfae5 100644 --- a/internal/test_unit/config/PointStatConfig_climo_prob +++ b/internal/test_unit/config/PointStatConfig_climo_prob @@ -41,6 +41,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + // // Forecast and observation fields to be verified // @@ -195,6 +198,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -223,17 +233,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_dup b/internal/test_unit/config/PointStatConfig_dup index d2ce8cea9c..b97f32b5fc 100644 --- a/internal/test_unit/config/PointStatConfig_dup +++ b/internal/test_unit/config/PointStatConfig_dup @@ -38,6 +38,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = ${DUPLICATE_FLAG}; +rank_corr_flag = FALSE; + // // Forecast and observation fields to be verified // @@ -128,6 +131,14 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// + +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -156,18 +167,14 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = ${DUPLICATE_FLAG}; -rank_corr_flag = FALSE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; +//////////////////////////////////////////////////////////////////////////////// + tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_mpr_thresh b/internal/test_unit/config/PointStatConfig_mpr_thresh index 15f2bb0851..aa83d81494 100644 --- a/internal/test_unit/config/PointStatConfig_mpr_thresh +++ b/internal/test_unit/config/PointStatConfig_mpr_thresh @@ -40,6 +40,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + // // Forecast and observation fields to be verified // @@ -187,6 +190,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -215,17 +225,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_obs_summary b/internal/test_unit/config/PointStatConfig_obs_summary index 85ca139356..7e2a75e3d7 100644 --- a/internal/test_unit/config/PointStatConfig_obs_summary +++ b/internal/test_unit/config/PointStatConfig_obs_summary @@ -40,6 +40,8 @@ duplicate_flag = NONE; obs_summary = ${OBS_SUMMARY}; obs_perc_value = 75; eclv_points = 0.05; +hss_ec_value = NA; +rank_corr_flag = FALSE; // // Forecast and observation fields to be verified @@ -117,6 +119,13 @@ interp = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -146,16 +155,13 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) -seeps_p1_thresh = NA; +point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; //////////////////////////////////////////////////////////////////////////////// -rank_corr_flag = FALSE; - -point_weight_flag = NONE; - tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_obs_summary_all b/internal/test_unit/config/PointStatConfig_obs_summary_all index 8b3cce882a..5aa0f9ae61 100644 --- a/internal/test_unit/config/PointStatConfig_obs_summary_all +++ b/internal/test_unit/config/PointStatConfig_obs_summary_all @@ -41,6 +41,8 @@ obs_summary = NONE; obs_perc_value = 50; eclv_points = 0.05; +rank_corr_flag = FALSE; + // // Forecast and observation fields to be verified // @@ -186,6 +188,13 @@ interp = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -215,15 +224,12 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - -//////////////////////////////////////////////////////////////////////////////// - -rank_corr_flag = FALSE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_point_weight b/internal/test_unit/config/PointStatConfig_point_weight index 583f254e3e..88596a3a06 100644 --- a/internal/test_unit/config/PointStatConfig_point_weight +++ b/internal/test_unit/config/PointStatConfig_point_weight @@ -107,7 +107,6 @@ hira = { // // Threshold for SEEPS p1 (Probability of being dry) // - seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_prob b/internal/test_unit/config/PointStatConfig_prob index 41cbbb9491..92b987f218 100644 --- a/internal/test_unit/config/PointStatConfig_prob +++ b/internal/test_unit/config/PointStatConfig_prob @@ -39,6 +39,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.1; +duplicate_flag = NONE; +rank_corr_flag = FALSE; + fcst = { field = [ @@ -116,6 +119,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = NONE; @@ -141,17 +151,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = FALSE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_prob_point_weight b/internal/test_unit/config/PointStatConfig_prob_point_weight index 17f26a8fc3..0ca9e86086 100644 --- a/internal/test_unit/config/PointStatConfig_prob_point_weight +++ b/internal/test_unit/config/PointStatConfig_prob_point_weight @@ -113,7 +113,6 @@ hira = { // // Threshold for SEEPS p1 (Probability of being dry) // - seeps_p1_thresh = NA; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_python b/internal/test_unit/config/PointStatConfig_python index 5462fdd744..2dfe15b64c 100644 --- a/internal/test_unit/config/PointStatConfig_python +++ b/internal/test_unit/config/PointStatConfig_python @@ -46,6 +46,8 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +rank_corr_flag = FALSE; + // // Forecast and observation fields to be verified // @@ -184,6 +186,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -212,15 +221,12 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - -//////////////////////////////////////////////////////////////////////////////// - -rank_corr_flag = FALSE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = ""; diff --git a/internal/test_unit/config/PointStatConfig_qty_inc_exc b/internal/test_unit/config/PointStatConfig_qty_inc_exc index 7f2842620a..e8451ec9e4 100644 --- a/internal/test_unit/config/PointStatConfig_qty_inc_exc +++ b/internal/test_unit/config/PointStatConfig_qty_inc_exc @@ -36,6 +36,9 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; + // // Forecast and observation fields to be verified // @@ -172,6 +175,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -200,17 +210,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_range_azimuth b/internal/test_unit/config/PointStatConfig_range_azimuth index e8e2bc0477..4150667d77 100644 --- a/internal/test_unit/config/PointStatConfig_range_azimuth +++ b/internal/test_unit/config/PointStatConfig_range_azimuth @@ -279,6 +279,10 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_sid_inc_exc b/internal/test_unit/config/PointStatConfig_sid_inc_exc index 465d026526..c419013f68 100644 --- a/internal/test_unit/config/PointStatConfig_sid_inc_exc +++ b/internal/test_unit/config/PointStatConfig_sid_inc_exc @@ -45,6 +45,10 @@ sid_exc = []; obs_quality_inc = []; obs_quality_exc = []; +duplicate_flag = NONE; +obs_summary = NEAREST; +rank_corr_flag = TRUE; + fcst = { field = [ @@ -121,6 +125,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = NONE; @@ -146,18 +157,13 @@ output_flag = { seeps_mpr = NONE; } -//////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -obs_summary = NEAREST; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_ugrid_lfric_pressure_levels b/internal/test_unit/config/PointStatConfig_ugrid_lfric_pressure_levels index d1ffe476df..7bcd3f4be0 100644 --- a/internal/test_unit/config/PointStatConfig_ugrid_lfric_pressure_levels +++ b/internal/test_unit/config/PointStatConfig_ugrid_lfric_pressure_levels @@ -181,6 +181,12 @@ ugrid_max_distance_km = 30; //////////////////////////////////////////////////////////////////////////////// +point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// + tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag b/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag index 3c4c5a5a4f..ec7199c38d 100644 --- a/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag +++ b/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag @@ -39,6 +39,8 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; fcst = { sid_inc = []; @@ -118,6 +120,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = STAT; ctc = STAT; @@ -144,13 +153,8 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - -//////////////////////////////////////////////////////////////////////////////// -// Unstructured Grid (optional ecept ugrid_dataset) +// Unstructured Grid (optional except ugrid_dataset) ugrid_dataset = "mpas"; //ugrid_max_distance_km = 30; //ugrid_map_config = ""; @@ -158,10 +162,11 @@ ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_ugrid_mpas_out b/internal/test_unit/config/PointStatConfig_ugrid_mpas_out index bab52d9ebc..d0be843fdf 100644 --- a/internal/test_unit/config/PointStatConfig_ugrid_mpas_out +++ b/internal/test_unit/config/PointStatConfig_ugrid_mpas_out @@ -39,6 +39,8 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; fcst = { sid_inc = []; @@ -118,6 +120,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = STAT; ctc = STAT; @@ -144,13 +153,8 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - -//////////////////////////////////////////////////////////////////////////////// -// Unstructured Grid (optional ecept ugrid_dataset) +// Unstructured Grid (optional except ugrid_dataset) ugrid_dataset = "mpas"; //ugrid_max_distance_km = 30; //ugrid_map_config = ""; @@ -158,10 +162,11 @@ ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_ugrid_no_dataset b/internal/test_unit/config/PointStatConfig_ugrid_no_dataset index ecf010e525..095126b103 100644 --- a/internal/test_unit/config/PointStatConfig_ugrid_no_dataset +++ b/internal/test_unit/config/PointStatConfig_ugrid_no_dataset @@ -39,6 +39,8 @@ wind_thresh = [ NA ]; wind_logic = UNION; eclv_points = 0.05; +duplicate_flag = NONE; +rank_corr_flag = TRUE; fcst = { sid_inc = []; @@ -118,6 +120,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = NONE; @@ -144,13 +153,8 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - -//////////////////////////////////////////////////////////////////////////////// -// Unstructured Grid (optional ecept ugrid_dataset) +// Unstructured Grid (optional except ugrid_dataset) //ugrid_dataset = "mpas"; ugrid_max_distance_km = 35; //ugrid_map_config = ""; @@ -158,10 +162,11 @@ ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = TRUE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA b/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA index 17b5a3fc15..629ad26e71 100644 --- a/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA +++ b/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA @@ -37,6 +37,9 @@ cnt_logic = UNION; wind_thresh = [ NA ]; wind_logic = UNION; +duplicate_flag = NONE; +rank_corr_flag = FALSE; + // // Forecast and observation fields to be verified // @@ -152,6 +155,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = >=0.1&&<=0.85; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -180,10 +190,11 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = FALSE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${MODEL}_F${FCST_TIME}_ADPUPA"; diff --git a/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF b/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF index 3509f47c2b..7d42ecd91c 100644 --- a/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF +++ b/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF @@ -36,6 +36,9 @@ cnt_thresh = [ NA ]; cnt_logic = UNION; wind_logic = INTERSECTION; +duplicate_flag = NONE; +rank_corr_flag = FALSE; + // // Forecast and observation fields to be verified // @@ -162,6 +165,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = >=0.1&&<=0.85; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -190,10 +200,11 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = FALSE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${MODEL}_F${FCST_TIME}_ONLYSF"; diff --git a/internal/test_unit/config/ref_config/PointStatConfig_WINDS b/internal/test_unit/config/ref_config/PointStatConfig_WINDS index b760ba13fc..8d420252ba 100644 --- a/internal/test_unit/config/ref_config/PointStatConfig_WINDS +++ b/internal/test_unit/config/ref_config/PointStatConfig_WINDS @@ -36,6 +36,9 @@ cnt_thresh = [ NA ]; cnt_logic = UNION; wind_logic = INTERSECTION; +duplicate_flag = NONE; +rank_corr_flag = FALSE; + // // Forecast and observation fields to be verified // @@ -145,6 +148,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = >=0.1&&<=0.85; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -173,10 +183,11 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = FALSE; - point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = "${MODEL}_F${FCST_TIME}_WINDS"; diff --git a/scripts/config/EnsembleStatConfig b/scripts/config/EnsembleStatConfig index a536ea66d5..d85a87b463 100644 --- a/scripts/config/EnsembleStatConfig +++ b/scripts/config/EnsembleStatConfig @@ -330,6 +330,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// output_prefix = ""; diff --git a/scripts/config/PointStatConfig b/scripts/config/PointStatConfig index bccb57308e..50ad887f3b 100644 --- a/scripts/config/PointStatConfig +++ b/scripts/config/PointStatConfig @@ -40,6 +40,8 @@ cnt_logic = UNION; wind_thresh = [ NA ]; wind_logic = UNION; +rank_corr_flag = TRUE; + // // Forecast and observation fields to be verified // @@ -229,6 +231,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -258,15 +267,12 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) - -seeps_p1_thresh = NA; - -//////////////////////////////////////////////////////////////////////////////// - -rank_corr_flag = TRUE; point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; output_prefix = ""; diff --git a/src/tools/tc_utils/tc_stat/.tc_stat.cc.swp b/src/tools/tc_utils/tc_stat/.tc_stat.cc.swp deleted file mode 100644 index 75f13cd9490b17053b77857cf20aab8a2cc27aeb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI3Yiu1y700)w34KtAs8qxU%HbNS>%{lzyqwsf&W)40b(|-DG!X z*@qps&`L;65fZ48sNe%H75V{$gjA3aNEGp^igUnyA(dTssWoiBmV8Km5e=_k7~YJB{R#>30Kw*Kx0)+(%3ltV8EKpdWu)wed;@~FZ z5hUK2-dIgPZy5T#nqG05esSpjOX>ZyY5J9+`)^8r-<^KWq!ncKq{+ocVS&N|g#`)= z6c#8fP*|X_Kw*Kx0)+(%3ltV8Ebtmwz_blx1ajZO0RZg(XY2nTz0EMb08Fq8Yy-c1 zt6^LQkAq|22q=U1fjhts@Q2$C6nB9Jn7$fcJviz^&jPw;09?;5qOu@J;Y}@Hy}pxC9;rli(n@ z1-y7O^a39TC%~QHg*O|`&hhsWl@79q4f&?1r0+nRlV%tR3WaAv5x+|^h#l!i z1QST5APY_+mmJ`)-{*kwC!>vVwl8vYaaihpGT{r4me$dXkc2+To%&sV_ zpZ)eNh*%jzrS=8p+vmD+wVn8(uw>VF9u#&vT6JQpC*S~?m8Ln9sz0A`z+{w_%E^XO zW$lg14Kr!F=Z0;bcAUH*{7A`QUv^ZPmh>$%UWh~PXIpg4#LYUS-EmxzW>Vu|4&A4n z>7cP99h?4}aq=hoY#>0NYbjNPCcy5c$$Vb&2i0Cbr6Q4fqh8q5q^q?OQl@j3na8hKFSon3lkR zwNb%{<6CZG3o5Y>^1!I}O8MlKi)}n$IdMHJ()j%2hQw~@*c%el!;(W{)9HgBmV+g- zqm%;`^4J&@Fq!xcT2SpBTGwkbTEp4QwLnB0lhyIefy|y6_XhKIFoy}#%S*(JfH#N1 zY!+8Blmt~=XE|RIZy>fK58)+fi{{@N1mQp2u3q2A&R5@CYwWHycN5)R(@V=`XF z=pw>lRvKweG#a#!1c3}=s_+2o*&*fLA<`F&Oy*ve*{Ihbw%NRf%<+jP&H9!MA=Hco z*^b%uWrW!z%EatpG4+XBbH5UEG89oP1K+v8>6vQH<~}+lJh>tU9g;es^r$CH8!uq& zjD4|aCB*LQYbRID(5401<8&pK&-hkm{aA!J`%5E@3Dm&ePV78{SEy`~)tc&Zxu5*_ z?qZUIb9-iV0VSkc&000i8Bu+6U#+o!qj54bbHRuo=y+z^w7ixThdnc+G+^i9{^D1o zBQpyv!W78Q8B4l}=l3gbq?Mz$8=Lg@F`SJKO&4!E6q*5E5HN}0mBZ;cc*nrYR$oqC z$=O}2kJlQT^zgh`)%sR&A#3_E@Qo$tJA4nbS z1$P6E0sIl`{qKWkz$&;0ydQ83;2FSifCs@*Fax%OUts*vxy<$5$|vxp3tTO8I>;mLj+Yl9}Z^ZKcw_6j)M ztM?1cfnA7n(;&Y|!LfD|n+1sZsIVNHPKUK#Kb<-7RqjW>IQo<=;IM)q?(Z#Bjavbm*ftXE<75iwNN%8_RXxNl6e9;RP4EE`}lz zbQo?mYmn}?s5TDN&Js6TVX)=A*Hy(TZ&~s>ukG?*G$Y8)J4~Zg)*D8qJ9@3ES4fpW zwTQfg2-cy|x*=)@Lf_?$FI3azXkmG<`Vxm^uA?5_k>jjfk&0+UED-@1bXu3|)caZ5 zYaCec)l~!8Sv8P|oL-FB+`);GDRMd%Os88F4%rP#S&CP&+!xAc(g?TS z(S%i{3)lh_)9cu$6cVh8qRrH0zN6ffp|?i_uD7Kewyxy{DtVkPw#+#ObJ5nFt^ Mk2k%U^^CgtA4>XenE(I) From 81cc45323f24fa140889c666e0f178aa0fa11486 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Fri, 15 May 2026 21:19:50 +0000 Subject: [PATCH 16/36] Per #3335, get rid of trailing whitespace --- data/config/PointStatConfig_default | 2 +- data/config/STATAnalysisConfig_CBS_Index | 2 +- data/config/STATAnalysisConfig_GO_Index | 2 +- internal/test_unit/config/EnsembleStatConfig_qty_inc_exc | 2 +- internal/test_unit/config/GridStatConfig_fbias_perc_thresh | 2 +- internal/test_unit/config/MODEConfig_multivar | 4 ++-- internal/test_unit/config/MODEConfig_multivar_3_2 | 4 ++-- internal/test_unit/config/MODEConfig_multivar_super | 4 ++-- internal/test_unit/config/PB2NCConfig_all | 2 +- internal/test_unit/config/PB2NCConfig_vlevel | 2 +- internal/test_unit/config/PointStatConfig_APCP | 4 ++-- internal/test_unit/config/PointStatConfig_APCP_HIRA | 2 +- internal/test_unit/config/PointStatConfig_GTG_lc | 2 +- internal/test_unit/config/PointStatConfig_INTERP_OPTS | 2 +- internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK | 2 +- internal/test_unit/config/PointStatConfig_LAPSE_RATE_MSL_AGL | 2 +- internal/test_unit/config/PointStatConfig_MASK_SID | 2 +- internal/test_unit/config/PointStatConfig_MPR_OBTYPE | 2 +- internal/test_unit/config/PointStatConfig_PHYS | 2 +- internal/test_unit/config/PointStatConfig_PHYS_pint | 2 +- internal/test_unit/config/PointStatConfig_SEEPS | 4 ++-- internal/test_unit/config/PointStatConfig_WINDS | 2 +- internal/test_unit/config/PointStatConfig_aeronet | 4 ++-- internal/test_unit/config/PointStatConfig_airnow | 2 +- internal/test_unit/config/PointStatConfig_climo | 2 +- internal/test_unit/config/PointStatConfig_climo_WMO | 2 +- internal/test_unit/config/PointStatConfig_climo_prob | 2 +- internal/test_unit/config/PointStatConfig_dup | 2 +- internal/test_unit/config/PointStatConfig_mpr_thresh | 2 +- internal/test_unit/config/PointStatConfig_obs_summary_all | 2 +- internal/test_unit/config/PointStatConfig_prob | 2 +- internal/test_unit/config/PointStatConfig_python | 2 +- internal/test_unit/config/PointStatConfig_qty_inc_exc | 4 ++-- internal/test_unit/config/PointStatConfig_range_azimuth | 4 ++-- internal/test_unit/config/PointStatConfig_sid_inc_exc | 2 +- internal/test_unit/config/PointStatConfig_ugrid_mpas_diag | 2 +- internal/test_unit/config/PointStatConfig_ugrid_mpas_out | 2 +- internal/test_unit/config/PointStatConfig_ugrid_no_dataset | 2 +- internal/test_unit/config/STATAnalysisConfig_SFC_SS_Index | 2 +- internal/test_unit/config/ref_config/PointStatConfig_ADPUPA | 2 +- internal/test_unit/config/ref_config/PointStatConfig_ONLYSF | 2 +- internal/test_unit/config/ref_config/PointStatConfig_WINDS | 2 +- scripts/config/PointStatConfig | 2 +- 43 files changed, 51 insertions(+), 51 deletions(-) diff --git a/data/config/PointStatConfig_default b/data/config/PointStatConfig_default index c0c0986705..09e4654dc4 100644 --- a/data/config/PointStatConfig_default +++ b/data/config/PointStatConfig_default @@ -327,7 +327,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/data/config/STATAnalysisConfig_CBS_Index b/data/config/STATAnalysisConfig_CBS_Index index 9ac8afaba2..a870526557 100644 --- a/data/config/STATAnalysisConfig_CBS_Index +++ b/data/config/STATAnalysisConfig_CBS_Index @@ -93,7 +93,7 @@ alpha = []; line_type = [ "SL1L2" ]; column = [ "RMSE" ]; - + weight = [ 6.4, 6.4, 6.4, 6.4, 6.4, 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, diff --git a/data/config/STATAnalysisConfig_GO_Index b/data/config/STATAnalysisConfig_GO_Index index 7f01522dea..6d9cdc1d0f 100644 --- a/data/config/STATAnalysisConfig_GO_Index +++ b/data/config/STATAnalysisConfig_GO_Index @@ -97,7 +97,7 @@ alpha = []; line_type = [ "SL1L2" ]; column = [ "RMSE" ]; - + weight = [ 4.0, 3.0, 2.0, 1.0, 4.0, 3.0, 2.0, 1.0, 4.0, 3.0, 2.0, 1.0, diff --git a/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc b/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc index 441a2e3672..7b634555a7 100644 --- a/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc +++ b/internal/test_unit/config/EnsembleStatConfig_qty_inc_exc @@ -88,7 +88,7 @@ fcst = { obs_quality_exc = []; desc = "QTY_INC"; }, - + { name = "TMP"; level = [ "Z2" ]; diff --git a/internal/test_unit/config/GridStatConfig_fbias_perc_thresh b/internal/test_unit/config/GridStatConfig_fbias_perc_thresh index fa0b2df504..b8967b757b 100644 --- a/internal/test_unit/config/GridStatConfig_fbias_perc_thresh +++ b/internal/test_unit/config/GridStatConfig_fbias_perc_thresh @@ -63,7 +63,7 @@ fcst = { field = [ { name = "TMP"; level = [ "P500" ]; cat_thresh = [ ==FBIAS0.9, ==FBIAS1.0, ==FBIAS1.1, ==FBIAS0.9, ==FBIAS1.0, ==FBIAS1.1, <243, <243, <243, >253, >253, >253 ]; } ]; - + } obs = { diff --git a/internal/test_unit/config/MODEConfig_multivar b/internal/test_unit/config/MODEConfig_multivar index b8444c938b..f3c7c2c849 100644 --- a/internal/test_unit/config/MODEConfig_multivar +++ b/internal/test_unit/config/MODEConfig_multivar @@ -75,10 +75,10 @@ fcst = { //${METPLUS_FCST_VLD_THRESH} //${METPLUS_FCST_FILTER_ATTR_NAME} filter_attr_name = ["AREA"]; - + //${METPLUS_FCST_FILTER_ATTR_THRESH} filter_attr_thresh = [>=25]; - + //${METPLUS_FCST_MERGE_THRESH} //${METPLUS_FCST_MERGE_FLAG} //${METPLUS_FCST_FILE_TYPE} diff --git a/internal/test_unit/config/MODEConfig_multivar_3_2 b/internal/test_unit/config/MODEConfig_multivar_3_2 index 48d4aa55c1..a1912d7464 100644 --- a/internal/test_unit/config/MODEConfig_multivar_3_2 +++ b/internal/test_unit/config/MODEConfig_multivar_3_2 @@ -75,10 +75,10 @@ fcst = { //${METPLUS_FCST_VLD_THRESH} //${METPLUS_FCST_FILTER_ATTR_NAME} filter_attr_name = ["AREA"]; - + //${METPLUS_FCST_FILTER_ATTR_THRESH} filter_attr_thresh = [>=25]; - + //${METPLUS_FCST_MERGE_THRESH} //${METPLUS_FCST_MERGE_FLAG} //${METPLUS_FCST_FILE_TYPE} diff --git a/internal/test_unit/config/MODEConfig_multivar_super b/internal/test_unit/config/MODEConfig_multivar_super index 73181ab048..839b0d058b 100644 --- a/internal/test_unit/config/MODEConfig_multivar_super +++ b/internal/test_unit/config/MODEConfig_multivar_super @@ -72,10 +72,10 @@ fcst = { //${METPLUS_FCST_VLD_THRESH} //${METPLUS_FCST_FILTER_ATTR_NAME} filter_attr_name = ["AREA"]; - + //${METPLUS_FCST_FILTER_ATTR_THRESH} filter_attr_thresh = [>=25]; - + //${METPLUS_FCST_MERGE_THRESH} //${METPLUS_FCST_MERGE_FLAG} //${METPLUS_FCST_FILE_TYPE} diff --git a/internal/test_unit/config/PB2NCConfig_all b/internal/test_unit/config/PB2NCConfig_all index 2a59dffb72..38556ed057 100644 --- a/internal/test_unit/config/PB2NCConfig_all +++ b/internal/test_unit/config/PB2NCConfig_all @@ -91,7 +91,7 @@ obs_bufr_map = []; // Mapping of report_type (header_type) // message_type_map = []; - + //////////////////////////////////////////////////////////////////////////////// quality_mark_thresh = ${QUALITY_MARK_THRESH}; diff --git a/internal/test_unit/config/PB2NCConfig_vlevel b/internal/test_unit/config/PB2NCConfig_vlevel index edc686bb2c..305dbcc9ac 100644 --- a/internal/test_unit/config/PB2NCConfig_vlevel +++ b/internal/test_unit/config/PB2NCConfig_vlevel @@ -91,7 +91,7 @@ obs_bufr_map = []; // Mapping of report_type (header_type) // message_type_map = []; - + //////////////////////////////////////////////////////////////////////////////// quality_mark_thresh = ${QUALITY_MARK_THRESH}; diff --git a/internal/test_unit/config/PointStatConfig_APCP b/internal/test_unit/config/PointStatConfig_APCP index 7ae3c190f9..aaa91d7d3c 100644 --- a/internal/test_unit/config/PointStatConfig_APCP +++ b/internal/test_unit/config/PointStatConfig_APCP @@ -50,7 +50,7 @@ fcst = { sid_exc = []; obs_quality_inc = []; obs_quality_exc = []; - + field = [ { name = "${FCST_FIELD_NAME}"; @@ -146,7 +146,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_APCP_HIRA b/internal/test_unit/config/PointStatConfig_APCP_HIRA index 93da6f7b1a..8b6b6df1a0 100644 --- a/internal/test_unit/config/PointStatConfig_APCP_HIRA +++ b/internal/test_unit/config/PointStatConfig_APCP_HIRA @@ -148,7 +148,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_GTG_lc b/internal/test_unit/config/PointStatConfig_GTG_lc index 002e60a88f..20a3d4bbcf 100644 --- a/internal/test_unit/config/PointStatConfig_GTG_lc +++ b/internal/test_unit/config/PointStatConfig_GTG_lc @@ -175,7 +175,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_INTERP_OPTS b/internal/test_unit/config/PointStatConfig_INTERP_OPTS index 13e5aa6111..046cf45e9e 100644 --- a/internal/test_unit/config/PointStatConfig_INTERP_OPTS +++ b/internal/test_unit/config/PointStatConfig_INTERP_OPTS @@ -158,7 +158,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK b/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK index 1ce39872e2..d36e0c45b6 100644 --- a/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK +++ b/internal/test_unit/config/PointStatConfig_LAND_TOPO_MASK @@ -223,7 +223,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_LAPSE_RATE_MSL_AGL b/internal/test_unit/config/PointStatConfig_LAPSE_RATE_MSL_AGL index 2155a0954d..2c4c201aa2 100644 --- a/internal/test_unit/config/PointStatConfig_LAPSE_RATE_MSL_AGL +++ b/internal/test_unit/config/PointStatConfig_LAPSE_RATE_MSL_AGL @@ -248,7 +248,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_MASK_SID b/internal/test_unit/config/PointStatConfig_MASK_SID index 450a965381..6ac220012c 100644 --- a/internal/test_unit/config/PointStatConfig_MASK_SID +++ b/internal/test_unit/config/PointStatConfig_MASK_SID @@ -153,7 +153,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_MPR_OBTYPE b/internal/test_unit/config/PointStatConfig_MPR_OBTYPE index b77be64c5f..c79b61c2c5 100644 --- a/internal/test_unit/config/PointStatConfig_MPR_OBTYPE +++ b/internal/test_unit/config/PointStatConfig_MPR_OBTYPE @@ -164,7 +164,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_PHYS b/internal/test_unit/config/PointStatConfig_PHYS index 1713325236..75678c3c95 100644 --- a/internal/test_unit/config/PointStatConfig_PHYS +++ b/internal/test_unit/config/PointStatConfig_PHYS @@ -154,7 +154,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_PHYS_pint b/internal/test_unit/config/PointStatConfig_PHYS_pint index 34117748c7..398cb6a1f3 100644 --- a/internal/test_unit/config/PointStatConfig_PHYS_pint +++ b/internal/test_unit/config/PointStatConfig_PHYS_pint @@ -149,7 +149,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_SEEPS b/internal/test_unit/config/PointStatConfig_SEEPS index 37266d53c4..426a471b86 100644 --- a/internal/test_unit/config/PointStatConfig_SEEPS +++ b/internal/test_unit/config/PointStatConfig_SEEPS @@ -51,7 +51,7 @@ fcst = { sid_exc = []; obs_quality_inc = []; obs_quality_exc = []; - + field = [ { name = "${FCST_FIELD_NAME}"; @@ -148,7 +148,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_WINDS b/internal/test_unit/config/PointStatConfig_WINDS index 81eb6af979..cf89efffb2 100644 --- a/internal/test_unit/config/PointStatConfig_WINDS +++ b/internal/test_unit/config/PointStatConfig_WINDS @@ -173,7 +173,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_aeronet b/internal/test_unit/config/PointStatConfig_aeronet index fa15f4fb40..52d2be5910 100644 --- a/internal/test_unit/config/PointStatConfig_aeronet +++ b/internal/test_unit/config/PointStatConfig_aeronet @@ -62,7 +62,7 @@ obs = { sid_exc = []; obs_quality_inc = []; obs_quality_exc = []; - + field = [ { name = "AOD"; @@ -218,7 +218,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_airnow b/internal/test_unit/config/PointStatConfig_airnow index ea86acd238..255191db63 100644 --- a/internal/test_unit/config/PointStatConfig_airnow +++ b/internal/test_unit/config/PointStatConfig_airnow @@ -249,7 +249,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_climo b/internal/test_unit/config/PointStatConfig_climo index 3e49687c4c..937359df62 100644 --- a/internal/test_unit/config/PointStatConfig_climo +++ b/internal/test_unit/config/PointStatConfig_climo @@ -291,7 +291,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_climo_WMO b/internal/test_unit/config/PointStatConfig_climo_WMO index 476fbea105..bdf785aa31 100644 --- a/internal/test_unit/config/PointStatConfig_climo_WMO +++ b/internal/test_unit/config/PointStatConfig_climo_WMO @@ -236,7 +236,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_climo_prob b/internal/test_unit/config/PointStatConfig_climo_prob index 2f678dfae5..347111e58d 100644 --- a/internal/test_unit/config/PointStatConfig_climo_prob +++ b/internal/test_unit/config/PointStatConfig_climo_prob @@ -238,7 +238,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_dup b/internal/test_unit/config/PointStatConfig_dup index b97f32b5fc..e3ff3c6118 100644 --- a/internal/test_unit/config/PointStatConfig_dup +++ b/internal/test_unit/config/PointStatConfig_dup @@ -172,7 +172,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_mpr_thresh b/internal/test_unit/config/PointStatConfig_mpr_thresh index aa83d81494..f20c87564d 100644 --- a/internal/test_unit/config/PointStatConfig_mpr_thresh +++ b/internal/test_unit/config/PointStatConfig_mpr_thresh @@ -230,7 +230,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_obs_summary_all b/internal/test_unit/config/PointStatConfig_obs_summary_all index 5aa0f9ae61..1ffbaf3578 100644 --- a/internal/test_unit/config/PointStatConfig_obs_summary_all +++ b/internal/test_unit/config/PointStatConfig_obs_summary_all @@ -228,7 +228,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_prob b/internal/test_unit/config/PointStatConfig_prob index 92b987f218..57d507ae67 100644 --- a/internal/test_unit/config/PointStatConfig_prob +++ b/internal/test_unit/config/PointStatConfig_prob @@ -156,7 +156,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_python b/internal/test_unit/config/PointStatConfig_python index 2dfe15b64c..6f5e38895e 100644 --- a/internal/test_unit/config/PointStatConfig_python +++ b/internal/test_unit/config/PointStatConfig_python @@ -225,7 +225,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_qty_inc_exc b/internal/test_unit/config/PointStatConfig_qty_inc_exc index e8451ec9e4..22c08c154f 100644 --- a/internal/test_unit/config/PointStatConfig_qty_inc_exc +++ b/internal/test_unit/config/PointStatConfig_qty_inc_exc @@ -83,7 +83,7 @@ fcst = { obs_quality_exc = []; desc = "QTY_INC_UPA"; }, - + { name = "TMP"; level = [ "Z2" ]; @@ -215,7 +215,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_range_azimuth b/internal/test_unit/config/PointStatConfig_range_azimuth index 4150667d77..033e223b1a 100644 --- a/internal/test_unit/config/PointStatConfig_range_azimuth +++ b/internal/test_unit/config/PointStatConfig_range_azimuth @@ -281,9 +281,9 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// - + tmp_dir = "/tmp"; output_prefix = "${OUTPUT_PREFIX}"; diff --git a/internal/test_unit/config/PointStatConfig_sid_inc_exc b/internal/test_unit/config/PointStatConfig_sid_inc_exc index c419013f68..7c64eb36cc 100644 --- a/internal/test_unit/config/PointStatConfig_sid_inc_exc +++ b/internal/test_unit/config/PointStatConfig_sid_inc_exc @@ -162,7 +162,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag b/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag index ec7199c38d..0d7e489ba4 100644 --- a/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag +++ b/internal/test_unit/config/PointStatConfig_ugrid_mpas_diag @@ -165,7 +165,7 @@ ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_ugrid_mpas_out b/internal/test_unit/config/PointStatConfig_ugrid_mpas_out index d0be843fdf..2b5dc01bdf 100644 --- a/internal/test_unit/config/PointStatConfig_ugrid_mpas_out +++ b/internal/test_unit/config/PointStatConfig_ugrid_mpas_out @@ -165,7 +165,7 @@ ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PointStatConfig_ugrid_no_dataset b/internal/test_unit/config/PointStatConfig_ugrid_no_dataset index 095126b103..c5b2ae18ea 100644 --- a/internal/test_unit/config/PointStatConfig_ugrid_no_dataset +++ b/internal/test_unit/config/PointStatConfig_ugrid_no_dataset @@ -165,7 +165,7 @@ ugrid_coordinates_file = "${MET_TEST_INPUT}/ugrid_data/mpas/static.40962_reduced point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/STATAnalysisConfig_SFC_SS_Index b/internal/test_unit/config/STATAnalysisConfig_SFC_SS_Index index 5800a35a8b..15e0a682d0 100644 --- a/internal/test_unit/config/STATAnalysisConfig_SFC_SS_Index +++ b/internal/test_unit/config/STATAnalysisConfig_SFC_SS_Index @@ -71,7 +71,7 @@ alpha = []; line_type = [ "SL1L2" ]; column = [ "RMSE" ]; - + weight = [ 4.0, 3.0, 2.0, 1.0, 4.0, 3.0, 2.0, 1.0, 4.0, 3.0, 2.0, 1.0, diff --git a/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA b/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA index 629ad26e71..e007e68d31 100644 --- a/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA +++ b/internal/test_unit/config/ref_config/PointStatConfig_ADPUPA @@ -193,7 +193,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF b/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF index 7d42ecd91c..bc545d01d1 100644 --- a/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF +++ b/internal/test_unit/config/ref_config/PointStatConfig_ONLYSF @@ -203,7 +203,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/ref_config/PointStatConfig_WINDS b/internal/test_unit/config/ref_config/PointStatConfig_WINDS index 8d420252ba..6e4c2746c1 100644 --- a/internal/test_unit/config/ref_config/PointStatConfig_WINDS +++ b/internal/test_unit/config/ref_config/PointStatConfig_WINDS @@ -186,7 +186,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/scripts/config/PointStatConfig b/scripts/config/PointStatConfig index 50ad887f3b..b552cb79d0 100644 --- a/scripts/config/PointStatConfig +++ b/scripts/config/PointStatConfig @@ -271,7 +271,7 @@ output_flag = { point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; - + //////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; From fdb5d960d4056bd95e619bddf8076dda9b3f0506 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Fri, 15 May 2026 21:23:59 +0000 Subject: [PATCH 17/36] Per #3335, also update the Pair-Stat config files. --- internal/test_unit/config/PairStatConfig_ioda | 4 ++++ internal/test_unit/config/PairStatConfig_mpr | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/internal/test_unit/config/PairStatConfig_ioda b/internal/test_unit/config/PairStatConfig_ioda index 2ffa057062..227b1e80a0 100644 --- a/internal/test_unit/config/PairStatConfig_ioda +++ b/internal/test_unit/config/PairStatConfig_ioda @@ -234,6 +234,10 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; diff --git a/internal/test_unit/config/PairStatConfig_mpr b/internal/test_unit/config/PairStatConfig_mpr index 809b71f3fd..37c44b08d9 100644 --- a/internal/test_unit/config/PairStatConfig_mpr +++ b/internal/test_unit/config/PairStatConfig_mpr @@ -226,6 +226,10 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; + +//////////////////////////////////////////////////////////////////////////////// tmp_dir = "/tmp"; From 0a035d9313f686be8d1d71639b706d0d0269d8a6 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Tue, 19 May 2026 17:17:02 +0000 Subject: [PATCH 18/36] Per #3335, in compute_kde_weights() call angle_between() to get a longitude difference no larger than 180 degrees. --- src/basic/vx_util/point_weight.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 1b4d93f1e3..011c1e1648 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -184,7 +184,7 @@ void PointWeightInfo::compute_kde_weights() { for(int i=0; i Date: Tue, 19 May 2026 17:20:02 +0000 Subject: [PATCH 19/36] Unrelated to #3335, remove commented out reminder from compilation_options.yml since testing the compilation options on released versions has proven sufficient. I don't see a need to also test routinely through cron. --- .github/workflows/compilation_options.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/compilation_options.yml b/.github/workflows/compilation_options.yml index 2c9abfd639..8300b54ec0 100644 --- a/.github/workflows/compilation_options.yml +++ b/.github/workflows/compilation_options.yml @@ -4,14 +4,7 @@ name: Compilation Options on: - # Note that scheduled cron events are run on the default branch. - # Enable this schedule when main_v12.0 becomes the default branch. - - # schedule: - # - cron: '0 7 * * 0'' - push: - tags: - '**' From 4aa99ff096e8c362fd3ead2b296bf71d164c6ef8 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Tue, 19 May 2026 21:01:37 +0000 Subject: [PATCH 20/36] Per #3335, correct mistakes in the unit test configurations to mostly replicate previous outputs #ci-run-unit --- .../config/EnsembleStatConfig_grid_weight | 2 +- internal/test_unit/run.log | 506 ------------------ internal/test_unit/xml/unit_point_weight.xml | 8 +- 3 files changed, 5 insertions(+), 511 deletions(-) delete mode 100644 internal/test_unit/run.log diff --git a/internal/test_unit/config/EnsembleStatConfig_grid_weight b/internal/test_unit/config/EnsembleStatConfig_grid_weight index 415c4d4fcd..b27cfa4446 100644 --- a/internal/test_unit/config/EnsembleStatConfig_grid_weight +++ b/internal/test_unit/config/EnsembleStatConfig_grid_weight @@ -240,7 +240,7 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; +grid_weight_flag = ${GRID_WEIGHT}; point_weight_flag = NONE; kde_ref_angle = 0.75; write_weights = FALSE; diff --git a/internal/test_unit/run.log b/internal/test_unit/run.log deleted file mode 100644 index ca3e5c336e..0000000000 --- a/internal/test_unit/run.log +++ /dev/null @@ -1,506 +0,0 @@ -DEBUG 1: Start point_stat V13.0.0 by johnhg(6088) at 2026-05-15 18:01:14Z with command: /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_point_weight -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 7 -log run.log -DEBUG 2: Defaulting unset OMP_NUM_THREADS to use 1 of 40 available threads. Recommend setting OMP_NUM_THREADS for faster runtimes. -DEBUG 2: OpenMP running on 1 thread(s). -DEBUG 1: Default Config File: /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/share/met/config/PointStatConfig_default -DEBUG 1: User Config File: /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_point_weight -DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new Met2dDataFile object of type "FileType_Gb2". -DEBUG 4: Switching the GRIB2 radius of the earth value of 6371.23 km to 6371.2 km for internal consistency. -DEBUG 4: -DEBUG 4: Lambert Conformal Grid Data: -DEBUG 4: hemisphere: N -DEBUG 4: scale_lat_1: 25 -DEBUG 4: scale_lat_2: 25 -DEBUG 4: lat_pin: 12.19 -DEBUG 4: lon_pin: 133.459 -DEBUG 4: x_pin: 0 -DEBUG 4: y_pin: 0 -DEBUG 4: lon_orient: 95 -DEBUG 4: d_km: 40.635 -DEBUG 4: r_km: 6371.2 -DEBUG 4: nx: 185 -DEBUG 4: ny: 129 -DEBUG 4: so2_angle: 0 -DEBUG 4: -DEBUG 4: MetGrib2DataFile::read_grib2_record_list() - processed 70 records from GRIB2 file: /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 -DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". -DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". -DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb1". -DEBUG 3: -DEBUG 3: Multiple GRIB2 table entries match lookup criteria (parm_name = TMP): -DEBUG 3: parm_name: TMP, index_a = 0, grib2_mtab = 1, grib2_cntr = 0, grib2_ltab = 0, index_b = 0, index_c = 0 -DEBUG 3: parm_name: TMP, index_a = 0, grib2_mtab = 1, grib2_cntr = 7, grib2_ltab = 1, index_b = 0, index_c = 0 -DEBUG 3: Using the first match found: parm_name: TMP, index_a = 0, grib2_mtab = 1, grib2_cntr = 0, grib2_ltab = 0, index_b = 0, index_c = 0 -DEBUG 3: -DEBUG 5: Parsed forecast field: -DEBUG 5: Parsed observation field: -DEBUG 5: Parsed thresholds: -DEBUG 5: Matched pair filter columns: (nul) -DEBUG 5: Matched pair filter thresholds: NA -DEBUG 5: Forecast categorical thresholds: >273,>283 -DEBUG 5: Observed categorical thresholds: >273,>283 -DEBUG 5: Forecast continuous thresholds: NA -DEBUG 5: Observed continuous thresholds: NA -DEBUG 5: Continuous threshold logic: UNION -DEBUG 5: Forecast wind speed thresholds: NA -DEBUG 5: Observed wind speed thresholds: NA -DEBUG 5: Wind speed threshold logic: UNION -DEBUG 4: ClimoCDFInfo::set_cdf_ta() -> Since "cdf_bins" = 1, no climatology CDF bins will be applied. -DEBUG 4: parse_conf_sid_list() -> Station ID "sid_inc" list contains 0 entries. -DEBUG 4: parse_conf_sid_list() -> Station ID "sid_exc" list contains 0 entries. -DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". -DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". -DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb1". -DEBUG 5: Parsed forecast field: -DEBUG 5: Parsed observation field: -DEBUG 5: Parsed thresholds: -DEBUG 5: Matched pair filter columns: (nul) -DEBUG 5: Matched pair filter thresholds: NA -DEBUG 5: Forecast categorical thresholds: >5 -DEBUG 5: Observed categorical thresholds: >5 -DEBUG 5: Forecast continuous thresholds: NA -DEBUG 5: Observed continuous thresholds: NA -DEBUG 5: Continuous threshold logic: UNION -DEBUG 5: Forecast wind speed thresholds: NA -DEBUG 5: Observed wind speed thresholds: NA -DEBUG 5: Wind speed threshold logic: UNION -DEBUG 4: ClimoCDFInfo::set_cdf_ta() -> Since "cdf_bins" = 1, no climatology CDF bins will be applied. -DEBUG 4: parse_conf_sid_list() -> Station ID "sid_inc" list contains 0 entries. -DEBUG 4: parse_conf_sid_list() -> Station ID "sid_exc" list contains 0 entries. -DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". -DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb2". -DEBUG 4: VarInfoFactory::new_var_info() -> created new VarInfo object of type "FileType_Gb1". -DEBUG 5: Parsed forecast field: -DEBUG 5: Parsed observation field: -DEBUG 5: Parsed thresholds: -DEBUG 5: Matched pair filter columns: (nul) -DEBUG 5: Matched pair filter thresholds: NA -DEBUG 5: Forecast categorical thresholds: >5 -DEBUG 5: Observed categorical thresholds: >5 -DEBUG 5: Forecast continuous thresholds: NA -DEBUG 5: Observed continuous thresholds: NA -DEBUG 5: Continuous threshold logic: UNION -DEBUG 5: Forecast wind speed thresholds: NA -DEBUG 5: Observed wind speed thresholds: NA -DEBUG 5: Wind speed threshold logic: UNION -DEBUG 4: ClimoCDFInfo::set_cdf_ta() -> Since "cdf_bins" = 1, no climatology CDF bins will be applied. -DEBUG 4: parse_conf_sid_list() -> Station ID "sid_inc" list contains 0 entries. -DEBUG 4: parse_conf_sid_list() -> Station ID "sid_exc" list contains 0 entries. -DEBUG 3: U-wind field array entry 2 matches V-wind field array entry 3. -DEBUG 3: V-wind field array entry 3 matches U-wind field array entry 2. -DEBUG 1: Forecast File: /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 -DEBUG 1: Observation File: /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc -DEBUG 3: MetGrib2DataFile::data_plane_array() -> Found exact match for "TMP/P850" in GRIB2 record 39 field 1 of GRIB2 file "/d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2" -DEBUG 4: -DEBUG 4: Data plane information: -DEBUG 4: plane min: 256.3 -DEBUG 4: plane max: 294.4 -DEBUG 4: scan mode: 64 -DEBUG 4: valid time: 20120409_120000 -DEBUG 4: lead time: 150000 -DEBUG 4: init time: 20120408_210000 -DEBUG 4: bitmap flag: 255 -DEBUG 4: -DEBUG 4: -DEBUG 4: Grid information: -DEBUG 4: Projection: Lambert Conformal -DEBUG 4: Nx: 185 -DEBUG 4: Ny: 129 -DEBUG 4: Lat_LL: 12.190 -DEBUG 4: Lon_LL: 133.459 -DEBUG 4: Lon_orient: 95.000 -DEBUG 4: Alpha: 406.820 -DEBUG 4: Cone: 0.423 -DEBUG 4: Bx: 104.0012 -DEBUG 4: By: 356.7313 -DEBUG 4: -DEBUG 4: Data plane information: -DEBUG 4: plane min: 256.3 -DEBUG 4: plane max: 294.4 -DEBUG 4: valid time: 20120409_120000 -DEBUG 4: lead time: 150000 -DEBUG 4: init time: 20120408_210000 -DEBUG 4: accum time: 000000 -DEBUG 4: -DEBUG 2: -DEBUG 2: -------------------------------------------------------------------------------- -DEBUG 2: -DEBUG 2: Reading data for TMP/P850. -DEBUG 2: Using the forecast grid as the verification grid -DEBUG 3: Grid Definition: Projection: Lambert Conformal Nx: 185 Ny: 129 Lat_LL: 12.190 Lon_LL: 133.459 Lon_orient: 95.000 Alpha: 406.820 Cone: 0.423 Bx: 104.0012 By: 356.7313 -DEBUG 2: Processing masking regions. -DEBUG 3: Processing grid mask: FULL -DEBUG 4: parse_grid_mask() -> parsing grid mask "FULL" -DEBUG 2: For TMP/P850, found 1 forecast levels, 0 forecast climatology mean and 0 standard deviation level(s), and 0 observation climatology mean and 0 standard deviation level(s). -DEBUG 3: MetGrib2DataFile::data_plane_array() -> Found exact match for "UGRD/P850" in GRIB2 record 4 field 1 of GRIB2 file "/d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2" -DEBUG 4: -DEBUG 4: Data plane information: -DEBUG 4: plane min: -18.8 -DEBUG 4: plane max: 22.7 -DEBUG 4: scan mode: 64 -DEBUG 4: valid time: 20120409_120000 -DEBUG 4: lead time: 150000 -DEBUG 4: init time: 20120408_210000 -DEBUG 4: bitmap flag: 255 -DEBUG 4: -DEBUG 4: -DEBUG 4: Data plane information: -DEBUG 4: plane min: -17.4 -DEBUG 4: plane max: 21.8 -DEBUG 4: scan mode: 64 -DEBUG 4: valid time: 20120409_120000 -DEBUG 4: lead time: 150000 -DEBUG 4: init time: 20120408_210000 -DEBUG 4: bitmap flag: 255 -DEBUG 4: -DEBUG 3: MetGrib2DataFile::check_uv_rotation() -> Found pair match "VGRD/P850" in GRIB2 record 10 field 1 -DEBUG 3: Rotating U and V wind components from grid-relative to earth-relative. -DEBUG 4: -DEBUG 4: Grid information: -DEBUG 4: Projection: Lambert Conformal -DEBUG 4: Nx: 185 -DEBUG 4: Ny: 129 -DEBUG 4: Lat_LL: 12.190 -DEBUG 4: Lon_LL: 133.459 -DEBUG 4: Lon_orient: 95.000 -DEBUG 4: Alpha: 406.820 -DEBUG 4: Cone: 0.423 -DEBUG 4: Bx: 104.0012 -DEBUG 4: By: 356.7313 -DEBUG 4: -DEBUG 4: Data plane information: -DEBUG 4: plane min: -17.6582 -DEBUG 4: plane max: 20.8246 -DEBUG 4: valid time: 20120409_120000 -DEBUG 4: lead time: 150000 -DEBUG 4: init time: 20120408_210000 -DEBUG 4: accum time: 000000 -DEBUG 4: -DEBUG 2: -DEBUG 2: -------------------------------------------------------------------------------- -DEBUG 2: -DEBUG 2: Reading data for UGRD/P850. -DEBUG 2: For UGRD/P850, found 1 forecast levels, 0 forecast climatology mean and 0 standard deviation level(s), and 0 observation climatology mean and 0 standard deviation level(s). -DEBUG 3: MetGrib2DataFile::data_plane_array() -> Found exact match for "VGRD/P850" in GRIB2 record 10 field 1 of GRIB2 file "/d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2" -DEBUG 4: -DEBUG 4: Data plane information: -DEBUG 4: plane min: -17.4 -DEBUG 4: plane max: 21.8 -DEBUG 4: scan mode: 64 -DEBUG 4: valid time: 20120409_120000 -DEBUG 4: lead time: 150000 -DEBUG 4: init time: 20120408_210000 -DEBUG 4: bitmap flag: 255 -DEBUG 4: -DEBUG 4: -DEBUG 4: Data plane information: -DEBUG 4: plane min: -18.8 -DEBUG 4: plane max: 22.7 -DEBUG 4: scan mode: 64 -DEBUG 4: valid time: 20120409_120000 -DEBUG 4: lead time: 150000 -DEBUG 4: init time: 20120408_210000 -DEBUG 4: bitmap flag: 255 -DEBUG 4: -DEBUG 3: MetGrib2DataFile::check_uv_rotation() -> Found pair match "UGRD/P850" in GRIB2 record 4 field 1 -DEBUG 3: Rotating U and V wind components from grid-relative to earth-relative. -DEBUG 4: -DEBUG 4: Grid information: -DEBUG 4: Projection: Lambert Conformal -DEBUG 4: Nx: 185 -DEBUG 4: Ny: 129 -DEBUG 4: Lat_LL: 12.190 -DEBUG 4: Lon_LL: 133.459 -DEBUG 4: Lon_orient: 95.000 -DEBUG 4: Alpha: 406.820 -DEBUG 4: Cone: 0.423 -DEBUG 4: Bx: 104.0012 -DEBUG 4: By: 356.7313 -DEBUG 4: -DEBUG 4: Data plane information: -DEBUG 4: plane min: -17.2597 -DEBUG 4: plane max: 21.4671 -DEBUG 4: valid time: 20120409_120000 -DEBUG 4: lead time: 150000 -DEBUG 4: init time: 20120408_210000 -DEBUG 4: accum time: 000000 -DEBUG 4: -DEBUG 2: -DEBUG 2: -------------------------------------------------------------------------------- -DEBUG 2: -DEBUG 2: Reading data for VGRD/P850. -DEBUG 2: For VGRD/P850, found 1 forecast levels, 0 forecast climatology mean and 0 standard deviation level(s), and 0 observation climatology mean and 0 standard deviation level(s). -DEBUG 2: -DEBUG 2: -------------------------------------------------------------------------------- -DEBUG 2: -DEBUG 7: update_missing_values(T) hdr_typ(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [0 - 6] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000234 seconds -DEBUG 7: update_missing_values(T) hdr_sid(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [0 - 3546] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.00025 seconds -DEBUG 7: update_missing_values(T) hdr_vld(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [0 - 60] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000193 seconds -DEBUG 7: update_missing_values(T) hdr_lat(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [15.1 - 61.13] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000379 seconds -DEBUG 7: update_missing_values(T) hdr_lon(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [-147.27 - -50.03] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000377 seconds -DEBUG 7: update_missing_values(T) hdr_elv(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [0 - 12497] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000374 seconds -DEBUG 7: update_missing_values(T) hdr_prpt_typ(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [120 - 287] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000204 seconds -DEBUG 7: update_missing_values(T) hdr_irpt_typ(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [11 - 562] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000191 seconds -DEBUG 7: update_missing_values(T) hdr_inst_typ(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [49 - 111] Positive count: 0 -DEBUG 3: update_missing_values(T) hdr_inst_typ(data_type=i): found 11157 FillValues out of 11370 -DEBUG 7: update_missing_values(T) took 0.00025 seconds -DEBUG 3: Processing each "obs.field" name as a GRIB code abbreviation since the point observations are specified as GRIB codes. -DEBUG 2: Searching 120275 observations from 11370 messages. -DEBUG 7: update_missing_values(T) obs_hid(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [0 - 109] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000299 seconds -DEBUG 7: update_missing_values(T) obs_vid(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [0 - 8] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000292 seconds -DEBUG 7: update_missing_values(T) obs_lvl(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [4.8 - 1019] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000812 seconds -DEBUG 7: update_missing_values(T) obs_hgt(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [-45.104 - 35223.4] Positive count: 0 -DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 17267 FillValues out of 32768 -DEBUG 7: update_missing_values(T) took 0.000791 seconds -DEBUG 7: update_missing_values(T) obs_val(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [-45 - 35290] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000806 seconds -DEBUG 7: update_missing_values(T) obs_hid(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [109 - 279] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000338 seconds -DEBUG 7: update_missing_values(T) obs_vid(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [0 - 8] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000291 seconds -DEBUG 7: update_missing_values(T) obs_lvl(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [5.8 - 1021] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000813 seconds -DEBUG 7: update_missing_values(T) obs_hgt(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [-33.0859 - 34051.8] Positive count: 0 -DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 15923 FillValues out of 32768 -DEBUG 7: update_missing_values(T) took 0.000787 seconds -DEBUG 7: update_missing_values(T) obs_val(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [-33.4 - 34138] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000845 seconds -DEBUG 7: update_missing_values(T) obs_hid(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [279 - 6217] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000363 seconds -DEBUG 7: update_missing_values(T) obs_vid(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [0 - 9] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000291 seconds -DEBUG 7: update_missing_values(T) obs_lvl(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [72.2 - 1031.4] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000821 seconds -DEBUG 7: update_missing_values(T) obs_hgt(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [0 - 18221.9] Positive count: 0 -DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 8394 FillValues out of 32768 -DEBUG 7: update_missing_values(T) took 0.000856 seconds -DEBUG 7: update_missing_values(T) obs_val(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [-29.2 - 18247] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000812 seconds -DEBUG 7: update_missing_values(T) obs_hid(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [6218 - 11369] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000305 seconds -DEBUG 7: update_missing_values(T) obs_vid(data_type=i): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [0 - 9] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.00024 seconds -DEBUG 7: update_missing_values(T) obs_lvl(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [267.3 - 1025.2] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000608 seconds -DEBUG 7: update_missing_values(T) obs_hgt(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [0 - 9974.01] Positive count: 0 -DEBUG 3: update_missing_values(T) obs_hgt(data_type=f): found 7476 FillValues out of 21971 -DEBUG 7: update_missing_values(T) took 0.000632 seconds -DEBUG 7: update_missing_values(T) obs_val(data_type=f): FillValue()=-9999 -DEBUG 7: update_missing_values(T) data range [-19.8 - 9999] Positive count: 0 -DEBUG 7: update_missing_values(T) took 0.000589 seconds -DEBUG 3: Computing KDE point weights using 97 observation locations. -DEBUG 7: Computed KDE weights for 97 observation locations: -DEBUG 7: [1] 72206 (30.48, 81.7) 148044 -DEBUG 7: [2] 72520 (40.53, 80.22) 1.59236e+06 -DEBUG 7: [3] 72597 (42.38, 122.88) 90166.5 -DEBUG 7: [4] 72518 (42.69, 73.83) 1922.58 -DEBUG 7: [5] 71600 (43.93, 60.02) 1.26723e+18 -DEBUG 7: [6] 71722 (46.3, 76) 4.20218e+13 -DEBUG 7: [7] 72764 (46.77, 100.76) 406501 -DEBUG 7: [8] 71836 (51.27, 80.65) 5.8257e+35 -DEBUG 7: [9] 71908 (53.9, 122.8) 6.21297e+18 -DEBUG 7: [10] 71867 (53.97, 101.1) 1.29969e+40 -DEBUG 7: [11] 71913 (58.75, 94.07) 5.09449e+52 -DEBUG 7: [12] 71945 (58.83, 122.6) 6.25449e+18 -DEBUG 7: [13] 72250 (25.92, 97.42) 475.528 -DEBUG 7: [14] 72208 (32.89, 80.03) 4.14362e+06 -DEBUG 7: [15] 72632 (42.7, 83.47) 94867.6 -DEBUG 7: [16] 74001 (34.6, 86.62) 29.0663 -DEBUG 7: [17] 72403 (38.98, 77.49) 54.93 -DEBUG 7: [18] 72572 (40.77, 111.95) 1.53258e+11 -DEBUG 7: [19] 72662 (44.07, 103.21) 1.73933e+10 -DEBUG 7: [20] 72712 (46.87, 68.01) 5.03064e+09 -DEBUG 7: [21] 71845 (51.45, 90.2) 2.26251e+14 -DEBUG 7: [22] 76644 (20.98, 89.65) 1.13331e+06 -DEBUG 7: [23] 76595 (21.02, 86.85) 1.13331e+06 -DEBUG 7: [24] 72201 (24.55, 81.79) 462.785 -DEBUG 7: [25] 76225 (28.63, 106.08) 2.52213e+08 -DEBUG 7: [26] 72230 (33.18, 86.78) 37.4944 -DEBUG 7: [27] 72388 (36.05, 115.18) 2.36721e+08 -DEBUG 7: [28] 72318 (37.21, 80.41) 13.2383 -DEBUG 7: [29] 72440 (37.24, 93.4) 255152 -DEBUG 7: [30] 72528 (42.94, 78.72) 1.66529e+06 -DEBUG 7: [31] 72645 (44.5, 88.11) 9.99018e+08 -DEBUG 7: [32] 72776 (47.46, 111.39) 8.46777e+17 -DEBUG 7: [33] 71934 (60.02, 111.93) 9.02764e+35 -DEBUG 7: [34] 72393 (34.75, 120.57) 1.00925e+09 -DEBUG 7: [35] 72305 (34.78, 76.88) 2.99635e+08 -DEBUG 7: [36] 72493 (37.74, 122.22) 1.01032e+09 -DEBUG 7: [37] 72456 (39.07, 95.63) 21279.4 -DEBUG 7: [38] 72476 (39.12, 108.52) 1.53258e+11 -DEBUG 7: [39] 72426 (39.42, 83.82) 2.51016e+08 -DEBUG 7: [40] 72501 (40.87, 72.86) 1922.19 -DEBUG 7: [41] 72649 (44.85, 93.56) 4.43333e+10 -DEBUG 7: [42] 72786 (47.68, 117.63) 2.49635e+06 -DEBUG 7: [43] 72261 (29.37, 100.92) 2.21128e+06 -DEBUG 7: [44] 72364 (31.87, 106.7) 2.52213e+08 -DEBUG 7: [45] 72340 (34.84, 92.26) 249641 -DEBUG 7: [46] 72317 (36.1, 79.94) 13.2383 -DEBUG 7: [47] 72451 (37.76, 99.97) 1.87686e+07 -DEBUG 7: [48] 74002 (39.47, 76.07) 38.6317 -DEBUG 7: [49] 72562 (41.13, 100.7) 1.50651e+09 -DEBUG 7: [50] 72681 (43.57, 116.21) 3.9706e+14 -DEBUG 7: [51] 72694 (44.91, 123.01) 90156.2 -DEBUG 7: [52] 72634 (44.91, 84.72) 94894.5 -DEBUG 7: [53] 76743 (17.98, 92.93) 1.79904e+15 -DEBUG 7: [54] 72558 (41.32, 96.37) 21451 -DEBUG 7: [55] 72797 (47.93, 124.56) 7.8738e+08 -DEBUG 7: [56] 71203 (49.95, 119.4) 2.49635e+06 -DEBUG 7: [57] 70398 (55.05, 131.59) 3.11717e+28 -DEBUG 7: [58] 78073 (25.05, 77.47) 8.45729e+06 -DEBUG 7: [59] 72210 (27.71, 82.4) 751313 -DEBUG 7: [60] 72251 (27.78, 97.51) 475.708 -DEBUG 7: [61] 72240 (30.13, 93.22) 28340.8 -DEBUG 7: [62] 72265 (31.94, 102.19) 2.19788e+06 -DEBUG 7: [63] 72327 (36.25, 86.56) 127.282 -DEBUG 7: [64] 72768 (48.21, 106.63) 8.46738e+17 -DEBUG 7: [65] 74455 (41.61, 90.58) 680.646 -DEBUG 7: [66] 71603 (43.87, 66.1) 5.82415e+09 -DEBUG 7: [67] 72659 (45.45, 98.41) 406510 -DEBUG 7: [68] 71811 (50.22, 66.27) 1.00515e+11 -DEBUG 7: [69] 71816 (53.3, 60.37) 8.34773e+19 -DEBUG 7: [70] 76458 (23.2, 106.42) 7.14351e+22 -DEBUG 7: [71] 72202 (25.76, 80.38) 462.586 -DEBUG 7: [72] 72274 (32.23, 110.96) 2.71185e+09 -DEBUG 7: [73] 72235 (32.32, 90.08) 1188.8 -DEBUG 7: [74] 78016 (32.37, 64.68) 1.43854e+88 -DEBUG 7: [75] 72402 (37.93, 75.47) 126.907 -DEBUG 7: [76] 71815 (48.55, 58.57) 1.24828e+18 -DEBUG 7: [77] 72747 (48.56, 93.4) 4.43271e+10 -DEBUG 7: [78] 71119 (53.55, 114.1) 4.92907e+31 -DEBUG 7: [79] 78526 (18.43, 65.99) 12.5063 -DEBUG 7: [80] 72248 (32.45, 93.84) 27977 -DEBUG 7: [81] 72215 (33.36, 84.57) 5070.04 -DEBUG 7: [82] 72357 (35.18, 97.44) 17487.5 -DEBUG 7: [83] 74560 (40.15, 89.34) 680.646 -DEBUG 7: [84] 74494 (41.66, 69.96) 8101.89 -DEBUG 7: [85] 74389 (43.89, 70.26) 8108.84 -DEBUG 7: [86] 71906 (58.1, 68.42) 7.764e+35 -DEBUG 7: [87] ASDE04 (19.2, 66.9) 12.5063 -DEBUG 7: [88] 76394 (25.87, 100.23) 1.24933e+06 -DEBUG 7: [89] 72233 (30.34, 89.83) 1188.81 -DEBUG 7: [90] 72214 (30.45, 84.3) 159157 -DEBUG 7: [91] 72249 (32.84, 97.3) 17487.4 -DEBUG 7: [92] 72293 (32.85, 117.12) 515408 -DEBUG 7: [93] 74004 (32.85, 114.4) 514199 -DEBUG 7: [94] 72363 (35.23, 101.71) 1.80328e+07 -DEBUG 7: [95] 71109 (50.68, 127.37) 8.61557e+11 -DEBUG 7: [96] 71823 (53.75, 73.67) 1.64475e+32 -DEBUG 7: [97] 71907 (58.47, 78.08) 1.6451e+32 -DEBUG 4: Applying KDE point weights computed using 97 observation locations. -DEBUG 4: Applying KDE point weights computed using 97 observation locations. -DEBUG 4: Applying KDE point weights computed using 97 observation locations. -DEBUG 2: -DEBUG 2: -------------------------------------------------------------------------------- -DEBUG 2: -DEBUG 2: Processing TMP/P850 versus TMP/P850, for observation type ADPUPA, over region FULL, for interpolation method NEAREST(1), using 97 matched pairs. -DEBUG 3: Number of matched pairs = 97 -DEBUG 3: Observations processed = 120275 -DEBUG 3: Rejected: station id = 0 -DEBUG 3: Rejected: obs var name = 107223 -DEBUG 3: Rejected: valid time = 0 -DEBUG 3: Rejected: bad obs value = 0 -DEBUG 3: Rejected: off the grid = 5 -DEBUG 3: Rejected: topography = 0 -DEBUG 3: Rejected: level mismatch = 12950 -DEBUG 3: Rejected: quality marker = 0 -DEBUG 3: Rejected: message type = 0 -DEBUG 3: Rejected: masking region = 0 -DEBUG 3: Rejected: bad fcst value = 0 -DEBUG 3: Rejected: bad climo mean = 0 -DEBUG 3: Rejected: bad climo stdev = 0 -DEBUG 3: Rejected: mpr filter = 0 -DEBUG 3: Rejected: duplicates = 0 -DEBUG 2: Computing Categorical Statistics. -DEBUG 2: Computing Multi-Category Statistics. -DEBUG 2: Computing Scalar Partial Sums and Continuous Statistics. -DEBUG 2: -DEBUG 2: -------------------------------------------------------------------------------- -DEBUG 2: -DEBUG 2: Processing UGRD/P850 versus UGRD/P850, for observation type ADPUPA, over region FULL, for interpolation method NEAREST(1), using 96 matched pairs. -DEBUG 3: Number of matched pairs = 96 -DEBUG 3: Observations processed = 120275 -DEBUG 3: Rejected: station id = 0 -DEBUG 3: Rejected: obs var name = 106252 -DEBUG 3: Rejected: valid time = 0 -DEBUG 3: Rejected: bad obs value = 0 -DEBUG 3: Rejected: off the grid = 5 -DEBUG 3: Rejected: topography = 0 -DEBUG 3: Rejected: level mismatch = 13921 -DEBUG 3: Rejected: quality marker = 0 -DEBUG 3: Rejected: message type = 1 -DEBUG 3: Rejected: masking region = 0 -DEBUG 3: Rejected: bad fcst value = 0 -DEBUG 3: Rejected: bad climo mean = 0 -DEBUG 3: Rejected: bad climo stdev = 0 -DEBUG 3: Rejected: mpr filter = 0 -DEBUG 3: Rejected: duplicates = 0 -DEBUG 2: Computing Categorical Statistics. -DEBUG 2: Computing Scalar Partial Sums and Continuous Statistics. -DEBUG 2: -DEBUG 2: -------------------------------------------------------------------------------- -DEBUG 2: -DEBUG 2: Processing VGRD/P850 versus VGRD/P850, for observation type ADPUPA, over region FULL, for interpolation method NEAREST(1), using 96 matched pairs. -DEBUG 3: Number of matched pairs = 96 -DEBUG 3: Observations processed = 120275 -DEBUG 3: Rejected: station id = 0 -DEBUG 3: Rejected: obs var name = 106252 -DEBUG 3: Rejected: valid time = 0 -DEBUG 3: Rejected: bad obs value = 0 -DEBUG 3: Rejected: off the grid = 5 -DEBUG 3: Rejected: topography = 0 -DEBUG 3: Rejected: level mismatch = 13921 -DEBUG 3: Rejected: quality marker = 0 -DEBUG 3: Rejected: message type = 1 -DEBUG 3: Rejected: masking region = 0 -DEBUG 3: Rejected: bad fcst value = 0 -DEBUG 3: Rejected: bad climo mean = 0 -DEBUG 3: Rejected: bad climo stdev = 0 -DEBUG 3: Rejected: mpr filter = 0 -DEBUG 3: Rejected: duplicates = 0 -DEBUG 2: Computing Categorical Statistics. -DEBUG 2: Computing Scalar Partial Sums and Continuous Statistics. -DEBUG 2: Computing Vector Partial Sums and Continuous Vector Statistics. -DEBUG 2: -DEBUG 2: -------------------------------------------------------------------------------- -DEBUG 2: -DEBUG 1: Output file: /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight/point_stat_KDE_WEIGHT_150000L_20120409_120000V.stat -DEBUG 1: Finish point_stat V13.0.0 by johnhg(6088) at 2026-05-15 18:01:19Z diff --git a/internal/test_unit/xml/unit_point_weight.xml b/internal/test_unit/xml/unit_point_weight.xml index 9e8d523dbd..d55abe7a06 100644 --- a/internal/test_unit/xml/unit_point_weight.xml +++ b/internal/test_unit/xml/unit_point_weight.xml @@ -24,7 +24,7 @@ OUTPUT_PREFIX NO_WEIGHT DESC NO_WEIGHT POINT_WEIGHT NONE - MASK_GRID "FULL" + MASK_GRID MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPUPA_ELEV.txt" \ @@ -106,7 +106,7 @@ OUTPUT_PREFIX PROB_SID_WEIGHT DESC SID_WEIGHT POINT_WEIGHT SID - MASK_GRID + MASK_GRID "FULL" MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPUPA_ELEV.txt" \ @@ -146,8 +146,8 @@ OUTPUT_PREFIX NO_WEIGHT DESC NO_WEIGHT POINT_WEIGHT NONE - MASK_GRID "FULL" - MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPUPA_ELEV.txt" + MASK_GRID + MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPSFC_ELEV.txt" \ 6 \ From 657be1f6a6267b9b093f533f677cb0a564d37b52 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Mon, 13 Jul 2026 20:19:05 +0000 Subject: [PATCH 21/36] Delete script accidentally committed. --- internal/test_unit/unit_point_weight.sh | 171 ------------------------ 1 file changed, 171 deletions(-) delete mode 100644 internal/test_unit/unit_point_weight.sh diff --git a/internal/test_unit/unit_point_weight.sh b/internal/test_unit/unit_point_weight.sh deleted file mode 100644 index c1141a4f16..0000000000 --- a/internal/test_unit/unit_point_weight.sh +++ /dev/null @@ -1,171 +0,0 @@ -export 'DESC=NO_WEIGHT' -export 'MASK_GRID="FULL"' -export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPUPA_ELEV.txt"' -export 'OUTPUT_PREFIX=NO_WEIGHT' -export 'POINT_WEIGHT=NONE' -/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_point_weight \ - -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 -unset DESC -unset MASK_GRID -unset MASK_SID -unset OUTPUT_PREFIX -unset POINT_WEIGHT - - -export 'DESC=SID_WEIGHT' -export 'MASK_GRID=' -export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPUPA_ELEV.txt"' -export 'OUTPUT_PREFIX=SID_WEIGHT' -export 'POINT_WEIGHT=SID' -/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_point_weight \ - -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 -unset DESC -unset MASK_GRID -unset MASK_SID -unset OUTPUT_PREFIX -unset POINT_WEIGHT - - -export 'DESC=KDE_WEIGHT' -export 'MASK_GRID="FULL"' -export 'MASK_SID=' -export 'OUTPUT_PREFIX=KDE_WEIGHT' -export 'POINT_WEIGHT=KDE' -/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_mn/sref_mean_2012040821_F015.grib2 \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_point_weight \ - -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 -unset DESC -unset MASK_GRID -unset MASK_SID -unset OUTPUT_PREFIX -unset POINT_WEIGHT - - -export 'DESC=NO_WEIGHT' -export 'MASK_GRID="FULL"' -export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPUPA_ELEV.txt"' -export 'OUTPUT_PREFIX=PROB_NO_WEIGHT' -export 'POINT_WEIGHT=NONE' -/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_pr/sref_prob_2012040821_F015.grib2 \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_prob_point_weight \ - -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 -unset DESC -unset MASK_GRID -unset MASK_SID -unset OUTPUT_PREFIX -unset POINT_WEIGHT - - -export 'DESC=SID_WEIGHT' -export 'MASK_GRID=' -export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPUPA_ELEV.txt"' -export 'OUTPUT_PREFIX=PROB_SID_WEIGHT' -export 'POINT_WEIGHT=SID' -/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_pr/sref_prob_2012040821_F015.grib2 \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_prob_point_weight \ - -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 -unset DESC -unset MASK_GRID -unset MASK_SID -unset OUTPUT_PREFIX -unset POINT_WEIGHT - - -export 'DESC=KDE_WEIGHT' -export 'MASK_GRID="FULL"' -export 'MASK_SID=' -export 'OUTPUT_PREFIX=PROB_KDE_WEIGHT' -export 'POINT_WEIGHT=KDE' -/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/point_stat \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib2/sref_pr/sref_prob_2012040821_F015.grib2 \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/pb2nc/gdas1.20120409.t12z.prepbufr.nc \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/PointStatConfig_prob_point_weight \ - -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 -unset DESC -unset MASK_GRID -unset MASK_SID -unset OUTPUT_PREFIX -unset POINT_WEIGHT - - -export 'DESC=NO_WEIGHT' -export 'MASK_GRID="FULL"' -export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPUPA_ELEV.txt"' -export 'OUTPUT_PREFIX=NO_WEIGHT' -export 'POINT_WEIGHT=NONE' -/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/ensemble_stat \ - 6 \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/EnsembleStatConfig_point_weight \ - -point_obs /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/ascii2nc/gauge_2012041012_24hr.nc \ - -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 -unset DESC -unset MASK_GRID -unset MASK_SID -unset OUTPUT_PREFIX -unset POINT_WEIGHT - - -export 'DESC=SID_WEIGHT' -export 'MASK_GRID=' -export 'MASK_SID="${MET_TEST_BASE}/config/SID_CONUS_ADPSFC_ELEV.txt"' -export 'OUTPUT_PREFIX=SID_WEIGHT' -export 'POINT_WEIGHT=SID' -/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/ensemble_stat \ - 6 \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/EnsembleStatConfig_point_weight \ - -point_obs /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/ascii2nc/gauge_2012041012_24hr.nc \ - -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 -unset DESC -unset MASK_GRID -unset MASK_SID -unset OUTPUT_PREFIX -unset POINT_WEIGHT - - -export 'DESC=KDE_WEIGHT' -export 'MASK_GRID="FULL"' -export 'MASK_SID=' -export 'OUTPUT_PREFIX=KDE_WEIGHT' -export 'POINT_WEIGHT=KDE' -/d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../share/met/../../bin/ensemble_stat \ - 6 \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep1/arw-fer-gep1_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-fer-gep5/arw-fer-gep5_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep2/arw-sch-gep2_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-sch-gep6/arw-sch-gep6_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep3/arw-tom-gep3_2012040912_F024.grib \ - /d1/projects/MET/MET_test_data/unit_test/model_data/grib1/arw-tom-gep7/arw-tom-gep7_2012040912_F024.grib \ - /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/config/EnsembleStatConfig_point_weight \ - -point_obs /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/ascii2nc/gauge_2012041012_24hr.nc \ - -outdir /d1/personal/johnhg/METplus/development/METplus-13.0/rc1/MET-feature_3335_point_weight_flag/internal/test_unit/../../test_output/point_weight -v 1 -unset DESC -unset MASK_GRID -unset MASK_SID -unset OUTPUT_PREFIX -unset POINT_WEIGHT - - From 9db5986e4d5d86e97649b039fdd6a2ea11c04c21 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Mon, 13 Jul 2026 20:22:47 +0000 Subject: [PATCH 22/36] Only whitespace changes --- src/basic/vx_util/point_weight.cc | 16 ++++++++-------- src/basic/vx_util/point_weight.h | 4 ++-- src/libcode/vx_statistics/pair_base.cc | 22 +++++++++++----------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 011c1e1648..c118589a69 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -140,7 +140,7 @@ bool PointWeightInfo::has_sid(const string &sid, double &wgt) const { // Return bad data for no match if(!found) wgt = bad_data_double; - + return found; } @@ -162,7 +162,7 @@ void PointWeightInfo::compute_kde_weights() { mlog << Debug(3) << "Computing KDE point weights using " << n_stn() << " observation locations.\n"; - // Store sums for the weights + // Store sums for the weights vector p_sum(n_stn(), 0.0); // Define e constant @@ -262,19 +262,19 @@ void PointWeightInfo::write_weights() const { // Utility functions // /////////////////////////////////////////////////////////////////////////////// - + PointWeightInfo parse_conf_point_weight(Dictionary *dict) { const char *method_name = "parse_conf_point_weight() -> "; PointWeightInfo info; - + if(!dict) { mlog << Error << "\n" << method_name << "empty dictionary!\n\n"; exit(1); - } + } // Conf: point_weight_flag - + // Get the integer flag value for the current entry int v = dict->lookup_int(conf_key_point_weight_flag); @@ -290,8 +290,8 @@ PointWeightInfo parse_conf_point_weight(Dictionary *dict) { << "Unexpected config file value of " << v << " for \"" << conf_key_point_weight_flag << "\".\n\n"; exit(1); - } - + } + // Conf: kde_ref_angle info.set_kde_ref_angle(dict->lookup_double(conf_key_kde_ref_angle)); diff --git a/src/basic/vx_util/point_weight.h b/src/basic/vx_util/point_weight.h index fa8b1ab876..18aa35fb80 100644 --- a/src/basic/vx_util/point_weight.h +++ b/src/basic/vx_util/point_weight.h @@ -46,7 +46,7 @@ class PointWeightInfo { void assign(const PointWeightInfo &); - // Point weighting type + // Point weighting type PointWeightType Type; // KDE Reference Angle @@ -65,7 +65,7 @@ class PointWeightInfo { public: PointWeightInfo(); - ~PointWeightInfo(); + ~PointWeightInfo(); PointWeightInfo(const PointWeightInfo &); PointWeightInfo & operator=(const PointWeightInfo &a) noexcept; diff --git a/src/libcode/vx_statistics/pair_base.cc b/src/libcode/vx_statistics/pair_base.cc index 8ffc73fe1a..f1145d7f97 100644 --- a/src/libcode/vx_statistics/pair_base.cc +++ b/src/libcode/vx_statistics/pair_base.cc @@ -122,7 +122,7 @@ void PairBase::clear() { o_na.clear(); x_na.clear(); y_na.clear(); - wgt_na.clear(); + wgt_na.clear(); fcmn_na.clear(); fcsd_na.clear(); ocmn_na.clear(); @@ -175,7 +175,7 @@ void PairBase::erase() { o_na.erase(); x_na.erase(); y_na.erase(); - wgt_na.erase(); + wgt_na.erase(); fcmn_na.erase(); fcsd_na.erase(); ocmn_na.erase(); @@ -480,7 +480,7 @@ bool PairBase::add_point_obs(const char *typ, const char *sid, val.sid = string(sid); val.lat = lat; val.lon = lon; - val.elv = elv; + val.elv = elv; val.x = x; val.y = y; val.wgt = wgt; @@ -811,7 +811,7 @@ void PairBase::set_point_weight(PointWeightInfo &info) { // Loop through the point observations for(int i_obs=0; i_obshas_sid(sid_sa[i_obs], wgt)) { wgt_na.set(i_obs, wgt); @@ -838,7 +838,7 @@ void PairBase::set_point_weight(PointWeightInfo &info) { // Loop through the point observations for(int i_obs=0; i_obs= REJECT_DEBUG_LEVEL) { ConcatString cs; @@ -2233,7 +2233,7 @@ bool VxPairBase::correct_lapse_rate(const char *pnt_obs_str, << "For station " << obs_sid_str << ", " << fcst_info->magic_str() << " versus " << obs_info->magic_str() << ", correcting the " << fieldtype_to_string(sfc_info.lapse_rate_correction_apply_to) - << " temperature from " << orig_v << " to " << corr_v + << " temperature from " << orig_v << " to " << corr_v << " for forecast (" << fcst_elv << ") minus observation (" << obs_elv << ") elevation difference of " << fcst_elv - obs_elv << " and lapse rate value of " @@ -2253,7 +2253,7 @@ bool VxPairBase::convert_msl_agl(const char *pnt_obs_str, const char *method_name = "PairBase::convert_msl_agl() -> "; // Check for no work to be done - if(sfc_info.msl_agl_conversion_apply_to == FieldType::None || + if(sfc_info.msl_agl_conversion_apply_to == FieldType::None || sfc_info.msl_agl_conversion_apply_from == FieldType::None) return true; // Apply forecast conversion @@ -2354,7 +2354,7 @@ ClimoPntInfo VxPairBase::get_climo_pnt_info( double to_lvl = (fcst_info->level().type() == LevelType_Pres ? obs_lvl : obs_hgt); int lvl_blw; - int lvl_abv; + int lvl_abv; // Forecast climatology mean if(fcmn_dpa.n_planes() > 0) { @@ -2645,8 +2645,8 @@ void get_interp_points(const DataPlaneArray &dpa, // Keep track of valid data count if(!is_bad_data(v)) n_vld++; - - // Store the current value + + // Store the current value interp_pnts.add(v); } // end for i From 01eeceff7ea7487671a7eab5cf906422b8769113 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Tue, 21 Jul 2026 19:34:22 +0000 Subject: [PATCH 23/36] Per #3335, update logic to rescale KDE weight to a stadard range of 1 to 100. --- src/basic/vx_util/point_weight.cc | 36 +++++++++++++++++++++++++++++++ src/basic/vx_util/point_weight.h | 7 ++++++ 2 files changed, 43 insertions(+) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index c118589a69..5115ef1cd7 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -199,6 +199,9 @@ void PointWeightInfo::compute_kde_weights() { } // End omp parallel + // Rescale weights + rescale_weights(rescale_kde_min, rescale_kde_max); + // Dump weights for high verbosity if(mlog.verbosity_level() >= 7) { mlog << Debug(7) << "Computed KDE weights for " << n_stn() @@ -216,6 +219,39 @@ void PointWeightInfo::compute_kde_weights() { /////////////////////////////////////////////////////////////////////////////// +void PointWeightInfo::rescale_weights(double new_min, double new_max) { + + if(SIDWeights.empty()) return; + + double old_min = SIDWeights[0].Wgt; + double old_max = SIDWeights[0].Wgt; + +#pragma omp parallel default (none) \ + shared(SIDWeights, old_min, old_max, new_min, new_max) + { + + // Get the old range of weights +#pragma omp for reduction(min: old_min) \ + reduction(max: old_max) + for(auto &x : SIDWeights) { + if(x.Wgt < old_min) old_min = x.Wgt; + if(x.Wgt > old_max) old_max = x.Wgt; + } + + // Rescale to the new range of weights +#pragma omp for schedule(static) + for(auto &x : SIDWeights) { + x.Wgt = new_min + ((x.Wgt - old_min) * (new_max - new_min) / (old_max - old_min)); + } + } // End omp parallel + + mlog << Debug(4) << "Rescaled " << n_stn() + << " point weights from range (" << old_min << ", " << old_max + << ") to (" << new_min << ", " << new_max << ").\n"; +} + +/////////////////////////////////////////////////////////////////////////////// + void PointWeightInfo::write_weights() const { const char *method_name = "PointWeightInfo()::write_weights() -> "; diff --git a/src/basic/vx_util/point_weight.h b/src/basic/vx_util/point_weight.h index 18aa35fb80..c27dc083d5 100644 --- a/src/basic/vx_util/point_weight.h +++ b/src/basic/vx_util/point_weight.h @@ -36,6 +36,12 @@ struct SIDWeight { double Wgt; }; +// +// KDE weight scale +// +const double rescale_kde_min = 1.0; +const double rescale_kde_max = 100.0; + //////////////////////////////////////////////////////////////////////// // // Class to store point weighting information @@ -88,6 +94,7 @@ class PointWeightInfo { bool has_sid(const std::string &) const; bool has_sid(const std::string &, double &) const; void compute_kde_weights(); + void rescale_weights(double, double); void write_weights() const; }; From 40bf2ea877cce926c5881abacc0c0ee5a6f23111 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Tue, 21 Jul 2026 19:44:34 +0000 Subject: [PATCH 24/36] Per #3335, updating the tense. --- src/basic/vx_util/point_weight.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 5115ef1cd7..126b7d0dab 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -245,7 +245,7 @@ void PointWeightInfo::rescale_weights(double new_min, double new_max) { } } // End omp parallel - mlog << Debug(4) << "Rescaled " << n_stn() + mlog << Debug(4) << "Rescaling " << n_stn() << " point weights from range (" << old_min << ", " << old_max << ") to (" << new_min << ", " << new_max << ").\n"; } From b46659587b7654f3dc49a83172e51dfee3e67742 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Sun, 16 Aug 2026 23:30:01 +0000 Subject: [PATCH 25/36] Per #3335, define gc_angle() in vx_nav and update PointWeightInfo::compute_kde_weights() to call it when computing the angle from the center of the earth to the two lat/lon points on the surface. --- src/basic/vx_util/point_weight.cc | 5 +- src/libcode/vx_nav/nav.cc | 224 +++++++++++++----------------- src/libcode/vx_nav/nav.h | 3 +- 3 files changed, 99 insertions(+), 133 deletions(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 126b7d0dab..7e8d222f2e 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -183,9 +183,8 @@ void PointWeightInfo::compute_kde_weights() { collapse(2) for(int i=0; i Date: Fri, 21 Aug 2026 20:33:40 +0000 Subject: [PATCH 26/36] Per #3335, since vx_util/point_weight.cc calls gc_angle() in vx_nav/nav.cc, the library linking order should now be -lvx_util -lvx_nav. --- src/basic/vx_util/point_weight.cc | 1 + src/tools/core/ensemble_stat/Makefile.am | 1 + src/tools/core/ensemble_stat/Makefile.in | 1 + src/tools/core/grid_stat/Makefile.am | 1 + src/tools/core/grid_stat/Makefile.in | 1 + src/tools/core/pair_stat/Makefile.am | 1 + src/tools/core/pair_stat/Makefile.in | 1 + src/tools/core/point_stat/Makefile.am | 1 + src/tools/core/point_stat/Makefile.in | 1 + src/tools/core/series_analysis/Makefile.am | 1 + src/tools/core/series_analysis/Makefile.in | 1 + src/tools/core/stat_analysis/Makefile.am | 1 + src/tools/core/stat_analysis/Makefile.in | 1 + src/tools/other/gen_ens_prod/Makefile.am | 1 + src/tools/other/gen_ens_prod/Makefile.in | 1 + src/tools/other/gsi_tools/Makefile.am | 6 ++++-- src/tools/other/gsi_tools/Makefile.in | 6 ++++-- 17 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 7e8d222f2e..27420f7c5e 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -11,6 +11,7 @@ #include #include "vx_util.h" +#include "nav.h" #include "config_file.h" #include "config_constants.h" diff --git a/src/tools/core/ensemble_stat/Makefile.am b/src/tools/core/ensemble_stat/Makefile.am index d05ad256cc..5d14661bab 100644 --- a/src/tools/core/ensemble_stat/Makefile.am +++ b/src/tools/core/ensemble_stat/Makefile.am @@ -40,6 +40,7 @@ ensemble_stat_LDADD = -lvx_stat_out \ -lvx_color \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_cal \ -lvx_log \ diff --git a/src/tools/core/ensemble_stat/Makefile.in b/src/tools/core/ensemble_stat/Makefile.in index 0c60065439..fd6d4a68bb 100644 --- a/src/tools/core/ensemble_stat/Makefile.in +++ b/src/tools/core/ensemble_stat/Makefile.in @@ -356,6 +356,7 @@ ensemble_stat_LDADD = -lvx_stat_out \ -lvx_color \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_cal \ -lvx_log \ diff --git a/src/tools/core/grid_stat/Makefile.am b/src/tools/core/grid_stat/Makefile.am index db4c9bba80..887621afda 100644 --- a/src/tools/core/grid_stat/Makefile.am +++ b/src/tools/core/grid_stat/Makefile.am @@ -40,6 +40,7 @@ grid_stat_LDADD = -lvx_stat_out \ -lvx_cal \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_color \ -lvx_log \ diff --git a/src/tools/core/grid_stat/Makefile.in b/src/tools/core/grid_stat/Makefile.in index 49233ad792..473787bd27 100644 --- a/src/tools/core/grid_stat/Makefile.in +++ b/src/tools/core/grid_stat/Makefile.in @@ -355,6 +355,7 @@ grid_stat_LDADD = -lvx_stat_out \ -lvx_cal \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_color \ -lvx_log \ diff --git a/src/tools/core/pair_stat/Makefile.am b/src/tools/core/pair_stat/Makefile.am index 2dcb51a63a..27249c9490 100644 --- a/src/tools/core/pair_stat/Makefile.am +++ b/src/tools/core/pair_stat/Makefile.am @@ -41,6 +41,7 @@ pair_stat_LDADD = -lvx_stat_out \ -lvx_color \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ $(PYTHON_MET_LIBS) \ -lvx_math \ -lvx_cal \ diff --git a/src/tools/core/pair_stat/Makefile.in b/src/tools/core/pair_stat/Makefile.in index 74dfb206a8..d5c12d4f03 100644 --- a/src/tools/core/pair_stat/Makefile.in +++ b/src/tools/core/pair_stat/Makefile.in @@ -357,6 +357,7 @@ pair_stat_LDADD = -lvx_stat_out \ -lvx_color \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ $(PYTHON_MET_LIBS) \ -lvx_math \ -lvx_cal \ diff --git a/src/tools/core/point_stat/Makefile.am b/src/tools/core/point_stat/Makefile.am index bbd9b9c142..b1108738d9 100644 --- a/src/tools/core/point_stat/Makefile.am +++ b/src/tools/core/point_stat/Makefile.am @@ -40,6 +40,7 @@ point_stat_LDADD = -lvx_stat_out \ -lvx_color \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_cal \ -lvx_log \ diff --git a/src/tools/core/point_stat/Makefile.in b/src/tools/core/point_stat/Makefile.in index 127500befc..cfb7278d24 100644 --- a/src/tools/core/point_stat/Makefile.in +++ b/src/tools/core/point_stat/Makefile.in @@ -355,6 +355,7 @@ point_stat_LDADD = -lvx_stat_out \ -lvx_color \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_cal \ -lvx_log \ diff --git a/src/tools/core/series_analysis/Makefile.am b/src/tools/core/series_analysis/Makefile.am index 7d57a6db6f..f9a6233978 100644 --- a/src/tools/core/series_analysis/Makefile.am +++ b/src/tools/core/series_analysis/Makefile.am @@ -40,6 +40,7 @@ series_analysis_LDADD = -lvx_stat_out \ -lvx_cal \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_color \ -lvx_log \ diff --git a/src/tools/core/series_analysis/Makefile.in b/src/tools/core/series_analysis/Makefile.in index 04e3c0b8d7..56c0d3369b 100644 --- a/src/tools/core/series_analysis/Makefile.in +++ b/src/tools/core/series_analysis/Makefile.in @@ -357,6 +357,7 @@ series_analysis_LDADD = -lvx_stat_out \ -lvx_cal \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_color \ -lvx_log \ diff --git a/src/tools/core/stat_analysis/Makefile.am b/src/tools/core/stat_analysis/Makefile.am index 1f26904bf5..ae7547e3a3 100644 --- a/src/tools/core/stat_analysis/Makefile.am +++ b/src/tools/core/stat_analysis/Makefile.am @@ -45,6 +45,7 @@ stat_analysis_LDADD = -lvx_stat_out \ -lvx_cal \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_color \ -lvx_log \ diff --git a/src/tools/core/stat_analysis/Makefile.in b/src/tools/core/stat_analysis/Makefile.in index 5fa5a0d41d..6b9b894b5f 100644 --- a/src/tools/core/stat_analysis/Makefile.in +++ b/src/tools/core/stat_analysis/Makefile.in @@ -367,6 +367,7 @@ stat_analysis_LDADD = -lvx_stat_out \ -lvx_cal \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_color \ -lvx_log \ diff --git a/src/tools/other/gen_ens_prod/Makefile.am b/src/tools/other/gen_ens_prod/Makefile.am index b0448baf3f..77aa679be6 100644 --- a/src/tools/other/gen_ens_prod/Makefile.am +++ b/src/tools/other/gen_ens_prod/Makefile.am @@ -41,6 +41,7 @@ gen_ens_prod_LDADD = -lvx_stat_out \ -lvx_color \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_cal \ -lvx_log \ diff --git a/src/tools/other/gen_ens_prod/Makefile.in b/src/tools/other/gen_ens_prod/Makefile.in index 543d2e6d56..7967f1c7c9 100644 --- a/src/tools/other/gen_ens_prod/Makefile.in +++ b/src/tools/other/gen_ens_prod/Makefile.in @@ -359,6 +359,7 @@ gen_ens_prod_LDADD = -lvx_stat_out \ -lvx_color \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_cal \ -lvx_log \ diff --git a/src/tools/other/gsi_tools/Makefile.am b/src/tools/other/gsi_tools/Makefile.am index 9afe2e37a1..5e5b4ce46e 100644 --- a/src/tools/other/gsi_tools/Makefile.am +++ b/src/tools/other/gsi_tools/Makefile.am @@ -58,11 +58,12 @@ gsid2mpr_LDADD = -lvx_stat_out \ -lvx_cal \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_color \ -lvx_log \ $(GRIB2_DEP_LIBS) $(UGRID_DEP_LIBS) $(PYTHON_DEP_LIBS) \ - -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas -lvx_util + -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas gsidens2orank_SOURCES = gsidens2orank.h \ gsi_record.h \ @@ -109,9 +110,10 @@ gsidens2orank_LDADD = -lvx_stat_out \ -lvx_cal \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_color \ -lvx_log \ $(GRIB2_DEP_LIBS) $(UGRID_DEP_LIBS) $(PYTHON_DEP_LIBS) \ - -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas -lvx_util + -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas diff --git a/src/tools/other/gsi_tools/Makefile.in b/src/tools/other/gsi_tools/Makefile.in index b1b65a4914..de7bddf599 100644 --- a/src/tools/other/gsi_tools/Makefile.in +++ b/src/tools/other/gsi_tools/Makefile.in @@ -408,11 +408,12 @@ gsid2mpr_LDADD = -lvx_stat_out \ -lvx_cal \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_color \ -lvx_log \ $(GRIB2_DEP_LIBS) $(UGRID_DEP_LIBS) $(PYTHON_DEP_LIBS) \ - -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas -lvx_util + -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas gsidens2orank_SOURCES = gsidens2orank.h \ gsi_record.h \ @@ -460,11 +461,12 @@ gsidens2orank_LDADD = -lvx_stat_out \ -lvx_cal \ -lvx_util_math \ -lvx_util \ + -lvx_nav \ -lvx_math \ -lvx_color \ -lvx_log \ $(GRIB2_DEP_LIBS) $(UGRID_DEP_LIBS) $(PYTHON_DEP_LIBS) \ - -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas -lvx_util + -lm -lproj -lnetcdf_c++4 -lnetcdf -lgsl -lgslcblas all: all-am From 83cbec2b397253ba0c86416d914ddc857ba65cc1 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Mon, 24 Aug 2026 19:53:48 +0000 Subject: [PATCH 27/36] Per #3335, fix gc_angle() to return result in degress rather than radians. --- src/libcode/vx_nav/nav.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcode/vx_nav/nav.cc b/src/libcode/vx_nav/nav.cc index a9f1274355..4afb3d01e8 100644 --- a/src/libcode/vx_nav/nav.cc +++ b/src/libcode/vx_nav/nav.cc @@ -97,7 +97,7 @@ double dl = (lon1_radians - lon2_radians); double x = haversine(dp) + cos(lat1_radians)*cos(lat2_radians)*haversine(dl); -return ahaversine(x); +return deg_per_rad*ahaversine(x); } From ef4bc128aac3c7a845cc38e06b8bc002d4ce9d41 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Mon, 24 Aug 2026 19:55:29 +0000 Subject: [PATCH 28/36] Per #3335, enhance compute_kde_weights() error out with a useful log message to avoid dividing by zero. --- src/basic/vx_util/point_weight.cc | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 27420f7c5e..d19726cc54 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -156,12 +156,14 @@ bool PointWeightInfo::has_sid(const string &sid, double &wgt) const { /////////////////////////////////////////////////////////////////////////////// void PointWeightInfo::compute_kde_weights() { + const char *method_name = "PointWeightInfo()::compute_kde_weights() -> "; // Check for no work to do if(Type != PointWeightType::KDE || WeightsComputed) return; - mlog << Debug(3) << "Computing KDE point weights using " << n_stn() - << " observation locations.\n"; + mlog << Debug(3) << "Computing KDE point weights for " << n_stn() + << " observation locations using reference angle " << KDERefAngle + << ".\n"; // Store sums for the weights vector p_sum(n_stn(), 0.0); @@ -180,8 +182,8 @@ void PointWeightInfo::compute_kde_weights() { { // Compute the sums of the pairwise distances -#pragma omp for reduction(vec_double_plus: p_sum) \ - collapse(2) + // Do not parallelize the inner loop which depends on the value of i +#pragma omp for reduction(vec_double_plus: p_sum) for(int i=0; i Date: Mon, 24 Aug 2026 20:38:40 +0000 Subject: [PATCH 29/36] Per #3335, update log message and documentation. --- docs/Users_Guide/config_options.rst | 6 +++++- src/basic/vx_util/point_weight.cc | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/Users_Guide/config_options.rst b/docs/Users_Guide/config_options.rst index 11f6c812a5..dbccb619cc 100644 --- a/docs/Users_Guide/config_options.rst +++ b/docs/Users_Guide/config_options.rst @@ -2804,7 +2804,8 @@ methods are planned for future versions: "mask.sid". * KDE to apply a kernel density estimator to compute weights based on observation - density to avoid the impact of oversampling from data rich regions. + density to avoid the impact of oversampling from data rich regions. Note that + KDE weights are automatically rescaled a standard range of 1 to 100. .. code-block:: none @@ -2819,6 +2820,9 @@ with a default value of 0.75. As described in :ref:`Haiden et al., 2012 p_sum(n_stn(), 0.0); From 6cd2f6db420abc5961b5913c94555253b4be6415 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Mon, 24 Aug 2026 22:28:16 +0000 Subject: [PATCH 30/36] Per #3335, enhance the KDE error message to print the average angular difference to provide a numeric reference. --- src/basic/vx_util/point_weight.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 715251fd62..4861a5b487 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -167,6 +167,7 @@ void PointWeightInfo::compute_kde_weights() { // Store sums for the weights vector p_sum(n_stn(), 0.0); + vector a_sum(n_stn(), 0.0); // Define e constant const double e = exp(1.0); @@ -178,7 +179,7 @@ void PointWeightInfo::compute_kde_weights() { initializer(omp_priv = decltype(omp_orig)(omp_orig.size())) #pragma omp parallel default (none) \ - shared(SIDWeights, KDERefAngle, p_sum, e) + shared(SIDWeights, KDERefAngle, p_sum, a_sum, e) { // Compute the sums of the pairwise distances @@ -190,8 +191,14 @@ void PointWeightInfo::compute_kde_weights() { SIDWeights[j].Lat, SIDWeights[j].Lon); double exp = ang/KDERefAngle; double p = pow(e, -exp*exp); + + // Sum of the terms p_sum[i] += p; p_sum[j] += p; + + // Sum of the angles for error message + a_sum[i] += ang; + a_sum[j] += ang; } } } // End omp parallel @@ -202,9 +209,13 @@ void PointWeightInfo::compute_kde_weights() { // Sanity check if(is_eq(p_sum[i], 0.0)) { mlog << Error << "\n" << method_name - << "computed an infinite weight. Adjust the \"" - << conf_key_kde_ref_angle << " = " << KDERefAngle - << "\" configuration option to avoid it!\n\n"; + << "computed an infinite weight for location (" + << SIDWeights[i].Lat << ", " << SIDWeights[i].Lon + << ") with an average angular difference of " + << a_sum[i] / (n_stn() - 1) << " to " << n_stn() - 1 + << " other points.\n" + << "Adjust the \"" << conf_key_kde_ref_angle << " = " + << KDERefAngle << "\" configuration option to avoid it!\n\n"; exit(1); } SIDWeights[i].Wgt = 1.0/p_sum[i]; From cce594af154554885250f99dc865ccefc024ba47 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Mon, 24 Aug 2026 22:29:20 +0000 Subject: [PATCH 31/36] Per #3335, update the kde reference angle to 5.0 for GDAS global observations and update ensemble stat to write out the point weights. --- internal/test_unit/config/EnsembleStatConfig_point_weight | 2 +- internal/test_unit/config/PointStatConfig_point_weight | 2 +- internal/test_unit/config/PointStatConfig_prob_point_weight | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/test_unit/config/EnsembleStatConfig_point_weight b/internal/test_unit/config/EnsembleStatConfig_point_weight index a87fd2b9ea..abe10e2371 100644 --- a/internal/test_unit/config/EnsembleStatConfig_point_weight +++ b/internal/test_unit/config/EnsembleStatConfig_point_weight @@ -208,7 +208,7 @@ rng = { grid_weight_flag = NONE; point_weight_flag = ${POINT_WEIGHT}; kde_ref_angle = 0.75; -write_weights = FALSE; +write_weights = TRUE; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_point_weight b/internal/test_unit/config/PointStatConfig_point_weight index 88596a3a06..5cd487ce42 100644 --- a/internal/test_unit/config/PointStatConfig_point_weight +++ b/internal/test_unit/config/PointStatConfig_point_weight @@ -139,7 +139,7 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// point_weight_flag = ${POINT_WEIGHT}; -kde_ref_angle = 0.75; +kde_ref_angle = 5.0; write_weights = TRUE; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/config/PointStatConfig_prob_point_weight b/internal/test_unit/config/PointStatConfig_prob_point_weight index 0ca9e86086..f9fe37c042 100644 --- a/internal/test_unit/config/PointStatConfig_prob_point_weight +++ b/internal/test_unit/config/PointStatConfig_prob_point_weight @@ -145,7 +145,7 @@ output_flag = { //////////////////////////////////////////////////////////////////////////////// point_weight_flag = ${POINT_WEIGHT}; -kde_ref_angle = 1.5; +kde_ref_angle = 5.0; write_weights = FALSE; //////////////////////////////////////////////////////////////////////////////// From 593ccd459e863c784f0b68ccdf706ac7003a30eb Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Mon, 24 Aug 2026 22:36:20 +0000 Subject: [PATCH 32/36] Per #3335, update the list of expected output files. --- internal/test_unit/xml/unit_point_weight.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/test_unit/xml/unit_point_weight.xml b/internal/test_unit/xml/unit_point_weight.xml index d55abe7a06..658b492eec 100644 --- a/internal/test_unit/xml/unit_point_weight.xml +++ b/internal/test_unit/xml/unit_point_weight.xml @@ -189,6 +189,7 @@ &OUTPUT_DIR;/point_weight/ensemble_stat_SID_WEIGHT_20120410_120000V.stat + &OUTPUT_DIR;/point_weight/ensemble_stat_SID_WEIGHT_20120410_120000V_SID_point_weights.txt @@ -215,6 +216,7 @@ &OUTPUT_DIR;/point_weight/ensemble_stat_KDE_WEIGHT_20120410_120000V.stat + &OUTPUT_DIR;/point_weight/ensemble_stat_KDE_WEIGHT_20120410_120000V_KDE_point_weights.txt From 8bdaa71ff9809ba7219784c7c86e27c296b6b2f8 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Mon, 24 Aug 2026 22:42:46 +0000 Subject: [PATCH 33/36] Per #3335, minor SonarQube change. --- src/basic/vx_util/point_weight.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index 4861a5b487..fdcc5570d6 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -104,7 +104,6 @@ void PointWeightInfo::add_wgt(const string &sid, double wgt) { /////////////////////////////////////////////////////////////////////////////// bool PointWeightInfo::has_sid(const string &sid) const { - const char *method_name = "PointWeightInfo()::has_sid() -> "; bool found = false; // Search for a matching entry @@ -255,7 +254,7 @@ void PointWeightInfo::rescale_weights(double new_min, double new_max) { // Get the old range of weights #pragma omp for reduction(min: old_min) \ reduction(max: old_max) - for(auto &x : SIDWeights) { + for(const auto &x : SIDWeights) { if(x.Wgt < old_min) old_min = x.Wgt; if(x.Wgt > old_max) old_max = x.Wgt; } From 90cbeea334eb5df3a3a113ee74ee4002259b463b Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Tue, 25 Aug 2026 17:08:48 +0000 Subject: [PATCH 34/36] Per #3335, tweak the wording of the error message. --- src/basic/vx_util/point_weight.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/basic/vx_util/point_weight.cc b/src/basic/vx_util/point_weight.cc index fdcc5570d6..7f4823bf6f 100644 --- a/src/basic/vx_util/point_weight.cc +++ b/src/basic/vx_util/point_weight.cc @@ -211,10 +211,10 @@ void PointWeightInfo::compute_kde_weights() { << "computed an infinite weight for location (" << SIDWeights[i].Lat << ", " << SIDWeights[i].Lon << ") with an average angular difference of " - << a_sum[i] / (n_stn() - 1) << " to " << n_stn() - 1 - << " other points.\n" + << a_sum[i] / (n_stn() - 1) << " degrees from " + << n_stn() - 1 << " other points.\n" << "Adjust the \"" << conf_key_kde_ref_angle << " = " - << KDERefAngle << "\" configuration option to avoid it!\n\n"; + << KDERefAngle << "\" configuration setting to avoid it!\n\n"; exit(1); } SIDWeights[i].Wgt = 1.0/p_sum[i]; From cb1cc6e8dc495555b637288d797373c69f8725d9 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Thu, 27 Aug 2026 00:03:47 +0000 Subject: [PATCH 35/36] Per #3335, update the 13.0 release notes. --- docs/Users_Guide/release-notes.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/Users_Guide/release-notes.rst b/docs/Users_Guide/release-notes.rst index 067a5c93bd..34c2820da3 100644 --- a/docs/Users_Guide/release-notes.rst +++ b/docs/Users_Guide/release-notes.rst @@ -168,6 +168,16 @@ MET Version 13.0.0 Upgrade Instructions However, if no spatial masking region is requested in the configuration file, then the "FULL" grid will automatically be added, as noted in :numref:`config_options-mask`. + * Point-Stat, Ensemble-Stat, and Pair-Stat configuration files + + * The existing "point_weight_flag" entry can now be set to "KDE" to request kernel density + estimation weighting. + + * The "kde_ref_angle" numeric entry defines a reference angle when computing KDE weights. + + * The "write_weights" boolean entry instructs the tools to write an output text file + containing the point weight values applied based on the "point_weight_flag" setting. + * Grid-Diag configuration file * The "mask.grid" and "mask.poly" entries have changed from strings to arrays of strings @@ -190,8 +200,6 @@ MET Version 13.0.0 Upgrade Instructions for a description of wind rotation and derivation and :numref:`config_wind_field_names` for the corresponding configuration options. -.. dropdown:: Output format changes - NONE - .. dropdown:: Output format changes - NONE MET version 13.0.0 adds or modifies the following output file formats: From b980feba1c05ef4d613183846ad6b379056f26f1 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Thu, 27 Aug 2026 21:59:20 +0000 Subject: [PATCH 36/36] Per #3335, remove 'NONE' from upgrade instructions since those sections are no longer empty. --- docs/Users_Guide/release-notes.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Users_Guide/release-notes.rst b/docs/Users_Guide/release-notes.rst index 34c2820da3..877a7451d5 100644 --- a/docs/Users_Guide/release-notes.rst +++ b/docs/Users_Guide/release-notes.rst @@ -200,7 +200,7 @@ MET Version 13.0.0 Upgrade Instructions for a description of wind rotation and derivation and :numref:`config_wind_field_names` for the corresponding configuration options. -.. dropdown:: Output format changes - NONE +.. dropdown:: Output format changes MET version 13.0.0 adds or modifies the following output file formats: @@ -218,7 +218,7 @@ MET Version 13.0.0 Upgrade Instructions * Adds new output variables with names include "EAS" and "EAS_WIDTH" for the Ensemble Agreement Scale algorithm. -.. dropdown:: Output data changes - NONE +.. dropdown:: Output data changes MET version 13.0.0 modifies existing output data values in the following ways: