5.2.8.8. Ensemble-Stat: Basic Post-Processing only

model_application/precipitation/EnsembleStat_fcstHRRRE _FcstOnly_NetCDF.conf

Scientific Objective

Post-process ensemble members to derive simple (non-bias-corrected) mean, standard deviation (spread), minimum, maximum, and range fields for use in other MET tools.

Datasets

  • Forecast dataset: HRRRE 3 member ensemble netcdf 3 hour precipitation accumulation

METplus Components

This use case runs Ensemble-Stat on HRRRE data from 3 members after running it through pcp_combine to create a 3 hour precipitation accumulation

METplus Workflow

The following tools are used for each run time: EnsembleStat

This example loops by initialization time. For each initialization time it will process forecast leads 3, 6, 9 and 12

Run times:

Init: 2019-05-19_12Z
Forecast lead: 3
Init: 2019-05-19_12Z
Forecast lead: 6
Init: 2019-05-19_12Z
Forecast lead: 9
Init: 2019-05-19_12Z
Forecast lead: 12
Init: 2019-05-20_00Z
Forecast lead: 3
Init: 2019-05-20_00Z
Forecast lead: 6
Init: 2019-05-20_00Z
Forecast lead: 9
Init: 2019-05-20_00Z
Forecast lead: 12

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/EnsembleStat_fcstHRRRE_FcstOnly_NetCDF.conf

[config]

## Configuration-related settings such as the process list, begin and end times, etc.
PROCESS_LIST = EnsembleStat 

# time looping - 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
LOOP_BY = INIT

# Format of INIT_BEG and INT_END using % items
# %Y = 4 digit year, %m = 2 digit month, %d = 2 digit day, etc.
# see www.strftime.org for more information
# %Y%m%d%H expands to YYYYMMDDHH
INIT_TIME_FMT = %Y%m%d%H

# Start time for METplus run - must match INIT_TIME_FMT
INIT_BEG=2019051912

# End time for METplus run - must match INIT_TIME_FMT
INIT_END=2019052000 

# Increment between METplus runs (in seconds if no units are specified)
#  Must be >= 60 seconds
INIT_INCREMENT=43200

# List of forecast leads to process for each run time (init or valid)
# In hours if units are not specified
# If unset, defaults to 0 (don't loop through forecast leads)
LEAD_SEQ = 3,6,9,12

# Order of loops to process data - Options are times, processes
# Not relevant if only one item is in the PROCESS_LIST
# times = run all wrappers in the PROCESS_LIST for a single run time, then
#   increment the run time and run all wrappers again until all times have
#   been evaluated.
# processes = run the first wrapper in the PROCESS_LIST for all times
#   specified, then repeat for the next item in the PROCESS_LIST until all
#   wrappers have been run
LOOP_ORDER = processes

# Name to identify model (forecast) data in output
MODEL = HRRRE

OBTYPE = ANALYS

ENSEMBLE_STAT_N_MEMBERS = 3

ENS_VAR1_NAME = APCP_03
ENS_VAR1_LEVELS = "(*,*)"

# The MET ensemble_stat logging level
# 0 quiet to 5 loud, Verbosity setting for MET output, 2 is default.
# This takes precendence over the general MET logging level set in metplus_logging.conf
LOG_ENSEMBLE_STAT_VERBOSITY = 3

# MET Configuration files for EnsembleSTat
ENSEMBLE_STAT_CONFIG_FILE = {CONFIG_DIR}/EnsembleStatConfig_wrapped

ENSEMBLE_STAT_ENS_THRESH = 0.5

ENSEMBLE_STAT_ENS_VLD_THRESH = 1.0

OBS_ENSEMBLE_STAT_WINDOW_BEGIN = -5400
OBS_ENSEMBLE_STAT_WINDOW_END = 5400

