Tutorial
Basic tutorials showing how the mountain area forecast data feeds can be used to retrieve data.
Please refer to the Mountain weather forecasts detailed documentation for the mountain forecast data feeds for more detailed information.
Introduction
The mountain area forecast data feeds provide access to mountain area script forecasts for a number of mountain areas across the UK, giving detailed forecasts for the day the forecasts were issued and the following day, and describing the general outlook for the following days. The mountain area forecasts are each updated at least once daily, early morning, and are routinely updated again through the day.
Tutorials
The mountain area forecast data feeds can be accessed via web services or via the JavaScript API. Here we describe how to access forecasts for a single mountain area using both of these methods.
You would like to access forecasts for a given mountain area
Via the web services
- Call the mountain area forecast site list web service to find the id of the mountain area you would like a forecast for
- Call the mountain area forecast capabilities web service to check whether the data has been updated since it was last requested
- If so call the mountain area forecasts web service, specifying the id of the relevant mountain area, to retrieve the new data in either XML or JSON format
Via the JavaScript API *
- Call the metoffice.forecast.mountain.getLocations method to find the id of the location you would like to see observations for
- Call the metoffice.forecast.mountain.getById method to retrieve the mountain area forecast for the relevant location
* Note that users of the JavaScript API do not have to call the capabilities method to check whether the data has been updated since it was last requested, as the API does this automatically.