Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. grib_get fails if a key is not found.

    Code Block
     
    > grib_get -p nosuchkey ../data/tigge_pf_ecmwf.grib2
    </p></li><br /></ol><h2>grib_get_data examples</h2><ol><li><p> To get a latitude, longitude, value list, skipping the missing values(=9999)
    <ac:structured-macro ac:name="code"><ac:plain-text-body><![CDATA[
    > grib_get_data ../data/reduced_gaussian_model_level.grib2
    ECCODES ERROR   :  Key/value not found
    



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

    Code Block
    > 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

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



...

  1. By default grib_index_build will index on the MARS keys.

    Code Block
     
    >  grib_index_build ../data/reduced*.grib1 ../data/regular*.grib1 ../data/reduced*.grib2
    



  2. To specify a custom list of keys to index on, use the -k option.

    Code Block
     
    >  grib_index_build -k paramId,dataDate ../data/reduced*.grib1 ../data/regular*.grib1 ../data/reduced*.grib2
    



...