I believe you can convert hdf4 data to hdf5 with appropriate conversion tools, e.g. h4toh5
.
In Octave, to load a .h5 file (plus checking) is as simple as:
octave:1> load secondhdf5.h5
octave:2> whos
Variables in the current scope:
Attr Name Size Bytes Class
==== ==== ==== ===== =====
dbldata 4x3 96 double
fltdata 4x3 96 double
intdata 4x3 48 int32
Total is 36 elements using 240 bytes
octave:3> size(dbldata)
ans =
4 3
By the way, the contents of 'secondhdf5.h5' were as follows:
$ h5dump secondhdf5.h5
HDF5 "secondhdf5.h5" {
GROUP "/" {
DATASET "dbldata" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 3, 4 ) / ( 3, 4 ) }
DATA {
(0,0): 1.1, 1.2, 1.3, 1.4,
(1,0): 2.1, 2.2, 2.3, 2.4,
(2,0): 3.1, 3.2, 3.3, 3.4
}
}
DATASET "fltdata" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SIMPLE { ( 3, 4 ) / ( 3, 4 ) }
DATA {
(0,0): 1.1, 1.2, 1.3, 1.4,
(1,0): 2.1, 2.2, 2.3, 2.4,
(2,0): 3.1, 3.2, 3.3, 3.4
}
}
DATASET "intdata" {
DATATYPE H5T_STD_I32BE
DATASPACE SIMPLE { ( 3, 4 ) / ( 3, 4 ) }
DATA {
(0,0): 1, 2, 3, 4,
(1,0): 5, 6, 7, 8,
(2,0): 9, 10, 11, 12
}
}
}
}