Class WeatherRuns
- Namespace
- EncDotNet.S100.Collections.Weather
- Assembly
- EncDotNet.S100.Collections.dll
Run facts of the Library's weather items (#1075; design note weather-sources.md §6.3): models run every 6 hours, so an item records its run (RunProperty, shared with the S-100 forecast feeds so the Library's forecast handling applies), and a run older than StaleAfter is stale, with "load latest run" offered. A pinned run is a copy kept on purpose, so it isn't.
public static class WeatherRuns
- Inheritance
-
WeatherRuns
- Inherited Members
Fields
AttributionProperty
The item property holding the attribution the provider asks for.
public const string AttributionProperty = "attribution"
Field Value
DownloadFolderProperty
The item property naming, on a pinned run, the managed folder it is kept in (relative to the downloads root).
public const string DownloadFolderProperty = "downloadFolder"
Field Value
LicenceProperty
The item property naming the data's licence.
public const string LicenceProperty = "licence"
Field Value
PinnedProperty
The item property that marks a pinned run (a kept copy), true.
public const string PinnedProperty = "pinned"
Field Value
ServiceProperty
The item property naming the weather service kind (gribFilter, gribIndex, nwsAlerts, erddapGriddap).
public const string ServiceProperty = "weatherService"
Field Value
StaleAfterProperty
The item property that marks a weather run, holding the hours after which it is stale.
public const string StaleAfterProperty = "staleAfterHours"
Field Value
Properties
StaleAfter
How old a run may be before it is stale: 12 hours (two GFS cycles).
public static TimeSpan StaleAfter { get; }
Property Value
Methods
AttributionOf(CollectionItem)
The attribution item carries, if any.
public static string? AttributionOf(CollectionItem item)
Parameters
itemCollectionItem
Returns
Credit(string?, string?)
Joins an attribution and a licence as a layer row or pick report shows them; null when both are.
public static string? Credit(string? attribution, string? licence)
Parameters
Returns
CreditOf(CollectionItem)
The line a layer row or pick report shows for an item's source: "NOAA/NCEP GFS-Wave · Public domain", the attribution or the licence alone, or null.
public static string? CreditOf(CollectionItem item)
Parameters
itemCollectionItem
Returns
IsPinned(CollectionItem)
True when item is a pinned run.
public static bool IsPinned(CollectionItem item)
Parameters
itemCollectionItem
Returns
IsStale(CollectionItem, DateTimeOffset?, DateTimeOffset)
True when the run shown for item — the downloaded
copy's (localRun), else the listed one — is older than
StaleAfterOf(CollectionItem) at now. A pinned run never is.
public static bool IsStale(CollectionItem item, DateTimeOffset? localRun, DateTimeOffset now)
Parameters
itemCollectionItemlocalRunDateTimeOffset?nowDateTimeOffset
Returns
IsWeatherRun(CollectionItem)
True when item is a weather item whose runs can go stale.
public static bool IsWeatherRun(CollectionItem item)
Parameters
itemCollectionItem
Returns
LicenceOf(CollectionItem)
The licence item carries, if any.
public static string? LicenceOf(CollectionItem item)
Parameters
itemCollectionItem
Returns
PinnedName(string, DateTimeOffset)
The download name a pinned copy of a run is kept under: gfswave.run-2026102800.
public static string PinnedName(string name, DateTimeOffset run)
Parameters
namestringrunDateTimeOffset
Returns
RunOfPinnedName(string, out string?)
The run a pinned copy's download name gives, or null for a name that isn't one.
public static DateTimeOffset? RunOfPinnedName(string name, out string? itemName)
Parameters
Returns
StaleAfterOf(CollectionItem)
How old a run may be for item before it is stale (its own setting, else StaleAfter).
public static TimeSpan StaleAfterOf(CollectionItem item)
Parameters
itemCollectionItem