stilt.Model#
- class stilt.Model(project: 'str | Path | None' = None, receptors: 'Receptor | Iterable | str | Path | None' = None, config: 'ModelConfig | None' = None, compute_root: 'str | Path | None' = None, runtime: 'RuntimeSettings | None' = None, **kwargs)[source]#
A STILT project: receptors, settings, and the simulations they define.
A model runs every receptor once per variant and loads the resulting trajectories and footprints. Its inputs and outputs live in a project directory or object-store URI. Settings and receptors given here are saved to the project when the model runs, so
Model(project)opens it again later.
Parameters
projectstr or Path, optionalProject directory or object-store URI. A temporary directory is used when omitted.
receptorsReceptor, iterable of Receptor, str or Path, optionalReceptors to run, or the path of a receptors CSV (relative to the project directory). Defaults to the project’s
receptors.csv.configModelConfig, optionalModel settings. Defaults to the project’s
config.yaml.compute_rootstr or Path, optionalDirectory under which simulations run. Defaults to
PYSTILT_COMPUTE_ROOT, then to the project’ssimulations/by-idfor a local project or a temporary directory for a cloud project.runtimeRuntimeSettings, optionalSettings for this machine (download cache, work-queue URL, and compute root). Read from
PYSTILT_*environment variables when omitted.**kwargsSettings for
ModelConfig, such asn_hours,numpar,mets, andgrid. Cannot be combined with config.
Methods#
Check that no registered variant or met has changed its settings. |
|
|
Return the registered variants that |
|
Save the model's settings and receptors to the project. |
|
Delete every simulation of a variant and forget its settings. |
|
Run every simulation that has not finished. |
|
Return one simulation by id. |
|
Return one row per simulation saying which outputs exist. |
Attributes#
|
Model settings, from |
|
Meteorology sources declared in the config, by name. |
|
Plotting methods, such as |
|
Postgres work queue, or |
|
Receptors, by position ( |
|
Every receptor under every variant, indexed by |
|
Settings of each variant, by name, in config order. |