Versions Compared

Key

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

...

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

date (outer loop)
   time
      step
         number (EPS only)
            level
               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
do
mars  <<EOF
retrieve,
   ....
   type  = an,
   ...
   date  = $month,
   ...
EOF
done

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.

...

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=00,step=06date=yesterday,time=12,step12
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.

...

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:

retrieve,
        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?

...

With ECMWF's interactive meteorological application METV 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 GRIB API's examination tools.

...

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?

...

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 looks like this:

RETRIEVE,
  
CLASS    = OD,
   STREAM   = ENFO,
   EXPVER   = 1,
   TYPE     = CF,
   LEVTYPE  = SFC,
   DATE     = -1,
   TIME     = 12,
   PARAM    = TP,
   STEP     = 216,
   
GRID     = 0.5/0.5,
   FIELDSET = T1
RETRIEVE,
   STEP     = 264,
   FIELDSET = T2
RETRIEVE,
   STEP     = 240,
   FIELDSET = TSTAR_HIGH_RES
RETRIEVE,
   STEP     = 240,
   STREAM   = EFOV,
   PARAM    = TP,
   FIELDSET = TSTAR_LOW_RES
COMPUTE,
   FORMULA  = "T2-TSTAR_LOW_RES+TSTAR_HIGH_RES-T1",
   TARGET   = "tp.grib"

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

...