NCEPLIBS-bufr 11.7.1
|
Comprehensive discussion on how to incorporate the library within user application programs.
The BUFR format is officially documented in WMO Manual 306, Volume I.2. The latest edition of BUFR is edition 4, although edition 3 is still in use in many parts of the world.
BUFR is a table-driven format, meaning that new parameters can be encoded and decoded by adding them to tables which are read in by the software, rather than having to modify the software itself. To that end, WMO periodically releases new versions of their official WMO master BUFR tables, to facilitate the continued exchange of meteorological data throughout the global community.
NCEPLIBS-bufr (also often referred to as BUFRLIB) is a software library that can read (decode) and write (encode) data in both edition 3 and edition 4 of BUFR. It consists of more than 300 different subroutines and functions; however, a typical application program will never directly call more than 10 to 20 of them, and the rest are lower-level routines that the library uses to accomplish various underlying tasks, and which can therefore be considered as "black box" from a user perspective.
Whenever new versions of the official WMO master BUFR tables are released by WMO (as noted above), they are downloaded and reformatted as new NCEPLIBS-bufr master BUFR tables for use with the software and distributed with the next release of the library. However, users can also generate their own custom NCEPLIBS-bufr DX BUFR tables for use with the software as needed.
More details are available throughout the documentation, including sample utilities which demonstrate how to use many of the various library subroutines and functions to accomplish different tasks.
For now, it's important to understand the following hierarchy:
This in turn allows many of the most commonly used library subroutines and functions to be grouped accordingly, based on which level of the hierarchy they operate at, and whether for reading/decoding BUFR data or writing/encoding BUFR data:
For working with: | BUFR files | BUFR messages | BUFR data subsets | BUFR data values |
---|---|---|---|---|
reading/decoding | openbf() openbf_f() ufbmem() ufbmex() cobfl() | readmg() ireadmg() ireadmg_f() readerme() readns() ireadns() rdmemm() readmm() ireadmm() crbmg() datelen() getlens() iupvs01() iupbs01() iupbs3() nmsub() rtrcpt() igetdate() | readsb() ireadsb() ireadsb_f() readns() ireadns() rdmems() ufbmms() ufbmns() ufbpos() | ufbint() ufbrep() ufbseq() ufbstp() ufbint_f() ufbrep_f() ufbrms() readlc() getvalnb() setbmiss() getbmiss() ibfms() icbfms() |
writing/encoding | openbf() openbf_f() closbf() closbf_f() copybf() cobfl() | openmb() openmg() closmg() copymg() cpymem() cwbmg() cmpmsg() stdmsg() cnved4() strcpt() setblock() maxout() pkvs01() pkbs1() minimg() | writsb() writsa() writcp() copysb() icopysb() | ufbint() ufbrep() ufbseq() ufbstp() ufbint_f() ufbrep_f() writlc() setvalnb() setbmiss() |
Furthermore, many of the above subroutines and functions can also be accessed via a separate Python API, if this functionality was enabled when the library was built.