Skip to content

Commit

Permalink
per #1464, add support for setting prob_cat_thresh in the wrapped MET…
Browse files Browse the repository at this point in the history
… config file for EnsembleStat
  • Loading branch information
georgemccabe committed Mar 7, 2022
1 parent bb3ff85 commit 9790a71
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9152,6 +9152,11 @@ METplus Configuration Glossary

| *Used by:* SeriesAnalysis
ENSEMBLE_STAT_PROB_CAT_THRESH
Specify the value for 'prob_cat_thresh' in the MET configuration file for EnsembleStat.

| *Used by:* EnsembleStat
ENSEMBLE_STAT_PROB_PCT_THRESH
Specify the value for 'prob_pct_thresh' in the MET configuration file for EnsembleStat.

Expand Down
12 changes: 12 additions & 0 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ METplus Configuration
| :term:`ENSEMBLE_STAT_ENS_MEMBER_IDS`
| :term:`ENSEMBLE_STAT_CONTROL_ID`
| :term:`ENSEMBLE_STAT_GRID_WEIGHT_FLAG`
| :term:`ENSEMBLE_STAT_PROB_CAT_THRESH`
| :term:`ENSEMBLE_STAT_PROB_PCT_THRESH`
| :term:`ENSEMBLE_STAT_ECLV_POINTS`
| :term:`ENSEMBLE_STAT_VERIFICATION_MASK_TEMPLATE` (optional)
Expand Down Expand Up @@ -514,6 +515,17 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
* - :term:`ENSEMBLE_STAT_NMEP_SMOOTH_WIDTH`
- nmep_smooth.type.width

**${METPLUS_PROB_CAT_THRESH}**

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

* - METplus Config(s)
- MET Config File
* - :term:`ENSEMBLE_STAT_PROB_CAT_THRESH`
- prob_cat_thresh

**${METPLUS_PROB_PCT_THRESH}**

.. list-table::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,9 @@ def test_handle_climo_file_variables(metplus_config, config_overrides,
({'ENSEMBLE_STAT_GRID_WEIGHT_FLAG': 'COS_LAT', },
{'METPLUS_GRID_WEIGHT_FLAG': 'grid_weight_flag = COS_LAT;'}),
({'ENSEMBLE_STAT_PROB_CAT_THRESH': '<=0.25', },
{'METPLUS_PROB_CAT_THRESH': 'prob_cat_thresh = [<=0.25];'}),
({'ENSEMBLE_STAT_PROB_PCT_THRESH': '==0.25', },
{'METPLUS_PROB_PCT_THRESH': 'prob_pct_thresh = [==0.25];'}),
Expand Down
5 changes: 5 additions & 0 deletions metplus/wrappers/ensemble_stat_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class EnsembleStatWrapper(CompareGriddedWrapper):
'METPLUS_ENS_MEMBER_IDS',
'METPLUS_CONTROL_ID',
'METPLUS_GRID_WEIGHT_FLAG',
'METPLUS_PROB_CAT_THRESH',
'METPLUS_PROB_PCT_THRESH',
'METPLUS_ECLV_POINTS',
]
Expand Down Expand Up @@ -361,6 +362,10 @@ def create_c_dict(self):
self.add_met_config(name='eclv_points',
data_type='float')

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

# old method of setting MET config values
c_dict['ENS_THRESH'] = (
self.config.getstr('config', 'ENSEMBLE_STAT_ENS_THRESH', '1.0')
Expand Down
5 changes: 5 additions & 0 deletions parm/met_config/EnsembleStatConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ ${METPLUS_NBRHD_PROB_DICT}
//
${METPLUS_NMEP_SMOOTH_DICT}

////////////////////////////////////////////////////////////////////////////////

//prob_cat_thresh =
${METPLUS_PROB_CAT_THRESH}

//prob_pct_thresh =
${METPLUS_PROB_PCT_THRESH}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ ENSEMBLE_STAT_DESC = NA
OBS_ENSEMBLE_STAT_WINDOW_BEGIN = -5400
OBS_ENSEMBLE_STAT_WINDOW_END = 5400

#ENSEMBLE_STAT_PROB_PCT_THRESH = ==0.25
#ENSEMBLE_STAT_ECLV_POINTS = 0.05

ENSEMBLE_STAT_ENS_THRESH = 1.0

ENSEMBLE_STAT_ENS_VLD_THRESH = 1.0
Expand Down Expand Up @@ -134,6 +131,10 @@ ENSEMBLE_STAT_NMEP_SMOOTH_GAUSSIAN_RADIUS = 120
ENSEMBLE_STAT_NMEP_SMOOTH_METHOD = GAUSSIAN
ENSEMBLE_STAT_NMEP_SMOOTH_WIDTH = 1

#ENSEMBLE_STAT_PROB_CAT_THRESH =
#ENSEMBLE_STAT_PROB_PCT_THRESH = ==0.25
#ENSEMBLE_STAT_ECLV_POINTS = 0.05

ENSEMBLE_STAT_MESSAGE_TYPE = ADPSFC

ENSEMBLE_STAT_DUPLICATE_FLAG = NONE
Expand Down

0 comments on commit 9790a71

Please sign in to comment.