ECMWF model data comes in a hybrid GRIB format, that is, model level output is stored in GRIB2 messages, whereas surface data still uses GRIB1 format. Ungrib is unable to understand this hybrid GRIB format. Previous posts referred to ECMWF's grib-api which should be able to convert GRIB2 to GRIB1, but this doesn't seem to work since the 2013 update when 137 model levels were introduced. So my question is, how to get it working again?
I finally solved this problem with the following steps:
- Download the ECMWF data separately for model level variables (Q,T,U,V and geopotential) and surface variables. In this way, you will get 'pure' GRIB1 and 'pure' GRIB2 files rather than the hybrid type.
- Run ungrib twice: for the model levels files, use this Vtable. For the surface file, use the 'old' Vtable.ECMWF_sigma. Between the two ungrib runs, change the ungrib prefix in the namelist.wps (e.g. I used prefix = 'FILE_ML' and prefix = 'FILE_SFC').
- Run util/calc_ecmwf_p.exe. This only works if the program can read both files. To achieve this, make sure that in the metgrid part of the namelist.wps, both input names are given (fg_name = 'FILE_ML','FILE_SFC','PRES',). Not sure whether 'PRES' makes a difference here, but since it will be used for metgrid I already put it there and it worked for me. 'PRES' are the files created by calc_ecmwf_p.exe. Note that you'll also need an 'ecmwf_coeffs' file for this step.
- Run metgrid, real and wrf as usual.