Versions Compared

Key

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

...

Handling CCSDS compression

Use ecCodes to change To reduce size, ECMWF is using CCSDS compression starting from IFS Cycle 48r1 applied to all GRIB2 gridded fields. Since ungrib cannot process CCSDS compression, users need to uncompress GRIB2 files prior to processing with ungrib. ecCodes can change packing from CCSDS to "SIMPLE PACKING"

Code Block
$ grib_set -r -w packingType=grid_ccsds -s packingType=grid_simple ccsds.grib grid_simple.grib


Addressing mix of GRIB1 and GRIB2 format

Separation of GRIB1 and GRIB2 fields to different files

IFS cycles prior to 50R2 (see Changes to the forecasting system for more details) produce mix of GRIB1 and GRIB2, where model level fields are encoded as GRIB2 and most surface level parameters as GRIB1.

Because ungrib cannot process a mixture of GRIB1 and GRIB2 fields messages in the same file, one can should always split fields into separate files for each GRIB edition using GRIB files by edition before processing them with ungrib. One way to split GRIB messages per edition is with ecCodes:

Code Block
$ grib_filter split.rulecopy input.grib

Where "split.rule" file has following content:

Code Block
write "[dataDate]_[levelType]_[step].grib[edition]";

Conversion of model level fields from GRIB2 to GRIB1

Since WPS doesn't include Vtable describing ECMWF model level fields in GRIB2 format, one option is to convert these fields to GRIB1. This can be done with ecCodes:

Code Block
grib_set -w edition=2 -s deletePV=1,edition=1 input_file.grib2 output_file.grib1

...


Run ungrib twice

...

: for surface (GRIB1) and for model level (GRIB2) files

...

Ungrib run for files containing surface fields

Ungrib section of namelist.wps file can look like this:

Code Block
&ungrib
 out_format = 'WPS',
 prefix = 'SFILE',
/

 for the first ungrib run: 

Code Block
$ ln -sf Vtable.ECMWF_sigma Vtable
$ link_grib.csh *sfc*
$ ungrib.exe

Vtable.ECMWF_sigma

Ungrib run for files containing model level fields

...