Versions Compared

Key

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

...

Retrieve requests have to specify, at least, directives to identify the data and directives for storage of the retrieved data. The ones to identify fields can be found in the Archive Catalogue. Data manipulation (post-processing) directives and execution control directives are optional, depending on user's needs.

With the main focus on data retrievals, this User Guide covers the following MARS actions, or verbs:

...

write is mainly used to save data from fieldsets, a temporary storage, into files, see section 5.2.

Table of Contents

Fieldsets

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:

...

retrieve,
   class  = od,
   type   = analysis,
   stream = oper,
   expver = 1,
   date   = -1,
   time   = 12,
   levtype= pressure levels,
   levelis= 1000/850/500,
   param  = temperature,
   target = "analysis.grb"
retrieve,
   date   = -40,
   target = "analysis.grb"     

Manipulate already retrieved data

Read requests can be used to filter or manipulate data from already retrieved files. It reads the data from a Unix file specified by the keyword source. This data can either be stored in a fieldset for further manipulation or written to a Unix file specified with the keyword target. Consider for example that file myfile contains certain meteorological parameters at all pressure levels. One can extract level 1000 hPa only and interpolate those fields to a 2.5x2.5 lat/lon grid, using the following MARS request:

read, 
   source   = myfile, 
   levelist = 1000, 
   grid     = 2.5/2.5, 
   target   = only_1000 

The verb retrieve can also be used to extract data from a Unix source file, perform post-processing on the result and store it into a target Unix file. In this case, retrieve needs all necessary directives as if it were a retrieval from the archives. Here is an example, assuming we want to extract geopotential and temperature Analyses for the 1st of January at 12 UTC:

retrieve,
   source   = myfile,
   class    = od,
   type     = an,
   date     = 20010101,
   time     = 12,
   param    = z/t,
   levtype  = pl,
   levelist = 1000,
   grid     = 2.5/2.5,
   target   = only_1000

The advantage of retrieve is that it will fail if the requested data is not present in the source file. A disadvantage is that it has to specify all the directives, and the user might not know what are the exact contents of the source file.