Unexpected Standard exception from MEX file when reading h5 file
Show older comments
Hi All, I am using matlab 2022a to read h5 file from my mobile disk. The h5disp command returns the following information:
>> h5disp('F:\NREL\western_wind_2006.h5')
HDF5 western_wind_2006.h5
Group '/'
Dataset 'capacity100m'
Size: 32043x52560
MaxSize: 32043x52560
Datatype: H5T_IEEE_F64LE (double)
ChunkSize: 101x52560
Filters: none
Attributes:
'capacity100m': 'MW'
Dataset 'meta'
Size: 32043
MaxSize: 32043
Datatype: H5T_COMPOUND
Member 'site_id': H5T_STD_I32LE (int32)
Member 'latitude': 16-bit floating point type
Member 'longitude': 16-bit floating point type
Member 'power_density': 16-bit floating point type
Member 'capacity_factor': 16-bit floating point type
Member 'wind_speed': 16-bit floating point type
Member 'state_code': H5T_STRING
String Length: 8
Padding: H5T_STR_NULLPAD
Character Set: H5T_CSET_ASCII
Character Type: H5T_C_S1
Member 'elevation': 16-bit floating point type
ChunkSize: []
Filters: none
FillValue: H5T_COMPOUND
Attributes:
'wind_speed': 'm/s'
'elevation': 'm'
'longitude': 'decimal degree'
'power_density': 'W/m2'
'capacity_factor': '%'
'latitude': 'decimal degree'
Dataset 'speed100m'
Size: 32043x52560
MaxSize: 32043x52560
Datatype: H5T_IEEE_F64LE (double)
ChunkSize: 101x52560
Filters: none
Attributes:
'speed100m': 'm/s'
Dataset 'time_index'
Size: 52560
MaxSize: 52560
Datatype: H5T_STRING
String Length: 30
Padding: H5T_STR_NULLPAD
Character Set: H5T_CSET_ASCII
Character Type: H5T_C_S1
ChunkSize: []
Filters: none
FillValue: ' '
When I read the dataset 'meta' or 'time_index', matlab always runs quickly and successfully. However, if I read the 'capacity100m' or 'speed100m', it will cost much more time and it will often present the following error:
>> d=h5read('F:\NREL\western_wind_2006.h5','/capacity100m');
Unexpected Standard exception from MEX file.
What() is:bad allocation
..
Error in h5read (line 93)
[data,var_class] = h5readc(Filename,Dataset,start,count,stride);
I am wondering what causes this problem. Why sometiomes I can read the 'capacity100m' dataset successfully and sometimes not? Any suggestion will be appreciated. Thank you very much.
Accepted Answer
More Answers (0)
Categories
Find more on Programming 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!