5.2.3.3. Point-Stat: Standard Verification of Global Upper Air

Convert prepBUFR point format to NetCDF and then compute Continuous statistics for upper air fields. (GFS:GDAS:Grib,prepBUFR)

Scientific Objective

To provide useful statistical information on the relationship between observation data in point format to a gridded forecast. These values can be used to assess the skill of the prediction. Statistics are stored as partial sumes to save space and Stat-Analysis must be used to compute the Continuous Statistics.

Datasets

Forecast: GFS temperature, u-wind component, v-wind component, and height
Observation: GDAS prepBURF data
Location: All of the input data required for this use case can be found in the sample data tarball. Click here to download: https://github.com/NCAR/METplus/releases/download/v3.0/sample_data-medium_range-3.0.tgz
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 utilizes the METplus PB2NC wrapper to convert PrepBUFR point observations to NetCDF format and then compare them to gridded forecast data using PointStat.

METplus Workflow

PB2NC and PointStat are the tools called in this example. It processes the following run times:

Valid: 2017-06-01 0Z
Valid: 2017-06-02 0Z
Valid: 2017-06-03 0Z

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/medium_range/PointStat_fcstGFS_obsGDAS_UpperAir_MultiField_PrepBufr.conf

[config]
## Configuration-related settings such as the process list, begin and end times, etc.
PROCESS_LIST = PB2NC, PointStat

## LOOP_ORDER
## Options are: processes, times
## Looping by time- runs all items in the PROCESS_LIST for each
## initialization time and repeats until all times have been evaluated.
## Looping by processes- run each item in the PROCESS_LIST for all
## specified initialization times then repeat for the next item in the
## PROCESS_LIST.
LOOP_ORDER = times

LOOP_BY = VALID
VALID_TIME_FMT = %Y%m%d
VALID_BEG = 20170601
VALID_END = 20170603
VALID_INCREMENT = 86400

LEAD_SEQ = 0

# For both pb2nc and point_stat, the obs_window dictionary:
OBS_WINDOW_BEGIN = -2700
OBS_WINDOW_END = 2700

# Logging levels: DEBUG, INFO, WARN, ERROR (most verbose is DEBUG)
LOG_LEVEL = DEBUG

PB2NC_SKIP_IF_OUTPUT_EXISTS = True

## MET Configuration files for pb2nc and point_stat
PB2NC_CONFIG_FILE = {PARM_BASE}/met_config/PB2NCConfig_wrapped
POINT_STAT_CONFIG_FILE ={PARM_BASE}/met_config/PointStatConfig_wrapped

# Either conus_sfc or upper_air
PB2NC_VERTICAL_LOCATION = upper_air

#
# PB2NC
#
# These are appended with PB2NC to differentiate the GRID, POLY, and MESSAGE_TYPE for point_stat.
PB2NC_GRID =
PB2NC_POLY =
PB2NC_STATION_ID =
PB2NC_MESSAGE_TYPE =

# Leave empty to process all
PB2NC_OBS_BUFR_VAR_LIST = QOB, TOB, ZOB, UOB, VOB, D_RH

#***********
# ***NOTE***
#***********
# SET TIME_SUMMARY_FLAG to False. There is a bug in met-6.1.
## For defining the time periods for summarization
# False for no time summary, True otherwise
PB2NC_TIME_SUMMARY_FLAG = False
PB2NC_TIME_SUMMARY_BEG = 000000  ;; start time of time summary in HHMMSS format
PB2NC_TIME_SUMMARY_END = 235959  ;; end time of time summary in HHMMSS format
PB2NC_TIME_SUMMARY_VAR_NAMES = PMO,TOB,TDO,UOB,VOB,PWO,TOCC
PB2NC_TIME_SUMMARY_TYPES = min, max, range, mean, stdev, median, p80  ;; a list of the statistics to summarize

# Model/fcst and obs name, e.g. GFS, NAM, GDAS, etc.
MODEL = gfs
OBTYPE = gdas

# Regrid to specified grid.  Indicate NONE if no regridding, or the grid id
# (e.g. G212)
POINT_STAT_REGRID_TO_GRID = G003