ENSEMBLE_STAT_ENSEMBLE_FLAG_LATLON = TRUE
ENSEMBLE_STAT_ENSEMBLE_FLAG_MEAN = TRUE
ENSEMBLE_STAT_ENSEMBLE_FLAG_STDEV = TRUE
ENSEMBLE_STAT_ENSEMBLE_FLAG_MINUS = FALSE
ENSEMBLE_STAT_ENSEMBLE_FLAG_PLUS = FALSE
ENSEMBLE_STAT_ENSEMBLE_FLAG_MIN = TRUE
ENSEMBLE_STAT_ENSEMBLE_FLAG_MAX = TRUE
ENSEMBLE_STAT_ENSEMBLE_FLAG_RANGE = TRUE
ENSEMBLE_STAT_ENSEMBLE_FLAG_VLD_COUNT = TRUE
ENSEMBLE_STAT_ENSEMBLE_FLAG_FREQUENCY = TRUE
ENSEMBLE_STAT_ENSEMBLE_FLAG_NEP = FALSE
ENSEMBLE_STAT_ENSEMBLE_FLAG_NMEP = FALSE
ENSEMBLE_STAT_ENSEMBLE_FLAG_RANK = FALSE
ENSEMBLE_STAT_ENSEMBLE_FLAG_WEIGHT = FALSE

ENSEMBLE_STAT_OUTPUT_PREFIX = APCP_03

[dir]

CONFIG_DIR={PARM_BASE}/met_config

# input and output directories for ensemble_stat 
# Input File Directories, GRID_STAT and POINT_STAT
FCST_ENSEMBLE_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/precipitation/HRRRE/pcp_combine

# Ensemble stat output directory
ENSEMBLE_STAT_OUTPUT_DIR = {OUTPUT_BASE}/{MODEL}/ensemble

ENSEMBLE_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/precipitation/HRRRE/pcp_combine
ENSEMBLE_STAT_OUTPUT_DIR = {OUTPUT_BASE}/model_applications/precipitation/EnsembleSTat_fcstHRRRE_FcstOnly_NetCDF/EnsembleStat

[filename_templates]

# the following template uses begin_end_incr() notation that expands to:
#  hrrre01_{init?fmt=%Y%m%d%H}f{lead?fmt=%HHH}_A03.nc,
#  hrrre02_{init?fmt=%Y%m%d%H}f{lead?fmt=%HHH}_A03.nc,
#  hrrre03_{init?fmt=%Y%m%d%H}f{lead?fmt=%HHH}_A03.nc
FCST_ENSEMBLE_STAT_INPUT_TEMPLATE = hrrrebegin_end_incr(1,3,1,2)_{init?fmt=%Y%m%d%H}f{lead?fmt=%HHH}_A03.nc

ENSEMBLE_STAT_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H%M}

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

////////////////////////////////////////////////////////////////////////////////
//
// Ensemble-Stat 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
// May be set separately in each "obs.field" entry
//
${METPLUS_DESC}

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

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

//
// Verification grid
//
${METPLUS_REGRID_DICT}

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

//
// May be set separately in each "field" entry
//
${METPLUS_CENSOR_THRESH}
${METPLUS_CENSOR_VAL}
cat_thresh    = [];
nc_var_str    = "";

//
// Ensemble product fields to be processed
//
ens = {

   ${METPLUS_ENS_FILE_TYPE}

   ${METPLUS_ENS_THRESH}
   ${METPLUS_ENS_VLD_THRESH}
   ${METPLUS_ENS_OBS_THRESH}

   ${METPLUS_ENS_FIELD}
}

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

//
// Neighborhood ensemble probabilities
//
${METPLUS_NBRHD_PROB_DICT}

//
// NMEP smoothing methods
//
${METPLUS_NMEP_SMOOTH_DICT}

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

//
// Forecast and observation fields to be verified
//

fcst = {

   ${METPLUS_FCST_FILE_TYPE}

   ${METPLUS_FCST_FIELD}
}

obs = {

   ${METPLUS_OBS_FILE_TYPE}
 
   ${METPLUS_OBS_FIELD}
}

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

//
// Point observation filtering options
// May be set separately in each "obs.field" entry
//

