Decode a Grib message
Gdec.Rd
returns the values stored in the grib record
Arguments
- x
An object of class "GRIBhandle", a file name or a GRIBlist, in which case field must be specified as an integer or a name. x can also be a GRIB message in raw (byte) format.
- field
An integer indicating the position of the field in the file or list. Not used if x is a GRIBhandle.
- level, levelType
Possibly add a level (pressure, height above surface).
- get.meta
Logical key to retrieve parameter and date-time information.
- multi
Setting this to TRUE turns on support for multi-field messages in GRIB2.
Details
takes an object of class "GRIBhandle" as input and returns the actual data. record can also be a filename or GRIBlist object, in which case field must be specified as an integer or a name.
Examples
if (FALSE) {
#Get first 5 records of a file.
h1 <- Ghandle('filename',5)
#decode first record
mydata <- Gdec(h1)
}