Optional Parameters
Overview
Optional parameters can be attached to the query string as follows:https://...?option_name=<option_value>&...
The following table describes the optional parameters:
Option | Description | Value | Example |
---|---|---|---|
source |
This parameter is used to select a specific source for weather data. | String. Default: mix |
ecmwf-ifs or ncep-gfs or ukmo-euro4 |
calibrated |
This option enables the calibration of historical and nowcast (first 6 hours of forecast) data with actual station measurements. The influence of a station at a certain location decreases with increasing distance from the station. | true , false Default is false |
|
mask |
Mask a parameter to only be valid on land or sea. | land , sea |
|
ens_select |
When explicitly requesting data based on an ensemble model using the 'model' parameter (e.g. ecmwf-ens), you can specify the member or aggregate to return via this parameter. | String. Default: member:0 (control run) |
member:1-50 , member:1 , median , mean , spread , quantile0.3 , quantile0.9 |
cluster_select |
By using ecmwf-ens-cluster , you can query cluster data based on ECMWF. |
String. No default. | cluster:1 , cluster:1-6 |
timeout |
A timeout (in seconds) after which the API will answer with a timeout message if it hasn't yet finished treating the query. The timeout cannot be increased above its default value. | Integer. Default: 300 (30 for WMS/WFS-Queries), Maximum is 300. | 10 , 60 |
route |
Request weather data along a time/space dependent route as specified here. | true , false |
Source Selection
The data described in the API is based on different models and combined in an intelligent mix so that the best data source is chosen for each time and location. The available data sources are:Global Weather Forecasting Models
Identifier | Description |
---|---|
mix |
The Meteomatics Mix combines different models and sources into an intelligent blend, such that the best data source is chosen for each time and location. The length of the forecasting period as well as the spatial resolution depends on the model from which the requested parameters originate.
spatial resolution: up to 0.0012° (~90 m) temporal resolution: up to 5 minutes lead time: variable updates per day: variable |
ecmwf-ifs |
Enhanced downscaled model data based on the European Center for Medium-Range Weather Forecasts' (ECMWF) Integrated Forecasting System (IFS), which is the world's leading atmospheric global circulation model that describes the dynamical evolution of the atmosphere worldwide and is used for medium-range forecasts. The downscaling improves the coarse grid native representation down to a resolution of 90m. This is achieved by applying high-resolution land usage data, soil, terrain data, astronomical computations & other sources.
spatial resolution: 0.0012° (~90 m) temporal resolution: up to 1 hour lead time: 10 days (6 and 18 UTC up to 90 hours) updates per day: 4 |
ecmwf-ens |
Enhanced downscaled model data based on the Ensemble Prediction System (EPS) of ECMWF. EPS is a system that is used to predict forecast confidence. Uncertainties in the initial conditions are represented by creating a set of 50 forecasts (ensemble members) with slightly different initial conditions. The downscaling improves the coarse grid native representation down to a resolution of 90m. This is achieved by applying high-resolution land usage data, soil, terrain data, astronomical computations & other sources.
spatial resolution: 0.0012° (~90 m) temporal resolution: up to 3 hours lead time: 15 days (6 and 18 UTC up to 144 hours) updates per day: 4 |
ecmwf-ens-cluster |
Daily clustering data of the forecast fields based on the ECMWF ensemble data. The clustering is performed according to a set of fixed climatological regimes for each season, computed using 29 years of reanalysis data.
spatial resolution: 1.5° (~114 km) temporal resolution: 12 hours lead time: 15 days updates per day: 2 |
ecmwf-ens-tc |
Ensemble model data for tropical cyclones (tropical depressions, tropical storms, hurricanes and typhoons) based on data provided by ECMWF.
spatial resolution: 0.1° (~7.6 km) temporal resolution: 6 hours lead time: 10 days updates per day: 2 |
ecmwf-vareps |
Enhanced downscaled long-range ensemble forecast based on data provided by ECMWF. The downscaling improves the coarse grid native representation down to a resolution of 90m. This is achieved by applying high-resolution land usage data, soil, terrain data, astronomical computations & other sources.
spatial resolution: 0.0012° (~90 m) temporal resolution: up to 3 hours lead time: 46 days updates per week: 2 |
ecmwf-mmsf |
Downscaled long-range seasonal forecast based on data provided by ECMWF. The downscaling improves the coarse grid native representation down to a resolution of 90m. This is achieved by applying high-resolution land usage data, soil, terrain data, astronomical computations & other sources.
spatial resolution: 0.0012° (~90 m) temporal resolution: 6 hours lead time: 7 months updates per month: 1 |
cmc-gem |
Enahnced downscaled model data based on the Global Environmental Multiscale model operated by the Canadian Meteorological Center. The downscaling improves the coarse grid native representation down to a resolution of 90m. This is achieved by applying high-resolution land usage data, soil, terrain data, astronomical computations & other sources.
spatial resolution: 0.0012° (~90 m) temporal resolution: 3 hours lead time: 6 days updates per day: 2 |
ncep-gfs |
Enhanced downscaled model data based on the Global Forecasting System by the National Centers for Environmental Prediction (NCEP). The downscaling improves the coarse grid native representation down to a resolution of 90m. This is achieved by applying high-resolution land usage data, soil, terrain data, astronomical computations & other sources.
spatial resolution: 0.0012° (~90 m) temporal resolution: 3 hours lead time: 16 days updates per day: 4 |
ncep-gfs-ens |
Ensemble model data of the Global Forecasting System by NCEP. The GEFS attempts to quantify the amount of uncertainty in a forecast by generating an ensemble of 31 members, each perturbed from the original observations.
spatial resolution: 0.5° (~38 km) temporal resolution: 3 hours lead time: 16 days updates per day: 4 |
mm-tides |
Tidal amplitude simulation by Meteomatics.
spatial resolution: 0.125° (~9.5 km) temporal resolution: 1 minute |
Examples |
|
European Weather Models
Identifier | Description |
---|---|
mm-swiss1k |
High-resolution model for Switzerland designed by Meteomatics.
spatial resolution: 0.01° (~760 m) temporal resolution: 20 minutes lead time: 3 days updates per day: 4 |
ukmo-euro4 |
Enhanced downscaled model data based on forecast data provided by the European model by the UK MetOffice. The downscaling improves the coarse grid native representation down to a resolution of 90m. This is achieved by applying high-resolution land usage data, soil, terrain data, astronomical computations & other sources.
spatial resolution: 0.0012° (~90 m) temporal resolution: 1 hour lead time: 54 hours updates per day: 4 |
mf-arome |
Regional model by Meteo France. The resolution of the model depends on the parameter.
spatial resolution: 0.01° - 0.025° (~760 m - 1900 m) temporal resolution: 1 hour lead time: 42 hours updates per day: 5 |
Atmospheric pollutants and other chemical compounds
Identifier | Description |
---|---|
ecmwf-cams |
Atmospheric data based on Copernicus Atmosphere Monitoring Service by the ECMWF. CAMS is one of six services that form Copernicus (Earth observation program of the European Union). Copernicus offers information services based on satellite Earth observation, in situ (non-satellite) data and modeling. CAMS provides global forecasts of aerosols, atmospheric pollutants, greenhouse gases, stratospheric ozone and the UV-Index.
spatial resolution: 0.4° (~30.4 km) temporal resolution: up to 1 hour lead time: 5 days updates per day: 2 |
fmi-silam |
System for Integrated Modeling of Atmospheric Composition by the Finnish Meteorological Institute for Europe.
spatial resolution: 0.1° (~7.6 km) temporal resolution: up to 1 hour lead time: 2 days updates per day: 4 |
Oceanic models
Identifier | Description |
---|---|
ecmwf-wam |
Enhanced oceanic data based on the ECMWF Ocean Wave Model, which is a global model that describes the development and evolution of wind generated surface waves and their height, direction and period. Since it does not dynamically model the ocean itself, it is coupled to the atmospheric forecast model and to the ocean model. The output is enhanced by incorporating a more detailed bathymetry as well as highly resolved coastlines (resolution of 90 - 200 m).
spatial resolution: 0.125° (~9.5 km) temporal resolution: 3 hours lead time: 10 days updates per day: 2 |
noaa-hycom |
The NOAA Hybrid Coordinate Ocean Model provides forecasts for several wave parameters. The hybrid coordinate approach proved to be feasible for handling deep and shallow water regions throughout the annual heating/cooling cycle.
spatial resolution: 0.08° (~6084 m) temporal resolution: 3 hours lead time: 7 days updates per day: 1 |
Global Reanalysis
Identifier | Description |
---|---|
ecmwf-era5 |
Enhanced downscaled reanalysis data based on ERA5, which is a global atmospheric reanalysis from 1979 to present, continuously updated in real time. ERA5 combines vast amounts of historical observations into global estimates using advanced modeling and data assimilation systems. The downscaling improves the coarse grid native representation down to a resolution of 90m. This is achieved by applying high-resolution land usage data, soil, terrain data, astronomical computations & other sources.
spatial resolution: 0.0012° (~90 m) temporal resolution: 1 hour |
chc-chirps2 |
Rainfall hindcast from rain gauge and satellite observations from 1981 until present.
spatial resolution: 0.05° (~5 km) temporal resolution: 24 hours |
Radar, Satellite and Remote Sensing
Identifier | Description |
---|---|
mix-radar |
Composite of precipitation radar from various sources (e.g. NOAA, DWD, ...) including nowcasting.
spatial resolution: 0.014° (~1 km) temporal resolution: 5 minutes lead time: 2 hours |
mm-heliosat |
Satellite-based cloud and radiation forecast for Europe by Meteomatics.
spatial resolution: 0.014° (~1 km) temporal resolution: 5 minutes lead time: 3 hours |
mm-lightning |
Lightning measurements and nowcast for central Europe.
temporal resolution: 5 minutes lead time: 2 hours |
nasa-srtm |
90 m resolution topography by NASA.
spatial resolution: 0.0012° (~90 m) |
noaa-swpc |
Geomagnetic activity observation and forecast by NOAA.
temporal resolution: 3 hours lead time: 2 days updates per day: 2 |
mix-satellite |
Meteomatics satellite composite comprising geostationary satellite images of GOES 16, GOES 17, Himawari8, Meteosat 8, Meteosat 11 and Meteosat MSG. RGB and IR channels are available.
temporal resolution: 5 - 15 minutes spatial resolution: 1 - 3 km |
eumetsat-h03b |
Based on IR satellite images from the SEVIRI instrument, instantaneous precipitation charts are generated.
temporal resolution: 15 minutes spatial resolution: 3 km near sub-satellite point | 8 km on average over Europe |
dlr-corine |
CORINE land cover (CLC) is a data set for land usage in Europe. There are 44 land usage classes.
spatial resolution: 10 ha minimum mapping unit spatial extent: Europe |
Examples | https://api.meteomatics.com/__replace__0T00Z/sat_ir_039:idx/switzerland:0.01,0.01/html?source=mix-satellite https://api.meteomatics.com/__replace__0T00Z/precip_5min:mm/switzerland:0.01,0.01/html?source=mix-radar |
Station observations & MOS prognoses
Identifier | Description |
---|---|
mix-obs |
Observational data from weather stations (some restrictions to formats might apply). Present data and historical data are available. Further details concerning the selection of stations can be found at Weather Station Identifiers. It is also recommended to specify the treatment of missing data (Behavior on missing or invalid Data). |
mm-mos |
MOS (Model Output Statistics) based on observational data from weather stations.
temporal resolution: 1 hour lead time: 15 days updates per hour: 2 |
Examples | http://api.meteomatics.com/__replace__1T00Z--__replace__0T00Z:PT1H/t_2m:C,wind_speed_10m:ms/wmo_066810/html?model=mix-obs&on_invalid=fill_with_invalid http://api.meteomatics.com/__replace__0T00ZP5D:PT1H/t_2m:C,wind_speed_10m:ms/wmo_066810/html?model=mm-mos |
Climate Scenarios
Identifier | Description |
---|---|
mri-esm2-ssp126 |
Downscaled climate data for Scenario 1 covering the period from 2015 until 2100 provided by the Meteorological Research Institute Earth System Model Version 2.0.
spatial resolution: 0.0012° (~90 m) temporal resolution: 3 hours |
mri-esm2-ssp245 |
Downscaled climate data for Scenario 2 covering the period from 2015 until 2100 provided by the Meteorological Research Institute Earth System Model Version 2.0.
spatial resolution: 0.0012° (~90 m) temporal resolution: 3 hours |
mri-esm2-ssp370 |
Downscaled climate data for Scenario 3 covering the period from 2015 until 2100 provided by the Meteorological Research Institute Earth System Model Version 2.0.
spatial resolution: 0.0012° (~90 m) temporal resolution: 3 hours |
mri-esm2-ssp460 |
Downscaled climate data for Scenario 4 covering the period from 2015 until 2100 provided by the Meteorological Research Institute Earth System Model Version 2.0.
spatial resolution: 0.0012° (~90 m) temporal resolution: 3 hours |
mri-esm2-ssp585 |
Downscaled climate data for Scenario 5 covering the period from 2015 until 2100 provided by the Meteorological Research Institute Earth System Model Version 2.0.
spatial resolution: 0.0012° (~90 m) temporal resolution: 3 hours |
Behavior on missing or invalid Data
This section describes the options on what to do if data is missing (this currently only applies to sourcemix-obs
):
on_invalid
parameter:
Identifier | Description |
---|---|
fail |
Send an error message as soon as data is missing, instead of the incomplete data. (default) |
fill_with_invalid |
Replace invalid data by -999 and still send the whole time series. |
Ensemble Member Selection
For ensemble models we provide each individual member, as well as mean, median, quantiles, and other basic statistical parameters. They can be queried with the optional parameter 'ens_select'. Possible values are:Identifier | Description |
---|---|
member:5 |
Single Member 5 |
member:1-50 |
All members between 1 and 50 |
member:0 |
Control run (default if nothing else specified) |
mean |
Arithmetic mean |
median |
Median |
quantile0.2 |
The 0.2 quantile (any value between 0 and 1) |

