Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feature 951 add support for setting hss_ec_value #1048

Merged
merged 1 commit into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7838,3 +7838,23 @@ METplus Configuration Glossary
See :term:`GFDL_TRACKER_NML_TEMPLATE_FILE`.

| *Used by:* GFDLTracker

GRID_STAT_HSS_EC_VALUE
Specify the value for 'hss_ec_value' in the MET configuration file for GridStat.

| *Used by:* GridStat

POINT_STAT_HSS_EC_VALUE
Specify the value for 'hss_ec_value' in the MET configuration file for PointStat.

| *Used by:* PointStat

SERIES_ANALYSIS_HSS_EC_VALUE
Specify the value for 'hss_ec_value' in the MET configuration file for SeriesAnalysis.

| *Used by:* SeriesAnalysis

STAT_ANALYSIS_HSS_EC_VALUE
Specify the value for 'hss_ec_value' in the MET configuration file for StatAnalysis.

| *Used by:* StatAnalysis
51 changes: 51 additions & 0 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2385,6 +2385,7 @@ METplus Configuration
| :term:`GRID_STAT_CLIMO_STDEV_MATCH_MONTH`
| :term:`GRID_STAT_CLIMO_STDEV_DAY_INTERVAL`
| :term:`GRID_STAT_CLIMO_STDEV_HOUR_INTERVAL`
| :term:`GRID_STAT_HSS_EC_VALUE`
| :term:`GRID_STAT_MASK_GRID` (optional)
| :term:`GRID_STAT_MASK_POLY` (optional)
| :term:`GRID_STAT_MET_CONFIG_OVERRIDES`
Expand Down Expand Up @@ -2821,6 +2822,17 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
* - :term:`GRID_STAT_GRID_WEIGHT_FLAG`
- grid_weight_flag

**${METPLUS_HSS_EC_VALUE}**

.. list-table::
:widths: 5 5
:header-rows: 0

* - METplus Config(s)
- MET Config File
* - :term:`GRID_STAT_HSS_EC_VALUE`
- hss_ec_value


.. _make_plots_wrapper:

Expand Down Expand Up @@ -4476,6 +4488,7 @@ Configuration
| :term:`POINT_STAT_CLIMO_STDEV_MATCH_MONTH`
| :term:`POINT_STAT_CLIMO_STDEV_DAY_INTERVAL`
| :term:`POINT_STAT_CLIMO_STDEV_HOUR_INTERVAL`
| :term:`POINT_STAT_HSS_EC_VALUE`
| :term:`FCST_POINT_STAT_WINDOW_BEGIN` (optional)
| :term:`FCST_POINT_STAT_WINDOW_END` (optional)
| :term:`OBS_POINT_STAT_WINDOW_BEGIN` (optional)
Expand Down Expand Up @@ -4847,6 +4860,17 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
* - :term:`POINT_STAT_INTERP_TYPE_WIDTH`
- interp.type.width

**${METPLUS_HSS_EC_VALUE}**

.. list-table::
:widths: 5 5
:header-rows: 0

* - METplus Config(s)
- MET Config File
* - :term:`POINT_STAT_HSS_EC_VALUE`
- hss_ec_value


.. _py_embed_ingest_wrapper:

Expand Down Expand Up @@ -5003,6 +5027,7 @@ METplus Configuration
| :term:`SERIES_ANALYSIS_CLIMO_STDEV_MATCH_MONTH`
| :term:`SERIES_ANALYSIS_CLIMO_STDEV_DAY_INTERVAL`
| :term:`SERIES_ANALYSIS_CLIMO_STDEV_HOUR_INTERVAL`
| :term:`SERIES_ANALYSIS_HSS_EC_VALUE`
|

.. warning:: **DEPRECATED:**
Expand Down Expand Up @@ -5271,6 +5296,18 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
* - :term:`SERIES_ANALYSIS_MET_CONFIG_OVERRIDES`
- n/a

**${METPLUS_HSS_EC_VALUE}**

.. list-table::
:widths: 5 5
:header-rows: 0

* - METplus Config(s)
- MET Config File
* - :term:`SERIES_ANALYSIS_HSS_EC_VALUE`
- hss_ec_value


SeriesByInit
============

Expand Down Expand Up @@ -5351,6 +5388,7 @@ configuration file for running with LOOP_ORDER = times:
| :term:`COV_THRESH_LIST`
| :term:`LINE_TYPE_LIST`
| :term:`STAT_ANALYSIS_SKIP_IF_OUTPUT_EXISTS`
| :term:`STAT_ANALYSIS_HSS_EC_VALUE`
|

