Skip to content

Commit cb8d250

Browse files
committed
add recipe for WCMP2 historical data publication (#18)
1 parent 2bab8f3 commit cb8d250

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed

cookbook/sections/data-publishers.adoc

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,106 @@ In this case, a similar strategy can be used to provide an HTTP 204 No Content l
223223
}
224224
----
225225

226+
=== Publishing a WMO Core Metadata Profile record for historical data
227+
228+
WIS2 and WCMP2 have been designed to support both real-time and historical data. While real-time data publishing in WIS2 typically includes real-time data notifications, archive data may or may not require data notifications, depending on how often the dataset is disseminated and/or updated.
229+
230+
==== Temporal aspects
231+
232+
Of critical importance is describing the temporal nature of the archive. Some examples:
233+
234+
.Describing the temporal nature of an archive in WCMP2 which contains various temporal granularities
235+
[source,json]
236+
----
237+
"time": {
238+
"interval": [
239+
"1850-01-01",
240+
".."
241+
]
242+
}
243+
----
244+
245+
.Describing the temporal nature of an archive in WCMP2 which has a single temporal granularity (i.e. continuously updated on a daily basis)
246+
[source,json]
247+
----
248+
"time": {
249+
"interval": [
250+
"1850-01-01",
251+
".."
252+
],
253+
"resolution": "P1D"
254+
}
255+
----
256+
257+
.Describing the temporal nature of an archive in WCMP2 which is not updated
258+
[source,json]
259+
----
260+
"time": {
261+
"interval": [
262+
"1850-01-01",
263+
"2025-08-19"
264+
],
265+
"resolution": "P1D"
266+
}
267+
----
268+
269+
==== Distribution and notification aspects
270+
271+
The way in which a historical archive is disseminated can result in a few different possibilities in WCMP2 and WIS2 data notifications.
272+
273+
===== Publishing links of an archive in WCMP2 whose updates are not disseminated as data granules
274+
275+
WIS2 Notifications promote "actionable links" when describing data updates via MQTT. In some cases, a historical archive may be updated without
276+
publishing data granule level updates. For example, if an archive is updated every 90 days, and updates are published into the existing archive
277+
without the ability to advertise one WIS2 Notification per data granule update, then publishing via MQTT is not a suitable mechanism for real-time
278+
decision support systems and downstream applications. In this case, clearly describing the temporal nature of the archive as well as a link which
279+
clearly defines an archive (via the ``rel=archives`` link relation) is recommended:
280+
281+
.Publishing an archive link in WCMP2
282+
[source,json]
283+
----
284+
{
285+
"rel": "archives",
286+
"href": "https://example.org/hydrometric-archive",
287+
"type": "text/html",
288+
"title": "Hydrometric archive database download",
289+
"distribution": {
290+
"availableFormats": [
291+
{
292+
"name": "SQLite3"
293+
},
294+
{
295+
"name": "Microsoft Access"
296+
}
297+
]
298+
}
299+
}
300+
----
301+
302+
===== Publishing links via updates into an existing archive
303+
304+
If a historical archives does publish data granules (i.e. if a daily climate archive is updated daily and each
305+
day's update can be defined with an actionable link, then an MQTT link is also recommended.
306+
307+
.Publishing archive and MQTT links in WCMP2 with data granule updates
308+
[source,json]
309+
----
310+
{
311+
"rel": "archives",
312+
"href": "https://example.org/daily-climate-observations",
313+
"type": "text/csv",
314+
"title": "Raw data download (CSV files)"
315+
},
316+
{
317+
"rel": "items",
318+
"href": "mqtts://example.org",
319+
"channel": "origin/a/wis2/ca-eccc-msc/data/core/climate/surface-based-observations/daily",
320+
"type": "application/geo+json",
321+
"title": "Data notifications of daily updates"
322+
}
323+
----
324+
325+
226326
=== Validating a WMO Core Metadata Profile record
227327

228328
The https://github.com/World-Meteorological-Organization/pywcmp[pywcmp] tool provides a test suite to validate a message against the WCMP2 specification requirements, as well as a Python API for application integration. Consult the pywcmp README on GitHub for more information/examples.

0 commit comments

Comments
 (0)