Core Objects#

The model, its receptors, the simulations it runs, and their outputs.

Project interface#

Model

A STILT project: receptors, settings, and the simulations they define.

Receptor objects#

Receptor

Base class for receptors.

PointReceptor

Receptor that releases particles from one point.

ColumnReceptor

Receptor that releases particles evenly along a vertical line.

MultiPointReceptor

Receptor that releases particles from several points at once.

ReceptorID

Identifier of a receptor, "<YYYYMMDDHHMM>_<location_id>".

LocationID

Identifier of a receptor's location.

read_receptors

Read receptors from a CSV file.

Simulation objects#

Simulation

One receptor run under one variant.

SimID

Id of one simulation, a (receptor, variant) pair.

Trajectories

Particle trajectories from one HYSPLIT run.

Footprint

Gridded footprint of one receptor.

Collections#

model.simulations is a SimulationCollection of every receptor under every variant. sel() narrows it. .trajectories and .footprint give an OutputCollection for loading one kind of output.

SimulationCollection

An ordered selection of a model's simulations.

OutputCollection

One output, trajectory or footprint, across a selection of simulations.

ReceptorCollection

A model's receptors, by position or by receptor id.

Spatial geometries#

The cells Footprint.aggregate() sums a footprint into, such as polygons, hexagons, windows around point sources, or groups of grid cells. A Grid works as well. It is documented under Configuration.

Mesh

Polygon cells with ids, the most general geometry.

Zones

Regions made by merging the cells of a Grid or Mesh.

Geometry

Represent a PEP 604 union type

SpatialTarget

Represent a PEP 604 union type

stilt.geometry also has the helpers that compute how much of each footprint cell falls in each target cell. These overlap weights are cached, so each geometry’s weights are computed once per footprint grid.

geometry.overlap_weights

Return the fraction of each raster cell inside each geometry cell.

geometry.check_resolution

Warn when the raster is too coarse to resolve the smallest target cell.

geometry.same_crs

Return whether two CRS strings describe the same CRS, however they are spelled.

geometry.is_longlat_crs

Return whether crs is geographic (longitude/latitude degrees).

Flux fields#

stilt.flux looks up a surface flux field under a footprint (used by Footprint.enhancement()) or along particle paths.

flux.sample_flux

Return the flux at each point, or zero outside the field.

flux.sample_field

Return the field's value in the cell nearest each point.

flux.vertical_dim

Return the name of a field's vertical dimension.

flux.particle_enhancement

Return each particle's enhancement, foot times flux summed along its trajectory.

flux.horizontal_dims

Return the names of the horizontal dimensions, (y_dim, x_dim).

flux.nearest_cell

Return the index of the cell nearest each value, or -1 outside the cells.