stilt.footprint.footprint_particles#
- stilt.footprint.footprint_particles(particles, config, met_files, *, z_top=None)[source]#
Return the particles a footprint under config is made from, with the
footit uses.The particles are returned as they are when they have
footandpbl_heightis unset: the transport model’s ownfoot, such as HYSPLIT’s. Otherwise PYSTILT computesfootwithfootprint_depth,pbl_heightandpbl_height_min(stilt.footprint.add_foot()), in place of the model’s, and returns a copy with it. The particles passed in are not changed, and the computedfootis stored nowhere: each footprint computes it again.- Parameters:
particles (
DataFrame) – A particle table, such assim.particles.config (
FootprintConfig) – The footprint settings.met_files (
Iterable[str|PathLike[str]]) – The met files the run read, which a particle file records (runtraj.particles.particles_metadata()). They are read only whenfootis computed, and must still be at those paths then.z_top (
float|None) – The top of the run’s domain, HYSPLIT’sz_top, whichpbl_height: richardsonreads.
- Returns:
The particles, with
foot.- Return type:
- Raises:
FileNotFoundError – If
footis computed and the run named no met files, or one of them is no longer there.
Examples
>>> meta = runtraj.particles.particles_metadata( ... sim.particles_path ... ) >>> config = stilt.FootprintConfig( ... grid=grid, pbl_height="richardson" ... ) >>> particles = stilt.footprint.footprint_particles( ... sim.particles, config, meta.met_files ... )