#Env dependent extension packages #pip install h5py -i https://pypi.tuna.tsinghua.edu.cn/simple #pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple #pip install pandus -i https://pypi.tuna.tsinghua.edu.cn/simple #ruiY hdfFile = 'Z_SATE_C_BAWX_20201020DF' import h5py hdf5File = h5py.File(hdfFile) #print(hdf5File.attrs['ProductID']) #print(hdf5File.attrs.keys()) #FY4 hdf5文件属性数据 for i in range(len(hdf5File.attrs.keys())): #print(i) #print(list(hdf5File.attrs.keys())[i]) attrsName = list(hdf5File.attrs.keys())[i] attrsValue = hdf5File.attrs[attrsName] #print(attrimport time time.sleep(3) #FY4 hdf5文件科学数据集数据读取 #print(list(hdf5File.keys())) datasets = list(hdf5File.keys()) #print(datasets) for i in range(len(datasets)): #print(i) #hdf5File[] #print(datasets[i]) dsetsName = datasets[i] #print(dsetsName) #time.sleep(2) #dsetsDtype = dsetsName.dtype #dsetsShape = dsetsName.shape #print(dsetsName) #print(dsetsName.dtype) #print('{}:{}:{}'.format(dsetsName,dsetsDtype,dsetsShape)) #print(dsetsName.shape) #print('{}:{}:{}'.format(dsetsName,dsetsDtype,dsetsShape)) #print('{}:{}'.format(dsetsName,dsetsShape)) #print(type(dsetsShape)) #数据集类型 #print(len(dsetsShape)) #数据集纬度 #print(dsetsDimsX) #print(dsetsShape[0]) dsetsDimsX = dsetsShape[0] #dsetsDims = len(dsetsShape)#判读纬度,一维数组就不用获取Yi列值 #print('{},{},{}'.format(dsetsName,dsetsDimsX,dsetsDimsY)) ''' for Xi in range(dsetsDimsX): #print(Xi) #for Yi in range(dsetsDimsY): #print('{},{}'.format(Xi,Yi)) # pass if len(dsetsShape) == 2: #dsetsDimsXY = dsetsShape[1] #print(dsetsDimsXY) #///////print('{},{}'.format('二维',dsetsName)) dsetsDimsY = dsetsShape[1] #获取二维列数值 #print(dsetsDimsY) for Yi in range(dsetsDimsY): #print('{}:{},{}'.format(dsetsName,Xi,Yi)) #输出二维数据集对应的数据集名称及二维排列 #print() pass #//////二维列值 else: #print('{},{}'.format('一维',dsetsName)) #DimOneSetValues = list(dsetsName[Xi - 1]) #print(DimOneSetValues) DimOneSetValues = list(dsetsName) print(DimOneSetValues) ''' if len(dsetsShape) == 2: print('{},{}'.format('二维数集',dsetsName)) dsetsDimsY = e,Xi,Yi,dimTwosSetValues)) else: print('{},{}'.format('一维数集',dsetsName)) for Xi in range(dsetsDimsX): dimOneSetValues = '' #DimOneSetValues = dsetsName[Xi - 1] #print(DimOneSetValues) #print(Xi) #print(typat(dsetsName,Xi,dimOneSetValues))
hdfExplorer hdfviewer
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
2015-12-01 openstack 集成显卡 对windroye 支持
2015-12-01 add-apt-repository cloud-archive:liberty
2015-12-01 openstack libtray
2014-12-01 yum puppet
2014-12-01 openNebulafrontEnd ComputeNode 配置记录