Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Page info
infoTypeModified date
prefixLast modified on
typeFlat

Table of Contents
maxLevel5

Easy Heading Macro
navigationExpandOptioncollapse-all-but-headings-1-2

Info
Before downloading data check if your processing software supports the GRIB and/or NetCDF formats. If your software supports both, use GRIB as first choice. If your software supports only NetCDF or if you run into problems with GRIB, use the NetCDF format.

...

GRIB stands for "General Regularly distributed Information in Binary form" and is a WMO (World Meteorological Organisation) standard format for archiving and exchanging gridded data. 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.

Please see the WMO "Introduction to GRIB Edition 1 and GRIB Edition 2" documentation for further details. 

...

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.

Metview is a software tool from ECMWF which allows users to read, process and visualise GRIB 1 and GRIB 2 data (see Metview documentation).

Info

Please be aware that when reading GRIB files where the range of valid data values includes '9999' that some software may incorrectly indicate that these data points are missing. This is because 9999 is the default missing value indicator. 

Common GUI tools for reading and visualising GRIB files are:

...

  • ecCodes by ECMWF
    • Supports GRIB to NetCDF conversion (grib_to_netcdf -o netcdf_file grib_file)
    • Supports GRIB to JSON (grib_dump -j <gribfile>)
    • See tools and code examples for Fortran, Python and C
  • CDO info operators (info, infon, sinfo, sinfon)
  • NCO
  • GrADS
  • wgrib2, only for GRIB edition 2, wgrib2 can not cannot decode GRIB edition 1 files
  • IDL
  • the GDAL library, with limited support for coordinate systems, georeferencing and metadata. In particular irregular (non-cartesian) coordinate systems might not be decoded correctly.

...

  1. Get a computer running Linux
  2. On your Linux computer install ECMWF's ecCodes software
  3. Get some data in GRIB format (for example from the CAMS or C3S Service). For this use case, we assume the file contains forecast data, and surface data (ie. a single layer, no atmospheric layers above the surface)

...

grib_get_data my_file.grib | head -n10
grib_get_data my_file.grib | tail -n10


Info
iconfalse

This document has been produced in the context of the Copernicus

Atmosphere

Atmosphere Monitoring Service (CAMS) and

the

Copernicus Climate Change Service (C3S).

The activities leading to these results have been contracted by the European Centre for Medium-Range Weather Forecasts, operator of CAMS and C3S on behalf of the European Union (Delegation Agreement signed on 11/11/2014 and Contribution Agreement signed on 22/07/2021). All information in this document is provided "as is" and no guarantee or warranty is given that the information is fit for any particular purpose.

The

user

users thereof

uses

use the information at

its

their sole risk and liability. For the avoidance of all

doubts

doubt , the European Commission and the European Centre for Medium - Range Weather Forecasts

has

have no liability in respect of this document, which is merely representing the

authors

author's view.

Content by Label
showLabelsfalse
max5
spacesCKB
showSpacefalse
sorttitle
typepage
cqllabel = "grib" and type = "page" and space = "CKB"
labelscams c3s data download

...