# Verification Masking regions
# Indicate which grid and polygon masking region, if applicable
POINT_STAT_GRID = FULL
# List of full path to poly masking files.  NOTE: Only short lists of poly
# files work (those that fit on one line), a long list will result in an
# environment variable that is too long, resulting in an error.  For long
# lists of poly masking files (i.e. all the mask files in the NCEP_mask
# directory), define these in the MET point_stat configuration file.
POINT_STAT_POLY =
POINT_STAT_STATION_ID =

# Message types, if all message types are to be returned, leave this empty,
# otherwise indicate the message types of interest.
POINT_STAT_MESSAGE_TYPE = ADPUPA

# Variables and levels as specified in the field dictionary of the MET
# point_stat configuration file. Specify as FCST_VARn_NAME, FCST_VARn_LEVELS,
# (optional) FCST_VARn_OPTION

BOTH_VAR1_NAME = TMP
BOTH_VAR1_LEVELS = P1000, P925, P850, P700, P500, P400, P300, P250, P200, P150, P100, P50, P20, P10

BOTH_VAR2_NAME = RH
BOTH_VAR2_LEVELS = P1000, P925, P850, P700, P500, P400, P300

BOTH_VAR3_NAME = UGRD
BOTH_VAR3_LEVELS = P1000, P925, P850, P700, P500, P400, P300, P250, P200, P150, P100, P50, P20, P10

BOTH_VAR4_NAME = VGRD
BOTH_VAR4_LEVELS = P1000, P925, P850, P700, P500, P400, P300, P250, P200, P150, P100, P50, P20, P10

BOTH_VAR5_NAME = HGT
BOTH_VAR5_LEVELS = P1000, P950, P925, P850, P700, P500, P400, P300, P250, P200, P150, P100, P50, P20, P10

[dir]
PB2NC_INPUT_DIR = {INPUT_BASE}/model_applications/medium_range/grid_to_obs/prepbufr/gdas
PB2NC_OUTPUT_DIR = {OUTPUT_BASE}/gdas/upper_air

FCST_POINT_STAT_INPUT_DIR = {INPUT_BASE}/model_applications/medium_range/grid_to_obs/gfs
OBS_POINT_STAT_INPUT_DIR = {PB2NC_OUTPUT_DIR}

POINT_STAT_OUTPUT_DIR = {OUTPUT_BASE}/{OBTYPE}

[filename_templates]
## Output file template
PB2NC_INPUT_TEMPLATE = prepbufr.gdas.{valid?fmt=%Y%m%d%H}
PB2NC_OUTPUT_TEMPLATE = prepbufr.gdas.{valid?fmt=%Y%m%d%H}.nc

FCST_POINT_STAT_INPUT_TEMPLATE = pgbf{lead?fmt=%HH}.gfs.{init?fmt=%Y%m%d%H}
OBS_POINT_STAT_INPUT_TEMPLATE = {PB2NC_OUTPUT_TEMPLATE}

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.

////////////////////////////////////////////////////////////////////////////////
//
// PB2NC configuration file.
//
// For additional information, see the MET_BASE/config/README file.
//
////////////////////////////////////////////////////////////////////////////////

//
// PrepBufr message type
//
message_type =  ${PB2NC_MESSAGE_TYPE} ;

//
// Mapping of message type group name to comma-separated list of values
// Derive PRMSL only for SURFACE message types
//
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";                      }
];

//
// Mapping of input PrepBufr message types to output message types
//
message_type_map = [];

//
// PrepBufr station ID
//
station_id = ${PB2NC_STATION_ID};


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

//
// Observation time window
//
obs_window = {
  beg = ${OBS_WINDOW_BEGIN};
  end = ${OBS_WINDOW_END};
}

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

//
// Observation retention regions
//
mask = {
   grid = "${PB2NC_GRID}" ;
   poly = "${PB2NC_POLY}" ;
}

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

//
// Observing location elevation
//
elevation_range = {
   beg =  -1000;
   end = 100000;
}

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

//
// Observation types
//
pb_report_type = [120, 220, 221, 122, 222, 223, 224, 131, 133, 233, 153, 156, 157, 180, 280, 181, 182, 281, 282, 183, 284, 187, 287];

in_report_type  = [];

