[SciPy-user] Problem reading NetCDF File

Scott Sinclair scott.sinclair.za@gmail....
Fri Jan 30 08:07:00 CST 2009


> 2009/1/30 Ludovic DROUINEAU <ludovic.drouineau@ifremer.fr>:
> Hi all,
>
> When I try to open a NetCDF file, I have the following error:
>  File "C:\Python25\lib\site-packages\scipy\io\netcdf.py", line 194, in
> _read_values
>   count = n * bytes[nc_type-1]
> IndexError: list index out of range
>
> My code is:
> from scipy.io import netcdf
>
> nc = netcdf.netcdf_file ('test.nc', 'r')

I'm not sure if anyone is actively maintaining scipy.io.netcdf (you'll
find out if there is a response to your query). In case there isn't,
you might have better luck with one of the following:

http://code.google.com/p/netcdf4-python/
http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html#mpl_toolkits.basemap.NetCDFFile
http://www.pyngl.ucar.edu/Nio.shtml
http://pypi.python.org/pypi/pupynere/1.0

Cheers,
Scott


More information about the SciPy-user mailing list