Ensemble-Stat: Ensemble Statistics using Obs Uncertainty

model_applications/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField.conf

Scientific Objective

To provide useful statistical information about the ensemble characteristics such as how dispersive it is and the relationship between spread and skill. This example also shows how to compute simple probability fields called ensemble relative frequency.

Version Added

METplus version 3.0

Datasets

Forecast: NOAA High Resolution Rapid Refresh Ensemble (HRRR-E)

Observation: NOAA High Resolution Rapid Refresh Ensemble (HRRR-E)

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 runs PB2NC on the prepBUFR observation data to convert it into NetCDF format so it can be read by MET. Then EnsembleStat is run.

METplus Workflow

Beginning time (INIT_BEG): 2018070912

End time (INIT_END): 2018070912

Increment between beginning and end times (INIT_INCREMENT): 3600

Sequence of forecast leads to process (LEAD_SEQ): 0,1,2

The following tools are used for each run time:

PB2NC > EnsembleStat

This example loops by initialization time. For each initialization time it will process forecast leads 0, 1, and 2. There is only one initialization time in this example, so the following will be run:

Run times:

Init: 2018-07-09_12Z
Forecast lead: 0
Init: 2018-07-09_12Z
Forecast lead: 1
Init: 2018-07-09_12Z
Forecast lead: 2

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/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField.conf

[config]

# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/model_applications/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField.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 = PB2NC, EnsembleStat, GenEnsProd


###
# 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=2018070912
INIT_END=2018070912
INIT_INCREMENT=3600

LEAD_SEQ = 0,1,2


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

# PB2NC

PB2NC_INPUT_DIR = {INPUT_BASE}/model_applications/short_range/hrrr_ensemble_sfc/prepbufr
PB2NC_INPUT_TEMPLATE = {da_init?fmt=%Y%m%d}/{da_init?fmt=%Y%j%H%M}.rap.t{da_init?fmt=%H}z.prepbufr.tm{offset?fmt=%2H}.{da_init?fmt=%Y%m%d}

PB2NC_SKIP_IF_OUTPUT_EXISTS = True

PB2NC_OUTPUT_DIR = {OUTPUT_BASE}/model_applications/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField/rap
PB2NC_OUTPUT_TEMPLATE = {valid?fmt=%Y%m%d}/{valid?fmt=%Y%m%d%H}.rap.nc


# EnsembleStat

FCST_ENSEMBLE_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/short_range/hrrr_ensemble_sfc/fcst
FCST_ENSEMBLE_STAT_INPUT_TEMPLATE =
    {init?fmt=%Y%m%d%H}/postprd_mem0001/wrfprs_conus_mem0001_{lead?fmt=%HH}.grib2,
    {init?fmt=%Y%m%d%H}/postprd_mem0002/wrfprs_conus_mem0002_{lead?fmt=%HH}.grib2

OBS_ENSEMBLE_STAT_POINT_INPUT_DIR = {PB2NC_OUTPUT_DIR}
OBS_ENSEMBLE_STAT_POINT_INPUT_TEMPLATE = {PB2NC_OUTPUT_TEMPLATE}

ENSEMBLE_STAT_VERIFICATION_MASK_TEMPLATE =
    {INPUT_BASE}/model_applications/short_range/mask/EAST.nc,
    {INPUT_BASE}/model_applications/short_range/mask/WEST.nc,
    {INPUT_BASE}/model_applications/short_range/mask/CONUS.nc,
    {INPUT_BASE}/model_applications/short_range/mask/LMV.nc

ENSEMBLE_STAT_OUTPUT_DIR = {OUTPUT_BASE}/model_applications/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField/EnsembleStat
ENSEMBLE_STAT_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H%M}

# GenEnsProd
GEN_ENS_PROD_INPUT_DIR = {FCST_ENSEMBLE_STAT_INPUT_DIR}
GEN_ENS_PROD_INPUT_TEMPLATE = {FCST_ENSEMBLE_STAT_INPUT_TEMPLATE}

GEN_ENS_PROD_OUTPUT_DIR = {ENSEMBLE_STAT_OUTPUT_DIR}
GEN_ENS_PROD_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H%M}/gen_ens_prod_{ENSEMBLE_STAT_OUTPUT_PREFIX}_{valid?fmt=%Y%m%d_%H%M%S}V_ens.nc


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

MODEL = HRRRE_ens
OBTYPE = ANALYS

ENS_VAR1_NAME = TMP
ENS_VAR1_LEVELS = Z02
ENS_VAR1_THRESH = >=283, >=288, >=293, >=298, >=303

ENS_VAR2_NAME = DPT
ENS_VAR2_LEVELS = Z2
ENS_VAR2_THRESH = >=278, >=283, >=288, >=293, >=298

ENS_VAR3_NAME = UGRD
ENS_VAR3_LEVELS = Z10
ENS_VAR3_THRESH = <=-10, <=-5, <=-2, >=2, >=5, >=10

ENS_VAR4_NAME = VGRD
ENS_VAR4_LEVELS = Z10
ENS_VAR4_THRESH = <=-10, <=-5, <=-2, >=2, >=5, >=10

