GRIBhandle | R Documentation |
GRIBhandle objects are pointers to a grib message that is loaded in memory.
They can be read from a file (or raw binary string) with Ghandle
or created by Gcreate
.
GRIBhandle objects are similar to connections in R.
They can be closed explicitely, but this is not really necessary in general,
unless you have many open handles containing large fields.
Freeing a GRIBhandle also frees the memory that contains the GRIB message.
Ghandle(x, message=NULL, multi=FALSE, keys=list(shortName="2t"))
GhandleList()
GhandleCount()
GhandleFree(gribhandle)
GhandleFreeAll()
x |
A GRIBlist class object, the name of a GRIB file or a raw GRIB message. |
message |
An integer indicating the position in the list of the message to be opened. It may also be a list off eccodes key values. In that case, the first message that fits all keys is returned. |
multi |
Set to TRUE for experimental support of multi-message GRIB records. |
gribhandle |
A GRIBhandle |
GRIBhandles are objects that store a pointer to some GRIB message in memory. If x
is a raw vector, it is supposed to be a single GRIB message (message, multi
are ignored).
Ghandle returns a GRIBhandle class object.
GhandleList() returns a list of current GRIBhandles.
GhandleCount() returns teh number of handles.
GhandleFree() clears a GRIBhandle.
GhandleFreeAll() clears all GRIBhandles.
Gopen
,Gmod
, Gdec
,Gwrite
## Not run:
#Get 5th message in a file.
h1 <- Ghandle('filename',5)
GhandleList()
GhandleFree(h1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.