Skip to content

Commit

Permalink
per #896, add support for setting interp12 in TCPairs wrapped MET con…
Browse files Browse the repository at this point in the history
…fig file
  • Loading branch information
georgemccabe committed Dec 16, 2021
1 parent eaa2b09 commit 2e5f4b6
Show file tree
Hide file tree
Showing 8 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 @@ -8592,3 +8592,8 @@ METplus Configuration Glossary
Specify the value for 'check_dup' in the MET configuration file for TCPairs.

| *Used by:* TCPairs
TC_PAIRS_INTERP12
Specify the value for 'interp12' in the MET configuration file for TCPairs.

| *Used by:* TCPairs
12 changes: 12 additions & 0 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7419,6 +7419,7 @@ METplus Configuration
| :term:`TC_PAIRS_SKIP_LEAD_SEQ`
| :term:`TC_PAIRS_RUN_ONCE`
| :term:`TC_PAIRS_CHECK_DUP`
| :term:`TC_PAIRS_INTERP12`
|
.. warning:: **DEPRECATED:**
Expand Down Expand Up @@ -7679,6 +7680,17 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
* - :term:`TC_PAIRS_CHECK_DUP`
- check_dup

**${METPLUS_INTERP12}**

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

* - METplus Config(s)
- MET Config File
* - :term:`TC_PAIRS_INTERP12`
- interp12

.. _tcrmw_wrapper:

TCRMW
Expand Down
3 changes: 3 additions & 0 deletions internal_tests/pytests/tc_pairs/test_tc_pairs_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ def test_tc_pairs_storm_id_lists(metplus_config, config_overrides,
# 18: check_dup
({'TC_PAIRS_CHECK_DUP': 'False', },
{'METPLUS_CHECK_DUP': 'check_dup = FALSE;'}),
# 19: interp12
({'TC_PAIRS_INTERP12': 'replace', },
{'METPLUS_INTERP12': 'interp12 = REPLACE;'}),
]
)
Expand Down
4 changes: 2 additions & 2 deletions metplus/util/doc_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def print_doc_text(tool_name, met_var, dict_items):
print(f"\n\nIn docs/Users_Guide/wrappers.rst\n\n"
f"Under {wrapper_camel} => "
"MET Configuration section, add:\n"
"\n---------------------------------------------")
"\n---------------------------------------------\n")
var_header = (f"**${{{env_var_name}}}**")

list_table_text = (f"{var_header}\n\n"
Expand All @@ -201,7 +201,7 @@ def print_doc_text(tool_name, met_var, dict_items):
print('\n==================================================\n')
print(f"In docs/Users_Guide/glossary.rst"
"\n\nAdd the following anywhere in the file:\n")
print("---------------------------------------------")
print("---------------------------------------------\n")
for metplus_config_name, met_config_name in zip(metplus_config_names, met_config_values):
glossary_entry = (f" {metplus_config_name}\n"
f" Specify the value for '{met_config_name}' "
Expand Down
6 changes: 6 additions & 0 deletions metplus/wrappers/tc_pairs_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class TCPairsWrapper(CommandBuilder):
'METPLUS_VALID_INC',
'METPLUS_VALID_EXC',
'METPLUS_CHECK_DUP',
'METPLUS_INTERP12',
]

WILDCARDS = {
Expand Down Expand Up @@ -171,6 +172,11 @@ def create_c_dict(self):
self.add_met_config(name='check_dup',
data_type='bool')

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

# if looping by processes, get the init or valid beg time and run once
c_dict['INPUT_DICT'] = self.get_start_time_input_dict()

Expand Down
3 changes: 2 additions & 1 deletion parm/met_config/TCPairsConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ ${METPLUS_CHECK_DUP}
// Specify special processing to be performed for interpolated models.
// Set to NONE, FILL, or REPLACE.
//
interp12 = REPLACE;
//interp12 =
${METPLUS_INTERP12}

//
// Specify how consensus forecasts should be defined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,5 @@ TC_PAIRS_MISSING_VAL = -9999
#TC_PAIRS_CONSENSUS1_MIN_REQ =

#TC_PAIRS_CHECK_DUP =

#TC_PAIRS_INTERP12 =
2 changes: 2 additions & 0 deletions parm/use_cases/met_tool_wrapper/TCPairs/TCPairs_tropical.conf
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ TC_PAIRS_DLAND_FILE = MET_BASE/tc_data/dland_global_tenth_degree.nc
#TC_PAIRS_CONSENSUS1_MIN_REQ =

#TC_PAIRS_CHECK_DUP =

#TC_PAIRS_INTERP12 =

0 comments on commit 2e5f4b6

Please sign in to comment.