1 Introduction
Multi-scale offline Lagrangian particle dispersion models (LPDMs) are versatile tools for simulating the transport and turbulent mixing of gases and aerosols in the atmosphere. Examples of such models are the Numerical Atmospheric-dispersion Modelling Environment (NAME) , the Stochastic Time-Inverted Lagrangian Transport (STILT) model , the Hybrid Single-Particle Lagrangian Integrated Trajectory (HYSPLIT) model and the FLEXible PARTicle (FLEXPART) model . LPDMs are stochastic models that compute trajectories for a large number of notional particles that do not represent real aerosol particles but points moving with the ambient flow. The trajectories represent the transport by mean flow as well as turbulent, diffusive transport by unresolved parameterized subgrid-scale transport processes (e.g., turbulence, meandering, deep convection, etc.) and can also include gravitational settling. Each particle carries a certain mass, which can be affected by loss processes such as radioactive decay, chemical loss, or dry and wet deposition.
The theoretical basis for most currently used atmospheric particle models was laid down by . He introduced the criterion to formulate Lagrangian stochastic models that produce particle trajectories consistent with predefined Eulerian probability density functions in physical and velocity space. and provided detailed descriptions of the theory and formulation of LPDMs in constant density flows and under different atmospheric stability conditions. extended this to flows with vertically variable air density. An important characteristic of LPDMs is their ability to run backward in time in a framework that is theoretically consistent with both the Eulerian flow field and LPDM forward calculations. This was discussed by , further developed by , and extended to global-scale dispersion by and . The more practical aspects and efficiency of LPDMs were discussed by and . A history of their development was provided by .
Lagrangian models exhibit much less numerical diffusion than Eulerian or semi-Lagrangian models
The computational efficiency of LPDMs depends on the type of application. One important aspect is that their computational cost does not increase substantially with the number of species transported (excluding aerosol particles with different gravitational settling, for which trajectories deviate from each other), making multispecies simulations efficient. On the other hand, the computational time scales linearly with the number of particles used, while the statistical error in the model output decreases only with the square root of the particle density. Thus, it can be computationally costly to reduce statistical errors, and data input/output can require substantial additional resources. Generally, a high particle density can be achieved with a small number of released particles in the vicinity of a release location, where statistical errors, relative to simulated concentrations, are typically small. However, particle density and thus the relative accuracy of the results decrease with distance from the source. Methods should therefore be used to reduce the statistical error
1.1 The Lagrangian particle dispersion model FLEXPART
One of the most widely used LPDMs is the open-source model FLEXPART, which simulates the transport, diffusion, dry and wet deposition, radioactive decay, and 1st-order chemical reactions (e.g., OH oxidation) of tracers released from point, line, area or volume sources, or filling the whole atmosphere . FLEXPART development started more than 2 decades ago and the model has been free software ever since it was first released. The status as a free software is formally established by releasing the code under the GNU General Public License (GPL) Version 3. However, the last peer-reviewed publication describing FLEXPART (version 6.2) was published as a technical note about 14 years ago . Since then, while updates of FLEXPART's source code and a manual were made available from the web page at
FLEXPART can be run either forward or backward in time. For forward simulations, particles are released from one or more sources and concentrations (or mixing ratios) are determined on a regular latitude–longitude–altitude grid. In backward mode, the location where particles are released represents a receptor (e.g., a measurement site). Like in the forward mode, particles are sampled on a latitude–longitude–altitude grid, which in this case corresponds to potential sources. The functional values obtained represent the source–receptor relationship (SRR) , also called source–receptor sensitivity or simply emission sensitivity, and are related to the particles' residence time in the output grid cells. Backward modeling is more efficient than forward modeling for calculating SRRs if the number of receptors is smaller than the number of (potential) sources. explained in detail the theory of backward modeling, and gave a concrete backward modeling example. FLEXPART can also be used in a domain-filling mode whereby the entire atmosphere is represented by (e.g., a few million) particles of equal mass . The number of particles required for domain-filling simulations, not unlike those needed for other types of simulations, depends on the scientific question to be answered. For instance, a few million particles distributed globally are often enough to investigate the statistical properties of air mass transport (e.g., monthly average residence times in a particular area that is not too small) but would not be enough for a case study of airstreams related to a particular synoptic situation (e.g., describing flow in the warm conveyor belt of a particular cyclone).
FLEXPART is an offline model that uses meteorological fields (analyses or forecasts) as input. Such data are available from several different numerical weather prediction (NWP) models. For the model version described here, v10.4, data from the European Centre for Medium-Range Weather Forecasts (ECMWF) Integrated Forecast System (IFS) and data from the United States National Centers of Environmental Prediction (NCEP) Global Forecast System (GFS) can be used. Common spatial resolutions for IFS depending on the application include at 3 h (standard for older products, e.g., ERA-Interim), at 1 h (standard for newer products, e.g., ERA5) and at 1 h (current ECMWF operational data). The ECMWF IFS model currently has 137 vertical levels. NCEP GFS input files are usually used at horizontal resolution, with 64 vertical levels and 3 h time resolution. NCEP GFS input files are also available at and horizontal resolution. Other FLEXPART model branches have been developed for input data from various limited-area models, for example the Weather Research and Forecasting (WRF) meteorological model and the Consortium for Small-scale Modeling (COSMO) model , which extend the applicability of FLEXPART down to the meso-gamma scale. Notice that the turbulence parameterizations of FLEXPART are valid at even smaller scales. Another FLEXPART model version, FLEXPART–NorESM/CAM , uses the meteorological output data generated by the Norwegian Earth System Model (NorESM1-M) with its atmospheric component CAM (Community Atmosphere Model). The current paper does not document these other model branches, but most share many features with FLEXPART v10.4 and some are briefly described in Appendix . A key aspect of these model branches is the ability to read meteorological input other than that from ECMWF or NCEP.
1.2 FLEXPART and its history
FLEXPART's first version (v1) was a further development of the trajectory model FLEXTRA and was coded in Fortran 77. It provided gridded output of concentrations of chemical species and radionuclides. Its meteorological input data were based on the ECMWF-specific GRIB-1 (gridded binary) format. The model was first applied in an extensive validation study using measurements from three large-scale tracer experiments . A deposition module was added in version 2. Version 3 saw improvements in performance and the addition of a subgrid-scale terrain effects parameterization. In v3.1 the output format was optimized (sparse matrix) and mixing ratio output could optionally be produced. It also allowed for the output of particle positions. Furthermore, a density correction was added to account for decreasing air density with height in the boundary layer . Further v3 releases included the addition of a convection scheme based on , the option to calculate mass fluxes across grid cell faces and age spectra, and free format input (v3.2). The preliminary convection scheme of v3.2 was revised in v4
Version 8.0 unified the model branches based on ECMWF IFS and NCEP GFS input data in one source package but still required the building of two different executables. Importantly, Fortran 90 constructs were introduced in parts of the code, such as initial support for dynamic memory allocation. Furthermore, a global land use inventory was added, allowing for more accurate dry deposition calculations everywhere on the globe (before, land use data were provided only for Europe). The reading of the – at the time – newly introduced GRIB-2 format with the ECMWF grib_api library was implemented in v8.2. An option to calculate the sensitivity to initial conditions in backward model runs (in addition to the emission sensitivity calculations) was also implemented in v8.2. Version 8 was also the first version that distinguished between in-cloud and below-cloud scavenging for washout, relying on simple diagnostics for clouds based on grid-scale relative humidity. With a growing number of parameters defining removal processes, each species was given its own definition file, whereas in previous versions the properties for all species were contained in a single file. The gravitational settling scheme was improved in v8.2.1 , and this is briefly described in this paper in section .
For v9, the code was transformed to the Fortran 90 free-form source format. The option to read the run specifications from Fortran namelists instead of the standard input files was introduced, as described in Sect. of this paper. This change was motivated by the resulting greater flexibility, in particular with regard to setting default values, optional arguments, when new developments require adding new parameters and when specifying parameter lists. In addition, an option to produce output in compressed NetCDF 4 format was provided (see Sect. ). Another option to write some model output only for the first vertical layer to save storage space for inverse modeling applications was also introduced (see Sect. ).
1.3 FLEXPART version 10.4
For v10.4 of FLEXPART, described in this paper, several more changes and improvements were made. First, an optional new scheme applying more realistic skewed rather than Gaussian turbulence statistics in the convective atmospheric boundary layer (ABL) was developed (Sect. ). Second, the wet deposition scheme for aerosols was totally revised , introducing dependencies on aerosol size, precipitation type (rain or snow), and distinguishing between in-cloud and below-cloud scavenging (see Sect. ). The code now also allows for the reading of three-dimensional (3-D) cloud water fields from meteorological input files. Third, a method to calculate the sensitivity of deposited quantities to sources in backward mode was developed (Sect. ) Fourth, chemical reactions with the hydroxyl radical (OH) are now made dependent on the temperature and vary sub-monthly (Sect. ). Fifth, large parts of the code were parallelized using the Message Passing Interface (MPI), thus facilitating a substantial speedup for certain applications (see Sect. ), and the code was unified so that a single executable can now use both ECMWF and GFS input data. Sixth, a dust mobilization scheme that can be run as a FLEXPART preprocessor was developed (Sect. ). Seventh, the software used to retrieve data from the ECMWF has been modernized and can now also be used by scientists from non-ECMWF member states (Sect. ). Finally, a testing environment was created that allows users to verify their FLEXPART installation and compare results (Sect. ).
Despite the many changes and additions, in large part the operation of FLEXPART v10.4 still resembles the original version 1 design. Throughout this paper, we avoid repeating information on aspects of the model that have not changed since earlier model descriptions. The paper should therefore always be considered together with the publications of . To provide the necessary context for the rest of this paper, we provide a brief overview of the FLEXPART v10.4 directory structure in Table . The source code is contained in directory
Sensu stricto FLEXPART consists of the (Fortran) source files required to build an executable, not including external libraries such as those needed for input reading. The makefiles and the sample input as provided in the “options” may also be included under this term. However, in order to do real work with FLEXPART, one also needs to obtain meteorological input data (in the case of the ECMWF this is not trivial, so the
Table 1
Directory structure overview of the FLEXPART v10.4 software distribution. All listed directories are subdirectories of the installation root directory
Subdirectory or file | Contents | Description and comments | |
---|---|---|---|
path to | |||
(file) | path to | ||
path to meteorological input files | |||
path to | |||
Fortran source files | |||
see Sect. 4 and Appendix A | |||
executable file (see Sect. 4) | |||
COMMAND, RELEASES, OUTGRID, SPECIES, | user input files | ||
AGECLASSES, OUTGRID_NEST, RECEPTORS, | see Sect. 5 and Table | ||
IGBP_int1.dat, surfdata.t, surfdepo.t, OH_variables.bin | |||
list of meteorological input data files | file containing list, see Sect. | ||
FLEXPART output files | see Sect. and Table | ||
see Sect. | |||
see Sect. | |||
development tests for FLEXPART and ancillary software | see Sect. | ||
example runs illustrating various FLEXPART functionalities | and Appendix C |
This section gives an overview of the main updates of the model physics and chemistry since the last published FLEXPART version, v6.2 . Some developments have been published already separately, and in such cases we keep the description short, focusing on technical aspects of the implementation in FLEXPART that are important for model users or demonstrating applications not covered in the original papers.
2.1 Boundary layer turbulence
Subgrid-scale atmospheric motions unresolved by the meteorological input data need to be parameterized in FLEXPART. This is done by adding stochastic fluctuations based on Langevin equations for the particle velocity components . In the ABL, the stochastic differential equations are formulated according to the well-mixed criteria proposed by . Until FLEXPART version 9.2, the Eulerian probability density functions (PDFs) for the three velocity components were assumed to be three independent Gaussian PDFs. However, for the vertical velocity component, the Gaussian turbulence model is well suited only for stable and neutral conditions. In the convective ABL (CBL), turbulence is skewed since a larger area is occupied by downdrafts than by updrafts
developed an alternative Langevin equation model for the vertical particle velocity including both skewed turbulence and a vertical density gradient, which is now implemented in FLEXPART v10.4. This scheme can be activated by setting the switch
Figure shows a comparison between two simulations of dispersion from an elevated source, with the skewed and with the Gaussian turbulence model. It can be seen that the maximum time-averaged ground-level concentration is about 30 % higher for the skewed turbulence parameterization. This is the result of the plume centerline tilting downward to the surface in the vicinity of the source for the skewed turbulence case due to downdrafts being more frequent than updrafts. The plume also spreads faster in this case. These results are similar to those obtained by others
Figure 1
Comparison of FLEXPART results obtained with the skewed turbulence parameterization (a) and with the Gaussian turbulence parameterization (b). Shown are the tracer concentrations integrated over all latitudes as a function of altitude and longitude. The simulations used a point source emitting 100 kg of tracer per hour for a period starting on 1 July 2017 at 12:00 UTC and ending at 13:30 UTC. The source was located near Vienna (Austria) at N and E, 250 m above ground level. Results are averaged for the time period 12:40 to 13:00 UTC. Notice that the maximum ground-level concentration in panel (a) (ca. 7 mg m) is about 30 % higher than in panel (b) (5 mg m).
[Figure omitted. See PDF]
It is important to note that the CBL formulation smoothly transits to a standard Gaussian formulation when the stability changes towards neutral . However, the actual equation solved inside the model for the Gaussian condition is still different from the standard version as actual particle velocities rather than the scaled ones are advanced
To date, FLEXPART has mainly been used for large-scale applications. With this new CBL option, FLEXPART is now also well suited for the simulation of small-scale tracer dispersion or for the inverse modeling of point source emissions from near-field measurements – at least if the resolved winds are representative of the situation considered. In fact, to our knowledge FLEXPART is the only particle model considering both skewness in the vertical velocity distribution and vertical gradients in air density. Both these effects are particularly important in deep CBLs and can be additive with respect to simulated ground-level concentrations.
2.2 Turbulent diffusivity above the boundary layerAbove the atmospheric boundary layer, turbulent fluctuations can be represented with a turbulent diffusivity. The value of the diffusivity tensor controls the size and lifetimes of the filamentary structures caused by advection. Diffusivities are converted into velocity scales using , where is the direction. This corresponds to a mean diffusive displacement of , characteristic of Brownian motion. For , only the vertical () and horizontal () directions are considered. The value of the vertical diffusivity is related to the value of the horizontal diffusivity by the square of the typical atmospheric aspect ratio for tracer structures –250 .
FLEXPART uses by default a constant vertical diffusivity m s in the stratosphere, following Legras et al. (2003), whereas a horizontal diffusivity m s is used in the free troposphere. In general in the atmosphere, the values of the turbulent diffusivity depend on time and location, showing in particular seasonal, latitudinal and altitude variability: e.g., m s in the stratosphere and m s in the troposphere. The values can be modified by the user in the
In FLEXPART version 6.2, the stratosphere and troposphere were distinguished based on a threshold of 2 pvu (potential vorticity units), with a maximal height of 18 km in the tropics and a minimal height of 5 km elsewhere. Such a threshold is well suited to midlatitudes, but it can differ from the thermal tropopause in the polar regions and close to the Equator. In FLEXPART 10.4, the thermal tropopause definition is used and is calculated using the lapse rate definition .
2.3 Gravitational settling
Gravitational settling of aerosols is implemented in FLEXPART as a process that changes the particle trajectories. The settling velocity is determined at each time step and added to the vertical wind velocity. In simulations in which a particle represents several species, all species are transported with the settling velocity of the first species. If this is not intended, simulations for the different species must be run separately. Gravitational settling velocities are also used in the calculation of dry deposition.
In older FLEXPART versions, gravitational settling was calculated using a single dynamic viscosity of air. With FLEXPART 8.2.1, the gravitational settling calculation was generalized to higher Reynolds numbers and it takes into account the temperature dependence of dynamic viscosity. This is done in subroutine
2.4 Wet deposition
In FLEXPART, the calculation of wet scavenging is divided into three parts. First, where scavenging occurs and which form it takes is determined (e.g., below- or within-cloud scavenging). Second, the scavenging coefficient is determined. Third, the actual removal of particle mass is calculated.
With respect to the first part, it is important to understand that wet scavenging occurs only in the presence of clouds and where precipitation occurs. In air columns without clouds, above the top of the clouds, and where neither the large-scale nor the convective precipitation rate exceeds 0.01 mm h, no scavenging occurs. To quickly know where a particle is located relative to the clouds, in subroutines
With respect to the second step, the scavenging coefficient () is determined in subroutine
In the third step, the removal of particle mass due to wet deposition is calculated. It takes the form of an exponential decay process ,
1 where is the particle mass () (it can also be a mass mixing ratio, depending on settings in file
The location of clouds, the total cloud column water content and phase, and precipitation intensity and phase are needed in the calculation of the wet scavenging. Therefore, a three-dimensional cloud mask is defined in subroutine
If no cloud information is available from the meteorological data, the old RH-based scheme is still used in FLEXPART. However, nowadays, specific cloud liquid water content (CLWC; kg kg) and specific cloud ice water content (CIWC; kg kg) are available as 3-D fields in meteorological analyses from the ECMWF, and NCEP also provides the 3-D cloud water (liquid plus ice) mixing ratio (CLWMR; kg kg), from here on referred to as . A cloudy grid cell is defined when . FLEXPART v10.4 can ingest the ECMWF CLWC and CIWC either separately or as a sum (CLWCCIWC). However, to save storage space, we recommend retrieving only the sum, , from the ECMWF, as the relative fractions of ice and liquid water can be parameterized quite accurately using Eq. ().
The column cloud water (; kg m), which is needed for the in-cloud scavenging parameterization, is calculated by integrating over all vertical levels:
2 where is the density of the air in the grid cell, and is the vertical extent of the grid cell. In older FLEXPART versions, was parameterized based on an empirical equation given in using the subgrid (see below for a description of how subgrid is defined) surface precipitation rate (mm h). While such a parameterization is not needed anymore if is available, it is still activated in the case that cloud water input data are missing. However, in order to ensure that from the parameterization is statistically consistent with the cloud data, we derived the modified expression 3 using a regression analysis between existing cloud and precipitation data.
Precipitation is not uniform within a grid cell. To account for subgrid variability, it is assumed that precipitation is enhanced within a subgrid area and that no precipitation (and thus no scavenging) occurs outside this subgrid area. The subgrid area fraction and precipitation rate () are estimated from the grid-scale precipitation rate () based on values tabulated in . This parameterization of subgrid variability is used for all scavenging processes in FLEXPART and maintained from previous FLEXPART versions as described in .
The precipitation phase needed for the below-cloud scavenging scheme is simply based on ambient grid-scale temperature, with snow occurring below 0 C and rain above. For cloud water, , we assume a temperature-dependent mixture of liquid and solid particles, for which the liquid fraction () is calculated based on the local temperature , 4 where C and C. For , and for , . Even when CLWC and CIWC are available as separate fields, we derive the liquid fraction () of cloud water from the local temperature. The ice fraction is . Comparisons have shown that CLWC is very accurately reproduced by .
The cloud information should be linearly interpolated like the other variables, and situations in which the diagnosed cloud is incompatible with the precipitation rate (be it because of interpolation or because of convective precipitation accompanied by too shallow or lacking grid-scale clouds) need to receive special treatment. This is planned for a version upgrade in the near future in conjunction with a better interpolation scheme for precipitation
For gases, the scavenging coefficient, , for below-cloud scavenging is calculated as described in ,
5 where the scavenging parameters and depend on the chemical properties of the gas and are specified in the
The relevant processes of collision and attachment of ambient aerosol particles to falling precipitation depend mainly on the relationship between the aerosol and hydrometeor size and type (rain or snow) as well as to a lesser degree on the density and hygroscopicity of the aerosol. In FLEXPART v10.4, the dependence of scavenging on the sizes of both the aerosol and falling hydrometeors are taken into account by the schemes of for rain and for snow. Both schemes follow the equation 6 where , is the particle dry diameter provided in the
Parameters used in Eq. () for below-cloud scavenging.
Reference | ||||||||
---|---|---|---|---|---|---|---|---|
Rain scavenging | 274.36 | 332 839.6 | 226656 | 58 005.9 | 6588.38 | 0.24498 | ||
Snow scavenging | 22.7 | 0 | 0 | 1321 | 381 | 0 |
For in-cloud scavenging of both aerosols and gases, is calculated as described in :
7 where is the cloud water replenishment factor, which was determined empirically in (there it was named ), and is proportional to the in-cloud scavenging ratio, which is derived differently for gases and aerosols.
For gases, , where is Henry's constant (describing the solubility of the gas and specified in the
For aerosols, the in-cloud scavenging is dominated by activated particles forming cloud droplets or ice nuclei. Those may eventually combine to form a hydrometeor that falls out of the cloud, thus removing all aerosol particles contained in it. Therefore, depends on the nucleation efficiency () and : 8 describes how efficiently the aerosol particles are activated as cloud droplet condensation nuclei (CCN) or ice nuclei (IN): 9 where the relative abundances of the liquid and ice phase are accounted for by the factor . Values for the efficiencies, CCN and IN, are available from the literature for many different types of aerosols (e.g., black carbon, mineral dust particles or soluble particles) and some have been collected in
Aerosol wet scavenging controls the lifetime of most aerosols. In Fig. , we compare modeled -folding lifetimes from a number of FLEXPART simulations using different model versions and switching off in-cloud and below-cloud scavenging in FLEXPART v10.4 with measured lifetimes. The parameter settings in FLEXPART used for these comparisons were the same as used by . To derive aerosol lifetimes in a consistent way from both measurements and model simulations, a radionuclide attached to ambient aerosol and a noble gas radionuclide were used. used the same method to compare many different aerosol models, and we refer to their paper for more details on the method. For our model simulations, several size bins of aerosols were used, though total concentrations and lifetimes are largely controlled by 0.4 and 0.6 particles
Figure 2
Aerosol lifetimes estimated from the decrease in radionuclide ratios (aerosol-bound and noble gas as a passive tracer) with time after the Fukushima nuclear accident, as measured and modeled at a number of global measurement stations. For details on the method, see . -folding lifetimes, , are estimated based on fits to the data and reported in each panel. In the top panel, the observed values are shown and in subsequent panels from the top, modeled values are given for FLEXPART v9, FLEXPART v10.4, FLEXPART v10.4 with parameter settings to emulate removal as in v9, FLEXPART v10.4 with no below-cloud removal and FLEXPART v10.4 with no in-cloud removal.
[Figure omitted. See PDF]
Notice that compared to older versions of FLEXPART, the
When running FLEXPART forward in time for a depositing species with a given emission flux (kilograms per release as specified in file
As discussed in Sect. 1, running FLEXPART backward in time for calculating SRRs is more efficient than running it forward if the number of (potential) sources is larger than the number of receptors. For atmospheric concentrations (or mixing ratios), the backward mode has been available from the very beginning and in an improved form since FLEXPART v5 . This has proven very useful for the interpretation of ground-based, shipborne or airborne observations (e.g., to characterize sources contributing to pollution plumes). Furthermore, the inversion scheme FLEXINVERT that is used to determine the fluxes of greenhouse gases is based on backward simulations. However, there are also measurements of deposition on the ground, e.g., in precipitation samples or ice cores, and for this type of measurement no backward simulations were possible until recently. Therefore, introduced the option to calculate SRR values in backward mode also for wet and dry deposition, and a first application to ice core data was presented by . It is anticipated that quantitative interpretation of ice core data will be a major application of the new backward mode, which is efficient enough to allow for the calculation of, for example, 100 years of seasonally resolved deposition data in less than 24 h of computation time.
We illustrate the different backward modes and explain the required settings with an example. The calculations were run for a single receptor location, Ny-Ålesund in Spitsbergen (78.93 N, 11.92 E) and for the 24 h period from 18 August 2013 at 20:00 UTC to 19 August 2013 at 20:00 UTC. SRR values are calculated for the atmospheric concentration averaged over the layer 0–100 m a.g.l., as well as for wet and dry deposition. The substance transported is black carbon (BC), which is subject to both dry and wet deposition. Backward simulations for wet and dry deposition must always be run separately. In order to obtain SRR values for total deposition, results for wet and dry deposition need to be summed.
The backward mode is activated by setting the simulation direction,
Figure shows the resulting SRR (i.e., emission sensitivity) fields for the concentration as well as dry and wet deposition at the receptor. Dry deposition occurs on the Earth's surface, and therefore particles are released in a shallow layer adjacent to the surface. Its height is consistent with the shallow depth over which dry deposition is calculated in forward mode (user settings for the release height are ignored for dry deposition backward calculations). Dry deposition rates are the product of the surface concentration and the deposition velocity. Therefore, the SRR fields for surface concentration (Fig. a) and dry deposition (Fig. b) show similar patterns, in this case indicating high sensitivity for sources over Scandinavia and northwestern Russia. The differences in the spatial patterns are mainly due to temporal variability in the dry deposition velocity at the receptor caused by varying meteorological conditions (e.g., stability) and surface conditions during the 24 h release interval.
Figure 3
Source–receptor relationships (for emissions occurring in the lowest 100 m a.g.l.) for black carbon observed at Ny-Ålesund in Svalbard for a 24 h period starting on 18 August 2013 at 20:00 UTC. The sensitivities were calculated for (a) concentrations (s) in the layer 0–100 m a.g.l., (b) dry deposition (mm) and (c) wet deposition (mm).
[Figure omitted. See PDF]
Wet deposition, on the other hand, can occur anywhere in the atmospheric column from the surface to the top of the precipitating cloud. FLEXPART automatically releases particles in the whole atmospheric column (again, user settings for the release height are ignored), but particles for which no scavenging occurs (e.g., those above the cloud top or when no precipitation occurs) are immediately terminated. Therefore, and because of the vertical variability of the scavenging process, the sensitivity for the deposited mass can deviate significantly from the sensitivity corresponding to surface concentration. Here (Fig. c), the sensitivity is high over Scandinavia and northwestern Russia, as was already seen for surface air concentrations and dry deposition. However, in addition, sources located in North America and eastern Siberia also contribute strongly to wet deposition. The maximum over the ocean close to the North American east coast is likely due to lifting in a warm conveyor belt, followed by fast transport at high altitude.
Concentration, dry deposition and wet deposition at the receptor can be calculated from the SRR fields shown in Fig. as follows. 10 Here, is the modeled concentration (in kg m), the dry deposition rate and the wet deposition rate (both in kg m s). In this specific case with only a single scalar receptor, the source–receptor matrix degenerates to a vector of the SRR values, one for each of the three types of receptor ( for concentration in units of seconds, for dry deposition and for wet deposition, both in units of meters). In order to obtain the concentration or the deposition rates, these vectors need to be multiplied with the vector of emissions (kg m s). If the total deposition is desired, the deposition rates and can be multiplied with the receptor time interval , in our case 86 400 s (24 h). Note that this is the period during which particles are released according to the specification of the
Backward simulations with FLEXPART in the context of inverse modeling problems typically track particles for several days up to a few weeks. This is sufficient to estimate concentrations at the receptor only for species with atmospheric lifetimes shorter than this period. Many important species (e.g., greenhouse gases such as methane) have considerably longer lifetimes. For such long-lived species, most of the atmospheric concentration variability is still caused by emission and loss processes occurring within the last few days before a measurement because the impact of processes occurring at earlier times is smoothed out by atmospheric mixing. This leads to a relatively smooth “background” (in time series analyses sometimes also called a baseline) that is often a dominant fraction of the total concentration but that does not vary much with time, with short-term fluctuations on top of it. The signal of the regional emissions around the measurement site is mostly contained in the short-term concentration fluctuations but in order to use it in inverse modeling, the background still needs to be accounted for, as otherwise no direct comparison to measurements is possible.
One simple method is to estimate the background from the measurements as, e.g., in . A better approach is to use a concentration field taken from a long-term forward simulation with an Eulerian model or with FLEXPART itself, especially if nudged to observations , as an initial condition for the backward simulation. This field needs to be interfaced with the FLEXPART backward simulation by calculating the receptor sensitivity to the initial conditions
Since version 8.2, FLEXPART has provided an option to quantify the influence of initial conditions on the receptor in backward simulations, which is activated with the switch
11 where denotes the sensitivity to the initial condition and the background concentration when and where particles are terminated.
Figure shows an example of the use of the sensitivities of receptor mixing ratios (here, of methane) to both surface emissions and initial conditions. The panel (b) shows the sensitivity to surface emissions on one particular day, and the panels (c) and (d) show the sensitivity to initial conditions below and above 3000 m for the same day. Both results are from an 8 d backward simulation from one receptor site in Sweden. It can be seen that the sensitivity to emissions is highest close to the station, but there is also substantial sensitivity to emission uptake over large parts of central and eastern Europe. The particles terminated 8 d before arrival at the receptor in a roughly croissant-shaped area covering large parts of Europe and the North Atlantic, as indicated by the sensitivity to initial conditions. Most of the sensitivity is located below 3000 m but there is also some influence from higher levels. Notice that only two layers are shown in Fig. , whereas the real model output has much higher vertical resolution.
Figure 4
Example of FLEXPART 8 d backward runs for methane from a site in southern Sweden (Hyltemossa) demonstrating the combined use of sensitivities to emissions and initial conditions. (a) Time series of methane background mixing ratios and total mixing ratios in October 2016. (b) Sensitivity of the methane mixing ratio at Hyltemossa on 19 October 2016 to methane emissions at the surface. (c) Sensitivity of the methane mixing ratio at Hyltemossa on 19 October 2016 to methane initial conditions below 3000 m. (d) Sensitivity of the methane mixing ratio at Hyltemossa on 19 October 2016 to methane initial conditions above 3000 m. Blue asterisks on the maps mark the receptor location.
[Figure omitted. See PDF]
The sensitivity to initial conditions was interfaced with a domain-filling methane forward simulation as described in (not shown), while the emission sensitivity was interfaced with an emission inventory for methane (not shown), as given by Eq. (). This was done for daily simulations throughout 1 month, thus generating a time series of background mixing ratios (from the first term in Eq. only) and total mixing ratios (Fig. a). The latter include the contributions from emissions during the 8 d backward simulation. It can be seen that the methane background advected from 8 d back varies relatively little between about 1910 and 1940 ppbv, while the emission contributions vary from 0 (on 29 October) to about 200 ppbv (on 19 October, the date for which the sensitivity plots are shown).
In practical applications for inverse modeling, source–receptor sensitivities are often only needed at the surface (as most emissions occur there), while sensitivities to the background are needed in 3-D. By setting the option
The hydroxyl (OH) radical reacts with many gases and is the main cleansing agent in the atmosphere. While it is involved in highly nonlinear atmospheric chemistry, for many substances (e.g., methane) a simplified linear treatment of loss by OH is possible using prescribed OH fields. For this, monthly averaged resolution OH fields for 17 atmospheric layers are used in FLEXPART. The fields were obtained from simulations with the GEOS-Chem model and are read from the file
Tracer mass is lost by reaction with OH if a positive value for the OH reaction rate is given in the file
12 where represents the hourly photolysis rates calculated for all 3-D locations in the field, while represents the corresponding monthly mean rates, precalculated and stored in file
Figure 5
Annual and daily OH concentration variation as obtained with the simple parameterization based on photolysis rates of ozone for two locations, one in the Northern Hemisphere (a) and one in the Southern Hemisphere (b). Line labels correspond to the time of day.
[Figure omitted. See PDF]
The OH reaction rate (s) is calculated in
Backwards compatibility with the former temperature-independent specification of the OH reaction (version 9 and before) can be achieved by setting the constant in the
OH fields other than those provided with the model code have been tested in FLEXPART. These fields may have higher spatial and temporal resolution
Desert dust is a key natural aerosol with relevance for both climate and air quality. FLEXPART has been used earlier with preprocessors to initialize dust amounts from wind speed and surface properties following . Now a dust mobilization routine has been included as a preprocessing tool in FLEXPART v10.4. The scheme, called FLEXDUST, was developed to simulate mineral dust transport with FLEXPART in forward or backward simulations . This module runs independently from FLEXPART and produces gridded output of mineral dust emissions as well as input files (
In FLEXDUST, emission rates are estimated according to the emission scheme proposed by . We thereby assume that sandblasting occurs in the case that sand is present and a minimum threshold based on the size-dependent threshold friction velocity following can be applied. The following are used as input for the model: ECMWF operational analysis or ERA-Interim reanalysis data, Global Land Cover by National Mapping Organizations version 2 , and and sand and clay fractions from the . Erodibility is enhanced in topographic depressions, and dust emissions are modified by soil moisture and snow cover. The module includes high-latitude dust sources in the Northern Hemisphere. These sources are rarely included in global dust models, even though they appear important for the climate system and substantially contribute to dust in the Arctic . Icelandic deserts in particular are known to be highly active, and a high-resolution surface type map for Iceland can therefore be included in FLEXDUST simulations . Like in FLEXPART, nested meteorological fields can be used for specific regions of interest. The size distribution of emitted dust follows , is independent of friction velocity and is by default represented by 10 size bins. This can be changed depending on known properties or assumptions of dust sources. The dust particles are assumed to be spherical in FLEXPART. An example of annual mean dust emissions from 1990 to 2012 calculated with FLEXDUST driven with ERA-Interim meteorology is shown in Fig. . Further details on FLEXDUST, including model evaluation, are given by . The source code is available from the git repository:
Figure 6
Average annual dust emission for the period 1990–2012 estimated with FLEXDUST driven with ERA-Interim meteorology.
[Figure omitted. See PDF]
Figure 7
Computational time (a, b) and speedup (c, d) for up to 16 processes on a single node. In panels (a, c), all processes read meteorological input data, whereas in panels (b, d), a dedicated process reads and distributes input data for .
[Figure omitted. See PDF]
Figure 8
Computational time (a) and speedup (b) for up to 256 processes on 16 nodes. Logarithmic scaling along both axes. For a dedicated process reads and distributes input data.
[Figure omitted. See PDF]
3 ParallelizationIn a Lagrangian model like FLEXPART, particles move totally independently of each other. This facilitates efficient parallelization of the code. The most simple and often most effective way is running several instances of the model in parallel. For example, if the model is to be run backwards (for 10 d, for example) at regular intervals from a measurement site for a year, one could run the model separately, in parallel, for monthly subperiods. The total computation time of the 12 monthly processes together is nearly the same as if the model is run as one process for the whole year. Some overhead in processing input data occurs because, in the above example, 10 extra days of data per process are needed to calculate trajectories 10 d back into the preceding month. One disadvantage of that approach is that the memory needed for holding the meteorological input data and the model output fields is multiplied. However, this overhead is often small; thus, this approach has been used very often by FLEXPART users in the past.
Even if a task cannot easily be decomposed into runs for different periods or sources, trivial parallelization is still possible if a large number of particles is desired, for example in a domain-filling simulation for which tens of millions of particles may be used. The strategy in this case would be to assign a fraction of the particles to each run. Note that different random seeds should be used for each run, which requires a manual change and recompilation of the code.
As a user-friendly alternative, FLEXPART v10.4 has been parallelized using standard parallelization libraries. Common parallelization libraries are Open Multi-Processing (OpenMP;
-
It is simpler to program than a hybrid model and more flexible than a pure OpenMP model.
-
While OpenMP in principle may be more effective in a shared memory environment, MPI can often perform equally well or better provided there is not excessive communication between the processes.
-
MPI offers good scalability and potentially low overhead when running with many processes.
3.1 Implementation
The FLEXPART code contains several computational loops over all the particles in the simulation, which is where most of the computational time is spent for simulations with many particles. The basic concept behind our parallel code closely resembles the “trivial parallelization” concept described above. When launched with a number of processes, , each process will separately calculate how many particles to release per location, attempting to achieve an approximately even distribution of particles among the processes while keeping the total number of particles the same as for a simulation with the serial version. Each running process will generate an independent series of random numbers and separately calculate trajectories and output data for its set of particles. Explicit communications between processes are only used when the output fields are combined at the master process (MPI rank 0) using
Some parts of the code are not simply loops over particles, most notably the routines for reading and transforming the input meteorological data. It follows that the performance gain of using parallel FLEXPART in general is better for simulations with a larger number of particles. We have, however, implemented a feature whereby instead of having each MPI process read and process the same input data, one dedicated MPI process is set aside for this purpose. When the simulation time lies in the interval between wind field time and , all other processes calculate particle trajectories, while this dedicated process ingests input fields from time . At simulation time the dedicated “reader process” will distribute the newest data to the other processes and immediately start reading fields for time , while the other processes continue doing trajectory calculations. A hard-coded integer (
3.2 Performance aspects
To assess the performance of the parallel code we performed three scaling experiments of various size on different computational platforms.
3.2.1 40 million particles, single 16-core node
In the following we present the results from running the code on a machine equipped with an Opteron 6174 processor with 16 cores. Compilation was done using gfortran version 4.9.1 and OpenMPI version 1.8.3. For the experiment, 40 million particles were released and propagated 48 h forward in time. We ran with this setup with an increasing number of processes, from 1 to 16. All time measurements in the code were made with the
For the first experiment, every process separately processed the meteorological input data. Figure a and c show the CPU time used in the case of processes and the relative speedup factor . Time and speedup shown for “particle loops” includes the three most computationally demanding particle loops (integration of the Langevin equation, wet deposition and concentration calculations), but, in addition, FLEXPART contains a few smaller loops over particles that exhibit similar performance improvements. We see that for 40 million particles, the loops over particles take the largest share, at least 87 % of the total time when run with one process. Close-to-perfect speedup is expected and observed for these loops (compare results for “particle loops” and “ideal (particle loops)” in Fig. a and c). The major bottleneck for overall performance in this case is that each process reads the same input files from disk, thus forcing the others to wait. This bottleneck causes the speedup to deviate substantially from the ideal situation when more than a few processes are used (compare results for “total” and “ideal” in Fig. a and c).
Next we repeated the experiment above but set aside a dedicated process for reading the meteorological data whenever . The results are shown in Fig. b and d. Numerical values for the speedup factors for selected numbers of processes are given in Table . We observed that with there was consistently a benefit to setting aside the dedicated reader process, whereas for it was more effective to have all processes read data and thus an extra process available for doing the trajectory calculations. These results will of course vary with the resolution of the input data, the number of particles and the system on which the program is run.
Table 3
Computational speedup for up to 16 processes (single-node experiment) for the two different MPI modes, with 40 million released particles.
Number of processes | 1 | 2 | 4 | 8 | 16 |
---|---|---|---|---|---|
All processes read | 1 | 1.89 | 3.30 | 5.76 | 9.16 |
Dedicated read process | 1 | 1.91 | 3.09 | 6.72 | 13.10 |
We performed a larger-scale experiment at the Abel computer cluster
Owned by the University of Oslo and Uninett/Sigma2, operated by the Department for Research Computing at USIT, the University of Oslo IT department;
Run time and speedup factors are shown in Table and Fig. . As before we see essentially perfect speedup of the computationally intensive parts (the particle loops), which is expected. Table also gives the parallel efficiency, which is seen decreasing for larger . This is partly due to the increased cost of MPI communications and also because the nonparallel parts of the code have relatively higher impact. With 256 processes there are only about 2 million particles per process and the CPU time is not as clearly dominated by the particle loops as when 500 million particles all run in one process. In addition, the initialization of the code (allocation of arrays, reading configuration files) takes around 20 s for this run, which is significant given a total run time of 299 s. Thus, parallel efficiency would increase for longer simulation times and/or for simulations with more particles per process, i.e., realistic cases that are more likely to be run with such a large number of processes.
Table 4
Run time and speedup for the multi-node experiment with 500 million particles. Up to 16 nodes in the Abel cluster (University of Oslo).
Number of processes | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 |
---|---|---|---|---|---|---|---|---|---|
Total run time (s) | 39 536 | 19 681 | 14 123 | 6380 | 3061 | 1568 | 828 | 491 | 299 |
Speedup factor | 1 | 2.01 | 3.37 | 6.20 | 12.92 | 25.22 | 47.76 | 80.53 | 132.12 |
Parallel efficiency () | 1 | 1.004 | 0.843 | 0.775 | 0.807 | 0.788 | 0.746 | 0.629 | 0.516 |
Superlinear speedup (efficiency greater than 100 %) as seen here is usually attributed to memory and/or cache effects.
3.2.3900 000 particles, laptop and single 16-core node
Finally, we examined a small-scale experiment in which we released 900 000 particles and simulated 15 d of transport. The performance was tested on two systems; a ThinkPad P52s laptop (Intel i7-8550U CPU with four cores; results in Table ) and a machine equipped with an AMD Opteron 6386 SE processor (16 cores; results in Table ). With this relatively lower number of particles it is not surprising to see that the parallel efficiency is lower than in the preceding examples. Still, we see that a speedup of 2.38 on a 4-core laptop and 5.25 on a 16-core machine is attainable. We also note that for practical applications, users would likely use the serial version for applications with so few particles and, if there are many such runs to be done, use trivial parallelization by submitting many separate serial runs in parallel. The parallelization feature is most useful for cases with a very large number of particles that cannot so easily be split in many separate runs, such as domain-filling simulations.
Table 5Run time and speedup using up to four cores on a ThinkPad P52s laptop (900 000 particles).
Number of processes | 1 | 2 | 3 | 4 |
---|---|---|---|---|
Total run time (s) | 3504 | 2035 | 1790 | 1470 |
Speedup factor | 1 | 1.72 | 1.97 | 2.38 |
Parallel efficiency () | 1 | 0.86 | 0.66 | 0.775 |
Run time and speedup using up to 16 cores on a machine equipped with an AMD Opteron 6386 SE processor (900 000 particles).
Number of processes | 1 | 2 | 4 | 6 | 8 | 10 | 12 | 16 |
---|---|---|---|---|---|---|---|---|
Total run time (s) | 3788 | 2337 | 1376 | 976 | 840 | 765 | 747 | 717 |
Speedup factor | 1 | 1.62 | 2.75 | 3.88 | 4.51 | 4.95 | 5.07 | 5.29 |
Parallel efficiency () | 1 | 0.81 | 0.69 | 0.65 | 0.56 | 0.50 | 0.42 | 0.33 |
In order to ensure that the parallel version produces results with the same accuracy as the serial version, we have performed a set of tests and validation experiments. A direct comparison between the versions can only be performed in statistical terms because FLEXPART uses Gaussian-distributed random numbers for calculating the turbulent velocities of the particles. For the parallel version we let each process independently calculate a set of random numbers, which leads to small numeric differences (arising from the random “noise”) between the versions.
To confirm that the only source of differences between the serial and parallel code is in the random number generation, we first observe that when the parallel executable is run using only one process, it produces results identical to the serial version. This is as expected, as the first MPI process (rank 0) always uses the same random number seeds as the serial version.
Next, we have done tests in which all random numbers are set to zero in both codes, corresponding to switching off the turbulent displacements, and we run the parallel version using multiple processes. The outputs from the serial and parallel versions of the code when run this way are identical except for small differences due to round-off errors (e.g., in concentration calculations – these round-off errors are typically larger in the serial version due to the larger number of particles).
4 Installation, compilation and execution
FLEXPART is usually used in a Linux environment, which we also assume for the following instructions. However, the model has also been implemented successfully under MacOS and MS Windows. The default Fortran compiler for FLEXPART v10.4 is gfortran, but ifort, Absoft and PGI compilers have been used as well.
4.1 Required libraries and FLEXPART download
As the meteorological data from numerical weather prediction models are usually distributed in GRIB format, a library for reading GRIB data is required. It is recommended to use
The
In order to obtain the FLEXPART source code, download the appropriate v10.4 tarball from the FLEXPART website
The website,
This repository mirrors
The directory
4.2 Compiling and running the serial version
After correctly setting the library paths in the makefile, the command
4.3 Compiling and running the parallel version
Most subroutines calling MPI functions are in a single module named
In order to compile and run the parallel version, an MPI library must be installed, either as a package from the distribution or built from source code. Both OpenMPI (
5 FLEXPART input
In this section, we describe the different FLEXPART input files and, where appropriate, changes that have occurred since the last publication . FLEXPART needs the following three types of input files.
-
The text file
pathnames is located by default in the directory where FLEXPART is executed. It must contain at least four lines: first, the path to the directories where run-defining input files are located (the so-calledoptions directory); second, the path where output files are created; third, the path to the meteorological input GRIB files; and, fourth, the path to the so-calledAVAILABLE file (see point 3). The last two lines can be repeated if nested input data shall be used. For each nesting level, one line for the GRIB data directory and one for the correspondingAVAILABLE file are needed. -
The files containing the run-defining settings are located in a subdirectory (given in line 1 of
pathnames ) by default calledoptions (see Table ). The settings, which control FLEXPART's physics and program flow, are stored in different text files listed in Table and described in Sect. . In addition, theoptions directory contains data files that are not usually changed by the user. -
The meteorological input data, one file for each input time, are stored in GRIB format in a common directory (specified in line 3 of
pathnames ). To enable FLEXPART to find these files, a file usually namedAVAILABLE (given in line 4 ofpathnames ) contains a list of all available meteorological input files and their corresponding time stamps. Additional files containing nested input data may also be provided. In this case, a separate file containing the input file names (e.g., namedAVAILABLE_NESTED ) must be given. Date and time entries in theAVAILABLE* files for mother and nested fields must be identical. Details on the meteorological input data are given in Sect. .
Table 7
Alphabetical list of the run-defining input files (upper part) and static input files (lower parts), usually contained in a directory called
File name | Content |
---|---|
AGECLASSES | Age class definitions |
COMMAND | Main control parameters |
OUTGRID | Output grid definition |
OUTGRID_NEST | Nested output grid definition |
RECEPTORS | Receptor locations for receptor kernel output |
RELEASES | Specification of the sources (forward run) or receptors (backward run) |
SPECIES/ | Directory containing files with definitions of physical and chemical parameters of species referenced in |
IGBP_int1.dat | Land cover input data |
surfdata.t | Roughness length, leaf area index for different land cover types |
surfdepo.t | Seasonal surface resistances for different land cover types |
OH_variables.bin | OH field |
Run-defining settings: the
Here, we give an overview of the information provided in the run-defining FLEXPART user input files listed in Table . In previous versions of FLEXPART, these files were formatted text files (coming alternatively in a long and a short format). For backward compatibility, these plain text formats are still supported. However, FLEXPART v10.4 also allows for the use of namelists, a standard Fortran feature whereby values are provided in a list with elements of the form
To convert user input files of any format to namelist format, the switch
In the following, we provide reference tables of the run-defining user input files including default settings (in bold) when using the namelist format. Notice that the default values are appropriate for regional-scale simulations, but simulations on smaller scales or with higher accuracy may need adjustments (in particular, shorter time steps and the use of the new CBL scheme).
5.1.1File
The
Contents of the user input file
Variable name | Description | Value (default) | |
---|---|---|---|
1 | LDIRECT | Simulation direction in time | 1 (forward) or (backward) |
2 | IBDATE | Start date of the simulation | YYYYMMDD: YYYY=year, MM=month, DD=day |
3 | IBTIME | Start time of the simulation | HHMISS: HH hours, MI=minutes, SS=seconds. UTC zone. |
4 | IEDATE | End date of the simulation | Same format as IBDATE |
5 | IETIME | End time of the simulation | Same format as IBTIME |
6 | LOUTSTEP | Interval of model output | Average concentrations are calculated every LOUTSTEP (10 800 s) |
7 | LOUTAVER | Concentration averaging interval, instantaneous for value of zero | (10 800 s) |
8 | LOUTSAMPLE | Numerical sampling rate of output, higher statistical accuracy with shorter intervals | (900 s) |
9 | ITSPLIT | Time constant for particle splitting (particles are split in two after a given time) | (999 999 999 s) |
10 | LSYNCTIME | All processes are synchronized to this time interval; it has to divide all values above | (900 s) |
11 | CTL | Factor by which particle transport time step in the ABL must be smaller than the Lagrangian timescale ; resulting time steps can be shorter than LSYNCTIME; LSYNCTIME is used if CTL | for time steps shorter than ; if CTL , a purely random walk simulation is done (–5.0) |
12 | IFINE | Additional reduction factor for time step used for vertical transport only considered if CTL | Positive integer (4) |
13 | IOUT | Switch determining the output type | (1) mass concentration (residence time backwards), 2 volume mixing ratio, 3 both 1 and 2, 4 plume trajectories, 5 both 1 and 4.Add 8 for NetCDF output |
14 | IPOUT | Switch for particle position output | (0) no particle output, 1 particle output every output interval, 2 only at the end of the simulation (useful, e.g., for warm start) |
15 | LSUBGRID | Increase in ABL heights due to subgrid-scale orographic variations | (0)=off, 1=on |
16 | LCONVECTION | Switch for convection parameterization | 0=off, (1)=on |
17 | LAGESPECTRA | Switch for calculation of age spectra (needs file | (0)=off, 1=on |
18 | IPIN | Warm start simulation, restarted from a particle dump (needs | (0)=no, 1=yes |
19 | IOER | Separate output fields for each location in the RELEASE file | (0)=no, 1=yes |
20 | IFLUX | Output of mass fluxes through output grid box boundaries (northward, southward, eastward, westward, upward and downward) | (0)=off, 1=on |
Continued.
21 | MDOMAINFILL | Switch for domain-filling calculations: particles are initialized to reproduce air density or stratospheric ozone density; for limited-area simulations, particles are generated at the domain boundaries | (0)=no, 1 like air density, 2 stratospheric ozone tracer |
22 | IND_SOURCE | Unit to be used at the source; see | (1)=mass, 2=mass mixing ratio |
23 | IND_RECEPTOR | Unit to be used at the receptor; see | (1)=mass, 2=mass mixing ratio, 3=bwd. wet. dep., 4=bwd. dry. dep. |
24 | MQUASILAG | Quasi-Lagrangian mode to track individual numbered particles | (0)=off, 1=on |
25 | NESTED_OUTPUT | Switch to produce output also for a nested domain | (0)=no, 1=yes |
26 | LINIT_COND | Switch to produce output sensitivity to initial conditions given in concentration or mixing ratio units (in backwards mode only) | (0)=no, 1=mass concentration, 2=mass mixing ratio |
27 | SURF_ONLY | Output of SRR for fluxes only for the lowest model layer, most useful for backward runs when LINIT_COND set to 1 or 2 | (0)=no, 1=yes |
28 | CBLFLAG | Skewed rather than Gaussian turbulence in the convective ABL; when turned on, very short time steps should be used (see CTL and IFINE) | (0)=no, 1=yes |
29 | OHFIELDS_PATH | Default path for OH file | |
30 | d_trop | Tropospheric horizontal turbulent diffusivity | |
31 | d_strat | Stratospheric vertical turbulent diffusivity |
File
The
Contents of the user input file
Variable name | Description | Format, valid values, variable type |
---|---|---|
Header (written only once and valid for all releases) | ||
NSPEC | Total number of species | Integer number |
SPECNUM_REL | Species numbers in dir. | Integer array of size NSPEC |
For each release | ||
IDATE1 | Release start date | YYYYMMDD: YYYY=year, MM=month, DD=day |
ITIME1 | Release start time in UTC | HHMISS: HH hours, MI=minutes, SS=seconds; integer |
IDATE2 | Release end date | Same format as IDATE1 |
ITIME2 | Release end time in UTC | Same format as ITIME1 |
LON1 | Left longitude of release box | LON1 , or according to input winds; real |
LON2 | Right longitude of release box | Same format as LON1; real |
LAT1 | Lower latitude of release box | LAT1 , or according to input winds; real |
LAT2 | Upper latitude of release box | Same format as LAT1; real |
ZKIND | Reference level | 1: meters above ground, 2: meters above sea level, 3: pressure (hPa); integer |
Z1 | Lower height of release box | Meters above reference level; real |
Z2 | Upper height of release box | Meters above reference level; real |
PARTS | Total number of particles to be released | Integer |
For each species (NSPEC times) | ||
MASS | Total mass emitted | in, e.g., kilograms or unitless for mixing ratio; 1 in backward mode; real |
COMMENT | Comment | 40-character string (e.g., name of release point) |
The subdirectory
Notice that the format of the
FLEXPART variables set in the user input file
Variable name | Description | Unit | Type | |
---|---|---|---|---|
1 | Tracer name | no units | string | |
2 | Species half-life for radioactive or chemical decay; off if | seconds | real | |
3 | Gases wet deposition: below-cloud scavenging parameter (for precip. of 1 mm h) | s | real | |
4 | Gases wet deposition: below-cloud scavenging parameter (dependency on precip. rate) | 1 | real | |
5 | Aerosols wet deposition: below-cloud scavenging rain collection efficiency moderator for rain | 1 | real | |
6 | Aerosols wet deposition: below-cloud scavenging rain collection efficiency moderator for snow | 1 | real | |
7 | Aerosols wet deposition: in-cloud scavenging, cloud condensation nuclei efficiency CCN | 1 | real | |
8 | Aerosols wet deposition: in-cloud scavenging, ice nuclei efficiency IN | 1 | real | |
9 | Gases dry deposition: ratio , of the diffusivity of to the diffusivity of the component (the diffusivity of the species in the | 1 | real | |
10 | Gases dry deposition and in-cloud scavenging: Henry's constant | M atm | real | |
11 | Gases dry deposition: reactivity factor for oxidation of biological substances relative to that of ozone; () For nonreactive species is 0, for slightly reactive species it is 0.1 and for highly reactive species it is 1 | 1 | real | |
12 | Aerosols dry deposition and settling: particle density | real | ||
13 | Aerosol dry deposition, aerosol wet deposition: below-cloud scavenging: particle mean diameter | m | real | |
Decides whether its gas(<=0) or aerosol () | ||||
14 | Aerosol dry deposition: species diameter normalized deviation () | 1 | real | |
15 | Gases dry deposition: dry deposition velocity (only used if | m s | real | |
16 | Gases: species molar weight, used for volume mixing ratio (pptv) output | g mol | real | |
17 | Gases OH reaction: C | cm molecule s | real | |
18 | Gases OH reaction: D | K | real | |
19 | Gases OH reaction: N | 1 | real | |
20 | Emission variation factor (area source) for hour of the day, starting with 00:00–01:00 local time, 24 values | 1 | real | |
Local time from longitude, no correction for summer time | ||||
21 | Emission variation factor (area source) for day of the week, starting with Monday, 7 values | 1 | real | |
22 | Emission variation factor (point source) for hour of the day, starting with 00:00–01:00 local time, 24 values | 1 | real | |
Local time from longitude, no correction for summer time | ||||
23 | Emission variation factor (point source) for day of the week, starting with Monday, 7 values | 1 | real |
The following specifies the parameters associated with each physicochemical process simulated.
-
Radioactive or chemical decay: set with
pdecay ; off ifpdecay<0 . -
Wet deposition for gases: set with
pweta_gas ,pwetb_gas (for below-cloud) andphenry (for in-cloud). Switch off for both in- and below-cloud if eitherpweta_gas orpwetb_gas is negative. -
Wet deposition for aerosols: set with
pccn_aero ,pin_aero for in-cloud scavenging andpcrain_aero ,pcsnow_aero andpdquer for below-cloud scavenging. -
Dry deposition for aerosols: set with
pdensity ,pdquer andpsigma ; off ifpdensity . -
Dry deposition for gases: set with
phenry ,pf0 andpreldiff ; off ifpreldiff . Alternatively, a constant dry deposition velocitypdryvel can be given. -
Settling of particles: set with
pdensity andpdquer . -
OH reaction: chemical reaction with the OH radical can be turned on by giving parameter
pohcconst (cm molecule s),pohdconst (K) andpohnconst (no unit) positive values; defined by Eq. (). -
Emission variation: emission variation during the hours (local time) of the day and during the days of the week can be specified. Factors should be 1.0 on average to obtain unbiased emissions overall. The area source factors (useful, e.g., for traffic emissions) are applied to emissions with a lower release height below 0.5 m above ground level (a.g.l.) and the point source factors (useful, e.g., for power plant emissions) to emissions with a lower release height than 0.5 m a.g.l. Default values are 1.0.
File
The
File
Output can also be produced on one nested output grid with higher horizontal resolution, defined in the file
File
The option to produce age class output can be activated in the
File
In addition to gridded model output, it is also possible to define receptor points. With this option output can be specifically produced for certain points at the surface in addition to gridded output. The
Several files contain static input data that are not usually modified by the user. These are (by default) also located in the
5.2 Meteorological data and preprocessing routines
FLEXPART can be run with meteorological input data for global domains or for smaller, limited-area domains. The FLEXPART computational domain always corresponds to this mother domain set by the input data, while the output domain can be smaller. FLEXPART can also ingest higher-resolution meteorological input data in subdomains of the mother domain. Such nested data must be available for the exact same times as those for the mother domain, checked by FLEXPART by comparing the time stamps in the two
Compilation of FLEXPART v10.4 produces a single executable that automatically detects whether the meteorological input data come from the ECMWF IFS or NCEP GFS and whether they are in GRIB-1 or in GRIB-2 format. Nevertheless, certain parameters may need to be adapted in
5.2.1 ECMWF data retrieval
ECMWF data can be comprised of analysis and/or forecast data from the operational IFS data stream or specific reanalysis projects. For operational data, the meteorological fields can currently have a maximal temporal resolution of 1 h (more frequent data are not available), a vertical resolution of 137 model levels and horizontal resolution on a regular latitude–longitude grid. Other ECMWF datasets are not available at such high horizontal resolution. For example, ERA-Interim reanalysis data with latitude–longitude resolution and 60 vertical levels can be retrieved 3-hourly by mixing 6-hourly analysis and 3 h forecast fields, but higher resolution is not available from the standard archive. The new Copernicus reanalysis ERA5 provides 1-hourly analysis fields with 137 model levels and a horizontal resolution of 31 (0.28125). Notice that access to some datasets, in particular the operational forecasts, is restricted and requires specific access (
The IFS is a global model that uses spectral representation with spherical harmonics for the dynamical part and a grid-point representation on a reduced Gaussian grid for the physical part. However, FLEXPART needs the input data on a regular latitude–longitude grid, and thus IFS data have to be preprocessed. With respect to the vertical coordinate system, the data need to be on the native ECMWF model levels ( levels), which are subsequently transformed within FLEXPART to a terrain-following vertical coordinate system.
As explained above, each ECMWF dataset has its own specific temporal and spatial resolution, and the meteorological parameters provided can be different from dataset to dataset. To produce meteorological GRIB files suitable for FLEXPART input from these different datasets, a software called
The ECMWF is a European intergovernmental organization that grants full access to its multi-petabyte MARS archive for their member and cooperating states. Users with a full-access account can run
The
The
5.2.2 NCEP data retrieval
Meteorological data from the NCEP GFS are freely available, easily accessible and ingested by FLEXPART on pressure levels, unlike ECMWF data. These pressure-level data have lower resolution than model-level data but offer the advantage of great consistency between different datasets. Therefore, preprocessing NCEP data is much simpler than ECMWF data and limited to precipitation data, which are available only in forecast fields.
Both operational analysis data and several reanalysis datasets are available. Notice that NCEP also provides forecast data for free, which are not available from the ECMWF even for member state users except for national meteorological services or users with a special contract. The data retrieval from NCEP is described in a wiki page on the FLEXPART website (
6 FLEXPART output
6.1 Output files overview
In the following we describe the FLEXPART output files together with changes made since the last documented FLEXPART version . An overview of all possible output files is provided in Table . Notice that not all these files are written out in every model run; the user settings control which files are produced. At the beginning of a run, FLEXPART records descriptive metadata in the binary file
Table 11
List of FLEXPART output files and for which user settings (“switches”) they are produced. See Table for details on the units in the gridded output.
Name | Format | Switches | Description of contents |
---|---|---|---|
binary | default output | run metadata + ancillary data | |
text | default output | human-readable run metadata (from | |
text | default output | human-readable run metadata (from | |
text | default output | time series: dates of output files | |
binary (sparse array) | 3-D tracer mass density 2-D deposition | ||
binary (sparse array) | 3-D tracer volume mixing ratio 2-D deposition | ||
binary (sparse array) | 3-D sensitivity of atmospheric receptor to emissions | ||
binary (sparse array) | 3-D sensitivity of dry deposition receptor to emissions | ||
binary (sparse array) | 3-D sensitivity of wet deposition receptor to emissions | ||
binary (NetCDF) | 3-D tracer 2-D wet and dry deposition | ||
binary (NetCDF) | 3-D sensitivity of atmospheric receptor to emissions | ||
binary (NetCDF) | 3-D sensitivity of dry deposition receptor to emissions | ||
binary (NetCDF) | 3-D sensitivity of wet deposition receptor to emissions | ||
binary (sparse array) | 3-D sensitivity of receptor concentrations and deposition to initial conditions | ||
binary | particle positions and meteorological data | ||
particle positions and meteorological data numbered consecutively | |||
binary | time-averaged particle positions and meteorological data | ||
text | clustered trajectories | ||
binary | mass density at receptors | ||
binary | volume mixing ratio at receptors | ||
binary | nest metadata + ancillary data | ||
binary (sparse array) | |||
binary (sparse array) | as for mother grid | as for mother grid in a | |
binary (sparse array) | + | higher-resolution latitude–longitude grid | |
binary (sparse array) | |||
binary (sparse array) | |||
binary (NetCDF) | |||
binary (NetCDF) | |||
binary (NetCDF) | |||
binary (NetCDF) |
At each output time, FLEXPART produces files containing the gridded output. Separate files are created for every species and domain (mother and, if requested, nest). The naming convention for these files is
Wet and dry deposition fields in forward runs are calculated on the same horizontal output grid and are appended to
For a list of points at the surface, concentrations or mixing ratios in forward simulations can also be calculated independently from the grid using a kernel method and recorded in the files
If the particle dump option is activated, in addition to the gridded output, the particle coordinates together with additional variables such as pressure, humidity, density, tropopause height, ABL height and orography height are recorded in the binary files
The physical unit used for the output data in the files
Physical units of the input (in file
Direction | File name | Input unit | Output unit | ||
---|---|---|---|---|---|
Forward | 1 | 1 | kg | ng m | |
1 | 2 | kg | ppt by mass | ||
2 | 1 | 1 | ng m | ||
2 | 2 | 1 | ppt by mass | ||
1 | 1 or 2 (dep.) | kg | ng m | ||
2 | 1 or 2 (dep.) | 1 | ng m | ||
1 | 1 | 1 | ppt by volume | ||
Backward | 1 | 1 | 1 | s | |
1 | 2 | 1 | s m kg | ||
2 | 1 | 1 | s kg m | ||
2 | 2 | 1 | s | ||
1 | 3 (wet dep.) | 1 | m | ||
1 | 4 (dry dep.) | 1 | m | ||
2 | 3 (wet dep.) | 1 | kg m | ||
2 | 4 (dry dep.) | 1 | kg m | ||
1 | 1 | 1 | 1 | ||
1 | 2 | 1 | m kg | ||
2 | 1 | 1 | kg m | ||
2 | 2 | 1 | 1 |
Depending on the type of model run, the gridded output can contain many grid cells with zero values (e.g., dispersion from a point source, backward run from a single receptor). The output is therefore written in a sparse matrix format, which is specific to FLEXPART. The array containing the data to be written out is scanned for sequences of nonzero values. The number of sequences found is stored in an integer variable
6.3 NetCDF output
FLEXPART v10.4 can also support output in NetCDF format if the NetCDF libraries are available. To activate NetCDF support, append
The NetCDF output file contains information on the run settings and the simulation grid from the
Table 13
Additional information in the NetCDF output file as attributes.
Conventions | CF-1.6 (NetCDF CF convention identifier) |
Title | FLEXPART model output (content title) |
Institution | producer string “institution” set in |
Source | creation string “flexversion” model output set in |
History | date string with login and host name |
References | Stohl et al. (2005) |
For the NetCDF output of FLEXPART, standard visualization tools, for example Panoply, can be used. For the sparse matrix binary output, several post-processing routines (MATLAB, Fortran, R, Python and IDL) have been developed in order to assist in the usage and analysis of these data. A number of post-processing tools are available online (
Fortran routines are available for download on the FLEXPART website with the subroutines
There are also MATLAB tools working in a similar way as the Fortran routines, with
The R programs available for post-processing FLEXPART output include routines to read the binary output in the
Several Python tools are available for reading FLEXPART data from release 8.0 and above. The module
7 Application examples
In this section we provide 38 examples of the FLEXPART model that serve three purposes: (1) verification of a new FLEXPART installation; (2) demonstration of the model capabilities for new users; and (3) confirmation of consistency in the model output when code changes are made that should not change the results. These examples do not represent an exhaustive set of all possible model uses, but they are designed to demonstrate and test different widely used functionalities of the model.
All examples are variations of a default example case, which uses the settings in the user input files as distributed with the FLEXPART v10.4 code package. These default input files are located in the directory
Using the default example as a basis, the different functionalities of the model can be activated by adequately changing certain parameters in the user input files, thereby generating 36 other example runs. We have categorized these examples into 10 different groups; each group explores different capabilities of the model. Table lists all examples and the parameter changes needed to produce them. The first group includes the default example and explores the different options for producing gridded model output (e.g., output units, output formats) for a simple forward model run with a single starting point over the North Atlantic. The second group of examples introduces FLEXPART's backward simulation capability. The third group demonstrates different usages of the particle dump output. The fourth group gives examples for the use of mass vs. mass mixing ratio units at both the source and the receptor and for both forward and backward simulations to establish source–receptor relationships as in . The fifth group produces output for different chemical species and aerosols. The sixth group illustrates the use of nested output fields. Group seven is constituted by a single domain-filling run, as used, for instance, in . Group eight contains settings for a backward run providing 2-D sensitivities to gridded surface fluxes and 3-D sensitivities to initial conditions, as they are typically required for the inverse modeling of greenhouse gases
Table 14
List of the test cases for FLEXPART 10.4.
Group | Test name | Change to default options | Description |
---|---|---|---|
(1) Gridded output | 1 | default (IOUT=1) | default option: forward run with mass concentration output; see Table |
2 | IOUT=2 | mixing ratio | |
3 | IOUT=3 | concentration and mixing ratio | |
5 | IOUT=5 | concentration and trajectory cluster | |
9 | IOUT=9 | mass concentration in NetCDF output format | |
10 | IOUT= 10 | mixing ratio in NetCDF output format | |
11 | IOUT= 11 | concentration and mixing ratio in NetCDF output format | |
(2) Backward | bwd | LDIRECT= | SRR |
bwd5 | LDIRECT=, IOUT=5 | backward trajectory cluster | |
bwd_nc | LDIRECT=, IOUT=9 | SRR in NetCDF output format | |
(3) Particles | part1 | IPOUT= 1 | particle dump |
part2 | IPOUT=2 | particle dump at end of simulation | |
part_bwd1 | IPOUT=1, LDIRECT= | backward trajectories | |
(4) Units | ind_1_2 | IND_RECEPTOR=2 | receptor (gridded) in mass mixing ratio units |
ind_2_1 | IND_SOURCE=2 | source in mass mixing ratio units | |
ind_2_2 | IND_SOURCE=2, IND_RECEPTOR= 2 | source and receptor in mass mixing ratio units | |
bwd_ind_1_2 | IND_RECEPTOR=2, LDIRECT= | receptor in mass mixing ratio units, backward | |
bwd_ind_2_1 | IND_SOURCE=2, LDIRECT= | source in mass mixing ratio units, backward | |
bwd_ind_2_2 | IND_SOURCE=2, IND_RECEPTOR=2, LDIRECT= | source and receptor in mixing ratio units, backward | |
(5) Species | specNO | SPECNUM_REL=3 | nitric oxide species |
specCO | SPECNUM_REL=22 | carbon monoxide species | |
specAERO-TRACE | SPECNUM_REL=23 | idealized aerosol simulation | |
specBC | SPECNUM_REL=40 | black carbon simulation | |
(6) Nests | nested | NESTED_OUTPUT= 1 | nested output |
nested_mr | NESTED_OUTPUT=1, IOUT=2 | volume mixing ratio nested output | |
nested_bwd | NESTED_OUTPUT=1, LDIRECT= | nested output backwards | |
nested_nc | NESTED_OUTPUT=1, IOUT=9 | nested output in NetCDF format | |
nested_mr_nc | NESTED_OUTPUT=1, IOUT=10 | volume mixing ratio nested output NetCDF | |
nested_bwd_nc | NESTED_OUTPUT=1, LDIRECT=, IOUT=9 | nested output backwards in NetCDF output format | |
(7) | DOMAINFILL | MDOMAINFILL= 1 | domain-filling run |
(8) Init. cond. | init_cond | LINIT_COND=1, LDIRECT= | sensitivity to initial conditions |
init_cond_ind_1_2 | LINIT_COND=1, LDIRECT=, IND_RECEPTOR=2 | sensitivity to initial conditions in mixing ratio | |
init_cond_surf | LINIT_COND=1, SURF_ONLY=1, LDIRECT= | sensitivity to initial conditions adapted to surface fluxes | |
(9) CBL | CBLFLAG | CBLFLAG=1, CTL=40, IFINE=5 | skewed turbulence |
CBLFLAG_bwd | CBLFLAG= 1, LDIRECT=, CTL=40, IFINE=5 | skewed turbulence backwards | |
(10) B.d. | bwd_ind_1_3 | IND_RECEPTOR=3, LDIRECT= | backward wet deposition |
bwd_ind_1_4 | IND_RECEPTOR=4, LDIRECT= | backward dry deposition | |
(11) | Volc | Modified | hypothetical volcanic eruption |
Figure 9
Hypothetical Grímsvötn eruption on 1 April 2015 at 00:00 UTC (instantaneous release). Total column concentrations are shown () 18 h after the eruption.
[Figure omitted. See PDF]
The list of examples may be extended in the future to allow for the testing of even more model features and to provide a reference archive to see how FLEXPART results may change as the code is being developed further. The user can get these reference results from
The directory
After the input data files are generated, all examples can be executed interactively from the command line. Alternatively, the script
In this paper, we have described the Lagrangian particle dispersion model FLEXPART v10.4; 2 decades ago, the model code was developed mainly by one person, with specific code input from a few other researchers. At that time, no specific measures were needed to ensure code consistency, track code changes or identify coding bugs. However, as the number of FLEXPART users has grown substantially in recent years, more and more people have started to develop the code, contributed code snippets, and reported or identified bugs. The resulting code changes range from the adaptation of more modern coding standards, parallelization and efficiency enhancements, the improvement of the model functionality, and the addition of output options, to revisions and extensions of the model physics. All this has been documented in this paper. Integration of all these changes into a single stable model version represents a growing challenge in itself, and efforts to address this challenge (e.g., model website and repository, version control, testing environment) have also been documented here.
As FLEXPART is developed further, updates will continue to be made available on the FLEXPART website at
Code and data availability
The code described in this work is archived as flexpart10.4.tar at 10.5281/zenodo.3542278 (). FLEXPART downloads are available at
Appendix A
Installing FLEXPART and
Here, we provide step-by-step instructions on how to install FLEXPART on Linux from scratch. This has been tested on an Ubuntu 16.4 distribution running on a dedicated instance in the Amazon cloud.
Notice that in most environments, some or all of the required libraries (e.g., a Fortran compiler) are already installed and an installation totally from scratch would thus not be needed.
In such cases, we strongly recommend that these libraries are used instead of installing everything from scratch.
However, sometimes it may be necessary to install them from source (e.g., to avoid incompatibilities between different compilers or different versions of the same compiler).
In the following, we assume that the user has root privileges in the system, but it is also possible for normal users to install the libraries in nonstandard locations.
It is possible to ask for help by writing to the FLEXPART user email list (registration needed) or by creating a ticket on the community website at
To begin, ensure that the latest packages are being used. This section is for completeness only, and most users (if not starting from a new system installation) can skip it and jump to Sect. .
FLEXPART is developed using gfortran.
Some libraries (e.g.,
Newer packages (e.g., ecCodes) use CMake instead.
Python is not required for FLEXPART itself but is necessary for some preprocessing and post-processing tools, in particular
A2 Installing GRIB libraries
If JPG compression is needed to decode the input meteorological winds, download the jasper library from the jasper project page (
Download the grib_api library from the ECMWF website (
If you have no root privileges in your system, give the full path of
For future versions, ensure that the path
The ecCodes requires CMake. The installation procedure is described on the ECMWF ecCodes web page.
A3 Installing NetCDF libraries
NetCDF output is optional. In order to enable NetCDF output, the NetCDF library has to be available in the system.
For building the NetCDF library it is recommended to first build HDF5 with
support for compression (zlib). For this, download zlib (version 1.2.8) from the zlib website (
Download HDF5 from the HDF Group website (
Download the latest stable version of NetCDF–C from the Unidata
website (
Download the latest stable version of NetCDF–Fortran from the Unidata
website (
A4 Installing FLEXPART
Download the latest release of the FLEXPART source from the FLEXPART
community website (
Alternatively, clone the FLEXPART repository directly from the FLEXPART community site git.
This mirrors
in order to create the executable.
Invoking the executable
However, without access to valid input data, the program will issue an error. Appendix C explains how to generate valid output with the standard meteorological fields from the ECMWF that can be obtained following the procedure described in Sect. . The makefile also allows the following command.
This can be used to safely remove all object and module files, e.g., if one wants to recompile after compiler option changes.
A5
Installing
A short description of the installation steps for this software is given for the public user mode (other modes are described in the
First of all, the user should register at the ECMWF website (
System preparation for
-
For important information read the
Emoslib (https://software.ecmwf.int/wiki/display/EMOS/Emoslib , last access: 13 October 2018) installation instructions first. -
Read the ECMWF blog about gfortran (
https://software.ecmwf.int/wiki/display/SUP/2015/05/11/Building+ECMWF+software+with+gfortran , last access: 13 October 2018) for details on the installation process of the libraries. -
Install
FFTW (http://www.fftw.org , last access: 13 October 2018) for Fortran, which is a library for computing the discrete Fourier transformation. This library is necessary forEmoslib . (Note: applymake twice! Once without any options and once with single precision option; see the information on theEmoslib website). -
Install the interpolation library
Emoslib for Fortran. -
Install
ecCodes (https://software.ecmwf.int/wiki/display/ECC , last access: 13 October 2018) orgrib_api (https://software.ecmwf.int/wiki/display/GRIB/Home , last access: 13 October 2018) (for Python and Fortran). Thegrib_api support will be discontinued at the end of 2018 butecCodes is downward compatible withgrib_api . -
Install the ECMWF
WebAPI (https://confluence.ecmwf.int//display/WEBAPI/Access+MARS , last access: 13 October 2018) client by following the instructions on the website. It is a Python library to provide external access to the ECMWF servers. -
Check whether
LD_LIBRARY_PATH andPATH environment variables contain all paths to the previously installed libraries. The user should modify the.bashrc or.tcshrc file to guarantee that the variables contain the paths every time a new console is used. -
Install the python package
numpy via pip (https://scipy.org/install.html , last access: 13 October 2018). -
Check the availability of Python packages (e.g., check the Python console for the following commands:
import eccodes ,import grib_api ,import ecmwfapi ) -
Start a simple test retrieval (following the instructions on the ECMWF
WebAPI website). -
Install
flex_extract (see the next section).
It is important to use the same compiler and compiler version for all libraries and the Fortran program
Building
To install
The public user mode requires a local installation of
Running
To run
After a working FLEXPART executable is built (Appendix A), the next step is running the model and generating valid output. This requires consistent meteorological input data and user input files.
In this section we describe the following:
how to obtain the necessary wind fields (1),
how to test run the executable with a default example (2),
how to generate other examples (3), and
how to run these examples and compare them with a reference output (4).
In the following,
B1 Meteorological input for the examples
Appendix A describes how to build the
This should generate the files
B2 Running the default example: installation verification
With the input files, which are included in the FLEXPART distribution and described in Sect. , a first test case to verify that FLEXPART was installed correctly can be run.
To start the model run, the meteorological data have to be in
The results created by this run are stored, e.g., in a directory
If this message is received, the model has completed the simulation, which confirms that FLEXPART and all required libraries are installed correctly. However, it does not guarantee valid output. To verify that the results obtained are valid, see Sect. .
B3 Generating variations of the default example
To demonstrate more functionalities, a set of shell scripts generating different FLEXPART setups are provided in
B4 Running the examples
The examples can be run interactively one by one by invoking FLEXPART with the corresponding
B5 Comparing the results
To verify that FLEXPART is producing valid output, it is useful to compare the output of a new installation with existing model output.
It is also useful to repeat such a comparison after code changes to make sure the output is not affected, except for model simulations in which changes in the results are intended.
While comprehensive comparisons of model results are possible, here we provide only a very simple way of checking the model results.
The directory included in the FLEXPART distribution
Appendix C FLEXPART model versions
In addition to the reference version of FLEXPART described in this paper, there are many different model branches that were developed either for special purposes or to ingest other meteorological input data. This Appendix provides an incomplete list and a short description of some of these other versions. Further contributions are welcome in order to keep this list up to date.
C1 FLEXPART–NorESM/CAM
Recently, the FLEXPART model version FLEXPART–NorESM/CAM was developed, which is tailored to run with the meteorological output data generated by the CMIP5 version of NorESM1-M (the Norwegian Earth System Model) with 1.89 2.5 horizontal resolution and 26 vertical levels.
The standard time resolution of the NorESM/CAM meteorological data is 3 h. FLEXPART–NorESM/CAM is based on FLEXPART v9, and the atmospheric component of NorESM1-M is based on CAM4 (the Community Atmosphere Model). The adaptation of FLEXPART to NorESM required new routines to read meteorological fields, new post-processing routines to obtain the vertical velocity in the FLEXPART coordinate system and other changes, as detailed by .
The code can be downloaded from
C2 FLEXPART–WRF
This FLEXPART version uses output from the Weather Research and Forecasting (WRF) mesoscale meteorological model . Originally it was developed at the PNNL (Pacific Northwest National Laboratory) and named PILT (PNNL Integrated Lagrangian Transport). Compared to PILT, the further developed FLEXPART–WRF can use both instantaneous and time-averaged meteorological output of the WRF model. The latest version also includes the skewed turbulence scheme that was subsequently ported to the standard FLEXPART version 10.4. FLEXPART–WRF output can either be in binary or Network Common Data Form (NetCDF) format, both of which have efficient data compression. FLEXPART–WRF also offers effective parallelization with OpenMP in shared memory and an MPI library in distributed memory. Released versions of the code can be downloaded from
C3 FLEXPART–COSMO
In Europe several national weather services and research groups cooperate to develop and operate the non-hydrostatic limited-area atmospheric model COSMO (Consortium for Small-scale Modeling). At MeteoSwiss COSMO is operationally run with data assimilation on two grids with approximately km and km horizontal resolution centered over Switzerland. This enables the study of atmospheric transport over complex terrain on a long-term basis. To this end, we have developed a new version of FLEXPART that is offline coupled to COSMO output (FLEXPART–COSMO hereafter) and supports output from multiple COSMO nests. Particles are internally referenced against the native vertical coordinate system used in COSMO and not, as in standard FLEXPART, in a terrain-following system. This eliminates the need for an additional interpolation step. A new flux de-accumulation scheme was introduced that removes the need for additional preprocessing of the input files. In addition to the existing Emanuel-based convection parameterization, a convection parameterization based on the Tiedtke scheme, which is identical to the one implemented in COSMO itself, was introduced. A possibility for offline nesting of a FLEXPART–COSMO run into a FLEXPART–ECMWF run for backward simulations was developed that only requires minor modifications of the FLEXPART–ECMWF version and allows particles to leave the limited COSMO domain. The OpenMP shared memory parallelization to the model allows for asynchronous reading of input data. The code is available on request from [email protected] and [email protected].
C4 FLEXPART–AROME
The Applications of Research to Operations at Mesoscale (AROME) numerical weather prediction model is run operationally by Météo-France at the mesoscale. AROME forecasts for Europe exist at a resolution ranging from to km. The standard time resolution of the AROME meteorological data is 1 h. Based on FLEXPART–WRF, a coupling between FLEXPART and AROME was developed at Laboratoire de l'Atmosphère et des Cyclones (LACy, a joint institute between CNRS, Météo-France and the University of Reunion Island) using AROME high-resolution ( km) forecasts over the southwest Indian Ocean. The FLEXPART–AROME branch simulates turbulent transport using the Thomson turbulent scheme already implemented by in the Stochastic Time-Inverted Lagrangian Transport (STILT) model. This method constrains mass transport between different turbulent regions to conserve mass locally for a passive well-mixed tracer. Turbulent kinetic energy profiles are taken directly from AROME model outputs. Such treatment of turbulent motion ensures consistency between the turbulence in the meteorological fields calculated by the NWP model and turbulence computed in the offline Lagrangian transport model. It has been noticed that the use of a dedicated ABL scheme such as Hanna in the FLEXPART model may generate inconsistency between the ABL turbulent domain and the resolved wind fields used to drive FLEXPART. Simulations using the Thomson scheme show a better representation of the turbulent mixing between boundary layer air and free tropospheric air.
C5 TRACZILLA
This branch-off from FLEXPART version 5 was originally developed for studies of transport and mixing in the upper troposphere–lower stratosphere region (e.g., ). The modifications from the FLEXPART advection scheme consist mainly of discarding the intermediate terrain-following coordinate system and performing a direct vertical interpolation of winds, linear in log pressure, from hybrid levels. The vertical velocities are computed by the FLEXPART preprocessor using a mass-conserving scheme in the hybrid ECMWF coordinates. Alternatively, the vertical velocities can be computed from the rates of diabatic heating from ECMWF winds. In addition to the reanalyses from the ECMWF, the current version can use MERRA (Modern-Era Retrospective analysis for Research and Applications) from NASA and JRA-55 (the Japanese 55-year Reanalysis) from the Japanese Meteorological Agency (JMA).
The parallelization uses the OMP version of PGI. All arrays are allocated dynamically.
The code can be obtained from
Author contributions
IP coordinated the contributions to the paper and the code development since version 9, including I/O, updates to turbulent mixing, the implementation of the tests and the distributed version control.
ES developed and wrote the description of the parallelized version of FLEXPART and led the assembling of the new code developments into the main model version 10.4.
HG developed and tested the new wet deposition scheme for aerosols.
NIK contributed to the new wet deposition scheme for aerosols by testing the new model version and coordinated the contributions to the first version of the paper. MC developed the optional new turbulence scheme and the NorESM version and contributed to the WRF version.
SE developed and wrote the description of the backward deposition, performed the benchmark test case together with IP, and worked on ECMWF data retrieval and testing.
DA and DM contributed to the CTBTO developments including the unified executable, the Vtables approach and testing environment.
RLT developed the temporal variation and temperature dependence of the OH reaction.
CDGZ developed the dust mobilization scheme around FLEXPART and performed testing of the new model version.
NE tested the new model version for black carbon and radionuclide applications.
HS implemented the namelist input file format and contributed to the implementation of the NetCDF output and GRIB input routines.
LH developed versions 2.0–7.02 of the
Competing interests
The authors declare that they have no conflict of interest.
Acknowledgements
The work was performed at the Nordic Center of Excellence eSTICC. Pirmin Kaufmann and Martin Schraner (MeteoSwiss) are acknowledged for code reformatting from fixed Fortran 77 to free Fortran 90 format. We thank Mariëlle Mulder for comments on an early version of this paper. The resources for the numerical simulations were provided by UNINETT Sigma2 (the National Infrastructure for High Performance Computing and Data Storage in Norway) under projects NN9419K and NS9419K. Input wind fields were provided by the ECMWF.
Financial support
This research has been supported by NordForsk (the Nordic Center of Excellence eSTICC, grant no. 57001), the European Research Council (project COMTESSA, grant no. 670462), and the CTBTO (Enhancements of the FLEXPART software on a call-off basis).
Review statement
This paper was edited by Slimane Bekki and reviewed by two anonymous referees.
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
© 2019. This work is published under https://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Abstract
The Lagrangian particle dispersion model FLEXPART in its original version in the mid-1990s was designed for calculating the long-range and mesoscale dispersion of hazardous substances from point sources, such as those released after an accident in a nuclear power plant. Over the past decades, the model has evolved into a comprehensive tool for multi-scale atmospheric transport modeling and analysis and has attracted a global user community. Its application fields have been extended to a large range of atmospheric gases and aerosols, e.g., greenhouse gases, short-lived climate forcers like black carbon and volcanic ash, and it has also been used to study the atmospheric branch of the water cycle. Given suitable meteorological input data, it can be used for scales from dozens of meters to global. In particular, inverse modeling based on source–receptor relationships from FLEXPART has become widely used. In this paper, we present FLEXPART version 10.4, which works with meteorological input data from the European Centre for Medium-Range Weather Forecasts (ECMWF) Integrated Forecast System (IFS) and data from the United States National Centers of Environmental Prediction (NCEP) Global Forecast System (GFS). Since the last publication of a detailed FLEXPART description (version 6.2), the model has been improved in different aspects such as performance, physicochemical parameterizations, input/output formats, and available preprocessing and post-processing software. The model code has also been parallelized using the Message Passing Interface (MPI). We demonstrate that the model scales well up to using 256 processors, with a parallel efficiency greater than 75 % for up to 64 processes on multiple nodes in runs with very large numbers of particles. The deviation from 100 % efficiency is almost entirely due to the remaining nonparallelized parts of the code, suggesting large potential for further speedup. A new turbulence scheme for the convective boundary layer has been developed that considers the skewness in the vertical velocity distribution (updrafts and downdrafts) and vertical gradients in air density. FLEXPART is the only model available considering both effects, making it highly accurate for small-scale applications, e.g., to quantify dispersion in the vicinity of a point source. The wet deposition scheme for aerosols has been completely rewritten and a new, more detailed gravitational settling parameterization for aerosols has also been implemented. FLEXPART has had the option of running backward in time from atmospheric concentrations at receptor locations for many years, but this has now been extended to also work for deposition values and may become useful, for instance, for the interpretation of ice core measurements. To our knowledge, to date FLEXPART is the only model with that capability. Furthermore, the temporal variation and temperature dependence of chemical reactions with the OH radical have been included, allowing for more accurate simulations for species with intermediate lifetimes against the reaction with OH, such as ethane. Finally, user settings can now be specified in a more flexible namelist format, and output files can be produced in NetCDF format instead of FLEXPART's customary binary format. In this paper, we describe these new developments. Moreover, we present some tools for the preparation of the meteorological input data and for processing FLEXPART output data, and we briefly report on alternative FLEXPART versions.
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
Details












1 Norwegian Institute for Air Research (NILU), Kjeller, Norway
2 Norwegian Institute for Air Research (NILU), Kjeller, Norway; now at: Met Office, FitzRoy Road, Exeter, EX1 3PB, UK
3 Central Institute for Meteorology and Geodynamics (ZAMG), Vienna, Austria; Arnold Scientific Consulting, Manresa, Spain
4 Boreal Scientific Computing, Fairbanks, Alaska, USA
5 Geophysical Institute, University of Bergen and Bjerknes Centre for Climate Research, Bergen, Norway
6 Department of Meteorology and Geophysics, University of Vienna, Vienna, Austria
7 Empa, Swiss Federal Laboratories for Materials Science and Technology, Dübendorf, Switzerland
8 Department of Geosciences, University of Oslo, Oslo, Norway
9 Laboratoire de l’Atmosphère et des Cyclones (LACy), UMR8105, Université de la Réunion – CNRS – Météo-France, Saint-Denis de La Réunion, France
10 Department of Meteorology and Geophysics, University of Vienna, Vienna, Austria; Aerosol Physics & Environmental Physics, University of Vienna, Vienna, Austria
11 Institute of Meteorology, University of Natural Resources and Life Sciences, Vienna, Austria