Note
Go to the end to download the full example code
MTD: 6hr QPF Use Case
model_applications/precipitation/MTD_fcstHRRR-TLE _obsMRMS.conf
Scientific Objective
This use case demonstrates the evaluation of an ensemble mean field from a prototype ensemble post-processing technique for time-lagged ensembles (HRRR-TLE). MTD is used to provide useful object attributes and diagnostics on aggregated over a time series. This non-traditional approach provides alternative information and diagnostics to inform model development.
Datasets
Forecast dataset: HRRR-TLE forecasts in GRIB2
Observation dataset: Multi Radar Multi Sensor (MRMS)
METplus Components
This use case runs MTD (MODE Time Domain) over multiple forecast leads and compares them to the observational data set.
METplus Workflow
The following tools are used for each run time:
MTD
This example loops by valid time. For each valid time it will run once, processing forecast leads 1, 2, and 3. There is only one valid time in this example, so the following will be run:
Run times:
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 with the -c option, i.e. -c parm/use_cases/model_applications/precipitation/MTD_fcstHRRR-TLE_obsMRMS.conf
[config]
# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/model_applications/precipitation/MTD_fcstHRRR-TLE_obsMRMS.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 = MTD
###
# 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=2017051003
INIT_END=2017051003
INIT_INCREMENT=43200
LEAD_SEQ = 1,2,3
###
# File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###
FCST_MTD_INPUT_DIR = {INPUT_BASE}/model_applications/precipitation/PHPT
FCST_MTD_INPUT_TEMPLATE= {init?fmt=%Y%m%d}/{init?fmt=%Y%m%d}_i{init?fmt=%H}_f{lead?fmt=%HHH}_HRRRTLE_PHPT.grb2
OBS_MTD_INPUT_DIR = {INPUT_BASE}/model_applications/precipitation/QPE_Data
OBS_MTD_INPUT_TEMPLATE = {valid?fmt=%Y%m%d}/qpe_{valid?fmt=%Y%m%d%H}.nc
MTD_OUTPUT_DIR = {OUTPUT_BASE}/model_applications/precipitation/MTD_fcstHRRR-TLE_obsMRMS
MTD_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H%M}
###
# Field Info
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#field-info
###
MODEL = PHPT
OBTYPE = QPE
FCST_IS_PROB = true
FCST_PROB_IN_GRIB_PDS = true
FCST_VAR1_NAME = APCP
FCST_VAR1_LEVELS = A01
FCST_VAR1_THRESH = gt12.7
OBS_VAR1_NAME = P01M_NONE
OBS_VAR1_LEVELS = "(0,*,*)"
OBS_VAR1_THRESH = gt12.7
###
# MTD Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#mtd
###
FCST_MTD_CONV_RADIUS = 0
FCST_MTD_CONV_THRESH = >=10
OBS_MTD_CONV_RADIUS = 15
OBS_MTD_CONV_THRESH = >=12.7
MTD_REGRID_TO_GRID = OBS
MTD_OUTPUT_PREFIX = PROB_{MODEL}_{CURRENT_FCST_NAME}_vs_{OBTYPE}_{CURRENT_OBS_NAME}_A{CURRENT_FCST_LEVEL}
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 MTD MET Configuration section of the User’s Guide for more information on the environment variables used in the file below:
////////////////////////////////////////////////////////////////////////////////
//
// MODE Time Domain configuration file.
//
// For additional information, see the MET_BASE/config/README file.
//
////////////////////////////////////////////////////////////////////////////////
//
// Output model name to be written
//
${METPLUS_MODEL}
//
// Output description to be written
//
${METPLUS_DESC}
//
// Output observation type to be written
//
${METPLUS_OBTYPE}
////////////////////////////////////////////////////////////////////////////////
//
// Verification grid
// May be set separately in each "field" entry
//
${METPLUS_REGRID_DICT}
////////////////////////////////////////////////////////////////////////////////
//
// Approximate grid resolution (km)
//
grid_res = 4;
////////////////////////////////////////////////////////////////////////////////
//
// Forecast and observation fields to be verified
//
fcst = {
${METPLUS_FCST_FILE_TYPE}
${METPLUS_FCST_FIELD}
censor_thresh = [];
censor_val = [];
conv_time_window = { beg = -1; end = 1; };
${METPLUS_FCST_CONV_RADIUS}
${METPLUS_FCST_CONV_THRESH}
}
obs = {
${METPLUS_OBS_FILE_TYPE}
${METPLUS_OBS_FIELD}
censor_thresh = [];
censor_val = [];
conv_time_window = { beg = -1; end = 1; };
${METPLUS_OBS_CONV_RADIUS}
${METPLUS_OBS_CONV_THRESH}
}
////////////////////////////////////////////////////////////////////////////////
//
// Intensity percentile value to be written
//
inten_perc_value = 99;
////////////////////////////////////////////////////////////////////////////////
//
// Throw away 3D objects with volumes smaller than this
//
${METPLUS_MIN_VOLUME}
////////////////////////////////////////////////////////////////////////////////
//
// Fuzzy engine weights
//
weight = {
space_centroid_dist = 1.0;
time_centroid_delta = 1.0;
speed_delta = 1.0;
direction_diff = 1.0;
volume_ratio = 1.0;
axis_angle_diff = 1.0;
start_time_delta = 1.0;
end_time_delta = 1.0;
}
////////////////////////////////////////////////////////////////////////////////
//
// Fuzzy engine interest functions
//
interest_function = {
space_centroid_dist = (
( 0.0, 1.0 )
( 50.0, 0.5 )
( 100.0, 0.0 )
);
time_centroid_delta = (
( -3.0, 0.0 )
( -2.0, 0.5 )
( -1.0, 0.8 )
( 0.0, 1.0 )
( 1.0, 0.8 )
( 2.0, 0.5 )
( 3.0, 0.0 )
);
speed_delta = (
( -10.0, 0.0 )
( -5.0, 0.5 )
( 0.0, 1.0 )
( 5.0, 0.5 )
( 10.0, 0.0 )
);
direction_diff = (
( 0.0, 1.0 )
( 90.0, 0.0 )
( 180.0, 0.0 )
);
volume_ratio = (
( 0.0, 0.0 )
( 0.5, 0.5 )
( 1.0, 1.0 )
( 1.5, 0.5 )
( 2.0, 0.0 )
);
axis_angle_diff = (
( 0.0, 1.0 )
( 30.0, 1.0 )
( 90.0, 0.0 )
);
start_time_delta = (
( -5.0, 0.0 )
( -3.0, 0.5 )
( 0.0, 1.0 )
( 3.0, 0.5 )
( 5.0, 0.0 )
);
end_time_delta = (
( -5.0, 0.0 )
( -3.0, 0.5 )
( 0.0, 1.0 )
( 3.0, 0.5 )
( 5.0, 0.0 )
);
} // interest functions
////////////////////////////////////////////////////////////////////////////////
//
// Total interest threshold for determining matches
//
total_interest_thresh = 0.7;
////////////////////////////////////////////////////////////////////////////////
//
// Output flags
//
nc_output = {
latlon = true;
raw = true;
object_id = true;
cluster_id = true;
}
txt_output = {
attributes_2d = true;
attributes_3d = true;
}
////////////////////////////////////////////////////////////////////////////////
${METPLUS_OUTPUT_PREFIX}
//version = "V9.0";
tmp_dir = "${MET_TMP_DIR}";
////////////////////////////////////////////////////////////////////////////////
${METPLUS_MET_CONFIG_OVERRIDES}
Running METplus
This use case can be run two ways:
Passing in MTD_fcstHRRR-TLE_obsMRMS.conf then a user-specific system configuration file:
run_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/precipitation/MTD_fcstHRRR-TLE_obsMRMS.conf -c /path/to/user_system.conf
Modifying the configurations in parm/metplus_config, then passing in MTD_fcstHRRR-TLE_obsMRMS.conf:
run_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/precipitation/MTD_fcstHRRR-TLE_obsMRMS.conf
The former method is recommended. Whether you add them to a user-specific configuration file or modify the metplus_config files, the following variables must be set correctly:
INPUT_BASE - Path to directory where sample data tarballs are unpacked (See Datasets section to obtain tarballs). This is not required to run METplus, but it is required to run the examples in parm/use_cases
OUTPUT_BASE - Path where METplus output will be written. This must be in a location where you have write permissions
MET_INSTALL_DIR - Path to location where MET is installed locally
Example User Configuration File:
[dir]
INPUT_BASE = /path/to/sample/input/data
OUTPUT_BASE = /path/to/output/dir
MET_INSTALL_DIR = /path/to/met-X.Y
NOTE: All of these items must be found under the [dir] section.
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 model_applications/precipitation/MTD_fcstHRRR-TLE_obsMRMS (relative to OUTPUT_BASE) and will contain the following files:
mtd_20170510_040000V_2d.txt
mtd_20170510_040000V_3d_single_simple.txt
mtd_20170510_040000V_obj.nc
Keywords
Note
MTDToolUseCase
PrecipitationAppUseCase
GRIB2FileUseCase
NetCDFFileUseCase
NOAAWPCOrgUseCase
NOAAHMTOrgUseCase
NOAAHWTOrgUseCase
ConvectionAllowingModelsAppUseCase
ProbabilityVerificationUseCase
DiagnosticsUseCase
Navigate to the METplus Quick Search for Use Cases page to discover other similar use cases.
sphinx_gallery_thumbnail_path = ‘_static/precipitation-MTD_fcstHRRR-TLE_obsMRMS.png’
Total running time of the script: (0 minutes 0.000 seconds)