From 12d4302a85e4e078355f1564072d85a9baaf119b Mon Sep 17 00:00:00 2001 From: Hank Fisher Date: Mon, 14 Feb 2022 16:19:17 -0700 Subject: [PATCH 1/7] Added fcst_file_type to two wrappers --- docs/Users_Guide/glossary.rst | 11 ++++++++ docs/Users_Guide/wrappers.rst | 28 +++++++++++++++++++ .../pytests/mode/test_mode_wrapper.py | 2 ++ .../point_stat/test_point_stat_wrapper.py | 3 ++ metplus/wrappers/mode_wrapper.py | 8 ++++++ metplus/wrappers/point_stat_wrapper.py | 5 ++++ parm/met_config/MODEConfig_wrapped | 1 + parm/met_config/PointStatConfig_wrapped | 5 ++++ .../use_cases/met_tool_wrapper/MODE/MODE.conf | 1 + .../met_tool_wrapper/PointStat/PointStat.conf | 2 +- 10 files changed, 65 insertions(+), 1 deletion(-) diff --git a/docs/Users_Guide/glossary.rst b/docs/Users_Guide/glossary.rst index c1b1873469..90176c3dc7 100644 --- a/docs/Users_Guide/glossary.rst +++ b/docs/Users_Guide/glossary.rst @@ -1467,6 +1467,11 @@ METplus Configuration Glossary | *Used by:* PointStat + POINT_STAT_FCST_FILE_TYPE + Specify the value for 'fcst_file_type' in the MET configuration file for PointStat. + + | *Used by:* PointStat + FCST_POINT_STAT_INPUT_DATATYPE Specify the data type of the input directory for forecast files used with the MET point_stat tool. Currently valid options are NETCDF, GRIB, and GEMPAK. If set to GEMPAK, data will automatically be converted to NetCDF via GempakToCF. A corresponding variable exists for observation data called :term:`OBS_POINT_STAT_INPUT_DATATYPE`. @@ -2464,6 +2469,12 @@ METplus Configuration Glossary | *Used by:* MODE + MODE_FCST_FILE_TYPE + Specify the value for 'fcst_file_type' in the MET configuration file for PointStat. + + | *Used by:* MODE + + MODE_MERGE_CONFIG_FILE Path to mode merge config file. diff --git a/docs/Users_Guide/wrappers.rst b/docs/Users_Guide/wrappers.rst index bbb9b1c0d6..f3e09c14a8 100644 --- a/docs/Users_Guide/wrappers.rst +++ b/docs/Users_Guide/wrappers.rst @@ -4059,6 +4059,7 @@ METplus Configuration | :term:`OBS_MODE_VAR_LEVELS` (optional) | :term:`OBS_MODE_VAR_THRESH` (optional) | :term:`OBS_MODE_VAR_OPTIONS` (optional) +| :term:`MODE_FCST_FILE_TYPE` (optional) | .. warning:: **DEPRECATED:** @@ -4120,6 +4121,19 @@ see :ref:`How METplus controls MET config file settings`. * - :term:`OBTYPE` - obtype +**${METPLUS_FCST_FILE_TYPE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`POINT_STAT_FCST_FILE_TYPE` + - fcst.file.type + +.. note:: For more information on controlling the forecast file type attribute in METplus, please see the :ref:`Field_Info` section of the User's Guide. + **${METPLUS_REGRID_DICT}** .. list-table:: @@ -5383,6 +5397,7 @@ Configuration | :term:`OBS_POINT_STAT_VAR_OPTIONS` (optional) | :term:`POINT_STAT_OBS_VALID_BEG` (optional) | :term:`POINT_STAT_OBS_VALID_END` (optional) +| :term:`POINT_STAT_FCST_FILE_TYPE` (optional) | .. warning:: **DEPRECATED:** @@ -5490,6 +5505,19 @@ see :ref:`How METplus controls MET config file settings`. .. note:: For more information on controlling the forecast field attributes in METplus, please see the :ref:`Field_Info` section of the User's Guide. +**${METPLUS_FCST_FILE_TYPE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`POINT_STAT_FCST_FILE_TYPE` + - fcst.file.type + +.. note:: For more information on controlling the forecast file type attribute in METplus, please see the :ref:`Field_Info` section of the User's Guide. + **${METPLUS_OBS_FIELD}** .. list-table:: diff --git a/internal_tests/pytests/mode/test_mode_wrapper.py b/internal_tests/pytests/mode/test_mode_wrapper.py index 4ee11d41ee..9227771d13 100644 --- a/internal_tests/pytests/mode/test_mode_wrapper.py +++ b/internal_tests/pytests/mode/test_mode_wrapper.py @@ -306,6 +306,8 @@ def set_minimum_config_settings(config): {'METPLUS_PS_PLOT_FLAG': 'ps_plot_flag = TRUE;'}), ({'MODE_CT_STATS_FLAG': 'True', }, {'METPLUS_CT_STATS_FLAG': 'ct_stats_flag = TRUE;'}), + ({'MODE_FCST_FILE_TYPE': 'NETCDF_PINT', }, + {'METPLUS_FCST_FILE_TYPE': 'fcst_file_type = NETCDF_PINT;'}), ] ) def test_mode_single_field(metplus_config, config_overrides, diff --git a/internal_tests/pytests/point_stat/test_point_stat_wrapper.py b/internal_tests/pytests/point_stat/test_point_stat_wrapper.py index 49fbcba475..11b405e821 100755 --- a/internal_tests/pytests/point_stat/test_point_stat_wrapper.py +++ b/internal_tests/pytests/point_stat/test_point_stat_wrapper.py @@ -460,6 +460,9 @@ def test_met_dictionary_in_var_options(metplus_config): ({'POINT_STAT_MESSAGE_TYPE_GROUP_MAP': '{ key = "SURFACE"; val = "ADPSFC,SFCSHP,MSONET";},{ key = "ANYAIR"; val = "AIRCAR,AIRCFT";}', }, {'METPLUS_MESSAGE_TYPE_GROUP_MAP': 'message_type_group_map = [{ key = "SURFACE"; val = "ADPSFC,SFCSHP,MSONET";}, { key = "ANYAIR"; val = "AIRCAR,AIRCFT";}];'}), + ({'POINT_STAT_FCST_FILE_TYPE': 'NETCDF_PINT', }, + {'METPLUS_FCST_FILE_TYPE': 'fcst_file_typE = NETCDF_PINT;'}), + ] ) def test_point_stat_all_fields(metplus_config, config_overrides, diff --git a/metplus/wrappers/mode_wrapper.py b/metplus/wrappers/mode_wrapper.py index af7458fc33..3325a59c75 100755 --- a/metplus/wrappers/mode_wrapper.py +++ b/metplus/wrappers/mode_wrapper.py @@ -58,6 +58,7 @@ class MODEWrapper(CompareGriddedWrapper): 'METPLUS_INTEREST_FUNCTION_CONVEX_HULL_DIST', 'METPLUS_PS_PLOT_FLAG', 'METPLUS_CT_STATS_FLAG', + 'METPLUS_FCST_FILE_TYPE', ] # handle deprecated env vars used pre v4.0.0 @@ -358,6 +359,10 @@ def create_c_dict(self): self.add_met_config(name='ct_stats_flag', data_type='bool') + self.add_met_config(name='fcst_file_type', + data_type='string' + metplus_configs=['POINT_STAT_FCST_FILE_TYPE']) + c_dict['ALLOW_MULTIPLE_FILES'] = False @@ -382,6 +387,9 @@ def create_c_dict(self): self.get_env_var_value('METPLUS_VERIF_MASK').strip('[]') ) + + + return c_dict def set_environment_variables(self, time_info): diff --git a/metplus/wrappers/point_stat_wrapper.py b/metplus/wrappers/point_stat_wrapper.py index e5f54b9f6c..48ce04222b 100755 --- a/metplus/wrappers/point_stat_wrapper.py +++ b/metplus/wrappers/point_stat_wrapper.py @@ -44,6 +44,7 @@ class PointStatWrapper(CompareGriddedWrapper): 'METPLUS_HSS_EC_VALUE', 'METPLUS_HIRA_DICT', 'METPLUS_MESSAGE_TYPE_GROUP_MAP', + 'METPLUS_FCST_FILE_TYPE', ] # handle deprecated env vars used pre v4.0.0 @@ -182,6 +183,10 @@ def create_c_dict(self): self.add_met_config(name='message_type', data_type='list') + self.add_met_config(name='fcst_file_type', + data_type='string' + metplus_configs=['POINT_STAT_FCST_FILE_TYPE']) + self.handle_climo_cdf_dict() c_dict['OBS_VALID_BEG'] = ( diff --git a/parm/met_config/MODEConfig_wrapped b/parm/met_config/MODEConfig_wrapped index a5ae8e4d4b..64608ca90a 100644 --- a/parm/met_config/MODEConfig_wrapped +++ b/parm/met_config/MODEConfig_wrapped @@ -58,6 +58,7 @@ fcst = { ${METPLUS_FCST_FILTER_ATTR_THRESH} ${METPLUS_FCST_MERGE_THRESH} ${METPLUS_FCST_MERGE_FLAG} + ${METPLUS_FCST_FILE_TYPE} } obs = { diff --git a/parm/met_config/PointStatConfig_wrapped b/parm/met_config/PointStatConfig_wrapped index 9ab367e182..e8a9a4d110 100644 --- a/parm/met_config/PointStatConfig_wrapped +++ b/parm/met_config/PointStatConfig_wrapped @@ -80,6 +80,11 @@ obs_perc_value = 50; //message_type_group_map = ${METPLUS_MESSAGE_TYPE_GROUP_MAP} +// +// Forecast file type string. +// +${METPLUS_FCST_FILE_TYPE} + //////////////////////////////////////////////////////////////////////////////// // diff --git a/parm/use_cases/met_tool_wrapper/MODE/MODE.conf b/parm/use_cases/met_tool_wrapper/MODE/MODE.conf index 6cbc269527..8a1f679987 100644 --- a/parm/use_cases/met_tool_wrapper/MODE/MODE.conf +++ b/parm/use_cases/met_tool_wrapper/MODE/MODE.conf @@ -120,3 +120,4 @@ MODE_QUILT = True #MODE_PS_PLOT_FLAG = #MODE_CT_STATS_FLAG = +#MODE_FCST_FILE_TYPE = diff --git a/parm/use_cases/met_tool_wrapper/PointStat/PointStat.conf b/parm/use_cases/met_tool_wrapper/PointStat/PointStat.conf index c52011678c..07a3f4ce6c 100644 --- a/parm/use_cases/met_tool_wrapper/PointStat/PointStat.conf +++ b/parm/use_cases/met_tool_wrapper/PointStat/PointStat.conf @@ -32,7 +32,6 @@ POINT_STAT_CLIMO_MEAN_INPUT_TEMPLATE = POINT_STAT_CLIMO_STDEV_INPUT_DIR = POINT_STAT_CLIMO_STDEV_INPUT_TEMPLATE = - ### # Field Info ### @@ -141,3 +140,4 @@ POINT_STAT_MESSAGE_TYPE = ADPUPA, ADPSFC #POINT_STAT_HIRA_PROB_CAT_THRESH = #POINT_STAT_MESSAGE_TYPE_GROUP_MAP = +#POINT_STAT_FCST_FILE_TYPE = From 621c043282e2c66f1b7ac222e66340b19e20c217 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 14 Feb 2022 16:57:25 -0700 Subject: [PATCH 2/7] per #1165, fix name of MET variable that is set by METplus variable and added OBS equivalent --- docs/Users_Guide/glossary.rst | 15 +++++++-- docs/Users_Guide/wrappers.rst | 63 +++++++++++++++++++++++------------ 2 files changed, 54 insertions(+), 24 deletions(-) diff --git a/docs/Users_Guide/glossary.rst b/docs/Users_Guide/glossary.rst index 90176c3dc7..fee8163874 100644 --- a/docs/Users_Guide/glossary.rst +++ b/docs/Users_Guide/glossary.rst @@ -1468,7 +1468,12 @@ METplus Configuration Glossary | *Used by:* PointStat POINT_STAT_FCST_FILE_TYPE - Specify the value for 'fcst_file_type' in the MET configuration file for PointStat. + Specify the value for 'fcst.file_type' in the MET configuration file for PointStat. + + | *Used by:* PointStat + + POINT_STAT_OBS_FILE_TYPE + Specify the value for 'obs.file_type' in the MET configuration file for PointStat. | *Used by:* PointStat @@ -2470,10 +2475,14 @@ METplus Configuration Glossary | *Used by:* MODE MODE_FCST_FILE_TYPE - Specify the value for 'fcst_file_type' in the MET configuration file for PointStat. + Specify the value for 'fcst.file_type' in the MET configuration file for MODE. - | *Used by:* MODE + | *Used by:* MODE + + MODE_OBS_FILE_TYPE + Specify the value for 'obs.file_type' in the MET configuration file for MODE. + | *Used by:* MODE MODE_MERGE_CONFIG_FILE Path to mode merge config file. diff --git a/docs/Users_Guide/wrappers.rst b/docs/Users_Guide/wrappers.rst index f3e09c14a8..fc7a0e11d1 100644 --- a/docs/Users_Guide/wrappers.rst +++ b/docs/Users_Guide/wrappers.rst @@ -4055,11 +4055,12 @@ METplus Configuration | :term:`FCST_MODE_VAR_LEVELS` (optional) | :term:`FCST_MODE_VAR_THRESH` (optional) | :term:`FCST_MODE_VAR_OPTIONS` (optional) +| :term:`MODE_FCST_FILE_TYPE` (optional) | :term:`OBS_MODE_VAR_NAME` (optional) | :term:`OBS_MODE_VAR_LEVELS` (optional) | :term:`OBS_MODE_VAR_THRESH` (optional) | :term:`OBS_MODE_VAR_OPTIONS` (optional) -| :term:`MODE_FCST_FILE_TYPE` (optional) +| :term:`MODE_OBS_FILE_TYPE` (optional) | .. warning:: **DEPRECATED:** @@ -4121,19 +4122,6 @@ see :ref:`How METplus controls MET config file settings`. * - :term:`OBTYPE` - obtype -**${METPLUS_FCST_FILE_TYPE}** - -.. list-table:: - :widths: 5 5 - :header-rows: 0 - - * - METplus Config(s) - - MET Config File - * - :term:`POINT_STAT_FCST_FILE_TYPE` - - fcst.file.type - -.. note:: For more information on controlling the forecast file type attribute in METplus, please see the :ref:`Field_Info` section of the User's Guide. - **${METPLUS_REGRID_DICT}** .. list-table:: @@ -4238,6 +4226,18 @@ see :ref:`How METplus controls MET config file settings`. * - :term:`MODE_FCST_MERGE_FLAG` - fcst.merge_flag +**${METPLUS_FCST_FILE_TYPE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`MODE_FCST_FILE_TYPE` + - fcst.file_type + + **${METPLUS_OBS_FIELD}** .. list-table:: @@ -4301,6 +4301,17 @@ see :ref:`How METplus controls MET config file settings`. * - :term:`OBS_MODE_MERGE_FLAG` - obs.merge_flag +**${METPLUS_OBS_FILE_TYPE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`MODE_OBS_FILE_TYPE` + - obs.file_type + **${METPLUS_MASK_POLY}** .. list-table:: @@ -5303,6 +5314,8 @@ Configuration | :term:`POINT_STAT_OFFSETS` | :term:`FCST_POINT_STAT_INPUT_DATATYPE` | :term:`OBS_POINT_STAT_INPUT_DATATYPE` +| :term:`POINT_STAT_FCST_FILE_TYPE` +| :term:`POINT_STAT_OBS_FILE_TYPE` | :term:`POINT_STAT_CONFIG_FILE` | :term:`MODEL` | :term:`POINT_STAT_REGRID_TO_GRID` @@ -5397,7 +5410,6 @@ Configuration | :term:`OBS_POINT_STAT_VAR_OPTIONS` (optional) | :term:`POINT_STAT_OBS_VALID_BEG` (optional) | :term:`POINT_STAT_OBS_VALID_END` (optional) -| :term:`POINT_STAT_FCST_FILE_TYPE` (optional) | .. warning:: **DEPRECATED:** @@ -5514,9 +5526,7 @@ see :ref:`How METplus controls MET config file settings`. * - METplus Config(s) - MET Config File * - :term:`POINT_STAT_FCST_FILE_TYPE` - - fcst.file.type - -.. note:: For more information on controlling the forecast file type attribute in METplus, please see the :ref:`Field_Info` section of the User's Guide. + - fcst.file_type **${METPLUS_OBS_FIELD}** @@ -5527,16 +5537,27 @@ see :ref:`How METplus controls MET config file settings`. * - METplus Config(s) - MET Config File * - :term:`OBS_VAR_NAME` - - fcst.field.name + - obs.field.name * - :term:`OBS_VAR_LEVELS` - - fcst.field.level + - obs.field.level * - :term:`OBS_VAR_THRESH` - - fcst.field.cat_thresh + - obs.field.cat_thresh * - :term:`OBS_VAR_OPTIONS` - n/a .. note:: For more information on controlling the observation field attributes in METplus, please see the :ref:`Field_Info` section of the User's Guide. +**${METPLUS_OBS_FILE_TYPE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`POINT_STAT_OBS_FILE_TYPE` + - obs.file_type + **${METPLUS_MESSAGE_TYPE}** .. list-table:: From 3abee57ad01ff892c164f3c261ba58b7c3a6f60a Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 14 Feb 2022 16:57:51 -0700 Subject: [PATCH 3/7] per #1165, fixed unit test --- internal_tests/pytests/mode/test_mode_wrapper.py | 4 +++- .../pytests/point_stat/test_point_stat_wrapper.py | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/internal_tests/pytests/mode/test_mode_wrapper.py b/internal_tests/pytests/mode/test_mode_wrapper.py index 9227771d13..439bdfed28 100644 --- a/internal_tests/pytests/mode/test_mode_wrapper.py +++ b/internal_tests/pytests/mode/test_mode_wrapper.py @@ -307,7 +307,9 @@ def set_minimum_config_settings(config): ({'MODE_CT_STATS_FLAG': 'True', }, {'METPLUS_CT_STATS_FLAG': 'ct_stats_flag = TRUE;'}), ({'MODE_FCST_FILE_TYPE': 'NETCDF_PINT', }, - {'METPLUS_FCST_FILE_TYPE': 'fcst_file_type = NETCDF_PINT;'}), + {'METPLUS_FCST_FILE_TYPE': 'file_type = NETCDF_PINT;'}), + ({'MODE_OBS_FILE_TYPE': 'NETCDF_PINT', }, + {'METPLUS_OBS_FILE_TYPE': 'file_type = NETCDF_PINT;'}), ] ) def test_mode_single_field(metplus_config, config_overrides, diff --git a/internal_tests/pytests/point_stat/test_point_stat_wrapper.py b/internal_tests/pytests/point_stat/test_point_stat_wrapper.py index 11b405e821..d7d4ff8167 100755 --- a/internal_tests/pytests/point_stat/test_point_stat_wrapper.py +++ b/internal_tests/pytests/point_stat/test_point_stat_wrapper.py @@ -459,10 +459,10 @@ def test_met_dictionary_in_var_options(metplus_config): 'prob_cat_thresh = [>1, <=2];}')}), ({'POINT_STAT_MESSAGE_TYPE_GROUP_MAP': '{ key = "SURFACE"; val = "ADPSFC,SFCSHP,MSONET";},{ key = "ANYAIR"; val = "AIRCAR,AIRCFT";}', }, {'METPLUS_MESSAGE_TYPE_GROUP_MAP': 'message_type_group_map = [{ key = "SURFACE"; val = "ADPSFC,SFCSHP,MSONET";}, { key = "ANYAIR"; val = "AIRCAR,AIRCFT";}];'}), - ({'POINT_STAT_FCST_FILE_TYPE': 'NETCDF_PINT', }, - {'METPLUS_FCST_FILE_TYPE': 'fcst_file_typE = NETCDF_PINT;'}), - + {'METPLUS_FCST_FILE_TYPE': 'file_type = NETCDF_PINT;'}), + ({'POINT_STAT_FCST_FILE_TYPE': 'NETCDF_PINT', }, + {'METPLUS_FCST_FILE_TYPE': 'file_type = NETCDF_PINT;'}), ] ) def test_point_stat_all_fields(metplus_config, config_overrides, From 7d2c7c559d5128e4db010b02476508f8a8a715fe Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 14 Feb 2022 16:58:21 -0700 Subject: [PATCH 4/7] per #1165, fixed read of new METplus config and add OBS equivalent --- metplus/wrappers/mode_wrapper.py | 22 ++++++++++++++++++---- metplus/wrappers/point_stat_wrapper.py | 21 ++++++++++++++++++--- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/metplus/wrappers/mode_wrapper.py b/metplus/wrappers/mode_wrapper.py index 3325a59c75..e8e1f0f3a4 100755 --- a/metplus/wrappers/mode_wrapper.py +++ b/metplus/wrappers/mode_wrapper.py @@ -59,6 +59,7 @@ class MODEWrapper(CompareGriddedWrapper): 'METPLUS_PS_PLOT_FLAG', 'METPLUS_CT_STATS_FLAG', 'METPLUS_FCST_FILE_TYPE', + 'METPLUS_OBS_FILE_TYPE', ] # handle deprecated env vars used pre v4.0.0 @@ -359,10 +360,23 @@ def create_c_dict(self): self.add_met_config(name='ct_stats_flag', data_type='bool') - self.add_met_config(name='fcst_file_type', - data_type='string' - metplus_configs=['POINT_STAT_FCST_FILE_TYPE']) - + self.add_met_config(name='file_type', + data_type='string', + env_var_name='FCST_FILE_TYPE', + metplus_configs=['MODE_FCST_FILE_TYPE', + 'FCST_MODE_FILE_TYPE', + 'MODE_FILE_TYPE'], + extra_args={'remove_quotes': True, + 'uppercase': True}) + + self.add_met_config(name='file_type', + data_type='string', + env_var_name='OBS_FILE_TYPE', + metplus_configs=['MODE_OBS_FILE_TYPE', + 'OBS_MODE_FILE_TYPE', + 'MODE_FILE_TYPE'], + extra_args={'remove_quotes': True, + 'uppercase': True}) c_dict['ALLOW_MULTIPLE_FILES'] = False diff --git a/metplus/wrappers/point_stat_wrapper.py b/metplus/wrappers/point_stat_wrapper.py index 48ce04222b..9f5a1645c2 100755 --- a/metplus/wrappers/point_stat_wrapper.py +++ b/metplus/wrappers/point_stat_wrapper.py @@ -45,6 +45,7 @@ class PointStatWrapper(CompareGriddedWrapper): 'METPLUS_HIRA_DICT', 'METPLUS_MESSAGE_TYPE_GROUP_MAP', 'METPLUS_FCST_FILE_TYPE', + 'METPLUS_OBS_FILE_TYPE', ] # handle deprecated env vars used pre v4.0.0 @@ -183,9 +184,23 @@ def create_c_dict(self): self.add_met_config(name='message_type', data_type='list') - self.add_met_config(name='fcst_file_type', - data_type='string' - metplus_configs=['POINT_STAT_FCST_FILE_TYPE']) + self.add_met_config(name='file_type', + data_type='string', + env_var_name='FCST_FILE_TYPE', + metplus_configs=['POINT_STAT_FCST_FILE_TYPE', + 'FCST_POINT_STAT_FILE_TYPE', + 'POINT_STAT_FILE_TYPE'], + extra_args={'remove_quotes': True, + 'uppercase': True}) + + self.add_met_config(name='file_type', + data_type='string', + env_var_name='OBS_FILE_TYPE', + metplus_configs=['POINT_STAT_OBS_FILE_TYPE', + 'OBS_POINT_STAT_FILE_TYPE', + 'POINT_STAT_FILE_TYPE'], + extra_args={'remove_quotes': True, + 'uppercase': True}) self.handle_climo_cdf_dict() From 6de833627e7740869897d5ea87dbad0f9894af3f Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 14 Feb 2022 16:58:41 -0700 Subject: [PATCH 5/7] per #1165, add OBS equivalent env var --- parm/met_config/MODEConfig_wrapped | 1 + 1 file changed, 1 insertion(+) diff --git a/parm/met_config/MODEConfig_wrapped b/parm/met_config/MODEConfig_wrapped index 64608ca90a..6a386c40a0 100644 --- a/parm/met_config/MODEConfig_wrapped +++ b/parm/met_config/MODEConfig_wrapped @@ -73,6 +73,7 @@ obs = { ${METPLUS_OBS_FILTER_ATTR_THRESH} ${METPLUS_OBS_MERGE_THRESH} ${METPLUS_OBS_MERGE_FLAG} + ${METPLUS_OBS_FILE_TYPE} } //////////////////////////////////////////////////////////////////////////////// From 992c62d65f3463b9af8dcac9cf35966c2cec9f15 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 14 Feb 2022 16:59:09 -0700 Subject: [PATCH 6/7] per #1165, moved env var into fcst dictionary and added obs equivalent --- parm/met_config/PointStatConfig_wrapped | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/parm/met_config/PointStatConfig_wrapped b/parm/met_config/PointStatConfig_wrapped index e8a9a4d110..6204a192e3 100644 --- a/parm/met_config/PointStatConfig_wrapped +++ b/parm/met_config/PointStatConfig_wrapped @@ -48,10 +48,12 @@ rank_corr_flag = FALSE; // Forecast and observation fields to be verified // fcst = { + ${METPLUS_FCST_FILE_TYPE} ${METPLUS_FCST_FIELD} } obs = { + ${METPLUS_OBS_FILE_TYPE} ${METPLUS_OBS_FIELD} } //////////////////////////////////////////////////////////////////////////////// @@ -80,11 +82,6 @@ obs_perc_value = 50; //message_type_group_map = ${METPLUS_MESSAGE_TYPE_GROUP_MAP} -// -// Forecast file type string. -// -${METPLUS_FCST_FILE_TYPE} - //////////////////////////////////////////////////////////////////////////////// // From 24bebd7d0ce6532fe2f443baef3d7faec381c30a Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 14 Feb 2022 16:59:36 -0700 Subject: [PATCH 7/7] per #1165, move example config variables closer to related variables --- parm/use_cases/met_tool_wrapper/MODE/MODE.conf | 6 +++++- parm/use_cases/met_tool_wrapper/PointStat/PointStat.conf | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/parm/use_cases/met_tool_wrapper/MODE/MODE.conf b/parm/use_cases/met_tool_wrapper/MODE/MODE.conf index 8a1f679987..188ff00c69 100644 --- a/parm/use_cases/met_tool_wrapper/MODE/MODE.conf +++ b/parm/use_cases/met_tool_wrapper/MODE/MODE.conf @@ -32,6 +32,9 @@ OBTYPE = WRF MODE_CONFIG_FILE = {PARM_BASE}/met_config/MODEConfig_wrapped + +#MODE_FCST_FILE_TYPE = + FCST_VAR1_NAME = RH FCST_VAR1_LEVELS = P500 @@ -49,6 +52,8 @@ FCST_MODE_MERGE_FLAG = NONE FCST_IS_PROB = false +#MODE_OBS_FILE_TYPE = + OBS_VAR1_NAME = RH OBS_VAR1_LEVELS = P500 @@ -120,4 +125,3 @@ MODE_QUILT = True #MODE_PS_PLOT_FLAG = #MODE_CT_STATS_FLAG = -#MODE_FCST_FILE_TYPE = diff --git a/parm/use_cases/met_tool_wrapper/PointStat/PointStat.conf b/parm/use_cases/met_tool_wrapper/PointStat/PointStat.conf index 07a3f4ce6c..dfa83ecf4e 100644 --- a/parm/use_cases/met_tool_wrapper/PointStat/PointStat.conf +++ b/parm/use_cases/met_tool_wrapper/PointStat/PointStat.conf @@ -38,6 +38,9 @@ POINT_STAT_CLIMO_STDEV_INPUT_TEMPLATE = POINT_STAT_ONCE_PER_FIELD = False +#POINT_STAT_FCST_FILE_TYPE = +#POINT_STAT_OBS_FILE_TYPE = + FCST_VAR1_NAME = TMP FCST_VAR1_LEVELS = P750-900 FCST_VAR1_THRESH = <=273, >273 @@ -140,4 +143,3 @@ POINT_STAT_MESSAGE_TYPE = ADPUPA, ADPSFC #POINT_STAT_HIRA_PROB_CAT_THRESH = #POINT_STAT_MESSAGE_TYPE_GROUP_MAP = -#POINT_STAT_FCST_FILE_TYPE =