TCStat: Basic Use Case

met_tool_wrapper/TCStat/TCStat.conf

Scientific Objective

Summarize and stratify the data from TC-Pairs track and intensity data

Datasets

TC-Pairs data from 201503
Location: All of the input data required for this use case can be found in the met_test sample data tarball. Click here to the METplus releases page and download sample data for the appropriate release: https://github.com/dtcenter/METplus/releases
This tarball should be unpacked into the directory that you will set the value of INPUT_BASE. See Running METplus section for more information.
Data Source: Unknown

METplus Components

This use case utilizes the METplus TCStat wrapper to search for files that are valid at a given run time and generate a command to run the MET tool tc_stat if all required files are found.

METplus Workflow

TCStat is the only tool called in this example. It processes the following TCST run times:

TCST: 2015030100

METplus Configuration

METplus first loads all of the configuration files found in parm/metplus_config, then it loads any configuration files passed to METplus via the command line with the -c option, i.e. -c parm/use_cases/met_tool_wrapper/TCStat/TCStat.conf

[config]

# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/met_tool_wrapper/TCStat/TCStat.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 = TCStat


###
# 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 = 2019103112
INIT_END = 2019103112
INIT_INCREMENT = 6H


###
# File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###

TC_STAT_LOOKIN_DIR = {INPUT_BASE}/met_test/tc_pairs

TC_STAT_OUTPUT_DIR = {OUTPUT_BASE}/tc_stat
TC_STAT_OUTPUT_TEMPLATE = job.out


###
# TCStat Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#tcstat
###

TC_STAT_CONFIG_FILE = {PARM_BASE}/met_config/TCStatConfig_wrapped

TC_STAT_JOB_ARGS = -job summary -line_type TCMPR -column 'ASPEED' -dump_row {TC_STAT_OUTPUT_DIR}/tc_stat_summary.tcst

TC_STAT_AMODEL =
TC_STAT_BMODEL =
TC_STAT_DESC =
TC_STAT_STORM_ID =
TC_STAT_BASIN =
TC_STAT_CYCLONE =
TC_STAT_STORM_NAME =

TC_STAT_INIT_BEG = 20150301
TC_STAT_INIT_END = 20150304
TC_STAT_INIT_INCLUDE =
TC_STAT_INIT_EXCLUDE =
TC_STAT_INIT_HOUR = 00

TC_STAT_VALID_BEG =
TC_STAT_VALID_END =
TC_STAT_VALID_INCLUDE =
TC_STAT_VALID_EXCLUDE =
TC_STAT_VALID_HOUR =
TC_STAT_LEAD_REQ =
TC_STAT_INIT_MASK =
TC_STAT_VALID_MASK =

#TC_STAT_LINE_TYPE =

TC_STAT_LEAD =

TC_STAT_TRACK_WATCH_WARN =

TC_STAT_COLUMN_THRESH_NAME =
TC_STAT_COLUMN_THRESH_VAL =

TC_STAT_COLUMN_STR_NAME =
TC_STAT_COLUMN_STR_VAL =

TC_STAT_INIT_THRESH_NAME =
TC_STAT_INIT_THRESH_VAL =

TC_STAT_INIT_STR_NAME =
TC_STAT_INIT_STR_VAL =

TC_STAT_WATER_ONLY =

TC_STAT_LANDFALL =

TC_STAT_LANDFALL_BEG = -24
TC_STAT_LANDFALL_END = 00

TC_STAT_MATCH_POINTS = false

#TC_STAT_COLUMN_STR_EXC_NAME =
#TC_STAT_COLUMN_STR_EXC_VAL =

#TC_STAT_INIT_STR_EXC_NAME =
#TC_STAT_INIT_STR_EXC_VAL =

#TC_STAT_DIAG_THRESH_NAME =
#TC_STAT_DIAG_THRESH_VAL =
#TC_STAT_INIT_DIAG_THRESH_NAME =
#TC_STAT_INIT_DIAG_THRESH_VAL =