instrument_type = [];

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

//
// Vertical levels to retain
//
level_range = {
   beg = 1;
   end = 511;
}

level_category = [0, 1, 4, 5, 6];

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

//
// BUFR variable names to retain or derive.
// If emtpy, process all available variables.
//
obs_bufr_var =  ${OBS_BUFR_VAR_LIST};

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

//
// Mapping of BUFR variable name to GRIB name. The default map is defined at
// obs_prepbufr_map. This replaces/expends the default map.
//
obs_bufr_map = [];

// This map is for PREPBUFR. It will be added into obs_bufr_map.
// Please do not override this map.
obs_prefbufr_map = [
   { key = "POB";     val = "PRES";  },
   { key = "QOB";     val = "SPFH";  },
   { key = "TOB";     val = "TMP";   },
   { key = "ZOB";     val = "HGT";   },
   { key = "UOB";     val = "UGRD";  },
   { key = "VOB";     val = "VGRD";  },
   { key = "D_DPT";   val = "DPT";   },
   { key = "D_WDIR";  val = "WDIR";  },
   { key = "D_WIND";  val = "WIND";  },
   { key = "D_RH";    val = "RH";    },
   { key = "D_MIXR";  val = "MIXR";  },
   { key = "D_PRMSL"; val = "PRMSL"; },
   { key = "D_PBL";   val = "PBL";   },
   { key = "D_CAPE";  val = "CAPE";  }
];


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

quality_mark_thresh = 3;
event_stack_flag    = TOP;

////////////////////////////////////////////////////////////////////////////////
//
// Time periods for the summarization
//
time_summary = {
  flag = ${TIME_SUMMARY_FLAG};
  beg = ${TIME_SUMMARY_BEG};
  end = ${TIME_SUMMARY_END};
  step = 3600;
  width = 3600;
  grib_code = [];
  obs_var   = ${TIME_SUMMARY_VAR_NAMES};
  type = ${TIME_SUMMARY_TYPES};
  vld_freq = 0;
  vld_thresh = 0.0;
}

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

tmp_dir = "/tmp";
//version = "V9.0";

////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
// Point-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";

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

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

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

//
// May be set separately in each "field" entry
//
censor_thresh = [];
censor_val    = [];
cat_thresh    = [ NA ];
cnt_thresh    = [ NA ];
cnt_logic     = UNION;
wind_thresh   = [ NA ];
wind_logic    = UNION;
eclv_points   = 0.05;
rank_corr_flag = FALSE;

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

obs = {
    field = [ ${OBS_FIELD} ];
    };

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

//
// Point observation filtering options
// May be set separately in each "obs.field" entry
//
message_type = ${POINT_STAT_MESSAGE_TYPE};
sid_exc        = [];
obs_quality    = [ "1", "2", "3" ];
duplicate_flag = NONE;
obs_summary    = NONE;
obs_perc_value = 50;

//
// 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";                      },
   { key = "LANDSF";  val = "ADPSFC,MSONET";                      },
   { key = "WATERSF"; val = "SFCSHP";                             }
];

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

//
// Climatology data
//
climo_mean = {

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

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

   time_interp_method = NEAREST;
   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;
}

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

//
// Point observation time window
//
obs_window = {
  beg = ${OBS_WINDOW_BEGIN};
  end = ${OBS_WINDOW_END};
}

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

//
// Verification masking regions
//
mask = {
   grid = ${POINT_STAT_GRID};
   poly = ${POINT_STAT_POLY};
   sid     = ${POINT_STAT_STATION_ID};
   llpnt = [];
}

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

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

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

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

//
// Interpolation methods
//
interp = {
   vld_thresh = 1.0;
   shape      = SQUARE;

   type = [
      {
         method = BILIN;
         width  = 2;
      }
   ];
}

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

//
// HiRA verification method
//
hira = {
   flag       = FALSE;
   width      = [ 2, 3, 4, 5 ];
   vld_thresh = 1.0;
   cov_thresh = [ ==0.25 ];
   shape      = SQUARE;
}

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

