Table of Contents

Class WeatherParameterDefinition

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

One row of the canonical weather parameter table (design note weather-sources.md ยง3.5): a canonical id, its stored unit, and the GRIB2 codes and CF standard names readers map to it. The rows are listed in All.

public sealed class WeatherParameterDefinition
Inheritance
WeatherParameterDefinition
Inherited Members

Properties

CfStandardNames

The CF standard names for this parameter (CF standard name table), in order of preference: when a file holds more than one, a reader keeps the first.

public IReadOnlyList<string> CfStandardNames { get; }

Property Value

IReadOnlyList<string>

GribCodes

The GRIB2 (discipline, category, number) codes for this parameter (WMO code table 4.2), in order of preference: when a file holds more than one, a reader keeps the first.

public IReadOnlyList<GribParameterCode> GribCodes { get; }

Property Value

IReadOnlyList<GribParameterCode>

Group

The id of the parameter group this parameter is drawn with, for example "wind" for the U and V components, speed and direction. A WeatherCoverageSource serves one group.

public string Group { get; }

Property Value

string

Id

The canonical id, for example "wind.u" or "wave.hs".

public string Id { get; }

Property Value

string

Level

The level the canonical id refers to (10 m above ground for the wind components, speed and direction; mean sea level for pressure), or null when the id applies at whatever level the source gives. A reader maps a variable to this id only at this level; the same variable at another level is an unknown parameter.

public WeatherLevel? Level { get; }

Property Value

WeatherLevel

Name

A short display name, for example "Significant wave height".

public string Name { get; }

Property Value

string

Unit

The unit values are stored in. Readers convert to it.

public WeatherUnit Unit { get; }

Property Value

WeatherUnit

Methods

ToAngle(float)

Reads a stored value as an Angle clockwise from true north. Only for parameters in DegreesTrue.

public Angle? ToAngle(float value)

Parameters

value float

A stored value.

Returns

Angle?

The angle, or null when value is NaN (missing).

Exceptions

InvalidOperationException

The parameter isn't stored in degrees true.

ToLength(float)

Reads a stored value as a Length. Only for parameters in Metres.

public Length? ToLength(float value)

Parameters

value float

A stored value.

Returns

Length?

The length, or null when value is NaN (missing).

Exceptions

InvalidOperationException

The parameter isn't stored in metres.

ToPeriod(float)

Reads a stored value as a period. Only for parameters in Seconds.

public TimeSpan? ToPeriod(float value)

Parameters

value float

A stored value.

Returns

TimeSpan?

The period, or null when value is NaN (missing).

Exceptions

InvalidOperationException

The parameter isn't stored in seconds.

ToSpeed(float)

Reads a stored value as a Speed. Only for parameters in MetresPerSecond.

public Speed? ToSpeed(float value)

Parameters

value float

A stored value.

Returns

Speed?

The speed, or null when value is NaN (missing).

Exceptions

InvalidOperationException

The parameter isn't stored in metres per second.

ToString()

Returns Id.

public override string ToString()

Returns

string