Skip to content

Commit

Permalink
Feature #2429 MvMODE multivar intensity (#2603)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe authored Jun 3, 2024
1 parent 8358b6b commit 76219cd
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 16 deletions.
10 changes: 9 additions & 1 deletion docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10420,7 +10420,15 @@ METplus Configuration Glossary
| *Used by:* TCDiag
MODE_MULTIVAR_INTENSITY_FLAG
Specify the value for 'multivar_intensity_flag' in the MET configuration file for MODE.
.. warning:: **DEPRECATED:** Please use :term:`MODE_MULTIVAR_INTENSITY_COMPARE_FCST` and :term:`MODE_MULTIVAR_INTENSITY_COMPARE_OBS` instead.

MODE_MULTIVAR_INTENSITY_COMPARE_FCST
Specify the value for 'multivar_intensity_compare_fcst' in the MET configuration file for MODE.

| *Used by:* MODE
MODE_MULTIVAR_INTENSITY_COMPARE_OBS
Specify the value for 'multivar_intensity_compare_obs' in the MET configuration file for MODE.

| *Used by:* MODE
Expand Down
23 changes: 18 additions & 5 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4587,7 +4587,8 @@ METplus Configuration
| :term:`FCST_MODE_IS_PROB`
| :term:`FCST_MODE_PROB_IN_GRIB_PDS`
| :term:`MODE_MULTIVAR_LOGIC`
| :term:`MODE_MULTIVAR_INTENSITY_FLAG`
| :term:`MODE_MULTIVAR_INTENSITY_COMPARE_FCST`
| :term:`MODE_MULTIVAR_INTENSITY_COMPARE_OBS`
| :term:`FCST_MODE_VAR<n>_NAME`
| :term:`FCST_MODE_VAR<n>_LEVELS`
| :term:`FCST_MODE_VAR<n>_THRESH`
Expand Down Expand Up @@ -4738,17 +4739,29 @@ ${METPLUS_MULTIVAR_LOGIC}
* - :term:`MODE_MULTIVAR_LOGIC`
- multivar_logic

