Hi all,
I'm new to hdf5 and I'm migrating an application from hdf4 to hdf5
I pretend to access my hdf5 file several times and in each time append one value to a set.
After N accesses I should have a one dimensional set with N values.
From what I read in some examples, this operation seemed much more complicated than what I used to do in hdf4:
Create the file and the set:
sd_id=sfstart('monitor.h5', DFACC_CREATE)
sds_id=sfcreate(sd_id, 'Time', DFNT_FLOAT32, 1, SD_UNLIMITED)
ierr=sfendacc(sds_id)
ierr=sfend(sd_id)
Append element:
sd_id=sfstart('monitor.hdf', DFACC_WRITE)
sds_index=sfn2index(sd_id, 'Time')
sds_id=sfselect(sd_id, sds_index)
ierr=sfwdata(sds_id, itime, 1, 1, time)
ierr=sfendacc(sds_id)
ierr=sfend(sd_id)
From what a read in the documentation and some examples
in hdf5 I should create a data space with unlimited dimensions
and each time i need to append data I should extend the dataset etc...
(http://www.hdfgroup.org/HDF5/Tutor/extend.html I followed the file h5_extend.f90)
Is this way the only way to make this operation? Or there are a similar way to hdf4 to perform this task?
Thanks in advance
João