Cluster Selection
For the ensemble cluster products a specific cluster can be queried. The available clusters can be queried using the parameternumber_of_clusters:x
(refer to Cluster Parameters
).
Available cluster_select
parameters:
Identifier | Description |
---|---|
cluster:4 |
Single cluster 4 |
cluster:1-6 |
All clusters between 1 and 6 |
Route Queries
The route query allows you to query the weather along your travel route. You need to provide a list of times (see time description) and a list of locations (Polyline or Point list may come in handy), both of the same length. The route query has to include the optional flag&route=true
. Currently available output formats are csv
, json
and xml
.
Examples:
The following 3 examples query all the same data in different output formats and with different input specifications, where we are in St. Gallen at 12:00Z, Winterthur at 13:00Z, Zurich at 14:00Z and in Bern at 15:00Z:
https://api.meteomatics.com/__replace__0T12Z,__replace__0T13Z,__replace__0T14Z,__replace__0T15Z/t_2m:C,precip_1h:mm,sunshine_duration_1h:min/47.423938,9.3728583+47.499419,8.7265173+47.3819673,8.5306616+46.949911,7.4300993/xml?route=true
<xml version="1.0" encoding="UTF-8">
<meteomatics-api-response version="3.0">
<user>meteomatics</user>
<dategenerated>2019-05-02T11:45:40Z</dategenerated>
<status>OK</status>
<data>
<location lat="47.4239" lon="9.37286" date="2019-05-02T12:00:00Z">
<parameter name="t_2m:C">15.7</parameter>
<parameter name="precip_1h:mm">0.00</parameter>
<parameter name="sunshine_duration_1h:min">0.0</parameter>
</location>
<location lat="47.4994" lon="8.72652" date="2019-05-02T13:00:00Z">
<parameter name="t_2m:C">15.2</parameter>
<parameter name="precip_1h:mm">0.00</parameter>
<parameter name="sunshine_duration_1h:min">0.0</parameter>
</location>
<location lat="47.382" lon="8.53066" date="2019-05-02T14:00:00Z">
<parameter name="t_2m:C">12.8</parameter>
<parameter name="precip_1h:mm">0.45</parameter>
<parameter name="sunshine_duration_1h:min">0.0</parameter>
</location>
<location lat="46.9499" lon="7.4301" date="2019-05-02T15:00:00Z">
<parameter name="t_2m:C">13.2</parameter>
<parameter name="precip_1h:mm">0.00</parameter>
<parameter name="sunshine_duration_1h:min">0.2</parameter>
</location>
</data></meteomatics-api-response>
Instead of using coordinates explicitly, you can choose your locations by postal code. In this example the output format is json
:
https://api.meteomatics.com/__replace__0T12Z,__replace__0T13Z,__replace__0T14Z,__replace__0T15Z/t_2m:C,precip_1h:mm,sunshine_duration_1h:min/postal_CH9000+postal_CH8400+postal_CH8000+postal_CH3000/json?route=true
{ "version": "3.0", "user": "meteomatics", "dateGenerated": "2019-04-16T12:20:30Z", "status": "OK", "data": [ { "station_id": "postal_CH9000", "date": "2019-04-16T12:00:00Z", "parameters": [ { "parameter": "t_2m:C", "value": 12.3 }, { "parameter": "precip_1h:mm", "value": 0.00 }, { "parameter": "sunshine_duration_1h:min", "value": 0.0 } ] }, { "station_id": "postal_CH8400", "date": "2019-04-16T13:00:00Z", "parameters": [ { "parameter": "t_2m:C", "value": 13.7 }, { "parameter": "precip_1h:mm", "value": 0.00 }, { "parameter": "sunshine_duration_1h:min", "value": 0.0 } ] }, { "station_id": "postal_CH8000", "date": "2019-04-16T14:00:00Z", "parameters": [ { "parameter": "t_2m:C", "value": 12.7 }, { "parameter": "precip_1h:mm", "value": 0.00 }, { "parameter": "sunshine_duration_1h:min", "value": 0.0 } ] }, { "station_id": "postal_CH3000", "date": "2019-04-16T15:00:00Z", "parameters": [ { "parameter": "t_2m:C", "value": 9.2 }, { "parameter": "precip_1h:mm", "value": 0.04 }, { "parameter": "sunshine_duration_1h:min", "value": 0.0 } ] } ] }If you like to work with
csv
, just change the output format:
https://api.meteomatics.com/__replace__0T12ZPT3H:PT1H/t_2m:C,precip_1h:mm,sunshine_duration_1h:min/postal_CH9000+postal_CH8400+postal_CH8000+postal_CH3000/csv?route=true
station_id;validdate;t_2m:C;precip_1h:mm;sunshine_duration_1h:min postal_CH9000;2019-04-16T12:00:00Z;12.3;0.00;0.0 postal_CH8400;2019-04-16T13:00:00Z;13.7;0.00;0.0 postal_CH8000;2019-04-16T14:00:00Z;12.7;0.00;0.0 postal_CH3000;2019-04-16T15:00:00Z;9.2;0.04;0.0You can also specify the starting and ending point of your route and the increments in-between to get the data along a line https://api.meteomatics.com/__replace__0T12ZPT1H:PT5M/t_2m:C,precip_10min:mm,wind_speed_10m:ms,elevation:m/47,9_45,7:13/json?route=true or if you like a route consisting of several lines (s. Polylines): https://api.meteomatics.com/__replace__0T12ZPT1H:PT20M,__replace__0T13ZPT2H:PT30M/t_2m:C,wind_speed_10m:ms/47,9_45,7:4+45,8:6/xml?route=true
Other Examples
A shipping route example is shown below. It starts in Southhampton, followed by Cherbourg, then Queenstown, and a final stop in New York. Along the route the significant wave height was examined where the red color corresponds to high waves and blue to low wave heights.
<?xml version="1.0" encoding="UTF-8"?>
<meteomatics-api-response version="3.0">
<user>meteomatics</user>
<dateGenerated>2019-05-02T11:42:57Z</dateGenerated>
<status>OK</status>
<data>
<location lat="50.8978" lon="-1.4241" date="2019-04-10T14:00:00Z">
<parameter name="significant_wave_height:m">-999</parameter>
<parameter name="wind_speed_10m:ms">4.3</parameter>
<parameter name="wind_dir_10m:d">46.5</parameter>
</location>
<location lat="50.8943" lon="-1.4072" date="2019-04-10T15:00:00Z">
<parameter name="significant_wave_height:m">-999</parameter>
<parameter name="wind_speed_10m:ms">4.0</parameter>
<parameter name="wind_dir_10m:d">47.0</parameter>
</location>
...
<location lat="40.6719" lon="-74.0826" date="2019-04-18T18:00:00Z">
<parameter name="significant_wave_height:m">-999</parameter>
<parameter name="wind_speed_10m:ms">5.9</parameter>
<parameter name="wind_dir_10m:d">134.8</parameter>
</location>
<location lat="40.6637" lon="-74.0896" date="2019-04-18T19:00:00Z">
<parameter name="significant_wave_height:m">-999</parameter>
<parameter name="wind_speed_10m:ms">5.5</parameter>
<parameter name="wind_dir_10m:d">115.2</parameter>
</location>
</data>
</meteomatics-api-response>
This example represents the highway A1 between St. Gallen and Bern. The temperature along the route is shown in the figure where red corresponds to high values and green to low temperatures.

