Gwrite: Write a GRIB message (handle) to a file.

View source: R/Rgrib.R

GwriteR Documentation

Write a GRIB message (handle) to a file.

Description

Writes a GRIB message.

Usage

  Gwrite(gribhandle,filename,append=TRUE)

Arguments

gribhandle

An object of class GRIBhandle.

filename

Character string giving the file name to write the message to. If the file does not yet exist, it is created. If it already exists, behaviour depends on append.

append

Logical. If TRUE, the message is appended to the file (if it exists). If FALSE, the complete file is overwritten.

Value

NULL

See Also

Gdec, Gopen, Gmod

Examples

## Not run: 
#Get first 5 records of a file.
mygrib <-Ghandle('filename',1)
#return level info from all messages in the file:
Gwrite(mygrib,newfile,append=TRUE)

## End(Not run)

harphub/Rgrib2 documentation built on June 4, 2024, 7:27 a.m.