ENS_VAR5_NAME = WIND
ENS_VAR5_LEVELS = Z10
ENS_VAR5_THRESH = >=2, >=4, >=6, >=8, >=10

FCST_VAR1_NAME = TMP
FCST_VAR1_LEVELS = Z2
BOTH_VAR1_THRESH = >=283, >=288, >=293, >=298, >=303

OBS_VAR1_NAME = {FCST_VAR1_NAME}
OBS_VAR1_LEVELS = {FCST_VAR1_LEVELS}
OBS_VAR1_OPTIONS = ens_ssvar_bin_size = 1.0; ens_phist_bin_size = 0.05; wind_thresh = >2.572;


###
# PB2NC Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#pb2nc
###

PB2NC_LEVEL_RANGE_END = 255

PB2NC_QUALITY_MARK_THRESH = 3

PB2NC_GRID =
PB2NC_POLY =
PB2NC_STATION_ID =
PB2NC_MESSAGE_TYPE = ADPUPA, ADPSFC, AIRCFT, PROFLR

PB2NC_OBS_BUFR_VAR_LIST = POB, QOB, TOB, ZOB, UOB, VOB, D_DPT, D_WDIR, D_WIND, D_RH, D_MIXR, D_PRMSL

PB2NC_TIME_SUMMARY_FLAG = False
PB2NC_TIME_SUMMARY_RAW_DATA = False
PB2NC_TIME_SUMMARY_BEG = 000000
PB2NC_TIME_SUMMARY_END = 235959
PB2NC_TIME_SUMMARY_STEP = 300
PB2NC_TIME_SUMMARY_WIDTH = 600
PB2NC_TIME_SUMMARY_GRIB_CODES =
PB2NC_TIME_SUMMARY_VAR_NAMES = TMP, WDIR, RH
PB2NC_TIME_SUMMARY_TYPES =
PB2NC_TIME_SUMMARY_VALID_FREQ = 0
PB2NC_TIME_SUMMARY_VALID_THRESH = 0.0

PB2NC_OBS_WINDOW_BEGIN = -900
PB2NC_OBS_WINDOW_END = 900


###
# EnsembleStat Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#ensemblestat
###

ENSEMBLE_STAT_OBS_WINDOW_BEGIN = -900
ENSEMBLE_STAT_OBS_WINDOW_END = 900

ENSEMBLE_STAT_N_MEMBERS = 2

ENSEMBLE_STAT_ENS_THRESH = 1.0

ENSEMBLE_STAT_REGRID_TO_GRID = FCST
ENSEMBLE_STAT_REGRID_METHOD = BILIN
ENSEMBLE_STAT_REGRID_WIDTH = 2

ENSEMBLE_STAT_DUPLICATE_FLAG = UNIQUE
ENSEMBLE_STAT_SKIP_CONST = True

ENSEMBLE_STAT_OBS_ERROR_FLAG = TRUE

ENSEMBLE_STAT_MASK_GRID =

ENSEMBLE_STAT_CI_ALPHA = 0.01

ENSEMBLE_STAT_MESSAGE_TYPE = ADPSFC

ENSEMBLE_STAT_INTERP_METHOD = BILIN
ENSEMBLE_STAT_INTERP_WIDTH = 2

ENSEMBLE_STAT_OUTPUT_FLAG_ECNT = BOTH
ENSEMBLE_STAT_OUTPUT_FLAG_RPS = NONE
ENSEMBLE_STAT_OUTPUT_FLAG_RHIST = BOTH
ENSEMBLE_STAT_OUTPUT_FLAG_PHIST = BOTH
ENSEMBLE_STAT_OUTPUT_FLAG_ORANK = BOTH
ENSEMBLE_STAT_OUTPUT_FLAG_SSVAR = BOTH
ENSEMBLE_STAT_OUTPUT_FLAG_RELP = BOTH


ENSEMBLE_STAT_NC_ORANK_FLAG_LATLON = TRUE
ENSEMBLE_STAT_NC_ORANK_FLAG_MEAN = TRUE
ENSEMBLE_STAT_NC_ORANK_FLAG_RANK = FALSE
ENSEMBLE_STAT_NC_ORANK_FLAG_PIT = FALSE
ENSEMBLE_STAT_NC_ORANK_FLAG_VLD_COUNT = TRUE
ENSEMBLE_STAT_NC_ORANK_FLAG_WEIGHT = FALSE

CONFIG_DIR={PARM_BASE}/use_cases/model_applications/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField
ENSEMBLE_STAT_MET_OBS_ERR_TABLE = {CONFIG_DIR}/obs_error_table_V8.0.txt

ENSEMBLE_STAT_OUTPUT_PREFIX = HRRRE_F{lead?fmt=%3H}_ADPSFC

###
# GenEnsProd Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#genensprod
###


GEN_ENS_PROD_OBS_WINDOW_BEGIN = -900
GEN_ENS_PROD_OBS_WINDOW_END = 900

GEN_ENS_PROD_N_MEMBERS = 2

GEN_ENS_PROD_ENS_THRESH = 1.0

