Class WeatherNativeGrid
A regular latitude/longitude grid as the file stores it, before
normalisation: point (row, col) of a decoded step is at latitude
FirstLatitude + row × LatitudeIncrement and longitude
FirstLongitude + col × LongitudeIncrement, and the values are
row-major (row × Columns + col).
public sealed record WeatherNativeGrid : IEquatable<WeatherNativeGrid>
- Inheritance
-
WeatherNativeGrid
- Implements
- Inherited Members
Remarks
A GRIB2 grid with scanning mode bit 2 clear (rows running south) has a negative LatitudeIncrement, as does a CF grid with a decreasing latitude axis. Longitudes may be in either the 0 to 360 or the −180 to 180 convention. Create(WeatherNativeGrid) turns this into the south-west-origin WeatherGrid the coverage pipeline expects.
Constructors
WeatherNativeGrid(int, int, double, double, double, double)
A regular latitude/longitude grid as the file stores it, before
normalisation: point (row, col) of a decoded step is at latitude
FirstLatitude + row × LatitudeIncrement and longitude
FirstLongitude + col × LongitudeIncrement, and the values are
row-major (row × Columns + col).
public WeatherNativeGrid(int Rows, int Columns, double FirstLatitude, double FirstLongitude, double LatitudeIncrement, double LongitudeIncrement)
Parameters
RowsintNumber of rows (points along the latitude axis).
ColumnsintNumber of columns (points along the longitude axis).
FirstLatitudedoubleLatitude of the first row, in degrees.
FirstLongitudedoubleLongitude of the first column, in degrees.
LatitudeIncrementdoubleDegrees from one row to the next; negative when rows run south.
LongitudeIncrementdoubleDegrees from one column to the next; negative when columns run west.
Remarks
A GRIB2 grid with scanning mode bit 2 clear (rows running south) has a negative LatitudeIncrement, as does a CF grid with a decreasing latitude axis. Longitudes may be in either the 0 to 360 or the −180 to 180 convention. Create(WeatherNativeGrid) turns this into the south-west-origin WeatherGrid the coverage pipeline expects.
Properties
Columns
Number of columns (points along the longitude axis).
public int Columns { get; init; }
Property Value
FirstLatitude
Latitude of the first row, in degrees.
public double FirstLatitude { get; init; }
Property Value
FirstLongitude
Longitude of the first column, in degrees.
public double FirstLongitude { get; init; }
Property Value
LatitudeIncrement
Degrees from one row to the next; negative when rows run south.
public double LatitudeIncrement { get; init; }
Property Value
LongitudeIncrement
Degrees from one column to the next; negative when columns run west.
public double LongitudeIncrement { get; init; }
Property Value
Rows
Number of rows (points along the latitude axis).
public int Rows { get; init; }