Table of Contents

Class WeatherNativeGrid

Namespace
EncDotNet.S100.Datasets.Weather
Assembly
EncDotNet.S100.Datasets.Weather.dll

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

Rows int

Number of rows (points along the latitude axis).

Columns int

Number of columns (points along the longitude axis).

FirstLatitude double

Latitude of the first row, in degrees.

FirstLongitude double

Longitude of the first column, in degrees.

LatitudeIncrement double

Degrees from one row to the next; negative when rows run south.

LongitudeIncrement double

Degrees 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

int

FirstLatitude

Latitude of the first row, in degrees.

public double FirstLatitude { get; init; }

Property Value

double

FirstLongitude

Longitude of the first column, in degrees.

public double FirstLongitude { get; init; }

Property Value

double

LatitudeIncrement

Degrees from one row to the next; negative when rows run south.

public double LatitudeIncrement { get; init; }

Property Value

double

LongitudeIncrement

Degrees from one column to the next; negative when columns run west.

public double LongitudeIncrement { get; init; }

Property Value

double

Rows

Number of rows (points along the latitude axis).

public int Rows { get; init; }

Property Value

int