Skip to content

Commit

Permalink
per #1445, add support for setting normalize in the GenEnsProd wrappe…
Browse files Browse the repository at this point in the history
…d MET config file
  • Loading branch information
georgemccabe committed Mar 4, 2022
1 parent afe076d commit 279900d
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9110,3 +9110,8 @@ METplus Configuration Glossary
Specify the value for 'climo_cdf.direct_prob' in the MET configuration file for SeriesAnalysis.

| *Used by:* SeriesAnalysis
GEN_ENS_PROD_NORMALIZE
Specify the value for 'normalize' in the MET configuration file for GenEnsProd.

| *Used by:* GenEnsProd
12 changes: 12 additions & 0 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,7 @@ METplus Configuration
| :term:`GEN_ENS_PROD_CENSOR_THRESH`
| :term:`GEN_ENS_PROD_CENSOR_VAL`
| :term:`GEN_ENS_PROD_CAT_THRESH`
| :term:`GEN_ENS_PROD_NORMALIZE`
| :term:`GEN_ENS_PROD_NC_VAR_STR`
| :term:`GEN_ENS_PROD_ENS_THRESH`
| :term:`GEN_ENS_PROD_ENS_VLD_THRESH`
Expand Down Expand Up @@ -1188,6 +1189,17 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
* - :term:`GEN_ENS_PROD_CENSOR_VAL`
- censor_val

**${METPLUS_NORMALIZE}**

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

* - METplus Config(s)
- MET Config File
* - :term:`GEN_ENS_PROD_NORMALIZE`
- normalize

**${METPLUS_CAT_THRESH}**

.. list-table::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,16 @@ def set_minimum_config_settings(config):
'type = [{method = GAUSSIAN;width = 1;}];}'
)
}),
# 59
({'GEN_ENS_PROD_ENS_MEMBER_IDS': '1,2,3,4', },
{'METPLUS_ENS_MEMBER_IDS': 'ens_member_ids = ["1", "2", "3", "4"];'}),
# 60
({'GEN_ENS_PROD_CONTROL_ID': '0', },
{'METPLUS_CONTROL_ID': 'control_id = "0";'}),
# 61
({'GEN_ENS_PROD_NORMALIZE': 'CLIMO_STD_ANOM', },
{'METPLUS_NORMALIZE': 'normalize = CLIMO_STD_ANOM;'}),
]
)
def test_gen_ens_prod_single_field(metplus_config, config_overrides,
Expand Down
6 changes: 6 additions & 0 deletions metplus/wrappers/gen_ens_prod_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class GenEnsProdWrapper(LoopTimesWrapper):
'METPLUS_ENSEMBLE_FLAG_DICT',
'METPLUS_ENS_MEMBER_IDS',
'METPLUS_CONTROL_ID',
'METPLUS_NORMALIZE',
]

ENSEMBLE_FLAGS = [
Expand Down Expand Up @@ -167,6 +168,11 @@ def create_c_dict(self):
'GEN_ENS_PROD_ENS_VLD_THRESH'],
)

self.add_met_config(name='normalize',
data_type='string',
extra_args={'remove_quotes': True},
)

# parse var list for ENS fields
c_dict['ENS_VAR_LIST_TEMP'] = parse_var_list(
self.config,
Expand Down
3 changes: 3 additions & 0 deletions parm/met_config/GenEnsProdConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ ${METPLUS_CENSOR_THRESH}
//censor_val =
${METPLUS_CENSOR_VAL}

//normalize =
${METPLUS_NORMALIZE}

//cat_thresh =
${METPLUS_CAT_THRESH}

Expand Down
1 change: 1 addition & 0 deletions parm/use_cases/met_tool_wrapper/GenEnsProd/GenEnsProd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ ENS_VAR5_THRESH = >=5.0

#GEN_ENS_PROD_CENSOR_THRESH =
#GEN_ENS_PROD_CENSOR_VAL =
#GEN_ENS_PROD_NORMALIZE =
#GEN_ENS_PROD_CAT_THRESH =
#GEN_ENS_PROD_NC_VAR_STR =

Expand Down

0 comments on commit 279900d

Please sign in to comment.