This project contains Fortran source code to read BUFR data files containing NCEP ADP surface observations, which are archived and available for download in the NCAR Research Data Archive (RDA) dataset ds461.0. The ds461.0 archive contains NCEP ADP global surface data observations, including ADPSFC and SFCSHP observations, for the time period 1999 - present.
After compiling the source code, the executable can be run with the command
./bufrsurface.x <BUFR input file> <output file> <configuration file>
For example:
./bufrsurface.x ../bufrobs/gdas.adpsfc.t00z.20210701.bufr ../textobs/gdas.adpsfc.t00z.20210701.txt ../configs/bufrsurface.config
The directories provided in this project are as follows:
bufrobs/ Can be used to store BUFR input data files for the decoder.
configs/ Contains a descriptive template and example configuration
files to be used as input to the decoder.
docs/ Contains files showing some basic parameter mnemonics
and a link to recent NCEP BUFR tables.
exe/ Directory containing the decoder executables.
install/ Contains a shell script for compiling and installing BUFR
decoders.
src/ Contains two FORTRAN BUFR decoder source code files:
1) a flexible, user configurable program and 2) a simple
program for dumping BUFR output.
textobs/ Can be used to store text files generated by the decoders.
The following lists the steps necessary to build the software and decode the BUFR data. Steps include preparing the decoder software, preparing the configuration files, and finally running the decoder software.
-
Preparing the decoder software:
To compile the BUFR libraries and extraction code, go to the
/install
directory and run theinstall.sh
script to complete the compilations.Note:
install.sh
usesgfortran
to compile and link the source code. This is tested and works for Linux platforms, but may require adjustments for other operating systems.After compiling, the executables will be placed in the
/exe
directory. These can be copied to an arbitrary directory, e.g.~/bin
, for your convenience.Executables built by
install.sh
:exe/bufrsurface.x: used to make a selective dump from ADPSFC and/or SFCSHP BUFR files - gdas.adpsfc.tHHz.YYYYMMDD.bufr - gdas.sfcshp.tHHz.YYYYMMDD.bufr exe/dumpbufr.x: used to dump all contents of a BUFR file.
-
Preparing the input files:
BUFR files can be placed in the
bufrobs/
directory for convenienceFile names in the NCAR RDA dataset ds461.0 are of the following form: gdas.adpsfc.tHHz.YYYYMMDD.bufr (ADPSFC: land based surface observations) gdas.sfcshp.tHHz.YYYYMMDD.bufr (SFCSHP: marine based surface observations)
-
Preparing the configuration file:
Go to the
configs/
directory and create your configuration file following the instructional template and examples on how to build a configuration file. -
Running the decoder software:
To decode the BUFR data according to the instructions in your configuration file, run the
exe/bufrsurface.x
executable with the input BUFR file, output file, and configuration file provided as command line arguments. For example:./bufrsurface.x ../bufrobs/gdas.adpsfc.t00z.20210701.bufr ../textobs/gdas.adpsfc.t00z.20210701.txt ../configs/bufrsurface.config
To generically dump output from an individual file, run the
exe/dumpbufr.x
executable. From here you will be prompted to enter the name of the input BUFR file (including path) from which you would like all output to be printed.
The NCEP BUFRLIB software library is required to compile and run these programs, and it is recommended to compile and install BUFRLIB with the same compiler you use to compile the source code in this project. The BUFRLIB software and installation instructions are provided on the NCEP BUFRLIB support page.