Forecast Data STAC-API
Click here for Swagger - Interactive API explorer (external site)
To execute calls the service input your api-key by clicking the "Authorize" button in Swagger
Quick start examples
Example: https://dmigw.govcloud.dk/v1/forecastdata/collections/harmonie_dini_sf/items?api-key=<api-key> (external site)
Description: Will return up to 1000 (the default limit) STAC item objects from the HARMONIE DINI surface model each containing a single step in the forecast.
Example: https://dmigw.govcloud.dk/v1/forecastdata/collections/harmonie_ig_sf/items?api-key=<api-key> (external site)
Description: Will return up to 1000 (the default limit) STAC item objects from the HARMONIE IG surface model each containing a single step in the forecast.
The collection endpoints support a number of query parameters to filter or sort data. Make sure to read the query primer to make use of the below query parameters.
Example Response
{
"type": "FeatureCollection",
"features": [
{
"stac_version": "1.0.0",
"bbox": [
7.0,
53.0,
16.0,
60.0
],
"geometry": {
"coordinates": [
[
[
7.0,
53.0
],
[
16.0,
53.0
],
[
16.0,
60.0
],
[
7.0,
60.0
],
[
7.0,
53.0
]
]
],
"type": "Polygon"
},
"collection": "wam_dw",
"id": "WAM_DW_SF_2023-10-24T120000Z_2023-10-24T120000Z.grib",
"asset": {
"data": {
"href": "https://dmigw.govcloud.dk/v1/forecastdata/download/WAM_DW_SF_2023-10-24T120000Z_2023-10-24T120000Z.grib",
"title": "Forecast file download resource",
"type": "application/x-grib",
"roles": [
"data"
]
}
},
"type": "Feature",
"properties": {
"created": "2023-10-25T00:03:25.859Z",
"datetime": "2023-10-24T12:00:00Z",
"modelRun": "2023-10-24T12:00:00Z"
}
}
],
"timeStamp": "2023-10-26T09:58:40Z",
"numberReturned": 1,
"links": [
{
"href": "https://dmigw.govcloud.dk/v1/forecastdata/collections/wam_dw/items?limit=1",
"rel": "self",
"type": "application/geo+json",
"title": "This document"
},
{
"href": "https://dmigw.govcloud.dk/v1/forecastdata/collections/wam_dw/items?limit=1&offset=1",
"rel": "next",
"type": "application/geo+json",
"title": "Next set of results"
}
]
}
API
/collections
Example: https://dmigw.govcloud.dk/v1/forecastdata/collections (external site).
Description: Will return all available collections in the API.
The Weather Model (HARMONIE) can be found in the collections:
- /v1/forecastdata/collections/harmonie_dini_sf
- /v1/forecastdata/collections/harmonie_dini_ml
- /v1/forecastdata/collections/harmonie_dini_pl
- /v1/forecastdata/collections/harmonie_ig_sf
- /v1/forecastdata/collections/harmonie_ig_ml
- /v1/forecastdata/collections/harmonie_ig_pl
for the North Eastern Area (Denmark and surrounding area) in the collections starting with harmonie_dini and Greenland in the collections starting with harmonie_ig.
The Wave Model (WAM) can be found in the collections:
- /v1/forecastdata/collections/wam_dw
- /v1/forecastdata/collections/wam_natlant
- /v1/forecastdata/collections/wam_nsb
for area Danish Waters, North Atlantic and North Sea-Baltic, respectively.
The Storm Surge Model (DKSS) can be found in the collections:
- /v1/forecastdata/collections/dkss_nsbs
- /v1/forecastdata/collections/dkss_idw
- /v1/forecastdata/collections/dkss_ws
- /v1/forecastdata/collections/dkss_if
- /v1/forecastdata/collections/dkss_lf
- /v1/forecastdata/collections/dkss_lb
for the area North Sea Baltic Sea, Inner Danish Waters, Wadden Sea, Roskilde/Isefjord, Limfjord and Little Belt, respectively.
/collections/<collection name>/items
Query parameters:
Query example
Example:
Returns forecast files from the model run 01/03/2022 at 00:00:00 UTC and forecasted time step files part of that run for the timeframe of 24-48 hours, by requiring steps to be between 02/03/2022 at 00:00:00 UTC and 03/03/2022 at 00:00:00 UTC. Results should also cover an area that intersects with a bbox covering Denmark in the CRS84 coordinate system. Result shall be in descending datetime order, with offset 0.
/download/<filename>
Link to the file can be found by querying using the /collections/<collection name>/items documented above. Link will be in the asset section of the features.
Example:
Downloads the file. File is in GRIB file format.
- Request: https://dmigw.govcloud.dk/v1/forecastdata/download/WAM_DW_SF_2022-04-19T120000Z_2022-04-19T120000Z.grib (external site)
The download can be validated by comparing the “content-length” HTTP header in the response with the downloaded file length. If these do not match the file download has been interrupted and can be retried or resumed by using a GET request with a “Range” HTTP header (external site).
Response schema
Overall Structure
The API is a STAC API - Features service and follows this standard as documented here: https://api.stacspec.org/v1.0.0-beta.4/core/ (external site).
Data is returned in a FeatureCollection object that describes the returned data set. Data points are found in the features field which contains a number of Feature objects as described below.
FeatureCollection
Features are wrapped in a STAC Item FeatureCollection (external site) object, which includes:
Generic fields for every Feature object
These are STAC Items, as described by STAC Item Specification (external site) and the table below describes the returned data:
(Note that a STAC Item can be seen as an augmented GeoJson feature (external site))
* forecast models are by their very nature models of a fictitious world with a fictitious geodetic datum, ie. not tied to any actual physical locations on earth. The coordinates returned by our service are therefore not WGS84, as required by the GeoJSON specification: RFC 7946 section 4 (external site). The coordinate system used by our forecast models also use the IERS Reference Meridian, so the coordinates could be interpreted as WGS84 in order to use the data in the physical world, when taking into account the inherent uncertainty of the model. However, it is up to the end user how they want to interpret the model in the physical world.