Table of Contents

Class WeatherTimeStep

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

One time step of a weather parameter: its valid time and a callback that decodes its values when they're needed.

public sealed class WeatherTimeStep
Inheritance
WeatherTimeStep
Inherited Members

Constructors

WeatherTimeStep(DateTime, WeatherStepDecoder)

Creates a time step whose values are decoded on demand.

public WeatherTimeStep(DateTime validTime, WeatherStepDecoder decoder)

Parameters

validTime DateTime

The time the values are valid for, in UTC.

decoder WeatherStepDecoder

Decodes the step's values in the file's order.

Properties

ValidTime

The time the values are valid for, in UTC.

public DateTime ValidTime { get; }

Property Value

DateTime

Methods

Decode(CancellationToken)

Decodes the step's values in the file's order. Prefer ReadStep(WeatherParameter, int, CancellationToken), which also normalises them.

public float[] Decode(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Signals that the caller no longer needs the step.

Returns

float[]

The values in the file's row-major order.

FromValues(DateTime, float[])

Creates a time step over values already in memory, for example a grid built in a test.

public static WeatherTimeStep FromValues(DateTime validTime, float[] nativeValues)

Parameters

validTime DateTime

The time the values are valid for, in UTC.

nativeValues float[]

The values in the file's row-major order. The array isn't copied.

Returns

WeatherTimeStep