Metview's documentation is now on readthedocs!

This icon generates the gridded input data and the AVAILABLE file needed to run the FLEXTRA trajectory model. The input forecast or analysis fields are either automatically retrieved from ECMWF's MARS archive or read from the specified input file. A tutorial on using FLEXTRA from within Metview is available from the Tutorials page. For help on editing icons, please see Editing Icons.

The macro language equivalent is flextra_prepare().

What data is available?

FLEXTRA Prepare is currently only able to handle data from the operational ECMWF forecasts/analyses 2008, 4 June onwards.

About FLEXTRA input  data

The following is for information only - FLEXTRA Prepare handles these details internally.

FLEXTRA requires input fields on a regular latitude-longitude grid in GRIB format. The input data must contain four three-dimensional fields: the two horizontal wind components, vertical velocity and temperature. Two additional two-dimensional fields are needed as well: topography and surface pressure. The three-dimensional input data has to be available on ECMWF model (i.e. η) levels defined by a hybrid vertical coordinate system. An important restriction is that all the data fields used within a FLEXTRA run must have the same domain size, resolution, number of levels, etc.

All the required fields, with one exception, can be retrieved from ECMWF's MARS archive. The only exception is vertical velocity because FLEXTRA needs the following field for its computations: \( \dot \eta \frac{\partial \eta}{\partial p} \)

Since only \( \dot \eta \) is archived in MARS the full product needs to be computed during the data preparation process (FLEXTRA Prepare does it for you).


FLEXTRA requires all the input GRIB files to be in the same folder using the following file naming convention: ENyymmddhh. In addition to the GRIBs FLEXTRA needs several parameter files as well. Most of these files are automatically generated by Metview in the background, so users do not need to create them. The only exception is the file called AVAILABLE because it can be optionally provided by the user.

The FLEXTRA Prepare Editor

All the date parameters used for FLEXTRA Prepare have yyyymmdd format. Relative dates are allowed: e.g. -1 means yesterday, 0 means today, etc.                   

Flextra Prepare Mode

Specifies the data preparation mode. The possible values are: Forecast and Period.

In Forecast mode the selected steps of a given forecast can be used for data generation. If the mode is set to Period a period with a start and end date and constant time-step can be defined. In this case FLEXTRA Prepare tries to retrieve analysis fields from MARS whenever it is possible (for dates in the past) and uses forecast fields otherwise (for dates in the future).

Flextra Input Source

Specifies the source of the input GRIB data. The possible values are: mars and file.The default value is mars.

If the input source is mars the input GRIB data is retrieved from the MARS archive. When Prepare Mode is forecast the input source can also be set to file. In this case the GRIB file specified in Input File will be used as input data.

Flextra Input File

Specifies the full path to the file containing the input GRIB data. Available when Prepare Mode is forecast and  Input Source is file. The input file must contain the following fields for all the steps specified in Flextra Step:

Filed typeParameters
surface fields

["sp", "z"]

model level fields["u","v","t","etadot"]

Flextra Fc Mars Expver

The MARS experiment identifier of the forecast fields. The default value is 1 (operational forecast). 

Flextra An Mars Expver

The MARS experiment identifier of the analysis fields. The default value is 1 (operational analysis). 

Flextra Date

Specifies the run date of the forecast. Available when Flextra Prepare Mode is Forecast.

Flextra Time

Specifies the run time of the forecast . Available when Flextra Prepare Mode is Forecast.

Flextra Step

Specifies the forecast steps in hours. Here a list of values is given. Available when Flextra Prepare Mode is Forecast.

Flextra Period Start Date

Specifies the start date of the period. Available when Flextra Prepare Mode is Period.

Flextra Period Start Time

Specifies the start time of the period. Available when Flextra Prepare Mode is Period.

Flextra Period End Date

Specifies the end date of the period. Available when Flextra Prepare Mode is Period.

Flextra Period End Time

Specifies the end time of the period. Available when Flextra Prepare Mode is Period.

Flextra Period Step

Specifies the time step of the period in hours. The allowed values are as follows: 3 or 6. Available when Flextra Prepare Mode is Period.

Flextra Grid interpolation

Specifies if the input GRIB fields need to be interpolated onto a target grid specified by Flextra Area and Flextra Grid. The possible values are on/off. Available when Input source is file. The default value is: on.

Flextra Area

Specifies the area of the output grid in south/west/north/east format. The default value is  -90/-179/90/180.

In versions before 5.0.0 the default value is -90/-180/90/180.

Please note that to make global domains work with FLEXTRA the western border must be set to one gridcell east of 180. E.g. if the east-west grid resolution is 1 degree Flextra Area should be set to -90/-179/90/180 etc.

Flextra Grid

Specifies the resolution of the output grid in dx/dy format, where dx is the grid increment in east-west direction, while dy is the grid increment in north-south direction (both in units of degrees). The default value is: 1/1.

Flextra Top Level

Only data on and below this model level will be used to generate the FLEXTRA input fields. This level can be specified either as a model level or as a pressure value. In the latter case FLEXTRA Prepare will use the data retrieved for the first date to determine the topmost model level. The default value of this parameter is 1, which means that all the model levels will be used if Flextra Top Level Units is set to Model Levels.

Flextra Top Level Units

Specifies the units of the value of Flextra Top Level. The allowed values are Model Levels or hPa. The default value is Model Levels. 

Flextra Reuse Input

If this parameter is set On FLEXTRA Prepare checks the existence of the data files to be generated and if they are already in place no new data is retrieved and processed. If it is Off all the fields are always retrieved and processed and the existing data files are overwritten. The same happens to the AVAILABLE file. The existence of a FLEXTRA input GRIB file is checked by using the file name and a set of GRIB API keys from the first message in the file. These keys are as follows: date, time, stepRange, gridType, iDirectionIncrement, jDirectionIncrement, latitudeOfFirstGridPoint, latitudeOfLastGridPoint, longitudeOfFirstGridPoint, longitudeOfLastGridPoint.

Flextra Output Path

Specifies the output directory (it has to be an absolute path) where the GRIB files and the AVAILABLE file will be generated. If this directory does not exist Metview will create it. The output GRIB files have the following naming convention: ENyymmddhh.