stilt.footprint.add_foot#
- stilt.footprint.add_foot(particles, met_files, footprint_depth, pbl_height=None, pbl_height_min=0.0, z_top=None)[source]#
Add
foot, each particle’s sensitivity to surface fluxes, for a transport model that writes only positions.A particle below the depth surface fluxes are mixed through, footprint_depth times
mlht(or footprint_depth meters when it is above 1), takes up the flux for the time it spends there. Itsfootfor one output step is that time divided by the air in the layer, STILT’s footprint (Lin et al., 2003):foot = M · t / (ρ̄ · depth)
in ppm per (µmol m⁻² s⁻¹), with M = 0.02897 kg mol⁻¹, the molar mass of dry air, t the time in seconds, and ρ̄ the mean air density below the depth. ρ̄ · depth, the mass of air in the layer, is the drop in pressure from the ground to the depth over g, from the met files under the particle. The time is
samtwhen the table has it. Otherwise the particle counts for the whole step when it is below the depth at the end of the step, and not at all when it is above. A step is the time since the particle’s previous row, or since its release for its first row, so a release row atage = 0gets zero.The mixed-layer height comes from pbl_height. Unset, a
mlhtcolumn is used as it is, withsamt; without one, the met’s boundary-layer height is sampled. Set,mlhtis replaced with the height it names, andsamt, which counts the minutes below the model’s own layer, is not used. Every model moved its particles with its own mixed layer, so a height found here can differ from the one the particles were moved with.HYSPLIT computes
footitself in STILT mode, the same way in its turbulence steps. Validation says how far a footprint made from thisfootis from one made from HYSPLIT’s. The footprint stage calls it when it needs afootthe particles do not have (stilt.footprint.footprint_particles()), and stores it nowhere.- Parameters:
particles (
DataFrame) – Particle table withtime, the release time plusageminutes. Amlhtcolumn (m above ground) is used as it is unless pbl_height is set.met_files (
Iterable[str|PathLike[str]]) – ARL met files that cover the particles’ times, such as the files the run read. They are read on their own levels, which start at the ground.footprint_depth (
float) – Height that surface fluxes are mixed through (VEGHTin HYSPLIT and STILT-R): a fraction of the mixed-layer height when 1 or less, else meters above ground.pbl_height (
str|float|None) – The mixed-layer height:"met"samples the met’sPBLH(stilt.sampling.sample_met()),"richardson"finds it from the met’s profile as HYSPLIT’skmixd: 3does (stilt.sampling.calc_pbl_height()), and a number is a fixed height in meters.Noneuses the particles’mlht, or the met’sPBLHwhen they have none.pbl_height_min (
float) – Lowest mixed-layer height in meters, for a height found here rather than the particles’ own, askmix0is for HYSPLIT.z_top (
float|None) – The top of a HYSPLIT run’s domain in meters, which sets the internal levels"richardson"works on, as in that run.Noneuses HYSPLIT’s default, 25000 m. Only"richardson"reads it.
- Returns:
A copy of particles with
foot, andmlhtwhen it was found here. A row off the met’s grid gets NaN, which no footprint counts.- Return type:
- Raises:
ValueError – If particles has a
footcolumn already, has notimecolumn, or has a row outside the files’ times.
Examples
>>> particles = sim.particles.drop(columns="foot") >>> meta = runtraj.particles.particles_metadata( ... sim.particles_path ... ) >>> stilt.footprint.add_foot( ... particles, meta.met_files, footprint_depth=0.5 ... )