Data Event Formats - Forecasts
Summary
CWMS needs a message structure to notify clients of forecast-related events.
Opinions
Opinion 1
Summary: Use the structures described below for forecast-related events.
All messages will be published to the appropriate REALTIME_OPS topic. Subscribers can set up appropriate filters to receive the desired messages.
Author: Mike Perryman
Forecast Specifications
Only values necessary to uniquely identify a forecast specification (“type”, “specification_id”, and “designator”) are required for ForecastSpecCreated, ForecastSpecUpdated, and ForecastSpecDeleted messages.
ForecastSpecCreated Message Structure
Message Type |
Structure |
||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ForecastSpecCreated |
|
Example ForecastSpecCreated Message
{
"type": "forecast_specification_created",
"specification_id": {
"office_id": "SWT",
"name": "Keystone"
},
"designator": "CAVI",
"location_id": "Keystone Lake",
"entity_id": "CESWT",
"description": "Official USACE forecast for Keystone Lake, OK",
"num_time_series": 12
}
ForecastSpecUpdated Message Structure
Message Type |
Structure |
||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ForecastSpecUpdated |
|
Example ForecastSpecUpdated Message
{
"type": "forecast_specification_updated",
"specification_id": {
"office_id": "SWT",
"name": "Keystone"
},
"designator": "CAVI",
"location_id": "Keystone Lake",
"entity_id": "CESWT",
"description": "Official USACE forecast for Keystone Lake, OK",
"num_time_series": 14
}
ForecastSpecDeleted Message Structure
Message Type |
Structure |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ForecastSpecDeleted |
|
Example ForecastSpecDeleted Message
{
"type": "forecast_specification_deleted",
"specification_id": {
"office_id": "SWT",
"name": "Keystone"
},
"designator": "CAVI"
}
Forecast Instances
Only values necessary to uniquely identify a forecast instance (“type”, “specification_id”, “designator”, “forecast_time” and “issue_time”) are required for ForecastInstCreated, ForecastInstUpdated, and ForecastInstDeleted messages.
ForecastInstCreated Message Structure
Message Type |
Structure |
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ForecastInstCreated |
|
Example ForecastInstCreated Message
{
"type": "forecast_instance_created",
"specification_id": {
"office_id": "SWT",
"name": "Keystone"
},
"designator": "CAVI",
"forecast_time": 1787245200000,
"issue_time": 1787158800000,
"max_age": 24,
"notes": "Revision 2",
"info": "{\"forecaster\": \"M5ECHABC\"}",
"blob_file_name": "keys_fcst2.zip",
"media_type": "application/zip"
}
ForecastInstUpdated Message Structure
Message Type |
Structure |
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ForecastInstUpdated |
|
Example ForecastInstUpdated Message
{
"type": "forecast_instance_updated",
"specification_id": {
"office_id": "SWT",
"name": "Keystone"
},
"designator": "CAVI",
"forecast_time": 1787245200000,
"issue_time": 1787158800000,
"max_age": 24,
"notes": "Revision 2",
"info": "{\"forecaster\": \"M5ECHABC\"}",
"blob_file_name": "keys_fcst3.zip",
"media_type": "application/zip"
}
ForecastInstDeleted Message Structure
Message Type |
Structure |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ForecastInstDeleted |
|
Example ForecastInstDeleted Message
{
"type": "forecast_instance_deleted",
"specification_id": {
"office_id": "SWT",
"name": "Keystone"
},
"designator": "CAVI",
"forecast_time": 1787245200000,
"issue_time": 1787158800000
}
Decision Status
Status: request for comments