diff --git a/docs/Users_Guide/glossary.rst b/docs/Users_Guide/glossary.rst index 3c71c5b9aa..2ec8305eaf 100644 --- a/docs/Users_Guide/glossary.rst +++ b/docs/Users_Guide/glossary.rst @@ -8760,6 +8760,11 @@ METplus Configuration Glossary | *Used by:* EnsembleStat + ENSEMBLE_STAT_GRID_WEIGHT_FLAG + Specify the value for 'grid_weight_flag' in the MET configuration file for EnsembleStat. + + | *Used by:* EnsembleStat + FCST_PCP_COMBINE_USE_ZERO_ACCUM Only used if running PCPCombine wrapper with :term:`FCST_PCP_COMBINE_METHOD` = SUBTRACT. If True, build a -subtract diff --git a/docs/Users_Guide/wrappers.rst b/docs/Users_Guide/wrappers.rst index 68c73be4d6..0abd7debb0 100644 --- a/docs/Users_Guide/wrappers.rst +++ b/docs/Users_Guide/wrappers.rst @@ -281,6 +281,7 @@ METplus Configuration | :term:`ENSEMBLE_STAT_MET_CONFIG_OVERRIDES` | :term:`ENSEMBLE_STAT_ENS_MEMBER_IDS` | :term:`ENSEMBLE_STAT_CONTROL_ID` +| :term:`ENSEMBLE_STAT_GRID_WEIGHT_FLAG` | :term:`ENSEMBLE_STAT_VERIFICATION_MASK_TEMPLATE` (optional) | :term:`ENS_VAR_NAME` (optional) | :term:`ENS_VAR_LEVELS` (optional) @@ -890,6 +891,18 @@ see :ref:`How METplus controls MET config file settings`. * - :term:`ENSEMBLE_STAT_MET_CONFIG_OVERRIDES` - n/a +**${METPLUS_GRID_WEIGHT_FLAG}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`ENSEMBLE_STAT_GRID_WEIGHT_FLAG` + - grid_weight_flag + + .. _example_wrapper: Example diff --git a/internal_tests/pytests/ensemble_stat/test_ensemble_stat_wrapper.py b/internal_tests/pytests/ensemble_stat/test_ensemble_stat_wrapper.py index 1ef41cf8e8..4a12ceef65 100644 --- a/internal_tests/pytests/ensemble_stat/test_ensemble_stat_wrapper.py +++ b/internal_tests/pytests/ensemble_stat/test_ensemble_stat_wrapper.py @@ -553,6 +553,9 @@ def test_handle_climo_file_variables(metplus_config, config_overrides, ({'ENSEMBLE_STAT_CONTROL_ID': '0', }, {'METPLUS_CONTROL_ID': 'control_id = "0";'}), + ({'ENSEMBLE_STAT_GRID_WEIGHT_FLAG': 'COS_LAT', }, + {'METPLUS_GRID_WEIGHT_FLAG': 'grid_weight_flag = COS_LAT;'}), + ] ) def test_ensemble_stat_single_field(metplus_config, config_overrides, diff --git a/metplus/wrappers/ensemble_stat_wrapper.py b/metplus/wrappers/ensemble_stat_wrapper.py index 0d8e0141af..b3762465b6 100755 --- a/metplus/wrappers/ensemble_stat_wrapper.py +++ b/metplus/wrappers/ensemble_stat_wrapper.py @@ -66,6 +66,7 @@ class EnsembleStatWrapper(CompareGriddedWrapper): 'METPLUS_OBS_QUALITY_EXC', 'METPLUS_ENS_MEMBER_IDS', 'METPLUS_CONTROL_ID', + 'METPLUS_GRID_WEIGHT_FLAG', ] # handle deprecated env vars used pre v4.0.0 @@ -330,6 +331,11 @@ def create_c_dict(self): self.add_met_config(name='control_id', data_type='string') + self.add_met_config(name='grid_weight_flag', + data_type='string', + extra_args={'remove_quotes': True, + 'uppercase': True}) + # old method of setting MET config values c_dict['ENS_THRESH'] = ( self.config.getstr('config', 'ENSEMBLE_STAT_ENS_THRESH', '1.0') diff --git a/parm/met_config/EnsembleStatConfig_wrapped b/parm/met_config/EnsembleStatConfig_wrapped index e398ca1d1d..1ed2dd7b21 100644 --- a/parm/met_config/EnsembleStatConfig_wrapped +++ b/parm/met_config/EnsembleStatConfig_wrapped @@ -223,7 +223,9 @@ rng = { //////////////////////////////////////////////////////////////////////////////// -grid_weight_flag = NONE; +//grid_weight_flag = +${METPLUS_GRID_WEIGHT_FLAG} + ${METPLUS_OUTPUT_PREFIX} //version = "V9.0"; diff --git a/parm/use_cases/met_tool_wrapper/EnsembleStat/EnsembleStat.conf b/parm/use_cases/met_tool_wrapper/EnsembleStat/EnsembleStat.conf index c7714c0291..6485f36212 100644 --- a/parm/use_cases/met_tool_wrapper/EnsembleStat/EnsembleStat.conf +++ b/parm/use_cases/met_tool_wrapper/EnsembleStat/EnsembleStat.conf @@ -212,3 +212,5 @@ ENSEMBLE_STAT_ENSEMBLE_FLAG_WEIGHT = FALSE #ENSEMBLE_STAT_ENS_MEMBER_IDS = #ENSEMBLE_STAT_CONTROL_ID = + +#ENSEMBLE_STAT_GRID_WEIGHT_FLAG =