Model output Excerpt |
---|
The instructions in this article show how to convert OpenIFS GRIB output to netCDF for use in other analysis and visualisation software. |
The OpenIFS model outputs files in GRIB format. These files are a mix of GRIB 1 & GRIB 2 format messages. They also contain multiple vertical coordinates: pressure levels, sub-surface levels etc, as well as fields on reduced Gaussian grids. This can cause a problem with some 3rd party tools as the same GRIB variable code is used for each axis. The instructions below show how to work around this. The ICMGG files contain all the gridpoint fields. The ICMSH files are the spherical harmonics of the wind fields, pressure and temperature. grib_to_netcdfThis command will convert one or more GRIB files to netCDF and 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. grib_to_netcdf only works correctly when a single level coordinate is present in the GRIB file. Often the model output files have fields on multiple level types (ie. hybrid model levels and pressure levels). Code Block |
---|
title | Split GRIB file into separate level types |
---|
| grib_copy ICMGGftkm+001440 ICMGG_[typeOfLevel].grb |
In this example, the GRIB model output file ICMGGftkm+001440 contains a number of different model level types. The special square bracket "[ ]" syntax is recognised by grib_copy and can contain any valid GRIB key. This example 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 |
---|
title | Convert GRIB file to netCDF |
---|
| grib_to_netcdf ICMGG_hybrid.grb -o ICMGG_hybrid.nc
|
To convert from vorticity and divergence to wind u and v, please see CDO instructions below. |