grib_api: grib_get_data

- Main Page
- Modules
- Files
- Related Pages
- Examples

# grib_get_data

## DESCRIPTION

Print a latitude, longitude, data values list

## USAGE

grib_get_data [options] grib_file grib_file ...

## OPTIONS

-M
Multi-grib support off. Turn off support for multiple fields in single grib message
-m missingValue
The missing value is given through this option. Any string is allowed and it is printed in place of the missing values. Default is to skip the missing values.
-p key[:{s/d/l}],key[:{s/d/l}],...
Declaration of keys to print. For each key a string (key:s) or a double (key:d) or a long (key:l) type can be requested. Default type is string.
-R key1=relative_error1,key2=relative_error2,...
Compare floating point values using the relative error as tolerance. key1=relative_error will compare key1 using relative_error1. all=relative_error will compare all the floating point keys using relative_error. Default all=0.
-F format
C style format for values. Default is "%.10e"
-w key[:{s/d/l}]{=/!=}value,key[:{s/d/l}]{=/!=}value,...
Where clause. Grib messages are processed only if they match all the key/value constraints. A valid constraint is of type key=value or key!=value. For each key a string (key:s) or a double (key:d) or a long (key:l) type can be specified. Default type is string.
-f
Force. Force the execution not to fail on error.
-G
GRIBEX compatibility mode.
-7
Does not fail when the message has wrong length
-V
Version.

## grib_get_data examples

1. To get a latitude, longitude, value list, skipping the missing values(=9999)

       >grib_get_data ../data/reduced_gaussian_model_level.grib2

2. If you want to define your missing value=1111 and to print the string missing in place of it

       >grib_get_data -m 1111:missing ../data/reduced_gaussian_model_level.grib2

3. If you want to print the value of other keys with the data value list

       >grib_get_data -p centre,level,step ../data/reduced_gaussian_model_level.grib2