Skip to content

Commit

Permalink
per #2432, add support for setting <N> domain_info.override_diags
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe committed Nov 29, 2023
1 parent 3d52ed4 commit ca54d73
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10302,6 +10302,11 @@ METplus Configuration Glossary

| *Used by:* TCDiag
TC_DIAG_DOMAIN_INFO<n>_OVERRIDE_DIAGS
Specify the value for the nth 'domain_info.override_diags' in the MET configuration file for TCDiag.

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

Expand Down
3 changes: 3 additions & 0 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8225,6 +8225,7 @@ 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_DOMAIN_INFO<n>_OVERRIDE_DIAGS`
| :term:`TC_DIAG_INPUT_DATATYPE`
| :term:`TC_DIAG_DATA_DOMAIN`
| :term:`TC_DIAG_DATA_LEVEL`
Expand Down Expand Up @@ -8444,6 +8445,8 @@ ${METPLUS_DOMAIN_INFO_LIST}
- domain_info.delta_range_km
* - :term:`TC_DIAG_DOMAIN_INFO<n>_DIAG_SCRIPT`
- domain_info.diag_script
* - :term:`TC_DIAG_DOMAIN_INFO<n>_OVERRIDE_DIAGS`
- domain_info.override_diags

${METPLUS_DATA_FILE_TYPE}
"""""""""""""""""""""""""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,26 +101,31 @@ def set_minimum_config_settings(config):
{'METPLUS_DOMAIN_INFO_LIST': 'domain_info = [{delta_range_km = 10.0;}];'}),
({'TC_DIAG_DOMAIN_INFO1_DIAG_SCRIPT': 'MET_BASE/python/tc_diag/compute_all_diagnostics.py,MET_BASE/python/tc_diag/compute_custom_diagnostics.py', },
{'METPLUS_DOMAIN_INFO_LIST': 'domain_info = [{diag_script = ["MET_BASE/python/tc_diag/compute_all_diagnostics.py", "MET_BASE/python/tc_diag/compute_custom_diagnostics.py"];}];'}),
({'TC_DIAG_DOMAIN_INFO1_OVERRIDE_DIAGS': 'RMW,SST', },
{'METPLUS_DOMAIN_INFO_LIST': 'domain_info = [{override_diags = ["RMW", "SST"];}];'}),
({'TC_DIAG_DOMAIN_INFO1_DOMAIN': 'parent',
'TC_DIAG_DOMAIN_INFO1_N_RANGE': '150',
'TC_DIAG_DOMAIN_INFO1_N_AZIMUTH': '8',
'TC_DIAG_DOMAIN_INFO1_DELTA_RANGE_KM': '10.0',
'TC_DIAG_DOMAIN_INFO1_DIAG_SCRIPT': 'MET_BASE/python/tc_diag/compute_all_diagnostics.py,MET_BASE/python/tc_diag/compute_custom_diagnostics.py',
'TC_DIAG_DOMAIN_INFO1_OVERRIDE_DIAGS': 'RMW,SST',
},
{'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"];}];'}),
{'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"];override_diags = ["RMW", "SST"];}];'}),
# domain_info 2 dictionaries in list
({'TC_DIAG_DOMAIN_INFO1_DOMAIN': 'parent',
'TC_DIAG_DOMAIN_INFO1_N_RANGE': '150',
'TC_DIAG_DOMAIN_INFO1_N_AZIMUTH': '8',
'TC_DIAG_DOMAIN_INFO1_DELTA_RANGE_KM': '10.0',
'TC_DIAG_DOMAIN_INFO1_DIAG_SCRIPT': 'MET_BASE/python/tc_diag/compute_all_diagnostics.py,MET_BASE/python/tc_diag/compute_custom_diagnostics.py',
'TC_DIAG_DOMAIN_INFO1_OVERRIDE_DIAGS': 'RMW,SST',
'TC_DIAG_DOMAIN_INFO2_DOMAIN': 'nest',
'TC_DIAG_DOMAIN_INFO2_N_RANGE': '100',
'TC_DIAG_DOMAIN_INFO2_N_AZIMUTH': '7',
'TC_DIAG_DOMAIN_INFO2_DELTA_RANGE_KM': '12.0',
'TC_DIAG_DOMAIN_INFO2_DIAG_SCRIPT': 'MET_BASE/python/tc_diag/compute_sst_diagnostics.py',
'TC_DIAG_DOMAIN_INFO2_OVERRIDE_DIAGS': 'SST',
},
{'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"];}];'}),
{'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"];override_diags = ["RMW", "SST"];},{domain = "nest";n_range = 100;n_azimuth = 7;delta_range_km = 12.0;diag_script = ["MET_BASE/python/tc_diag/compute_sst_diagnostics.py"];override_diags = ["SST"];}];'}),
({'TC_DIAG_DATA_DOMAIN': 'parent,nest', },
{'METPLUS_DATA_DOMAIN': 'domain = ["parent", "nest"];'}),
Expand Down
1 change: 1 addition & 0 deletions metplus/wrappers/tc_diag_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def create_c_dict(self):
'n_azimuth': 'int',
'delta_range_km': 'float',
'diag_script': 'list',
'override_diags': 'list',
}
if not add_met_config_dict_list(config=self.config,
app_name=self.app_name,
Expand Down
3 changes: 3 additions & 0 deletions parm/use_cases/met_tool_wrapper/TCDiag/TCDiag.conf
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,14 @@ TC_DIAG_DOMAIN_INFO1_N_RANGE = 150
TC_DIAG_DOMAIN_INFO1_N_AZIMUTH = 8
TC_DIAG_DOMAIN_INFO1_DELTA_RANGE_KM = 10.0
#TC_DIAG_DOMAIN_INFO1_DIAG_SCRIPT =
#TC_DIAG_DOMAIN_INFO1_OVERRIDE_DIAGS =

TC_DIAG_DOMAIN_INFO2_DOMAIN = nest
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_DOMAIN_INFO2_DIAG_SCRIPT =
#TC_DIAG_DOMAIN_INFO2_OVERRIDE_DIAGS =

#TC_DIAG_DATA_DOMAIN =
#TC_DIAG_DATA_LEVEL =
Expand Down

0 comments on commit ca54d73

Please sign in to comment.