[Matrix-SIG] HELP! How to access a large array

Janko Hauser jhauser@ifm.uni-kiel.de
Mon, 20 Sep 1999 14:15:38 +0200 (CEST)


minxu@sci.ccny.cuny.edu writes:
 > But is turns out that it takes minutes for the second part to read the data 
 > from netcdf file. It is very sad since I want to increase the size of data 
 > further.
 > 

Along which dimension are you doing the subsampling. To read
subsamples along the first (unlimited) dimension is very timeconsuming
but not memory consuming. Do you see, that all the data is read in at
the memory footprint? Or do you asume this because of the long time it 
took. It should not read in all the data. Which version of the
netcdf-library are you using? The 2.? is slower then the newer ones.

 > Is there any way that I can read some subsets of one array stored in netcdf  
 > file without loading the whole array? Does f.variables['var'][x, y, ...] avoid
 > loading the whole 'var' array? 
 > 
This should already be possible? I deal with NetCDF-files of ca. 1Gb
size, so this is working.

__Janko