Reading data from chunked dataset

Hi everyone,
I’m trying to reading data from a chunked compound dataset. However, I found only the first one is correct. I guess it’s relevant to chunked storage layout. Can anyone tell me how to reading from chunked dataset in Fortran?

I only know the chunked size and the original size. I don’t know other parameters like offset, stride…The example online makes me very confused…

Thanks,
Yun

The fact it is chunked data is secondary; you will need to describe the compound data type (i.e., offset and datatype, etc.) in memory and pass that to HDF5. You should be able to look at how the compound type is defined from the HDF5 file. Which example are you referring to and what part is confusing?

atropos007dy

September 10
Hi everyone,

I’m trying to reading data from a chunked compound dataset. However, I found only the first one is correct. I guess it’s relevant to chunked storage layout. Can anyone tell me how to reading from chunked dataset in Fortran?

I only know the chunked size and the original size. I don’t know other parameters like offset, stride…The example online makes me very confused…

The fact it is chunked data is secondary, you will need to describe the compound data type (i.e. offset and datatypes) in memory and pass that to HDF5. You should be able to look at how the compound type is defined from the HDF5 file. Which example are you referring to and what part is confusing?

spec.f90 (1.3 KB)
spectral_lines_library.h5 (2.1 MB)
Hi,
Thank u for the reply. I don’t know how to find the offset and datatypes. And I’m confused with the chunked dataset example I’ve found online (using h5ex_d_chunk.h5) because in this code the .h5 file are created first and thus the coder knows which elements to select. And even I know the offset and datatypes, now I still have no idea how to read from the file. The two attachments are my code and the .h5 file I’m using. Could you have a look at it (It’s short.) and help me with it?

Thanks!