问题
I am trying to read this grib file but I got an error.is there a way we can solve this problem
grib <- readGDAL("C:\\file.grib")
Error in .local(.Object, ...) :
grib is a grib file, but no raster dataset was successfully identified.
回答1:
it is not an R problem.
using gdal, I have this :
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'.
I think that your grib file is wrongly encoded, tryu to install wgrib to get more info.
来源:https://stackoverflow.com/questions/13862422/can-r-read-grib-filewhen-it-is-not-raster-and-convert-it-to-ascii-file