Fields from IFS on model levels are provided in GRIB2 format which WPS cannot process directly due to following reasons:

  1. GRIB2 gridded data from IFS is compresses using CCSDS compression which cannot be decompressed directly by ungrib
  2. Vtable compatible with ECMWF' GRIB2 data is not provided in WPS

Handling CCSDS compression

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"

$ 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 messages in the same file, one should always separate GRIB files by edition before processing them with ungrib. One way to split GRIB messages per edition is with ecCodes:

$ grib_copy input.grib [dataDate]_[levelType]_[step].grib[edition]


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:

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

 for the first ungrib run: 

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

Vtable.ECMWF_sigma

Ungrib run for files containing model level fields

Ungrib section of namelist.wps file

&ungrib
 out_format = 'WPS',
 prefix = 'MFILE',
/


ln -sf Vtable.ECMWF_sigma Vtable
link_grib.csh *ml*
ungrib.exe


Calculate pressure at model levels

Using calc_ecmwf_p.exe utility tool available at WPS/util/ directory, calculate pressure at ECMWF model levels.