Re: NIO problem with large netcdf dimension

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 19 Dec 2007 14:22:06 -0700 (MST)

Juerg provided us with the file, so we're going to take a look and try
to come up with a fix. I was able to reproduce the same problem on my
Mac.

--Mary

On Wed, 19 Dec 2007, Juerg Schmidli wrote:

> 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
>
_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Wed Dec 19 2007 - 14:22:06 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 03 2008 - 10:53:31 MST