From gfi
Revision as of 20:23, 23 April 2020 by Hso039 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Flextract reference


Alexander Läderach, Harald Sodemann


Extract trajectories from FLEXPART particle binary format and convert them to text-based LAGRANTO lsl file format.


./flextract <settings-file>


5 mio. global FLEXPART-trajectories covering 1979-01-02 00:00 to 2019-08-30 15:00 UTC. Stored at Data/gfi/met/flexpart/erainterim/global/global_corr/ (input-path).


The minimal timestep for the trajectories to be extracted is 6 hours, for some periods 3 hours may work as well, check files in input path beforehand. The timesteps 00 06 12 18 are given by the ERA-interim reanalysis and the 03 09 15 21 timesteps are given by the forecasts of the model used to produce ERA-interim.


1. Create a link to the flextract executable, located on cyclone to your working directory:

ln -s /Data/gfi/projects/isomet/progs/flextract/flextract .

Note the 'dot' in the end of the command, for the current location. This will

2. Create a settings.txt-file with the following structure:

# --------------------------------------------------------- #
# Settings to extract FLEXPART trajectories from database # 
# NOTE: All lines beginning with # and empty ones ignored # 
# --------------------------------------------------------- #
# Path to the FLEXPART trajectory files (Input) 

# Path to store trajectories in LAGRANTO-format (Output) 

# Begin time (Year Month Day Hour Min Sec) 
# NOTE First date for which trajectories are calculated
2018 1 1 0 0 0

# End time (Year Month Day Hour Min Sec) 
# NOTE Last date for which trajectories are calculated
2018 1 3 0 0 0

# Timestep (hours) 
# NOTE always positive

# Trajectory length (hours) 
# NOTE positive for forward trajectories, negative for backward

# Only consider each nth-particle only (1=each of the 5mio. particles) 
# NOTE: could lead to huge output if too small

# Target area (minlon maxlon minlat maxlat) 
5.0 17.1 43.4 49.0

3. Run the flextract program, providing the settings file as argument:

./flextract ./settings.txt

While calculating the trajectories, a percent number will indicate progress of the extraction. The lsl trajectory files will be created in the location specified in the settings.txt file.

4. Read/plot trajectories from the files in lsl format using matlab routines located in /Data/gfi/projects/isomet/matlab:

- read_lsl.m
- traj_filter.m
- traj_plot.m
- traj_plot_vert.m