I get the error 'Requested data is on one or more damaged tape: ...'. What can I do?

If you see this error please contact us, providing the MARS output showing the data requested and the error message. In most cases the data needs to be restored and the complete MARS output allows us to identify the relevant files and tapes.

What can I do if my retrieve request fails with 'data not found'?

It means that what MARS has understood of your request is not found in the archive. That could happen for several reasons:

  • wrong defaults: you have not specified all necessary keywords and MARS has filled some with default values, but they are wrong. For example, if you specify levtype=ml and no levelist, the default is a pressure level levelist. Users are advised not to rely on default values.
  • data not yet produced: a common mistake is to specify a range of dates that end in a future date, or to retrieve data for current date when the suite that produces the data has not run yet. Date should be the first keyword to check when such error occurs.
  • data not archived: the data doesn't identify any fields in the archive, or it was discontinued. For example, first guess data was discontinued on September 2000.

It is recommended to carry out the following actions: Check the request as it is processed by MARS. MARS will print out the request it is processing. It sometimes changes directives, or inherits directives from previous requests, etc., and the resulting request doesn't represent any field in the archive. Visit the MARS Catalogue, following the directives of the request printed by MARS. After some point in the navigation tree, you could find a dead end. If after all you still don't know why your retrieve failed, please, seek advice from User Support.

I get the error 'unexpected character in input', but can't see anything wrong!

It is almost certainly due to a missing comma in the line above. Remember that each line in a directive block (verb followed by directives keyword=value) must terminate with a comma, except the last line. Also check for misplaced "=" or "/".

I do not seem to have permission to access some data. Why and what can I do?

Not all the data held in MARS are freely available to everyone. For example, the message:

restricted access to current forecast data

means you do not have permission to access the latest forecast, i.e. those which are still valid, see MARS access restrictions. External users may need a licence agreement from their national meteorological service before they can access such data. Contact your Member State Computing Representative in such cases.

What is the most efficient way to loop over several requests?

If you loop in a script, then do so in the following hierarchy:

date (outer loop)
         number (EPS only)
               parameter (inner loop)

In any loop always put the mars command at the highest level possible, i.e., try to avoid putting the mars command in the innermost loop. Thus, for example, if you wish to retrieve 3 months of analysis data (April 2005 to June 2005), then loop at the date level:

for month in 20050401/to/20050430 20050501/to/20050531 20050601/to/20050630
mars  <<EOF
   type  = an,
   date  = $month,

If the reason to construct a loop around a MARS request is the desire to write the output to multiple target files try to use the multi-target feature whenever possible.

I cannot retrieve recent Initialised Analyses. Why?

Production of Initialised Analyses finished on 29/01/1996. After that date only Analysis is archived.

Why can't I find operational First Guess any more in the MARS Catalogue?

With the introduction of 12 hour 4d-Var on 12th September 2000, the data type First Guess has not been produced any longer on the operational deterministic model. That data is available as type Forecast from previous cycles and time step validating at First Guess time. The correspondence between First Guess and Forecast is as follows:

type = First Guesstype = Forecast
date=today,time=06,step=06date=today, time=00, step=06
date=today,time=12,step=06date=today, time=00, step=12
date=today,time=18,step=06date=today, time=12, step=06

Parameter packing doesn't seem to have any effect if no other post-processing is carried out.

That's correct. At the moment you need to specify other post-processing for packing to work.

What is the best way to retrieve data to multiple target files?

Users often need to write their retrieved fields to multiple target files named according to forecast base-time, forecast step, parameter name etc. Rather than using an external loop around the MARS request this can best be done by using the multi-target feature, see Data storage keywords. If, using this method, you don't get the desired file names, they can in most cases be easily renamed afterwards.

How can I filter Analysis Input observations?

Analysis Input/Feedback is archived and retrieved as used/produced by the Analysis, therefore, no post-processing is carried out on retrieval. However, users can use MARS to extract observations from already retrieved files. This can be achieved by changing the type to observations and specifying a retrieval from source. For example, if we had retrieved all the conventional observations used in yesterday's 12 Z analysis, one could extract synop land data, 1 hour around 12 Z with the following request:

        type    = ob,
        obstype = synop land,
        time    = 1130,
        range   = 60,
        date    = -1,
        source  = conventional.12z,
        target  = synop.1hour  

