Class GribIndex
- Namespace
- EncDotNet.S100.Collections.Weather
- Assembly
- EncDotNet.S100.Collections.dll
A GRIB2 file's .idx inventory (#1075): NCEP publishes one beside
every GFS and GFS-Wave file (gfs.t00z.pgrb2.0p25.f003.idx), one
line per message with its byte offset, so the messages for a few
parameters can be read from a file of hundreds with HTTP byte ranges.
public sealed class GribIndex
- Inheritance
-
GribIndex
- Inherited Members
Properties
Entries
The lines, in file order.
public IReadOnlyList<GribIndexEntry> Entries { get; }
Property Value
Methods
Parse(string)
Reads an inventory: lines number:offset:d=YYYYMMDDHH:VAR:level:forecast:.
Blank lines are skipped.
public static GribIndex Parse(string text)
Parameters
textstring
Returns
Exceptions
- FormatException
A line isn't an inventory line, or offsets go backwards.
RangesFor(IReadOnlyCollection<string>)
The byte ranges holding the messages of the parameters
matches name (:UGRD:10 m above ground:), in
file order, with neighbouring messages joined into one range. A message
runs to the next line with a larger offset (fields of one message share
its offset), or to the end of the file.
public IReadOnlyList<GribByteRange> RangesFor(IReadOnlyCollection<string> matches)
Parameters
matchesIReadOnlyCollection<string>