Versions Compared


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


Specifies a MARS variable into which data is to be written after retrieval or manipulation. Its main use is with the MARS compute verb.

titleWeb API client
Not supported by the Web API client.


It is a name used to represent a temporary collection of fields which can be manipulated with further MARS requests. MARS uses temporary storage to hold fieldsets. Once MARS finishes its execution, this storage is removed, thus the data is lost if it has not been saved with a write request.

A fieldset is a temporary storage for fields, either retrieved from MARS or read from a UNIX file. Fieldsets can be seen as variables in a MARS request, and they can be referenced in subsequent MARS requests in the same execution. This is an example how to retrieve data into a fieldset named analysis:

   class    = od,
   type     = analysis,
   stream   = oper,
   expver   = 1,
   date     = -1,
   time     = 12,
   levtype  = pressure levels,
   levelist = 1000/850/500,
   param    = temperature,
   fieldset = analysis

At the end of the execution, all fieldsets are released. Therefore, data in unsaved fieldsets will be lost. Fieldsets can be saved as UNIX files with write requests, like in this example:

   fieldset = analysis,
   target   = "data"

Note that fieldsets are in fact using temporary disk storage on the host where MARS is executed, usually in $TMPDIR directory. When dealing with big fieldsets, you are advised to make such variable point to a suitable directory where temporary data can be stored (e.g. $SCRATCH on ecgate/HPC).

One can extract fields (sub fieldsets) from a fieldset using square brackets. If X is a fieldset, X[2] is the second field, X[1,10] comprises the first 10 fields, and X[2,8,2] comprises every second field of x starting from 2 up to 8.


titleWeb API client




Not supported.