GRIB

GRIB

Discussion
Ask a question about 'GRIB'
Start a new discussion about 'GRIB'
Answer questions from other users
Full Discussion Forum
 
Encyclopedia
GRIB is a mathematically concise data format commonly used in meteorology
Meteorology
Meteorology is the interdisciplinary scientific study of the atmosphere. Studies in the field stretch back millennia, though significant progress in meteorology did not occur until the 18th century. The 19th century saw breakthroughs occur after observing networks developed across several countries...

 to store historical and forecast weather data. It is standardized by the World Meteorological Organization
World Meteorological Organization
The World Meteorological Organization is an intergovernmental organization with a membership of 189 Member States and Territories. It originated from the International Meteorological Organization , which was founded in 1873...

's Commission for Basic Systems, known under number GRIB FM 92-IX, described in WMO Manual on Codes No.306.
Currently there are three versions of GRIB.
Version 0 was used to a limited extent by projects such as TOGA, and is no longer in operational use.
The first edition (current sub-version is 2) is used operationally worldwide by most meteorological centers, for Numerical Weather Prediction
Numerical weather prediction
Numerical weather prediction uses mathematical models of the atmosphere and oceans to predict the weather based on current weather conditions. Though first attempted in the 1920s, it was not until the advent of computer simulation in the 1950s that numerical weather predictions produced realistic...

 output (NWP).
A newer generation has been introduced, known as GRIB second edition, and data is slowly changing over to this format. Some of the second-generation GRIB are used for derived product distributed in Eumetcast
Eumetcast
EUMETCast is a scheme for dissemination of various meteorological data operated by EUMETSAT, the European Organisation for the Exploitation of Meteorological Satellites...

 of Meteosat Second Generation. Another example is the NAM (North American Mesoscale) model.

GRIB superseded the Aeronautical Data Format (ADF).

Format


Most GRIB files are actually a collection of individual self-containing records, and the individual records themselves can stand alone as meaningful data. So a collection of GRIB records can be appended to each other or broken down easily. i.e. You can join two GRIB files into one, and it will have no negative influence to accessibility of the data nor its actual data content.

Each individual GRIB record has two components - the part that describes the record (the header), and the actual binary data itself. All binary data in GRIB 1 are not compressed, but GRIB 2 is compressible. Parts of the headers are described as octets
Octet (computing)
An octet is a unit of digital information in computing and telecommunications that consists of eight bits. The term is often used when the term byte might be ambiguous, as there is no standard for the size of the byte.-Overview:...

 which are base 2 binary numbers converted to base 10 decimal
Decimal
The decimal numeral system has ten as its base. It is the numerical base most widely used by modern civilizations....

 integer with the first binary bit value begins on the left.

GRIB 1 Header


There are 2 parts of the GRIB 1 header - one mandatory (Product Definition Section - PDS) and one optional (Grid Description Section - GDS). PDS describe who created the data (the research/operation center), the involved numerical model/process - can be NWP
Numerical weather prediction
Numerical weather prediction uses mathematical models of the atmosphere and oceans to predict the weather based on current weather conditions. Though first attempted in the 1920s, it was not until the advent of computer simulation in the 1950s that numerical weather predictions produced realistic...

 or GCM, the data that is actually stored (such as wind
Wind
Wind is the flow of gases on a large scale. On Earth, wind consists of the bulk movement of air. In outer space, solar wind is the movement of gases or charged particles from the sun through space, while planetary wind is the outgassing of light chemical elements from a planet's atmosphere into space...

, temperature
Temperature
Temperature is a physical property of matter that quantitatively expresses the common notions of hot and cold. Objects of low temperature are cold, while various degrees of higher temperatures are referred to as warm or hot...

, ozone
Ozone
Ozone , or trioxygen, is a triatomic molecule, consisting of three oxygen atoms. It is an allotrope of oxygen that is much less stable than the diatomic allotrope...

 concentration etc.), units of the data (meters, pressure
Pressure
Pressure is the force per unit area applied in a direction perpendicular to the surface of an object. Gauge pressure is the pressure relative to the local atmospheric or ambient pressure.- Definition :...

 etc.), vertical system of the data (constant height, constant pressure, constant potential temperature), and the time stamp.

If the data needs a description how is spatially organized, GDS is needed as well. Information includes spectral (harmonics of divergence
Divergence
In vector calculus, divergence is a vector operator that measures the magnitude of a vector field's source or sink at a given point, in terms of a signed scalar. More technically, the divergence represents the volume density of the outward flux of a vector field from an infinitesimal volume around...

 and vorticity) vs gridded data (Gaussian, X-Y grid), horizontal resolution, the location of the origin
Origin (mathematics)
In mathematics, the origin of a Euclidean space is a special point, usually denoted by the letter O, used as a fixed point of reference for the geometry of the surrounding space. In a Cartesian coordinate system, the origin is the point where the axes of the system intersect...

.

Applications


