GRIB (.grb, .grib)

  • Import supports Versions 1 and 2 of the GRIB format.
  • 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 and 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.


    • 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


    Basic Examples  (3)

    Get the names of datasets stored in a GRIB file:

    Click for copyable input

    Import a dataset:

    Click for copyable input

    Render the imported data as an image:

    Click for copyable input

    Read meta-information from a GRIB file:

    Click for copyable input

    See Also

    "HDF"  "HDF5"  "NASACDF"  "NetCDF"

    Introduced in 2010