The GRIB_LIST routine lists the records in a file or all of the keys in a record. When calling GRIB_LIST, IDL prints the output directly to the console unless you specify the OUTPUT keyword.
Examples
In this example, we locate a GRIB file and ask IDL to return the record information.
file = FILEPATH('atl.grb2', $
SUBDIRECTORY=['examples','data'])
GRIB_LIST, file
IDL displays:
1
|
crain
|
DOUBLEARRAY[141151]
|
2
|
usct
|
DOUBLEARRAY[141151]
|
3
|
vsct
|
DOUBLEARRAY[141151]
|
4
|
tsec
|
DOUBLEARRAY[141151]
|
Now list all of the keys in a specific record.
GRIB_LIST, file, 1
IDL displays:
1
|
numberOfSection
|
LONGARRAY[6]
|
1
|
codedValues
|
DOUBLEARRAY[65283]
|
1
|
values
|
DOUBLEARRAY[141151]
|
1
|
packingError
|
5.0000000e-005
|
1
|
unpackedError
|
1.1754944e-038
|
1
|
maximum
|
1.0000000
|
1
|
minimum
|
0.00000000
|
1
|
average
|
0.063385431
|
Note: Only a portion of the output is shown
This command narrows down the output from the GRIB_LIST command by applying a filter that checks for keys which contain "value":
GRIB_LIST, file, 1, FILTER='value'
IDL displays:
1
|
values
|
DOUBLEARRAY[141151]
|
Syntax
GRIB_LIST, filename [, FILTER=string][, OUTPUT=variable]
Arguments
FILENAME
A string denoting the name of the GRIB file for which IDL will create the listing.
Keywords
FILTER
A string used for filtering the results. IDL applies the filter to the key string of each item returned. IDL returns only those keys that contain the filter string in the result. The "*" wildcard may be used between strings, ("latitude*Degrees").
Note: GRIB is case sensitive so the filter string is also case sensitive.
OUTPUT
If set to a named variable, IDL assigns the string array to that variable and the results will not be printed to the screen.
Version History
See Also
GRIB_GETDATA, GRIB_PUTDATA