【发布时间】:2015-09-09 07:44:05
【问题描述】:
我目前正在处理 HDF 文件(版本 4),并且我使用 pyhdf 模块 (http://hdfeos.org/software/pyhdf.php)。
当我使用nctoolbox 在 MATLAB 中打开我的一个 HDF 文件时,我得到以下变量:
>> a = ncgeodataset('2011365222309_30199_CS_2B-CLDCLASS_GRANULE_P_R04_E05.hdf')
a =
ncgeodataset with properties:
location: '2011365222309_30199_CS_2B-CLDCLASS_GRANULE_P_R04_E05.hdf'
netcdf: [1x1 ucar.nc2.dataset.NetcdfDataset]
variables: {16x1 cell}
>> a.variables
ans =
'StructMetadata.0'
'2B-CLDCLASS/Geolocation Fields/Profile_time'
'2B-CLDCLASS/Geolocation Fields/UTC_start'
'2B-CLDCLASS/Geolocation Fields/TAI_start'
'2B-CLDCLASS/Geolocation Fields/Height'
'2B-CLDCLASS/Geolocation Fields/Range_to_intercept'
'2B-CLDCLASS/Geolocation Fields/DEM_elevation'
'2B-CLDCLASS/Geolocation Fields/Vertical_binsize'
'2B-CLDCLASS/Geolocation Fields/Pitch_offset'
'2B-CLDCLASS/Geolocation Fields/Roll_offset'
'2B-CLDCLASS/Geolocation Fields/Latitude'
'2B-CLDCLASS/Geolocation Fields/Longitude'
'2B-CLDCLASS/Data Fields/Data_quality'
'2B-CLDCLASS/Data Fields/Data_status'
'2B-CLDCLASS/Data Fields/Data_targetID'
'2B-CLDCLASS/Data Fields/cloud_scenario'
使用python和pyhdf我只看到2个变量:
>>> d = SD('2011365222309_30199_CS_2B-CLDCLASS_GRANULE_P_R04_E05.hdf')
>>> d.datasets()
{
'cloud_scenario': (('nray:2B-CLDCLASS', 'nbin:2B-CLDCLASS'), (20434, 125), 22, 1),
'Height': (('nray:2B-CLDCLASS', 'nbin:2B-CLDCLASS'), (20434, 125), 22, 0)
}
如果有人可以帮我弄清楚这里发生了什么。
【问题讨论】: