R可以读取grib文件(当它不是光栅时)并将其转换为ASCII文件吗?

时间:2012-12-13 14:54:17

标签: r gdal grib

我正在尝试阅读这个grib文件,但我收到了一个错误。我们有办法解决这个问题

    grib <- readGDAL("C:\\file.grib") 

Error in .local(.Object, ...) : 
  grib is a grib file, but no raster dataset was successfully identified.

1 个答案:

答案 0 :(得分:1)

这不是R问题。

使用gdal,我有这个:

gdalinfo --debug on H14_2011010400.grib 

GRIB: Undefined parameter table (center 98-0 table 228).
GRIB: Undefined parameter table (center 98-0 table 228).
GRIB: Undefined parameter table (center 98-0 table 228).
GRIB: Undefined parameter table (center 98-0 table 228).
GRIB: Problems with ReadGrib1Record called by ReadGrib2Record
Inside ReadGrib1Record
GRIB1 GDS: Expect PV = 255 != 33

ERROR 4: H14_2011010400.grib is a grib file, but no raster dataset was successfully identified.
gdalinfo failed - unable to open 'H14_2011010400.grib'.

我认为您的grib文件编码错误,请尝试安装wgrib以获取更多信息。