Fields from IFS on model levels are provided in GRIB2 format which WPS cannot process directly due to following reasons:
Use ecCodes to change packing from CCSDS to "SIMPLE PACKING"
grib_set -r -w packingType=grid_ccsds -s packingType=grid_simple ccsds.grib grid_simple.grib |
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:
grib_filter split.rule input.grib |
Where "split.rule" file has following content:
write "[dataDate]_[levelType]_[step].grib[edition]"; |
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:
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.
Ungrib section of namelist.wps file
&ungrib out_format = 'WPS', prefix = 'SFILE', / |
ln -sf Vtable.ECMWF_sigma Vtable link_grib.csh *sfc* ungrib.exe |
Ungrib section of namelist.wps file
&ungrib out_format = 'WPS', prefix = 'MFILE', / |
ln -sf Vtable.ECMWF_sigma Vtable link_grib.csh *ml* ungrib.exe |
Using calc_ecmwf_p.exe utility tool available at WPS/util/ directory, calculate pressure at ECMWF model levels.