【发布时间】:2022-08-22 01:41:16
【问题描述】:
我在这里使用其中一个文件:http://orca.science.oregonstate.edu/1080.by.2160.monthly.hdf.vgpm.m.chl.m.sst.php:
untar(tarfile = \"http://orca.science.oregonstate.edu/data/1x2/monthly/vgpm.r2018.m.chl.m.sst/hdf/vgpm.m.2010.tar\", exdir = \"./foo\")
我收到错误:ar.exe:打开存档时出错:无法打开 \'http://orca.science.oregonstate.edu/data/1x2/monthly/vgpm.r2018.m.chl.m.sst/hdf/vgpm .m.2010.tar\'
所以我必须手动下载文件并将其解压缩(这就是为什么不能在这里提供可重现的示例)。里面有.hdf格式的文件:
我也无法阅读它们:
library(ncdf4)
ncin <- nc_open(\".\\\\vgpm.m.2010\\\\vgpm.2010001.hdf\")
ncin
lon <- ncvar_get(ncin,\"fakeDim0\")
head(lon)
lat <- ncvar_get(ncin,\"fakeDim1\")
head(lat)
fillvalue <- ncatt_get(ncin,\"npp\",\"_FillValue\")
你能帮忙解释一下为什么我不能 utar 文件以及为什么 .hdf 文件没有填充值吗?