error reading grib2

From: Jeff Whitaker <jswhit_at_nyahnyahspammersnyahnyah>
Date: Wed, 13 Feb 2008 17:32:42 -0700

Hi All:

Using PyNGL 1.2.0 on macos x, I get this error trying to read a grib2 file:

[mac28:~/python/wendi] jwhitaker% python readgrib.py
fatal:NCARG_ROOT environment variable not set
fatal: Unable to locate GRIB v2 code tables, cannot continue.
fatal:Could not open (gec00.t00z.pgrb2af00.2)
python(13459) malloc: *** error for object 0x2039db8: Non-aligned
pointer being freed
*** set a breakpoint in malloc_error_break to debug
NIOError: Unable to open file
Traceback (most recent call last):
  File "readgrib.py", line 2, in <module>
    f = nio.open_file('gec00.t00z.pgrb2af00.2.grb')
SystemError: error return without exception set

using

from PyNGL import nio
f = nio.open_file('gec00.t00z.pgrb2af00.2.grb')
print f.variables.keys()
f.close()

PyNGL is installed in my home directory, and the grib2 tables appear to
be there:

[mac28:~/python/wendi] jwhitaker% ls -l
/home/jwhitaker/lib/python/PyNGL/ncarg/grib2_codetables/
total 17
-rwxr-xr-x 1 jwhitaker climate 5841 Jul 24 2007 centers.table
drwxr-xr-x 8 jwhitaker climate 272 Aug 29 12:37 ecmwf
drwxr-xr-x 8 jwhitaker climate 272 Aug 29 12:38 fsl
drwxr-xr-x 8 jwhitaker climate 272 Aug 29 12:38 ncar
drwxr-xr-x 8 jwhitaker climate 272 Aug 29 12:38 ncep
drwxr-xr-x 8 jwhitaker climate 272 Aug 29 12:38 tigge

echo $PYTHONPATH
/home/jwhitaker/lib/python

Setting NCARG_ROOT to /home/jwhitaker/lib/python/PyNGL/ncarg doesn't help.

-Jeff

-- 
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : Jeffrey.S.Whitaker_at_noaa.gov
325 Broadway                Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg
_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Wed Feb 13 2008 - 17:32:42 MST

This archive was generated by hypermail 2.2.0 : Fri Feb 15 2008 - 17:18:31 MST