Can R read grib file(when it is not raster) and convert it to ASCII file?

末鹿安然 提交于 2019-12-02 13:51:55

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!