stilt.Simulation#

class stilt.Simulation(release: 'Release', variant: 'Variant', output: 'Output', directory: 'Path | None' = None, realization: 'int | None' = None) → None[source]#

One release run under one variant, with its footprint, background, and transport error.

It is runtraj.simulation.Simulation, which knows where the particles and the file of each stage are and reads the particles, and it adds the reads of what STILT makes from them: footprint, calc_footprint(), background(), transport_error(), and plot. It changes nothing it inherits.

You rarely build one yourself. Get it from a project instead, as in project.simulation(release_id, "hrrr").

Parameters

releaseRelease

Where and when particles are released.

variantVariant

The variant, resolved: its configs, and the hashes that find its particles and footprint folders.

outputOutput

The output directory.

directoryPath, optional

The project directory, where a relative file name in the settings starts, such as an averaging-kernel table. None starts it from the working directory.

realizationint, optional

Which realization of an ensemble variant (realizations: N), 0 to N - 1. None for a variant that runs once.

Attributes#

footprint

The footprint, or None when the variant has no grid or it is empty.

footprint_path

Path of the footprint file in the output directory, or None before its folder exists.

has_footprint

Whether the footprint file exists.

plot

Plotting methods, such as sim.plot.map().

Methods#

background(field)

Return the background mole fraction at the release.

calc_footprint(*[, grid, smooth_factor, ...])

Calculate a footprint from the stored particles, without writing it.

transport_error(error, flux, **options)

Return the transport error of this simulation's modeled enhancement.