History & Climate Data
History API
The meteoblue History API is in Beta phase. Major breaking changes to the API are not expected.
This API delivers historical data since 1940 calculated by the ERA5T re-analysis model dataset with a delay of about 8 days. If you query data for time periods that are not covered with ERA5T data, the API will automatically gap-fill the remaining days with meteoblue NEMS model data.
One API call provides a time series of historical weather data for one weather variable and a maximum of 30 years. The default time zone setting is UTC, however, you can also retrieve data in local time by specifying the UTC offset in the API request (see Optional API URL parameters).
Base URL
Example URL that fetches temperature data for Basel for 2022-11-01 to 2022-11-02:
Mandatory API-URL parameters
Parameter | Description | Example |
---|---|---|
start | Start date | &start=2022-11-01 |
end | End date | &end=2022-11-02 |
lat | Latitude coordinate in WGS84 | &lat=47.1 |
lon | Longitude coordinate in WGS84 | &lon=8.6 |
variable | Weather variable to fetch data for | &variable=temperature |
apikey | Valid meteoblue API key | &apikey=abc |
Optional API-URL parameters
Parameter | Description | Example | Default | Remarks |
---|---|---|---|---|
domain | Weather model domain | &domain=ERA5T | ERA5T | Gaps are filled with NEMS model data Available options are ERA5T and NEMSAUTO |
asl | Location height above sea level in meters | &asl=279 | Digital elevation model | |
utc_offset | Time offset to UTC in hours | &utc_offset=3 | UTC (0) | Accepts half hours, ie. &utc_offset=1.5 |
format | Output format of the fetched data | &format=csv | json | Available formats: json, csv |
resolution | Time resolution of the data | &resolution=daily | hourly | An aggregation must be specified when querying daily data. Supported time resolutions: hourly, daily, monthly |
aggregation | Aggregation option for daily and monthly data | &aggregation=mean | none | Supported aggregations: min, max, mean, sum |
gapfill | Defines whether gap filling is activated | &gapfill=false | true | The API automatically uses NEMS data for gap filling If user chooses NEMSAUTO as domain, gapfill is ERA5T |
Weather Variables
One API call retrieves data for one weather variable. Some weather variables need additional parameter settings in the API-URL (see column "Additional mandatory parameters"). The API supports various units, which must be specified in the API request (see Weather Variable Units).
Variable | Height Level | Additional mandatory parameters |
---|---|---|
temperature | 2 m above ground | - |
sealevelpressure | Mean sea level | - |
precipitation | Surface | - |
snowfraction | Surface | - |
winddirection | 10 m above ground | - |
windspeed | 10 m above ground | - |
relativehumidity | 2 m above ground | - |
soiltemperature_0to7cm | 0 to 7 cm below ground | - |
soilmoisture_0to7cm | 0 to 7 cm below ground | - |
skintemperature | Surface | - |
evapotranspiration | Surface | - |
referenceevapotranspiration_fao | 2 m above ground | - |
dewpointtemperature | 2 m above ground | - |
wetbulbtemperature | 2 m above ground | - |
windspeed_100m | 100 m above ground | - |
winddirection_100m | 100 m above ground | - |
gust | surface | - |
windpower | 100 m above ground | turbineid , numberofturbines |
totalcloudcover | Surface | - |
lowclouds | Low clouds up to 2km above ground | - |
midclouds | Medium high clouds up to 7km above ground | - |
highclouds | High clouds up to 13km above ground | - |
sunshinetime | Surface | - |
ghi_backwards | Surface | - |
dif_backwards | Surface | - |
dni_backwards | Surface | - |
pvpower_backwards | Surface | slope , facing , kwp , power_efficiency , tracker |
Weather Variable Units
The API supports all common units as specified in the following table. The desired unit can be defined in the API request. If it is not defined, data will be delivered in the default unit.
Weather Variable | Example | Default | Available units |
---|---|---|---|
Temperature | &temperature=C | °C | C, K, F |
Precipitation | &precipitationamount=inch | mm | mm, inch |
Wind speed | &windspeed=bft | m/s | m/s, km/h, mph, kn, bft |
Wind direction | &winddirection=2char | degree | degree, 2char, 3char |
Time formats | &timeformat=YMD | iso8601 | iso8601, timestamp_utc, timestamp_ms_utc, YMD, Y-M-D |
If you have used the previous version of this API (history packages), we recommend requesting NEMSAUTO data to ensure that you have a consistent time series from the same data source. This dataset is built up through archiving the raw weather model output from the NEMS model with the highest spatial resolution once a day (forecast hours 12 through 36).
Sample API-URL to retrieve NEMSAUTO data:
https://my.meteoblue.com/history/point?start=2022-11-01&end=2022-11-02&lat=47.1&lon=8.6&variable=temperature&domain=NEMSAUTO&apikey=APIKEY
Climate Data Packages
The climate data packages are giving back long term averages of the last 35 years to describe the climate conditions of a specific location.
Modelclimate
The Modelclimate data package contains climate simulation data of the last 35 years.
Variable | Units | Description |
---|---|---|
Precipitation monthly mean | mm, inch | |
Temperature monthly mean | °C, °F | |
Temperature mean monthly max | °C, °F | "Hot days" |
Temperature mean monthly min | °C, °F | "Cold days" |
Temperature mean daily max | °C, °F | |
Temperature mean daily min | °C, °F | |
Wind speed monthly mean | m/s, km/h, kn, mph, bf | |
Wind speed mean monthly max | m/s, km/h, kn, mph, bf | "Windy days" |
Wind speed mean monthly min | m/s, km/h, kn, mph, bf | |
Wind speed mean daily max | m/s, km/h, kn, mph, bf | |
Wind speed mean daily min | m/s, km/h, kn, mph, bf | |
Precipitation days monthly mean | 0 - 31 | Number of days with more than 0.2 mm precipitation |
Snow days monthly mean | 0 - 31 | |
Frost days monthly mean | 0 - 31 | Number of days with temperatures below 0°C |
Sunshine days monthly mean | 0 - 31 | Number of sunshine days per month |
Cloudy days monthly mean | 0 - 31 | Number of cloudy days per month |
Overcast days monthly mean | 0 - 31 | Number of overcast days per month |
Climate Wind Rose
The Climate Wind Rose data package contains historical data of wind speed and direction over 30 years, and describes how many hours per year the wind blows from the indicated direction and at the indicated speed. The data is accumulated from 30 years of historical weather simulation data from the global meteoblue model NEMSGLOBAL, which has a resolution of 30km.
Example SW: Wind is blowing from South-West (SW) to North-East (NE).
Example URL: http://my.meteoblue.com/yearlyarchive/windrose?lat=47.558&lon=7.573&format=json&apikey=DEMOKEY