The following values **must** be defined in the METplus Wrappers
Expand Down Expand Up @@ -5387,6 +5425,7 @@ file for running with LOOP_ORDER = processes:
| :term:`INTERP_PNTS_LIST`
| :term:`COV_THRESH_LIST`
| :term:`ALPHA_LIST`
| :term:`STAT_ANALYSIS_HSS_EC_VALUE`
|

.. warning:: **DEPRECATED:**
Expand Down Expand Up @@ -5812,6 +5851,18 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
* - :term:`STAT_ANALYSIS_MET_CONFIG_OVERRIDES`
- n/a

**${METPLUS_HSS_EC_VALUE}**

.. list-table::
:widths: 5 5
:header-rows: 0

* - METplus Config(s)
- MET Config File
* - :term:`STAT_ANALYSIS_HSS_EC_VALUE`
- hss_ec_value


.. _tc_gen_wrapper:

TCGen
Expand Down
2 changes: 2 additions & 0 deletions internal_tests/pytests/grid_stat/test_grid_stat_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,8 @@ def test_handle_climo_file_variables(metplus_config, config_overrides,
{'METPLUS_FCST_FILE_TYPE': 'file_type = NETCDF_NCCF;'}),
({'OBS_GRID_STAT_FILE_TYPE': 'NETCDF_NCCF', },
{'METPLUS_OBS_FILE_TYPE': 'file_type = NETCDF_NCCF;'}),
({'GRID_STAT_HSS_EC_VALUE': '0.5', },
{'METPLUS_HSS_EC_VALUE': 'hss_ec_value = 0.5;'}),

]
)
Expand Down
3 changes: 3 additions & 0 deletions internal_tests/pytests/point_stat/test_point_stat_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,9 @@ def test_met_dictionary_in_var_options(metplus_config):
'match_month = TRUE;day_interval = 30;'
'hour_interval = 12;}'),
'CLIMO_STDEV_FILE': '"/some/climo_stdev/file.txt"'}),
({'POINT_STAT_HSS_EC_VALUE': '0.5', },
{'METPLUS_HSS_EC_VALUE': 'hss_ec_value = 0.5;'}),

]
)
def test_point_stat_all_fields(metplus_config, config_overrides,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ def set_minimum_config_settings(config):
'match_month = TRUE;day_interval = 30;'
'hour_interval = 12;}'),
'CLIMO_STDEV_FILE': '"/some/climo_stdev/file.txt"'}),

({'SERIES_ANALYSIS_HSS_EC_VALUE': '0.5', },
{'METPLUS_HSS_EC_VALUE': 'hss_ec_value = 0.5;'}),
]
)
def test_series_analysis_single_field(metplus_config, config_overrides,
Expand Down
5 changes: 5 additions & 0 deletions metplus/wrappers/grid_stat_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class GridStatWrapper(CompareGriddedWrapper):
'METPLUS_GRID_WEIGHT_FLAG',
'METPLUS_FCST_FILE_TYPE',
'METPLUS_OBS_FILE_TYPE',
'METPLUS_HSS_EC_VALUE',
]

# handle deprecated env vars used pre v4.0.0
Expand Down Expand Up @@ -226,6 +227,10 @@ def create_c_dict(self):
extra_args={'remove_quotes': True,
'uppercase': True})

self.add_met_config(name='hss_ec_value',
data_type='float',
metplus_configs=['GRID_STAT_HSS_EC_VALUE'])


return c_dict

Expand Down
5 changes: 5 additions & 0 deletions metplus/wrappers/point_stat_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class PointStatWrapper(CompareGriddedWrapper):
'METPLUS_INTERP_DICT',
'METPLUS_CLIMO_MEAN_DICT',
'METPLUS_CLIMO_STDEV_DICT',
'METPLUS_HSS_EC_VALUE',
]

# handle deprecated env vars used pre v4.0.0
Expand Down Expand Up @@ -219,6 +220,10 @@ def create_c_dict(self):
},
)

self.add_met_config(name='hss_ec_value',
data_type='float',
metplus_configs=['POINT_STAT_HSS_EC_VALUE'])

if not c_dict['FCST_INPUT_TEMPLATE']:
self.log_error('Must set FCST_POINT_STAT_INPUT_TEMPLATE '
'in config file')
Expand Down
5 changes: 5 additions & 0 deletions metplus/wrappers/series_analysis_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class SeriesAnalysisWrapper(RuntimeFreqWrapper):
'METPLUS_VLD_THRESH',
'METPLUS_CTS_LIST',
'METPLUS_STAT_LIST',
'METPLUS_HSS_EC_VALUE',
]

# handle deprecated env vars used pre v4.0.0
Expand Down Expand Up @@ -270,6 +271,10 @@ def create_c_dict(self):
# get climatology config variables
self.handle_climo_dict()

