MET Online Tutorial for METv3.0

PB2NC Tool: General

PB2NC Functionality

The PB2NC tool is used to stratify the contents of an input PrepBufr point observation file and reformat it into NetCDF format for use by the Point-Stat tool. The PB2NC tool must be run on the input PrepBufr point observation file prior to running Point-Stat.


Please note that in earlier versions of the PB2NC tool, users were typically required to run their PrepBufr files through the cwordsh utility to perform Fortran-blocking prior to running them through PB2NC. This blocking step is now done internally and is based on how the ARCH_FLAGS are set in the top-level MET Makefile. The -DBLOCK4 flag indicates that 4-byte blocking should be performed instead of the default 8-byte blocking. This is compiler-dependent. The sample Makefiles contain a best guess for each compiler, but if you experience runtime errors from the PB2NC tool try adding or removing the -DBLOCK4 flag, recompiling, and rerunning.

PB2NC Usage

The PB2NC tool can read PrepBufr files that have or have not been Fortran-blocked using the cwordsh utility. View the usage statement for PB2NC by simply typing the following:


At a minimum, the input prepbufr_file, the output netcdf_file, and the configuration config_file must be passed in on the command line. You may use the -pbfile command line argument to run PB2NC using multiple input PrepBufr files, likely adjacent in time.