METplus Use Case: PB2NC

METplus Use Case: PB2NC cindyhg Tue, 06/25/2019 - 09:48
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}, the output directory PB2NC_OUTPUT_DIR is set to a path relative to {OUTPUT_BASE}, and CONFIG_DIR points to a directory of met_config files under {PARM_BASE}:

# location of configuration files used by MET applications
CONFIG_DIR = {PARM_BASE}/met_config
# directory containing input to PB2NC
PB2NC_INPUT_DIR = {INPUT_BASE}/met_test/data/sample_obs/prepbufr
# directory to write output from PB2NC

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

# Location of MET config file to pass to PB2NC
# References CONFIG_DIR from the [dir] section
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

// 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 = "ONLYSF";  val = "ADPSFC,SFCSHP" }

No modifications are needed to run the PB2NC METplus tool. 

  1. Run the PB2NC use case: \
${METPLUS_BUILD_BASE}/parm/use_cases/met_tool_wrapper/PB2NC/PB2NC.conf \
${METPLUS_TUTORIAL_DIR}/tutorial.conf \


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

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