grib_length: Get number of GRIB messages

View source: R/grib_length.R

grib_lengthR Documentation

Get number of GRIB messages

Description

grib_length loops through a GRIB file to determine the number of messages.

Usage

grib_length(gribObj)

Arguments

gribObj

GRIB class object.

Details

grib_length determines the length of both GRIB files with and without multiple fields per message. The GRIB file is looped though twice, with and without multi-message support turned on, to get the true length.

Value

Returns integer number of GRIB messages.

Examples

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

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