ecCodes is a package developed by ECMWF which provides an application programming interface and a set of tools for decoding and encoding messages in the following formats:
- WMO FM-92 GRIB edition 1 and edition 2
- WMO FM-94 BUFR edition 3 and edition 4
- WMO GTS abbreviated header (only decoding).
A useful set of command line tools provide quick access to the messages. C, Fortran 90 and Python interfaces provide access to the main ecCodes functionality.
ecCodes is an evolution of GRIB-API. It is designed to provide the user with a simple set of functions to access data from several formats with a key/value approach.
For GRIB encoding and decoding, the GRIB-API functionality is provided fully in ecCodes with only minor interface and behaviour changes. Interfaces for C, Fortran 90 and Python are all maintained as in GRIB-API. However, the GRIB-API Fortran 77 interface is no longer available.
In addition, a new set of functions with the prefix "codes_" is provided to operate on all the supported message formats. These functions have the same interface and behaviour as the "grib_" functions.
A selection of GRIB-API tools has been included in ecCodes (ecCodes GRIB tools), while new tools are available for the BUFR (ecCodes BUFR tools) and GTS formats. The new tools have been developed to be as similar as possible to the existing GRIB-API tools maintaining, where possible, the same options and behaviour. A significant difference compared with GRIB-API tools is that bufr_dump produces output in JSON format suitable for many web based applications.
ecCodes is now the primary GRIB encoding/decoding package used at ECMWF. GRIB-API is no longer maintained (as of December 2018). Replacing GRIB-API with ecCodes is expected to be transparent for current GRIB-API users. In particular the "grib_" functions are included in the ecCodes library. Users are strongly advised to start the migration process.
Name clashes prevent a simultaneous use of the GRIB-API and ecCodes packages. A similar name clash is also present between the existing GRIB-API tools and the new tools provided with ecCodes. However, the behaviour of the tools is exactly the same as those provided with the current version of GRIB-API.