Versions Compared

Key

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

...

The main archive implements a queueing queuing system necessary to satisfy all type of requests: time-critical operational tasks, interactive users retrieving a few fields for visualisation, batch users retrieving Gigabytes of data, etc.

Resources available on the main archive impose some limitations on the number of requests processed simultaneously: these resources are basically the number of Unix processes MARS can start and the number of drives available to read data from tapes. The cost of a request is evaluated on arrival in terms of number of fields requested and their location, either on disk or on tape. The more tapes a request has to access, the more likely that it will be queued. It is possible that requests will be queued if the MARS server reaches certain limit of concurrent requests.

The queueing queuing system handles priorities: the request with the highest priority will be chosen next for execution. This priority is computed from the age of a request since it entered the queue. An artificial mechanism of ageing requests allows to prioritise operational work or interactive users. You can view the MARS queue online.

...

A request is scheduled more efficiently if it minimises the number of tapes it has to access in order to be satisfied. In order to do so, users To create efficient MARS requests you must know how the data is organised.

The MARS system is organised in a tree fashion based on MARS keywords. At the bottom of the tree there are what we called the hypercubes or archive objects, that are aimed to be in a single file on tape. There is a compromise between the amount of data these cubes hold and the relationship between the data they contain. By studying data access patterns, we have come up with the following rules:

Different projects have different needs, and therefore these rules may vary. Users You are encouraged to visit the MARS archive catalogue in order Catalogue to inspect how much related data an archive object a hypercube contains. The description above is the rule, but resources available at certain times might cause to break it, e.g. 1 month of Analysis may be in 2 files because at that particular month the MARS system was short of disk space and data had to be written to tape earlier than desired.

Gliffy Diagram
nameMARS-tree
pagePin7

Post-processing

Any requested data manipulation or post-processing is carried out by the MARS client, except in the case of a local Member State's the Web API client where data is first processed at ECMWF prior to its transmission over the network. The post-processing is carried out by MIR, a set of routines present in the EMOSLIB library. Please, refer to the Field interpolation software  routines for in-depth details about such post-processing.library of routines for Meteorological Interpolation and Regridding (see ECMWF newsletter no.152 for a description).  For details on the various operations please see also the relevant post-processing keyword descriptions. 

Sub-area extraction

Most of the data at ECMWF is global. A sub-area can be created using the area keyword by defining its latitude and longitude boundaries: North/West/South/East.

...

GRIB coded fields have a specified number of bits per packed value which can be changed with keyword accuracy. This might be useful when trying to retrieve fields from MARS identical to those you get from dissemination.

...

By default spectral fields are automatically truncated before interpolation to grid fields to reduce data volumes and spurious aliased values. When automatic truncation is applied MARS issues a warning message like INTFB: Resolution automatically set to .... The truncation can be controlled using the resol keyword. Default truncations are detailed in the following table.

Default spectral truncation wave number for given lat/lon grid increment ∆.
Grid increment [deg]Truncation
2.5 ≤ ∆     T63
1.5 ≤ ∆ < 2.5T106
0.6 ≤ ∆ < 1.5T213
0.4 ≤ ∆ < 0.6T319
0.3 ≤ ∆ < 0.4T511
0.15 ≤ ∆ < 0.3 T799
0.09 ≤ ∆ < 0.15T1279
0.0  ≤ ∆ < 0.09T2047

keywords truncation and intgrid. Users wanting to post-process at the full archived resolution can specify resol truncation = av none in the request.

Note that high resolutions might need more resources to carry out post-processing.

Rotation

Fields on spherical harmonics or Gaussian grid can be rotated with the keyword rotation. The rotation is performed prior to any other conversion. Therefore:

  • Spherical harmonics fields can be retrieved as rotated spherical harmonics or converted to rotated latitude/longitude or Gaussian grid fields.
  • Gaussian grid fields can be retrieved as rotated latitude/longitude or rotated Gaussian grid fields.

If the input is a spectral field and the output is a rotated spectral field, a file of rotation coefficients is generated and used in the processing. The convergence of the algorithm for rotating the spectral fields is sensitive to the spectral truncation. For some high resolutions and some large angles of rotation, it is necessary to split the rotation into three steps (two forwards and one backwards!). The size of the rotation coefficient files can be very large.

If the input is a spectral field and the output is a rotated grid point field, the spectral field is interpolated to a non-rotated Gaussian grid which is then transformed to the required rotated grid point field using a 12-point interpolation based on the FULL-POS scheme used in the ECMWF forecast model.

A rotated grid-point field is created from an input grid-point field by finding for each rotated grid-point its nearest four neighbours in the input field and carrying out a bilinear interpolation.

Retrieval efficiency

Retrieval efficiency