Several application software packages have been written which make use of GRIB files. These range from command line utilities to graphical visualisation packages.
  • SoftwareOnBoard A marine navigation application for Windows that includes GRIB overlays on the chart.

Supports a large number of GRIB data types from various sources:
PDS Msg # Description
2 Air Pressure
7 Geopotential Height
11 Water Temperature
59 Precipitation Rate
61 Total Precipitation
80 Water temperature
82 Water level deviation from mean height
91 Ice Cover
33&34 Surface Wind (vector)
49&50 Surface Currents (vector)
100 Wave Height
101 Wave Direction
103 Wave Period
238 Snow Cover
  • WGRIB Command line based program to manipulate, inventory and decode GRIB files
  • Picogrib GRIB 1 C-language (FORTRAN callable) free decoding package compatible to some extent with ECMWF GRIBEX routine
  • NCEP codes free software (C and FORTRAN library) for decoding and encoding data in GRIB 1 format
  • NCEP codes free software (C and FORTRAN library) for decoding and encoding data in GRIB 2 format (some template only)
  • JGrib - Jgrib is a free library for reading GRIB files in Java.
  • Meteosatlib - Meteosatlib is a free software C++ library and set of tools to convert satellite images between various formats; it can read and write GRIB data, and its GRIB encoding/decoding library can be used standalone.
  • The NCAR Command Language
    NCAR Command Language
    The NCAR Command Language is a free interpreted language designed by the National Center for Atmospheric Research for scientific visualization and data processing. NCL has robust file input and output...

     can be used to read, analyze and visualize GRIB data, as well convert it to other gridded data formats.
  • PyNIO is a Python programming language
    Python (programming language)
    Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

     module that allows read and/or write access to a variety of data formats using an interface modelled on netCDF.
  • degrib (AKA NDFD GRIB2 Decoder) is a reader for GRIB 1 and GRIB 2 files.
  • wgrib2 is a reader for GRIB 2 files.
  • GRIB API is an API developed at ECMWF to decode and encode GRIB edition 1 and 2 data. A useful set of command line tools is also included.
  • Ugrib – Ugrib is a no cost graphical GRIB viewer designed for reading GRIB 1 files. The website GRIB.US also aims to provide education on the prudent and safe use of GRIB data for forecasting weather
  • SmartMet - SmartMet is a Windows tool that reads, writes and visualises GRIB data
  • Xconv/Convsh – Xconv is a graphical tool for displaying and converting gridded data, and is available for most operating systems. Convsh is the command-line equivalent.
  • GRIB Java Decoder is a free library for reading GRIB 1 and GRIB 2 files in Java, part of the NetCDF Java Common Data Model library
  • zyGrib a graphical software for Linux, Mac OS X and Windows (GPL3, Qt) to download and display GRIB 1 files.
  • GrADS, Linux/Unix based desktop application that handles GRIB
  • GDAL
    GDAL
    GDAL is a library for reading and writing raster geospatial data formats, and is released under the permissive X/MIT style free software license by the Open Source Geospatial Foundation. As a library, it presents a single abstract data model to the calling application for all supported formats...

    , a general-purpose API for geospatial data
  • PyGrib A python language extension module which allows one to read and write GRIB 1 and GRIB 2 formats.
  • PolarView A navigation application that includes a GRIB viewer, supporting both GRIB 1 and GRIB 2. PolarView includes a GRIB download service for GFS (wind/atmospheric pressure), NWW3 (wave height/direction) and RTOFS (Atlantic currents) data from NOAA. Available for Linux, Mac and Windows.
  • OpenCPN Open Source Chart Plotter / Marine Navigator. For day to day cruising or advance route planning. (NOTE: GRIB support is available since version 1.3.5 beta)
  • CDO (Climate Data Operators) is an analysis tool for geoscientific data with GRIB support
  • IDV is a meteorologically oriented, platform-independent application for visualization and analysis of GRIB1, GRIB2 and NetCDF files.

See also

  • Common Data Format
    Common Data Format
    Common Data Format is a library and toolkit that has been developed by NASA. The software is an interface for the storage and manipulation of multi-dimensional data sets.-See also:* CGNS * EAS3...

     (CDF)
  • Hierarchical Data Format
    Hierarchical Data Format
    Hierarchical Data Format is the name of a set of file formats and libraries designed to store and organize large amounts of numerical data...

     (HDF)
  • NetCDF
    NetCDF
    NetCDF 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. The project homepage is hosted by the Unidata program at the University Corporation for Atmospheric Research...

  • PP-format
    PP-format
    The PP-format is a Met Office proprietary file format for meteorological data.Simulations of the weather are performed by the Met Office's Unified Model, which can be used for Numerical Weather Prediction or Climatology, and data is collected...

  • Global Forecast System
    Global Forecast System
    The Global Forecast System is a global numerical weather prediction computer model run by NOAA. This mathematical model is run four times a day and produces forecasts up to 16 days in advance, but with decreasing spatial and temporal resolution over time...


External links