Table of Contents

Class WeatherProducts

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

The built-in ProductRegistrations for weather data, formats that aren't S-100 products (design note weather-sources.md §3.1, §3.2 and §6.1): GRIB2 and NetCDF-CF model grids, and CAP weather warnings. They're kept apart from S100Products so a host can register the S-100 products without them (AddAllS100Products(ProductRegistry)); CreateDefaultRegistry(), and so Default, includes both.

public static class WeatherProducts
Inheritance
WeatherProducts
Inherited Members

Properties

All

Every built-in weather registration.

public static IReadOnlyList<ProductRegistration> All { get; }

Property Value

IReadOnlyList<ProductRegistration>

Cap

CAP 1.2 marine weather warnings (CAP/1.2.0), drawn by CapDatasetProcessor: one CAP alert, an Atom feed of them, or the NWS GeoJSON form from api.weather.gov/alerts.

public static ProductRegistration Cap { get; }

Property Value

ProductRegistration

Remarks

A file is claimed, whatever its extension, when:

  • its leading bytes are XML whose root is a CAP alert, or an Atom feed that declares the CAP namespace (MatchBytes, LooksLikeCap(ReadOnlySpan<byte>));
  • they are JSON from api.weather.gov that names an alert (wx:Alert or an /alerts/ URL);
  • it's read as GML (a .gml file, or .xml in an exchange set) and its root is one of those (MatchGml).

An S-100 GML dataset has a DataSet root in an S-100 namespace and the S-100 matchers run first, so CAP never claims S-124 or another GML product, and no S-100 matcher claims CAP. Other GeoJSON isn't claimed.

CapPortrayal

The portrayal of CAP warnings: CapStyle, outlines and hatching by severity, since CAP defines no symbology.

public static PortrayalBasis CapPortrayal { get; }

Property Value

PortrayalBasis

Grib2

GRIB edition 2 wind and wave grids (GRIB2/2.0.0): NOAA GFS and GFS-Wave, ECMWF open data and others on a regular latitude/longitude grid, drawn by GribDatasetProcessor.

public static ProductRegistration Grib2 { get; }

Property Value

ProductRegistration

Remarks

A file is claimed (MatchBytes) when:

  • it starts with a GRIB edition 2 indicator section (GRIB, two reserved octets, the discipline, then 2 in octet 8), whatever its extension: GRIB2 data has no reliable extension. A NOMADS GRIB filter download is named after the script (filter_gfs_0p25.pl), NCEP's own files have none (gfs.t00z.pgrb2.0p25.f003), and others use .grb, .grb2, .grib2, .grib or .bin;
  • it's named .grb, .grb2, .grib2 or .grib and holds a GRIB indicator in its first kilobyte of any edition, or after a WMO bulletin header, so a GRIB edition 1 file reaches the reader, which says it isn't supported.

S-100 encodings never start with GRIB (ISO 8211 starts with the record length's digits, HDF5 with its signature, GML with <), and the envelope matchers run first, so the GRIB2 matcher can't claim an S-100 dataset or a NetCDF file.

GribPortrayal

The portrayal of GRIB2 grids: the code-defined weather styles, since GRIB2 defines no symbology.

public static PortrayalBasis GribPortrayal { get; }

Property Value

PortrayalBasis

NetCdf

NetCDF-CF wind and wave grids, NetCDF-4 (NetCDF/4.0.0) and NetCDF-3 (NetCDF/3.0.0), drawn by NetCdfDatasetProcessor.

public static ProductRegistration NetCdf { get; }

Property Value

ProductRegistration

Remarks

A file is claimed when:

  • it starts with CDF\x01 or CDF\x02 (NetCDF-3), whatever its extension (MatchBytes);
  • it's HDF5 with a root Conventions attribute naming CF (for example "CF-1.6") and no S-100 productSpecification, whatever its extension, so a NetCDF-4 file named .h5 is still NetCDF (MatchHdf5);
  • it's HDF5 named .nc or .nc4 that no HDF5 product claimed, so a NetCDF-4 file without a Conventions attribute reaches the reader, which then says what the file lacks.

An S-102, S-104 or S-111 file always declares its product in productSpecification, which the NetCDF matcher refuses, so the two never claim the same file.

NetCdfPortrayal

The portrayal of weather grids: the code-defined styles of EncDotNet.S100.Datasets.Weather, since NetCDF-CF and GRIB2 define no symbology.

public static PortrayalBasis NetCdfPortrayal { get; }

Property Value

PortrayalBasis

Methods

RegisterAll(ProductRegistry)

Registers every built-in weather product with registry.

public static void RegisterAll(ProductRegistry registry)

Parameters

registry ProductRegistry

The registry.