Note
Go to the end to download the full example code.
MTD: Use MTD to compute fire area and spread
model_applications/fire/MTD_fcstWRF_obsMMA_416Fire.conf
Scientific Objective
This case uses MODE-Time-Domain to create objects using fire area and Multimission Aircraft fire perimeters for the 416 Fire. MTD is used specifically to create objects over time that provide information on fire area and spread over time.
Version Added
METplus version 13.0
Datasets
Forecast: WRF Fire
Observation: Multimission Aircraft Fire Perimeter
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 calls Gen-Vx-Mask and MODE-Time-Domain once.
METplus Workflow
Beginning time (INIT_BEG): 2018-06-01 16 UTC
End time (INIT_END): 2018-06-01 16 UTC
Increment between beginning and end times (INIT_INCREMENT): 1 hour
Sequence of forecast leads to process (LEAD_SEQ): 1 - 33 hours with hourly increments
With an increment of 1 hour, one forecast initialization time is processed to result in 32 runs of Gen-Vx-Mask, once for each lead time. The runs of Gen-Vx-Mask create netCDF files from the interpolated fire perimeters that are used as input observations to Mode-Time-Domain. Then, Mode-Time-Domain is run once which uses all model and observation times as input.
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/fire/MTD_fcstWRF_obsMMA_416Fire.conf
[config]
# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/model_applications/fire/MTD_fcstWRF_obsMMA_416Fire.conf.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 = GenVxMask, 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%M
INIT_BEG = 201806011600
INIT_END = 201806011600
INIT_INCREMENT = 3600
LEAD_SEQ = begin_end_incr(1,33,1)
###
# GenVxMask File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###
GEN_VX_MASK_INPUT_DIR = {INPUT_BASE}/model_applications/fire/MTD_fcstWRF_obsMMA_416Fire/WRF
GEN_VX_MASK_INPUT_TEMPLATE = {init?fmt=%Y%m%d%H}/wrfout_fire_d02_{valid?fmt=%Y-%m-%d_%H:%M:%S}
GEN_VX_MASK_INPUT_MASK_DIR = {INPUT_BASE}/model_applications/fire/MTD_fcstWRF_obsMMA_416Fire/Interpolated_perimiters/
GEN_VX_MASK_INPUT_MASK_TEMPLATE = FIRE_{valid?fmt=%Y%m%d%H}.poly
GEN_VX_MASK_OUTPUT_DIR = {OUTPUT_BASE}/model_applications/fire/MTD_fcstWRF_obsMMA_416Fire/GenVxMask/Interpolated_perimiters
GEN_VX_MASK_OUTPUT_TEMPLATE = 416_Fire_Interpolated_{valid?fmt=%Y%m%d%H}.nc
###
# GenVxMask Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#genvxmask
###
GEN_VX_MASK_OPTIONS = -type poly -input_field 'name="FIRE_AREA"; level="(0,*,*)"; censor_thresh=NA; censor_val=0;'
###
# MTD File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###
FCST_MTD_INPUT_DIR = {GEN_VX_MASK_INPUT_DIR}
FCST_MTD_INPUT_TEMPLATE= {GEN_VX_MASK_INPUT_TEMPLATE}
OBS_MTD_INPUT_DIR = {GEN_VX_MASK_OUTPUT_DIR}
OBS_MTD_INPUT_TEMPLATE = {GEN_VX_MASK_OUTPUT_TEMPLATE}
MTD_OUTPUT_DIR = {OUTPUT_BASE}/model_applications/fire/MTD_fcstWRF_obsMMA_416Fire/mtd
MTD_OUTPUT_PREFIX = {MODEL}_Fire_416
###
# MTD Field Info
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#field-info
###
FCST_IS_PROB = False
FCST_PROB_IN_GRIB_PDS = false
FCST_MTD_VAR1_NAME = FIRE_AREA
FCST_MTD_CONV_RADIUS = 5
FCST_MTD_CONV_THRESH = >0.5
OBS_MTD_VAR1_NAME = FIRE_AREA
OBS_MTD_VAR1_LEVELS = "(*,*)"
OBS_MTD_CONV_RADIUS = 5
OBS_MTD_CONV_THRESH = >0.5
###
# MTD Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#mtd
###
MTD_SINGLE_RUN = False
MODEL = WRF
MTD_DESC = NA
OBTYPE = WRF
MTD_CONFIG_FILE = {PARM_BASE}/met_config/MTDConfig_wrapped
#MTD_REGRID_TO_GRID =
#MTD_REGRID_METHOD =
#MTD_REGRID_WIDTH =
#MTD_REGRID_VLD_THRESH =
#MTD_REGRID_SHAPE =
#MTD_REGRID_CONVERT =
#MTD_REGRID_CENSOR_THRESH =
#MTD_REGRID_CENSOR_VAL =
#MTD_MIN_VOLUME = 2000
#MTD_TIME_OFFSET_WARNING =
[user_env_vars]
MET_USE_WRF_SUBGRID = yes
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
MTDConfig_wrapped
////////////////////////////////////////////////////////////////////////////////
//
// MODE Time Domain configuration file.
//
// For additional information, see the MET_BASE/config/README file.
//
////////////////////////////////////////////////////////////////////////////////
//
// Output model name to be written
//
//model =
${METPLUS_MODEL}
//
// Output description to be written
//
//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}
////////////////////////////////////////////////////////////////////////////////
//
// Approximate grid resolution (km)
//
grid_res = 4;
////////////////////////////////////////////////////////////////////////////////
//
// Forecast and observation fields to be verified
//
fcst = {
${METPLUS_FCST_FILE_TYPE}
//field = {
${METPLUS_FCST_FIELD}
censor_thresh = [];
censor_val = [];
conv_time_window = { beg = -1; end = 1; };
//conv_radius =
${METPLUS_FCST_CONV_RADIUS}
//conv_thresh =
${METPLUS_FCST_CONV_THRESH}
}
obs = {
${METPLUS_OBS_FILE_TYPE}
//field = {
${METPLUS_OBS_FIELD}
censor_thresh = [];
censor_val = [];
conv_time_window = { beg = -1; end = 1; };
//conv_radius =
${METPLUS_OBS_CONV_RADIUS}
//conv_thresh =
${METPLUS_OBS_CONV_THRESH}
}
////////////////////////////////////////////////////////////////////////////////
//
// Intensity percentile value to be written
//
inten_perc_value = 99;
////////////////////////////////////////////////////////////////////////////////
//
// Throw away 3D objects with volumes smaller than this
//
//min_volume =
${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;
}
////////////////////////////////////////////////////////////////////////////////
//output_prefix =
${METPLUS_OUTPUT_PREFIX}
//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/fire/MTD_fcstWRF_obsMMA_416Fire.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 {OUTPUT_BASE}/model_applications/fire/MTD_fcstWRF_obsMMA_416Fire. The output from Gen-Vx-Mask will be in the GenVxMask/Interpolated_perimeters directory and will contain one mask for each time in the following format:
* 416_Fire_Interpolated_YYYYMMDDHH.nc
Here, YYYYMMDDHH is the year, month, day, and hour of the interpolated permiters. The output from MTD and will contain the following files:
* mtd_WRF_Fire_416_20180601_170000V_2d.txt
* mtd_WRF_Fire_416_20180601_170000V_3d_pair_cluster.txt
* mtd_WRF_Fire_416_20180601_170000V_3d_pair_simple.txt
* mtd_WRF_Fire_416_20180601_170000V_3d_single_cluster.txt
* mtd_WRF_Fire_416_20180601_170000V_3d_single_simple.txt
* mtd_WRF_Fire_416_20180601_170000V_obj.nc
The 2d file contains object-based statistics for the objects at different time steps. The 3d files contains the object based statistics over time for single and paired, simple and cluster objects. For the netCDF file, six variable fields are present (not including the lat/lon fields). Those variables are:
* fcst_raw(time, lat, lon)
* obs_raw(time, lat, lon)
* fcst_object_id(time, lat, lon)
* obs_object_id(time, lat, lon)
* fcst_cluster_id(time, lat, lon)
* obs_cluster_id(time, lat, lon)
Keywords
Note
MTDToolUseCase
GenVxMaskToolUseCase
NetCDFFileUseCase
FireAppUseCase
WRFFileUseCase
Navigate to the METplus Quick Search for Use Cases page to discover other similar use cases.
sphinx_gallery_thumbnail_path = ‘_static/fire-MTD_fcstWRF_obsMMA_416Fire.png’