Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The Web API provides a way to access ECMWF's data archives in batch from outside ECMWF (users working at ECMWF or through ecgate should use their normal local MARS access). There are two services at present:

  • Access to the ECMWF Public Datasets requires self-registration and allows access to the datasets described here
  • Access to the MARS archive is only available to registered users

See ECMWF Web API Home for more information, including how to set up the service by installing an ECMWF key. Metview versions from 4.4.3 onwards have support for this service (but version 4.4.7 is recommended). See the Releases page for download.


First, whichever service you want, ensure that you have access to this service it by following the steps in Access ECMWF Public Datasets. Ensure that you have set up your ~/.ecmwfapirc key and that you are registered for the datasets you wish to access. If you can retrieve some data using a sample script provided there, then you are 90% of the way to accessing the service from within Metview. It is not required to install the Python client libraries, but it can help with testing the service before trying it with Metview.


Data can be retrieved using the Mars Retrieval icon or its Macro language equivalent, the retrieve() function. Either start with a supplied example icon, or create a new instance, either from the icon drawers at the bottom of the Metview desktop, or from the New Icon context menu. Edit the icon by selecting Edit from its context menu (or double-click the icon).

The important parameters parameter to set in order to use the Web API are Database (should be set to 'Data Server' for the public datasets, or 'Web API' for the core MARS archive) and Datasetpublic datasets is the Dataset parameter. Otherwise, the retrieval should be as described in the Web API guide. It may be useful to create a Mars Retrieval icon with the Database parameter set, and put it into an icon drawer (at the bottom of the Metview desktop) or the Mars Retrieval icon template drawer for future re-use.

To perform the retrieval, use the context menu of the icon: Execute will retrieve and cache the data; Visualise, Examine and Save will do the same, but will then perform more actions on the data. Please see the introductory Metview Tutorials for more information on how to use these features of Metview.