NAME

Locationforecast - Weather forecast for a specified place

DESCRIPTION

This service delivers a full weather forecast for one location, that is, a forecast with several parameters for a nine-day period.

JSON format and variables

Version 2.0 defaults to JSON format for data. For an explanation of the various variables, see the Datamodel documentation. The JSON format is described in the General Forecast Format documentation.

XML format

For those who want to continue using their existing clients with a minimum of changes, you can also continue using the old XML format. This must be accessed via the classic method, like this:

    https://api.met.no/weatherapi/locationforecast/2.0/classic?lat=60.10&lon=9.58

The XML format is considered legacy, and as similar to 1.9 as possible except for additional time periods and the XML Schema URI. Future enhancements will primarily be added to the JSON format.

Weather icons

Along with the new JSON format we also have a new set of weather icons, in PNG, SVG and PDF formats. They can be downloaded as a gzipped TAR archive using the WeatherIcon 2.0 service.

The filename (minus extension) corresponds to the symbol_code in the JSON format, including variations for day, night and polar day. This means there is no need for calculations or fetching data from the Sunrise service in order to present the correct weather icons.

UV index

The new format also includes UV radiation forecasts per location, to replace the old graphical UVforecast product. For those wanting UV maps these can be downloaded directly from CAMS.

AUTHENTICATION

We had originally planned to launch a token-based authentication scheme for version 2.0, however this has been postponed to a later date. As a consequence we have implemented stricter access controls in regards to the identification requirements in the Terms of Service, which state that you must send a unique identifier in the User-Agent header. Any requests with a prohibited or missing User-Agent will receive a 403 Forbidden error.

Examples of banned User-Agents include:

USAGE

Methods

/complete

JSON forecast with all values. This will shortly be expanded with probabilities, so that each variable will be repeated for a set of percentiles.

/compact

A shorter version with only the most used parameters (if you feel something is missing, please let us know)

/classic

The old XML format, now considered legacy. It matches the output of version 1.9 closely, but includes more time periods. Future new parameters will not be added to this version.

Parameters

lat

latitude in decimal degrees, mandatory

lon

longtitude in decimal degrees, mandatory

altitude

whole meters above sea level (integers), optional but recommended for precise values.

Sample request URLs

    https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=60.10&lon=9.58                         # JSON
    https://api.met.no/weatherapi/locationforecast/2.0/complete?lat=-16.516667&lon=-68.166667&altitude=4150   # El Alto, Bolivia
    https://api.met.no/weatherapi/locationforecast/2.0/classic?lat=60.10&lon=9.58                         # Classic XML

Weather symbols

With locationforecast 2.0 there is a new corresponding set of weather icons matching the symbol_code variable in the JSON output:

    https://api.met.no/weatherapi/weathericon/2.0/documentation

Wind direction denote where the wind is coming from, where 0° is north, 90° east, etc. For GUI applications use we suggest using arrows, like these:

🡇

0° (north)

🡄

90° (east)

🡅

180° (south)

🡆

270° (west)

Status

Operational status for the model can be checked like this:

    https://api.met.no/weatherapi/locationforecast/2.0/status

Schema

The XML Schema is available at https://api.met.no/weatherapi/locationforecast/2.0/schema

Schema for the JSON format is included in the OpenAPI spec:

    https://api.met.no/weatherapi/locationforecast/2.0/swagger

HISTORICAL FORECASTS

While we only serve current forecasts via the API, you can find historical forecast model data in NetCDF format on http://thredds.met.no/thredds/metno.html.

CHANGELOG

version 2.0 out of beta: 2020-06-17

version 2.0 : 2020-06-10

version 2.0 : 2020-04-02

version 2.0 : 2020-01-17

version 1.9 : 2014-05-20

phase out of version 1.5 : 2011-08-16

version 1.8 : 2010-06-10

version 1.7 : 2010-03-03

version 1.6 : 2009-01-15

version 1.5 : 2008-05-30

1.4 : 2007-12-03

1.3 : 2007-09-12

1.2 : 2007-06-15

1.1 : 2007-04-25

1.0 : 2007-05-15