Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

(RESOLVED) ungrib "Grib2 file or date problem" error with ds113.1 data

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

wishingprincess

New member
Hi,

When I tried to ungrib ds113.1, I failed (wps v4.0 was used. ds113.0 is OK. I linked Vtable.ECMWF). And I found the ungrib tool "g1print.exe" cannot work for ds113.1 data. Some error information are as follows:

(1) g1print.exe ds113.1:

Copen: File = ec.oper.an.sfc.128_166_10v.regn1280sc.20170506.grb
Fortran Unit = 0
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 found1415402297
Sec0(1) = 8607063 0
1 166 10V 1 0 0 2017-05-06_00:00 + 00
*** 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
STOP findgri

(2) ungrib ds113.1:

*** Starting program ungrib.exe ***
Start_date = 2017-05-06_12:00:00 , End_date = 2017-05-06_12:00:00
output format is WPS
INFORM: Interval value: 21600 seconds or 6.000000 hours
Path to intermediate files is ./
ERROR: Grib2 file or date problem, stopping in edition_num.

Thanks for your help.
 
Hi,
This problem is due to the record length of the grib message. In order to accommodate large grids, the EC violates the GRIB1 standards. This issue should've been corrected with WPSV4.0 for this particular data set (ds113.1). You will need to add this line in your &ungrib section of your namelist:
Code:
&ungrib
 ec_rec_len = 26214508
as we know that 26214508 is the record length for these data files.

In order to get g1print.exe to work, you'll need to go into the ungrib/src/g1print.F file and uncomment the line:
Code:
 ec_rec_len = 26214508
and comment out the one above it that has it set to 0. Then go back to WPS/ and recompile that program (./compile g1print). After that, you should be able to see the contents of the file. Let me know if that gets your past this problem.
 
Top