Versions Compared

Key

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

...

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 is enabled by default. The only reason for disabling this option is if your system does not have the curl development library (libcurl) installed.

...

Data can be retrieved using the Mars Retrieval icon . Create 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.

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. 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.

Anchor
creating-mars-icon
creating-mars-icon
Example retrievals

It is beyond the scope of the Metview documentation to give detailed assistance on formulating MARS requests. Please see the MARS Web API page: A guide for new users. However, here are some examples to help get things started.

Users . For users who have started Metview for the first time fairly recently (with version 4.4.x onwards) should already 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:

Code Block
languagebash
metview -u ~/metview_fresh_dir

This new directory will contain the icons.

 

The icons are also available for separate download - untar these into a Metview folder to start exploring them.

Example retrieval for TIGGE data (icon parameters)

The following is the text behind an example Mars Retrieval icon for requesting TIGGE data. Either copy the values shown into the appropriate places in the icon editor, or switch the icon editor to Text View mode and copy the request in its entirety.

...

Code Block
RETRIEVE,
  DATASET = tigge,
  TYPE = PF,
  LEVTYPE = SFC,
  PARAM = TP,
  DATE = 20071001,
  STEP = 12,
  NUMBER = ALL,
  GRID = 1.5/1.5,
  DATABASE = Data Server

 

...

Example retrieval for ERA Interim data (Macro language code)

The following Macro code retrieves some ERA Interim data and plots it.

Code Block
languageperl
# Metview Macro

#  **************************** LICENSE START ***********************************
# 
#  Copyright 2014 ECMWF. This software is distributed under the terms
#  of the Apache License version 2.0. In applying this license, ECMWF does not
#  waive the privileges and immunities granted to it by virtue of its status as
#  an Intergovernmental Organization or submit itself to any jurisdiction.
# 
#  ***************************** LICENSE END ************************************
# 

data = retrieve
(
    dataset  : "interim",
    class    : "ei",
    type     : "fc",
    levtype  : "sfc",
    param    : 235,
    date     : 20130501,
    step     : 12,
    grid     : [1.5,1.5],
    database : "Data Server"
)

plot(data)

Anchor
creating-mars-icon
creating-mars-icon
Creating a Mars Retrieval icon

The following images are taken from the new Desktop user interface, but the procedure is the same with the classic user interface.

  1. Right-click / Create new Icon
2. Select Mars Retrieval
Image AddedImage Added
3. The new icon appears on the Metview desktop4. Edit the icon to set the retrieval parameters
Image AddedImage Added