GEN_ENS_PROD_REGRID_TO_GRID = FCST
GEN_ENS_PROD_REGRID_METHOD = BILIN
GEN_ENS_PROD_REGRID_WIDTH = 2

GEN_ENS_PROD_ENSEMBLE_FLAG_LATLON = TRUE
GEN_ENS_PROD_ENSEMBLE_FLAG_MEAN = TRUE
GEN_ENS_PROD_ENSEMBLE_FLAG_STDEV = TRUE
GEN_ENS_PROD_ENSEMBLE_FLAG_MINUS = FALSE
GEN_ENS_PROD_ENSEMBLE_FLAG_PLUS = FALSE
GEN_ENS_PROD_ENSEMBLE_FLAG_MIN = FALSE
GEN_ENS_PROD_ENSEMBLE_FLAG_MAX = FALSE
GEN_ENS_PROD_ENSEMBLE_FLAG_RANGE = FALSE
GEN_ENS_PROD_ENSEMBLE_FLAG_VLD_COUNT = TRUE
GEN_ENS_PROD_ENSEMBLE_FLAG_FREQUENCY = TRUE
GEN_ENS_PROD_ENSEMBLE_FLAG_NEP = FALSE
GEN_ENS_PROD_ENSEMBLE_FLAG_NMEP = FALSE

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

EnsembleStatConfig_wrapped
///////////////////////////////////////////////////////////////////////////////
//
// 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    = "";

//ens_member_ids =
${METPLUS_ENS_MEMBER_IDS}

//control_id =
${METPLUS_CONTROL_ID}


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

//prob_cat_thresh =
${METPLUS_PROB_CAT_THRESH}

//prob_pct_thresh =
${METPLUS_PROB_PCT_THRESH}

//eclv_points =
${METPLUS_ECLV_POINTS}


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

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

fcst = {

   ${METPLUS_FCST_FILE_TYPE}
   ${METPLUS_ENS_THRESH}
   ${METPLUS_VLD_THRESH}
   ${METPLUS_FCST_FIELD}
   ${METPLUS_FCST_CLIMO_MEAN_DICT}
   ${METPLUS_FCST_CLIMO_STDEV_DICT}

}

obs = {

   ${METPLUS_OBS_FILE_TYPE}
   ${METPLUS_OBS_FIELD}
   ${METPLUS_OBS_CLIMO_MEAN_DICT}
   ${METPLUS_OBS_CLIMO_STDEV_DICT}

}

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

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

//message_type =
${METPLUS_MESSAGE_TYPE}
sid_exc        = [];
//obs_thresh     =
${METPLUS_OBS_THRESH}

//obs_quality_inc =
${METPLUS_OBS_QUALITY_INC}

//obs_quality_exc =
${METPLUS_OBS_QUALITY_EXC}

//duplicate_flag =
${METPLUS_DUPLICATE_FLAG}
obs_summary    = NONE;
obs_perc_value = 50;
//skip_const =
${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 = {
   //flag =
   ${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";                      }
];

//obtype_as_group_val_flag =
${METPLUS_OBTYPE_AS_GROUP_VAL_FLAG}

//
// Ensemble bin sizes
// May be set separately in each "obs.field" entry
//
//ens_ssvar_bin_size =
${METPLUS_ENS_SSVAR_BIN_SIZE}
//ens_phist_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
//
//climo_cdf = {
${METPLUS_CLIMO_CDF_DICT}

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

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

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

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

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

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

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

//
// Interpolation methods
//
//interp = {
${METPLUS_INTERP_DICT}

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

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

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

//
// Gridded verification output types
// May be set separately in each "obs.field" entry
//
//nc_orank_flag = {
${METPLUS_NC_ORANK_FLAG_DICT}

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

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

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

//grid_weight_flag =
${METPLUS_GRID_WEIGHT_FLAG}
//point_weight_flag =
${METPLUS_POINT_WEIGHT_FLAG}
//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/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField.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 model_applications/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField/EnsembleStat/201807091200 (relative to OUTPUT_BASE) and will contain the following files:

  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_ecnt.txt

  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_ens.nc

  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_orank.txt

  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_phist.txt

  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_relp.txt

  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_rhist.txt

  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_ssvar.txt

  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V.stat

  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_ecnt.txt

  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_ens.nc

  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_orank.txt

  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_phist.txt

  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_relp.txt

  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_rhist.txt

  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_ssvar.txt

  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V.stat

  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_ecnt.txt

  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_ens.nc

  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_orank.txt

  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_phist.txt

  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_relp.txt

  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_rhist.txt

  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_ssvar.txt

  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V.stat

Keywords

Note

  • EnsembleStatToolUseCase

  • ShortRangeAppUseCase

  • PB2NCToolUseCase

  • prepBUFRFileUseCase

  • GRIB2FileUseCase

  • NCAROrgUseCase

  • EnsembleAppUseCase

  • ProbabilityGenerationUseCase

  • NOAAGSLOrgUseCase

  • DTCOrgUseCase

  • ObsUncertaintyUseCase

  • MaskingFeatureUseCase

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

Gallery generated by Sphinx-Gallery