Given a gribid and key name as input a value corresponding to the given index is returned. The index is zero based i.e. the first element has zero index, the second element index one and so on. If the parameter index is an array all the values correspondig to the indexes list is returned. 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: nearest.f90
[in] | gribid | id of the grib loaded in memory |
[in] | key | key name |
[in] | index | index can be a scalar or array of integer(4) |
[out] | value | value can be a scalar or array of integer(4),real(4),real(8) |
[out] | status | GRIB_SUCCESS if OK, integer value on error |