Actually, I am wrong. Wasn't looking closely, BeamTime is at path 
"All_Data/AMS-SDR_All/BeamTime".

I don't honestly remember if in HDF5 you can pass the slash-separated string 
above to open the dataset itself without having to open the intervening groups 
or not. Try it. I think h5dopen on the string "All_Data/AMS-SDR_All/BeamTime" 
may work. Otherwise, you'll have to open All_Data group and then open 
AMS-SDR_All group before you can open BeamTime.

Mark


From: Hdf-forum 
<[email protected]<mailto:[email protected]>>
 on behalf of Richa Mathur 
<[email protected]<mailto:[email protected]>>
Reply-To: HDF Users Discussion List 
<[email protected]<mailto:[email protected]>>
Date: Tuesday, August 4, 2015 12:03 PM
To: HDF Users Discussion List 
<[email protected]<mailto:[email protected]>>
Subject: Re: [Hdf-forum] h5dopen returns error

Thanks Mark !!!
Filename  is complete. The file_id that is returned from hdfopen_f (filename, 
H5F_ACC_RDONLY_F, file_id, error) is    16777217           and error code is 0.
 How do I find if 'BeamTime'  is in root group or sub group ?

The H5Dump is as below I guess the BeamTime is inside a GROUP "All_Data",

GROUP "All_Data" {
      GROUP "AMS-SDR_All" {
         DATASET "BeamTime" {
            DATATYPE  H5T_STD_I64BE
            DATASPACE  SIMPLE { ( 12, 96 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
            DATA {
            (0,0): 1816819231684734, 1816819231702752, 1816819231720770,
            (0,3): 1816819231738788, 1816819231756806, 1816819231774824

Gompie


On Tue, Aug 4, 2015 at 2:52 PM, Miller, Mark C. 
<[email protected]<mailto:[email protected]>> wrote:
Are you sure you are getting a valid file_id back from the h5fopen_f call? Are 
you by chance missing an extension on the filename such as 'satfilename.h5' and 
is the dataset 'BeamTime' in the 'root group' of the file or perhaps some 
sub-group?

Mark


From: Hdf-forum 
<[email protected]<mailto:[email protected]>>
 on behalf of Richa Mathur 
<[email protected]<mailto:[email protected]>>
Reply-To: HDF Users Discussion List 
<[email protected]<mailto:[email protected]>>
Date: Tuesday, August 4, 2015 10:42 AM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [Hdf-forum] h5dopen returns error



Hi
I am trying to read a hdf5 file in fortran95 ( gfortran). Peice of code is

 INTEGER(HID_T) :: file_id       ! File identifier
  INTEGER(HID_T) :: dset_id       ! Dataset identifier

  INTEGER     ::   error ! Error flag
  INTEGER     ::  i, j

  INTEGER, DIMENSION(96,12) :: dset_data, data_out ! Data buffers
  INTEGER(HSIZE_T), DIMENSION(2) :: data_dims

filename='satfilename'

 CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error)

  CALL h5dopen_f(file_id,"BeamTime", dset_id, error)


print *,"Data Set(ATMS) ID ERROR",dset_id, error .
The h5dopen_f returns error as  -1.

Later on when I use

CALL h5dread_f(dset_id, H5T_STD_I64BE, data_out, data_dims, error)

error -1 is returned from this function as well and  I get incorrect values of 
my variable in data_out.

Can you help
Gompie



The h5dump of my hdf5 file has


 GROUP "All_Data" {
      GROUP "AMS-SDR_All" {
         DATASET "BeamTime" {
            DATATYPE  H5T_STD_I64BE
            DATASPACE  SIMPLE { ( 12, 96 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
            DATA {
            (0,0): 1816819231684734, 1816819231702752, 1816819231720770,
            (0,3): 1816819231738788, 1816819231756806, 1816819231774824


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]<mailto:[email protected]>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to