[TEST] KNMI professional weather warnings
Technical documentation
Public Weather Warnings
This is the documentation for the datasets KNMI-public-weather-warnings and KNMI-public-weather-warnings-extended. For more information about the process behind the issued warnings, see here (in Dutch).
Important notice to users
Until further notice, this dataset is for testing purposes only. Its content does not reflect current or forecast weather conditions:
- All files will have the
PublicationTypeset totestand all warning sets will have theoperational_statusset toTest.
Note that the data model, and therefore the dataset, may still change while KNMI implements the renewed warning system.
General documentation
The JSON schema belonging to this dataset is provided in a separate file: JSON schema.
KNMI Public Warnings provides structured information about current warnings and early indications of potentially dangerous weather. The dataset is intended for systems that need to ingest, process or display KNMI warning information in a consistent machine-readable form.
Each publication is a snapshot: one JSON file describes the complete current and future warning situation known at the time the file was generated. A snapshot can contain multiple warning sets. Each warning set concerns one weather phenomenon and contains one or more warning parts for specific areas, periods and severity levels. One incident can be linked to multiple warning parts and weather phenomena.
The dataset can contain both operational and test information. Consumers must inspect metadata.publication_type and each warning set's operational_status before deciding how to process or display a record. Only an Actual warning set represents real warning information that may require action. Exercise, System and Test records must not be presented as actual warnings.
Warning information includes Dutch and English meteorological texts, validity periods, affected areas, severity, probability ranges and optional enriched guidance. Areas are represented as GeoJSON-like Polygon or MultiPolygon objects using longitude-latitude coordinate pairs in WGS 84.
Filename structure and issuance time
Files follow the naming convention dataset_yyyy-MM-dd'T'HHmmssSSSSSS'Z'.json, where dataset is replaced by public_warnings for the KNMI-public-weather-warnings dataset and replaced by professional_warnings for the KNMI-public-weather-warnings-extended dataset.
A dataset is published whenever the status of a warning changes. Publications are ad-hoc, except for an automatically generated daily heartbeat at 05:30 UTC (publication_type = heartbeat), which repeats the previous warning state to confirm that the publication chain is operational.
How to process each file in this dataset
Each file is a complete snapshot containing all warnings and early indications of potentially dangerous weather known at the file's generation time.
Treat each successively published file as a full replacement for the preceding snapshot, not as a list of incremental changes. A snapshot with an empty warnings array is a valid representation of a state with no warning sets.
The top-level JSON object contains publication metadata, two counters and an array of warning sets. A warning set represents one or multiple warnings for a dangerous weather event. Its parts array contains the individual warning areas, time periods, severity levels and probability ranges.
Process each snapshot as a complete state:
- Parse the file as JSON and validate it against the JSON schema.
- Check
metadata.schema_versionbefore applying version-specific processing rules. - Inspect
metadata.publication_typeandwarnings[].operational_statusso test or exercise information is not presented as an actual warning. - Confirm that
num_warning_setsequals the number of objects inwarnings. - Confirm that
num_warningsequals the sum of the lengths of allpartsarrays. - Build the replacement state completely before replacing the preceding successfully processed snapshot.
- Use
warning_set_uuidandpart_uuidas stable identities to relate objects across successive snapshots; useversion_idandversion_dtto detect updates. - Use
warning_typeto distinguish warnings from early indications of potentially dangerous weather. - Use
phenomenonto group or filter warning sets by weather hazard. - Use warning-part
severity,color,probabilityandgeometryto present the affected situation. - Use
publication_typeandoperational_statusto separate operational warning information from heartbeats (automatically generated publication (daily at 05:30 UTC) that repeats the previous warning state to demonstrate that the publication chain is alive) and publications for test purposes.
metadata.publication_type has the following meanings:
| Value | Interpretation |
|---|---|
manual |
Publication made by a meteorologist creating or updating warning information. |
heartbeat |
Automatically generated publication (daily at 05:30 UTC) that repeats the previous warning state to demonstrate that the publication chain is alive. |
test |
Publication used for system testing. |
On WarningSet level, operational_status determines how an individual warning set must be handled:
| Value | Interpretation |
|---|---|
Actual |
Real warning information intended for operational handling. |
Exercise |
Information used for an exercise. (not in use) |
System |
System-generated test information. (not in use) |
Test |
Test information. |
File format and schema
Refer to the JSON schema for more details.
Top-level snapshot
| Property | Type | Description |
|---|---|---|
metadata |
object | Metadata for this publication. |
num_warning_sets |
integer | Declared number of warning sets. |
num_warnings |
integer | Declared number of warning parts. |
warnings |
array | Complete array of WarningSet objects. |
Metadata
| Property | Type | Description |
|---|---|---|
metadata.schema_version |
string | Version of the JSON structure. |
metadata.generated_at |
string | Generation time, formatted as ISO 8601 in UTC timezone. |
metadata.producer |
object | Information of the producer of the warnings (KNMI). Producer subproperties are id, name and contact. |
metadata.domain |
string | Domain of the warnings in the file, always equal to "public". |
metadata.publication_type |
string | 'manual' publication type are published by a meteorologist creating or updating a warning. 'heartbeat' publications are generated automatically on a schedule (daily, at 05:30 UTC)and are identical to the previous publication. test publications are published to test the chain of applications. |
metadata.snapshot_uuid |
UUID string | Unique identifier of this publication. |
WarningSet
| Property | Type | Description |
|---|---|---|
domain |
string | Warning domain. Default: "public". |
phenomenon |
string | Weather phenomenon shared by the warning parts. |
onset |
string | Start of the warning set, described as the earliest part onset in ISO 8601 UTC. |
expires |
string | End of the warning set, described as the latest part expiry in ISO 8601 UTC. |
texts |
object | Dutch and English meteorological text containers. |
warning_type |
string | "warning" or "potentially-dangerous-weather". |
status |
string | Lifecycle state, distinguishing between active, expired and cancelled WarningSets. |
operational_status |
string | Operational or test handling. |
incident |
object | An incident such as a named storm can be linked to one or multiple WarningSets, such as a WarningSet for Rain, another WarningSet for Wind, etc. |
parts |
array | Individual warning parts. |
warning_set_uuid |
UUID string | Stable identifier used to track this WarningSet across snapshots. |
version_id |
integer | WarningSet version number. |
version_dt |
string | Publication time of this warningSet version in ISO 8601 UTC. |
For more details, such as a full list of all possible phenomena, refer to the JSON schema.
Two warning sets with the same phenomenon must not overlap in time. This is a business rule and is not enforced by the JSON Schema.
WarningPart
| Property | Type | Description |
|---|---|---|
part_uuid |
UUID string | Stable identifier of the warning part. |
version_id |
integer | Version number of the warning part. |
version_dt |
string | Time at which this warning part version was last updated, formatted in ISO8601 with UTC timezone. |
severity |
string | Moderate, Severe or Extreme. |
color |
string | Warning part colour: yellow, orange or red. |
area |
object | Polygon or MultiPolygon geometry described as GeoJSON in WGS 84. |
area description |
object | Description of area affected by warning part e.g. {"en": "parts of Gelderland", "nl": "delen van Gelderland"} |
guidance |
object | Enriched guidance by language. |
onset |
string | Start of warning part in ISO 8601 UTC. |
expires |
string | End of warning part in ISO 8601 UTC. |
probability_percentage_range |
string | Probability range: 10-30, 30-60, 60-90 or 90-100. The lower bound is inclusive and the upper bound is exclusive |
certainty |
string | Enriched certainty category. Possible <= 50%, Likely: >50%, Observed: 90-100%. Use probability_percentage_range for more detailed information. |
status |
string | Lifecycle state, used to distinguish between active, expired and cancelled WarningParts. |
response_type |
string | Enriched recommended-response category. |
Note there is a one-to-one relationship between severity and color:
| Severity | Color |
|---|---|
| Moderate | yellow |
| Severe | orange |
| Extreme | red |
For more details, such as a full list of values for certain string fields, refer to the JSON schema.
List of phenomena and probability thresholds
The KNMI-public-weather-warnings-extended dataset contains all issued warnings ("warning_type": "warning") and it contains Potentially Dangerous Weather objects ("warning_type": "potentially-dangerous-weather") at lower probability than the KNMI-public-weather-warnings dataset (see table below). This dataset is intended for professional users, and some of the warnings it contains are not relevant to the general public. Some "potentially dangerous weather" objects have such a low probability of occurrence that the general public is not expected to take them into account when making decisions. However, these low-probability events may still be relevant to professional users, who may need to prepare for the possibility of severe weather even when it is unlikely to occur.
The dataset KNMI-public-weather-warnings, on the other hand, is filtered for use by the general public. Only relevant warnings for this audience are present and their content matches the other communication outlets of KNMI visible to the public e.g. website and app. Filtering is based on probability of occurance and is only applicable to early warnings (warning_type equals potentially-dangerous-weather). Potentially dangerous weather warnings are defined as having an onset later than >48h ahead, or when onset of an event is within 48 hours, with small likelihood of occurance. When warning_type equals warning, the warning is published to both the general and the extended dataset.
The following table lists the phenomena in English, Dutch, the corresponding phenomena in MeteoAlarm and the probability thresholds used for this filtering.
| English | Dutch | MeteoAlarm CAP | Probability threshold for potentially dangerous weather |
|---|---|---|---|
| Fog | Mist | Fog | Yellow: N/A Orange/red: ≥ 30% |
| Road ice | Gladheid | Snow or Ice | Yellow: ≥ 60% Orange/red: ≥ 30% |
| High temperature | Hitte | High temperature | Yellow: ≥ 60% Orange/red: ≥ 30% |
| Low temperature | Kou | Low Temperature | Yellow: ≥ 60% Orange/red: ≥ 30% |
| Rain | Zware regen | Rain | Yellow: ≥ 30% Orange/red: ≥ 10% |
| Snow | Sneeuw | Snow or Ice | Yellow: ≥ 60% Orange/red: ≥ 30% |
| Thunderstorm | Onweersbuien | Thunderstorm | Yellow: ≥ 60% Orange/red: ≥ 30% |
| Waterspouts | Waterhozen | Wind | No thresholds specified |
| Wind | Windstoten | Wind | Yellow: ≥ 60% Orange/red: ≥ 30% |
How warning sets and warning parts are related
A WarningSet groups one or more WarningPart objects for the same weather phenomenon for a specific weather event. Information that applies to the entire event is stored on the warning set (e.g. guidance); area-specific and time-specific information is stored on its warning parts.
| Level | Stable identity | Version fields | Validity |
|---|---|---|---|
| Snapshot | metadata.snapshot_uuid |
metadata.generated_at |
Complete state at generation time. |
| Warning set | warning_set_uuid |
version_id, version_dt |
Earliest onset through latest expires |
| Warning part | part_uuid |
version_id, version_dt |
Part-specific onset through expires. |
The ordering of the parts array may change. Consumers must use part_uuid, not array position, to relate a warning part across snapshots.
The warning-set onset is equal to or earlier than the first onset of its warning parts, and its expiration is equal to or later than the last expiration timestamp of its parts.
incident.incident_uuid can link warning sets for different phenomena to one incident, such as a named storm.
How lifecycle and versions should be interpreted
The lifecycle status values for warning sets and warning parts are:
| Value | Interpretation |
|---|---|
active |
The warning set or warning part is active. This means the warning is upcoming OR ongoing. |
cancelled |
It was cancelled by a meteorologist, or the probability fell below the threshold. (warning set or warning part must not be active.) |
expired |
It was marked expired by a meteorologist. (the described weather no longer poses a threat) |
A cancelled or expired warning set or warning part appears in a snapshot one more time.
Use the stable UUID to identify the logical object and version_id to distinguish revisions. Do not assume that array order represents recency.
The schema does not enforce that version IDs increase by one, that version dates are monotonic, or that warning-set and warning-part version changes occur together.
How text and guidance should be interpreted
texts contains meteorologist-authored information in Dutch and English.
| Property | Type | Constraint | Description |
|---|---|---|---|
texts.nl.headline, texts.en.headline |
string | Maximum 255 characters | Short headline. |
texts.nl.description, texts.en.description |
string | 20 to 65,536 characters when present | Concise meteorological summary. |
texts.nl.detailed_description, texts.en.detailed_description |
string | No length constraint in the schema | Detailed meteorological description. Required for warnings, optional for potentially dangerous weather. |
guidance is enriched information. A language-specific guidance object can contain optional impact and instruction strings, each of which may also be null.
How geometry should be interpreted
Each warning part contains an area described as a GeoJSON RFC 7946 Polygon or MultiPolygon in WGS 84. Coordinate positions are ordered as [longitude, latitude].
The Coordinates definition requires exactly two numeric items. The schema uses ge and le for intended coordinate bounds.
Any rings in the geometry are closed, polygons do not have holes and are counterclockwise.
The geometry type property has a default ("Polygon" or "MultiPolygon").
Example shape:
{
"type": "Polygon",
"coordinates": [[
[3.2, 51.3],
[6.1, 51.3],
[6.1, 53.6],
[3.2, 53.6],
[3.2, 51.3]
]]
}