Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.51 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.51 KB

DMI Forecast EDR API

Python interface to the The Danish Meteorological Institute's (DMI) Open Data Forecast EDR API. This repo is a copy of DMI-Open-Data with the one modification that it taps into the Forecast EDR API instead.

The status is work-in-progress. There are many combinations of forecast models and parameters which have not been properly tested...

NOTE: The forecast models "NEA" and "IGB" will expire and transition to "DINI" and "IG" in May 2024. Read more here. This has some consequences for the API in this repo, but the new models should work.

Requirements

Installation

$ pip install git+https://github.com/1oly/dmi-forecast-edr

Example

import os
from datetime import datetime
from dmi_forecast_edr import DMIForecastEDRClient, Collection

client = DMIForecastEDRClient(api_key=os.getenv('DMI_FORECAST_API_KEY'))

dtnow = datetime.now()

forecasts = client.get_forecast(
    collection = Collection.HarmonieDiniSf,
    parameter = ['wind-speed','wind-dir'],
    crs = 'crs84',
    to_time = dtnow,
    f = 'GeoJSON',
    coords = [12.5692,55.6757],
)

Parameters can be found in the documentation.