runtraj.transforms.particle_pwf#

runtraj.transforms.particle_pwf(particles, surface_pressure=None, altitude_ref='agl')[source]#

Return each particle’s release pressure and pressure weight.

Following Wu et al. (2018, Geosci. Model Dev. 11, 4843), a hypsometric curve ln p = b + a·z is fit to the particles’ first-step heights and pressures. The fit smooths out the one time step of turbulence between release and the first output, and gives a surface pressure when none is supplied. It is evaluated at each release height, and the spacing between neighboring release pressures gives the air mass each release height represents.

HYSPLIT spreads column particles evenly over height, each placed at random within its own slab, one slab per particle. Each release height therefore stands for the slab centered on it. Slab edges sit midway between neighboring release pressures, the surface pressure closes the bottom slab, and the top slab extends above its release height as far as it does below. Each slab’s weight is its pressure depth over the surface pressure.

A multipoint release releases several particles from each point. Those particles share one release height, so the point’s slab is split evenly among them.

Parameters:
  • particles (DataFrame) – One simulation’s particle table, with particle, pres (hPa), and zagl (m), and optionally release_height, the release height (m). Without release_height the first-step height is used. An MSL release also needs zsfc, the terrain height (m above sea level).

  • surface_pressure (float | None) – Surface pressure in hPa, such as a satellite retrieval’s. It closes the bottom slab and divides every slab’s depth, so a higher value gives the bottom slab more weight and the others less. Defaults to the fitted curve at the ground. It must not be below the pressure at the lowest release height.

  • altitude_ref (Literal['agl', 'msl']) – Vertical reference of the release heights, release.altitude_ref. With "msl" the fit is made against zagl + zsfc so that it can be evaluated at the release heights, and the ground closing the bottom slab is the terrain under the lowest release height.

Return type:

tuple[Series, Series]

Returns:

  • xpres (pandas.Series) – Release pressure of each particle in hPa, from the fitted curve, indexed by particle.

  • pwf (pandas.Series) – Pressure weight of each particle, indexed by particle. The weights sum to the fraction of the atmosphere’s mass inside the column, (p_sfc - p_top) / p_sfc. The rest lies above the column top, where surface fluxes do not reach the release.