5.2.2.4. Grid-Stat: Surrogate Severe and Practically Perfect Evaluation

model_applications/ convection_allowing_model/ GridStat_fcstHRRR_obsPracPerfect _SurrogateSevere.conf

Scientific Objective

To evaluate the surrogate severe forecasts at predicting Severe weather using the (12Z - 12Z) practically perfect storm reports.

Datasets

  • Forecast dataset: HRRR Surrogate Severe Data

  • Observation dataset: Practically Perfect from Local Storm Reports.

METplus Components

This use case runs grid_stat to create categorical statistics for Surrogate Severe derived from the HRRR model and Practially Perfect Analysis derived from local storm reports.

METplus Workflow

The grid_stat tool is run for each time. This example loops by valid time. It processes 1 valid time, listed below.

Valid: 2020-02-06_12Z
Forecast lead: 36

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/convection_allowing_models/GridStat_fcstHRRR_obsPracPerfect_SurrogateSevere.conf

# HRRR Surrogate Severe verified against Practically Perfect 

[config]
# time looping - options are INIT, VALID, RETRO, and REALTIME
LOOP_BY = VALID

# Format of INIT_BEG and INIT_END
VALID_TIME_FMT = %Y%m%d%H

# Start time for METplus run
VALID_BEG=2020020612

# End time for METplus run
VALID_END=2020020612

# Increment between METplus runs in seconds. Must be >= 60
VALID_INCREMENT=86400

# forecast leads to process
INIT_SEQ = 0
LEAD_SEQ_MIN = 36
LEAD_SEQ_MAX = 36

# Options are times, processes
# times = run all items in the PROCESS_LIST for a single initialization
# time, then repeat until all times have been evaluated.
# processes = run each item in the PROCESS_LIST for all times
#   specified, then repeat for the next item in the PROCESS_LIST.
LOOP_ORDER = times

# List of applications to run
PROCESS_LIST = GridStat

MODEL = HRRR
OBTYPE = PP

# Forecast Variables
FCST_VAR1_NAME = MXUPHL_prob_75
FCST_VAR1_LEVELS = "(*,*)"
FCST_VAR1_THRESH = ge0.02, ge0.05, ge0.10, ge0.10, ge0.15, ge0.30, ge0.45, ge0.60

FCST_VAR2_NAME = MXUPHL_prob_80
FCST_VAR2_LEVELS = {FCST_VAR1_LEVELS}
FCST_VAR2_THRESH = {FCST_VAR1_THRESH}

FCST_VAR3_NAME = MXUPHL_prob_85
FCST_VAR3_LEVELS = {FCST_VAR1_LEVELS}
FCST_VAR3_THRESH = {FCST_VAR1_THRESH}

FCST_VAR4_NAME = MXUPHL_prob_90
FCST_VAR4_LEVELS = {FCST_VAR1_LEVELS}
FCST_VAR4_THRESH = {FCST_VAR1_THRESH}

FCST_VAR5_NAME = MXUPHL_prob_95
FCST_VAR5_LEVELS = {FCST_VAR1_LEVELS}
FCST_VAR5_THRESH = {FCST_VAR1_THRESH}

# Obs Variables
OBS_VAR1_NAME = PP_probs
OBS_VAR1_LEVELS = "(*,*)"
OBS_VAR1_THRESH = ge0.02, ge0.05, ge0.10, ge0.10, ge0.15, ge0.30, ge0.45, ge0.60

OBS_VAR2_NAME = {OBS_VAR1_NAME}
OBS_VAR2_LEVELS = {OBS_VAR1_LEVELS}
OBS_VAR2_THRESH = {OBS_VAR1_THRESH}

OBS_VAR3_NAME = {OBS_VAR1_NAME}
OBS_VAR3_LEVELS = {OBS_VAR1_LEVELS}
OBS_VAR3_THRESH = {OBS_VAR1_THRESH}

OBS_VAR4_NAME = {OBS_VAR1_NAME}
OBS_VAR4_LEVELS = {OBS_VAR1_LEVELS}
OBS_VAR4_THRESH = {OBS_VAR1_THRESH}

OBS_VAR5_NAME = {OBS_VAR1_NAME}
OBS_VAR5_LEVELS = {OBS_VAR1_LEVELS}
OBS_VAR5_THRESH = {OBS_VAR1_THRESH}

FCST_IS_PROB = false

GRID_STAT_CONFIG_FILE = {CONFIG_DIR}/GridStatConfig_ss

[dir]
# location of configuration files used by MET applications
CONFIG_DIR={PARM_BASE}/use_cases/model_applications/convection_allowing_models

# input and output data directories for each application in PROCESS_LIST
FCST_GRID_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/convection_allowing_models/surrogate_severe_prac_perfect

OBS_GRID_STAT_INPUT_DIR = {FCST_GRID_STAT_INPUT_DIR}

GRID_STAT_OUTPUT_DIR = {OUTPUT_BASE}/model_applications/convection_allowing_models/surrogate_severe_prac_perfect/grid_stat

[filename_templates]
# format of filenames
# Surrogate Severe
FCST_GRID_STAT_INPUT_TEMPLATE = surrogate_severe_{init?fmt=%Y%m%d}_{lead?fmt=%HHH}V_regrid.nc

# Practically Perfect
OBS_GRID_STAT_INPUT_TEMPLATE = StormReps_211_Probs.{init?fmt=%Y%m%d}.nc 

MET Configuration

METplus sets environment variables based on the values in the METplus configuration file. These variables are referenced in the MET configuration file. 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 not controlled by an environment variable, you can add additional environment variables to be set only within the METplus environment using the [user_env_vars] section of the METplus configuration files. See the ‘User Defined Config’ section on the ‘System Configuration’ page of the METplus User’s Guide for more information.

