Metview's documentation is now on readthedocs!

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »


This tutorial demonstrates how to run a backward simulation with FLEXPART and how to visualise the results in various ways.

Using FLEXPART with Metview

Requirements

Please note that this tutorial requires Metview version 5.0 or later.

Preparations

First start Metview; at ECMWF, the command to use is metview (see Metview at ECMWF for details of Metview versions). You should see the main Metview desktop popping up.

The icons you will work with are already prepared for you - please download the following file:

Download

flexpart_tutorial.tar.gz

and save it in your $HOME/metview directory. You should see it appear on your main Metview desktop, from where you can right-click on it, then choose execute to extract the files.

Alternatively, if at ECMWF then you can copy it like this from the command line:
    cp -R /home/graphics/cgx/tutorials/flexpart_tutorial ~/metview

You should now (after a few seconds) see a flexpart_tutorial folder. Please open it up.

The input data

The input data is already prepared for you and is located in folder 'Data'. You will find a FLEXPART Prepare -old icon that was used to generate the data in folder 'Prepare'. The corresponding macro code can also be found there.

You do not need to run the data preparation. However, if you wish to do so please note that it requires MARS access and you must set the Output Path parameter accordingly.


Please enter folder 'backward' to start working.

In this exercise we will perform a backward simulation to compute the residence time of the particles reaching Inverness in Scotland.

The simulation itself is defined by the 'bwd_time' FLEXPART Run icon and the 'rel_inv' FLEXPART Release icon, respectively. Both these are encompassed in a single macro called 'bwd_time.mv'. For simplicity will use this macro to examine the settings in detail. 

The macro starts with defining the release like this:

rel_inv = flexpart_release(
	name			:	"INVERNESS",
	starting_date	:	1,
	starting_time	:	12,
	ending_date		:	2,
	ending_time		:	12,
	area			:   57.44/-4.23/57.46/-4.21,
	top_level		:	500,
	bottom_level	:	0,
	particle_count	:	10000,
	masses			:	1
	)

This says that the backward release will happen over a 24 h period in the lower 500 m layer at Inverness.

Please note that

  • for the masses we set 1 since any value given here will be normalised for the residence time computations
  • we used dates relative to the starting date of the simulation (see also in flexpart_run())

The actual simulation is carried out by calling flexpart_run():

#Run flexpart (asynchronous call!)

r= flexpart_run(
	output_path				:	"result_bwd",
	input_path				:	"../data",
	simulation_direction	:	"backward",
	starting_date			:	20120517,
	starting_time			:	12,
	ending_date				:	20120519,
	ending_time				:	12,
	output_field_type		:	"rtime",
	output_area				:	[40,-25,66,10],
	output_grid				:	[0.25,0.25],
	output_levels			:	[100,200,300,400,500,600,700,800,900,1000,1100,1200,1500,2000,3000,4000,5000],
	release_species			:	8,
	release_units			:	"mass",
	receptor_units			:	"mass",
	output_for_each_release	:	"on",
	releases				:	rel_inv
	)
 
print(r)

Here we defined both the input and output path and specified the simulation period, the output grid and levels as well. We also told FLEXPART to generate residence time fields on output.

If we run this macro (or alternatively right-click execute the FLEXPART Run icon) the results (after a minute or so) will be available in folder 'result_bwd'. The computations actually took place in a temporary folder then Metview copied the results to the output folder. If we open this folder we will see one file here:

  • time_s001.grib is a GRIB file containing the gridded residence time fields

To process and visualise the results please see this page:

  • No labels