runtraj.Project.particles#
- Project.particles(sel=None, columns=None)[source]#
Load the particles of every selected simulation that has them, as one table.
- Parameters:
sel (
Any) – The simulations, as forstatus(). Every simulation of a variant that makes particles by default.columns (
list[str] |None) – Only these particle columns, such as["particle", "age", "lon", "lat", "foot"], afterrelease,variant, andrealization.time(UTC) is built fromage. Every column by default. Fewer columns read faster and take less memory.
- Returns:
One row per particle per output step per simulation, with
release,variant, andrealizationcolumns first. Simulations without particles are left out. Variants that share a run each get their own copy of its rows. The simulations come in the order of sel, one variant (and realization) after another in the order they first appear in it.- Return type:
Notes
A run of 1,000 particles over 24 hours is about 1.4 million rows, some 250 MB in memory, so this suits a selection of tens. For a whole large project, read the
particles/tree of the output directory with pyarrow, DuckDB, or polars instead.- Raises:
ValueError – If a selected variant makes another type of result, such as concentration (
concentration()) or trajectories (trajectories()).- Parameters:
- Return type: