Class GribLatLonGrid
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
NiintNumber of points along a parallel (columns).
NjintNumber of points along a meridian (rows).
FirstLatitudedoubleLatitude of the first grid point, in degrees.
FirstLongitudedoubleLongitude of the first grid point, in degrees, as stored (often 0 to 360).
LastLatitudedoubleLatitude of the last grid point, in degrees.
LastLongitudedoubleLongitude of the last grid point, in degrees, as stored.
IIncrementdoubleThe i-direction (longitude) increment, in degrees; positive.
JIncrementdoubleThe j-direction (latitude) increment, in degrees; positive.
ScanningModeGribScanningModeThe scanning mode flags (flag table 3.4).
ShapeOfEarthbyteThe shape of the Earth (code table 3.2), for example
6for 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
FirstLongitude
Longitude of the first grid point, in degrees, as stored (often 0 to 360).
public double FirstLongitude { get; init; }
Property Value
IIncrement
The i-direction (longitude) increment, in degrees; positive.
public double IIncrement { get; init; }
Property Value
JIncrement
The j-direction (latitude) increment, in degrees; positive.
public double JIncrement { get; init; }
Property Value
LastLatitude
Latitude of the last grid point, in degrees.
public double LastLatitude { get; init; }
Property Value
LastLongitude
Longitude of the last grid point, in degrees, as stored.
public double LastLongitude { get; init; }
Property Value
Ni
Number of points along a parallel (columns).
public int Ni { get; init; }
Property Value
Nj
Number of points along a meridian (rows).
public int Nj { get; init; }
Property Value
ScanningMode
The scanning mode flags (flag table 3.4).
public GribScanningMode ScanningMode { get; init; }
Property Value
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
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
Remarks
The values ReadValues(GribField, CancellationToken) returns are in this grid's row-major order: JConsecutive and Boustrophedon are undone by the decoder.