Skip to contents

Reads a list information of a Grib file (not the encoded data itself).

Usage

Ginfo(x,...)
# S3 method for GRIBhandle
Ginfo(x,IntPar=c(),DblPar=c(),StrPar=c(),...)
# S3 method for GRIBlist
Ginfo(x,IntPar=c(),DblPar=c(),StrPar=c(),rList=NULL,multi=FALSE,...)
# S3 method for character
Ginfo(x,IntPar=c(),DblPar=c(),StrPar=c(),rList=NULL,multi=FALSE,...)

Arguments

x

An object of class GRIBhandle, a file name or a GRIBlist. In the first case, the

IntPar, StrPar, DblPar

Character vectors giving the names of integer, character (string) and numeric (double) parameters to be decoded from the message(s). The parameter names are as described in the GRIB_API documentation.

rList

An numeric vector indicating the position of the messages in the file. Not used if x is a GRIBhandle. The default is 1 (read only first message). If rList is NULL, all messages in the file are read.

multi

Logical. Setting it to TRUE allows for multi-data messages (UNTESTED!)

...

Not used.

Value

A data.frame with one column per parameter and one row per GRIB message.

Details

.

See also

Examples

if (FALSE) {
#Get first 5 records of a file.
mygrib <-Gopen('filename')
#return level info from all messages in the file:
Ginfo(mygrib,IntPar=c("typeOfLevel","level"),rList=NULL)
}