runtraj.transforms.PressureWeighting#

class runtraj.transforms.PressureWeighting(*, kind: Literal['pressure_weighting'] = 'pressure_weighting', surface_pressure: Annotated[float | None, Gt(gt=0)] = 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 numpar. The particles of a multipoint release share their point’s weight evenly. Adds xpres (release pressure, hPa) and pwf columns. Requires pres and zagl in varsiwant, which are both in the default, 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 varsiwant lacks it.

Methods#

apply(particles[, release, directory])

Return the particles with weight multiplied by the pressure weight.