grib_get Interface Reference

Get the value for a key from a grib message. More...


Detailed Description

Get the value for a key from a grib message.

Given a gribid and key as input a value for the key is returned. In some cases the value can be an array rather than a scalar. As examples of array keys we have "values","pl", "pv" respectively the data values, the list of number of points for each latitude in a reduced grid and the list of vertical levels. In these cases the value array must be allocated by the caller and their required dimension can be obtained with grib_get_size.
The value can be integer(4), real(4), real(8), character. Although each key has its own native type, a key of type integer can be retrieved (with grib_get) as real(4), real(8) or character. Analogous conversions are always provided when possible. Illegal conversions are real to integer and character to any other type.

The gribid references to a grib message loaded in memory.

In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
Otherwise the error message can be gathered with grib_get_error_string.

Examples: get.f90, print_data.f90

See also:
grib_new_from_file, grib_release, grib_set
Parameters:
[in] gribid id of the grib loaded in memory
[in] key key name
[out] value value can be a scalar or array of integer(4),real(4),real(8),character
[out] status GRIB_SUCCESS if OK, integer value on error

The documentation for this interface was generated from the following file:
Generated on Fri Mar 6 13:49:22 2009 for grib_api by  doxygen 1.5.4