Table of Contents

Class GribLatLonGrid

Namespace
EncDotNet.S100.Datasets.Grib
Assembly
EncDotNet.S100.Datasets.Grib.dll

A regular latitude/longitude grid (grid definition template 3.0), as the file states it.

public sealed record GribLatLonGrid : IEquatable<GribLatLonGrid>
Inheritance
GribLatLonGrid
Implements
Inherited Members

Remarks

Angles are in degrees, converted from the template's basic angle and subdivisions (millionths of a degree by default). The increments are the template's, which are always positive: the scanning mode says which way the rows and columns run. When the template omits an increment (resolution flags), it's worked out from the first and last points.

Constructors

GribLatLonGrid(int, int, double, double, double, double, double, double, GribScanningMode, byte)

A regular latitude/longitude grid (grid definition template 3.0), as the file states it.

public GribLatLonGrid(int Ni, int Nj, double FirstLatitude, double FirstLongitude, double LastLatitude, double LastLongitude, double IIncrement, double JIncrement, GribScanningMode ScanningMode, byte ShapeOfEarth)

Parameters

Ni int

Number of points along a parallel (columns).

Nj int

Number of points along a meridian (rows).

FirstLatitude double

Latitude of the first grid point, in degrees.

FirstLongitude double

Longitude of the first grid point, in degrees, as stored (often 0 to 360).

LastLatitude double

Latitude of the last grid point, in degrees.

LastLongitude double

Longitude of the last grid point, in degrees, as stored.

IIncrement double

The i-direction (longitude) increment, in degrees; positive.

JIncrement double

The j-direction (latitude) increment, in degrees; positive.

ScanningMode GribScanningMode

The scanning mode flags (flag table 3.4).

ShapeOfEarth byte

The shape of the Earth (code table 3.2), for example 6 for a sphere of radius 6,371,229 m.

Remarks

Angles are in degrees, converted from the template's basic angle and subdivisions (millionths of a degree by default). The increments are the template's, which are always positive: the scanning mode says which way the rows and columns run. When the template omits an increment (resolution flags), it's worked out from the first and last points.

Properties

FirstLatitude

Latitude of the first grid point, in degrees.

public double FirstLatitude { get; init; }

Property Value

double

FirstLongitude

Longitude of the first grid point, in degrees, as stored (often 0 to 360).

public double FirstLongitude { get; init; }

Property Value

double

IIncrement

The i-direction (longitude) increment, in degrees; positive.

public double IIncrement { get; init; }

Property Value

double

JIncrement

The j-direction (latitude) increment, in degrees; positive.

public double JIncrement { get; init; }

Property Value

double

LastLatitude

Latitude of the last grid point, in degrees.

public double LastLatitude { get; init; }

Property Value

double

LastLongitude

Longitude of the last grid point, in degrees, as stored.

public double LastLongitude { get; init; }

Property Value

double

Ni

Number of points along a parallel (columns).

public int Ni { get; init; }

Property Value

int

Nj

Number of points along a meridian (rows).

public int Nj { get; init; }

Property Value

int

ScanningMode

The scanning mode flags (flag table 3.4).

public GribScanningMode ScanningMode { get; init; }

Property Value

GribScanningMode

ShapeOfEarth

The shape of the Earth (code table 3.2), for example 6 for a sphere of radius 6,371,229 m.

public byte ShapeOfEarth { get; init; }

Property Value

byte

Methods

ToWeatherNativeGrid()

The grid as the weather model's WeatherNativeGrid: the first point, and increments signed by the scanning mode (negative latitude increment when rows run south, which is scanning mode bit 2 clear; negative longitude increment when points run west, bit 1 set).

public WeatherNativeGrid ToWeatherNativeGrid()

Returns

WeatherNativeGrid

Remarks

The values ReadValues(GribField, CancellationToken) returns are in this grid's row-major order: JConsecutive and Boustrophedon are undone by the decoder.