To retrieve data efficiently please follow the hints belowIn order to retrieve data efficiently users should follow the following hints:

  • Whenever possible, use a local file system to store the target file (e.g. $SCRATCH on ecgate for external users) as this will avoid unnecessary network traffic.
  • Estimate the data volume to be retrieved before issuing a request. It is easy to retrieve Gigabytes of data. Check that computer resources and limits are adequate for the amount of data to retrieve/interpolate in order to avoid unnecessary processing (MARS will fail if a quota is exceeded or in the case of any Unix problem regarding resources such as memory or CPU time).
  • Estimate the number of fields to be retrieved before issuing a request. Try to retrieve a sensible number, up to tens of thousands of fields.
  • Reduce the number of tapes involved. The number of tapes a MARS request is going to access will have an impact on its scheduling on the server. As a rule of thumb, two or more separate requests accessing files on different tapes are scheduled more efficiently than a single request accessing two or more tapes. A large number of tapes implies more waiting time. Use multiple requests in one MARS call whereby all the data is written to one output file.
  • When retrieving large datasets (e.g. Re-Analysis), try to retrieve as many data from the same tape file as possible. Then, avoid caching the data on the server by specifying use = infrequent.
  • Avoid constantly accessing the same tape. If you issue a large number of requests, all accessing data on the same tape, this can keep that tape in the drive for many hours and potentially cause some damage. Once you access a tape read as many fields as possible and if needed split the output by level, parameter etc. using the multi-target feature. This would reduce the amount of requests and make your extractions much faster.

...

Please also follow the Guidelines to write efficient MARS requests.

Troubleshooting

Syntactic errors

If a comma is missing or an unknown MARS keyword is specified, MARS will stop processing your request and report a syntax error.

...

MARS does not perform any semantic check on the request. A MARS request can be syntactically correct but may not describe any archived data. Common problems are:

  • Data not

...

  • found 
    Usually means the MARS directives do not specify archived data.
  • Expected xx, got

...

  • yy 
    The server transferred some data and the client failed; usually the client expected more fields than were sent by the server. Either some data do not exist, are missing on the server or a syntactically correct request asked for a parameter which is not in

...

  • MARS.
  • Inconsistency in field

...

  • ordering 
    This error occurs when a server sends a field which does not correspond to the MARS request. Operational servers are not likely to deliver inconsistent data, but it may well happen in test environments.
    If you get this kind of error when retrieving monthly means, then setting the day to 00 (DATE=YYYYMM00) will solve the problem.

System limits

Some system resource limits can be controlled by the user (consult the man pages of your shell if running in interactive mode or documentation about the software used for batch mode).

  • Error writing to

...

  • file 
    It usually indicates the user has exceeded his/her quota on the filesystem holding the target file or that filesystem became full.

  • Memory allocation

...

  • failed 
    It usually indicates MARS needs more memory than the available for user processes in order to execute a request.

  • CPU time

...

  • limit 
    It usually indicates the MARS process has exceeded the CPU time limit. The kind of post-processing and the number of fields retrieved have a direct implication of the CPU time needed by MARS to satisfy a request.

MARS keyword = all

By using the value all on certain keywords, MARS is asked to retrieve ALL data available which matches the rest of the request. In some cases, all data available is not all the data that the user expectsyou expect. The use of all is best avoided.

...

Messages starting with Failed HPSS call: n = ::hpss_Read(fd_,buffer,... are HPSS errors. The actual message text can vary but they usually mean that the data is unavailable from tapes for some time. These errors are passed to the client and make your request fail. As a rule, after checking that there is no ongoing system session, re-run your request before reporting the error. If the failure is consistent, please inform ECMWF's Call Service Desk.

Assertion failed

Error messages starting with Assertion failed: followed by offset[i] > offset[i-1] or handle[n] != 0 hint at an attempt to retrieve the same field more than once, e.g. by specifying param=z/t/z or step=24/48/24. The actual message varies depending on how exactly the data is retrieved. The general advice in such cases is to check the request for multiple occurrences of keyword values.

...

Some failures are not evident to explain from the MARS report. In such cases, the user you can turn on debug messages by setting environment variable MARS_DEBUG to any value different from 0.

Please, note that running in debug mode can generate large amount of output. Users , therefore you are advised to re-direct MARS output to a file.

...

It is advisable to have a catalogue set of working requests and to re-use or modify them as needed.

MARS messages

MARS has the following levels for messages it prints on execution:

...

Report

At the end of each request, MARS will print a report on all the aspects of its execution:

...

This report gives users an idea about the resources needed for a request, and can be used for future reference when retrieving similar datasets.

MARS messages

MARS has the following levels for messages it prints on execution:

INFOrequest being processed and a report on the execution at the end
DEBUGadditional information if debugging is switched on
WARNINGany unusual aspect of the execution
ERRORsystem or data errors which do not stop MARS execution
FATALterminates the execution of MARS

Field order

Do not expect retrieved fields to be returned in any specific order. Depending on the MARS configuration, fields can be retrieved differently. Therefore, user programs processing the target file must take this into account.

...