stilt.Simulation.generate_footprint#

Simulation.generate_footprint(config=None, write=False, transforms=None, context=None)[source]#

Calculate the footprint from the particles.

Runs HYSPLIT first when there are no trajectories yet. The result is also kept as footprint. When no particle reaches the grid there is no footprint: the method returns None and, with write=True, writes the .empty marker instead of the NetCDF.

Parameters:
  • config (FootprintConfig | None) – Footprint settings. Defaults to the variant’s own. Pass other settings to try them without a new variant, for example sim.footprint_config.model_copy(update={"smooth_factor": 0.5}).

  • write (bool) – Also write the footprint to footprint_path, and the trajectories when HYSPLIT had to run.

  • transforms (Sequence[ParticleTransform] | None) – Extra particle transforms, applied after config.transforms and recorded with them. Any object with an apply(particles, context) method works.

  • context (TransformContext | None) – Passed to every transform. Defaults to transform_context().

Returns:

The footprint, or None when no particle reaches the grid (see empty_reason).

Return type:

Footprint | None

Raises:

TypeError – If the variant has no grid and no config is given.