#TC_STAT_EVENT_EQUAL =
#TC_STAT_EVENT_EQUAL_LEAD =
#TC_STAT_OUT_INIT_MASK =
#TC_STAT_OUT_VALID_MASK =

MET Configuration

METplus sets environment variables based on user settings in the METplus configuration file. See How METplus controls MET config file settings for more details.

YOU SHOULD NOT SET ANY OF THESE ENVIRONMENT VARIABLES YOURSELF! THEY WILL BE OVERWRITTEN BY METPLUS WHEN IT CALLS THE MET TOOLS!

If there is a setting in the MET configuration file that is currently not supported by METplus you’d like to control, please refer to: Overriding Unsupported MET config file settings

Note

See the TCStat MET Configuration section of the User’s Guide for more information on the environment variables used in the file below:

///////////////////////////////////////////////////////////////////////////////
//
// Default TCStat configuration file
//
////////////////////////////////////////////////////////////////////////////////

//
// The parameters listed below are used to filter the TC-STAT data down to the
// desired subset of lines over which statistics are to be computed.  Only
// those lines which meet ALL of the criteria specified will be retained.
//
// The settings that are common to all jobs may be specified once at the top
// level.  If no selection is listed for a parameter, that parameter will not
// be used for filtering.  If multiple selections are listed for a parameter,
// the analyses will be performed on their union.
//

//
// Stratify by the AMODEL or BMODEL columns.
//
${METPLUS_AMODEL}
${METPLUS_BMODEL}

//
// Stratify by the DESC column.
//
${METPLUS_DESC}

//
// Stratify by the STORM_ID column.
//
${METPLUS_STORM_ID}

//
// Stratify by the BASIN column.
// May add using the "-basin" job command option.
//
${METPLUS_BASIN}

//
// Stratify by the CYCLONE column.
// May add using the "-cyclone" job command option.
//
${METPLUS_CYCLONE}

//
// Stratify by the STORM_NAME column.
// May add using the "-storm_name" job command option.
//
${METPLUS_STORM_NAME}

//
// Stratify by the INIT times.
// Model initialization time windows to include or exclude
// May modify using the "-init_beg", "-init_end", "-init_inc",
// and "-init_exc" job command options.
//
${METPLUS_INIT_BEG}
${METPLUS_INIT_END}
${METPLUS_INIT_INC}
${METPLUS_INIT_EXC}

//
// Stratify by the VALID times.
//
${METPLUS_VALID_BEG}
${METPLUS_VALID_END}
${METPLUS_VALID_INC}
${METPLUS_VALID_EXC}

//
// Stratify by the initialization and valid hours and lead time.
//
${METPLUS_INIT_HOUR}
${METPLUS_VALID_HOUR}
${METPLUS_LEAD}

//
// Select tracks which contain all required lead times.
//
${METPLUS_LEAD_REQ}

//
// Stratify by the INIT_MASK and VALID_MASK columns.
//
${METPLUS_INIT_MASK}
${METPLUS_VALID_MASK}


//
// Stratify by the LINE_TYPE column.
//
//line_type =
${METPLUS_LINE_TYPE}


//
// Stratify by checking the watch/warning status for each track point
// common to both the ADECK and BDECK tracks.  If the watch/warning status
// of any of the track points appears in the list, retain the entire track.
//
${METPLUS_TRACK_WATCH_WARN}

//
// Stratify by applying thresholds to numeric data columns.
//
${METPLUS_COLUMN_THRESH_NAME}
${METPLUS_COLUMN_THRESH_VAL}

//
// Stratify by performing string matching on non-numeric data columns.
//
${METPLUS_COLUMN_STR_NAME}
${METPLUS_COLUMN_STR_VAL}

//
// Stratify by excluding strings in non-numeric data columns.
//
//column_str_exc_name =
${METPLUS_COLUMN_STR_EXC_NAME}

//column_str_exc_val =
${METPLUS_COLUMN_STR_EXC_VAL}

