我目前正在使用HDF
文件(版本4),我使用pyhdf
模块(http://hdfeos.org/software/pyhdf.php)。在
当我在MATLAB中使用nctoolbox
打开一个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个变量:
如果有人能帮我弄清楚这是怎么回事。在
您正在使用打开hdf文件pyhdf.SD公司,它只允许您查看科学数据集(SDS)。缺少的字段是Vdata字段,而不是SDS,因此必须使用分别访问它们pyhdf.HDF公司以及PYF公司一
比如:
有关详细信息,请尝试以下链接:http://pysclint.sourceforge.net/pyhdf/documentation.html
要在python上读取HDF文件中的所有数据,pyhdf.V的描述包含以下程序,它显示了任何HDF文件中包含的vgroups的内容
以下函数以V模式提取HDF文件的数据
^{pr2}$此程序使用CloudSat的HDF文件。在
在没有访问数据的情况下,据我所知,这个文件似乎包含
netcdf
模块无法读取的netcdf
数据。相当于nctoolbox
的python似乎是netCDF4。但是,最好使用高级工具xray,它为处理此类文件提供了更方便的数据结构。在相关问题 更多 >
编程相关推荐