GRIB (.grb, .grib)

Background

    • GRIB scientific data file format.
    • Self-describing format for exchanging scientific data.
    • Commonly used in meteorology to store historical and forecast weather data.
    • Represents numerical weather prediction output (NWP).
    • GRIB is an acronym derived from Gridded Binary.
    • Binary file format.
    • Standardized by the World Meteorological Organization's Commission for Basic Systems.

Import & Export

  • Import["file.grb"] imports a GRIB file, returning the names of the datasets stored in the file.
  • Import["file.grb"] returns a list of strings representing the names of all datasets contained in the file.
  • Import["file.grb",elem] imports the specified element from a GRIB file.
  • Import["file.grb",{elem,suba,subb,}] imports a subelement.
  • Import["file.grb",{{elem1,elem2,}}] imports multiple elements.
  • The import format can be specified with Import["file","GRIB"] or Import["file",{"GRIB",elem,}].
  • See the reference pages for full general information on Import.
  • ImportString supports the GRIB format.

Import Elements

  • General Import elements:
  • "Elements"list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties, and settings
  • Data representation elements:
  • "Data"all datasets imported as a list of arrays
    "Datasets"names of all datasets
  • Import by default uses the "Datasets" element for the GRIB format.
  • Specifying and selecting datasets:
  • "Datasets",nn^(th) dataset
    "Datasets",datasetnamed dataset
  • Meta-information elements:
  • "Annotations"meta-information for each dataset
    "DataFormat"type used to represent each dataset
    "Dimensions"data dimensions of each dataset
    "Metadata"general meta-information as a list of rules

Examples

Basic Examples  (3)

Get the names of datasets stored in a GRIB file:

In[1]:=
Click for copyable input
Out[1]=

Import a dataset:

In[1]:=
Click for copyable input

Render the imported data as an image:

In[2]:=
Click for copyable input
Out[2]=

Read meta-information from a GRIB file:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2010
(8.0)