stilt.Simulation#
- class stilt.Simulation(receptor: 'Receptor', config: 'VariantConfig', *, met: 'MetStream | None' = None, parent: 'Simulation | None' = None, directory: 'str | Path | None' = None, store: 'Store | None' = None)[source]#
One receptor run under one variant.
A simulation runs HYSPLIT for its receptor and calculates a footprint from the particles. A derived simulation (a
from:variant) runs no HYSPLIT and calculates its footprint from its parent’s particles. The simulation knows where its output files are and whether they all exist (is_complete()).You rarely build one yourself. Get it from a model instead, as in
model.simulations[receptor_id, "hrrr"].
Parameters
receptorReceptorWhere and when particles are released.
configVariantConfigSettings of the variant.
config.nameis the variant name.metMetStream, optionalMeteorology for the HYSPLIT run. Required unless parent is given.
parentSimulation, optionalSimulation whose particles this one uses. Such a simulation never runs HYSPLIT.
directorystr or Path, optionalWorking directory where HYSPLIT runs and outputs are written. A temporary directory is used when omitted. Nothing is created until an output is written.
storeStore, optionalProject store. Outputs are copied there by
publish()and read from there when they are not in directory.
Methods#
Remove the empty-footprint marker. |
|
|
Delete this simulation's outputs from the store and its working directory. |
|
Calculate the footprint from the particles. |
Return whether every expected output exists. |
|
|
Return the store key of one of this simulation's files. |
|
Copy this simulation's outputs from the working directory to the store. |
|
Return a local path to an output file, from the working directory or the store, or |
|
Run HYSPLIT and keep the particles as |
Return the |
|
|
Write the empty-footprint marker holding reason and return its path. |
Attributes#
|
Path of the marker written instead of the NetCDF when the footprint is empty. |
|
Why the footprint is empty, or |
|
The footprint, or |
|
Path of the footprint NetCDF file in the working directory. |
|
Whether the footprint file or the empty-footprint marker exists. |
|
Whether the trajectory file exists (the parent's for a derived simulation). |
|
Whether particles run backward in time ( |
|
Whether this simulation uses another simulation's particles. |
|
Text of the HYSPLIT log. |
|
Path of the HYSPLIT log in the working directory. |
|
Whether this simulation makes a footprint, which it does when its variant has a grid. |
|
Directory where meteorology files are staged for HYSPLIT. |
|
Meteorology files staged in |
|
How this simulation ended, read from its outputs and log. |
|
Paths of the log, footprint, and empty-marker files, and the trajectory file unless derived. |
|
Plotting methods, such as |
|
Meteorology files in the archive that cover this simulation's period. |
|
Start and end of the period the particles cover. |
|
Particle trajectories, or |
|
Path of the trajectory Parquet file (the parent's for a derived simulation). |
|
Variant name. |