solarpy.iotools.get_dmi_station_meta#
- solarpy.iotools.get_dmi_station_meta(station, url='https://opendataapi.dmi.dk/v2/metObs/', entry_no=-1, **kwargs)#
Retrieve metadata for a DMI station.
- Parameters:
station (str) – DMI station identifier, e.g.
'06180'for Copenhagen Airport.url (str,) – Base URL for the DMI API: - For the Climate Data API:
https://opendataapi.dmi.dk/v2/climateData/- For the Meteorological Observations API:https://opendataapi.dmi.dk/v2/metObs/entry_no (int, default -1) – Index into the list of station entries returned by the API. The default of
-1selects the most recent entry, which is appropriate for stations that have been relocated over time.**kwargs – Additional keyword arguments forwarded to
requests.get(), e.g.timeout=30.
- Returns:
meta – Station metadata with keys
'station_id','name','latitude','longitude','altitude', and'country'.- Return type:
Notes
The DMI Climate Data API is documented at https://www.dmi.dk/friedata/dokumentation/apis/climate-data-api-1. The Meteorological Observations (metObs) API is documented at https://www.dmi.dk/friedata/dokumentation/meteorological-observation-api. A list of stations can be found at https://www.dmi.dk/friedata/dokumentation/data/climate-data-stations.
Examples
>>> import solarpy >>> meta = solarpy.iotools.get_dmi_station_meta('06188', timeout=30)