Table of Contents

Class NetCdfDatasetProcessor

Namespace
EncDotNet.S100.Datasets.Pipelines
Assembly
EncDotNet.S100.Datasets.Pipelines.dll

Pipeline processor for NetCDF-CF wind and wave grids: NetCDF-4 (on PureHDF) and NetCDF-3 (classic and 64-bit offset, the format of ERDDAP's .nc output), read by NetCdfWeatherDataset and drawn, sampled and picked by WeatherGridProcessorBase. Weather model data isn't an S-100 product and isn't for navigation.

public sealed class NetCdfDatasetProcessor : WeatherGridProcessorBase, IDatasetProcessor, ICoveragePortrayalSource, IHeadlessImageRenderer, ITimeAwareDatasetProcessor, ICoverageSampler, ILoadedDatasetProjection, IDisposable
Inheritance
NetCdfDatasetProcessor
Implements
Inherited Members
Extension Methods

Remarks

The processor reports NetCDF/4.0.0 for a NetCDF-4 file and NetCDF/3.0.0 for a NetCDF-3 one. The file stays open and each time step is read when it's first drawn or sampled, so dispose the processor to close it.

A file the reader can't use fails at construction: a NetCdfFormatException (not NetCDF, CDF-5, an unsupported compression filter), a CfConventionsException (no CF coordinates or known variables, listing what the file holds; unsupported time units or calendar) or an UnsupportedWeatherGridException (a curvilinear, projected or irregular grid). Each message starts with the file name.

Constructors

NetCdfDatasetProcessor(IAssetSource, string, ICrsTransformFactory)

Opens the NetCDF-CF file relativePath in source.

public NetCdfDatasetProcessor(IAssetSource source, string relativePath, ICrsTransformFactory crsTransformFactory)

Parameters

source IAssetSource

The asset source holding the file.

relativePath string

The file's source-relative path.

crsTransformFactory ICrsTransformFactory

Creates the transforms the headless compositor needs.

NetCdfDatasetProcessor(string, ICrsTransformFactory)

Opens the NetCDF-CF file at path.

public NetCdfDatasetProcessor(string path, ICrsTransformFactory crsTransformFactory)

Parameters

path string

The file's path.

crsTransformFactory ICrsTransformFactory

Creates the transforms the headless compositor needs.

Fields

SpecName

The spec name NetCDF files are registered under.

public const string SpecName = "NetCDF"

Field Value

string

Properties

Dataset

The NetCDF file read as CF weather data.

public NetCdfWeatherDataset Dataset { get; }

Property Value

NetCdfWeatherDataset

Methods

DescribeContents()

Lists Contents. The default lists the grid set's parameters, unknown ones as not in the weather parameter table; readers add what they left out.

protected override IEnumerable<WeatherDatasetContent> DescribeContents()

Returns

IEnumerable<WeatherDatasetContent>

Remarks

Adds the data variables left out of the grid set (IgnoredVariables).

Dispose(bool)

Releases the reader's file. Called once, from Dispose().

protected override void Dispose(bool disposing)

Parameters

disposing bool

Always true.

ReadMetadata(string)

Reads the dataset metadata of the NetCDF-CF file at path (spec, extent, CRS and time coverage) without decoding any time step.

public static DatasetMetadata ReadMetadata(string path)

Parameters

path string

The file's path.

Returns

DatasetMetadata

SpecFor(NetCdfFormat)

The spec a NetCDF format reports: NetCDF/4.0.0 or NetCDF/3.0.0.

public static SpecRef SpecFor(NetCdfFormat format)

Parameters

format NetCdfFormat

The file's format.

Returns

SpecRef