- Station Observations: Weather Station Identifiers | Find Station | Behavior on missing or invalid data | Example queries
- MOS Forecasts: Find MOS Station | Available MOS weather parameters | Example MOS queries
Station Observations
The Meteomatics Weather API provides a wide selection of weather station data around the globe.
In order to query data from weather stations, the source has to be set to mix-obs
.
api.meteomatics.com/validdatetime/parameters/station_id/format?source=mix-obs&optionals
Weather Station Identifiers
There are several possibilities to specify the desired station_id. Either coordinates or specific WMO, METAR, AMDA or CH station codes can be used. Additionally, it is possible to query the station data by using a unique ID generated by Meteomatics. If you choose coordinates, the data from the nearest station is retrieved.Identifier | Description | Example |
---|---|---|
WMO ID | wmo_<wmo_id> |
wmo_066810 is St. Gallen |
METAR ID | metar_<metar_id> |
metar_LSZH is Zurich Airport |
AMDA ID | amda_<amda_id> |
amda_P100 is Kahl/Main |
MCH ID | mch_<mch_id> |
mch_LUG is Lugano |
MM unique ID | <mmuid> |
1463524709 is Zurich Airport |
Find Station
It is possible to get a list of available weather stations from which you can select the desired station identifiers. Several conditions can be specified in order to filter the list of stations. The output is a sorted list of stations matching the specified conditions. The output format is CSV.
api.meteomatics.com/find_station?<conditions>Available conditions:
Identifier | Description | Example |
---|---|---|
location |
Coordinates: location=<lat>,<lon> , or bounding box location=<lat_max>,<lon_min>_<lat_min>,<lon_max> |
location=47.3,9.3 , location=47.3,9.3_40,10 , location=germany |
elevation |
in meters ASL: elevation=<elevation> |
elevation=2500 |
parameters |
parameters=<comma separated parameter list> |
parameters=t_2m:C,wind_speed_10m:ms |
startdate |
the earliest time you are interested in: startdate=<iso timestamp> |
startdate=2017-10-01T00Z |
enddate |
the latest time you are interested in: enddate=<iso timestamp> |
enddate=2017-11-01T00Z |
-
Query for all stations on the globe no matter which parameters are measured:
https://api.meteomatics.com/find_station -
Query for all stations in Germany that measure precipitation at a height of approximately 300 m above sea level. The vertical offset from the selected height is given in a separate column Vertical Distance in the output:
https://api.meteomatics.com/find_station?location=germany&parameters=precip_1h:mm&elevation=300 -
Find a station for a coordinate that measures temperature at least since Jan 1st, 2018. The horizontal offset from the selected coordinate is given in meter in a separate column Horizontal Distance in the output:
https://api.meteomatics.com/find_station?location=50.705502,10.467007¶meters=t_2m:C&startdate=2018-01-01T00:00:00Z
Station Category;Station Type;ID Hash;WMO ID;Alternative IDs;Name;Location Lat,Lon;Elevation;Start Date;End Date;Horizontal Distance;Vertical Distance;Effective Distance
SYNOP;SYNO;15890694;;WIT;Wittnau;47.4804,7.96853;463m;2018-05-09T06:30:00Z;2021-01-27T07:20:00Z;-999;-999;-999
SYNOP;SYNO;20701173;;VSBAS;Baltschiedertal;46.3423,7.87933;1318m;2018-05-09T06:30:00Z;2021-01-27T07:20:00Z;-999;-999;-999
SYNOP;SYNO;21270887;;SUA;Schaan / Untere Au;47.187,9.49068;444m;2018-05-09T06:30:00Z;2021-01-27T07:20:00Z;-999;-999;-999
SYNOP;SYNO;28461974;;COM;Acquarossa/Comprovasco;46.4594,8.93565;575m;2017-02-28T23:00:00Z;2021-01-27T07:20:00Z;-999;-999;-999
SYNOP;SYNO;30633461;;ABG;L'Abergement;67.0104,19.1171;647m;2017-12-03T06:00:00Z;2021-01-26T06:00:00Z;-999;-999;-999
SYNOP;SYNO;45286347;;KUB;Küblis;69.0449,20.1069;839m;2017-12-03T06:00:00Z;2021-01-26T06:00:00Z;-999;-999;-999
SYNOP;SYNO;75006491;;TEU;Teufen, AR;68.7279,21.124;834m;2017-12-03T06:00:00Z;2021-01-26T06:00:00Z;-999;-999;-999
SYNOP;SYNO;77175386;;ZWE;Zweisimmen;46.5506,7.38479;1015m;2018-05-09T06:30:00Z;2021-01-27T07:20:00Z;-999;-999;-999
...
Behavior on missing or invalid data
It is possible to specify the treatment of missing station values. Therefore, the optionon_invalid
has to be added to the query.
Identifier | Description |
---|---|
fail |
Send an error message as soon as data is missing (default) |
fill_with_invalid |
Replace invalid and missing data by -999. |
Example queries
-
Query for the station observations for Bern via WMO ID:
http://api.meteomatics.com/yesterday_replaceT00Z--today_replaceT00Z:PT1H/t_2m:C,wind_speed_10m:ms/wmo_066300/html?source=mix-obs&on_invalid=fill_with_invalid -
Query for the station observations for Zurich airpot via METAR ID:
http://api.meteomatics.com/yesterday_replaceT00Z--today_replaceT00Z:PT1H/t_2m:C,wind_speed_10m:ms/metar_LSZH/html?source=mix-obs&on_invalid=fill_with_invalid
MOS Forecasts
Model Output Statistics (MOS) is a statistical procedure in modern weather forecasting that uses multiple linear regression where predictants, such as air temperature and wind speed, are statistically linked to predictors. These predictors are forecasts from numerical weather prediction models and recent station observations. The MOS forecasts are updated each 30 minutes and have a lead time of 15 days with a temporal resolution of 1 hour.
In order to query MOS forecast data, the source has to be set to mm-mos
.
api.meteomatics.com/validdatetime/parameters/station_id/format?source=mm-mos&optionals
The station_id can be specified in the same way as for observational data (Station identifiers).
Find MOS Station
It is possible to get a list of available weather stations for which MOS forecasts are computed. Additional conditions can be specified in the same way as for observational data (Conditions). The output format is CSV.
api.meteomatics.com/find_station?<conditions>&source=mm-mosExamples
-
Query for all stations on the globe for which MOS is available:
https://api.meteomatics.com/find_station?source=mm-mos -
Query for all stations in Germany that offer MOS prognoses for precipitation at a height of approximately 300 m above sea level. The vertical offset from the selected height is given in a separate column Vertical Distance in the output:
https://api.meteomatics.com/find_station?location=germany&parameters=precip_1h:mm&elevation=300&source=mm-mos -
Find a station for a coordinate for which MOS forecasts are available for temperature at least since July 1st, 2020. The horizontal offset from the selected coordinate is given in meter in a separate column Horizontal Distance in the output:
https://api.meteomatics.com/find_station?location=50.705502,10.467007¶meters=t_2m:C&startdate=2020-07-01T00:00:00Z&source=mm-mos
Station Category;Station Type;ID Hash;WMO ID;Alternative IDs;Name;Location Lat,Lon;Elevation;Start Date;End Date;Horizontal Distance;Vertical Distance;Effective Distance
MOS;MM_MOS_MIX;455835681;;M520;Waltershausen;50.9,10.55;348m;2020-06-30T00:00:00Z;2021-02-11T00:00:00Z;22424.4;10;26141.9
MOS;MM_MOS_MIX;502424534;;M405;Moorgrund Gräfen-Nitzendorf;50.84,10.25;283m;2020-06-30T00:00:00Z;2021-02-11T00:00:00Z;21390;-55;41836.1
MOS;MM_MOS_MIX;4291112865;;P022;Ostheim v.d. Rhön;50.45,10.22;312m;2020-06-30T00:00:00Z;2021-02-11T00:00:00Z;33373.8;-26;43039.2
MOS;MM_MOS_MIX;924681386;105400;eisenach;Eisenach;51,10.3667;312m;2020-06-30T00:00:00Z;2021-02-11T00:00:00Z;33532;-26;43197.4
MOS;MM_MOS_MIX;2539813639;105540;EDDE;Erfurt/Bindersleben;50.9833,10.9667;322m;2020-06-30T00:00:00Z;2021-02-11T00:00:00Z;46796;-16;52744
MOS;MM_MOS_MIX;1764950915;;L592;Tann/Rhön;50.64,10.02;395m;2020-06-30T00:00:00Z;2021-02-11T00:00:00Z;32367;57;53556.6
MOS;MM_MOS_MIX;880908551;;P032;Aubstadt;50.33,10.45;304m;2020-06-30T00:00:00Z;2021-02-11T00:00:00Z;41817.1;-34;54456.5
MOS;MM_MOS_MIX;1190700299;106710;coburg_lautertal_oberlauter;Coburg/Lautertal-Oberlauter;50.31,10.97;344m;2020-06-30T00:00:00Z;2021-02-11T00:00:00Z;56624.1;6;58854.6
MOS;MM_MOS_MIX;2890740297;105480;meiningen;Meiningen;50.5667,10.3833;453m;2020-06-30T00:00:00Z;2021-02-11T00:00:00Z;16542.7;115;59293.6
...
Available MOS weather parameters
The weather parameters for which a MOS forecast can be queried, depends on the parameters that are recorded at the desired weather station. For a general overview of available MOS weather parameters, please see: available MOS parameters
Example MOS queries
-
Query MOS forecast for temperature for Paris via WMO ID:
http://api.meteomatics.com/today_replaceT00Z--__replace__3T00Z:PT1H/t_2m:C/wmo_071570/html?source=mm-mos -
Query MOS forecast for temperature for London Heathrow via METAR ID:
http://api.meteomatics.com/today_replaceT00Z--__replace__3T00Z:PT1H/t_2m:C/metar_EGLL/html?source=mm-mos