Package: openkmi
OpenKMIPython package to download open data from KMI.fromopenkmi.point_obsimportSynop# initialise synoptic datakmi=Synop()# example to get the windspeed for Stabroek starting from 2021 - presentdf=kmi.get_data('6438',start_date='2021-01-01T00:00:00',parameter_list=['wind_speed'])DescriptionOpenKMI serves as a simple wrapper around the open data that the Royal Meteorological Institute of Belgium (RMI)
offers. At present following data is implemented:Synoptic observationsAutomatic weather stations (AWS)ALARO forecastsThe package facilitates fetching data from the existing WFS and WMS services to download this data.This is not an official package from the RMI.Synoptic observationsThe SYNOP data of RMI contain the observations of the synoptic network (22 stations) for the following parameters:Precipitation: PRECIP_QUANTITY + PRECIP_RANGETemperature: TEMP + TEMP_MIN + TEMP_MAX + TEMP_GRASS_MINWind: WIND_SPEED + WIND_SPEED_UNIT + WIND_DIRECTION + WIND_PEAK_SPEEDrelative humidity: HUMIDITY_RELATIVEweather type: current weatherair pressure: PRESSURE of PRESSURE_STATION_LEVELsunshine duration: SUN_DURATION_24HGlobal radiation: SHORT_WAVE_FROM_SKY_24HOURTotal cloudiness: CLOUDINESSWe refer to themetadataanddocumentationof the synoptic measurements for more info.Automatic weather stationsRMI operates a network of 17 automatic weather stations in Belgium. These weather stations report meteorological
parameters such as air pressure, temperature, relative humidity, precipitation (quantity, duration),
wind (speed, gust, direction), sunshine duration, shortwave solar radiation and infrared radiation every 10 minutes.
Hourly and daily AWS data are computed from the 10-min observations.At present only the data for station 'Zeebrugge' and 'Humain' from 2017-11-18 onwards are publicly available.ALAROThe weather model 'Alaro' is a numerical forecast model that simulates the evolution of the atmosphere.
The scientists of the RMI attempt constantly to improve these models on the basis of these newest numerical techniques,
the parameterisation of physical processes and the use of meteorological observations.The results of this research are processed in the operational weather model ALARO. It is used by the weather
forecasters of the weather office, and for creating products and services for the general public.All the parameters of the last run of Alaro can be downloaded.
This data is generated automatically from ALARO every six hours.They aren't corrected or interpreted by the forecasters of the RMI.A correct interpretation of this data requires some expertise.We refer to themetadatafor more information.Installationpip install openkmiExamplesSee the notebooks under examples to get you started.Quick start:Point observationsfromopenkmi.point_obsimportSynopfromopenkmi.point_obsimportAWS# initialise synoptic datakmi=Synop()# initialise AWS data# default is hourlykmi_aws_hour=AWS()# 10-min data:kmi_aws_10min=AWS(freq='10T')# Daily data:kmi_aws_day=AWS(freq='D')# get the available stationsdf_stations=kmi.get_stations()# get the available parametersparams=kmi.get_parameters()# example to get the windspeed for a station starting from 2021 - presentdf=kmi.get_data('6438',start_date='2021-01-01T00:00:00',parameter_list=['wind_speed'])# Use more advanced filtering methodsfromowslib.fesimportPropertyIsEqualTocustom_filt=PropertyIsEqualTo(propertyname='precip_range',literal='2')df_r=kmi.get_data('6447',start_date='2020-01-01T00:00:00',end_date='2021-01-01T00:00:00',parameter_list=['precip_quantity','precip_range'],custom_filter=custom_filt)Alaro model forecastsfromopenkmi.grid_dataimportAlaro# initialise synoptic datakmi=Alaro()# get the available layers (parameters)parameters=kmi.get_parameters()# get more information on a layerabstract=kmi.get_parameter_info('2_m_temperature')# get available forecasting timesidx=kmi.get_times('2_m_temperature')# get the data for a certain location (coordinates in WGS84)df=kmi.get_data('2_m_temperature',4.6824,52.3617)# get the data for a certain location (in Lambert72)df=kmi.get_data('2_m_temperature',169955,338336,epsg='31370')