NIO problem with large netcdf dimension

From: Juerg Schmidli <schmidli_at_nyahnyahspammersnyahnyah>
Date: Wed, 19 Dec 2007 10:21:36 -0700

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 03 2008 - 10:53:31 MST