diff --git a/docs/Users_Guide/glossary.rst b/docs/Users_Guide/glossary.rst index e2e52287fd..681681c682 100644 --- a/docs/Users_Guide/glossary.rst +++ b/docs/Users_Guide/glossary.rst @@ -394,13 +394,18 @@ METplus Configuration Glossary | *Used by:* RegridDataPlane + LOG_TC_DIAG_VERBOSITY + Overrides the log verbosity for TCDiag only. If not set, the verbosity level is controlled by :term:`LOG_MET_VERBOSITY`. + + | *Used by:* TCDiag + LOG_TC_PAIRS_VERBOSITY Overrides the log verbosity for TCPairs only. If not set, the verbosity level is controlled by :term:`LOG_MET_VERBOSITY`. | *Used by:* TCPairs LOG_TC_RMW_VERBOSITY - Overrides the log verbosity for TCRMW only. If not set, the verbosity level is controlled by :term:`LOG_MET_VERBOSITY`. + Overrides the log verbosity for TCRMW only. If not set, the verbosity level is controlled by :term:`LOG_MET_VERBOSITY`. | *Used by:* TCRMW @@ -499,6 +504,12 @@ METplus Configuration Glossary | *Used by:* TCRMW + TC_DIAG_CONFIG_FILE + Path to configuration file read by tc_diag. + If unset, parm/met_config/TCDiagConfig_wrapped will be used. + + | *Used by:* TCDiag + ASCII2NC_INPUT_FORMAT Optional string to specify the format of the input data. Valid options are "met_point", "little_r", "surfrad", "wwsis", "aeronet", "aeronetv2", or "aeronetv3." @@ -10388,3 +10399,254 @@ METplus Configuration Glossary Specify the value for 'regrid.censor_val' in the MET configuration file for TCRMW. | *Used by:* TCRMW + + TC_DIAG_INPUT_DIR + Directory containing input data to TCDiag. This variable is optional because you can specify the full path to the input files using :term:`TC_DIAG_INPUT_TEMPLATE`. + + | *Used by:* TCDiag + + TC_DIAG_INPUT_TEMPLATE + Filename template of the input data used by TCDiag. See also :term:`TC_DIAG_INPUT_DIR`. + + | *Used by:* TCDiag + + TC_DIAG_DECK_INPUT_DIR + Directory containing ADECK input data to TCDiag. This variable is optional because you can specify the full path to the input files using :term:`TC_DIAG_DECK_TEMPLATE`. + + | *Used by:* TCDiag + + TC_DIAG_DECK_TEMPLATE + Filename template of the ADECK input data used by TCDiag. See also :term:`TC_DIAG_DECK_INPUT_DIR`. + + | *Used by:* TCDiag + + TC_DIAG_OUTPUT_DIR + Directory to write output data from TCDiag. This variable is optional because you can specify the full path to the output file using :term:`TC_DIAG_OUTPUT_TEMPLATE`. + + | *Used by:* TCDiag + + TC_DIAG_OUTPUT_TEMPLATE + Filename template of write the output data generated by TCDiag. See also :term:`TC_DIAG_OUTPUT_DIR`. + + | *Used by:* TCDiag + + TC_DIAG_INPUT_FILE_LIST + Specifies an explicit path to a file list file to pass into tc_diag. + If set, :term:`TC_DIAG_INPUT_TEMPLATE` and :term:`TC_DIAG_INPUT_DIR` + are ignored. + + | *Used by:* TCDiag + + TC_DIAG_MET_CONFIG_OVERRIDES + Override any variables in the MET configuration file that are not + supported by the wrapper. This should be set to the full variable name + and value that you want to override, including the equal sign and the + ending semi-colon. The value is directly appended to the end of the + wrapped MET config file. + + Example: + TC_DIAG_MET_CONFIG_OVERRIDES = desc = "override_desc"; model = "override_model"; + + See :ref:`Overriding Unsupported MET config file settings` for more information + + | *Used by:* TCDiag + + TC_DIAG_SKIP_IF_OUTPUT_EXISTS + If True, do not run app if output file already exists. Set to False to overwrite files. + + | *Used by:* TCDiag + + TC_DIAG_MODEL + Specify the value for 'model' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_STORM_ID + Specify the value for 'storm_id' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_BASIN + Specify the value for 'basin' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_CYCLONE + Specify the value for 'cyclone' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_INIT_INCLUDE_LIST + Specify the value for 'init_inc' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_VALID_BEG + Specify the value for 'valid_beg' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_VALID_END + Specify the value for 'valid_end' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_VALID_INCLUDE_LIST + Specify the value for 'valid_inc' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_VALID_EXCLUDE_LIST + Specify the value for 'valid_exc' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_VALID_HOUR_LIST + Specify the value for 'valid_hour' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_DIAG_SCRIPT + Specify the value for 'diag_script' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_DOMAIN_INFO_DOMAIN + Specify the value for the nth 'domain_info.domain' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_DOMAIN_INFO_N_RANGE + Specify the value for the nth 'domain_info.n_range' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_DOMAIN_INFO_N_AZIMUTH + Specify the value for the nth 'domain_info.n_azimuth' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_DOMAIN_INFO_DELTA_RANGE_KM + Specify the value for the nth 'domain_info.delta_range_km' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_CENSOR_THRESH + Specify the value for 'censor_thresh' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_CENSOR_VAL + Specify the value for 'censor_val' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_CONVERT + Specify the value for 'convert' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_DATA_DOMAIN + Specify the value for 'data.domain' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_DATA_LEVEL + Specify the value for 'data.level' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_REGRID_METHOD + Specify the value for 'regrid.method' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_REGRID_WIDTH + Specify the value for 'regrid.width' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_REGRID_VLD_THRESH + Specify the value for 'regrid.vld_thresh' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_REGRID_SHAPE + Specify the value for 'regrid.shape' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_REGRID_CENSOR_THRESH + Specify the value for 'regrid.censor_thresh' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_REGRID_CENSOR_VAL + Specify the value for 'regrid.censor_val' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_REGRID_CONVERT + Specify the value for 'regrid.convert' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_COMPUTE_TANGENTIAL_AND_RADIAL_WINDS + Specify the value for 'compute_tangential_and_radial_winds' in the MET configuration file for TCDiag . + + | *Used by:* TCDiag + + TC_DIAG_U_WIND_FIELD_NAME + Specify the value for 'u_wind_field_name' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_V_WIND_FIELD_NAME + Specify the value for 'v_wind_field_name' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_TANGENTIAL_VELOCITY_FIELD_NAME + Specify the value for 'tangential_velocity_field_name' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_TANGENTIAL_VELOCITY_LONG_FIELD_NAME + Specify the value for 'tangential_velocity_long_field_name' in the MET configuration file for TCDiag . + + | *Used by:* TCDiag + + TC_DIAG_RADIAL_VELOCITY_FIELD_NAME + Specify the value for 'radial_velocity_field_name' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_RADIAL_VELOCITY_LONG_FIELD_NAME + Specify the value for 'radial_velocity_long_field_name' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_VORTEX_REMOVAL + Specify the value for 'vortex_removal' 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. + + | *Used by:* TCDiag + + TC_DIAG_NC_DIAG_FLAG + Specify the value for 'nc_diag_flag' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_CIRA_DIAG_FLAG + Specify the value for 'cira_diag_flag' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag + + TC_DIAG_OUTPUT_PREFIX + Specify the value for 'output_prefix' in the MET configuration file for TCDiag. + + | *Used by:* TCDiag diff --git a/docs/Users_Guide/wrappers.rst b/docs/Users_Guide/wrappers.rst index a900dcd864..87e028fa14 100644 --- a/docs/Users_Guide/wrappers.rst +++ b/docs/Users_Guide/wrappers.rst @@ -7624,6 +7624,492 @@ see :ref:`How METplus controls MET config file settings`. - hss_ec_value +.. _tc_diag_wrapper: + +TCDiag +====== + +Description +----------- + +Used to configure the MET tool TC-Diag. + +METplus Configuration +--------------------- + +| :term:`TC_DIAG_INPUT_DIR` +| :term:`TC_DIAG_DECK_INPUT_DIR` +| :term:`TC_DIAG_OUTPUT_DIR` +| :term:`TC_DIAG_DECK_TEMPLATE` +| :term:`TC_DIAG_INPUT_TEMPLATE` +| :term:`TC_DIAG_INPUT_FILE_LIST` +| :term:`TC_DIAG_OUTPUT_TEMPLATE` +| :term:`LOG_TC_DIAG_VERBOSITY` +| :term:`TC_DIAG_CONFIG_FILE` +| :term:`TC_DIAG_MODEL` +| :term:`TC_DIAG_STORM_ID` +| :term:`TC_DIAG_BASIN` +| :term:`TC_DIAG_CYCLONE` +| :term:`TC_DIAG_INIT_INCLUDE` +| :term:`TC_DIAG_VALID_BEG` +| :term:`TC_DIAG_VALID_END` +| :term:`TC_DIAG_VALID_INCLUDE` +| :term:`TC_DIAG_VALID_EXCLUDE` +| :term:`TC_DIAG_VALID_HOUR` +| :term:`TC_DIAG_LEAD` +| :term:`TC_DIAG_DIAG_SCRIPT` +| :term:`TC_DIAG_DOMAIN_INFO_DOMAIN` +| :term:`TC_DIAG_DOMAIN_INFO_N_RANGE` +| :term:`TC_DIAG_DOMAIN_INFO_N_AZIMUTH` +| :term:`TC_DIAG_DOMAIN_INFO_DELTA_RANGE_KM` +| :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` +| :term:`TC_DIAG_REGRID_METHOD` +| :term:`TC_DIAG_REGRID_WIDTH` +| :term:`TC_DIAG_REGRID_VLD_THRESH` +| :term:`TC_DIAG_REGRID_SHAPE` +| :term:`TC_DIAG_REGRID_CENSOR_THRESH` +| :term:`TC_DIAG_REGRID_CENSOR_VAL` +| :term:`TC_DIAG_REGRID_CONVERT` +| :term:`TC_DIAG_COMPUTE_TANGENTIAL_AND_RADIAL_WINDS` +| :term:`TC_DIAG_U_WIND_FIELD_NAME` +| :term:`TC_DIAG_V_WIND_FIELD_NAME` +| :term:`TC_DIAG_TANGENTIAL_VELOCITY_FIELD_NAME` +| :term:`TC_DIAG_TANGENTIAL_VELOCITY_LONG_FIELD_NAME` +| :term:`TC_DIAG_RADIAL_VELOCITY_FIELD_NAME` +| :term:`TC_DIAG_RADIAL_VELOCITY_LONG_FIELD_NAME` +| :term:`TC_DIAG_VORTEX_REMOVAL` +| :term:`TC_DIAG_NC_RNG_AZI_FLAG` +| :term:`TC_DIAG_NC_DIAG_FLAG` +| :term:`TC_DIAG_CIRA_DIAG_FLAG` +| :term:`TC_DIAG_OUTPUT_PREFIX` +| :term:`TC_DIAG_SKIP_IF_OUTPUT_EXISTS` +| :term:`TC_DIAG_MET_CONFIG_OVERRIDES` +| + +.. _tc-diag-met-conf: + +MET Configuration +----------------- + +Below is the wrapped MET configuration file used for this wrapper. +Environment variables are used to control entries in this configuration file. +The default value for each environment variable is obtained from +(except where noted below): + +`MET_INSTALL_DIR/share/met/config/TCDiagConfig_default `_ + +Below the file contents are descriptions of each environment variable +referenced in this file and the corresponding METplus configuration item used +to set the value of the environment variable. For detailed examples showing +how METplus sets the values of these environment variables, +see :ref:`How METplus controls MET config file settings`. + +.. literalinclude:: ../../parm/met_config/TCDiagConfig_wrapped + +**${METPLUS_MODEL}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`MODEL` + - model + +**${METPLUS_STORM_ID}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_STORM_ID` + - storm_id + +**${METPLUS_BASIN}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_BASIN` + - basin + +**${METPLUS_CYCLONE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_CYCLONE` + - cyclone + +**${METPLUS_INIT_INCLUDE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_INIT_INC` + - init_inc + +**${METPLUS_VALID_BEG}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_VALID_BEG` + - valid_beg + +**${METPLUS_VALID_END}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_VALID_END` + - valid_end + +**${METPLUS_VALID_INCLUDE_LIST}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_VALID_INC` + - valid_inc + +**${METPLUS_VALID_EXCLUDE_LIST}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_VALID_EXC` + - valid_exc + +**${METPLUS_VALID_HOUR_LIST}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_VALID_HOUR` + - valid_hour + +**${METPLUS_LEAD_LIST}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`LEAD_SEQ` + - lead + +**${METPLUS_DIAG_SCRIPT}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_DIAG_SCRIPT` + - diag_script + +**${METPLUS_DOMAIN_INFO_LIST}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_DOMAIN_INFO_DOMAIN` + - domain_info.domain + * - :term:`TC_DIAG_DOMAIN_INFO_N_RANGE` + - domain_info.n_range + * - :term:`TC_DIAG_DOMAIN_INFO_N_AZIMUTH` + - domain_info.n_azimuth + * - :term:`TC_DIAG_DOMAIN_INFO_DELTA_RANGE_KM` + - domain_info.delta_range_km + +**${METPLUS_CENSOR_THRESH}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_CENSOR_THRESH` + - censor_thresh + +**${METPLUS_CENSOR_VAL}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_CENSOR_VAL` + - censor_val + +**${METPLUS_CONVERT}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_CONVERT` + - convert + +**${METPLUS_DATA_FIELD}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`BOTH_VAR_NAME` + - data.field.name + * - :term:`BOTH_VAR_LEVELS` + - data.field.level + * - :term:`BOTH_VAR_OPTIONS` + - n/a + +.. note:: For more information on controlling the field attributes in METplus, please see the :ref:`Field_Info` section of the User's Guide. + +**${METPLUS_DATA_FILE_TYPE}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_INPUT_DATATYPE` + - data.file_type + +**${METPLUS_DATA_DOMAIN}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_DATA_DOMAIN` + - data.domain + +**${METPLUS_DATA_LEVEL}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_DATA_LEVEL` + - data.level + +**${METPLUS_REGRID_DICT}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_REGRID_SHAPE` + - regrid.shape + * - :term:`TC_DIAG_REGRID_METHOD` + - regrid.method + * - :term:`TC_DIAG_REGRID_WIDTH` + - regrid.width + * - :term:`TC_DIAG_REGRID_VLD_THRESH` + - regrid.vld_thresh + * - :term:`TC_DIAG_REGRID_CONVERT` + - regrid.convert + * - :term:`TC_DIAG_REGRID_CENSOR_THRESH` + - regrid.censor_thresh + * - :term:`TC_DIAG_REGRID_CENSOR_VAL` + - regrid.censor_val + +**${METPLUS_COMPUTE_TANGENTIAL_AND_RADIAL_WINDS}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_COMPUTE_TANGENTIAL_AND_RADIAL_WINDS` + - compute_tangential_and_radial_winds + +**${METPLUS_U_WIND_FIELD_NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_U_WIND_FIELD_NAME` + - u_wind_field_name + +**${METPLUS_V_WIND_FIELD_NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_V_WIND_FIELD_NAME` + - v_wind_field_name + +**${METPLUS_TANGENTIAL_VELOCITY_FIELD_NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_TANGENTIAL_VELOCITY_FIELD_NAME` + - tangential_velocity_field_name + +**${METPLUS_TANGENTIAL_VELOCITY_LONG_FIELD_NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_TANGENTIAL_VELOCITY_LONG_FIELD_NAME` + - tangential_velocity_long_field_name + +**${METPLUS_RADIAL_VELOCITY_FIELD_NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_RADIAL_VELOCITY_FIELD_NAME` + - radial_velocity_field_name + +**${METPLUS_RADIAL_VELOCITY_LONG_FIELD_NAME}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_RADIAL_VELOCITY_LONG_FIELD_NAME` + - radial_velocity_long_field_name + +**${METPLUS_VORTEX_REMOVAL}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_VORTEX_REMOVAL` + - vortex_removal + +**${METPLUS_NC_RNG_AZI_FLAG}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_NC_RNG_AZI_FLAG` + - nc_rng_azi_flag + +**${METPLUS_NC_DIAG_FLAG}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_NC_DIAG_FLAG` + - nc_diag_flag + +**${METPLUS_CIRA_DIAG_FLAG}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_CIRA_DIAG_FLAG` + - cira_diag_flag + +**${METPLUS_OUTPUT_PREFIX}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_OUTPUT_PREFIX` + - output_prefix + +**${METPLUS_MET_CONFIG_OVERRIDES}** + +.. list-table:: + :widths: 5 5 + :header-rows: 0 + + * - METplus Config(s) + - MET Config File + * - :term:`TC_DIAG_MET_CONFIG_OVERRIDES` + - n/a + + .. _tc_gen_wrapper: TCGen diff --git a/internal/tests/pytests/wrappers/tc_diag/test_tc_diag_wrapper.py b/internal/tests/pytests/wrappers/tc_diag/test_tc_diag_wrapper.py new file mode 100644 index 0000000000..1ea27c8826 --- /dev/null +++ b/internal/tests/pytests/wrappers/tc_diag/test_tc_diag_wrapper.py @@ -0,0 +1,144 @@ +#!/usr/bin/env python3 + +import pytest + +import os +from datetime import datetime + +from metplus.wrappers.tc_diag_wrapper import TCDiagWrapper + +deck_template = 'aal14{date?fmt=%Y}_short.dat' +input_template = 'gfs.subset.t00z.pgrb2.0p25.f*' +output_template = 'tc_diag_aal14{date?fmt=%Y}.nc' + +time_fmt = '%Y%m%d%H' +run_times = ['2016092900'] + +data_fmt = ( + 'field = [{ name="PRMSL"; level="L0"; },' + '{ name="TMP"; level="P1000"; },' + '{ name="TMP"; level="P900"; },' + '{ name="TMP"; level="P800"; },' + '{ name="TMP"; level="P700"; },' + '{ name="TMP"; level="P500"; },' + '{ name="TMP"; level="P100"; }];' +) + + +def get_data_dir(config): + return os.path.join(config.getdir('METPLUS_BASE'), + 'internal', 'tests', 'data', 'tc_pairs') + + +def set_minimum_config_settings(config): + # set config variables to prevent command from running and bypass check + # if input files actually exist + config.set('config', 'DO_NOT_RUN_EXE', True) + config.set('config', 'INPUT_MUST_EXIST', False) + + # set process and time config variables + config.set('config', 'PROCESS_LIST', 'TCDiag') + config.set('config', 'LOOP_BY', 'INIT') + config.set('config', 'INIT_TIME_FMT', time_fmt) + config.set('config', 'INIT_BEG', run_times[0]) + config.set('config', 'INIT_END', run_times[-1]) + config.set('config', 'INIT_INCREMENT', '6H') + config.set('config', 'TC_DIAG_CONFIG_FILE', + '{PARM_BASE}/met_config/TCDiagConfig_wrapped') + config.set('config', 'TC_DIAG_DECK_TEMPLATE', deck_template) + config.set('config', 'TC_DIAG_INPUT_TEMPLATE', input_template) + config.set('config', 'TC_DIAG_OUTPUT_DIR', + '{OUTPUT_BASE}/TCDiag/output') + config.set('config', 'TC_DIAG_OUTPUT_TEMPLATE', output_template) + + config.set('config', 'BOTH_VAR1_NAME', 'PRMSL') + config.set('config', 'BOTH_VAR1_LEVELS', 'L0') + config.set('config', 'BOTH_VAR2_NAME', 'TMP') + config.set('config', 'BOTH_VAR2_LEVELS', 'P1000, P900, P800, P700, P500, P100') + + +@pytest.mark.parametrize( + 'config_overrides, env_var_values', [ + ({}, {}), + + ] +) +@pytest.mark.wrapper +def test_tc_diag_run(metplus_config, config_overrides, + env_var_values): + config = metplus_config + + set_minimum_config_settings(config) + + test_data_dir = get_data_dir(config) + deck_dir = os.path.join(test_data_dir, 'bdeck') + + config.set('config', 'TC_DIAG_DECK_INPUT_DIR', deck_dir) + + # set config variable overrides + for key, value in config_overrides.items(): + config.set('config', key, value) + + wrapper = TCDiagWrapper(config) + assert wrapper.isOK + + file_list_dir = wrapper.config.getdir('FILE_LISTS_DIR') + file_list_file = f"{file_list_dir}/aal142016_short.dat_data_files.txt" + if os.path.exists(file_list_file): + os.remove(file_list_file) + + app_path = os.path.join(config.getdir('MET_BIN_DIR'), wrapper.app_name) + verbosity = f"-v {wrapper.c_dict['VERBOSITY']}" + config_file = wrapper.c_dict.get('CONFIG_FILE') + out_dir = wrapper.c_dict.get('OUTPUT_DIR') + + expected_cmds = [(f"{app_path} " + f"-deck {deck_dir}/aal142016_short.dat " + f"-data {file_list_file} " + f"-config {config_file} " + f"-out {out_dir}/tc_diag_aal142016.nc " + f"{verbosity}"), + ] + + all_cmds = wrapper.run_all_times() + print(f"ALL COMMANDS: {all_cmds}") + assert len(all_cmds) == len(expected_cmds) + + missing_env = [item for item in env_var_values + if item not in wrapper.WRAPPER_ENV_VAR_KEYS] + env_var_keys = wrapper.WRAPPER_ENV_VAR_KEYS + missing_env + + for (cmd, env_vars), expected_cmd in zip(all_cmds, expected_cmds): + # ensure commands are generated as expected + assert cmd == expected_cmd + + # check that environment variables were set properly + for env_var_key in env_var_keys: + match = next((item for item in env_vars if + item.startswith(env_var_key)), None) + assert match is not None + print(f'Checking env var: {env_var_key}') + actual_value = match.split('=', 1)[1] + if env_var_key == 'METPLUS_DATA_FIELD': + assert actual_value == data_fmt + else: + assert env_var_values.get(env_var_key, '') == actual_value + + +@pytest.mark.wrapper +def test_get_config_file(metplus_config): + fake_config_name = '/my/config/file' + + config = metplus_config + config.set('config', 'INIT_TIME_FMT', time_fmt) + config.set('config', 'INIT_BEG', run_times[0]) + default_config_file = os.path.join(config.getdir('PARM_BASE'), + 'met_config', + 'TCDiagConfig_wrapped') + + wrapper = TCDiagWrapper(config) + assert wrapper.c_dict['CONFIG_FILE'] == default_config_file + + config.set('config', 'TC_DIAG_CONFIG_FILE', fake_config_name) + wrapper = TCDiagWrapper(config) + assert wrapper.c_dict['CONFIG_FILE'] == fake_config_name diff --git a/internal/tests/use_cases/all_use_cases.txt b/internal/tests/use_cases/all_use_cases.txt index fbd7fa0131..567f1e6fc1 100644 --- a/internal/tests/use_cases/all_use_cases.txt +++ b/internal/tests/use_cases/all_use_cases.txt @@ -61,6 +61,7 @@ Category: met_tool_wrapper 59::IODA2NC::met_tool_wrapper/IODA2NC/IODA2NC.conf 60::PointStat_python_embedding_obs:: met_tool_wrapper/PointStat/PointStat_python_embedding_obs.conf 61::PlotPointObs:: met_tool_wrapper/PlotPointObs/PlotPointObs.conf +#62::TCDiag:: met_tool_wrapper/TCDiag/TCDiag.conf Category: air_quality_and_comp 0::EnsembleStat_fcstICAP_obsMODIS_aod::model_applications/air_quality_and_comp/EnsembleStat_fcstICAP_obsMODIS_aod.conf diff --git a/metplus/util/constants.py b/metplus/util/constants.py index 48956d8795..cd78b0fd60 100644 --- a/metplus/util/constants.py +++ b/metplus/util/constants.py @@ -36,6 +36,7 @@ 'regriddataplane': 'RegridDataPlane', 'seriesanalysis': 'SeriesAnalysis', 'statanalysis': 'StatAnalysis', + 'tcdiag': 'TCDiag', 'tcgen': 'TCGen', 'tcpairs': 'TCPairs', 'tcrmw': 'TCRMW', diff --git a/metplus/wrappers/tc_diag_wrapper.py b/metplus/wrappers/tc_diag_wrapper.py new file mode 100755 index 0000000000..d079c209c2 --- /dev/null +++ b/metplus/wrappers/tc_diag_wrapper.py @@ -0,0 +1,385 @@ +"""tc_diag +Program Name: tc_diag_wrapper.py +Contact(s): George McCabe +Abstract: Builds command for and runs tc_diag +History Log: Initial version +Usage: +Parameters: None +Input Files: +Output Files: nc files +Condition codes: 0 for success, 1 for failure +""" + +import os + +from ..util import time_util +from . import RuntimeFreqWrapper +from ..util import do_string_sub, skip_time, get_lead_sequence +from ..util import parse_var_list, sub_var_list +from ..util.met_config import add_met_config_dict_list + +'''!@namespace TCDiagWrapper +@brief Wraps the TC-Diag tool +@endcode +''' + + +class TCDiagWrapper(RuntimeFreqWrapper): + + WRAPPER_ENV_VAR_KEYS = [ + 'METPLUS_MODEL', + 'METPLUS_STORM_ID', + 'METPLUS_BASIN', + 'METPLUS_CYCLONE', + 'METPLUS_INIT_INCLUDE', + 'METPLUS_VALID_BEG', + 'METPLUS_VALID_END', + 'METPLUS_VALID_INCLUDE_LIST', + 'METPLUS_VALID_EXCLUDE_LIST', + 'METPLUS_VALID_HOUR_LIST', + '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', + 'METPLUS_DATA_FIELD', + 'METPLUS_REGRID_DICT', + 'METPLUS_COMPUTE_TANGENTIAL_AND_RADIAL_WINDS', + 'METPLUS_U_WIND_FIELD_NAME', + 'METPLUS_V_WIND_FIELD_NAME', + 'METPLUS_TANGENTIAL_VELOCITY_FIELD_NAME', + 'METPLUS_TANGENTIAL_VELOCITY_LONG_FIELD_NAME', + 'METPLUS_RADIAL_VELOCITY_FIELD_NAME', + 'METPLUS_RADIAL_VELOCITY_LONG_FIELD_NAME', + 'METPLUS_VORTEX_REMOVAL', + 'METPLUS_VORTEX_REMOVAL', + 'METPLUS_NC_DIAG_FLAG', + 'METPLUS_CIRA_DIAG_FLAG', + 'METPLUS_OUTPUT_PREFIX', + ] + + def __init__(self, config, instance=None): + self.app_name = "tc_diag" + self.app_path = os.path.join(config.getdir('MET_BIN_DIR'), + self.app_name) + super().__init__(config, instance=instance) + + def create_c_dict(self): + c_dict = super().create_c_dict() + c_dict['VERBOSITY'] = self.config.getstr('config', + 'LOG_TC_DIAG_VERBOSITY', + c_dict['VERBOSITY']) + c_dict['ALLOW_MULTIPLE_FILES'] = True + + # skip RuntimeFreq wrapper logic to find files + c_dict['FIND_FILES'] = False + + if not c_dict['RUNTIME_FREQ']: + c_dict['RUNTIME_FREQ'] = 'RUN_ONCE_PER_INIT_OR_VALID' + if c_dict['RUNTIME_FREQ'] != 'RUN_ONCE_PER_INIT_OR_VALID': + self.log_error('Only RUN_ONCE_PER_INIT_OR_VALID is supported for ' + 'TC_DIAG_RUNTIME_FREQ.') + + # get the MET config file path or use default + c_dict['CONFIG_FILE'] = self.get_config_file('TCDiagConfig_wrapped') + + c_dict['INPUT_DIR'] = self.config.getdir('TC_DIAG_INPUT_DIR', '') + c_dict['INPUT_TEMPLATE'] = self.config.getraw('config', + 'TC_DIAG_INPUT_TEMPLATE') + c_dict['INPUT_FILE_LIST'] = self.config.getraw( + 'config', 'TC_DIAG_INPUT_FILE_LIST' + ) + + c_dict['OUTPUT_DIR'] = self.config.getdir('TC_DIAG_OUTPUT_DIR', '') + c_dict['OUTPUT_TEMPLATE'] = ( + self.config.getraw('config', + 'TC_DIAG_OUTPUT_TEMPLATE') + ) + + c_dict['DECK_INPUT_DIR'] = self.config.getdir('TC_DIAG_DECK_INPUT_DIR', + '') + c_dict['DECK_INPUT_TEMPLATE'] = ( + self.config.getraw('config', + 'TC_DIAG_DECK_TEMPLATE') + ) + + self.add_met_config(name='model', + data_type='string', + metplus_configs=['MODEL']) + + self.add_met_config(name='storm_id', data_type='string') + + self.add_met_config(name='basin', data_type='string') + + self.add_met_config(name='cyclone', data_type='string') + + self.add_met_config(name='init_inc', + data_type='string', + env_var_name='METPLUS_INIT_INCLUDE', + metplus_configs=['TC_DIAG_INIT_INC', + 'TC_DIAG_INIT_INCLUDE']) + + self.add_met_config(name='valid_beg', + data_type='string', + metplus_configs=['TC_DIAG_VALID_BEG', + 'TC_DIAG_VALID_BEGIN']) + + self.add_met_config(name='valid_end', + data_type='string', + metplus_configs=['TC_DIAG_VALID_END']) + + self.add_met_config(name='valid_inc', + data_type='list', + env_var_name='METPLUS_VALID_INCLUDE_LIST', + metplus_configs=['TC_DIAG_VALID_INCLUDE_LIST', + 'TC_DIAG_VALID_INC_LIST', + 'TC_DIAG_VALID_INCLUDE', + 'TC_DIAG_VALID_INC', + ]) + + self.add_met_config(name='valid_exc', + data_type='list', + env_var_name='METPLUS_VALID_EXCLUDE_LIST', + metplus_configs=['TC_DIAG_VALID_EXCLUDE_LIST', + 'TC_DIAG_VALID_EXC_LIST', + 'TC_DIAG_VALID_EXCLUDE', + 'TC_DIAG_VALID_EXC', + ]) + + self.add_met_config(name='valid_hour', + data_type='list', + env_var_name='METPLUS_VALID_HOUR_LIST', + metplus_configs=['TC_DIAG_VALID_HOUR_LIST', + 'TC_DIAG_VALID_HOUR', + ]) + + self.add_met_config(name='diag_script', data_type='list') + + dict_items = { + 'domain': 'string', + 'n_range': 'int', + 'n_azimuth': 'int', + 'delta_range_km': 'float', + } + if not add_met_config_dict_list(config=self.config, + app_name=self.app_name, + output_dict=self.env_var_dict, + dict_name='domain_info', + 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', + met_tool=self.app_name) + + self.add_met_config(name='domain', + env_var_name='METPLUS_DATA_DOMAIN', + data_type='list') + + self.add_met_config(name='level', + env_var_name='METPLUS_DATA_LEVEL', + data_type='list') + + self.add_met_config(name='file_type', + data_type='string', + env_var_name='METPLUS_DATA_FILE_TYPE', + metplus_configs=['TC_DIAG_INPUT_DATATYPE', + 'TC_DIAG_FILE_TYPE']) + + self.handle_regrid(c_dict, set_to_grid=False) + + self.add_met_config(name='compute_tangential_and_radial_winds', + data_type='bool') + self.add_met_config(name='u_wind_field_name', data_type='string') + self.add_met_config(name='v_wind_field_name', data_type='string') + self.add_met_config(name='tangential_velocity_field_name', + data_type='string') + self.add_met_config(name='tangential_velocity_long_field_name', + data_type='string') + self.add_met_config(name='radial_velocity_field_name', + data_type='string') + self.add_met_config(name='radial_velocity_long_field_name', + data_type='string') + + self.add_met_config(name='vortex_removal', 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') + + self.add_met_config(name='output_prefix', data_type='string') + + return c_dict + + def get_command(self): + cmd = self.app_path + + # add deck + cmd += ' -deck ' + self.c_dict['DECK_FILE'] + + # add input files + cmd += ' -data' + for infile in self.infiles: + cmd += ' ' + infile + + # add arguments + cmd += ' ' + ' '.join(self.args) + + # add output path + out_path = self.get_output_path() + cmd += ' -out ' + out_path + + # add verbosity + cmd += ' -v ' + self.c_dict['VERBOSITY'] + return cmd + + def run_at_time_once(self, time_info): + """! Process runtime and try to build command to run ascii2nc + Args: + @param time_info dictionary containing timing information + """ + time_info = time_util.ti_calculate(time_info) + # get input files + if self.find_input_files(time_info) is None: + return + + # get output path + if not self.find_and_check_output_file(time_info): + return + + # get field information to set in MET config + if not self.set_data_field(time_info): + return + + # get other configurations for command + self.set_command_line_arguments(time_info) + + # set environment variables if using config file + self.set_environment_variables(time_info) + + # build command and run + cmd = self.get_command() + if cmd is None: + self.log_error("Could not generate command") + return + + self.build() + + def set_data_field(self, time_info): + """!Get list of fields from config to process. Build list of field info + that are formatted to be read by the MET config file. Set DATA_FIELD + item of c_dict with the formatted list of fields. + Args: + @param time_info time dictionary to use for string substitution + @returns True if field list could be built, False if not. + """ + field_list = sub_var_list(self.c_dict['VAR_LIST_TEMP'], time_info) + if not field_list: + self.log_error("Could not get field information from config.") + return False + + all_fields = [] + for field in field_list: + field_list = self.get_field_info(d_type='FCST', + v_name=field['fcst_name'], + v_level=field['fcst_level'], + ) + if field_list is None: + return False + + all_fields.extend(field_list) + + data_field = ','.join(all_fields) + self.env_var_dict['METPLUS_DATA_FIELD'] = f'field = [{data_field}];' + + return True + + def find_input_files(self, time_info): + """!Get DECK file and list of input data files and set c_dict items. + Args: + @param time_info time dictionary to use for string substitution + @returns Input file list if all files were found, None if not. + """ + # get deck file + deck_file = self.find_data(time_info, data_type='DECK') + if not deck_file: + return None + + self.c_dict['DECK_FILE'] = deck_file + + lead_seq = get_lead_sequence(self.config, time_info) + + # get input files + if self.c_dict['INPUT_FILE_LIST']: + self.logger.debug("Explicit file list file: " + f"{self.c_dict['INPUT_FILE_LIST']}") + list_file = do_string_sub(self.c_dict['INPUT_FILE_LIST'], + **time_info) + if not os.path.exists(list_file): + self.log_error(f'Could not find file list: {list_file}') + return None + else: + all_input_files = [] + + for lead in lead_seq: + self.clear() + time_info['lead'] = lead + + time_info = time_util.ti_calculate(time_info) + + # get a list of the input data files, + # write to an ascii file if there are more than one + input_files = self.find_data(time_info, return_list=True) + if not input_files: + continue + + all_input_files.extend(input_files) + + if not all_input_files: + return None + + # create an ascii file with a list of the input files + list_file = f"{os.path.basename(deck_file)}_data_files.txt" + list_file = self.write_list_file(list_file, all_input_files) + + self.infiles.append(list_file) + + # set LEAD_LIST to list of forecast leads used + if lead_seq != [0]: + lead_list = [] + for lead in lead_seq: + lead_hours = ( + time_util.ti_get_hours_from_relativedelta(lead, + valid_time=time_info['valid']) + ) + lead_list.append(f'"{str(lead_hours).zfill(2)}"') + + self.c_dict['LEAD_LIST'] = f"lead = [{', '.join(lead_list)}];" + + return self.infiles + + def set_command_line_arguments(self, time_info): + + # add config file - passing through do_string_sub to get custom string if set + if self.c_dict['CONFIG_FILE']: + config_file = do_string_sub(self.c_dict['CONFIG_FILE'], + **time_info) + self.args.append(f"-config {config_file}") diff --git a/metplus/wrappers/tcrmw_wrapper.py b/metplus/wrappers/tcrmw_wrapper.py index 12a4cad6a2..172d1d9213 100755 --- a/metplus/wrappers/tcrmw_wrapper.py +++ b/metplus/wrappers/tcrmw_wrapper.py @@ -208,7 +208,6 @@ def run_at_time(self, input_dict): self.logger.info(f"Processing custom string: {custom_string}") input_dict['custom'] = custom_string - time_info = time_util.ti_calculate(input_dict) if skip_time(time_info, self.c_dict.get('SKIP_TIMES', {})): diff --git a/parm/met_config/TCDiagConfig_wrapped b/parm/met_config/TCDiagConfig_wrapped new file mode 100644 index 0000000000..2cc895d913 --- /dev/null +++ b/parm/met_config/TCDiagConfig_wrapped @@ -0,0 +1,189 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// TC-Diag configuration file. +// +// For additional information, please see the MET User's Guide. +// +//////////////////////////////////////////////////////////////////////////////// + +// +// Filter input track data lines. +// + +// +// Model +// +//model = +${METPLUS_MODEL} + + +// +// Storm identifier +// +//storm_id = +${METPLUS_STORM_ID} + + +// +// Basin +// +//basin = +${METPLUS_BASIN} + + +// +// Cyclone number +// +//cyclone = +${METPLUS_CYCLONE} + + +// +// Model initialization time +// +//init_inc = +${METPLUS_INIT_INCLUDE} + + +// +// Subset by the valid time +// +//valid_beg = +${METPLUS_VALID_BEG} +//valid_end = +${METPLUS_VALID_END} + +//valid_inc = +${METPLUS_VALID_INCLUDE_LIST} + +//valid_exc = +${METPLUS_VALID_EXCLUDE_LIST} + + +// +// Subset by the valid hour and lead time. +// +//valid_hour = +${METPLUS_VALID_HOUR_LIST} + +//lead = +${METPLUS_LEAD_LIST} + + +//////////////////////////////////////////////////////////////////////////////// + +// +// Python diagnostic scripts to be run +// May be set separately in each "domain_info" entry +// +//diag_script = +${METPLUS_DIAG_SCRIPT} + +// +// Domain-specific cylindrical coordinate transformation +// +//domain_info = { +${METPLUS_DOMAIN_INFO_LIST} + +//////////////////////////////////////////////////////////////////////////////// + +// +// Data censoring and conversion +// 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} + + +// +// Data fields +// +data = { + + ${METPLUS_DATA_FILE_TYPE} + + // If empty, the field is processed for all domains + //domain = []; + ${METPLUS_DATA_DOMAIN} + + // Pressure levels to be used, unless overridden below + //level = + ${METPLUS_DATA_LEVEL} + + //field = [ + ${METPLUS_DATA_FIELD} +} + +//////////////////////////////////////////////////////////////////////////////// + +// +// Regridding options +// +//regrid = { +${METPLUS_REGRID_DICT} + +// +// Optionally convert u/v winds to tangential/radial winds +// +//compute_tangential_and_radial_winds = +${METPLUS_COMPUTE_TANGENTIAL_AND_RADIAL_WINDS} + +//u_wind_field_name = +${METPLUS_U_WIND_FIELD_NAME} + +//v_wind_field_name = +${METPLUS_V_WIND_FIELD_NAME} + +//tangential_velocity_field_name = +${METPLUS_TANGENTIAL_VELOCITY_FIELD_NAME} + +//tangential_velocity_long_field_name = +${METPLUS_TANGENTIAL_VELOCITY_LONG_FIELD_NAME} + +//radial_velocity_field_name = +${METPLUS_RADIAL_VELOCITY_FIELD_NAME} + +//radial_velocity_long_field_name = +${METPLUS_RADIAL_VELOCITY_LONG_FIELD_NAME} + + +// +// Vortex removal flag +// +//vortex_removal = +${METPLUS_VORTEX_REMOVAL} + + +//////////////////////////////////////////////////////////////////////////////// + +// +// Flags to control output files +// +//nc_rng_azi_flag = +${METPLUS_NC_RNG_AZI_FLAG} + +//nc_diag_flag = +${METPLUS_NC_DIAG_FLAG} + +//cira_diag_flag = +${METPLUS_CIRA_DIAG_FLAG} + + +//////////////////////////////////////////////////////////////////////////////// + +tmp_dir = "${MET_TMP_DIR}"; + +//output_prefix = +${METPLUS_OUTPUT_PREFIX} + +//version = "V11.0.0"; + +//////////////////////////////////////////////////////////////////////////////// + +${METPLUS_MET_CONFIG_OVERRIDES} diff --git a/parm/use_cases/met_tool_wrapper/TCDiag/TCDiag.conf b/parm/use_cases/met_tool_wrapper/TCDiag/TCDiag.conf new file mode 100644 index 0000000000..5d59d25a73 --- /dev/null +++ b/parm/use_cases/met_tool_wrapper/TCDiag/TCDiag.conf @@ -0,0 +1,118 @@ +[config] + +# Documentation for this use case can be found at +# https://metplus.readthedocs.io/en/latest/generated/met_tool_wrapper/TCDiag/TCDiag.html + +# For additional information, please see the METplus Users Guide. +# https://metplus.readthedocs.io/en/latest/Users_Guide + +### +# Processes to run +# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#process-list +### + +PROCESS_LIST = TCDiag + + +### +# Time Info +# LOOP_BY options are INIT, VALID, RETRO, and REALTIME +# If set to INIT or RETRO: +# INIT_TIME_FMT, INIT_BEG, INIT_END, and INIT_INCREMENT must also be set +# If set to VALID or REALTIME: +# VALID_TIME_FMT, VALID_BEG, VALID_END, and VALID_INCREMENT must also be set +# LEAD_SEQ is the list of forecast leads to process +# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#timing-control +### + +LOOP_BY = INIT +INIT_TIME_FMT = %Y%m%d%H +INIT_BEG = 2016092900 +INIT_END = 2016092900 +INIT_INCREMENT = 21600 + + +### +# File I/O +# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info +### + +TC_DIAG_DECK_INPUT_DIR = {INPUT_BASE}/met_test/new/tc_data/adeck +TC_DIAG_DECK_TEMPLATE = aal14{date?fmt=%Y}_short.dat + +TC_DIAG_INPUT_DIR = {INPUT_BASE}/met_test/new/model_data/grib2/gfs_fv3 +TC_DIAG_INPUT_TEMPLATE = gfs.subset.t00z.pgrb2.0p25.f* + +TC_DIAG_OUTPUT_DIR = {OUTPUT_BASE}/met_tool_wrapper/TCDiag +TC_DIAG_OUTPUT_TEMPLATE = tc_diag_aal14{date?fmt=%Y}.nc + + +### +# Field Info +# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#field-info +### + +BOTH_VAR1_NAME = PRMSL +BOTH_VAR1_LEVELS = L0 + +BOTH_VAR2_NAME = TMP +BOTH_VAR2_LEVELS = P1000, P900, P800, P700, P500, P100 + + +### +# TCDiag Settings +# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#tcdiag +### + +#LOG_TC_DIAG_VERBOSITY = 2 + +TC_DIAG_CONFIG_FILE = {PARM_BASE}/met_config/TCDiagConfig_wrapped + +MODEL = fv3 + +TC_DIAG_STORM_ID = AL142016 +TC_DIAG_BASIN = AL +TC_DIAG_CYCLONE = 14 + +#TC_DIAG_INIT_INCLUDE = +#TC_DIAG_VALID_BEG = +#TC_DIAG_VALID_END = +#TC_DIAG_VALID_INCLUDE_LIST = +#TC_DIAG_VALID_EXCLUDE_LIST = +#TC_DIAG_VALID_HOUR_LIST = +#TC_DIAG_LEAD = + +#TC_DIAG_DIAG_SCRIPT = + +#TC_DIAG_DOMAIN_INFO1_DOMAIN = +#TC_DIAG_DOMAIN_INFO1_N_RANGE = +#TC_DIAG_DOMAIN_INFO1_N_AZIMUTH = +#TC_DIAG_DOMAIN_INFO1_DELTA_RANGE_KM = + +#TC_DIAG_CENSOR_THRESH = +#TC_DIAG_CENSOR_VAL = +#TC_DIAG_CONVERT = + +#TC_DIAG_DATA_DOMAIN = +#TC_DIAG_DATA_LEVEL = + +#TC_DIAG_REGRID_METHOD = NEAREST +#TC_DIAG_REGRID_WIDTH = 1 +#TC_DIAG_REGRID_VLD_THRESH = 0.5 +#TC_DIAG_REGRID_SHAPE = SQUARE +#TC_DIAG_REGRID_CENSOR_THRESH = +#TC_DIAG_REGRID_CENSOR_VAL = +#TC_DIAG_REGRID_CONVERT = + +#TC_DIAG_COMPUTE_TANGENTIAL_AND_RADIAL_WINDS = +#TC_DIAG_U_WIND_FIELD_NAME = +#TC_DIAG_V_WIND_FIELD_NAME = +#TC_DIAG_TANGENTIAL_VELOCITY_FIELD_NAME = +#TC_DIAG_TANGENTIAL_VELOCITY_LONG_FIELD_NAME = +#TC_DIAG_RADIAL_VELOCITY_FIELD_NAME = +#TC_DIAG_RADIAL_VELOCITY_LONG_FIELD_NAME = +#TC_DIAG_VORTEX_REMOVAL = +#TC_DIAG_NC_RNG_AZI_FLAG = +#TC_DIAG_NC_DIAG_FLAG = +#TC_DIAG_CIRA_DIAG_FLAG = +#TC_DIAG_OUTPUT_PREFIX =