pylag.velocity_aggregator module

A velocity aggregator pulls together and combines different terms that together yield a particle’s velocity.

These include:

  1. The effect of ocean currents

  2. The effect of Stoke’s Drift

  3. The effect of direct wind forcing, i.e. sail effects

  4. The effect of buoyancy, i.e. settling or rising

  5. The effect of movement (under development)

Any combination of the above effects may be used at any one time, with the choice determined using the run configuration file. In most cases, each velocity term is calculated using a dedicated Calculator, which is chosen by the user from a family of supported Calculators. This is designed to give flexibility in how the input fields are used to compute the velocity terms.

Separate terms are summed to give the resultant velocity experienced by the particle. Thus, if accounting for advection by surface ocean currents (vo) and direct wind forcing (vw), the velocity of the particle (vp) would be:

\[v_{p} = v_{o} + v_{w},\]

and vp would be returned to the caller.

Note

velocity_aggregator is implemented in Cython. Only a small portion of the API is exposed in Python with accompanying documentation.

class pylag.velocity_aggregator.VelocityAggregator(config)

Bases: object

get_velocity_wrapper(self, DataReader data_reader, DTYPE_FLOAT_t time, ParticleSmartPtr particle)

Python friendly wrapper for get_velocity()

Parameters
Returns

velocity – Three component array giving the particle’s velocity.

Return type

NumPy array