...
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. | |
startEta | Model level of starting points. | |
startLat | Latitude of starting points. | |
startLon | Longitude of starting points. | |
startPres | Pressure of starting points. | |
startPv | Potential vorticity of starting points. | |
startTheta | Potential temperature of starting points. | |
startTime | Time of starting points. | |
startZ | Height (above sea ) of starting points. | |
startZAboveGround | Height (above ground) of starting points. | |
trNum | Number of trajectories in the group. |
|
type | Trajectory type. |
|
west | Western border of the input grid. |
|
Step 2 - Accessing Individual Trajectory Data
In this step we will show how to access the metadata and data of individual trajectories.
...
In this exercise we will see how to deal with multiple output files generated in a single FLEXTRA run. Please open folder 'multi' in folder 'flextra_tutorial' to start the work.
Multiple Outputs Exercise
So far in all of our examples only one FLEXTRA output file was generated. However, there can be situations when FLEXTRA generates several output files during a single run. It happens when:
...
To explain how to handle multiple FLEXTRA outputs we will compute trajectories for multiple starting points with one single FLEXTRA run in NORMAL mode.
Creating a FLEXTRA Run Icon
You will find a 'run_normal' FLEXTRA Run icon in your folder. It is exactly the same icon as you created in Part 3 and it generates trajectories for volcano Katla. Now copy this icon (either right-click + duplicate, or drag with the middle mouse button), and rename the duplicate 'run_multi' by clicking on its title.
...
Here we defined two starting points: volcano Katla (as in Part 3 ) and volcano Stromboli. We set the starting heights to the real heights of these volcanoes and again we defined the trajectory types to be three-dimensional.
Running FLEXTRA
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 machine) the icon should turn green indicating that the run was successful and the results have been cached.
Examining the Results
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.
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.
...
A new FLEXTRA File icon will be created in the desktop and if you right-click examine it you will see exactly the same content as above when you examined the FLEXTRA Run icon.
Visualising the Results
Because our 'run_multi' FLEXTRA Run icon stores two groups of trajectories we need to tell the visualiser which one we want to actually plot.
...
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.
Plotting in Macro
In this example we will write the macro equivalent of the visualisation exercise we have just finished.
...
Code Block |
---|
plot_Srtromboli=flextra_visualiser( flextra_data: flx, flextra_group_index: 2 ) |
Data Access in Macro
In this example we will see how to access metadata and data from a FLEXTRA output file containing multiple trajectory groups.
...
In this exercise we will see how to generate input data for FLEXTRA runs from ECMWF's MARS archive. Please note that to run the examples you need to have a Metview version being able to connect to MARS. Please open folder 'prepare' in folder 'flextra_tutorial' to start the work.
FLEXTRA Input Data
FLEXTRA expects input data 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.
...
In addition to the GRIB files a FLEXTRA run requires 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 describing the input dates, times and GRIB files. This file can be optionally provided by the users (as we saw it in Part 3 ).
The FLEXTRA Prepare Icon
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.
...
Warning |
---|
Please be aware that the preparation process is currently only working for operational forecasts having 91 or 137 model levels and requires parameter etadot from MARS. Because parameter etadot has only been archived in MARS since 4 June 2008, earlier dates cannot be used. |
Running the Icon
Save your FLEXTRA Prepare icon (Apply) then right-click and execute to start the data preparations. After two-three minutes (it might take longer on your system and machine) the icon should turn green indicating that the preparations were successful. The input data preparations involved several Metview tasks in the background:
...
Code Block |
---|
DATE TIME FILNAME SPECIFICATIONS YYYYMMDD HHMMSS _____________________________________________ 20120131 000000 EN12013100 ON DISC 20120131 030000 EN12013103 ON DISC 20120131 060000 EN12013106 ON DISC |
Input Data Caching
Edit and save your FLEXTRA Prepare icon (Apply) again. You should see that the title of the icon turned black. For other icons it would mean that the data cached by the icon got deleted. Do not worry, you did not lose your precious data with this action because caching works differently for the FLEXTRA Prepare icon. Even if you delete the icon you will not lose your data and it will remain untouched in the output directory. You need to delete it manually if you want to remove it from the file system. Naturally if you generate a new dataset for the same date, time and steps but with a different grid the original data will be overwritten.
...
Info |
---|
If parameter Flextra Reuse Input is set to 'On' Metview confirms the existence of a GRIB file by using the file name and a set of GRIB API keys from the first message in the file. This is the list of the keys that are checked:
|
Running FLEXTRA with the FLEXTRA Prepare Icon
Now we will run FLEXTRA with the data we generated in the previous step. You will find a FLEXTRA Run icon called 'run_normal' in your folder. Open its editor and start editing.
...
We can visualise the results in exactly the same way as we did it throughout the tutorial. By using a FLEXTRA Visualiser icon.
Comments on Using FLEXTRA Prepare in Macro
Just like the other FLEXTRA icons the FLEXTRA Prepare icon can also be used in Macro. Its macro command equivalent is flextra_prepare().
...
Alternatively we can set the Macro execution mode to synchronous by using the waitmode() function. We need to place it before calling flextra prepare() like this:
Code Block | ||
---|---|---|
| ||
waitmode(1) res=flextra_prepare( ... ) flextra_run( ... ) |