Introduction
The Web API provides a way to access ECMWF's data archives in batch. See A brief guide to the Web API for more information, including how to set up the service.
Setup
First, ensure that you have access to this service by following the steps in the page linked to above. 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.
Second, ensure that your Metview installation was built with Mars Web Access enabled. When configuring with autotools (Metview version 4.4.x), the option is --enable-mars-web-access
and is yes
by default. The only reason for disabling this option is if your system does not have the curl development library (libcurl
) installed.
Using
Data can be retrieved using the Mars Retrieval icon. Create a new instance, either from the icon drawers at the bottom of the Metview desktop, or from the New Icon context menu. The important parameters to set, in order to use the Web API are Database (should be set to 'Data Server') and Dataset. Otherwise, the retrieval should be as described in the Web API guide. For users who have started Metview for the first time fairly recently (with version 4.4.x onwards) should have some example icons and a macro in their Getting Started folder. Others can see these icons by starting Metview with a clean user directory, for example:
metview -u ~/metview_fresh_dir
This new directory will contain the icons.
Example retrieval for TIGGE data:
RETRIEVE, DATASET = tigge, TYPE = PF, LEVTYPE = SFC, PARAM = TP, DATE = 20071001, STEP = 12, NUMBER = ALL, GRID = 1.5/1.5, DATABASE = Data Server