${METPLUS_MESSAGE_TYPE}
sid_exc        = [];
obs_thresh     = [ NA ];
obs_quality    = [];
${METPLUS_DUPLICATE_FLAG}
obs_summary    = NONE;
obs_perc_value = 50;
${METPLUS_SKIP_CONST}

//
// Observation error options
// Set dist_type to NONE to use the observation error table instead
// May be set separately in each "obs.field" entry
//
obs_error = {
   ${METPLUS_OBS_ERROR_FLAG}
   dist_type        = NONE;
   dist_parm        = [];
   inst_bias_scale  = 1.0;
   inst_bias_offset = 0.0;
   min              = NA;      // Valid range of data
   max              = NA;
}

//
// Mapping of message type group name to comma-separated list of values.
//
message_type_group_map = [
   { key = "SURFACE"; val = "ADPSFC,SFCSHP,MSONET";               },
   { key = "ANYAIR";  val = "AIRCAR,AIRCFT";                      },
   { key = "ANYSFC";  val = "ADPSFC,SFCSHP,ADPUPA,PROFLR,MSONET"; },
   { key = "ONLYSF";  val = "ADPSFC,SFCSHP";                      }
];

//
// Ensemble bin sizes
// May be set separately in each "obs.field" entry
//
${METPLUS_ENS_SSVAR_BIN_SIZE}
${METPLUS_ENS_PHIST_BIN_SIZE}

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

//
// Climatology data
//
//climo_mean = {
${METPLUS_CLIMO_MEAN_DICT}


//climo_stdev = {
${METPLUS_CLIMO_STDEV_DICT}



//
// May be set separately in each "obs.field" entry
//
${METPLUS_CLIMO_CDF_DICT}

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

//
// Point observation time window
//
${METPLUS_OBS_WINDOW_DICT}

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

//
// Verification masking regions
//
mask = {
   ${METPLUS_MASK_GRID}
   ${METPLUS_MASK_POLY}
   sid   = [];
   llpnt = [];
}

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

//
// Confidence interval settings
//
${METPLUS_CI_ALPHA}

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

//
// Interpolation methods
//
${METPLUS_INTERP_DICT}

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

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

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

//
// Ensemble product output types
//
${METPLUS_ENSEMBLE_FLAG_DICT}

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

//
// Random number generator
//
rng = {
   type = "mt19937";
   seed = "1";
}

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

grid_weight_flag = NONE;
${METPLUS_OUTPUT_PREFIX}
//version          = "V9.0";

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

${METPLUS_MET_CONFIG_OVERRIDES}

Running METplus

This use case can be run two ways:

  1. Passing in EnsembleStat_fcstHRRRE_FcstOnly_NetCDF.conf then a user-specific system configuration file:

    run_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/precipitation/EnsembleStat_fcstHRRRE_FcstOnly_NetCDF.conf -c /path/to/user_system.conf
    
  2. Modifying the configurations in parm/metplus_config, then passing in EnsembleStat_fcstHRRRE_FcstOnly_NetCDF.conf:

    run_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/precipitation/EnsembleStat_fcstHRRRE_FcstOnly_NetCDF.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/EnsembleStat_fcstHRRRE_FcstOnly_NetCDF/EnsembleStat (relative to OUTPUT_BASE) The following folder/file combination will be created:

-201905191200

  • ensemble_stat_APCP_03_20190519_150000V_ens.nc

  • ensemble_stat_APCP_03_20190519_180000V_ens.nc

  • ensemble_stat_APCP_03_20190519_210000V_ens.nc

  • ensemble_stat_APCP_03_20190520_000000V_ens.nc

-201905200000

  • ensemble_stat_APCP_03_20190520_030000V_ens.nc

  • ensemble_stat_APCP_03_20190520_060000V_ens.nc

  • ensemble_stat_APCP_03_20190520_090000V_ens.nc

  • ensemble_stat_APCP_03_20190520_120000V_ens.nc

Keywords

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

Gallery generated by Sphinx-Gallery