//
// Similar to the column_thresh options above
//
${METPLUS_INIT_THRESH_NAME}
${METPLUS_INIT_THRESH_VAL}

//
// Similar to the column_str options above
//
${METPLUS_INIT_STR_NAME}
${METPLUS_INIT_STR_VAL}

//
// Similar to the column_str_exc options above
//
//init_str_exc_name =
${METPLUS_INIT_STR_EXC_NAME}

//init_str_exc_val =
${METPLUS_INIT_STR_EXC_VAL}

//diag_thresh_name =
${METPLUS_DIAG_THRESH_NAME}

//diag_thresh_val =
${METPLUS_DIAG_THRESH_VAL}

//init_diag_thresh_name =
${METPLUS_INIT_DIAG_THRESH_NAME}

//init_diag_thresh_val =
${METPLUS_INIT_DIAG_THRESH_VAL}


//
// Stratify by the ADECK and BDECK distances to land.
//
${METPLUS_WATER_ONLY}

//
// Specify whether only those track points occurring near landfall should be
// retained, and define the landfall retention window in HH[MMSS] format
// around the landfall time.
//
${METPLUS_LANDFALL}
${METPLUS_LANDFALL_BEG}
${METPLUS_LANDFALL_END}

//
// Specify whether only those track points common to both the ADECK and BDECK
// tracks should be retained.  May modify using the "-match_points" job command
// option.
//
${METPLUS_MATCH_POINTS}

//event_equal =
${METPLUS_EVENT_EQUAL}

//event_equal_lead =
${METPLUS_EVENT_EQUAL_LEAD}

//out_init_mask =
${METPLUS_OUT_INIT_MASK}

//out_valid_mask =
${METPLUS_OUT_VALID_MASK}


//
// Array of TCStat analysis jobs to be performed on the filtered data
//
${METPLUS_JOBS}

tmp_dir = "${MET_TMP_DIR}";

${METPLUS_MET_CONFIG_OVERRIDES}

Running METplus

This use case can be run two ways:

  1. Passing in TCStat.conf then a user-specific system configuration file:

    run_metplus.py -c /path/to/METplus/parm/use_cases/met_tool_wrapper/TCStat/TCStat.conf -c /path/to/user_system.conf
    
  2. Modifying the configurations in parm/metplus_config, then passing in TCStat.conf:

    run_metplus.py -c /path/to/METplus/parm/use_cases/met_tool_wrapper/TCStat/TCStat.conf
    

The former method is recommended. Whether you add them to a user-specific configuration file or modify the metplus_config files, the following variables must be set correctly:

  • INPUT_BASE - Path to directory where sample data tarballs are unpacked (See Datasets section to obtain tarballs). This is not required to run METplus, but it is required to run the examples in parm/use_cases

  • OUTPUT_BASE - Path where METplus output will be written. This must be in a location where you have write permissions

  • MET_INSTALL_DIR - Path to location where MET is installed locally

Example User Configuration File:

[dir]
OUTPUT_BASE = /path/to/output/dir
INPUT_BASE/tc_pairs = path/to/tc_pairs/
MET_INSTALL_DIR = /path/to/met-X.Y

NOTE: All of these items must be found under the [dir] section.

Expected Output

A successful run will output the following both to the screen and to the logfile:

INFO: METplus has successfully finished running.

Refer to the value set for OUTPUT_BASE to find where the output data was generated. Output for this use case will be found in tc_stat/201503 (relative to OUTPUT_BASE) and will contain the following files:

  • tc_stat_summary.tcst

Keywords

Note

  • TCStatToolUseCase

  • TropicalCycloneUseCase

Navigate to the METplus Quick Search for Use Cases page to discover other similar use cases.

sphinx_gallery_thumbnail_path = ‘_static/met_tool_wrapper-TCStat.png’

Total running time of the script: (0 minutes 0.000 seconds)

Gallery generated by Sphinx-Gallery