Questions on using the ECMWF IFS forecast data with WPS

Questions/topics related to the first-guess input meteorological data, and Vtables
Post Reply
Posts: 30
Joined: Thu Feb 28, 2019 4:49 pm

Questions on using the ECMWF IFS forecast data with WPS

Post by Chapacha » Mon Dec 16, 2019 4:13 am

Sorry to bother you again about using the ECMWF IFS (Integrated Forecasting System) data with WPS. These data are downloaded in near real time by our collaborators in Saudi Arabia on their machine. Thanks to the help I got from WRFHelp and this forum, I was able to run WPS/WRF using the ECMWF IFS data obtained by NCAR/RDA (dataset ds113.1) but I have run into many problems using the ECMWF IFS data downloaded in Saudi Arabia.

I attached one data file here (P1D12111200121618001: I needed to add "txt" at the end of the file name so the file could be attached). This data file (and all other data files that are downloaded) is in Grib format but it contains both Grib1 data and Grib2 data since I need to use wgrib to read some data and wgrib2 to read some other data. I used all tricks that I learned from using NCAR/RDA's ds113.1 datasets but none of them worked. Then I used wgrib to output the Grib1 data in a Grib1 file (command: wgrib ECMWF.grb -grib -o ECMWF.grb1 -d all) and wgrib2 to output the Grib2 data in a Grib2 file (command: wgrib2 ECMWF.grb -grib ECMWF.grb2). Once I ran g1print.exe to read the Grib1 file, I always got the following errors (if I ran g2print.exe to read the Grib2 file, I got "Successful completion of g2print"):

WPS.ECMWF/gribdata> ./g1print.exe P1D12111200121618001.grb1
Copen: File = P1D12111200121618001.grb1
Fortran Unit = 29360191
UNIX File descriptor: 3

rec GRIB GRIB Lvl Lvl Lvl Time Fcst
Num Code name Code one two hour
End-of-record mark (7777) not found1610993754
Sec0(1) = 26214508 0
1 133 Q 100 850 0 2019-12-11_12:00 +126
*** stopping in findgrib in gribcode ***\n
\tI could not find the GRIB string in the input file
\tafter testing the first 100,000 bytes.
\tThe file may be corrupt or it is not a GRIB file.
\tPerhaps a gzipped GRIB file or netcdf?\n

Then I asked the system administrators to install ECMWF's "eccodes" package (this package is specifically designed for decoding and encoding the ECMWF IFS data) on their machine and used this package to output the required variables in individual files in Grib1 format; however, I always got the error messages of "End-of-record mark (7777) not found" and g1print.exe was never successful for reading those individual files. I also tried with "eccodes" on Cheyenne and got the same problems.

I am wondering if anyone could offer some help or suggestions as how to solve the problems.

ECMWF IFS Grib data (I had to add the "txt" suffix. Otherwise, the file won't be attached.
(192.4 MiB) Downloaded 19 times

Posts: 16
Joined: Mon Oct 15, 2018 9:58 pm

Re: Questions on using the ECMWF IFS forecast data with WPS

Post by wcheng » Wed Dec 18, 2019 10:55 pm

Hi Yongxin

I would do the following to separate the file into two files:

wgrib -s P1D12111200121618001.grb > list.grib1
wgrib2 -s P1D12111200121618001.grb > list.grib2

wgrib -i P1D12111200121618001.grb -o P1D12111200121618001.grib1 -grib < list.grib1
wgrib2 -i P1D12111200121618001.grb -grib P1D12111200121618001.grib2 < list.grib2

You need to apply ungrib.exe separately to each file and then combine them in metgrid.exe.
However, it doesn't look like there is anything useful in the fields in grib2 format.

The other thing to consider is to make sure your Vtable matches with your input file.
There are different Vtables for different models.

I was able to make it work with one time in ungrib.exe and metgrid.exe for that single

Post Reply

Return to “Meteorological Input Data”