pylag.stokes_drift module
StokesDriftCalculators are used to determine the contribution of Stoke’s Drift to a particle’s velocity.
Note
stokes_drift is implemented in Cython. Only a small portion of the API is exposed in Python with accompanying documentation.
- class pylag.stokes_drift.StokesDriftCalculator
Bases:
object
Abstract base class for PyLag Stoke’s Drift calculators
- get_velocity_wrapper(self, DataReader data_reader, DTYPE_FLOAT_t time, ParticleSmartPtr particle)
Python friendly wrapper for get_velocity()
The get_velocity() method must be implemented in the derived class.
- Parameters
data_reader (pylag.data_reader.DataReader) – A concrete PyLag data reader which inherits from the base class pylag.data_reader.DataReader.
time (float) – The time the crossing occurred.
particle (pylag.particle_cpp_wrapper.ParticleSmartPtr) – A ParticleSmartPtr.
- Returns
stokes_drift_velocity – Two component array giving the velocity due to Stoke’s drift.
- Return type
NumPy array
- class pylag.stokes_drift.SurfaceStokesDriftCalculator(config)
Bases:
StokesDriftCalculator
Surface Stoke’s drift is as given in the input file
- Parameters
config (ConfigParser) – Configuration object.
- Variables
_config (ConfigParser) – Configuration object.
- pylag.stokes_drift.get_stokes_drift_calculator(config)
Factory method for Stoke’s Drift calculators
- Parameters
config (ConfigParser) – PyLag configuraton object
- Returns
A Stoke’s Drift calculator
- Return type