MADIS2NC: Basic Use Case

met_tool_wrapper/MADIS2NC/MADIS2NC.conf

Scientific Objective

Converting file formats so point observations can be read by the MET tools.

Datasets

Observations: METAR observations in MADIS NetCDF files
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: MADIS

METplus Components

This use case utilizes the METplus MADIS2NC wrapper to generate a command to run the MET tool madis2nc if all required files are found.

METplus Workflow

MADIS2NC is the only tool called in this example. It processes the following run time:

Valid: 2012-04-09_12Z

METplus Configuration

METplus first loads the default configuration file found in parm/metplus_config, then it loads any configuration files passed to METplus via the command line.

[config]

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


###
# 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 = 2012040912
INIT_END = 2012040912
INIT_INCREMENT = 1H

LEAD_SEQ = 0

MADIS2NC_RUNTIME_FREQ = RUN_ONCE_FOR_EACH


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

MADIS2NC_INPUT_DIR =
MADIS2NC_INPUT_TEMPLATE = {INPUT_BASE}/met_test/data/sample_obs/madis/metar/metar_{init?fmt=%Y%m%d%H}_F{lead?fmt=%3H}.nc

MADIS2NC_OUTPUT_DIR =
MADIS2NC_OUTPUT_TEMPLATE = {OUTPUT_BASE}/madis2nc/met_metar_{init?fmt=%Y%m%d%H}_F{lead?fmt=%3H}.nc

#MADIS2NC_SKIP_IF_OUTPUT_EXISTS = False

#MADIS2NC_FILE_WINDOW_BEGIN = 0
#MADIS2NC_FILE_WINDOW_END = 0

###
# MADIS2NC Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#madis2nc
###

#LOG_MADIS2NC_VERBOSITY = 3

MADIS2NC_CONFIG_FILE = {PARM_BASE}/met_config/Madis2NcConfig_wrapped

MADIS2NC_TYPE = metar

#MADIS2NC_QC_DD =
#MADIS2NC_LVL_DIM =
#MADIS2NC_REC_BEG =
#MADIS2NC_REC_END =
#MADIS2NC_MASK_GRID =
#MADIS2NC_MASK_POLY =
#MADIS2NC_MASK_SID =

#MADIS2NC_TIME_SUMMARY_FLAG =
#MADIS2NC_TIME_SUMMARY_RAW_DATA =
#MADIS2NC_TIME_SUMMARY_BEG =
#MADIS2NC_TIME_SUMMARY_END =
#MADIS2NC_TIME_SUMMARY_STEP =
#MADIS2NC_TIME_SUMMARY_WIDTH =
#MADIS2NC_TIME_SUMMARY_GRIB_CODE =
#MADIS2NC_TIME_SUMMARY_OBS_VAR =
#MADIS2NC_TIME_SUMMARY_TYPE =
#MADIS2NC_TIME_SUMMARY_VLD_FREQ =
#MADIS2NC_TIME_SUMMARY_VLD_THRESH =

#MADIS2NC_MET_CONFIG_OVERRIDES =

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

////////////////////////////////////////////////////////////////////////////////
//
// MADIS2NC configuration file.
//
// For additional information, please see the MET Users Guide.
//
////////////////////////////////////////////////////////////////////////////////

//
// The parameters listed below are used to summarize the MADIS data read in
//

//
// Time periods for the summarization
// obs_var (string array) is added and works like grib_code (int array)
// when the obs name is given instead of grib_code
//

//time_summary = {
${METPLUS_TIME_SUMMARY_DICT}

//
// Indicate a version number for the contents of this configuration file.
// The value should generally not be modified.
//
//version = "V12.0.0";

${METPLUS_MET_CONFIG_OVERRIDES}

Running METplus

Pass the path to MADIS2NC.conf as an argument to run_metplus.py:

run_metplus.py /path/to/METplus/parm/use_cases/met_tool_wrapper/MADIS2NC/MADIS2NC.conf

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 madis2nc (relative to OUTPUT_BASE) and will contain the following file:

  • met_metar_2012040912_F000.nc

Keywords

Note

  • MADIS2NCToolUseCase

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

#

Gallery generated by Sphinx-Gallery