Custom Request Example
Here is a second example where we pass arguments in the query string in order to customize the forecast.
https://front-remora.greatcircle.be/forecast?token=YOUR_TOKEN_GOES_HERE&longitude=4.533706&latitude=50.711665&variables=wind,temperature&horizon=3.14,d&exclude=minute&extend=hour
The cusomizations are the following :
- we specify
variables=wind,temperature
to indicate that we only care about measures of these 2 categories and we want to ignore the rest - we specify
horizon=3.14,d
to indicate that we want to limit our forecast to the next 3.14 days - we specify
exclude=minute
to indicate that we don't need a minute by minute prediction during the first 3 hours and that an hour by hour prediction is good enough - we specify
extend=hour
to indicate that we want hour spaced predictions and not 3 hours spaced for the last 1.14 days
Reponse
Here is a simplified response containing only the first and last <ForecastPoint> objects :
{
"timezone": "Europe/Brussels",
"longitude": 4.533706,
"latitude": 50.711665,
"forecast": [
{
"windGust": 11.1460790369986,
"windSpeed_10m": 6.667912125523531,
"windDirection_10m": 223.44321300075234,
"windSpeed_200hPa": 38.64799409416467,
"windDirection_200hPa": 268.64472894979895,
"windSpeed_300hPa": 49.142716517101775,
"windDirection_300hPa": 269.2552785171493,
"windSpeed_925hPa": 13.197258691636046,
"windDirection_925hPa": 240.28692287795522,
"temperature_2m": 278.6636347777659,
"temperature_500hPa": 248.42825601531058,
"temperature_850hPa": 269.811823116638,
"timestamp": {
"unix": 1484219734,
"localTimestamp": "2017-01-12T12:15:34+01:00"
}
},
{
"windGust": 4.977490892435343,
"windSpeed_10m": 2.878197152982397,
"windDirection_10m": 293.8039568227666,
"windSpeed_200hPa": 31.13916686166079,
"windDirection_200hPa": 10.825380696299987,
"windSpeed_300hPa": 43.489709330032845,
"windDirection_300hPa": 14.887622359123611,
"windSpeed_925hPa": 7.868079530493774,
"windDirection_925hPa": 344.80048349987055,
"temperature_2m": 274.98887595369297,
"temperature_500hPa": 243.92711233970294,
"temperature_850hPa": 264.61621888701086,
"timestamp": {
"unix": 1484491030,
"localTimestamp": "2017-01-15T15:37:10+01:00"
}
}
],
"metadata": {
"windGust": {
"unit": "m s-1",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
},
"windSpeed_10m": {
"unit": "m s-1",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
},
"windDirection_10m": {
"unit": "degrees",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
},
"windSpeed_200hPa": {
"unit": "m s-1",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
},
"windDirection_200hPa": {
"unit": "degrees",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
},
"windSpeed_300hPa": {
"unit": "m s-1",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
},
"windDirection_300hPa": {
"unit": "degrees",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
},
"windSpeed_925hPa": {
"unit": "m s-1",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
},
"windDirection_925hPa": {
"unit": "degrees",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
},
"temperature_2m": {
"unit": "K",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
},
"temperature_500hPa": {
"unit": "K",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
},
"temperature_850hPa": {
"unit": "K",
"model": "gfs_0_5",
"runtime": "2017-01-12T06:00:00Z"
}
}
}