how to get information fo a HDF5 file in Fortran 90?

Hi all,

How do I get the number of groups, datasets in a existed HDF5 file? I do
not find a subroutine to do this job.

Thanks for help!

DONG Li

Hi 董理,

A Wednesday 02 December 2009 09:08:54 董理 escrigué:

Hi all,

How do I get the number of groups, datasets in a existed HDF5 file? I do
not find a subroutine to do this job.

In the same way that you cannot know the number of directories and files in a
filesystem without walking every directory and build grand totals, you cannot
do that in HDF5 either. You will need to walk every group and compute your
desired grand totals.

Cheers,

···

--
Francesc Alted

Francesc Alted 写道:

Hi 董理,

A Wednesday 02 December 2009 09:08:54 董理 escrigué:
  

Hi all,

How do I get the number of groups, datasets in a existed HDF5 file? I do
not find a subroutine to do this job.
    
In the same way that you cannot know the number of directories and files in a filesystem without walking every directory and build grand totals, you cannot do that in HDF5 either. You will need to walk every group and compute your desired grand totals.

Cheers,

Thanks for relying. I hope HDF5 can provide more comvenient API for doing these querying jobs in Fortran 90, such as getting the number of groups in some spercific level, just like the operation in Linux "ls | wc -l". : )