<?xml version="1.0" encoding="UTF-8"?>
<meteomatics-api-response version="3.0">
<user>meteomatics</user>
<dateGenerated>2019-05-02T11:54:37Z</dateGenerated>
<status>OK</status>
<data>
<location lat="47.4318" lon="9.37355" date="2019-04-25T06:30:00Z">
<parameter name="t_2m:C">13.5</parameter>
<parameter name="wind_speed_10m:ms">4.6</parameter>
</location>
<location lat="47.4202" lon="9.33235" date="2019-04-25T06:32:10Z">
<parameter name="t_2m:C">12.8</parameter>
<parameter name="wind_speed_10m:ms">1.8</parameter>
</location>
...
<location lat="46.9964" lon="7.50299" date="2019-04-25T09:35:00Z">
<parameter name="t_2m:C">13.2</parameter>
<parameter name="wind_speed_10m:ms">4.6</parameter>
</location>
<location lat="46.9533" lon="7.4563" date="2019-04-25T09:43:00Z">
<parameter name="t_2m:C">16.6</parameter>
<parameter name="wind_speed_10m:ms">6.5</parameter>
</location>
</data>
</meteomatics-api-response>
Polygon Queries
The polygon query facilitates the selection of arbitrary areas all around the globe. You can query any weather parameter for the selected polygon and obtain mean, median, minimum or maximum values.
The query can be either performed for a single point in time or for a time range (see time description). In order to define the polygon, you need to provide the desired vertices (latitude, longitude). You can decide how many vertices are used. Currently available output formats are csv
, json
and xml
.
The basic structure of the query is:
api.meteomatics.com/validdatetime/parameters/lat1,lon1_lat2,lon2_..._latN,lonN:aggregate/format?optionals
Available aggregate
options are:
Identifier | Description |
---|---|
min |
Find the minimum value |
max |
Find the maximum value |
mean |
Compute the mean |
median |
Compute the median |
mode |
Compute the mode (most frequent value) |
Available related optionals
are:
Identifier | Available values | Description |
---|---|---|
polygon_sampling |
adaptive_grid |
Adaptive sampling of the grid choosing the resolution based on the polygon size. (Default) |
model_grid |
Sample only values from the native model grid. Note that this needs a model to be specified (e.g. &model=ncep-gfs ) |
Examples:
The following examples demonstrate different applications of the polygon query:
In the first example a polygon is selected that encompasses the canton of Thurgau. The chosen parameters are temperature, surface pressure and wind speed. This query computes the mean hourly values for the entire polygon from today at 12 UTC until tomorrow 12 UTC. The output format is csv
:
https://api.meteomatics.com/__replace__0T12ZP1D:PT1H/t_2m:C,sfc_pressure:hPa,wind_speed_10m:ms/47.376,8.94493_47.4838,9.0136_47.4903,9.4559_47.6626,9.15642_47.6839,8.67025:mean/csv
validdate;t_2m:C;sfc_pressure:hPa;wind_speed_10m:ms 2019-05-15T12:00:00Z;9.7;959.7;8.3 2019-05-15T13:00:00Z;9.9;959.4;8.5 2019-05-15T14:00:00Z;9.8;959.1;8.6 2019-05-15T15:00:00Z;9.4;959.0;8.3 2019-05-15T16:00:00Z;8.6;959.1;7.9 2019-05-15T17:00:00Z;7.7;959.4;7.3 2019-05-15T18:00:00Z;6.7;959.0;6.5 2019-05-15T19:00:00Z;5.6;959.2;5.5 2019-05-15T20:00:00Z;5.0;959.1;5.1 2019-05-15T21:00:00Z;4.5;959.0;5.1 2019-05-15T22:00:00Z;4.2;958.5;4.7 2019-05-15T23:00:00Z;4.0;957.9;4.7 2019-05-16T00:00:00Z;4.0;957.4;4.5 2019-05-16T01:00:00Z;4.2;956.8;4.8 2019-05-16T02:00:00Z;4.1;956.2;4.8 2019-05-16T03:00:00Z;4.1;955.6;4.8 2019-05-16T04:00:00Z;4.0;955.8;4.7 2019-05-16T05:00:00Z;4.0;955.7;4.5 2019-05-16T06:00:00Z;4.4;955.5;4.5 2019-05-16T07:00:00Z;5.3;955.0;4.4 2019-05-16T08:00:00Z;6.2;954.5;4.4 2019-05-16T09:00:00Z;7.2;954.0;4.1 2019-05-16T10:00:00Z;8.3;953.7;3.6 2019-05-16T11:00:00Z;9.2;953.3;3.3 2019-05-16T12:00:00Z;10.1;952.8;2.7
The second example demonstrates the selection of two polygons for the same parameters as in the first example. An aggregation method has to be supplied for each polygon. The commands for the single polygons are connected by a +
sign. The polygon of the first example is selected two times, but each with a different aggregation method:
https://api.meteomatics.com/__replace__0T12ZP1D:PT1H/t_2m:C,sfc_pressure:hPa,wind_speed_10m:ms/47.376,8.94493_47.4838,9.0136_47.4903,9.4559_47.6626,9.15642_47.6839,8.67025:mean+47.376,8.94493_47.4838,9.0136_47.4903,9.4559_47.6626,9.15642_47.6839,8.67025:max/csv
station_id;validdate;t_2m:C;sfc_pressure:hPa;wind_speed_10m:ms polygon1;2020-05-07T12:00:00Z;17.0;961.8;3.2 polygon1;2020-05-07T13:00:00Z;17.9;961.4;2.8 polygon1;2020-05-07T14:00:00Z;18.4;961.0;2.3 polygon1;2020-05-07T15:00:00Z;18.6;960.7;1.9 polygon1;2020-05-07T16:00:00Z;18.5;960.5;1.7
In the third example two polygons, in this case rectangles, are selected that are located in the Netherlands/Germany and Switzerland. Note that you can unite two polygons with U
. The chosen parameter is the elevation of the terrain and the aggregation method is min
. So, the result of this query is the minimum elevation within the combined polygons. The output format is xml
.
https://api.meteomatics.com/__replace__0T12Z/elevation:m/52.2,6.6_52.2,7.6_53.2,7.6_53.2,6.6U45.9,7.56_45.9,7.92_46.15,7.92_46.15,7.65:min/xml
<?xml version="1.0" encoding="UTF-8"?>
<meteomatics-api-response version="3.0">
<user>meteomatics</user>
<dateGenerated>2019-05-15T12:33:30Z</dateGenerated>
<status>OK</status>
<data>
<parameter name="elevation:m">
<location station_id="polygon1">
<value date="2019-05-15T12:00:00Z">-5.0</value>
</location>
</parameter>
</data>
</meteomatics-api-response>
The fourth example shows how to cut out one polygon from another. The vertices of the larger polygon are defined first and then those of the cutout polygon (turquoise colored rectangle). The two commands are separated by D
, denoting difference. So, the second polygon is excluded from the first polygon. In this example, Mount Kenya is excluded from the selection. Also, additional polygons could be cut out from the surrounding polygon. The result of this query is the maximum elevation of the area around Mount Kenya. The file format is csv
.
https://api.meteomatics.com/__replace__0T12Z/elevation:m/0.3873,36.9388_-0.791,36.9388_-0.791,37.837_0.3873,37.837D0.0385,37.208_-0.3214,37.208_-0.3214,37.56_0.0385,37.56:max/csv
validdate;elevation:m 2019-05-15T12:00:00Z;3031.0
We revisit the first example to showcase the polygon_sampling
usage:
https://api.meteomatics.com/__replace__0T12ZP1D:PT1H/t_2m:C,sfc_pressure:hPa,wind_speed_10m:ms/47.376,8.94493_47.4838,9.0136_47.4903,9.4559_47.6626,9.15642_47.6839,8.67025:mean/csv?polygon_sampling=model_grid&model=ncep-gfs
validdate;t_2m:C;sfc_pressure:hPa;wind_speed_10m:ms 2020-11-02T12:00:00Z;20.3;959.4;2.0 2020-11-02T13:00:00Z;19.4;959.5;1.8 2020-11-02T14:00:00Z;18.6;959.6;1.5 2020-11-02T15:00:00Z;17.7;959.6;1.3 2020-11-02T16:00:00Z;16.5;960.0;1.5 2020-11-02T17:00:00Z;15.2;960.4;1.8 2020-11-02T18:00:00Z;13.9;960.8;2.0 2020-11-02T19:00:00Z;14.1;961.2;2.1 2020-11-02T20:00:00Z;14.4;961.6;2.2 2020-11-02T21:00:00Z;14.7;962.0;2.3 2020-11-02T22:00:00Z;14.5;962.2;2.5 2020-11-02T23:00:00Z;14.4;962.5;2.7 2020-11-03T00:00:00Z;14.3;962.7;2.9 2020-11-03T01:00:00Z;14.0;962.6;2.6 2020-11-03T02:00:00Z;13.8;962.5;2.2 2020-11-03T03:00:00Z;13.5;962.4;1.9 2020-11-03T04:00:00Z;13.4;962.6;1.7 2020-11-03T05:00:00Z;13.3;962.7;1.5 2020-11-03T06:00:00Z;13.1;962.8;1.3 2020-11-03T07:00:00Z;12.0;963.2;1.7 2020-11-03T08:00:00Z;10.9;963.6;2.1 2020-11-03T09:00:00Z;9.9;964.0;2.5 2020-11-03T10:00:00Z;9.8;963.8;2.1 2020-11-03T11:00:00Z;9.7;963.6;1.8 2020-11-03T12:00:00Z;9.6;963.5;1.4