flexpart_run

../../_images/FLEXPART_RUN.png

Runs the FLEXPART Lagrangian particle dispersion model and converts its outputs to formats that Metview can work with.

Tip

A tutorial on using FLEXPART from within Metview is available here.

Note

This function performs the same task as the Flexpart Run icon in Metview’s user interface. It accepts its parameters as keyword arguments, described below.

flexpart_run(**kwargs)

Runs the FLEXPART Lagrangian particle dispersion model.

Parameters
  • output_path (str) – Specifies the location of the output data files. Both an absolute and relative path can be given here. Please note that Metview converts FLEXPART output into other formats and only these converted results are copied from the work directory into output_path. For further details about the output formats click here.

  • input_data (flexpart_prepare()) – Specifies the location of the input data files and the AVAILABLE file using a flexpart_prepare() object. Please note that input_data takes precedence over input_path.

  • input_path (str) – Specifies the path of the directory containing the input data files and the AVAILABLE file. Both an absolute and relative path can be given here. Please note that when input_data is set this path is ignored.

  • user_exe_path (str) – Specifies a user defined FLEXPART executable. Both absolute and relative path can be given here. If it is left blank (this is the default) Metview will use the MV_FLEXPART_EXE environment variable to locate the executable.

  • user_resources_path (str) – Specifies the location of the user defined parameter files (IGBP_int1.dat, OH_7lev_agl.dat, surfdata.t, surfdepo.t ) needed to run FLEXPART. Both an absolute and relative path can be given here. If it is left blank (this is the default) Metview will use the MV_FLEXPART_RESOURCES environment variable to locate the resources. For further details about the resources click here.

  • simulation_direction ({"forward", "backward"}, default: "forward") – Specifies the FLEXPART simulation direction in time.

  • starting_date (str) – Specifies the beginning date of the simulation in YYYYMMDD format. Relative dates are allowed, e.g. -1 means yesterday, 0 means today, etc.

  • starting_time (str) – Specifies the beginning time of the simulation in HH[:MM[:SS]] format.

  • ending_date (str) – Specifies the ending date of the simulation in YYYYMMDD format. Relative dates are allowed, e.g. -1 means yesterday, 0 means today, etc.

  • ending_time (str) – Specifies the ending time of the simulation in HH[:MM[:SS]] format.

  • output_interval (str, default: "3") – Specifies the frequency for the output generation. The output is averaged over the period given in output_averaging_interval. The format is HHHH[:MM[:SS]].

  • output_averaging_interval (str, default: "3") – Specifies the averaging interval for the output generation in HHHH[:MM[:SS]] format. If 0 is given here instantaneous values are written into the output files.

  • output_sampling_rate (str, default: "0:15") – Specifies the sampling rate used for the averaging of the output. This period must be shorter than the output_averaging_interval. The format is HHHH[:MM[:SS]]

  • output_field_type ({"none", "conc", "mixr", "both", "rtime"}, default: "conc") –

    Specifies the type of the gridded output fields. The possible values are:

    for forward simulations:

    • ”none”: no gridded output

    • ”conc”: concentration

    • ”mixr”: mass mixing ratio

    • ”both”: concentration and mass mixing ratio

    for backward simulations:

    • ”none”: no gridded output

    • ”rtime”: residence time/response function

    For more details about gridded output click here.

  • output_flux ({"on", "off"}, default: "off") – Specifies if the fluxes should be computed and written out as a gridded output. Fluxes corresponding to northward, southward, eastward, westward, upward and downward directions are calculated for each grid cell of the output grid.The control surfaces are placed in the middle of each output grid cell. For more details about flux output click here.

  • output_trajectory ({"on", "off"}, default: "off") – Specifies if the plume trajectories should be computed. For more details about trajectory output click here. <flexpart_output>

  • output_area (list[number], default: [-90, -180, 90, 180]) – Specifies the area for the gridded output in degrees in S/W/N/E format.

  • output_grid (list[number], default: [1, 1]) – Specifies the grid resolution for the gridded output in degrees as [east_west_resolution, north_south_resolution].

  • output_levels (list[number], default: []) – Specifies the list of height levels of the gridded output. The levels are given in metres units.

  • user_species_path (str) – Specifies the location of the user defined species files. Both an absolute and relative path can be given here. If it is left blank (this is the default value) Metview will use the MV_FLEXPART_SPECIES environment variable to locate the species. For more details about the species click here.

  • release_species (str or list[str]) – Specifies the list of the species released for the simulation. At all the release locations the same species are emitted. The species are identified by the NNN number (with leading zeros) appearing in the the name of the SPECIES_NNN files. These files contain the physical and chemical properties of species. For more details about the species click here.

  • release_units ({"mass", "mixr"}, default: "mass") – Specifies the units of the mass of the released species.

  • releases (list) – Specifies the releases as a list of flexpart_release() objects.

  • receptor_units ({"mass", "mixr"}, default: "mass") – Specifies the concentration units at the receptor. The possible options are “mass” (mass concentrations) and “mixr” (mass mixing ratio). See the table above to find out what the actual units mean.

  • receptors ({"on", "off"}, default: "off") – Enables the usage of receptor sites. When it is enabled the list of receptor sites can be defined via receptor_names, receptor_latitudes and receptor_longitudes. For more details about receptor output click here.

  • receptor_names (str or list[str]) – Specifies the list of receptor site names.

  • receptor_latitudes (number or list[number]) – Specifies the list of receptor site latitudes.

  • receptor_longitudes (number or list[number]) – Specifies the list of receptor site longitudes.

  • age_classes (str or list[str]) – Specifies the list of times for the age class calculation. If it is left blank (this is the default value) no age class is defined.

  • particle_splitting (str, default: "0") – Specifies the interval for particle splitting in HHHH[:MM[:SS]] format. Each particle is split into two after travelling the multiple of this interval. If “0” (default value) is given here particle splitting is disabled.

  • sync_interval (str, default: "0:15") – All processes are synchronized with this time interval, therefore, all other time constants must be multiples of this value. output_interval and output_averaging_interval must be at least twice of this value. The format is HHHH[:MM[:SS]]

  • ctl (number, default: -5.0) – Specifies the factor by which the time step must be smaller than the Lagrangian time scale (TL). ctl must be > 1 for time steps shorter than the Lagrangian time scale. If ctl < 0, a purely random walk simulation is done.

  • vertical_timestep_reduction (number, default: 4) – Specifies the reduction factor (as an integer) for the time step used for vertical wind.

  • subgrid_terrain ({"on", "off"}, default: "off") – Enables subgridscale terrain parametrization (increase of mixing heights due to subgridscale orographic variations).

  • convection ({"on", "off"}, default: "off") – Enables convection parametrization.

  • output_for_each_release ({"on", "off"}, default: "off") – Specifies whether a separate output fields should be generated for each release. When this option is set to “off” for forward simulations the output fields for a given species contain the sum of all the releases. For backward simulations it must be set to “on”.

  • quasi_lagrangian ({"on", "off"}, default: "off") – Specifies whether particles should be numbered individually (“on”) or identified by the release location number (“off”).

  • domain_fill ({"none", "full", "o3_tracer"}, default: "no") –

    “Enables the domain fill mode. The possible values are as follows:

    • ”no”: domain fill is disabled

    • ”full”: the the particles are not released at specific locations but the 3D-volume of the first release is taken and the particles are uniformly distributed in the volume proportionally to air density. Each particle will receive the same mass, altogether accounting for the total atmospheric mass. Subsequently, particles can move freely in the atmosphere.

    • ”o3_tracer”: simulates a stratospheric ozone tracer. This option is similar to fill option, but only particles in the stratosphere (defined by PV < 2 pvu) are released.

  • sensitivity ({"no", "mass", "mixr"}, default: "no") – Enables computing sensitivity to initial conditions in backward simulations. The possible values are “no”, “mass” (mass concentration units) or “mixr” (mass mixing ratio units).

Return type

Request