I'm a newbie to all this of hdf5 format, and I've been trying to make
a big hdf5 file with data collected from several small NetCDF files.
When initializing the file i call create_dataset, and then try to fill
it using dataset[...,i] = data, where i is an index incremented for
each file. But after i fill every dataset slice, i write dataset in
the python prompt and it says "<Closed HDF5 file>". I solved this
opening the file for every iteration, but i would like to know if this
is normal behaviour or is there something i'm doing wrong.
Best regards.
Can you post the script you're using, or a fragment thereof?
MZ
> --
> You received this message because you are subscribed to the Google Groups "h5py" group.
> To post to this group, send email to h5...@googlegroups.com.
> To unsubscribe from this group, send email to h5py+uns...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/h5py?hl=en.
>
> If i place the h5py.File sentence outside the for loop, at the second
> iteration, all datasets and the file handle are closed.
If you're using h5py 1.3.1 there's a nasty bug with this exact
behavior. What version of h5py/HDF5 do you have?
Since you're writing to the same file for every iteration of the loop
I think you certainly want the file-open statement outside the loop.
But the above bug is the only reason I can think of why the file would
be closed the second time around.
Andrew
--
Lorenzo Luengo C.
Ingeniero Civil Electr�nico
Cel: 98270385