Table of Contents

Class WeatherParameter

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

One variable at one level of a WeatherGridSet, with its time steps: for example the U component of the wind at 10 m.

public sealed class WeatherParameter
Inheritance
WeatherParameter
Inherited Members

Constructors

WeatherParameter(WeatherParameterDefinition, WeatherLevel, IReadOnlyList<WeatherTimeStep>, IReadOnlyList<float>?, string?)

Creates a parameter from a row of the canonical table.

public WeatherParameter(WeatherParameterDefinition definition, WeatherLevel level, IReadOnlyList<WeatherTimeStep> steps, IReadOnlyList<float>? missingValues = null, string? sourceName = null)

Parameters

definition WeatherParameterDefinition

The canonical parameter, from WeatherParameters.

level WeatherLevel

The level the values are given at.

steps IReadOnlyList<WeatherTimeStep>

The time steps.

missingValues IReadOnlyList<float>

Sentinel values that mark missing points in decoded steps (for example a CF _FillValue). NaN is always missing.

sourceName string

The reader's name for the variable, for example a GRIB2 short name or a NetCDF variable name.

WeatherParameter(string, string, WeatherLevel, IReadOnlyList<WeatherTimeStep>, IReadOnlyList<float>?, string?)

Creates a parameter that isn't in the canonical table. It's listed (for example in info output) but not drawn.

public WeatherParameter(string id, string units, WeatherLevel level, IReadOnlyList<WeatherTimeStep> steps, IReadOnlyList<float>? missingValues = null, string? sourceName = null)

Parameters

id string

An id that can't clash with a canonical one, for example "grib2:0,1,8" or "netcdf:tp".

units string

The units as the file gives them.

level WeatherLevel

The level the values are given at.

steps IReadOnlyList<WeatherTimeStep>

The time steps.

missingValues IReadOnlyList<float>

Sentinel values that mark missing points in decoded steps.

sourceName string

The reader's name for the variable.

Exceptions

ArgumentException

id is empty or is a canonical id.

Properties

Definition

The row of the canonical table, or null for an unknown parameter.

public WeatherParameterDefinition? Definition { get; }

Property Value

WeatherParameterDefinition

Id

The canonical id (WeatherParameters), or the reader's id for an unknown parameter.

public string Id { get; }

Property Value

string

IsKnown

Whether the parameter is in the canonical table, and so can be drawn.

public bool IsKnown { get; }

Property Value

bool

Level

The level the values are given at.

public WeatherLevel Level { get; }

Property Value

WeatherLevel

LevelDescription

The level description, for example "10 m above ground".

public string LevelDescription { get; }

Property Value

string

MissingValues

Sentinel values that mark missing points in decoded steps. NaN is always missing.

public IReadOnlyList<float> MissingValues { get; }

Property Value

IReadOnlyList<float>

SourceName

The reader's name for the variable, when it has one.

public string? SourceName { get; }

Property Value

string

Steps

The time steps, in the order the reader found them.

public IReadOnlyList<WeatherTimeStep> Steps { get; }

Property Value

IReadOnlyList<WeatherTimeStep>

Unit

The unit values are stored in; Other for an unknown parameter.

public WeatherUnit Unit { get; }

Property Value

WeatherUnit

Units

The units label, for example "metres", or the file's units for an unknown parameter.

public string Units { get; }

Property Value

string

Methods

ToString()

Returns the id and level, for example "wind.u @ 10 m above ground".

public override string ToString()

Returns

string