grib_open: Open GRIB files

View source: R/grib_open.R

grib_openR Documentation

Open GRIB files

Description

grib_open opens a GRIB file for reading or writing and returns a GRIB class object.

Usage

grib_open(file)

Arguments

file

character string. A path to a GRIB file.

Details

grib_open is the constructor function for the S3 GRIB class object. The GRIB object is list with three elements: file, handle, and isMultiMessage. file is the path to the opened file, handle is an externalptr to the file in memory, and isMultiMessage is a logical indicating if there are multiple entries in any of the file's messages.

Value

Returns a GRIB class object: see 'Details'.

See Also

grib_close

Examples

g <- grib_open(system.file("extdata", "lfpw.grib1", package = "gribr"))
g # shows status
grib_close(g)

nawendt/rGRIB documentation built on Oct. 24, 2023, 6:21 a.m.