Versions Compared

Key

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

...

You should now (after a few seconds) see a flexta_tutorial folder which contains the solutions and also some additional icons required by these exercises. You will work in the flextra_tutorial folder so open it up. You should see the following contents:

Image RemovedImage Added

About FLEXTRA

What is FLEXTRA?

...

To compute trajectories with FLEXTRA we need to use the FLEXTRA Run icon (right-click in the desktop when no icons are selected and use the New icon ... menu).

Image RemovedImage Added

Rename it 'run_normal' and open up its editor.

...

Our FLEXTRA run generated an ASCII file on output which is now represented by our FLEXTRA Run icon. Right-click and examine the icon to look to see its content. This action will start up a window showing the output generated by FLEXTRA. What you are looking at is a custom ASCII format describing the resulting trajectories and some metadata.


Image RemovedImage Added

Info
titleFLEXTRA stop index

Flextra assigns an exit code called stop index for each trajectory. Its value can be seen in the FLEXTRA output (the examiner highlights it in blue in the trajectory header). The possible values are as follows:

  1. Normal exit.
  2. The trajectory left the computation domain.
  3. The time difference between two wind fields was too large.
  4. No wind fields were available.

Now close the FLEXTRA examiner. Right-click and save the icon to get a local copy of the FLEXTRA output file. A File Save dialog will appear with a Selection box at the bottom where you can specify the output file name. Type here 'res_normal.txt' and click Ok. After a few seconds a FLEXTRA File icon with the selected name will appear in your folder.

Image RemovedImage Added

This icon now stores your FLEXTRA output data. You can check its content by right-click and examine or edit.

...

To visualise your FLEXTRA output you need to use a FLEXTRA Visualiser icon.

Image RemovedImage Added

Create a new FLEXTRA Visualiser icon and rename it 'plot_normal'. Edit it and drop your 'run_normal' FLEXTRA Run icon into the Flextra Data field. This specifies the FLEXTRA output to be visualised. (Please note that you could also have dropped your 'res_normal.txt' FLEXTRA File icon into the FLEXTRA Data field to specify the data to be plotted).

At this point we do not need to set any other parameters the default values will work for us. After these modifications your icon editor should look like this.
Image RemovedImage Added

Visualising the Icon

...

telling us that we visualised a set of 3D forward trajectories starting from the point called 'Katla'. The legend contains the starting date, time and elevation for each trajectory.
Now click on the 'plot_normal' layer in the Layers tab (on the right hand side of the plot window). If you change the view by clicking on the View metadata toggle button

Image RemovedImage Added

you will see the meta-data associated with the visualised trajectories.
Image RemovedImage Added

Customising the Plot

...

To see how it is working in detail let's create a Symbol Plotting icon. Rename it 'symbol' then edit it.

Image RemovedImage Added

First, we need to set the symbol plotting type:

...

With these settings we will automatically generate our colour palette from a colour wheel by interpolating in clockwise direction between Symbol Advanced Table Min Level Colour and Symbol Advanced Table Max Level Colour.

Image RemovedImage Added

The markers used to denote the trajectory points are defined by parameter Symbol Advanced Table Marker List (see below for the list of available markers).

Now save your changes and drop this icon into the plot to see the effect of the settings.


Image Added Image Removed

 The identifiers of the available symbol markers are summarised in the table below:Image Removed

Image Added

Visualisation on XY Plots

...

After these modifications your icon editor should look like this.


Image RemovedImage Added

Visualising the Icon

Save your FLEXTRA Visualiser icon (Apply) then right-click and visualise to plot the trajectories.


Image Added Image Removed

The Metview Display Window is popping up using a custom visualisation assigned to FLEXTRA files. The title and a legend have been built exactly in the same way as in the map-based visualisation (see Part 4 ).

...

Our plot was generated by using hard-coded symbol plotting settings for trajectory rendering. We can change these settings exactly in the same way as we did for our map-based plot (see Part 4 for details). Now we will not create a new icon but simply reuse the Symbol Plotting icon called 'symbol' we created in Part 4 . Drop this icon into the plot to see the effect of the settings.


Image RemovedImage Added

Changing the View

We will further customise the plot by changing the axis value ranges and adding axis labels and grid-lines to it. To change these properties we need a Cartesian View icon. This time you do not need to create a new icon since there is one called 'xy_view' already prepared for you. Edit his icon to see how the view is constructed (please note that the axis properties are defined via the embedded Horizontal Axis and Vertical Axis icons). Then simply drag it into the Display Window and see how you plot has been changed.


Image RemovedImage Added

Backward Trajectories

...

Save your FLEXTRA Run icon (Apply) then right-click and execute to start the trajectory computations. Within a minute (it might take longer on your machines) the icon should turn green indicating that the run was successful and the results have been cached. Right-click and examine the icon to look at its content. Please note that the first data column contains negative values indicating that we computed backward trajectories.


