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 #2210 MODE multi-variate variable rename #2211

Merged
merged 2 commits into from
Jun 15, 2023
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
2 changes: 1 addition & 1 deletion .github/parm/use_case_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
{
"category": "s2s",
"index_list": "3",
"run": true
"run": false
},
{
"category": "s2s",
Expand Down
8 changes: 4 additions & 4 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10671,8 +10671,8 @@ METplus Configuration Glossary

| *Used by:* MODE

MODE_FCST_MULTIVAR_UNITS
Specify the value for 'fcst.multivar_units' in the MET configuration file for MODE.
MODE_FCST_MULTIVAR_LEVEL
Specify the value for 'fcst.multivar_level' in the MET configuration file for MODE.

| *Used by:* MODE

Expand All @@ -10681,7 +10681,7 @@ METplus Configuration Glossary

| *Used by:* MODE

MODE_OBS_MULTIVAR_UNITS
Specify the value for 'obs.multivar_units' in the MET configuration file for MODE.
MODE_OBS_MULTIVAR_LEVEL
Specify the value for 'obs.multivar_level' in the MET configuration file for MODE.

| *Used by:* MODE
16 changes: 8 additions & 8 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4062,14 +4062,14 @@ METplus Configuration
| :term:`FCST_MODE_VAR<n>_OPTIONS`
| :term:`MODE_FCST_FILE_TYPE`
| :term:`MODE_FCST_MULTIVAR_NAME`
| :term:`MODE_FCST_MULTIVAR_UNITS`
| :term:`MODE_FCST_MULTIVAR_LEVEL`
| :term:`OBS_MODE_VAR<n>_NAME`
| :term:`OBS_MODE_VAR<n>_LEVELS`
| :term:`OBS_MODE_VAR<n>_THRESH`
| :term:`OBS_MODE_VAR<n>_OPTIONS`
| :term:`MODE_OBS_FILE_TYPE`
| :term:`MODE_OBS_MULTIVAR_NAME`
| :term:`MODE_OBS_MULTIVAR_UNITS`
| :term:`MODE_OBS_MULTIVAR_LEVEL`
|

.. warning:: **DEPRECATED:**
Expand Down Expand Up @@ -4285,16 +4285,16 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
* - :term:`MODE_FCST_MULTIVAR_NAME`
- fcst.multivar_name

**${METPLUS_FCST_MULTIVAR_UNITS}**
**${METPLUS_FCST_MULTIVAR_LEVEL}**

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

* - METplus Config(s)
- MET Config File
* - :term:`MODE_FCST_MULTIVAR_UNITS`
- fcst.multivar_units
* - :term:`MODE_FCST_MULTIVAR_LEVEL`
- fcst.multivar_level


**${METPLUS_OBS_FIELD}**
Expand Down Expand Up @@ -4382,16 +4382,16 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
* - :term:`MODE_OBS_MULTIVAR_NAME`
- obs.multivar_name

**${METPLUS_OBS_MULTIVAR_UNITS}**
**${METPLUS_OBS_MULTIVAR_LEVEL}**

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

* - METplus Config(s)
- MET Config File
* - :term:`MODE_OBS_MULTIVAR_UNITS`
- obs.multivar_units
* - :term:`MODE_OBS_MULTIVAR_LEVEL`
- obs.multivar_level

**${METPLUS_MASK_POLY}**

Expand Down
8 changes: 4 additions & 4 deletions internal/tests/pytests/wrappers/mode/test_mode_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,14 @@ def set_minimum_config_settings(config):
({'MODE_FCST_MULTIVAR_NAME': 'Snow', },
{'METPLUS_FCST_MULTIVAR_NAME': 'multivar_name = "Snow";'}),

({'MODE_FCST_MULTIVAR_UNITS': 'L0', },
{'METPLUS_FCST_MULTIVAR_UNITS': 'multivar_units = "L0";'}),
({'MODE_FCST_MULTIVAR_LEVEL': 'L0', },
{'METPLUS_FCST_MULTIVAR_LEVEL': 'multivar_level = "L0";'}),

({'MODE_OBS_MULTIVAR_NAME': 'Precip', },
{'METPLUS_OBS_MULTIVAR_NAME': 'multivar_name = "Precip";'}),

({'MODE_OBS_MULTIVAR_UNITS': 'Z10', },
{'METPLUS_OBS_MULTIVAR_UNITS': 'multivar_units = "Z10";'}),
({'MODE_OBS_MULTIVAR_LEVEL': 'Z10', },
{'METPLUS_OBS_MULTIVAR_LEVEL': 'multivar_level = "Z10";'}),

]
)
Expand Down
16 changes: 8 additions & 8 deletions metplus/wrappers/mode_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ class MODEWrapper(CompareGriddedWrapper):
'METPLUS_MULTIVAR_LOGIC',
'METPLUS_MULTIVAR_INTENSITY',
'METPLUS_FCST_MULTIVAR_NAME',
'METPLUS_FCST_MULTIVAR_UNITS',
'METPLUS_FCST_MULTIVAR_LEVEL',
'METPLUS_OBS_MULTIVAR_NAME',
'METPLUS_OBS_MULTIVAR_UNITS',
'METPLUS_OBS_MULTIVAR_LEVEL',
]

