You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given WCMP2, WTH and WNM, a user can subscribe to topics related to data of interest for download and access.
149
+
150
+
In some cases, a dataset may be organized in a manner which requires additional further "filtering" such that a
151
+
data consumer is only interested in a certain subset of the data granules being advertised by a given WNM. Some examples include (but are not limited to), where a data consumer may be only be interested in:
152
+
153
+
- surface weather observations from a certain station, or
154
+
- numerical weather prediction forecast data for a certain timestep or weather parameter
155
+
156
+
To implement this behaviour, add additional properties to both WCMP2 and WNM as follows:
157
+
158
+
==== Example: Surface weather observations
159
+
160
+
.Surface weather observations: WCMP2 MQTT link with additional properties
A data producer would extend WCMP2 and WNM as follows:
233
+
234
+
- WCMP2: add a link `properties` object for MQTT links, where each key of the link `properties` object is a https://json-schema.org/understanding-json-schema/reference/object#properties[JSON Schema property definition].
235
+
- WNM: add additional properties (key: value pairs) in the `properties` object as desired
236
+
237
+
When implemented by a data producer, a data consumer can:
238
+
239
+
- subscribe to real-time notifications to the given topic
240
+
- perform client side filtering against all incoming WNMs with `properties.model_run = "00" and properties.forecast_hour = "004"`
241
+
242
+
A sample Python script can be found below. The script connects to the Météo-France Global Broker, subscribed to weather notifications
243
+
from Environment and Climate Change Canada, Meteorological Service of Canada. The script then performs client side filtering by
244
+
evaluating (for each WNM) the `properties.wigos_station_identifier` value to match a particular station (`0-20000-0-71628`).
245
+
246
+
.Sample Python script to perform client side filtering
0 commit comments