How can I retrieve fields identical to those I get from dissemination?

As MARS and the dissemination system are different applications, they don't necessarily return by default identical fields for any given request. However, with the help of some MARS keywords it should be possible. In any case you should include STYLE=DISSEMINATION to instruct MARS to perform post-processing in a way as close to the dissemination system as possible. With the keyword accuracy the number of bits per value to be used in the generated GRIB fields can be specified to match that used in the dissemination. The accuracy, bitsPerValue, can be found in the GRIB message. An overview on accuracies used can be found in the various  data set descriptions. 

How can I handle and manipulate the data retrieved from MARS?

Retrieved data can of course be manipulated in any way outside MARS, e.g. using Fortran programs. Python scripts etc. To users with less programming experience some tools available at ECMWF might be of particular interest:

The ecCodes package offers handy tools to examine the content and to manipulate GRIB files on the command line.

With ECMWF's interactive meteorological application Metview you can access (both directly from MARS and from file), manipulate and visualise GRIB data. In particular its macro language, which can also be used in batch mode, provides a convenient and powerful tool to manipulate and visualise data. Metview's grib examiner, which can be started on ecgate as

metview -e grib [filename]

offers a GUI to some functionality of ecCodes's examination tools.

CDO is a collection of Climate Data Operators, including, e.g. vertical interpolation, which can by applied to meteorological fields in various formats, including GRIB. This tool box is installed at ECMWF but has been developed and is maintained by MPI, Hamburg. Please direct all queries to them. For more details refer to the CDO home page.

Various tools are available to convert GRIB to netCDF.

Metview also provides an examiner for BUFR data, which can be started on ecgate as

metview -e bufr [filename]

I cannot retrieve yesterday's observations. Why?

Observations are archived in MARS with 2 days delay. As a rule of thumb, you can always access date = -3, as the time at which observations archiving is carried out may vary from day to day depending on suite schedule. Please also note that observations are not generally accessible.

How can I compute the accumulation using data from the overlap stream?

It is possible to compute the accumulation using data from the overlap stream. The accumulated fields interpolated to the lower resolution are archived in STREAM=EFOV. For instance, the total precipitation (paramId=228) interpolated to the lower resolution is archived as "total precipitation (variable resolution)" (paramId=230228, STREAM=EFOV). Thus, correct accumulations can also be obtained as the sum of the accumulation from T1 to T2 (higher resolution) and the accumulation from T1 to T2 (lower resolution).

A sample MARS request to compute the 48-hour accumulation of total precipitation from T1 = 216 h to T2 =264 h, on a 0.5/0.5 regular lat/lon grid where the truncation time step is 240 looks like this:

CLASS    = OD,
   EXPVER   = 1,
   TYPE     = CF,
   DATE     = -1,
   TIME     = 12,
   PARAM    = TP,
   STEP     = 216,
GRID     = 0.5/0.5,
   STEP     = 264,
   STEP     = 240,
   STEP     = 240,
   PARAM    = TPVAR,
   TARGET   = "tp.grib"

If accumulations across the resolution change are computed as above, spurious negative accumulations are very rare.

Note: Since implementation of cycle 48R1 at the 06 UTC run on 27 June 2023, the resolution of both medium-range ensemble (ENS) and extended-range ensemble (ENS extended) no longer varies over the forecast period, streams efov, efho, weov and ewho, providing ensemble forecast overlap fields, is discontinued.

More FAQs

You can also find some MARS related FAQs on www.ecmwf.int. For FAQs reg. Reanalysis datasets (e.g. ERA-Interim) please also have a look at the Copernicus Knowledge Base.

1 Comment

  1. Is there a way to run a "silent mode" when downloading data? I'm building a Python script to grab data in netCDF format based on set inputs (date and time specifically), but for each unique download there is a ton of MARS output in the command line. I'd like to minimize this if possible.