stilt.ProjectConfig.resolve#

ProjectConfig.resolve(directory=None)[source]#

Return one Variant per declared variant, in declared order.

Each variant’s transport settings are validated by its model’s config class, as are its realizations (realizations: N runs it N times, realization k with seed + k). Each met’s directories are made absolute; what a run records of the met is read on first use (Variant.met_settings). Each geometry is read once, however many variants use it, and the grid of a footprint given only by a geometry is derived from it (stilt.Mesh.to_grid()). The transport model’s version and data files are read once for each distinct build: the fields of its config that change no particle, such as exe_dir. project.variants holds the result.

Parameters:

directory (str | Path | None) – Where a relative geometry file or met directory starts: the project directory. Without it, the working directory.

Raises:

ValueError – If a variant’s transport settings are invalid for its model, or its realizations would repeat one another.

Return type:

dict[str, Variant]