GRIB library

FLEXPART expects meteorological input files to be in GRIB format, thus a GRIB decoding library is needed. GRIB is a compressed binary format for meteorological fields including metadata, defined by WMO.

There is GRIB1 and GRIB2 format. Since V8.0, FLEXPART can read GRIB2 (as well as GRIB1). Current operational NCEP GFS model data are disseminated in the GRIB2 format.

A recommended GRIB library implementation was ECMWF's GRIB_API. A Version >= 1.6.1 is needed for reading GRIB2 data. It can read the GRIB1 format as well. It has now been superseeded by a library called eccodes. You can use eccodes as well. However, for older versions of FLEXPART you may need to adapt the makefile, so that it uses eccodes instead of gribapi (the FLEXPART source code does not require modification).

The EMOS library can also be used, and since January 2014 it also offers GRIB2 capability, but by calling GRIB_API. EMOS has a number of interpolation functions for ECMWF data; they are not needed for running FLEXPART, so there is nothing to gain by using EMOSlib. If you have an older EMOSlib already installed, it will probably still work for decoding GRIB1 fields.


  1. you are using a Linux system, and
  2. you want to use the system compiler (usually gcc) also to compile FLEXPART,

then the best method is to install grib_api or, respectively, eccodes, as a package from your Linux distribution. For example, if you are on a Debian system, use the eccodes Debian packages. Install the package libeccodes-tools, it will install the library itself as a dependency, and the tools are quite useful to inspect your grib files, even though they are not required by FLEXPART. In addition, you will need libeeccodes-dev, as only this contains the Fortran module file which is needed by FLEXPART. Similar packages exist for all major distributions.

If you want or need to compile the libraries from source, you can find them here:

JasPer library

Library for the JPEG-2000 compression algorithm. TO BE WRITTEN.

Last modified 3 months ago Last modified on Jan 25, 2019, 8:31:12 PM
hosted by ZAMG