Skip to contents

Modifies parameter entries and/or data in a GRIBhandle.

Usage

Gmod(gribhandle,IntPar=list(),DblPar=list(),StrPar=list(),data=NULL,
       precision=NULL, nbits=NULL)

Arguments

gribhandle

An object of class GRIBhandle.

IntPar, DblPar, StrPar

Lists (or character vectors) giving the names of integer, character (string) and numeric (double) parameters to be modified in the message(s), and the new values.

data

Data vector to be encoded in x.

precision

Integer value for decimal precision of the GRIB packing. Alternatively, one may fix the number of bits per value.

nbits

Bits per value in the GRIB packing. If it is not precisied, GRIB\_API defaults to 24 bits.

Value

No return value (NULL).

See also

Gdec, Gopen, Gmod, Gwrite

Examples

if (FALSE) {
#Get first 5 records of a file.
mygrib <-Gopen('filename')
#return level info from all messages in the file:
a <- Ghandle(mygrib,1)
Gmod(a,IntPar=list(typeOfLevel=105,level=500),data=Gdec(a)*5)
Gwrite(a,file=newfile,append=TRUE)
}