# handle deprecated env vars used pre v4.0.0
Expand Down Expand Up @@ -416,16 +416,16 @@ def create_c_dict(self):
self.add_met_config(name='multivar_name', data_type='string',
env_var_name='FCST_MULTIVAR_NAME',
metplus_configs=[f'{tool}_FCST_MULTIVAR_NAME'])
self.add_met_config(name='multivar_units', data_type='string',
env_var_name='FCST_MULTIVAR_UNITS',
metplus_configs=[f'{tool}_FCST_MULTIVAR_UNITS'])
self.add_met_config(name='multivar_level', data_type='string',
env_var_name='FCST_MULTIVAR_LEVEL',
metplus_configs=[f'{tool}_FCST_MULTIVAR_LEVEL'])

self.add_met_config(name='multivar_name', data_type='string',
env_var_name='OBS_MULTIVAR_NAME',
metplus_configs=[f'{tool}_OBS_MULTIVAR_NAME'])
self.add_met_config(name='multivar_units', data_type='string',
env_var_name='OBS_MULTIVAR_UNITS',
metplus_configs=[f'{tool}_OBS_MULTIVAR_UNITS'])
self.add_met_config(name='multivar_level', data_type='string',
env_var_name='OBS_MULTIVAR_LEVEL',
metplus_configs=[f'{tool}_OBS_MULTIVAR_LEVEL'])

c_dict['MERGE_CONFIG_FILE'] = (
self.config.getraw('config', f'{tool}_MERGE_CONFIG_FILE', '')
Expand Down
4 changes: 2 additions & 2 deletions parm/met_config/MODEConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fcst = {
${METPLUS_FCST_MERGE_FLAG}
${METPLUS_FCST_FILE_TYPE}
${METPLUS_FCST_MULTIVAR_NAME}
${METPLUS_FCST_MULTIVAR_UNITS}
${METPLUS_FCST_MULTIVAR_LEVEL}
}

obs = {
Expand All @@ -91,7 +91,7 @@ obs = {
${METPLUS_OBS_MERGE_FLAG}
${METPLUS_OBS_FILE_TYPE}
${METPLUS_OBS_MULTIVAR_NAME}
${METPLUS_OBS_MULTIVAR_UNITS}
${METPLUS_OBS_MULTIVAR_LEVEL}
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions parm/use_cases/met_tool_wrapper/MODE/MODE.conf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ FCST_MODE_MERGE_FLAG = NONE
#MODE_FCST_VLD_THRESH =

#MODE_FCST_MULTIVAR_NAME =
#MODE_FCST_MULTIVAR_UNITS =
#MODE_FCST_MULTIVAR_LEVEL =


OBS_VAR1_NAME = RH
Expand All @@ -96,7 +96,7 @@ OBS_MODE_MERGE_FLAG = NONE
#MODE_OBS_VLD_THRESH =

#MODE_OBS_MULTIVAR_NAME =
#MODE_OBS_MULTIVAR_UNITS =
#MODE_OBS_MULTIVAR_LEVEL =


###
Expand Down