Class WeatherProducts
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
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
Remarks
A file is claimed, whatever its extension, when:
-
its leading bytes are XML whose root is a CAP
alert, or an Atomfeedthat declares the CAP namespace (MatchBytes, LooksLikeCap(ReadOnlySpan<byte>)); -
they are JSON from
api.weather.govthat names an alert (wx:Alertor an/alerts/URL); -
it's read as GML (a
.gmlfile, or.xmlin 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
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
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,.gribor.bin; -
it's named
.grb,.grb2,.grib2or.griband holds aGRIBindicator 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
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
Remarks
A file is claimed when:
-
it starts with
CDF\x01orCDF\x02(NetCDF-3), whatever its extension (MatchBytes); -
it's HDF5 with a root
Conventionsattribute naming CF (for example"CF-1.6") and no S-100productSpecification, whatever its extension, so a NetCDF-4 file named.h5is still NetCDF (MatchHdf5); -
it's HDF5 named
.ncor.nc4that no HDF5 product claimed, so a NetCDF-4 file without aConventionsattribute 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
Methods
RegisterAll(ProductRegistry)
Registers every built-in weather product with registry.
public static void RegisterAll(ProductRegistry registry)
Parameters
registryProductRegistryThe registry.