Hi
My netcdf file contains a large one-dimensional data variable. Python
crashes when trying to access the variable as shown below:
Extract of netcdf header:
dimensions:
side = 2 ;
xysize = 32477944 ;
variables:
float z(xysize) ;
Python Code:
>>> import Nio
>>> f=Nio.open_file('05207506.nc')
>>> z=f.variables['z']
>>> d=z[:]
ncvarget: ncid 65536; varid 5: NetCDF: Start+count exceeds dimension bound
However the following code does work:
>>> d = numpy.zeros(z.shape)
>>> d[:-1] = z[:-1]
>>> d[-1] = z[-1]
Juerg
_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Wed Dec 19 2007 - 10:21:36 MST
This archive was generated by hypermail 2.2.0 : Thu Jan 31 2008 - 22:46:32 MST