Versions Compared

Key

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

...

The GRIB tools are part of the ECMWF GRIB API ecCodes Library. They are a set of command line programs for interactive and batch decoding and processing of GRIB data

...

There are tools for getting information about the GRIB API ecCodes installation and the keys available

...

There is a tool for converting from GRIB to netCDF

  • grib_to_netcdf

You will find some example data in $SCRATCH/ectrain/trx/openifs or you can use output from one of your own experiments. 

Let's play !

Getting help with the tools

Running any of the GRIB API ecCodes tools without options or input files will produce a UNIX 'man page' style output describing the usage.  Try:

...

  1. Try

    Code Block
    grib_get_data -w shortName=z  ICMGGepc8+000000
    
    


  2. The format of the data values can be controlled with a C-style format statement.  Try:

    Code Block
    grib_get_data -w shortName=z -F"%.4f" ICMGGepc8+000000


  3. Other information can be printed along with the lat-lon-values triplet:

    Code Block
    grib_get_data -p dataDate,dataTime,stepRange -w shortName=stl1 -F"%.4f" ICMGGepc8+000000


Warning

If you need the values in a program then do not be tempted to use grib_get_data to output the information to a file and then read the file in your program.  It is more efficient to use the appropriate Fortran 90, C or Python interface to GRIB API ecCodes to access the data values directly.

...