//
// Statistical output types
//
output_flag = {
   fho    = NONE;
   ctc    = NONE;
   cts    = NONE;
   mctc   = NONE;
   mcts   = NONE;
   cnt    = NONE;
   sl1l2  = STAT;
   sal1l2 = NONE;
   vl1l2  = STAT;
   val1l2 = NONE;
   vcnt   = NONE;
   pct    = NONE;
   pstd   = NONE;
   pjc    = NONE;
   prc    = NONE;
   ecnt   = NONE; // Only for HiRA.
   eclv   = NONE;
   mpr    = NONE;
}

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

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

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

Note the following variables are referenced in the MET configuration file.

PB2NC:

  • ${PB2NC_MESSAGE_TYPE} - Corresponds to PB2NC_MESSAGE_TYPE in the METplus configuration file.

  • ${PB2NC_STATION_ID} - Corresponds to PB2NC_STATION_ID in the METplus configuration file.

  • ${PB2NC_GRID} - Corresponds to PB2NC_GRID in the METplus configuration file.

  • ${PB2NC_POLY} - Corresponds to PB2NC_POLY in the METplus configuration file.

  • ${OBS_WINDOW_BEGIN} - Corresponds to OBS_WINDOW_BEGIN or PB2NC_WINDOW_BEGIN in the METplus configuration file.

  • ${OBS_WINDOW_END} - Corresponds to OBS_WINDOW_END or PB2NC_WINDOW_END in the METplus configuration file.

  • ${OBS_BUFR_VAR_LIST} - Corresponds to PB2NC_OBS_BUFR_VAR_LIST in the METplus configuration file.

  • ${TIME_SUMMARY_FLAG} - True/False option to compute time summary statistics. Corresponds to PB2NC_TIME_SUMMARY_FLAG in the METplus configuration file.

  • ${TIME_SUMMARY_BEG} - Corresponds to PB2NC_TIME_SUMMARY_BEG in the METplus configuration file.

  • ${TIME_SUMMARY_END} - Corresponds to PB2NC_TIME_SUMMARY_END in the METplus configuration file.

  • ${TIME_SUMMARY_VAR_NAMES} - Corresponds to PB2NC_TIME_SUMMARY_VAR_NAMES in the METplus configuration file.

  • ${TIME_SUMMARY_TYPES} - Corresponds to PB2NC_TIME_SUMMARY_TYPES in the METplus configuration file.

PointStat:

  • ${POINT_STAT_MESSAGE_TYPE} - Corresponds to POINT_STAT_MESSAGE_TYPE in the METplus configuration file.

  • ${POINT_STAT_STATION_ID} - Corresponds to POINT_STAT_STATION_ID in the METplus configuration file.

  • ${POINT_STAT_GRID} - Corresponds to POINT_STAT_GRID in the METplus configuration file.

  • ${POINT_STAT_POLY} - Corresponds to POINT_STAT_POLY in the METplus configuration file.

  • ${OBS_WINDOW_BEGIN} - Corresponds to OBS_WINDOW_BEGIN or OBS_POINT_STAT_WINDOW_BEGIN in the METplus configuration file.

  • ${OBS_WINDOW_END} - Corresponds to OBS_WINDOW_END or OBS_POINT_STAT_WINDOW_END in the METplus configuration file.

  • ${MODEL} - Name of forecast input. Corresponds to MODEL in the METplus configuration file.

  • ${FCST_FIELD} - Formatted forecast field information. Generated from [FCST/BOTH]_VAR<n>_[NAME/LEVEL/THRESH/OPTIONS] in the METplus configuration file.

  • ${OBS_FIELD} - Formatted observation field information. Generated from [OBS/BOTH]_VAR<n>_[NAME/LEVEL/THRESH/OPTIONS] in the METplus configuration file.

  • ${REGRID_TO_GRID} - Grid to remap data. Corresponds to POINT_STAT_REGRID_TO_GRID in the METplus configuration file.

  • ${VERIF_MASK} - Optional verification mask file or list of files. Corresponds to POINT_STAT_VERIFICATION_MASK_TEMPLATE in the METplus configuration file.

Running METplus

This use case can be run two ways:

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

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

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

  • point_stat_000000L_20170601_000000V.stat

  • point_stat_000000L_20170602_000000V.stat

  • point_stat_000000L_20170603_000000V.stat