Glocate: Locate GRIB message inside a file

View source: R/Rgrib.R

GlocateR Documentation

Locate GRIB message inside a file

Description

Find the position of a particular message (field) insiode a GRIB file.

Usage

  Glocate(filename,IntPar=list(),DblPar=list(),StrPar=list(),...)

Arguments

filename

Either a character string (filename) or a GRIBlist object. Anything that has a Ginfo method.

IntPar, StrPar, DblPar

Lists of parameters and their values for the wanted field.

...

Options for Ginfo.

Details

The function works by first calling Ginfo for the list of chosen parameters. Then the list is searched for messages that satisfy all the required values.

Value

A vector with the message indices of all messages that satisfy the required values of the parameters.

See Also

Gdec, Gopen, Ginfo

Examples

## Not run: 
#Find T2m in a file:
Glocate('filename',StrPar=list(shortName="t2"))

## End(Not run)

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