Versions Compared

Key

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

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

Use ecCodes to 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 GRIB2 format

Separation of GRIB1 and GRIB2 fields to different files

Because ungrib cannot process a mixture of GRIB1 and GRIB2 fields in the same file, one can always split fields into separate files for each GRIB edition using ecCodes:

Code Block
grib_filter split.rule 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

where input_file.grib2 contains all model level parameters in GRIB2 format. When setting the GRIB edition number to 1, it's the 'pv' GRIB parameter that causes the problem. PV is an array holding the half level values of the model's A & B coefficients that define the location of the levels which needs to be removed in order to fit all 137 model levels to GRIB1 format.

Run ungrib twice, for surface and for model level files:

Ungrib run for files containing surface fields

Ungrib section of namelist.wps file

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


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


Ungrib run for files containing model level fields

Ungrib section of namelist.wps file

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


Code Block
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.