Skip to content

Data at ECMWF

ECMWF's Meteorological Archival and Retrieval System (MARS) enables you to explore and retrieve meteorological data in GRIB or NetCDF format. GRIB (General Regularly distributed Information in Binary form) is the WMO's format for binary gridded data and is designed for storing and distributing weather data. GRIB files are widely used in meteorological applications. NetCDF (Network Common Data Form) is a set of software libraries and self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.

Meteorological Archival and Retrieval System (MARS)

MARS request tree

How to make a MARS request?

What ECMWF says: here

General Regularly distributed Information in Binary form (GRIB)

GRIB is a binary format, and the data is packed to increase storage efficiency. GRIB messages are often concatenated together to form a GRIB file. GRIB files usually have the extension .grib, .grb or .gb.

Currently there are two different coding standards: GRIB edition 1 (commonly referred to as GRIB1) and GRIB edition 2 (GRIB2). The major differences are in the structure of the messages; in GRIB2, several variables are defined with more precision (e.g. in GRIB1, latitudes and longitudes are in milli-degrees while in GRIB2, they are in micro-degrees). Also in GRIB2, longitude values must lie between 0 and 360 degrees), the encoding of the parameter is very different, and in GRIB2 the description of the data is template/table based. Note that a GRIB file can contain a mix of GRIB1 and GRIB2 messages.

How to read GRIB files?

ECMWF provides and supports ecCodes. This software package has an Application Program Interface which makes ECMWF GRIB1 and GRIB2 files accessible from C, FORTRAN and Python programmes. ecCodes also provides a useful set of command line tools to give quick access to GRIB messages within the files.

Commonly used programs that can handle grib files:

  • Panoply by NASA
  • Metview by ECMWF
  • ecCodes by ECMWF
  • magics / metview by ECMWF
  • CDO
  • NCO
  • GrADS
  • idl

We have some examples of reading grib files:

it is also possible to convert grib files into netcdf files:

Convert GRIB to NetCDF
1
2
3
4
# load eccodes module or make grib_to_netcdf available to our PATH
module load eccodes
# convert to netcdf
grib_to_netcdf input.grb -o output.nc

grib_to_netcdf only works correctly when a single level coordinate is present in the GRIB file. Often the model output files have fields on multiple level types (ie. hybrid model levels and pressure levels).

Split Model level types
1
2
3
4
# check the contents of the grib file
grib_ls input.grb
# split by model lvel type
grib_copy input.grb output_[typeOfLevel].grb
more information can be found at ECMWF


Last update: February 29, 2024
Created: February 1, 2024