The frost.met.no API is intended to provide free access to MET Norway's archive of historical weather and climate data, in addition to station history information. This page contains useful reference documentation related to usage of the API. Contact us if you have more detailed questions about the application you are looking to build.
- Getting Started.
- API Version
- Weather and Climate Element Identifiers
- Calculation Method
- Time Specification
- Geometry Specification
- Search Filter
- JSON Filter
- Resources, Schema, Parameters, Verbs
- Mailing List
This API is primarily for developers who need to develop scripts or applications that use MET Norway's archive of historical weather and climate data. The API is easy to use; all you need is an e-mail address.
To get started using the frost.met.no API:
- Request your client credentials.
- Play with and learn more about the resources available in API Reference (copy your client_id(username) into the appropriate form).
- Begin developing your application. All calls must be authenticated with your client_id(username). To authorize access to confidential resources and data, you require an access token acquired through the OAuth2 client credentials grant (as well as permission to access those resources). Note that the vast majority of data on this service is open, so the authorization flow is only rarely required.
Store your client_id(username) and client_secret(password) securely. The client_id is used to identify your application. There are currently no hard data retrieval limits on use of the API (these may come later), but client_ids which place undue strain on the server infrastructure during this period will be deleted without prior warning.
The frost.met.no API is currently in alpha. As such, it should not be used for production tasks.
curl -i --user YOUR-CLIENT-ID: "https://frost.met.no/tests/secureHello"
Note the punctuation after the client_id, to indicate an empty password field.
In the API Reference, you can paste the client_id into the form, in order to authenticate calls. Alternatively, if you try to access a resource call without authenticating, the browser will usually pop-up a credentials dialog where you can enter the client_id.
The authorization feature is currently not implemented. Only free data is available.
See an overview of the available element identifiers (IDs) in the Table of Weather and Climate Elements (experimental!). The IDs are defined for use in Frost API and are, as far as possible, based on CF standard names and structured as a Calculation Method.
A calculation method defines in detail how a particular element is derived, typically by combining statistical functions in different ways.The following combinations are currently available:
|<method>(<base name> <period>)|
|<method>(<inner method>(<base name> < inner period>) <period>)|
|<method>(<inner method>(<base name> < inner period>) <period> <threshold>)|
where the components are defined as follows:
|base name||The primary quantity. Normally this is a basic physical quantity. It is normally in accordance with the CF standard name table or CF guidelines for construction of standard names.|
|method||The main method (function), applied either directly to the primary quantity or indirectly via an inner method.|
|inner method||The inner method (function), applied directly to the primary quantity and used as argument to the main method.|
|period||The period over which the main method is applied. This is an ISO 8601 duration such as P1D (one day) or P1M (one month).|
|inner period||The period over which the inner method is applied. Also an ISO 8601 duration.|
|threshold||A threshold applicable to the main method.|
A more detailed description of the various calculation methods is available directly from the elements endpoint.
Methods and time periods correspond to cell methods and time bounds in the CF convention.
Our time specification is based on ISO-8601, extended with repeating intervals which do not exist in the ISO standard.
- Date: YYYY-MM-DD
- Time: hh:mm:ss
- Date Time: <date>T<time>
- Duration: PnYnMnDTnHnMnSTime
- Interval: <start>/<end>
- Time Interval: <start>/<duration>
- Repeating Time Points: R[n]/<interval>
- Repeating Intervals: R[n]/<interval>/<Duration>
It is important to note that intervals follow standard inclusive/exclusive semantics; i.e., [0,1) representing a value that is equal to or greater than 0, and less than 1.
As per the ISO standard, repeating time points are repeated immediately after each other. So, for example:
Represents the four consecutive time intervals:
For repeating intervals, we add a duration that represents the time between the start points of the interval. So for example:
Represents the four time intervals (separated by a duration of 1 day):
The place (geographic location) of a data item is the position of the item on the earth in a 2D space. In frost.met.no Frost API, the geographic location is specified using longitude and latitude in a WGS84 coordinate system. The geographic dimension is specified using a geometry object and can be either a point or a polygon.
Geometry objects in the JSON format are specified in the GeoJson format, as specified in IETF RFC 7946. When querying, however, we specify the geometry using Well-known text (WKT). WKT is a text markup language for representing vector geometry in a spatial reference system. The current standard definition is in the ISO/IEC 13249-3:2016 standard. In addition to the geometry object, one can also specify an interpolation function to refine/expand the query.
Using WKT, we can specify the following distinct locations:
||Retrieve the exact point given by the geometry object with longitude 30 and latitude 10 in WGS84 projection.|
||Retrieve the points contained within the geometry object given by the coordinates. Note that, currently polygons with holes are not supported by the Frost API.|
||Retrieve the point in the data set that is nearest to the geometry object given by the point.|
The standard search filter is case-insensitive and supports asterisks ('*') to represent zero or more characters.
For example, 'f*n*d' matches 'Finland'.
A JSON filter is a special type of JSON object that consists of zero or more key-value pairs: "<key1>": "<value1>", "<key2>": "<value2>", ... The braces around the object may be omitted, like in this case. Each value is a comma-separated list of search filters.For example, the request
matches elements with sensor level type height_above_ground and sensor level value 2.
The frost.met.no API provides a RESTful API centered around resources. These resources can be acted upon using the standard HTTP verbs. Descriptions of the available resources can be found in the API Reference.
The frost.met.no API attempts to use appropriate HTTP verbs to perform actions on resources.
|GET||use to retrieve data|
|POST||use to load data to the API (requires Authorization)|
|PUT||use to update data in the API (requires Authorization)|
|DELETE||not permitted at this time|
The API currently supports Hypermedia through swagger, via the reference endpoint.https://frost.met.no/reference
Currently not enabled.
Currently not enabled.
The following mailing list can be used for posting questions about usage of the API and for receiving important announcements:http://lists.met.no/mailman/listinfo/datametno-users