Reading grib2 files


#1

I am new to R programming. I want to get weather forecast data from nomads grib2 files. Its is huge file around 200mb, from that i want to get data for particular latitude,longitude. somebody please help. I am working with windows platform.

you can get grib2 file from the below link,


#2

I don’t have any personal experience of it, but you could try looking into the rNOMADS package.


#3

When dealing with grib2 files, we use wgrib2 utility to convert to netcdf. there are some tools available in R to read this type of data. We use netcdf4 for example.

rNOMADS has a function ReadGrib that uses wgrib2 utility to convert to csv and get data into R. See the source code.

Both solution are good. It depends on performance, data you want to extract from the grib2 file. You have to try what suits you best.