METplus Practical Session Guide (Version 5.0) | Session 2: Grid-to-Obs > METplus Use Case: PB2NC

IMPORTANT NOTE: If you are returning to the tutorial, you must source the tutorial setup script before running the following instructions. If you are unsure if you have done this step, please navigate to the Verify Environment is Set Correctly page.

METplus Use Case: PB2NC

This use case utilizes the MET PB2NC tool. 

Optional: Refer to the MET Users Guide for a description of the MET tools used in this use case.
Optional: Refer to the METplus Config Glossary section of the METplus Users Guide for a reference to METplus variables used in this use case.

  1. Review the settings in the PB2NC.conf file:
less ${METPLUS_BUILD_BASE}/parm/use_cases/met_tool_wrapper/PB2NC/PB2NC.conf

Note that the input directory PB2NC_INPUT_DIR is set to a path relative to {INPUT_BASE} and the output directory PB2NC_OUTPUT_DIR is set to a path relative to {OUTPUT_BASE}:

[config]

...
PB2NC_INPUT_DIR = {INPUT_BASE}/met_test/data/sample_obs/prepbufr
...
PB2NC_OUTPUT_DIR = {OUTPUT_BASE}/pb2nc

{PARM_BASE} is set automatically by METplus. The wrapped MET config file for PB2NC is set relative to {PARM_BASE} in PB2NC_CONFIG_FILE:

PB2NC_CONFIG_FILE = {PARM_BASE}/met_config/PB2NCConfig_wrapped
Let's look at the PB2NC_CONFIG_FILE

Values for the MET tool PB2NC are passed in from METplus config files, including PB2NC.conf

less ${METPLUS_BUILD_BASE}/parm/met_config/PB2NCConfig_wrapped
////////////////////////////////////////////////////////////////////////////////
//
// PB2NC configuration file.
//
// For additional information, see the MET_BASE/config/README file.
// ////////////////////////////////////////////////////////////////////////////////

//
// PrepBufr 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" }
];
 

No modifications are needed to run the PB2NC METplus tool. 

  1. Run the PB2NC use case:
run_metplus.py \
${METPLUS_BUILD_BASE}/parm/use_cases/met_tool_wrapper/PB2NC/PB2NC.conf \
${METPLUS_TUTORIAL_DIR}/tutorial.conf \
config.OUTPUT_BASE=${METPLUS_TUTORIAL_DIR}/output/PB2NC

 

  1. Review the output file:
ls ${METPLUS_TUTORIAL_DIR}/output/PB2NC/pb2nc

The following is the statistical output and file generated from the command:

  • sample_pb.nc