runtraj.models.flexpart.FlexpartConfig#

class runtraj.models.flexpart.FlexpartConfig(*, n_hours: int, seed: int | None = None, directory: pathlib.Path | None = None, eta: bool = False, numpar: int = 1000, loutstep: int = 3600, lsynctime: int = 900, ctl: float = -5.0, ifine: int = 4, lconvection: Literal[0, 1] = 1, lturbulence: Literal[0, 1] = 1, lsubgrid: Literal[0, 1] = 0, cblflag: Literal[0, 1] = 0, threads: int = 1) → None[source]#

FLEXPART 11’s settings for a runtraj run.

runtraj runs the executable of a FLEXPART checkout you built (directory) and never ships FLEXPART, which is GPL-3. Each run writes FLEXPART’s input files into its workdir, with particle output every loutstep seconds and no gridded output. The SHA-256 of the executable is part of the run’s identity, as hycs_std’s is for HYSPLIT; the checkout’s version is recorded beside it.

Parameters#

Parameter

Description

Default

n_hours

Length of each simulation, in hours. Negative runs backward in time. It has no default: a config must say it.

Required

seed

Seed of the model’s random numbers, for a reproducible run. Realization k of a variant runs with seed + k.

None

directory

Your FLEXPART 11 checkout: runtraj runs src/FLEXPART (built with make eta=no) or src/FLEXPART_ETA (make eta=yes), and links the land-use and species files FLEXPART reads from options/. Needed to run; a stored run’s settings leave it out.

None

eta

Run the eta build, src/FLEXPART_ETA, which keeps particles on ECMWF’s model levels and is the build FLEXPART’s documentation intends for ECMWF input (ERA5 from flex_extract). Off runs src/FLEXPART, the meter build, which reads ERA5 too. Either build needs numpf = 3 in par_mod.f90 to read flex_extract’s three precipitation fields.

False

numpar

Number of particles released. A multipoint release splits them between its points.

1000

loutstep

Seconds between particle outputs (LOUTSTEP).

3600

lsynctime

Seconds between the times all particles are synchronized (LSYNCTIME). It must divide loutstep at least twice.

900

ctl

Time step control (CTL): above 1, the boundary-layer time step is the Lagrangian time scale over ctl; negative uses lsynctime.

-5.0

ifine

Reduction of the time step for vertical motion (IFINE), used only when ctl is above 1.

4

lconvection

Convection scheme (LCONVECTION): 1 on, 0 off.

1

lturbulence

Turbulence scheme (LTURBULENCE): 1 on, 0 off.

1

lsubgrid

Raise the mixed layer for subgrid terrain (LSUBGRID): 1 on, 0 off.

0

cblflag

Skewed rather than Gaussian turbulence in the convective boundary layer (CBLFLAG): 1 on, 0 off. It needs short time steps: ctl of 5 or more, ctl times ifine of 50 or more, and lsynctime of 1200 s or less. FLEXPART changes the three itself otherwise, so runtraj refuses them.

0

threads

OpenMP threads. FLEXPART seeds each thread’s random numbers with a fixed number, so the thread count changes the particles and is recorded with the run. A run with one thread repeats exactly; a run with several repeats only in distribution. Each release runs FLEXPART with this many threads, whatever OMP_NUM_THREADS is, so ask for threads cores for every release that runs at once (cpus).

1

Attributes#

checkout

The FLEXPART checkout, directory.

executable

src/FLEXPART_ETA with eta, else src/FLEXPART.

UNRECORDED

Where the build is changes no particle; its SHA-256 is hashed instead.

Inherited#

From TransportConfig: realizations, settings