Section | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Grib-api tools
...
grib_to_netcdf
This command
...
will convert one or more grib files to netCDF is available with the ECMWF grib_api software (versions above 1.11.0 are recommended. It is not available in versions less than 1.10.0).
...
For more details please see: grib_to_netcdf description.
...
width | 320px |
---|
Info |
---|
The MetView application is available for analysis and visualisation of OpenIFS output. Please see 'Using MetView with OpenIFS' for more details. |
grib_to_netcdf only works correctly when a single level coordinate is present in the grib file. Often the model grib output files have fields on multiple level types (ie. hybrid model levels and pressure levels).
Code Block | ||
---|---|---|
| ||
grib_copy ICMGGftkm+001440 ICMGG_[typeOfLevel].grb |
In this example, the file ICMGGftkm+001440 contains a number of different model level types. The special square brack "[ ]" syntax is recognised by grib_copy and can contain any valid grib key.
This command will copy the original file separating the level types into their own file: ICMGG_hybrid.grb, ICMGG_isobaricInhPA.grb, ICMGG_surface ...etc. The same square bracket syntax is also understood by the grib_filter command.
grib_to_netcdf can then be used on the individual files:
Code Block | ||
---|---|---|
| ||
grib_to_netcdf ICMGG_hybrid.grb -o ICMGG_hybrid.nc
|
To convert from vorticity and divergence to winds, please see CDO instructions below.
...
bgColor | white |
---|---|
titleBGColor | lightlightgrey |
title | On this page |
...
CDO commands
These instructions assume the use of a recent version of Climate Data Operators (CDO) (available from Max-Planck-Institut, Germany).
CDO supports GRIB2 but needs the GRIB_API library from ECMWF in order to work correctly.
If you find the CDO commands below do not work, you can either build CDO yourself, making sure a recent version of grib_api is used, or you can use a workaround below. Use the grib_set command (from the grib_api installation) to change the GRIB edition number for all messages.
Code Block | ||
---|---|---|
| ||
grib_set -s editionNumber=1 <input grib2 file> <output grib1 file> |
...