${METPLUS_MULTIVAR_INTENSITY_FLAG}
""""""""""""""""""""""""""""""""""
${METPLUS_MULTIVAR_INTENSITY_COMPARE_FCST}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

* - METplus Config(s)
- MET Config File
* - :term:`MODE_MULTIVAR_INTENSITY_COMPARE_FCST`
- multivar_intensity_compare_fcst

${METPLUS_MULTIVAR_INTENSITY_COMPARE_OBS}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

* - METplus Config(s)
- MET Config File
* - :term:`MODE_MULTIVAR_INTENSITY_FLAG`
- multivar_intensity_flag
* - :term:`MODE_MULTIVAR_INTENSITY_COMPARE_OBS`
- multivar_intensity_compare_obs

${METPLUS_FCST_FIELD}
"""""""""""""""""""""
Expand Down
7 changes: 5 additions & 2 deletions internal/tests/pytests/wrappers/mode/test_mode_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,11 @@ def test_mode_missing_inputs(metplus_config, get_test_data_dir,
({'MODE_MASK_MISSING_FLAG': 'BOTH', },
{'METPLUS_MASK_MISSING_FLAG': 'mask_missing_flag = BOTH;'}),
({'MODE_MULTIVAR_INTENSITY_FLAG': 'false, true,true', },
{'METPLUS_MULTIVAR_INTENSITY_FLAG': 'multivar_intensity_flag = [FALSE, TRUE, TRUE];'}),
({'MODE_MULTIVAR_INTENSITY_COMPARE_FCST': '2, 3', },
{'METPLUS_MULTIVAR_INTENSITY_COMPARE_FCST': 'multivar_intensity_compare_fcst = [2, 3];'}),
({'MODE_MULTIVAR_INTENSITY_COMPARE_OBS': '1,3', },
{'METPLUS_MULTIVAR_INTENSITY_COMPARE_OBS': 'multivar_intensity_compare_obs = [1, 3];'}),
({'MODE_FCST_MULTIVAR_NAME': 'Snow', },
{'METPLUS_FCST_MULTIVAR_NAME': 'multivar_name = "Snow";'}),
Expand Down
13 changes: 9 additions & 4 deletions metplus/wrappers/mode_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class MODEWrapper(CompareGriddedWrapper):
'METPLUS_FCST_FILE_TYPE',
'METPLUS_OBS_FILE_TYPE',
'METPLUS_MULTIVAR_LOGIC',
'METPLUS_MULTIVAR_INTENSITY_FLAG',
'METPLUS_MULTIVAR_INTENSITY_COMPARE_FCST',
'METPLUS_MULTIVAR_INTENSITY_COMPARE_OBS',
'METPLUS_FCST_MULTIVAR_NAME',
'METPLUS_FCST_MULTIVAR_LEVEL',
'METPLUS_OBS_MULTIVAR_NAME',
Expand Down Expand Up @@ -441,9 +442,13 @@ def create_c_dict(self):

self.handle_mask(single_value=True, get_flags=True)

self.add_met_config(name='multivar_intensity_flag', data_type='list',
extra_args={'remove_quotes': True,
'uppercase': True})
self.add_met_config(name='multivar_intensity_compare_fcst',
data_type='list',
extra_args={'remove_quotes': True})
self.add_met_config(name='multivar_intensity_compare_obs',
data_type='list',
extra_args={'remove_quotes': True})

# skip RuntimeFreq input file logic - remove once integrated
c_dict['FIND_FILES'] = False
return c_dict
Expand Down
7 changes: 5 additions & 2 deletions parm/met_config/MODEConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ ${METPLUS_QUILT}
//multivar_logic =
${METPLUS_MULTIVAR_LOGIC}

//multivar_intensity_flag =
${METPLUS_MULTIVAR_INTENSITY_FLAG}
//multivar_intensity_compare_fcst =
${METPLUS_MULTIVAR_INTENSITY_COMPARE_FCST}

//multivar_intensity_compare_obs =
${METPLUS_MULTIVAR_INTENSITY_COMPARE_OBS}

//
// Forecast and observation fields to be verified
Expand Down
3 changes: 2 additions & 1 deletion parm/use_cases/met_tool_wrapper/MODE/MODE.conf
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ OBTYPE = WRF
MODE_CONFIG_FILE = {PARM_BASE}/met_config/MODEConfig_wrapped

#MODE_MULTIVAR_LOGIC =
#MODE_MULTIVAR_INTENSITY_FLAG =
#MODE_MULTIVAR_INTENSITY_COMPARE_FCST =
#MODE_MULTIVAR_INTENSITY_COMPARE_OBS =

MODE_REGRID_TO_GRID = NONE
#MODE_REGRID_METHOD =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ OBTYPE = ANALYSIS

# Run MODE to output super objects
MODE_MULTIVAR_LOGIC = #1 && #2 && #3
MODE_MULTIVAR_INTENSITY_FLAG = FALSE,TRUE,TRUE
MODE_MULTIVAR_INTENSITY_COMPARE_FCST = 2, 3
MODE_MULTIVAR_INTENSITY_COMPARE_OBS = 2, 3

FCST_MODE_INPUT_DIR = {INPUT_BASE}/model_applications/short_range/MODEMultivar_fcstHRRR_obsMRMS_HRRRanl
FCST_MODE_INPUT_TEMPLATE = hrrr.t{init?fmt=%H}z.wrfprsf{lead?fmt=%H}.sub.grib2,hrrr.t{init?fmt=%H}z.wrfprsf{lead?fmt=%H}.sub.grib2,hrrr.t{init?fmt=%H}z.wrfprsf{lead?fmt=%H}.sub.grib2
Expand Down

0 comments on commit 76219cd

Please sign in to comment.