PB2NC Tool: General
The PB2NC tool is used to stratify (i.e. subset) the contents of an input PrepBufr point observation file and reformat it into NetCDF format for use by the Point-Stat or Ensemble-Stat tool. In this session, we will run PB2NC on a PrepBufr point observation file prior to running Point-Stat. Observations may be stratified by variable type, PrepBufr message type, station identifier, a masking region, elevation, report type, vertical level category, quality mark threshold, and level of PrepBufr processing. Stratification is controlled by a configuration file and discussed on the next page.
The PB2NC tool may be run on both PrepBufr and Bufr observation files. As of met-6.1, support for Bufr is limited to files containing embedded tables. Support for Bufr files using external tables will be added in a future release.
For more information about the PrepBufr format, visit:
For information on where to download PrepBufr files, visit:
|prepbufr_file||input prepbufr path/filename|
|netcdf_file||output netcdf path/filename|
|[-pbfile prepbufr_file]||additional input files|
|[-valid_beg time]||Beginning of valid time window [YYYYMMDD_[HH[MMSS]]]|
|[-valid_end time]||End of valid time window [YYYYMMDD_[HH[MMSS]]]|
|[-nmsg n]||Number of PrepBufr messages to process|
|[-index]||List available observation variables by message type (no output file)|
|[-dump path]||Dump entire contents of PrepBufr file to directory|
|[-obs_var var]||Sets the variable list to be saved from input BUFR files|
|[-log file]||Outputs log messages to the specified file|
|[-v level]||Level of logging|
|[-compression level]||NetCDF file compression|
At a minimum, the input prepbufr_file, the output netcdf_file, and the configuration config_file must be passed in on the command line. Also, you may use the -pbfile command line argument to run PB2NC using multiple input PrepBufr files, likely adjacent in time.
When running PB2NC on a new dataset, users are advised to run with the -index option to list the observation variables that are present in that file.