Skip to content

Commit

Permalink
deprecated TC_DIAG_CENSOR_THRESH, TC_DIAG_CENSOR_VAL, and TC_DIAG_CON…
Browse files Browse the repository at this point in the history
…VERT in favor of setting those values via BOTH_VAR<n>_OPTIONS for each field
  • Loading branch information
georgemccabe committed Nov 29, 2023
1 parent 93678a4 commit 3d52ed4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 93 deletions.
12 changes: 3 additions & 9 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10303,19 +10303,13 @@ METplus Configuration Glossary
| *Used by:* TCDiag
TC_DIAG_CENSOR_THRESH
Specify the value for 'censor_thresh' in the MET configuration file for TCDiag.

| *Used by:* TCDiag
.. warning:: **DEPRECATED:** Please use :term:`BOTH_VAR<n>_OPTIONS` instead.

TC_DIAG_CENSOR_VAL
Specify the value for 'censor_val' in the MET configuration file for TCDiag.

| *Used by:* TCDiag
.. warning:: **DEPRECATED:** Please use :term:`BOTH_VAR<n>_OPTIONS` instead.

TC_DIAG_CONVERT
Specify the value for 'convert' in the MET configuration file for TCDiag.

| *Used by:* TCDiag
.. warning:: **DEPRECATED:** Please use :term:`BOTH_VAR<n>_OPTIONS` instead.

TC_DIAG_DATA_DOMAIN
Specify the value for 'data.domain' in the MET configuration file for TCDiag.
Expand Down
39 changes: 0 additions & 39 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8225,9 +8225,6 @@ METplus Configuration
| :term:`TC_DIAG_DOMAIN_INFO<n>_N_AZIMUTH`
| :term:`TC_DIAG_DOMAIN_INFO<n>_DELTA_RANGE_KM`
| :term:`TC_DIAG_DOMAIN_INFO<n>_DIAG_SCRIPT`
| :term:`TC_DIAG_CENSOR_THRESH`
| :term:`TC_DIAG_CENSOR_VAL`
| :term:`TC_DIAG_CONVERT`
| :term:`TC_DIAG_INPUT_DATATYPE`
| :term:`TC_DIAG_DATA_DOMAIN`
| :term:`TC_DIAG_DATA_LEVEL`
Expand Down Expand Up @@ -8448,42 +8445,6 @@ ${METPLUS_DOMAIN_INFO_LIST}
* - :term:`TC_DIAG_DOMAIN_INFO<n>_DIAG_SCRIPT`
- domain_info.diag_script

${METPLUS_CENSOR_THRESH}
""""""""""""""""""""""""

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

* - METplus Config(s)
- MET Config File
* - :term:`TC_DIAG_CENSOR_THRESH`
- censor_thresh

${METPLUS_CENSOR_VAL}
"""""""""""""""""""""

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

* - METplus Config(s)
- MET Config File
* - :term:`TC_DIAG_CENSOR_VAL`
- censor_val

${METPLUS_CONVERT}
""""""""""""""""""

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

* - METplus Config(s)
- MET Config File
* - :term:`TC_DIAG_CONVERT`
- convert

${METPLUS_DATA_FILE_TYPE}
"""""""""""""""""""""""""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,6 @@ def set_minimum_config_settings(config):
},
{'METPLUS_DOMAIN_INFO_LIST': 'domain_info = [{domain = "parent";n_range = 150;n_azimuth = 8;delta_range_km = 10.0;diag_script = ["MET_BASE/python/tc_diag/compute_all_diagnostics.py", "MET_BASE/python/tc_diag/compute_custom_diagnostics.py"];},{domain = "nest";n_range = 100;n_azimuth = 7;delta_range_km = 12.0;diag_script = ["MET_BASE/python/tc_diag/compute_sst_diagnostics.py"];}];'}),
({'TC_DIAG_CENSOR_THRESH': '>12000,<5000', },
{'METPLUS_CENSOR_THRESH': 'censor_thresh = [>12000, <5000];'}),
({'TC_DIAG_CENSOR_VAL': '12000,5000', },
{'METPLUS_CENSOR_VAL': 'censor_val = [12000, 5000];'}),
({'TC_DIAG_CONVERT': '2*x', },
{'METPLUS_CONVERT': 'convert(x) = 2*x;'}),
({'TC_DIAG_DATA_DOMAIN': 'parent,nest', },
{'METPLUS_DATA_DOMAIN': 'domain = ["parent", "nest"];'}),
Expand Down
19 changes: 3 additions & 16 deletions metplus/wrappers/tc_diag_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ class TCDiagWrapper(RuntimeFreqWrapper):
'METPLUS_LEAD_LIST',
'METPLUS_DIAG_SCRIPT',
'METPLUS_DOMAIN_INFO_LIST',
'METPLUS_CENSOR_THRESH',
'METPLUS_CENSOR_VAL',
'METPLUS_CONVERT',
'METPLUS_DATA_FILE_TYPE',
'METPLUS_DATA_DOMAIN',
'METPLUS_DATA_LEVEL',
Expand All @@ -71,6 +68,9 @@ class TCDiagWrapper(RuntimeFreqWrapper):
DEPRECATED_WRAPPER_ENV_VAR_KEYS = [
'OUTPUT_PREFIX',
'METPLUS_OUTPUT_PREFIX',
'METPLUS_CENSOR_THRESH',
'METPLUS_CENSOR_VAL',
'METPLUS_CONVERT',
]

def __init__(self, config, instance=None):
Expand Down Expand Up @@ -177,19 +177,6 @@ def create_c_dict(self):
dict_items=dict_items):
self.isOK = False

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

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

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

# handle data dictionary, including field, domain, level, and file_type
c_dict['VAR_LIST_TEMP'] = parse_var_list(self.config,
data_type='FCST',
Expand Down
20 changes: 5 additions & 15 deletions parm/met_config/TCDiagConfig_wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,17 @@ ${METPLUS_DOMAIN_INFO_LIST}
////////////////////////////////////////////////////////////////////////////////

//
// Data censoring and conversion
// Cylindrical coordinate transformation regridding options
// May be set separately in each diag_data "field" entry
//
// censor_thresh = [];
${METPLUS_CENSOR_THRESH}

// censor_val = [];
${METPLUS_CENSOR_VAL}

// convert(x) = x;
${METPLUS_CONVERT}
//regrid = {
${METPLUS_REGRID_DICT}


//
// Data fields
// censor_thresh, censor_val, and convert(x) may be set separately
// in each data "field" array entry
//
data = {

Expand All @@ -122,12 +118,6 @@ data = {

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

//
// Regridding options
//
//regrid = {
${METPLUS_REGRID_DICT}

//
// Optionally convert u/v winds to tangential/radial winds
//
Expand Down
5 changes: 0 additions & 5 deletions parm/use_cases/met_tool_wrapper/TCDiag/TCDiag.conf
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ TC_DIAG_DOMAIN_INFO2_N_RANGE = 150
TC_DIAG_DOMAIN_INFO2_N_AZIMUTH = 8
TC_DIAG_DOMAIN_INFO2_DELTA_RANGE_KM = 2.0


#TC_DIAG_CENSOR_THRESH =
#TC_DIAG_CENSOR_VAL =
#TC_DIAG_CONVERT =

#TC_DIAG_DATA_DOMAIN =
#TC_DIAG_DATA_LEVEL =

Expand Down

0 comments on commit 3d52ed4

Please sign in to comment.