runtraj.models.run_model#
- runtraj.models.run_model(name, release, config, met, workdir=None, timeout=None)[source]#
Run the transport model called name for one release, and finish its result.
The result is checked against its type (
runtraj.results). Particles are checked against the particle table (runtraj.particles.check_particles()) and get their release heights (runtraj.particles.add_release_heights()). These steps are runtraj’s, the same for any model. Nothing else is added:footis the model’s own, or missing for a model that writes none.- Parameters:
name (
str) – The transport model (MODELS).release (runtraj.releases.Release) – Where and when particles are released.
config (
TransportConfig) – The model’s config.met (
Any) – The meteorology, of the model’smet_config_class.workdir (
Path|None) – An empty directory for the run’s files.Nonelets the model make its own.
- Raises:
SimulationError – If the model’s
check_releasesrefuses the release (RELEASE_REFUSED), before it runs; if the run fails, as when the meteorology does not cover it (MET_COVERAGE), or the model wrote no result (NO_PARTICLE_DATA,NO_CONCENTRATION_DATA); or if where the particles of a column or multipoint release started is not known (NO_RELEASE_ROWS).- Return type: