Routines (alphabetical) > Routines: G > GRIB Routines > GRIB_GETDATA

# GRIB_GETDATA

The GRIB_GETDATA function returns the key/value pairs associated with a requested record in the form of an ORDEREDHASH.

## Examples

In this example, we locate a GRIB file and ask IDL to return the 2nd record.

file = FILEPATH('atl.grb2',SUBDIRECTORY=['examples','data'])

data = GRIB_GETDATA(file, 2)

IDL returns:

help, data

DATA ORDEREDHASH <ID=1 NELEMENTS=224>

## Syntax

Result = GRIB_GETDATA( filename, record)

## Return Value

Returns an ORDEREDHASH of the requested record. The ORDEREDHASH contains all of the keys present in the record.

## Arguments

### FILENAME

A string denoting the name of the GRIB file for which IDL will return a record.

### RECORD

The number of the record in the GRIB file IDL will return.

## Version History

8.3 | Introduced

## See Also

GRIB_LIST, GRIB_PUTDATA, HASH, ORDEREDHASH