...
Section | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
NCAR command language (NCL)
...
Another way to split the file would be using the grib_copy command from the ecCodes (or grib_api) software as shown above:
Code Block |
---|
grib_copy ICMSHg4a4+000000.grb ICMSHg4a4+000000_[typeOfLevel].grb |
...
There are various commands for inspecting the contents of a GRIB file. The GRIB_API installation as part of ecCodes software installation required for OpenIFS has useful commands like grib_ls
and grib_dump
.
...
However, if this does not work for any reason, a workaround is to temporarily change the edition number to 1 of the GRIB file. Use the grib_set
command (from ecCodes or grib_api) to change the GRIB edition number for all messages:
...
A workaround is to use the -t ecmwf
option. The -t option
tells CDO to use the predefined ECMWF parameter tables (see CDO documentation for more details).
Code Block |
---|
cdo -t ecmwf -f nc copy mygrib1.grb mygrib1.nc |
Warning |
---|
Do not use this option for GRIB-2 fields. It sets the GRIB table default to be specific to the GRIB-1 ECMWF tables. If problems persist, we recommend using grib_to_netcdf to convert to netCDF. |
Acknowledgements
Thanks to Paul Dando of User Support for help with the contents of this page.
...
This will make CDO use ECMWF parameter table 128 for the definitions of variables but 128 is only for GRIB 1. This will work for the surface fields which are encoded by IFS as GRIB 1, but not for the multi-level fields which are encoded in GRIB 2. Variable names become 'unknown' if -t ecmwf is used with the multi-level fields. It is best to omit it completely, even for surface fields, and only use it for GRIB 1 data if you get missing variable names after CDO has converted the data (see CDO documentation for more details).
Code Block |
---|
cdo -t ecmwf -f nc copy mygrib1.grb mygrib1.nc |
Warning |
---|
Do not use this option for GRIB-2 fields. It sets the GRIB table default to be specific to the GRIB-1 ECMWF tables. If problems persist, we recommend using grib_to_netcdf to convert to netCDF. |
Acknowledgements
Thanks to Paul Dando of User Support for help with the contents of this page.
HTML Comment | ||
---|---|---|
| ||
The excerpt below includes a Google analytics tracker, do not remove! |
...