Table of Contents

Class SurfaceCurrentStation

Namespace
EncDotNet.S100.Datasets.S111
Assembly
EncDotNet.S100.Datasets.S111.dll

A single surface-current time series at a fixed station or positioned node, as encoded by S-111 data coding formats 1, 3, or 8 (S-111 Edition 2.0.0 §10.2.2.6–10.2.2.9).

public sealed class SurfaceCurrentStation
Inheritance
SurfaceCurrentStation
Inherited Members

Remarks

DCF1 and DCF3 encode time records as groups and are transposed by the reader; DCF8 encodes each station's complete time series as one group. Positioned formats use Positioning/geometryValues for coordinates.

Properties

DirectionsDegreesTrue

Surface-current directions in degrees from true north (clockwise, "going to" convention; S-111 Edition 2.0.0 §10.2), one per time step in the same order as SpeedsKnots.

public required float[] DirectionsDegreesTrue { get; init; }

Property Value

float[]

EndTime

UTC timestamp of the last sample.

public required DateTime EndTime { get; init; }

Property Value

DateTime

Identifier

Identifier of the station (S-111 stationIdentification).

public required string Identifier { get; init; }

Property Value

string

Latitude

Station latitude in decimal degrees (WGS-84).

public required double Latitude { get; init; }

Property Value

double

Longitude

Station longitude in decimal degrees (WGS-84).

public required double Longitude { get; init; }

Property Value

double

NumberOfTimes

Number of samples in this station's time series — equal to the length of SpeedsKnots and DirectionsDegreesTrue.

public required int NumberOfTimes { get; init; }

Property Value

int

SampleTimes

Explicit UTC timestamps for each sample, in the same order as SpeedsKnots and DirectionsDegreesTrue. DCF1 and DCF3 readers populate this from each Group_NNN/timePoint attribute (S-111 Edition 2.0.0 §12.3.4); regular station encodings may leave it empty.

public IReadOnlyList<DateTime> SampleTimes { get; init; }

Property Value

IReadOnlyList<DateTime>

SpeedsKnots

Surface-current speeds in knots, one per time step, in ascending chronological order starting at StartTime. Values are the encoded surfaceCurrentSpeed samples, whose unit is the knot (S-111 Edition 2.0.0 feature attribute surfaceCurrentSpeed), the same unit as Speed on the gridded path. Fill samples keep the S-111 fill value -9999.

public required float[] SpeedsKnots { get; init; }

Property Value

float[]

StartTime

UTC timestamp of the first sample.

public required DateTime StartTime { get; init; }

Property Value

DateTime

TimeRecordInterval

Interval between consecutive samples when uniform. DCF1 and DCF3 readers derive it from SampleTimes and use Zero for non-uniform samples; DCF8 readers parse timeRecordInterval.

public required TimeSpan TimeRecordInterval { get; init; }

Property Value

TimeSpan

Methods

NearestTimeIndex(DateTime)

Returns the index of the sample whose timestamp is closest to time, clamped to [0, NumberOfTimes - 1]. Nearest-neighbour rounding; no interpolation.

public int NearestTimeIndex(DateTime time)

Parameters

time DateTime

Returns

int

TimeAt(int)

Returns the timestamp of the i-th sample, computed from StartTime and TimeRecordInterval.

public DateTime TimeAt(int index)

Parameters

index int

Returns

DateTime