Skip to content

Commit

Permalink
per #1953, add support for setting output_flag.seeps and output_flag.…
Browse files Browse the repository at this point in the history
…seeps_mpr in PointStat
  • Loading branch information
georgemccabe committed Dec 2, 2022
1 parent 1b6d81c commit 537b6ff
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 29 deletions.
10 changes: 10 additions & 0 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7037,6 +7037,16 @@ METplus Configuration Glossary

| *Used by:* PointStat
POINT_STAT_OUTPUT_FLAG_SEEPS
Specify the value for 'output_flag.seeps' in the MET configuration file for PointStat.

| *Used by:* PointStat
POINT_STAT_OUTPUT_FLAG_SEEPS_MPR
Specify the value for 'output_flag.seeps_mpr' in the MET configuration file for PointStat.

| *Used by:* PointStat
POINT_STAT_INTERP_VLD_THRESH
Specify the value for 'interp.vld_thresh' in the MET configuration file for PointStat.

Expand Down
10 changes: 8 additions & 2 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5708,6 +5708,8 @@ Configuration
| :term:`POINT_STAT_OUTPUT_FLAG_RPS`
| :term:`POINT_STAT_OUTPUT_FLAG_ECLV`
| :term:`POINT_STAT_OUTPUT_FLAG_MPR`
| :term:`POINT_STAT_OUTPUT_FLAG_SEEPS`
| :term:`POINT_STAT_OUTPUT_FLAG_SEEPS_MPR`
| :term:`POINT_STAT_INTERP_VLD_THRESH`
| :term:`POINT_STAT_INTERP_SHAPE`
| :term:`POINT_STAT_INTERP_TYPE_METHOD`
Expand Down Expand Up @@ -6147,14 +6149,18 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
- output_flag.prc
* - :term:`POINT_STAT_OUTPUT_FLAG_ECNT`
- output_flag.ecnt
* - :term:`POINT_STAT_OUTPUT_FLAG_ORANK`
- output_flag.orank
* - :term:`POINT_STAT_OUTPUT_FLAG_RPS`
- output_flag.rps
* - :term:`POINT_STAT_OUTPUT_FLAG_ECLV`
- output_flag.eclv
* - :term:`POINT_STAT_OUTPUT_FLAG_MPR`
- output_flag.mpr
* - :term:`POINT_STAT_OUTPUT_FLAG_ORANK`
- output_flag.orank
* - :term:`POINT_STAT_OUTPUT_FLAG_SEEPS`
- output_flag.seeps
* - :term:`POINT_STAT_OUTPUT_FLAG_SEEPS_MPR`
- output_flag.seeps_mpr

