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: - '**' diff --git a/data/config/ConfigConstants b/data/config/ConfigConstants index f6edb9906a..30f283ca4d 100644 --- a/data/config/ConfigConstants +++ b/data/config/ConfigConstants @@ -161,6 +161,7 @@ AREA = 3; // Point weight flag settings NONE = 1; SID = 2; +KDE = 3; // Duplicate flag settings NONE = 1; 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/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/data/config/PointStatConfig_default b/data/config/PointStatConfig_default index d547176e9d..09e4654dc4 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/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/docs/Users_Guide/config_options.rst b/docs/Users_Guide/config_options.rst index d2ba002dec..dbccb619cc 100644 --- a/docs/Users_Guide/config_options.rst +++ b/docs/Users_Guide/config_options.rst @@ -2803,10 +2803,49 @@ 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. Note that + KDE weights are automatically rescaled a standard range of 1 to 100. + .. 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. + +MET checks for the divide-by-zero condition to avoid computing an infinite KDE weights. +When that occurs, MET errors out and instructs the user to adjust the reference angle. + +.. code-block:: none + + kde_ref_angle = 0.75; + +write_weights +------------- + +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 + + write_weights = FALSE; + hss_ec_value ------------ diff --git a/docs/Users_Guide/ensemble-stat.rst b/docs/Users_Guide/ensemble-stat.rst index 61d53777e9..41a2c76bb9 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/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/docs/Users_Guide/point-stat.rst b/docs/Users_Guide/point-stat.rst index 4442a6d565..c551b58eac 100644 --- a/docs/Users_Guide/point-stat.rst +++ b/docs/Users_Guide/point-stat.rst @@ -411,6 +411,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"; diff --git a/docs/Users_Guide/release-notes.rst b/docs/Users_Guide/release-notes.rst index 067a5c93bd..877a7451d5 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,9 +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 - NONE +.. dropdown:: Output format changes MET version 13.0.0 adds or modifies the following output file formats: @@ -210,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: 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..b27cfa4446 100644 --- a/internal/test_unit/config/EnsembleStatConfig_grid_weight +++ b/internal/test_unit/config/EnsembleStatConfig_grid_weight @@ -242,6 +242,10 @@ rng = { grid_weight_flag = ${GRID_WEIGHT}; 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_point_weight b/internal/test_unit/config/EnsembleStatConfig_point_weight index de83a0eaa1..abe10e2371 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 = []; } @@ -207,6 +207,10 @@ rng = { grid_weight_flag = NONE; point_weight_flag = ${POINT_WEIGHT}; +kde_ref_angle = 0.75; +write_weights = TRUE; + +//////////////////////////////////////////////////////////////////////////////// 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..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" ]; @@ -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_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/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/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/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"; diff --git a/internal/test_unit/config/PointStatConfig_APCP b/internal/test_unit/config/PointStatConfig_APCP index 513bdda037..aaa91d7d3c 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"; @@ -47,7 +50,7 @@ fcst = { sid_exc = []; obs_quality_inc = []; obs_quality_exc = []; - + field = [ { name = "${FCST_FIELD_NAME}"; @@ -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 0d75d19e08..49c27ab173 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; @@ -134,17 +144,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 = FALSE; - -point_weight_flag = NONE; - 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..20a3d4bbcf 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; @@ -161,17 +171,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_INTERP_OPTS b/internal/test_unit/config/PointStatConfig_INTERP_OPTS index c6113700d0..046cf45e9e 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; @@ -144,17 +154,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 = FALSE; - -point_weight_flag = NONE; - 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..d36e0c45b6 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; @@ -209,17 +219,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_LAPSE_RATE_MSL_AGL b/internal/test_unit/config/PointStatConfig_LAPSE_RATE_MSL_AGL index 0716daffcc..2c4c201aa2 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; @@ -234,17 +244,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_MASK_SID b/internal/test_unit/config/PointStatConfig_MASK_SID index 55c8bac91b..6ac220012c 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; @@ -139,17 +149,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_MPR_OBTYPE b/internal/test_unit/config/PointStatConfig_MPR_OBTYPE index a0042c5319..c79b61c2c5 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; @@ -150,17 +160,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_PHYS b/internal/test_unit/config/PointStatConfig_PHYS index 88a82381a6..75678c3c95 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; @@ -140,17 +150,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_PHYS_pint b/internal/test_unit/config/PointStatConfig_PHYS_pint index da5dce826a..398cb6a1f3 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; @@ -135,17 +145,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_SEEPS b/internal/test_unit/config/PointStatConfig_SEEPS index ee1d250682..426a471b86 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"; @@ -48,7 +51,7 @@ fcst = { sid_exc = []; obs_quality_inc = []; obs_quality_exc = []; - + field = [ { name = "${FCST_FIELD_NAME}"; @@ -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; @@ -133,18 +144,13 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) -seeps_p1_thresh = ${SEEPS_P1_THRESH}; -seeps_point_climo_name = "${SEEPS_POINT_CLIMO_NAME}"; +point_weight_flag = NONE; +kde_ref_angle = 0.75; +write_weights = FALSE; //////////////////////////////////////////////////////////////////////////////// -duplicate_flag = NONE; -rank_corr_flag = FALSE; - -point_weight_flag = NONE; - 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..cf89efffb2 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; @@ -159,17 +169,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_aeronet b/internal/test_unit/config/PointStatConfig_aeronet index f935dc2f09..52d2be5910 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 // @@ -59,7 +62,7 @@ obs = { sid_exc = []; obs_quality_inc = []; obs_quality_exc = []; - + field = [ { name = "AOD"; @@ -175,6 +178,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -204,17 +214,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_airnow b/internal/test_unit/config/PointStatConfig_airnow index 29dfb568ea..255191db63 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 @@ -238,14 +245,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; //////////////////////////////////////////////////////////////////////////////// -point_weight_flag = NONE; - tmp_dir = "/tmp"; output_prefix = ""; diff --git a/internal/test_unit/config/PointStatConfig_climo b/internal/test_unit/config/PointStatConfig_climo index da71df1111..937359df62 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 // @@ -277,17 +287,13 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry): >=min_p1&&<=max_p1 -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_climo_WMO b/internal/test_unit/config/PointStatConfig_climo_WMO index dcdacc09c5..bdf785aa31 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 // @@ -222,17 +232,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_climo_prob b/internal/test_unit/config/PointStatConfig_climo_prob index 5364ce2c5a..347111e58d 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 // @@ -224,17 +234,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_dup b/internal/test_unit/config/PointStatConfig_dup index d2ce8cea9c..e3ff3c6118 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 // @@ -157,17 +168,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 = ${DUPLICATE_FLAG}; -rank_corr_flag = FALSE; - -point_weight_flag = NONE; - 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..f20c87564d 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 // @@ -216,17 +226,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_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..1ffbaf3578 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,16 +224,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_point_weight b/internal/test_unit/config/PointStatConfig_point_weight index a3cc332c7d..5cd487ce42 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 = []; @@ -57,9 +60,9 @@ obs = fcst; //////////////////////////////////////////////////////////////////////////////// mask = { - grid = []; + grid = [ ${MASK_GRID} ]; poly = []; - sid = [ "${CONFIG_DIR}/SID_CONUS_ADPUPA_ELEV.txt" ]; + sid = [ ${MASK_SID} ]; llpnt = []; } @@ -101,6 +104,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = STAT; @@ -127,17 +137,13 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) -seeps_p1_thresh = NA; +point_weight_flag = ${POINT_WEIGHT}; +kde_ref_angle = 5.0; +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 b/internal/test_unit/config/PointStatConfig_prob index 41cbbb9491..57d507ae67 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; @@ -142,17 +152,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 = FALSE; - -point_weight_flag = NONE; - 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 b336022b93..f9fe37c042 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 = []; @@ -63,9 +66,9 @@ obs = { //////////////////////////////////////////////////////////////////////////////// mask = { - grid = [ "FULL" ]; + grid = [ ${MASK_GRID} ]; poly = []; - sid = [ "${CONFIG_DIR}/SID_CONUS_ADPUPA_ELEV.txt" ]; + sid = [ ${MASK_SID} ]; llpnt = []; } @@ -107,6 +110,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + output_flag = { fho = NONE; ctc = NONE; @@ -133,17 +143,13 @@ output_flag = { } //////////////////////////////////////////////////////////////////////////////// -// Threshold for SEEPS p1 (Probability of being dry) -seeps_p1_thresh = NA; +point_weight_flag = ${POINT_WEIGHT}; +kde_ref_angle = 5.0; +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/config/PointStatConfig_python b/internal/test_unit/config/PointStatConfig_python index 5462fdd744..6f5e38895e 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,16 +221,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 = ""; diff --git a/internal/test_unit/config/PointStatConfig_qty_inc_exc b/internal/test_unit/config/PointStatConfig_qty_inc_exc index 7f2842620a..22c08c154f 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 // @@ -80,7 +83,7 @@ fcst = { obs_quality_exc = []; desc = "QTY_INC_UPA"; }, - + { name = "TMP"; level = [ "Z2" ]; @@ -172,6 +175,13 @@ hira = { //////////////////////////////////////////////////////////////////////////////// +// +// Threshold for SEEPS p1 (Probability of being dry) +// +seeps_p1_thresh = NA; + +//////////////////////////////////////////////////////////////////////////////// + // // Statistical output types // @@ -201,17 +211,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_range_azimuth b/internal/test_unit/config/PointStatConfig_range_azimuth index e8e2bc0477..033e223b1a 100644 --- a/internal/test_unit/config/PointStatConfig_range_azimuth +++ b/internal/test_unit/config/PointStatConfig_range_azimuth @@ -279,7 +279,11 @@ 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..7c64eb36cc 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; @@ -147,18 +158,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; -obs_summary = NEAREST; -rank_corr_flag = TRUE; - -point_weight_flag = NONE; - 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..0d7e489ba4 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..2b5dc01bdf 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..c5b2ae18ea 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/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 17b5a3fc15..e007e68d31 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..bc545d01d1 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..6e4c2746c1 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/internal/test_unit/xml/unit_point_weight.xml b/internal/test_unit/xml/unit_point_weight.xml index b034b54a3a..658b492eec 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 + 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 \ @@ -53,6 +55,28 @@ &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 + + + + + &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 + &OUTPUT_DIR;/point_weight/point_stat_KDE_WEIGHT_150000L_20120409_120000V_KDE_point_weights.txt @@ -62,7 +86,8 @@ 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 +106,8 @@ OUTPUT_PREFIX PROB_SID_WEIGHT DESC SID_WEIGHT POINT_WEIGHT SID - 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 \ @@ -94,13 +120,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 + MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPSFC_ELEV.txt" \ 6 \ @@ -125,7 +172,8 @@ OUTPUT_PREFIX SID_WEIGHT DESC SID_WEIGHT POINT_WEIGHT SID - CONFIG_DIR &CONFIG_DIR; + MASK_GRID + MASK_SID "&CONFIG_DIR;/SID_CONUS_ADPSFC_ELEV.txt" \ 6 \ @@ -141,8 +189,35 @@ &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 - + + &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 + &OUTPUT_DIR;/point_weight/ensemble_stat_KDE_WEIGHT_20120410_120000V_KDE_point_weights.txt + + + 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..b552cb79d0 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,16 +267,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 = TRUE; - -point_weight_flag = NONE; - tmp_dir = "/tmp"; output_prefix = ""; diff --git a/src/basic/vx_config/config_constants.h b/src/basic/vx_config/config_constants.h index 4e3ee5b740..f78f3d4057 100644 --- a/src/basic/vx_config/config_constants.h +++ b/src/basic/vx_config/config_constants.h @@ -543,17 +543,6 @@ enum class GridWeightType { //////////////////////////////////////////////////////////////////////// -// -// Enumeration for point_weight_flag configuration parameter -// - -enum class PointWeightType { - None, // Apply no point weighting - SID // Apply station ID weighting -}; - -//////////////////////////////////////////////////////////////////////// - // // Enumeration for grid_decomp_flag configuration parameter // @@ -744,6 +733,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"; @@ -873,8 +865,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 @@ -1456,6 +1447,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 f4f17915a4..129dc2dd0c 100644 --- a/src/basic/vx_config/config_util.cc +++ b/src/basic/vx_config/config_util.cc @@ -2462,35 +2462,6 @@ 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() -> "; - - if(!dict) { - mlog << Error << "\n" << method_name - << "empty dictionary!\n\n"; - exit(1); - } - - // Get the integer flag value for the current entry - 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 { - mlog << Error << "\n" << method_name - << "Unexpected config file value of " << v << " for \"" - << conf_key_point_weight_flag << "\".\n\n"; - exit(1); - } - - return t; -} - -/////////////////////////////////////////////////////////////////////////////// - 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 39ff66c2c5..add762d381 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 PointWeightType parse_conf_point_weight_flag(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..7f4823bf6f --- /dev/null +++ b/src/basic/vx_util/point_weight.cc @@ -0,0 +1,361 @@ +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* +// ** 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 + +#include "vx_util.h" +#include "nav.h" + +#include "config_file.h" +#include "config_constants.h" + +#include "point_weight.h" + +using namespace std; + +/////////////////////////////////////////////////////////////////////////////// +// +// Code for PointWeightInfo struct +// +/////////////////////////////////////////////////////////////////////////////// + +PointWeightInfo::PointWeightInfo() { + clear(); +} + +//////////////////////////////////////////////////////////////////////// + +PointWeightInfo::~PointWeightInfo() { + clear(); +} + +//////////////////////////////////////////////////////////////////////// + +PointWeightInfo::PointWeightInfo(const PointWeightInfo &m) { + assign(m); +} + +//////////////////////////////////////////////////////////////////////// + +PointWeightInfo & PointWeightInfo::operator=(const PointWeightInfo &m) noexcept { + + if(this == &m) return *this; + + assign(m); + + return *this; +} + +//////////////////////////////////////////////////////////////////////// + +void PointWeightInfo::clear() { + Type = PointWeightType::None; + KDERefAngle = bad_data_double; + SIDWeights.clear(); + WeightsComputed = false; + WriteWeights = false; + WeightFilePrefix.clear(); +} + +//////////////////////////////////////////////////////////////////////// + +void PointWeightInfo::assign(const PointWeightInfo & m) { + Type = m.Type; + KDERefAngle = m.KDERefAngle; + SIDWeights = m.SIDWeights; + WeightsComputed = m.WeightsComputed; + WriteWeights = m.WriteWeights; + WeightFilePrefix = m.WeightFilePrefix; + + return; +} + +/////////////////////////////////////////////////////////////////////////////// + +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 { + bool found = false; + + // Search for a matching entry + for(const auto &e : SIDWeights) { + if(e.SID == sid) { + found = true; + break; + } + } + + return found; +} + +/////////////////////////////////////////////////////////////////////////////// + +bool PointWeightInfo::has_sid(const string &sid, double &wgt) const { + const char *method_name = "PointWeightInfo()::has_sid() -> "; + bool found = false; + + // Check that the weights have been computed + if(!WeightsComputed) { + mlog << Warning << "\n" << method_name + << "Accessing point weights before computing them!\n\n"; + } + + // Search for a matching entry + for(const auto &e : SIDWeights) { + if(e.SID == sid) { + found = true; + wgt = e.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_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 for " << n_stn() + << " observation locations using a reference angle of " << KDERefAngle + << " degrees.\n"; + + // 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); + +#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, p_sum, a_sum, e) + { + + // Compute the sums of the pairwise distances + // 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= 7) { + mlog << Debug(7) << "Computed KDE weights for " << n_stn() + << " observation locations:\n"; + for(int i=0; i 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) << "Rescaling " << 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() -> "; + + if(!WriteWeights || Type == PointWeightType::None) return; + + // Check for empty string + if(WeightFilePrefix.empty()) { + mlog << Error << "\n" << method_name + << "the weight file prefix has not been set!\n\n"; + exit(1); + } + + // Construct the output file name + ConcatString file_name(WeightFilePrefix); + ConcatString type_str(conf_val_none); + if(Type == PointWeightType::SID) type_str = conf_val_sid; + else if(Type == PointWeightType::KDE) type_str = conf_val_kde; + file_name << "_" << type_str << "_point_weights.txt"; + + // Open the output file + ofstream out(file_name.c_str()); + if(!out) { + mlog << Error << "\n" << method_name + << "can't open the output file \"" << file_name + << "\" for writing!\n\n"; + exit(1); + } + + // List the output file + mlog << Debug(1) << "Point weight file: " << file_name << "\n"; + + // Write the weights + out << type_str << "_POINT_WEIGHTS\n"; + for(int i=0; ilookup_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..c27dc083d5 --- /dev/null +++ b/src/basic/vx_util/point_weight.h @@ -0,0 +1,122 @@ +// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* +// ** 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 SIDWeight { + std::string SID; + double Lat; + double Lon; + 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 +// +//////////////////////////////////////////////////////////////////////// + +class PointWeightInfo { + + void assign(const PointWeightInfo &); + + // Point weighting type + PointWeightType Type; + + // KDE Reference Angle + double KDERefAngle; + + // Mapping of SID name to location and weight values + std::vector SIDWeights; + + // Keep track of whether the weights have already been computed + bool WeightsComputed; + + // Write weights to output file + bool WriteWeights; + std::string WeightFilePrefix; + + 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); + void set_weight_file_prefix(const std::string &); + + PointWeightType get_type() const; + double get_kde_ref_angle() const; + bool get_write_weights() const; + + int n_stn() const; + + 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 rescale_weights(double, double); + void write_weights() const; +}; + +//////////////////////////////////////////////////////////////////////// + +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 void PointWeightInfo::set_weight_file_prefix(const std::string &s) { WeightFilePrefix = s; } +inline PointWeightType PointWeightInfo::get_type() const { return Type; } +inline double PointWeightInfo::get_kde_ref_angle() const { return KDERefAngle; } +inline bool PointWeightInfo::get_write_weights() const { return WriteWeights; } +inline int PointWeightInfo::n_stn() const { return (int) SIDWeights.size(); } +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_nav/nav.cc b/src/libcode/vx_nav/nav.cc index a7a1f5f1ea..4afb3d01e8 100644 --- a/src/libcode/vx_nav/nav.cc +++ b/src/libcode/vx_nav/nav.cc @@ -23,12 +23,6 @@ using namespace std; ////////////////////////////////////////////////////////////////// -//static const double cf = 57.2957795130823208768; - - -////////////////////////////////////////////////////////////////// - - struct Vector3D { double x, y, z; }; @@ -58,31 +52,52 @@ double gc_dist(double lat1, double lon1, double lat2, double lon2) { -double x, dp, dl; -double lat1_radians, lat2_radians; -double lon1_radians, lon2_radians; +double lat1_radians = lat1 * rad_per_deg; +double lat2_radians = lat2 * rad_per_deg; +double lon1_radians = lon1 * rad_per_deg; +double lon2_radians = lon2 * rad_per_deg; + +double dp = (lat1_radians - lat2_radians); +double dl = (lon1_radians - lon2_radians); + +double x = haversine(dp) + cos(lat1_radians)*cos(lat2_radians)*haversine(dl); + +return earth_radius_km*ahaversine(x); + +} + + +////////////////////////////////////////////////////////////////// -lat1_radians = lat1 * rad_per_deg; -lat2_radians = lat2 * rad_per_deg; -lon1_radians = lon1 * rad_per_deg; -lon2_radians = lon2 * rad_per_deg; -//lat1_radians = deg_to_rad(lat1); -//lat2_radians = deg_to_rad(lat2); -//lon1_radians = deg_to_rad(lon1); -//lon2_radians = deg_to_rad(lon2); -dp = (lat1_radians - lat2_radians); -dl = (lon1_radians - lon2_radians); + // + // gc_angle + // + // Calculates the angle in degrees + // between the points (lat1, lon1), + // (lat2, lon2) (in degrees) with the + // center of the earth as the vertex + // + -//dp = (lat1 - lat2)/cf; -//dl = (lon1 - lon2)/cf; +////////////////////////////////////////////////////////////////// -x = haversine(dp) + cos(lat1_radians)*cos(lat2_radians)*haversine(dl); -//x = haversine(dp) + cos(lat1/cf)*cos(lat2/cf)*haversine(dl); -x = earth_radius_km*ahaversine(x); +double gc_angle(double lat1, double lon1, double lat2, double lon2) -return x; +{ + +double lat1_radians = lat1 * rad_per_deg; +double lat2_radians = lat2 * rad_per_deg; +double lon1_radians = lon1 * rad_per_deg; +double lon2_radians = lon2 * rad_per_deg; + +double dp = (lat1_radians - lat2_radians); +double dl = (lon1_radians - lon2_radians); + +double x = haversine(dp) + cos(lat1_radians)*cos(lat2_radians)*haversine(dl); + +return deg_per_rad*ahaversine(x); } @@ -130,9 +145,7 @@ double ahaversine(double t) { -double a = 2.0*asin(sqrt(t)); - -return a; +return 2.0*asin(sqrt(t)); } @@ -157,21 +170,19 @@ double rl_dist(double lat1, double lon1, double lat2, double lon2) { -double d, beta; +double d; if ( fabs(lat1 - lat2) < 0.0001 ) { d = earth_radius_km*cosd(lat1)*(lon1 - lon2) * rad_per_deg; -// d = earth_radius_km*cos(lat1/cf)*((lon1 - lon2)/cf); return fabs(d); } -beta = rl_bearing(lat1, lon1, lat2, lon2); +double beta = rl_bearing(lat1, lon1, lat2, lon2); d = earth_radius_km*( rad_per_deg * (lat1 - lat2)/cosd(beta) ); -//d = earth_radius_km*( ((lat1 - lat2)/cf)/cos(beta/cf) ); return fabs(d); @@ -199,15 +210,10 @@ double rl_bearing(double lat1, double lon1, double lat2, double lon2) { -double mp1, mp2, beta; +double mp1 = meridional_parts(lat1); +double mp2 = meridional_parts(lat2); -mp1 = meridional_parts(lat1); -mp2 = meridional_parts(lat2); - -beta = atan2d( rad_per_deg * (lon1 - lon2), mp2 - mp1); -//beta = cf*atan2((lon1 - lon2)/cf, mp2 - mp1); - -return beta; +return atan2d( rad_per_deg * (lon1 - lon2), mp2 - mp1); } @@ -231,7 +237,6 @@ double meridional_parts(double a) { a = a * rad_per_deg; -//a /= cf; return log(tan(piover4 + (0.5*a))); @@ -259,22 +264,13 @@ double gc_bearing(double lat1, double lon1, double lat2, double lon2) { -double x, y, dl, beta; - -//lat1 /= cf; lon1 /= cf; - -//lat2 /= cf; lon2 /= cf; +double dl = lon1 - lon2; -dl = lon1 - lon2; +double x = cosd(lat1)*sind(lat2) - sind(lat1)*cosd(lat2)*cosd(dl); -x = cosd(lat1)*sind(lat2) - sind(lat1)*cosd(lat2)*cosd(dl); -//x = cos(lat1)*sin(lat2) - sin(lat1)*cos(lat2)*cos(dl); +double y = cosd(lat2)*sind(dl); -y = cosd(lat2)*sind(dl); -//y = cos(lat2)*sin(dl); - -beta = atan2d(y, x); -//beta = cf*atan2(y, x); +double beta = atan2d(y, x); return beta; @@ -306,51 +302,40 @@ void gc_point_v1(double lat1, double lon1, double lat2, double lon2, { -double sp1, sp2, sl1, sl2; -double cp1, cp2, cl1, cl2; -double t, st, sth, stmt, theta; -double x, y, z; - -theta = gc_dist(lat1, lon1, lat2, lon2)/earth_radius_km; - -t = dist/earth_radius_km; +double theta = gc_dist(lat1, lon1, lat2, lon2)/earth_radius_km; -sth = sin(theta); +double t = dist/earth_radius_km; -st = sin(t); +double sth = sin(theta); -stmt = sin(theta - t); +double st = sin(t); -//lat1 /= cf; lon1 /= cf; +double stmt = sin(theta - t); -//lat2 /= cf; lon2 /= cf; +double sp1 = sind(lat1); +double sp2 = sind(lat2); -sp1 = sind(lat1); sp2 = sind(lat2); -//sp1 = sin(lat1); sp2 = sin(lat2); +double sl1 = sind(lon1); +double sl2 = sind(lon2); -sl1 = sind(lon1); sl2 = sind(lon2); -//sl1 = sin(lon1); sl2 = sin(lon2); +double cp1 = cosd(lat1); +double cp2 = cosd(lat2); -cp1 = cosd(lat1); cp2 = cosd(lat2); -//cp1 = cos(lat1); cp2 = cos(lat2); +double cl1 = cosd(lon1); +double cl2 = cosd(lon2); -cl1 = cosd(lon1); cl2 = cosd(lon2); -//cl1 = cos(lon1); cl2 = cos(lon2); +double x = cp1*cl1*stmt + cp2*cl2*st; -x = cp1*cl1*stmt + cp2*cl2*st; +double y = cp1*sl1*stmt + cp2*sl2*st; -y = cp1*sl1*stmt + cp2*sl2*st; - -z = (sp1*stmt + sp2*st)/sth; +double z = (sp1*stmt + sp2*st)/sth; lat = asind(z); -//lat = cf*asin(z); if ( (fabs(x) + fabs(y)) < 1.0e-6 ) lon = 0.0; else lon = atan2d(y, x); -// lon = cf*atan2(y, x); return; @@ -384,41 +369,32 @@ void gc_point_v2(double lat1, double lon1, double bear, double dist, { -double x, y, z, t; -double sp, cp, cl, sl, sb, cb, st, ct; - -//lat1 /= cf; -//lon1 /= cf; +double t = dist/earth_radius_km; -//bear /= cf; +double sp = sind(lat1); +double cp = cosd(lat1); -t = dist/earth_radius_km; +double sl = sind(lon1); +double cl = cosd(lon1); -sp = sind(lat1); cp = cosd(lat1); -//sp = sin(lat1); cp = cos(lat1); +double sb = sind(bear); +double cb = cosd(bear); -sl = sind(lon1); cl = cosd(lon1); -//sl = sin(lon1); cl = cos(lon1); +double st = sin(t); +double ct = cos(t); -sb = sind(bear); cb = cosd(bear); -//sb = sin(bear); cb = cos(bear); +double x = cp*sl*ct - sp*sl*cb*st - cl*sb*st; -st = sin(t); ct = cos(t); +double y = cp*cl*ct - sp*cl*cb*st + sl*sb*st; -x = cp*sl*ct - sp*sl*cb*st - cl*sb*st; - -y = cp*cl*ct - sp*cl*cb*st + sl*sb*st; - -z = sp*ct + cp*cb*st; +double z = sp*ct + cp*cb*st; lat = asind(z); -//lat = cf*asin(z); if ( (fabs(x) + fabs(y)) < 1.0e-6 ) lon = 0.0; else lon = atan2d(x, y); -// lon = cf*atan2(x, y); return; @@ -485,39 +461,30 @@ void rl_point_v2(double lat1, double lon1, double bear, double dist, { -double t, sb, cb, tb, mp, mp1; - -//bear /= cf; - -sb = sind(bear); cb = cosd(bear); -//sb = sin(bear); cb = cos(bear); +double sb = sind(bear); +double cb = cosd(bear); -t = dist/earth_radius_km; +double t = dist/earth_radius_km; lat = lat1 + deg_per_rad * (t*cb); -//lat = lat1 + cf*t*cb; if ( fabs(cb) < 1.0e-5 ) lon = lon1 * rad_per_deg - t*( sb/cosd(lat1) ); -// lon = (lon1/cf) - t*( sb/cos(lat1/cf) ); else { - tb = tand(bear); -// tb = tan(bear); + double tb = tand(bear); - mp = meridional_parts(lat); + double mp = meridional_parts(lat); - mp1 = meridional_parts(lat1); + double mp1 = meridional_parts(lat1); lon = lon1 * rad_per_deg - tb*( mp - mp1 ); -// lon = (lon1/cf) - tb*( mp - mp1 ); } lon += twopi*floor( 0.5 - (lon/twopi) ); lon = lon * deg_per_rad; -//lon *= cf; return; @@ -546,31 +513,32 @@ return; double gc_dist_to_line(double lat1, double lon1, double lat2, double lon2, double lat3, double lon3) { - Vector3D a, b, c, g, f, t; - double lat4, lon4, dist12, dist14, dist24, dist; // Convert to cartesian coordinates - a = latlon_to_xyz(lat1, lon1); - b = latlon_to_xyz(lat2, lon2); - c = latlon_to_xyz(lat3, lon3); + Vector3D a = latlon_to_xyz(lat1, lon1); + Vector3D b = latlon_to_xyz(lat2, lon2); + Vector3D c = latlon_to_xyz(lat3, lon3); // Compute intersection of arc AB with perpendicular from C - g = cross_product(a, b); - f = cross_product(c, g); - t = cross_product(g, f); + Vector3D g = cross_product(a, b); + Vector3D f = cross_product(c, g); + Vector3D t = cross_product(g, f); // Convert intersection point from cartesian back to lat/lon + double lat4; + double lon4; xyz_to_latlon(t, lat4, lon4); // Length of the arc segment - dist12 = gc_dist(lat1, lon1, lat2, lon2); + double dist12 = gc_dist(lat1, lon1, lat2, lon2); // Distance from intersection point to end points - dist14 = gc_dist(lat1, lon1, lat4, lon4); - dist24 = gc_dist(lat2, lon2, lat4, lon4); + double dist14 = gc_dist(lat1, lon1, lat4, lon4); + double dist24 = gc_dist(lat2, lon2, lat4, lon4); // If intersection is between the end points, // use the perpendicular distance + double dist; if(dist14 <= dist12 && dist24 <= dist12) { dist = gc_dist(lat3, lon3, lat4, lon4); } diff --git a/src/libcode/vx_nav/nav.h b/src/libcode/vx_nav/nav.h index ef92971484..05b8e17791 100644 --- a/src/libcode/vx_nav/nav.h +++ b/src/libcode/vx_nav/nav.h @@ -17,6 +17,7 @@ ////////////////////////////////////////////////////////////////// extern double gc_dist(double lat1, double lon1, double lat2, double lon2); +extern double gc_angle(double lat1, double lon1, double lat2, double lon2); extern double gc_bearing(double lat1, double lon1, double lat2, double lon2); extern double rl_dist(double lat1, double lon1, double lat2, double lon2); @@ -49,5 +50,3 @@ extern double gc_dist_to_line(double lat1, double lon1, ////////////////////////////////////////////////////////////////// - - diff --git a/src/libcode/vx_statistics/pair_base.cc b/src/libcode/vx_statistics/pair_base.cc index dc4199f367..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; @@ -786,14 +786,13 @@ void PairBase::calc_obs_summary(){ //////////////////////////////////////////////////////////////////////// -void PairBase::set_point_weight(const PointWeightType wgt_flag) { - +void PairBase::set_point_weight(PointWeightInfo &info) { const char *method_name = "PairBase::set_point_weight() -> "; - if(!IsPointVx || wgt_flag == PointWeightType::None) return; + if(!IsPointVx || info.get_type() == PointWeightType::None) return; // Apply the SID point weight type - if(wgt_flag == PointWeightType::SID && + if(info.get_type() == PointWeightType::SID && mask_sid_ptr != nullptr) { mlog << Debug(4) @@ -812,13 +811,40 @@ void PairBase::set_point_weight(const PointWeightType wgt_flag) { // Loop through the point observations for(int i_obs=0; i_obshas_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 + << "no point weight SID match found for station id: " + << sid_sa[i_obs] << "\n\n"; + } + } + } + // Apply the KDE point weight type + else if(info.get_type() == PointWeightType::KDE) { + + // Compute weights, if needed + info.compute_kde_weights(); + + mlog << Debug(4) + << "Applying KDE point weights computed using " + << info.n_stn() << " observation locations.\n"; + + // Loop through the point observations + for(int i_obs=0; i_obs " << "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; } @@ -2169,7 +2195,7 @@ bool VxPairBase::correct_lapse_rate(const char *pnt_obs_str, // Check for valid data if(is_bad_data(fcst_elv) || is_bad_data(obs_elv) || is_bad_data(fcst_v) || is_bad_data(obs_v) || - is_bad_data(sfc_info.lapse_rate_correction_value)) { + is_bad_data(sfc_info.lapse_rate_correction_value)) { if(mlog.verbosity_level() >= REJECT_DEBUG_LEVEL) { ConcatString cs; @@ -2207,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 " @@ -2227,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 @@ -2328,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) { @@ -2619,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 diff --git a/src/libcode/vx_statistics/pair_base.h b/src/libcode/vx_statistics/pair_base.h index 26026faa88..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 PointWeightType); + 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 PointWeightType); + void set_point_weight(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/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/ensemble_stat/ensemble_stat.cc b/src/tools/core/ensemble_stat/ensemble_stat.cc index 57bb47f856..8eac5a2dde 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. // //////////////////////////////////////////////////////////////////////// @@ -860,7 +861,7 @@ static void process_point_vx() { 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); ///////////////////////////////////////////////////////////////////// // @@ -1974,7 +1985,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()); @@ -2008,7 +2019,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 @@ -2861,6 +2872,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/ensemble_stat/ensemble_stat_conf_info.cc b/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc index e02e8b512e..b85b881a1e 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc +++ b/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc @@ -76,7 +76,7 @@ void EnsembleStatConfInfo::clear() { mask_area_map.clear(); mask_sid_map.clear(); grid_weight_flag = GridWeightType::None; - point_weight_flag = PointWeightType::None; + point_weight_info.clear(); output_prefix.clear(); version.clear(); @@ -158,8 +158,8 @@ void EnsembleStatConfInfo::process_config(GrdFileType etype, // Conf: grid_weight_flag grid_weight_flag = parse_conf_grid_weight_flag(&conf); - // Conf: point_weight_flag - point_weight_flag = parse_conf_point_weight_flag(&conf); + // Conf: point_weight_info + point_weight_info = parse_conf_point_weight(&conf); // 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..79edf27f5f 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat_conf_info.h +++ b/src/tools/core/ensemble_stat/ensemble_stat_conf_info.h @@ -237,7 +237,7 @@ class EnsembleStatConfInfo { gsl_rng *rng_ptr; // GSL random number generator (allocated) GridWeightType grid_weight_flag; // Grid weighting flag - PointWeightType point_weight_flag; // Point weighting flag + PointWeightInfo point_weight_info; // Point weighting information ConcatString output_prefix; // String to customize output file name ConcatString version; // Config file version 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/pair_stat/pair_stat.cc b/src/tools/core/pair_stat/pair_stat.cc index a0b6d7b3f1..3863dd4003 100644 --- a/src/tools/core/pair_stat/pair_stat.cc +++ b/src/tools/core/pair_stat/pair_stat.cc @@ -24,6 +24,7 @@ // climo support // 002 09/25/25 Halley Gotway MET #3186 Censoring and conversion // 003 01/27/26 Halley Gotway MET #3298 Add the FULL grid, if needed +// 004 05/12/26 Halley Gotway MET #3335 Add point_weight_flag = KDE option // //////////////////////////////////////////////////////////////////////// @@ -126,7 +127,7 @@ int met_main(int argc, char *argv[]) { 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/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/point_stat/point_stat.cc b/src/tools/core/point_stat/point_stat.cc index 981f842492..c82acf9f84 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. // //////////////////////////////////////////////////////////////////////// @@ -201,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); @@ -2237,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/core/point_stat/point_stat_conf_info.cc b/src/tools/core/point_stat/point_stat_conf_info.cc index 1b8a7ecfbf..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,7 +71,7 @@ void PointStatConfInfo::clear() { obtype_as_group_val_flag = false; mask_area_map.clear(); mask_sid_map.clear(); - point_weight_flag = PointWeightType::None; + point_weight_info.clear(); tmp_dir.clear(); output_prefix.clear(); version.clear(); @@ -154,8 +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: 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 dae49f782c..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,7 +239,7 @@ class PointStatConfInfo { // Mapping of mask names to Station ID lists std::map 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 output_prefix; // String to customize output file name 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