runtraj.transforms.PressureWeighting#

class runtraj.transforms.PressureWeighting(*, kind: Literal['pressure_weighting'] = 'pressure_weighting', surface_pressure: Annotated[float | None, Gt(gt=0), Le(le=1100)] = None) → None[source]#

Transform that weights each particle by its share of the column’s air mass.

The weights come from the particles’ own first-step heights and pressures (see particle_pwf()). They are multiplied by the number of particles, so a mean over the particles, as a stage takes, does not change with the number of particles. The particles of a multipoint release share their point’s weight evenly. Adds xpres (release pressure, hPa) and pwf columns. Requires pres and zagl among the particle variables (both in HYSPLIT’s default varsiwant), and zsfc for a release with altitude_ref="msl".

Attributes#

reads_zsfc

It reads zsfc for a release above sea level, so a stage's check can say when HYSPLIT's varsiwant lacks it.

Methods#

apply(particles[, release, directory])

Return the particles with weight multiplied by the pressure weight.