////////////////////////////////////////////////////////////////////////////////
//
// Grid-Stat configuration file.
//
// For additional information, see the MET_BASE/config/README file.
//
////////////////////////////////////////////////////////////////////////////////

//
// Output model name to be written
//
model = "${MODEL}";

//
// Output description to be written
// May be set separately in each "obs.field" entry
//
desc = "NA";

//
// Output observation type to be written
//
obtype = "${OBTYPE}";

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

//
// Verification grid
//
regrid = {
   to_grid    = ${REGRID_TO_GRID};
   method     = NEAREST;
   width      = 1;
   vld_thresh = 0.5;
   shape      = SQUARE;
}

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

censor_thresh    = [];
censor_val       = [];
cat_thresh  	 = [ NA ];
cnt_thresh  	 = [ NA ];
cnt_logic   	 = UNION;
wind_thresh 	 = [ NA ];
wind_logic  	 = UNION;
eclv_points      = 0.05;
nc_pairs_var_suffix = "";
nc_pairs_var_name = "";
rank_corr_flag   = FALSE;

//
// Forecast and observation fields to be verified
//
fcst = {
   field = [ ${FCST_FIELD} ];
}
obs = {
   field = [ ${OBS_FIELD} ];
}

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

//
// Climatology mean data
//
climo_mean = {

   file_name = [ ${CLIMO_MEAN_FILE} ];
   field     = [];

   regrid = {
      method     = NEAREST;
      width      = 1;
      vld_thresh = 0.5;
      shape	 = SQUARE;
   }

   time_interp_method = DW_MEAN;
   match_month        = TRUE;
   day_interval       = 31;
   hour_interval      = 6;
}

climo_stdev = climo_mean;
climo_stdev = {
   file_name = [ ${CLIMO_STDEV_FILE} ];
}

//
// May be set separately in each "obs.field" entry
//
climo_cdf = {
   cdf_bins    = 1;
   center_bins = FALSE;
   write_bins  = TRUE;
}

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

//
// Verification masking regions
//
mask = {
   grid = ["FULL"];
   poly = [ ${VERIF_MASK} ];
}

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

//
// Confidence interval settings
//
ci_alpha  = [ 0.05 ];

boot = {
   interval = PCTILE;
   rep_prop = 1.0;
   n_rep    = 0;
   rng      = "mt19937";
   seed     = "";
}

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

//
// Data smoothing methods
//
interp = {
   field      = BOTH;
   vld_thresh = 1.0;
   shape      = SQUARE;

   type = [
      {
         method = NEAREST;
         width  = 1;
      }
   ];
}

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

//
// Neighborhood methods
//
nbrhd = {
   field      = BOTH;
   shape      = ${NEIGHBORHOOD_SHAPE};
   width      = [ ${NEIGHBORHOOD_WIDTH} ];
   cov_thresh = [ >=0.5 ];
   vld_thresh = 1.0;
}

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

//
// Fourier decomposition
// May be set separately in each "obs.field" entry
//
fourier = {
   wave_1d_beg = [];
   wave_1d_end = [];
}

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

//
// Gradient statistics
// May be set separately in each "obs.field" entry
//
gradient = {
   dx = [ 1 ];
   dy = [ 1 ];
}

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

//
// Distance Map statistics
// May be set separately in each "obs.field" entry
//
distance_map = {
   baddeley_p        = 2;
   baddeley_max_dist = NA;
   fom_alpha         = 0.1;
   zhu_weight        = 0.5;
}

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

//
// Statistical output types
//
output_flag = {
   fho    = NONE;
   ctc    = BOTH;
   cts    = BOTH;
   mctc   = NONE;
   mcts   = NONE;
   cnt    = NONE;
   sl1l2  = NONE;
   sal1l2 = NONE;
   vl1l2  = NONE;
   val1l2 = NONE;
   vcnt   = NONE;
   pct    = NONE;
   pstd   = NONE;
   pjc    = NONE;
   prc    = NONE;
   eclv   = NONE;
   nbrctc = NONE;
   nbrcts = NONE;
   nbrcnt = NONE;
   grad   = NONE;
   dmap   = NONE;
}

//
// NetCDF matched pairs output file
// May be set separately in each "obs.field" entry
//
nc_pairs_flag = {
   latlon       = FALSE;
   raw          = FALSE;
   diff         = FALSE;
   climo        = FALSE;
   climo_cdp    = FALSE;
   weight       = FALSE;
   nbrhd        = FALSE;
   fourier      = FALSE;
   gradient     = FALSE;
   distance_map = FALSE;
   apply_mask   = FALSE;
}

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

grid_weight_flag = NONE;
tmp_dir          = "/tmp";
output_prefix    = "${OUTPUT_PREFIX}";
//version 	 = "V9.0";

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

See the following files for more information about the environment variables set in this configuration file.

parm/use_cases/met_tool_wrapper/GridStat/GridStat.py

Running METplus

This use case can be run two ways:

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

    master_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/convection_allowing_models/GridStat_fcstHRRR_obsPracPerfect_SurrogateSevere.conf -c /path/to/user_system.conf
    
  2. Modifying the configurations in parm/metplus_config, then passing in GridStat_fcstHRRR_obsPracPerfect_SurrogateSevere.conf:

    master_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/convection_allowing_models/GridStat_fcstHRRR_obsPracPerfect_SurrogateSevere.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/convection_allowing_models/surrogate_severe_prac_perfect/grid_stat (relative to OUTPUT_BASE) and will contain the following files:

grid_stat_360000L_20200206_120000V_ctc.txt grid_stat_360000L_20200206_120000V_cts.txt grid_stat_360000L_20200206_120000V.stat