Unable to open file with h5info, h5read
15 views (last 30 days)
Show older comments
Hi everyone,
I try to open a .he5 file by using
>> filename='MLS-Aura_L2GP-IWC_v03-30-c01_2004d336.he5';
>> fileinfo=h5info(filename)
It returns:
Error using h5infoc
The HDF5 library encountered an error and produced the following stack
trace information:
H5F_locate_signature unable to find a valid file signature
H5F_super_read unable to find file signature
H5F_open unable to read superblock
H5Fopen unable to open file
Error in h5info (line 75);
hinfo = h5infoc(filename,location);
Then I try with "hdf5info"
>> fileinfo=hdf5info(filename)
It gives:
Error using hdf5infoc
Call to HDF5 library failed (invalidFile): "Not a valid HDF5 file:
I:\DOCTORAT\TRAITEMENT\DONNEES\Dec2004v3\MLS-Aura_L2GP-IWC_v03-30-c01_2004d336.he5".
Error in hdf5info (line 79)
[info.Offset, info.GroupHierarchy, majnum, minnum, relnum] = ...
Do you know where is the problem?
Note that I try with an another file, a previous version of data and this command works.
Thank a lot for help
3 Comments
Walter Roberson
on 25 Apr 2019
Please show the first 80 or so bytes of the file, following the response I gave below.
per isakson
on 26 Apr 2019
I have found the program HDF5View very useful when working with HDF5-files. See HDFView is a visual tool for browsing and editing HDF4 and HDF5 files.
If HDFView fails to open your file, your file is most likely not a correct HDF-file.
Answers (1)
Walter Roberson
on 31 May 2017
The file is not in HDF5 file format (or HDF4 format either.)
To help debug it, try
fid = fopen('testdcm.fig');
dat = fread(fid,[1, 80], 'uint8');
fclose(fid)
and show us the output of
dat
sprintf('%02x ', dat)
char(dat)
2 Comments
Walter Roberson
on 31 May 2017
Sorry, change the fid = fopen('testdcm.fig'); line to
fid = fopen(filename);
See Also
Categories
Find more on HDF5 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!