Versions Compared

Key

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

...

Tabs Container
directionhorizontal


Tabs Page
idMARS client
titleMARS

Specifies a file into which data is to be written after retrieval or manipulation.

target="<pathname>"

Path names should always be enclosed in double quotes, e.g.:

target = "/scratch/ms/gid/analysis.grb"

The MARS client supports automatic generation of multiple target files using MARS keywords enclosed in square brackets [ ]. This is a very useful way of organising fields into target files according to the keywords describing the fields. Instead of making repeated calls to MARS that may access several times the same tape, one could, with one retrieve, get as much data from the same tape as possible and write it to different target files. The following example retrieves analysis fields on pressure levels for the four main synoptic hours, storing them in four different target files, one per synoptic time:

retrieve,
   type    = an,
   expver  = 1,
   levtype = pl,
   levelist= 1000/850/700/500/400/300,
   param   = 129,
   date    = 19990222,
   time    = 0000/0600/1200/1800,
   target  = "an.[time]" 

By default the keyword values will use a generic format, e.g. in the example above the files will be named an.0, an.600, an.1200 and an.1800, i.e. without leading zeros. If the environment variable MARS_MULTITARGET_STRICT_FORMAT is set to 1 before calling mars, the keyword values will be used in the filename as shown by the ecCodes GRIB tool grib_ls -m, e.g. with MARS_MULTITARGET_STRICT_FORMAT set to 1 the values for  keywords time, expver and param will be formatted as 0600, 0001 and 129.128 rather than 600, 1 and 129.

Please note that the multiple target syntax is only supported for fields when retrieved to a target file, i.e. it wouldn't work with observations, fieldsets or with the verbs list, write or compute. Furthermore, the keywords specified in [ ] have to be those used by MARS, e.g. levelist and not level or any other abbreviation.

In a similar way multiple target files can be specified using ecCodes grib keys in curly braces, e.g. target="an.{shortName}".

Please note that this is a feature of the ecCodes package rather than generic MARS functionality.

Note
iconfalse
titleWeb API client

The When using the Web API there can only be one target file size per request which is limited to 600000 fields and 30 GB.

The multi target feature is not supported.



Tabs Page
idWeb API client
titleWeb API client

The When using the Web API there can only be one target file size per request which is limited to 600000 fields and 30 GB.

The multi target feature is not supported.


Tabs Page
idDissemination
titleDissemination

Specifies the destination and stream to which the data is send.

target=<destination>:<dissemination_stream_name>

The destination is a three character destination name; the dissemination_stream_name is a two character dissemination stream name. Example

target=ECM:EC