**${METPLUS_INTERP_DICT}**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ def test_met_dictionary_in_var_options(metplus_config):
({'POINT_STAT_OUTPUT_FLAG_ECNT': 'BOTH', },
{'METPLUS_OUTPUT_FLAG_DICT': 'output_flag = {ecnt = BOTH;}'}),
({'POINT_STAT_OUTPUT_FLAG_ORANK': 'BOTH', },
{'METPLUS_OUTPUT_FLAG_DICT': 'output_flag = {orank = BOTH;}'}),
({'POINT_STAT_OUTPUT_FLAG_RPS': 'BOTH', },
{'METPLUS_OUTPUT_FLAG_DICT': 'output_flag = {rps = BOTH;}'}),
Expand All @@ -255,8 +258,11 @@ def test_met_dictionary_in_var_options(metplus_config):
({'POINT_STAT_OUTPUT_FLAG_MPR': 'BOTH', },
{'METPLUS_OUTPUT_FLAG_DICT': 'output_flag = {mpr = BOTH;}'}),
({'POINT_STAT_OUTPUT_FLAG_ORANK': 'BOTH', },
{'METPLUS_OUTPUT_FLAG_DICT': 'output_flag = {orank = BOTH;}'}),
({'POINT_STAT_OUTPUT_FLAG_SEEPS': 'BOTH', },
{'METPLUS_OUTPUT_FLAG_DICT': 'output_flag = {seeps = BOTH;}'}),
({'POINT_STAT_OUTPUT_FLAG_SEEPS_MPR': 'BOTH', },
{'METPLUS_OUTPUT_FLAG_DICT': 'output_flag = {seeps_mpr = BOTH;}'}),
({
'POINT_STAT_OUTPUT_FLAG_FHO': 'BOTH',
Expand All @@ -275,13 +281,21 @@ def test_met_dictionary_in_var_options(metplus_config):
'POINT_STAT_OUTPUT_FLAG_PJC': 'BOTH',
'POINT_STAT_OUTPUT_FLAG_PRC': 'BOTH',
'POINT_STAT_OUTPUT_FLAG_ECNT': 'BOTH',
'POINT_STAT_OUTPUT_FLAG_ORANK': 'BOTH',
'POINT_STAT_OUTPUT_FLAG_RPS': 'BOTH',
'POINT_STAT_OUTPUT_FLAG_ECLV': 'BOTH',
'POINT_STAT_OUTPUT_FLAG_MPR': 'BOTH',
'POINT_STAT_OUTPUT_FLAG_ORANK': 'BOTH',
'POINT_STAT_OUTPUT_FLAG_SEEPS': 'BOTH',
'POINT_STAT_OUTPUT_FLAG_SEEPS_MPR': 'BOTH',
},
{
'METPLUS_OUTPUT_FLAG_DICT': 'output_flag = {fho = BOTH;ctc = BOTH;cts = BOTH;mctc = BOTH;mcts = BOTH;cnt = BOTH;sl1l2 = BOTH;sal1l2 = BOTH;vl1l2 = BOTH;val1l2 = BOTH;vcnt = BOTH;pct = BOTH;pstd = BOTH;pjc = BOTH;prc = BOTH;ecnt = BOTH;rps = BOTH;eclv = BOTH;mpr = BOTH;orank = BOTH;}'}),
{'METPLUS_OUTPUT_FLAG_DICT': (
'output_flag = {fho = BOTH;ctc = BOTH;cts = BOTH;mctc = BOTH;'
'mcts = BOTH;cnt = BOTH;sl1l2 = BOTH;sal1l2 = BOTH;'
'vl1l2 = BOTH;val1l2 = BOTH;vcnt = BOTH;pct = BOTH;pstd = BOTH;'
'pjc = BOTH;prc = BOTH;ecnt = BOTH;orank = BOTH;rps = BOTH;'
'eclv = BOTH;mpr = BOTH;seeps = BOTH;seeps_mpr = BOTH;'
'}'
)}),
({'POINT_STAT_INTERP_VLD_THRESH': '0.5', },
{'METPLUS_INTERP_DICT': 'interp = {vld_thresh = 0.5;}'}),
Expand Down
45 changes: 24 additions & 21 deletions metplus/wrappers/point_stat_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,30 @@ class PointStatWrapper(CompareGriddedWrapper):
'POINT_STAT_MESSAGE_TYPE',
]

OUTPUT_FLAGS = ['fho',
'ctc',
'cts',
'mctc',
'mcts',
'cnt',
'sl1l2',
'sal1l2',
'vl1l2',
'val1l2',
'vcnt',
'pct',
'pstd',
'pjc',
'prc',
'ecnt',
'rps',
'eclv',
'mpr',
'orank',
]
OUTPUT_FLAGS = [
'fho',
'ctc',
'cts',
'mctc',
'mcts',
'cnt',
'sl1l2',
'sal1l2',
'vl1l2',
'val1l2',
'vcnt',
'pct',
'pstd',
'pjc',
'prc',
'ecnt',
'orank',
'rps',
'eclv',
'mpr',
'seeps',
'seeps_mpr',
]

def __init__(self, config, instance=None):
self.app_name = 'point_stat'
Expand Down
4 changes: 3 additions & 1 deletion parm/use_cases/met_tool_wrapper/PointStat/PointStat.conf
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ POINT_STAT_OUTPUT_FLAG_VL1L2 = STAT
#POINT_STAT_OUTPUT_FLAG_PJC =
#POINT_STAT_OUTPUT_FLAG_PRC =
#POINT_STAT_OUTPUT_FLAG_ECNT =
#POINT_STAT_OUTPUT_FLAG_ORANK =
#POINT_STAT_OUTPUT_FLAG_RPS =
#POINT_STAT_OUTPUT_FLAG_ECLV =
#POINT_STAT_OUTPUT_FLAG_MPR =
#POINT_STAT_OUTPUT_FLAG_ORANK =
#POINT_STAT_OUTPUT_FLAG_SEEPS =
#POINT_STAT_OUTPUT_FLAG_SEEPS_MPR =

#POINT_STAT_CLIMO_CDF_BINS = 1
#POINT_STAT_CLIMO_CDF_CENTER_BINS = False
Expand Down

0 comments on commit 537b6ff

Please sign in to comment.