Versions Compared

Key

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

...

There are various commands for inspecting the contents of a GRIB file. The GRIB_API installation as part of OpenIFS has useful commands like grib_ls and grib_dump.

Code Block
titleExample grib-api command for inspecting a file
grib_ls ICMSHfrq2+000000.grb

Here is another example using the cdo command:

...

Code Block
titleWorkaround if CDO does not understand GRIB2
grib_set -s editionNumber=1 <input grib2 file> <output grib1 file>

 

...

 

Note

Note this will only work if you are using less than 128 model levels as it does not actually convert the message to GRIB1 if there are any GRIB2 specific elements in the messages.

...

The -t option tells CDO to use the predefined ECMWF parameter tables (see CDO documentation for more details). Without this option parameter names are not preserved. If the - t option doesn't work this is usually because CDO is using an old version of the ECMWF GRIB_API software.

 

Acknowledgements

Thanks to Paul Dando of User Support for help with the contents of this page.

 

 

HTML
<script type="text/javascript" src="https://software.ecmwf.int/issues/s/en_UKet2vtj/787/12/1.2.5/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=5fd84ec6"></script>

...