【发布时间】:2015-06-04 11:26:20
【问题描述】:
我正在尝试在 R 中使用叶绿素水平的 HDF 数据,我已经安装并运行了包 rhdf5,但是当我尝试在其中加载我的 HDF 数据时,出现了几行错误。
这是我正在使用的代码
library("rhdf5")
library(maps)
June_data<-h5ls('./Data/June Chloro level.hdf')
June_data
它产生的错误是
HDF5-DIAG: Error detected in HDF5 (1.8.7) thread 0:
#000: H5F.c line 1522 in H5Fopen(): unable to open file
major: File accessability
minor: Unable to open file
#001: H5F.c line 1313 in H5F_open(): unable to read superblock
major: File accessability
minor: Read failed
#002: H5Fsuper.c line 334 in H5F_super_read(): unable to find file signature
major: File accessability
minor: Not an HDF5 file
#003: H5Fsuper.c line 155 in H5F_locate_signature(): unable to find a valid file signature
major: Low-level I/O
minor: Unable to initialize object
HDF5: unable to open file
Error in h5checktypeOrOpenLoc(file, readonly = TRUE) :
Error in h5checktypeOrOpenLoc(). File './Data/June Chloro level.hdf' is not a valid HDF5 file.
我浏览了谷歌,发现其他人有这个问题,但不知道如何解决。
【问题讨论】:
-
你确定这是 hdf5 而不是 hdf4? NASA 的很多产品仍在 hdf4 中
-
如果是 hdf4,你怎么把它输入到 R 中?