TCDiag: Basic Use Case

met_tool_wrapper/TCDiag/TCDiag.conf

Overview

This use case illustrates the use of tc_diag tool, which is currently considered a beta-level release that lacks full functionality. The use case illustrates running the tc_diag tool for a tropical cyclone forecast case and generating intermediate NetCDF output files of the input model’s data transformed onto an azimuth-range grid. When the full functionality of the tc_diag tool is released in MET v12.0.0, this use case will also output environmental diagnostics computed from callable Python scripts.

The diagnostics are computed on a range-azimuth grid that follows the projected storm track. For inputs, it uses 0.25 deg gridded GRIB files from the a retrospective reforecast of the Global Forecast System (GFS). For the track, it uses the GFS’s predicted track to ensure that the model’s simulated storm doesn’t contaminate the diagnostics result as a result of the model’s simulated storm being mistaken for environmental factors. (Note: a future version of the tc_diag tool will include removal of the model’s vortex, allowing diagnostics to be computed along any arbitrarily defined track.)

Novel aspects of this use case:
  • This is the first example use case to run the tc_diag tool.

  • Example of running for a single tropical cyclone forecast case from Tropical Storm Bret (2023) using GFS data.

Scientific Objective

Generate intermediate data files, in which the input model’s data have been transformed to a range-azimuth grid, in preparation for further diagnostic calculations using Python-based routines.

Datasets

Forecast: GFS grib files

Track: a-deck file (Automated Tropical Cyclone Forecast System format)

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: Users may obtain real-time data from the deterministic GFS runs from NOAA’s NOMADS server: https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.YYYYMMDD/ZZ/atmos/ where YYYYMMDD is the date (4-digit year, 2-digit month, 2-digit day), ZZ is the initialization hour of the desired model cycle (00, 06, 12, 18).

METplus Components

This use case utilizes the METplus TCDiag wrapper to search for the desired ADECK file and forecast files that correspond to the track. It generates a command to run tc_diag if all required files are found.

METplus Workflow

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

Init: 2023-06-20 0000Z Forecast lead: 0, 6, and 12 hours

METplus Configuration

parm/use_cases/met_tool_wrapper/TCDiag/TCDiag.conf

[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 = 2023062012
INIT_END = 2023062012
INIT_INCREMENT = 21600
LEAD_SEQ = 0, 6, 12

###
# 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 = subset.aal03{date?fmt=%Y}.dat

TC_DIAG_INPUT1_DIR = {INPUT_BASE}/met_test/new/model_data/grib2/gfs
TC_DIAG_INPUT1_TEMPLATE = subset.gfs.t12z.pgrb2.0p50.f*
TC_DIAG_INPUT1_DOMAIN = parent
TC_DIAG_INPUT1_TECH_ID_LIST = AVNO


TC_DIAG_INPUT2_DIR = {INPUT_BASE}/met_test/new/model_data/grib2/gfs
TC_DIAG_INPUT2_TEMPLATE = subset.gfs.t12z.pgrb2.0p50.f*
TC_DIAG_INPUT2_DOMAIN = nest
TC_DIAG_INPUT2_TECH_ID_LIST = AVNO

TC_DIAG_OUTPUT_DIR = {OUTPUT_BASE}/tc_diag
TC_DIAG_OUTPUT_TEMPLATE = {date?fmt=%Y}


###
# Field Info
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#field-info
###

BOTH_VAR1_NAME = PRMSL
BOTH_VAR1_LEVELS = Z0

BOTH_VAR2_NAME = TMP
BOTH_VAR2_LEVELS = P1000, P925, P850, P700, P500, P400, P300, P250, P200, P150, 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 = GFSO

TC_DIAG_STORM_ID = AL032023
TC_DIAG_BASIN = AL
TC_DIAG_CYCLONE = 03

TC_DIAG_INIT_INCLUDE = {init?fmt=%Y%m%d%H}
#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 = 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 =

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_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 =

#LOG_LEVEL=DEBUG

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 TCDiag MET Configuration section of the User’s Guide for more information on the environment variables used in the file below:

////////////////////////////////////////////////////////////////////////////////
//
// TC-Diag configuration file.
//
// For additional information, please see the MET Users 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.1.0";

////////////////////////////////////////////////////////////////////////////////

${METPLUS_MET_CONFIG_OVERRIDES}

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/met_tool_wrapper/TCDiag/TCDiag.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 met_tool_wrapper/TCDiag (relative to OUTPUT_BASE) and will contain the following files:

  • tc_diag_AL032023_GFSO_2023062012_cyl_grid_nest.nc

  • tc_diag_AL032023_GFSO_2023062012_cyl_grid_parent.nc

Keywords

Note

  • DiagnosticsUseCase

  • TCDiagToolUseCase

  • GRIB2FileUseCase

  • 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-TCDiag.png’

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

Gallery generated by Sphinx-Gallery