stilt.run_trajectories#
- stilt.run_trajectories(receptor, met, *, model='hysplit', workdir=None, timeout=None, **params)[source]#
Run the transport model for one receptor and return its particles.
This is what a project runs for each receptor, without a project: the particles are returned, not stored. STILT-R calls it
calc_trajectory.- Parameters:
receptor (stilt.receptor.Receptor) – Where and when particles are released.
met (
BaseModel|Mapping[str,Any]) – The meteorology, as one entry undermets:inconfig.yaml, checked by the model’s met config (stilt.transport.hysplit.MetConfigfor HYSPLIT). A relativedirectorystarts from the working directory.model (
str) – The transport model.workdir (
str|Path|None) – Directory the model runs in, kept afterwards for a look at its files. It must be empty or not exist yet. Without it the model runs in a temporary directory that is removed.timeout (
int|None) – Time limit in seconds.Nonewaits indefinitely.**params (
Any) – The transport model’s parameters, such asn_hoursandnumpar(stilt.transport.hysplit.HysplitConfig).
- Returns:
The particle table, one row per particle per output step.
- Return type:
- Raises:
ValueError – If workdir is not empty, or a parameter is not one of the model’s.
SimulationError – If the run fails;
reasonsays why.MeteorologyError – If the met files the run needs are missing.
Examples
>>> receptor = stilt.PointReceptor( ... time="2023-07-15 18:00", longitude=-111.848, latitude=40.766, altitude=10 ... ) >>> met = { ... "directory": "/data/hrrr", ... "file_format": "%Y%m%d_%H", ... "file_tres": "6h", ... } >>> particles = stilt.run_trajectories( ... receptor, met, n_hours=-24, numpar=200 ... )