Note
Go to the end to download the full example code.
Cyclone Plotter: From TC-Pairs Output
model_applications/tc_and_extra_tc/Plotter_fcstGFS_obsGFS_ExtraTC.conf
Scientific Objective
Provide visualization of storm tracks using output from the MET TC-Pairs tool. The date and hour associated with each storm track indicates the first time the storm was tracked in the model.
Version Added
METplus version 3.0
Datasets
Forecast: ADeck modified-ATCF (Automated Tropical Cyclone Forecasting System) tropical cyclone data
Observation: BDeck modified-ATCF (Automated Tropical Cyclone Forecasting System) “best-track” tropical cyclone data
Climatology: None
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 Components
This use case first runs TCPairs and then generates the storm track plot for all storm tracks found in the .tcst output file created by the MET TC-Pairs tool.
METplus Workflow
Beginning time (INIT_BEG): 201503
End time (INIT_END): None
Increment between beginning and end times (INIT_INCREMENT): None
Sequence of forecast leads to process (LEAD_SEQ): None
This use case does not loop in time. TCPairs is called once using time settings set by specific TC_PAIRS configuration items in the use case configuration file.
To generate TCPairs output, this example loops by initialization time for every 6 hour period that is available in the data set for 20150301. The output is then used to generate the plot of all cyclone tracks.
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. parm/use_cases/model_applications/tc_and_extra_tc/Plotter_fcstGFS_obsGFS_ExtraTC.conf
[config]
# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/model_applications/tc_and_extra_tc/Plotter_fcstGFS_obsGFS_ExtraTC.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, CyclonePlotter
###
# 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 = 201503
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/track_data
TC_PAIRS_ADECK_TEMPLATE = {date?fmt=%Y%m}/a{basin?fmt=%s}q{date?fmt=%Y%m}*.gfso.{cyclone?fmt=%s}
TC_PAIRS_BDECK_INPUT_DIR = {TC_PAIRS_ADECK_INPUT_DIR}
TC_PAIRS_BDECK_TEMPLATE = {date?fmt=%Y%m}/b{basin?fmt=%s}q{date?fmt=%Y%m}*.gfso.{cyclone?fmt=%s}
TC_PAIRS_REFORMAT_DIR = {OUTPUT_BASE}/track_data_atcf
TC_PAIRS_SKIP_IF_REFORMAT_EXISTS = yes
TC_PAIRS_OUTPUT_DIR = {OUTPUT_BASE}/tc_pairs
TC_PAIRS_OUTPUT_TEMPLATE = {date?fmt=%Y%m}/{basin?fmt=%s}q{date?fmt=%Y%m%d%H}.gfso.{cyclone?fmt=%s}
TC_PAIRS_SKIP_IF_OUTPUT_EXISTS = yes
# CyclonePlotter
CYCLONE_PLOTTER_INPUT_DIR = {OUTPUT_BASE}/tc_pairs
CYCLONE_PLOTTER_OUTPUT_DIR = {OUTPUT_BASE}/cyclone
###
# TCPairs Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#tcpairs
###
TC_PAIRS_DLAND_FILE = {MET_INSTALL_DIR}/share/met/tc_data/dland_global_tenth_degree.nc
TC_PAIRS_REFORMAT_DECK = yes
TC_PAIRS_REFORMAT_TYPE = SBU
TC_PAIRS_MISSING_VAL_TO_REPLACE = -99
TC_PAIRS_MISSING_VAL = -9999
TC_PAIRS_INIT_BEG = {init?fmt=%Y%m}00
TC_PAIRS_INIT_END = {init?fmt=%Y%m}30
###
# CyclonePlotter Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#cycloneplotter
###
CYCLONE_PLOTTER_INIT_DATE = 20150301
CYCLONE_PLOTTER_INIT_HR = 12 ;; hh format
CYCLONE_PLOTTER_MODEL = GFSO
CYCLONE_PLOTTER_PLOT_TITLE = Model Forecast Storm Tracks
CYCLONE_PLOTTER_GLOBAL_PLOT = no
# ***IMPORTANT*** If CYCLONE_PLOTTER_GLOBAL_PLOT
# is set to False or N[n]o, then define the region of the world to plot.
# Longitudes can range from -180 to 180 degrees and latitudes from -90 to 90 degrees
# --------------------------------
# EXAMPLE OF BOUNDING BOX SETTINGS
# --------------------------------
# NORTHERN HEMISPHERE
CYCLONE_PLOTTER_WEST_LON = -180
CYCLONE_PLOTTER_EAST_LON = 179
CYCLONE_PLOTTER_SOUTH_LAT = 0
CYCLONE_PLOTTER_NORTH_LAT = 90
CYCLONE_PLOTTER_CIRCLE_MARKER_SIZE = 2
CYCLONE_PLOTTER_CROSS_MARKER_SIZE = 3
CYCLONE_PLOTTER_ANNOTATION_FONT_SIZE = 3
CYCLONE_PLOTTER_LEGEND_FONT_SIZE = 3
CYCLONE_PLOTTER_GENERATE_TRACK_ASCII = yes
CYCLONE_PLOTTER_ADD_WATERMARK = False
CYCLONE_PLOTTER_RESOLUTION_DPI = 400
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}
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/METplus/parm/use_cases/model_applications/tc_and_extra_tc/Plotter_fcstGFS_obsGFS_ExtraTC.conf /path/to/user_system.conf
See Running METplus for more information.
Expected Output
A successful run will generate the following output to both the screen and to the logfile:
INFO: METplus has successfully finished running.
Additionally, two output files are created. Refer to the value set for OUTPUT_BASE to find where the output data was generated. TCPairs output for this use case will be found in tc_pairs/201503 (relative to OUTPUT_BASE) and will contain files with the following format:
mlq2015030100.gfso.<nnnn>.tcst
where nnnn is a zero-padded 4-digit number
A plot (in .png format) will be found in the cyclone directory (relative to OUTPUT_BASE) along with a text file containing data corresponding to the plotted storm tracks:
20150301.png
20150301.txt
Keywords
Note
TCPairsToolUseCase
CyclonePlotterUseCase
FeatureRelativeUseCase
MediumRangeAppUseCase
NOAAEMCOrgUseCase
SBUOrgUseCase
DTCOrgUseCase
TropicalCycloneUseCase
Navigate to the METplus Quick Search for Use Cases page to discover other similar use cases.
#