WaveletStat: Basic Use Case

met_tool_wrapper/WaveletStat/WaveletStat.conf

Scientific Objective

Compare 3 hour forecast precipitation accumulations to observations of 3 hour precipitation accumulation. Generate statistics of the results.

Datasets

Forecast: WRF 3 hour precipitation accumulation
Observation: NCEP Stage 2 National Precipitation Analysis - NPA (multi-sensor) 3 hour precipitation accumulation
Location: All of the input data required for this use case can be found in the met_test sample data tarball. Click here for 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 the Running METplus section for more information.

METplus Components

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

METplus Workflow

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

Init: 2005-08-07_0Z
Forecast lead: 12 hour

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: parm/use_cases/met_tool_wrapper/WaveletStat/WaveletStat.conf

[config]

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


###
# 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=2005080700
INIT_END=2005080700
INIT_INCREMENT = 12H

LEAD_SEQ = 12


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

FCST_WAVELET_STAT_INPUT_DIR = {INPUT_BASE}/met_test/data/sample_fcst
FCST_WAVELET_STAT_INPUT_TEMPLATE = {init?fmt=%Y%m%d%H}/wrfprs_ruc13_{lead?fmt=%HH}.tm00_G212

OBS_WAVELET_STAT_INPUT_DIR = {INPUT_BASE}/met_test/new
OBS_WAVELET_STAT_INPUT_TEMPLATE = ST2ml{valid?fmt=%Y%m%d%H}_A03h.nc

WAVELET_STAT_OUTPUT_DIR = {OUTPUT_BASE}/wavelet_stat
WAVELET_STAT_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H}


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

MODEL = WRF
OBTYPE = MC_PCP

WAVELET_STAT_ONCE_PER_FIELD = False

#FCST_IS_PROB = false

FCST_VAR1_NAME = APCP
FCST_VAR1_LEVELS = A03
FCST_VAR1_THRESH = gt12.7, gt25.4, gt50.8, gt76.2

OBS_VAR1_NAME = APCP_03
OBS_VAR1_LEVELS = "(*,*)"
OBS_VAR1_THRESH = gt12.7, gt25.4, gt50.8, gt76.2


###
# GridStat Settings (optional)
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#gridstat
###

#LOG_WAVELET_STAT_VERBOSITY = 2

WAVELET_STAT_CONFIG_FILE = {PARM_BASE}/met_config/WaveletStatConfig_wrapped

#FCST_WAVELET_STAT_FILE_TYPE =
#OBS_WAVELET_STAT_FILE_TYPE =

#FCST_WAVELET_STAT_FILE_WINDOW_BEGIN = 0
#FCST_WAVELET_STAT_FILE_WINDOW_END = 0
#OBS_WAVELET_STAT_FILE_WINDOW_BEGIN = 0
#OBS_WAVELET_STAT_FILE_WINDOW_END = 0

#WAVELET_STAT_MODEL =
#WAVELET_STAT_DESC =
#WAVELET_STAT_OBTYPE =

#WAVELET_STAT_REGRID_TO_GRID =
#WAVELET_STAT_REGRID_METHOD =
#WAVELET_STAT_REGRID_WIDTH =
#WAVELET_STAT_REGRID_VLD_THRESH =
#WAVELET_STAT_REGRID_SHAPE =

#WAVELET_STAT_CENSOR_THRESH =
#WAVELET_STAT_CENSOR_VAL =

#WAVELET_STAT_MASK_MISSING_FLAG =

#WAVELET_STAT_GRID_DECOMP_FLAG =

#WAVELET_STAT_TILE_WIDTH =
#WAVELET_STAT_TILE_LOCATION1_X_LL =
#WAVELET_STAT_TILE_LOCATION1_Y_LL =

#WAVELET_STAT_WAVELET_TYPE =
#WAVELET_STAT_WAVELET_MEMBER =

WAVELET_STAT_OUTPUT_FLAG_ISC = STAT

#WAVELET_STAT_NC_PAIRS_FLAG_RAW =
#WAVELET_STAT_NC_PAIRS_FLAG_DIFF =

#WAVELET_STAT_PS_PLOT_FLAG =

#WAVELET_STAT_FCST_RAW_PLOT_COLOR_TABLE =
#WAVELET_STAT_FCST_RAW_PLOT_PLOT_MIN =
#WAVELET_STAT_FCST_RAW_PLOT_PLOT_MAX =

#WAVELET_STAT_OBS_RAW_PLOT_COLOR_TABLE =
#WAVELET_STAT_OBS_RAW_PLOT_PLOT_MIN =
#WAVELET_STAT_OBS_RAW_PLOT_PLOT_MAX =

#WAVELET_STAT_WVLT_PLOT_COLOR_TABLE =
#WAVELET_STAT_WVLT_PLOT_PLOT_MIN =
#WAVELET_STAT_WVLT_PLOT_PLOT_MAX =

#WAVELET_STAT_OUTPUT_PREFIX =

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

////////////////////////////////////////////////////////////////////////////////
//
// Wavelet-Stat configuration file.
//
// For additional information, please see the MET Users Guide.
//
////////////////////////////////////////////////////////////////////////////////

//
// Output model name to be written
//
//model =
${METPLUS_MODEL}

//
// Output description to be written
// May be set separately in each "obs.field" entry
//
//desc =
${METPLUS_DESC}

//
// Output observation type to be written
//
//obtype =
${METPLUS_OBTYPE}

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

//
// Verification grid
// May be set separately in each "field" entry
//
//regrid = {
${METPLUS_REGRID_DICT}

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

//
// May be set separately in each "field" entry
//
//censor_thresh =
${METPLUS_CENSOR_THRESH}
//censor_val =
${METPLUS_CENSOR_VAL}

//
// Forecast and observation fields to be verified
//
fcst = {
  ${METPLUS_FCST_FILE_TYPE}
  ${METPLUS_FCST_FIELD}
}
obs = {
  ${METPLUS_OBS_FILE_TYPE}
  ${METPLUS_OBS_FIELD}
}

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

//
// Handle missing data
//
//mask_missing_flag =
${METPLUS_MASK_MISSING_FLAG}

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

//
// Decompose the field into dyadic tiles
//
//grid_decomp_flag =
${METPLUS_GRID_DECOMP_FLAG}

//tile = {
${METPLUS_TILE_DICT}

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

//
// Wavelet to be used for the decomposition
//
//wavelet = {
${METPLUS_WAVELET_DICT}

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

//
// Statistical output types
//
//output_flag = {
${METPLUS_OUTPUT_FLAG_DICT}

//
// NetCDF matched pairs and PostScript output files
//
//nc_pairs_flag = {
${METPLUS_NC_PAIRS_FLAG_DICT}

//ps_plot_flag =
${METPLUS_PS_PLOT_FLAG}

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

//
// Plotting information
//
met_data_dir = "MET_BASE";

//fcst_raw_plot = {
${METPLUS_FCST_RAW_PLOT_DICT}

//obs_raw_plot = {
${METPLUS_OBS_RAW_PLOT_DICT}

//wvlt_plot = {
${METPLUS_WVLT_PLOT_DICT}

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

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

  • wavelet_stat_120000L_20050807_120000V_isc.txt

  • wavelet_stat_120000L_20050807_120000V.nc

  • wavelet_stat_120000L_20050807_120000V.ps

  • wavelet_stat_120000L_20050807_120000V.stat

Keywords

Note

  • WaveletStatToolUseCase

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

sphinx_gallery_thumbnail_path = ‘_static/met_tool_wrapper-WaveletStat.png’

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

Gallery generated by Sphinx-Gallery