Note
Go to the end to download the full example code.
CycloneVerification: TC Verification Compare ADECK vs BDECK
model_applications/tc_and_extra_tc/TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample.conf
Scientific Objective
This use case run TC-Pairs to produce produce matched pairs of forecast model output and an observation dataset. TC-Pairs produces matched pairs for position errors, as well as wind, sea level pressure, and distance to land values for each input dataset. Then TC-stat will filter TC-pairs output based on user criteria.
Version Added
METplus version 4.1
Datasets
Location: All of the input data required for this use case can be found in a sample data tarball. Each use case category will have one or more sample data tarballs. It is only necessary to download the tarball with the use case’s dataset and not the entire collection of sample data. Click here to access 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.
METplus Workflow
Beginning time (INIT_BEG): 202108
The following tools are used for each run time:
TCPairs TCStat
To generate TCPairs output, this example loops by initialization time for every 6 hour period that is available in the data set between 2021082500 and 2021083000. Then TCStat filters the TCPairs output based on user criteria (e.g. storm characteristics in this use case).
METplus Components
This use case first runs TC-Pairs to produce matched pairs of Adeck and Bdeck files. The TC-Pairs output (tcst files) is then read by the TC-Stat tool to further filter the tcst files as well as summarize the statistical information.
METplus Workflow
Beginning time (INIT_BEG): 202108
End time (INIT_END): None
Increment between beginning and end times (INIT_INCREMENT): None
Sequence of forecast leads to process (LEAD_SEQ): None
This example does not loop in time, but rather relies on ranges of times passed to TCPairs and TCStat to perform relevant tasks.
TCPairs is the first tool called in this example. It processes the following run times for each storm file (e.g. aal092021.dat, aal102021.dat) against the corresponding Bdeck files (e.g. bal092021.dat, bal102021.dat):
TC-Stat is the second (and final) tool called in this example. It processes the output from TCPairs. In this example the TC-Stat filters the TC-Pairs output based on the characteristics of the storm (HU, SD, SS, TS, TD). The output from the TC-Stat can be used to aggregate verification statistics (e.g. Track, Intensity, MSLP, wind radii errors etc.).
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, i.e. /path/to/TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample.conf
[config]
# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/model_applications/tc_and_extra_tc/TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample.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 = TCPairs, 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
INIT_BEG = 202108
TC_PAIRS_RUNTIME_FREQ = RUN_ONCE
###
# File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###
# TCPairs
TC_PAIRS_ADECK_INPUT_DIR = {INPUT_BASE}/model_applications/tc_and_extra_tc/TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample
TC_PAIRS_BDECK_INPUT_DIR = {INPUT_BASE}/model_applications/tc_and_extra_tc/TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample
TC_PAIRS_ADECK_TEMPLATE = a{basin}{cyclone}{init?fmt=%Y}.dat
TC_PAIRS_BDECK_TEMPLATE = b{basin}{cyclone}{init?fmt=%Y}.dat
TC_PAIRS_OUTPUT_DIR = {OUTPUT_BASE}/tc_pairs
TC_PAIRS_OUTPUT_TEMPLATE = tc_pairs.{basin}{cyclone}{init?fmt=%Y}
# TCStat
TC_STAT_LOOKIN_DIR = {TC_PAIRS_OUTPUT_DIR}
TC_STAT_OUTPUT_DIR = {OUTPUT_BASE}/tc_stat
###
# TCPairs Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#tcpairs
###
MODEL = OFCL, HWRF
TC_PAIRS_BASIN = AL
TC_PAIRS_CYCLONE = 09, 10
TC_PAIRS_DLAND_FILE = MET_BASE/tc_data/dland_global_tenth_degree.nc
TC_PAIRS_MATCH_POINTS = TRUE
TC_PAIRS_INIT_BEG = {init?fmt=%Y%m}25_00
TC_PAIRS_INIT_END = {init?fmt=%Y%m}30_00
###
# TCStat Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#tcstat
###
TC_STAT_LINE_TYPE = TCMPR
TC_STAT_COLUMN_STRING_NAME = LEVEL
TC_STAT_COLUMN_STRING_VAL = HU,SD,SS,TS,TD
TC_STAT_WATER_ONLY = FALSE
TC_STAT_JOB_ARGS = -job filter -dump_row {TC_STAT_OUTPUT_DIR}/tc_stat_summary.tcst
TC_STAT_INIT_BEG = {init?fmt=%Y%m}25_00
TC_STAT_INIT_END = {init?fmt=%Y%m}30_00
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
TCPairsConfig_wrapped
////////////////////////////////////////////////////////////////////////////////
//
// Default TCPairs configuration file
//
////////////////////////////////////////////////////////////////////////////////
//
// ATCF file format reference:
// http://www.nrlmry.navy.mil/atcf_web/docs/database/new/abrdeck.html
//
//
// Models
//
//model = [
${METPLUS_MODEL}
//
// Description
//
//desc =
${METPLUS_DESC}
//
// Storm identifiers
//
//storm_id = [
${METPLUS_STORM_ID}
//
// Basins
//
//basin = [
${METPLUS_BASIN}
//
// Cyclone numbers
//
//cyclone = [
${METPLUS_CYCLONE}
//
// Storm names
//
//storm_name = [
${METPLUS_STORM_NAME}
//
// Model initialization time windows to include or exclude
//
//init_beg =
${METPLUS_INIT_BEG}
//init_end =
${METPLUS_INIT_END}
// init_inc = [
${METPLUS_INIT_INC}
// init_exc = [
${METPLUS_INIT_EXC}
//
// Valid model time windows to include or exclude
//
//valid_beg =
${METPLUS_VALID_BEG}
//valid_end =
${METPLUS_VALID_END}
// valid_inc = [
${METPLUS_VALID_INC}
// valid_exc = [
${METPLUS_VALID_EXC}
// write_valid =
${METPLUS_WRITE_VALID}
//
// Model initialization hours
//
init_hour = [];
//
// Required lead time in hours
//
lead_req = [];
//
// lat/lon polylines defining masking regions
//
init_mask = "";
valid_mask = "";
//
// Specify if the code should check for duplicate ATCF lines
//
//check_dup =
${METPLUS_CHECK_DUP}
//
// Specify special processing to be performed for interpolated models.
// Set to NONE, FILL, or REPLACE.
//
//interp12 =
${METPLUS_INTERP12}
//
// Specify how consensus forecasts should be defined
//
//consensus =
${METPLUS_CONSENSUS_LIST}
//
// Forecast lag times
//
lag_time = [];
//
// CLIPER/SHIFOR baseline forecasts to be derived from the BEST
// and operational (CARQ) tracks.
//
best_technique = [ "BEST" ];
best_baseline = [];
oper_technique = [ "CARQ" ];
oper_baseline = [];
//
// Specify the datasets to be searched for analysis tracks (NONE, ADECK, BDECK,
// or BOTH).
//
anly_track = BDECK;
//
// Specify if only those track points common to both the ADECK and BDECK
// tracks be written out.
//
//match_points =
${METPLUS_MATCH_POINTS}
//
// Specify the NetCDF output of the gen_dland tool containing a gridded
// representation of the minimum distance to land.
//
//dland_file =
${METPLUS_DLAND_FILE}
//
// Specify watch/warning information:
// - Input watch/warning filename
// - Watch/warning time offset in seconds
//
watch_warn = {
file_name = "MET_BASE/tc_data/wwpts_us.txt";
time_offset = -14400;
}
//diag_info_map = {
${METPLUS_DIAG_INFO_MAP_LIST}
//diag_convert_map = {
${METPLUS_DIAG_CONVERT_MAP_LIST}
//
// Indicate a version number for the contents of this configuration file.
// The value should generally not be modified.
//
//version = "V9.0";
tmp_dir = "${MET_TMP_DIR}";
${METPLUS_MET_CONFIG_OVERRIDES}
TCStatConfig_wrapped
///////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//amodel = [
${METPLUS_AMODEL}
//bmodel = [
${METPLUS_BMODEL}
//
// Stratify by the DESC column.
//
//desc = [
${METPLUS_DESC}
//
// Stratify by the STORM_ID column.
//
//storm_id = [
${METPLUS_STORM_ID}
//
// Stratify by the BASIN column.
// May add using the "-basin" job command option.
//
//basin = [
${METPLUS_BASIN}
//
// Stratify by the CYCLONE column.
// May add using the "-cyclone" job command option.
//
//cyclone = [
${METPLUS_CYCLONE}
//
// Stratify by the STORM_NAME column.
// May add using the "-storm_name" job command option.
//
//storm_name = [
${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.
//
//init_beg =
${METPLUS_INIT_BEG}
//init_end =
${METPLUS_INIT_END}
//init_inc = [
${METPLUS_INIT_INC}
//init_exc = [
${METPLUS_INIT_EXC}
//
// Stratify by the VALID times.
//
//valid_beg =
${METPLUS_VALID_BEG}
//valid_end =
${METPLUS_VALID_END}
//valid_inc = [
${METPLUS_VALID_INC}
//valid_exc = [
${METPLUS_VALID_EXC}
//
// Stratify by the initialization and valid hours and lead time.
//
//init_hour = [
${METPLUS_INIT_HOUR}
//valid_hour = [
${METPLUS_VALID_HOUR}
//lead = [
${METPLUS_LEAD}
//
// Select tracks which contain all required lead times.
//
//lead_req = [
${METPLUS_LEAD_REQ}
//
// Stratify by the INIT_MASK and VALID_MASK columns.
//
//init_mask = [
${METPLUS_INIT_MASK}
//valid_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.
//
//track_watch_warn = [
${METPLUS_TRACK_WATCH_WARN}
//
// Stratify by applying thresholds to numeric data columns.
//
//column_thresh_name = [
${METPLUS_COLUMN_THRESH_NAME}
//column_thresh_val = [
${METPLUS_COLUMN_THRESH_VAL}
//
// Stratify by performing string matching on non-numeric data columns.
//
//column_str_name = [
${METPLUS_COLUMN_STR_NAME}
//column_str_val = [
${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
//
//init_thresh_name = [
${METPLUS_INIT_THRESH_NAME}
//init_thresh_val = [
${METPLUS_INIT_THRESH_VAL}
//
// Similar to the column_str options above
//
//init_str_name = [
${METPLUS_INIT_STR_NAME}
//init_str_val = [
${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.
//
//water_only =
${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.
//
//landfall =
${METPLUS_LANDFALL}
//landfall_beg =
${METPLUS_LANDFALL_BEG}
//landfall_end =
${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.
//
//match_points =
${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
//
//jobs = [
${METPLUS_JOBS}
tmp_dir = "${MET_TMP_DIR}";
${METPLUS_MET_CONFIG_OVERRIDES}
Python Embedding
This use case does not use Python embedding.
User Scripting
User Scripting is not used in this use case.
Running METplus
Pass the use case configuration file to the run_metplus.py script along with any user-specific system configuration files if desired:
run_metplus.py /path/to/TCPairs_TCStat_fcstADECK_obsBDECK_ATCF_BasicExample.conf /path/to/user_system.conf
See Running METplus for more information.
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_pairs/ tc_stat/ (relative to OUTPUT_BASE) and will contain the following files:
tc_pairs/tc_pairs.al092021.tcst
tc_pairs/tc_pairs.al102021.tcst
tc_stat/tc_stat_summary.tcst
Keywords
Note
TCPairsToolUseCase
TCStatToolUseCase
TropicalCycloneUseCase
Navigate to the METplus Quick Search for Use Cases page to discover other similar use cases.