Image RemovedImage Added

Visualising the Results

...

Create a new FLEXTRA Visualiser icon. Edit it and drop your 'normal_run_back' FLEXTRA Run icon into the Flextra Data field. Now save your settings (Apply) then right-click and visualise to plot the trajectories. After zooming into the proper area (or dropping the map_Reading icon into the plot) you should see something like this.


Image RemovedImage Added

CET Run Mode

In this exercise we will see how to compute trajectories with FLEXTRA in CET run mode. In this mode we can generate a set of trajectories starting from the points of a uniform three-dimensional grid. Please open folder 'cet' inside 'flextra_tutorial' to start the work.

...

Create a new FLEXTRA Visualiser icon. Edit it and drop your 'run_cet' FLEXTRA Run icon into the Flextra Data field. Now save your settings (Apply) then right-click and visualise to plot the trajectories. After zooming into the proper area (or dropping the map_Katla Map View icon into the plot) you should see something like this.


Image RemovedImage Added

FLIGHT Run Mode

...

Create a new FLEXTRA Visualiser icon. Edit it and drop your 'run_flight' FLEXTRA Run icon into the Flextra Data field. Now save your settings (Apply) then right-click and visualise to plot the trajectories. After zooming into the proper area (or dropping the map_Eu icon Map View into the plot) you should see something like this.


Image RemovedImage Added

Using Macro

In this example we will write the macro equivalent of the exercise we solved in Part 3 and Part 4 : we will compute forward trajectories with FLEXTRA in the NORMAL run mode and then visualise them. Please open folder 'normal' inside 'flextra_tutorial' to start the work.

...

The quickest way to generate a macro is to simply save a visualisation on screen as a Macro icon. Visualise your 'plot_normal' FLEXTRA Visualiser icon again and click on the macro icon in the tool bar of the Display Window.
Image Removed Image Added

Now a new Macro icon called 'MacroFrameworkN' is generated in your folder. Right-click visualise this icon. Now you should see your original plot reproduced.

...

Key

Description

Might get a nil value

cflSpace

Spatial CFL criterion. 


cflTime

Temporal CFL criterion. 


direction

Trajectory direction. 


dx

West-east resolution of the input grid.

 


dy

North-south resolution of the input grid.

 


east

Eastern border of the input grid.

 


integration

Integration scheme. 


interpolation

Interpolation type. 


maxInterval

The maximum interval between input fields. 


name

The name of group (= 'startComment').

 


normalInterval

The normal interval between input fields.

 


north

Northern border of the input grid. 


runComment

Label for the FLEXTRA run. 


south

Southern border of the input grid. 


startComment

The name of the trajectory group (= 'name').

 


startDate

Date of starting points.

(tick)

startEta

Model level of starting points.

(tick)

startLat

Latitude of starting points.

(tick)

startLon

Longitude of starting points.

(tick)

startPres

Pressure of starting points.

(tick)

startPv

Potential vorticity of starting points.

(tick)

startTheta

Potential temperature of starting points.

(tick)

startTime

Time of starting points.

(tick)

startZ

Height (above sea ) of starting points.

(tick)

startZAboveGround

Height (above ground) of starting points.

(tick)

trNum

Number of trajectories in the group.

 


type

Trajectory type.

 


west

Western border of the input grid. 


Step 2 - Accessing Individual Trajectory Data

...

In NORMAL run mode FLEXTRA generates a separate output file for each starting point: i.e. in our case two output files were created. However, to have only one access point for all the outputs, Metview concatenates these files into one single file and the Flextra Run icon represents this concatenated file. Now right-click and examine the Flextra Run icon to look at its content.


Image RemovedImage Added

You can see that the examiner has a different structure than we had in Part 3 when only one starting point was specified. On the left hand side there is a list showing the different starting points. In Metview we call the data represented by such an item a trajectory group (i.e. one trajectory group represents one output file). By selecting an item from this list its corresponding ASCII data will be displayed in the text browser in the right hand side.

...

Save your settings (Apply) then drop the icon into the plot. After zooming into the proper area (or dropping icon 'map_Eu' into the plot) you should see something like this.


Image RemovedImage Added

Plotting in Macro

...

All the required fields, with one exception, can be retrieved from ECMWF's MARS archive. The only exception is the vertical velocity because FLEXTRA needs the following field for its computations:

 


Mathinline
\dot \eta \frac{\partial \eta}{\partial p} 

 



The problem with this product is that only is archived in MARS and the full product needs to be computed during the data preparation process.

...

The  FLEXTRA Prepare icon is used to generate all the input data needed for a FLEXTRA run including the MARS retrievals, the computations and the generation of the AVAILABLE file as well.

Image RemovedImage Added

Create a new FLEXTRA Prepare and rename it 'prepare'.

...