Last update in August, 2016. Service since 2002.

Lagrangian Particle Dispersion Program

FLEXCPP is a Lagrangian particle dispersion program witten in C++ based on FLEXPART. The intention is to implement parallel computing to accelerate modelling. Our tests showed that by using a multi-core CPU with a NVIDIA GPU, FLEXCPP's performance can be improved by more than 20 times. The performance gain is also significant even with only a multi-core processor.

Not all FLEXPART features have been implemented, e.g., the radioactive decay and the wet and dry depositions.

Now: you can use FLEXCPP to calculate the footprints of particles online.


The binary package and include FLEXCPP program compiled for 32-bit and 64-bit windows respectively. Inside, the files vcredist_x86.exe and vcredist_x64.exe include include Microsoft's runtime libraries that must be installed to use the program. Note the binary program does not use NVIDIA GPU.

The source package includes FLEXCPP source files and a simple make file for UNIX machine.


In a Windows machine, unpack the binary package to a directory, open a DOS window, change to the directory, and then type the command "flexcpp.exe" to show helps for its usage. The model can be configure and executed through command line options. A better way is to use "flexcpp.exe -ini filename" to initialize the model through an initial file.


Unless you change the input interface in the source code, the input data must be archived as follows:

  1. Data must be in netCDF format, in which variable types, units, and the two attributes of scale factor and offset must follow those in the given example. The program matches field variables to variables in a netcdf file according the naming rule set by an initial file.
  2. All data files for a month must be in the same directory named as "yyyymm", in which "yyyy" stands for year and "mm" for month.
  3. A data file must be named as "yyyymmddhh.cdf" with "dd" stands for day and "hh" for hour. The "-in path_to_files time_resolution " option must be set properly in the command or the initial file with correct path to data files and correct time resolution of meteorological fields.


Output files are in netCDF format. Particle positions are saved in "output/", in which "output" is the path given by the "-out" option, "id" is the release ID given by "-rel" or "rls", "" is the release date and time. Particle residence times are saved in "output/".

Model Initialization

The initial file example includes comments on options and their values for model initialization. Let's demonstrate a few scenarios, assuming that unmentioned options are set as in the initial file.

A Simple Case

The simplest case is to run the model once for one particle release:

-t1   2009   1      1    0     0
-itv  3
-len  240
-rel  Demo   10000   123.8    24.05    0.0    0.0     100.0

The "-t2" option does not have to be set because "-t1", "-bw", and "-itv" determine when to start and when to end. The "-rel" releases 10000 particles at (123.5N, 24.05E) and from 0m to 100m.

Particle Position Output

The output of particle positions is turned off by default. In case you need to know particle trajectories, you can use these options to get hourly output:

-xyz   1

Here you may want to comment out the "-ct" option line to turn off particle counting, which is responsible for estimating the meand residence time of particles in grids.

Contact: zeng @ nies . go . jp
Centre for Global Environmental Research
National Institute for Environmental Studies
16-2 Onogawa, Tsukuba, Ibaraki 305-8506, Japan