Closed jswhit closed 9 years ago
From whitaker.jeffrey@gmail.com on March 10, 2010 04:42:22
Looks like the grib_api lib has trouble with this file. I'll have to contact the developer at ECMWF. In the meantime, you can use this workaround:
instead of
grbs = pygrib.open(filename) for grb in grbs: print grb
do
grbs = pygrib.open(filename) nmsgs = grbs.messages for nmsg in range(1,nmsgs): grb = grb.message(nmsg) print grb
It's very slow, but it works.
-Jeff
From whitaker.jeffrey@gmail.com on March 10, 2010 05:11:23
Found the problem - fixed in svn revision 151 . Thanks for the report.
-Jeff
From whitaker.jeffrey@gmail.com on March 10, 2010 05:11:53
Status: Fixed
From Cheewai....@gmail.com on March 09, 2010 23:12:19
What steps will reproduce the problem? 1. Download any GRIB2 file from ftp://ftp.ssec.wisc.edu/pub/eosdb/dbcras/ , e.g. ftp://ftp.ssec.wisc.edu/pub/eosdb/dbcras/2010_03_08_067/08Mar10.12z.dbCRAS.SouthAfrica.grib2 2. Run the attached test.py script (using 08Mar10.12z.dbCRAS.SouthAfrica.grib2)
The script aborted with the following output: 1:Surface pressure:Pa (instant):polar_stereographic:surface:level 0:fcst time 0:from 201003081200 Traceback (most recent call last): File "test.py", line 4, in
for grb in grbs:
File "pygrib.pyx", line 289, in pygrib.open.next (pygrib.c:1606)
RuntimeError: Unknow error -145657936
The same data file can be decoded without any error using 'wgrib2'.
I am using pygrib-1.1 compiled from source, with grib_api-1.8 running Ubuntu 9.10
Attachment: test.py
Original issue: http://code.google.com/p/pygrib/issues/detail?id=2