self.add_met_config(name='hss_ec_value',
data_type='float',
metplus_configs=['SERIES_ANALYSIS_HSS_EC_VALUE'])

# if no forecast lead sequence is specified,
# use wildcard (*) so all leads are used
c_dict['WILDCARD_LEAD_IF_EMPTY'] = True
Expand Down
5 changes: 5 additions & 0 deletions metplus/wrappers/stat_analysis_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class StatAnalysisWrapper(CommandBuilder):
'METPLUS_ALPHA',
'METPLUS_LINE_TYPE',
'METPLUS_JOBS',
'METPLUS_HSS_EC_VALUE',
]

field_lists = ['FCST_VAR_LIST',
Expand Down Expand Up @@ -225,6 +226,10 @@ def create_c_dict(self):

c_dict = self.set_lists_loop_or_group(c_dict)

self.add_met_config(name='hss_ec_value',
data_type='float',
metplus_configs=['STAT_ANALYSIS_HSS_EC_VALUE'])

return self.c_dict_error_check(c_dict)

def c_dict_error_check(self, c_dict):
Expand Down
5 changes: 4 additions & 1 deletion parm/met_config/GridStatConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@ cnt_logic = UNION;
wind_thresh = [ NA ];
wind_logic = UNION;
eclv_points = 0.05;
nc_pairs_var_suffix = "";
//nc_pairs_var_name =
${METPLUS_NC_PAIRS_VAR_NAME}
nc_pairs_var_suffix = "";
//hss_ec_value =
${METPLUS_HSS_EC_VALUE}

rank_corr_flag = FALSE;

//
Expand Down
2 changes: 2 additions & 0 deletions parm/met_config/PointStatConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ cnt_logic = UNION;
wind_thresh = [ NA ];
wind_logic = UNION;
eclv_points = 0.05;
//hss_ec_value =
${METPLUS_HSS_EC_VALUE}
rank_corr_flag = FALSE;

//
Expand Down
2 changes: 2 additions & 0 deletions parm/met_config/STATAnalysisConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ wmo_fisher_stats = [ "CNT:PR_CORR", "CNT:SP_CORR",

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

//hss_ec_value =
${METPLUS_HSS_EC_VALUE}
rank_corr_flag = FALSE;
vif_flag = FALSE;
tmp_dir = "/tmp";
Expand Down
2 changes: 2 additions & 0 deletions parm/met_config/SeriesAnalysisConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ output_stats = {

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

//hss_ec_value =
${METPLUS_HSS_EC_VALUE}
rank_corr_flag = FALSE;
tmp_dir = "/tmp";
//version = "V10.0";
Expand Down
1 change: 1 addition & 0 deletions parm/use_cases/met_tool_wrapper/GridStat/GridStat.conf
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ GRID_STAT_NC_PAIRS_FLAG_CLIMO = FALSE
#GRID_STAT_NC_PAIRS_FLAG_DISTANCE_MAP = FALSE
GRID_STAT_NC_PAIRS_FLAG_APPLY_MASK = FALSE

#GRID_STAT_HSS_EC_VALUE =

# End of [config] section and start of [dir] section
[dir]
Expand Down
2 changes: 2 additions & 0 deletions parm/use_cases/met_tool_wrapper/PointStat/PointStat.conf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ POINT_STAT_OUTPUT_FLAG_VL1L2 = STAT
#POINT_STAT_CLIMO_CDF_CENTER_BINS = False
#POINT_STAT_CLIMO_CDF_WRITE_BINS = True

#POINT_STAT_HSS_EC_VALUE =

# Time relative to each input file's valid time (in seconds if no units are specified) for data within the file to be
# considered valid. Values are set in the 'obs_window' dictionary in the PointStat config file
OBS_POINT_STAT_WINDOW_BEGIN = -5400
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ SERIES_ANALYSIS_REGRID_SHAPE =
#SERIES_ANALYSIS_CLIMO_STDEV_DAY_INTERVAL =
#SERIES_ANALYSIS_CLIMO_STDEV_HOUR_INTERVAL =

#SERIES_ANALYSIS_HSS_EC_VALUE =

SERIES_ANALYSIS_RUNTIME_FREQ = RUN_ONCE_PER_INIT_OR_VALID

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ MODEL1_OBTYPE = ANALYS
# References CONFIG_DIR from the [dir] section
STAT_ANALYSIS_CONFIG_FILE = {CONFIG_DIR}/STATAnalysisConfig_wrapped

#STAT_ANALYSIS_HSS_EC_VALUE =

# stat_analysis job info
STAT_ANALYSIS_JOB_NAME = filter
# if using -dump_row, put in JOBS_ARGS "-dump_row [dump_row_file]"
Expand Down