[R-sig-Geo] Working with GRIB2 files
Paul Hiemstra
paul.hiemstra at knmi.nl
Mon Oct 3 10:21:45 CEST 2011
Hi,
GRIB2 is mentioned on the GDAL website as one of the supported file
types. This is the WMO GRIB2 type, not really sure if that is what your
files are. You'll probably need to rebuild GDAL to get this support, but
check it out. In addition, I think the route from GRIB2 to NetCDF to R
is also ok in my view. Especially when you convert all the data to
NetCDF once and than do your additional analyses. There are also tools
to work with grib2 files, googling for wgrib2 will get you a lot of
information.
good luck,
Paul
On 09/30/2011 05:21 PM, Matthew Landis wrote:
> Ezra,
>
> I've been messing around with GRIB2 myself, but as of July, I hadn't
> had any luck finding ways to do it in R. I ended up using NCL (NCAR
> command language) to convert the Grib2's to NetCDF, which various R
> packages can handle (notably raster). I did figure out how to pass
> arguments from R to the NCL script (through Bash), which was a major
> achievement for me. This only works on Linux though, as I haven't
> worked it out for the Cygwin version of NCL.
>
> I would *love* to hear about ways of dealing with GRIB2 natively in
> R. Barring that, I'm happy to share NCL code.
>
> Matt
>
> On 9/30/2011 12:41 PM, Ezra Boyd wrote:
>> Hello,
>>
>> I am trying to use the Real Time Ocean Forecasting System
>> (http://polar.ncep.noaa.gov/ofs/download.shtml?) archival data which
>> is in the GRIB2 format using a hybrid model-based coordinate system.
>> The data can be downloaded from here:
>> http://data.nodc.noaa.gov/opendap/ncep/rtofs/contents.html
>>
>> Has anyone had any experience using GRIB2 in R? If so, please let me
>> know how it worked out. In particular, I need to get forecast data
>> into a format where I can overlay a shapefile, but the wqgrib2 program
>> won't work because hybrid coordinate system.
>>
>> Thanks,
>> Ezra
>
--
Paul Hiemstra, Ph.D.
Global Climate Division
Royal Netherlands Meteorological Institute (KNMI)
Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
P.O. Box 201 | 3730 AE | De Bilt
tel: +31 30 2206 494
http://intamap.geo.uu.nl/~paul
http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770
More information about the R-sig-Geo
mailing list