Class NetCdfDatasetProcessor
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
sourceIAssetSourceThe asset source holding the file.
relativePathstringThe file's source-relative path.
crsTransformFactoryICrsTransformFactoryCreates the transforms the headless compositor needs.
NetCdfDatasetProcessor(string, ICrsTransformFactory)
Opens the NetCDF-CF file at path.
public NetCdfDatasetProcessor(string path, ICrsTransformFactory crsTransformFactory)
Parameters
pathstringThe file's path.
crsTransformFactoryICrsTransformFactoryCreates the transforms the headless compositor needs.
Fields
SpecName
The spec name NetCDF files are registered under.
public const string SpecName = "NetCDF"
Field Value
Properties
Dataset
The NetCDF file read as CF weather data.
public NetCdfWeatherDataset Dataset { get; }
Property Value
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
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
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
pathstringThe file's path.
Returns
SpecFor(NetCdfFormat)
The spec a NetCDF format reports: NetCDF/4.0.0 or NetCDF/3.0.0.
public static SpecRef SpecFor(NetCdfFormat format)
Parameters
formatNetCdfFormatThe file's format.