Skip to content

Commit

Permalink
Per #2340, add support for setting one_time_per_file_flag via METplus…
Browse files Browse the repository at this point in the history
… config
  • Loading branch information
georgemccabe committed Sep 28, 2023
1 parent 2aef7ef commit 7a4875c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10392,6 +10392,11 @@ METplus Configuration Glossary

| *Used by:* TCDiag
TC_DIAG_ONE_TIME_PER_FILE_FLAG
Specify the value for 'one_time_per_file_flag' in the MET configuration file for TCDiag.

| *Used by:* TCDiag
TC_DIAG_NC_RNG_AZI_FLAG
Specify the value for 'nc_rng_azi_flag' in the MET configuration file for TCDiag.

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 @@ -7791,6 +7791,7 @@ METplus Configuration
| :term:`TC_DIAG_RADIAL_VELOCITY_FIELD_NAME`
| :term:`TC_DIAG_RADIAL_VELOCITY_LONG_FIELD_NAME`
| :term:`TC_DIAG_VORTEX_REMOVAL`
| :term:`TC_DIAG_ONE_TIME_PER_FILE_FLAG`
| :term:`TC_DIAG_NC_RNG_AZI_FLAG`
| :term:`TC_DIAG_NC_DIAG_FLAG`
| :term:`TC_DIAG_CIRA_DIAG_FLAG`
Expand Down Expand Up @@ -8168,6 +8169,17 @@ see :ref:`How METplus controls MET config file settings<metplus-control-met>`.
* - :term:`TC_DIAG_VORTEX_REMOVAL`
- vortex_removal

**${METPLUS_ONE_TIME_PER_FILE_FLAG}**

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

* - METplus Config(s)
- MET Config File
* - :term:`TC_DIAG_ONE_TIME_PER_FILE_FLAG`
- one_time_per_file_flag

**${METPLUS_NC_RNG_AZI_FLAG}**

.. list-table::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ def set_minimum_config_settings(config):
({'TC_DIAG_CIRA_DIAG_FLAG': 'True', }, {'METPLUS_CIRA_DIAG_FLAG': 'cira_diag_flag = TRUE;'}),
({'TC_DIAG_OUTPUT_PREFIX': 'my_prefix', }, {'METPLUS_OUTPUT_PREFIX': 'output_prefix = "my_prefix";'}),
({'TC_DIAG_ONE_TIME_PER_FILE_FLAG': 'false', },
{'METPLUS_ONE_TIME_PER_FILE_FLAG': 'one_time_per_file_flag = FALSE;'}),
]
)
@pytest.mark.wrapper
Expand Down
3 changes: 3 additions & 0 deletions metplus/wrappers/tc_diag_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class TCDiagWrapper(RuntimeFreqWrapper):
'METPLUS_NC_RNG_AZI_FLAG',
'METPLUS_CIRA_DIAG_FLAG',
'METPLUS_OUTPUT_PREFIX',
'METPLUS_ONE_TIME_PER_FILE_FLAG',
]

def __init__(self, config, instance=None):
Expand Down Expand Up @@ -220,6 +221,8 @@ def create_c_dict(self):

self.add_met_config(name='vortex_removal', data_type='bool')

self.add_met_config(name='one_time_per_file_flag', data_type='bool')

self.add_met_config(name='nc_rng_azi_flag', data_type='bool')
self.add_met_config(name='nc_diag_flag', data_type='bool')
self.add_met_config(name='cira_diag_flag', data_type='bool')
Expand Down
3 changes: 3 additions & 0 deletions parm/met_config/TCDiagConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ ${METPLUS_VORTEX_REMOVAL}

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

//one_time_per_file_flag =
${METPLUS_ONE_TIME_PER_FILE_FLAG}

//
// Flags to control output files
//
Expand Down
1 change: 1 addition & 0 deletions parm/use_cases/met_tool_wrapper/TCDiag/TCDiag.conf
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ TC_DIAG_DOMAIN_INFO2_DELTA_RANGE_KM = 2.0
#TC_DIAG_RADIAL_VELOCITY_FIELD_NAME =
#TC_DIAG_RADIAL_VELOCITY_LONG_FIELD_NAME =
#TC_DIAG_VORTEX_REMOVAL =
#TC_DIAG_ONE_TIME_PER_FILE_FLAG =
#TC_DIAG_NC_RNG_AZI_FLAG =
#TC_DIAG_NC_DIAG_FLAG =
#TC_DIAG_CIRA_DIAG_FLAG =
Expand Down

0 comments on commit 7a4875c

Please sign in to comment.