ECMWF GRIBEX Fortran Software - for decoding GRIB data

An introduction to the GRIBEX software provided by the ECMWF


GRIBEX is the ECMWF's proprietary software for reading, decoding and writing GRIB data files. It is available to all BADC users that have access to ECMWF datasets. The software is located in the following directories:     [Operational Data]     [ERA-15 Data]     [ERA-40 Data]

These directories contains the GRIBEX software package needed to read GRIB (GRIdded Binary) format ECMWF data files. The software is provided as a zipped Tar file that contains everything you require, including the GRIBEX code (for multiple platforms), GRIB tables and the PBIO routines required to open and close the binary files.

What platforms are supported?

There is no Windows release for this software but it should work on almost all UNIX platforms. The current release of GRIBEX can be compiled on the following platforms:

Current GRIBEX version

The current GRIBEX version is stored in the main 'gribex/' directory along with a readme file relating to that version. Other useful documents such as those on 'complex packing' of data (a GRIB option) are also included for your information (this is only used in exceptional cases so initial users can probably ignore complex packing issues).

Previous GRIBEX versions

Previous versions of GRIBEX are stored in the directory 'gribex/gribex_archive/'. These are stored in case users need to refer to an older version but we recommend using the current version in this directory.

Installing GRIBEX

In order to install the GRIBEX and PBIO libraries you should first download (or FTP transfer) the zipped GRIBEX tar file from this directory to your local machine. You should place the file in a suitable directory on your UNIX system, unzip and extract the data from the file ('gunzip filename.tar.gz' followed by 'tar -xvf filename.tar' will usually work).

You will now have a number of separate files in the current directory. Check the name of the Fortran compiler you plan to use and alter the 'config.[YOUR_PLATFORM]' file (where [YOUR_PLATFORM] is the computing platform you are compiling on) so that it uses your installed Fortran compiler. You should now be able to compile the software by typing:


This will compile a Fortran library called 'libemos.a' that contains all the subroutines and functions for manipulating GRIB data. You should link this library to your Fortran programmes that call GRIBEX.

GRIBEX Documentation

ECWMF provides useful documentation on GRIBEX, including each of the its subroutines and functions. These are publicly available at:

A sample Fortran programme that calls GRIBEX is available at:

Other GRIB-decoding software

Other software for reading GRIB data is documented on the GRIB software page.