gnome.movers.simple_mover

simple_mover.py

This is an example mover class – not really useful, but about as simple as can be, for testing and demonstration purposes

It’s a steady, uniform current – one velocity and direction for everywhere at all time.

Module Contents

Classes

SimpleMover

simple_mover

class gnome.movers.simple_mover.SimpleMover(velocity=0, uncertainty_scale=0.5, **kwargs)

Bases: gnome.movers.Mover

simple_mover

a really simple mover – moves all LEs a constant speed and direction

(not all that different than a constant wind mover, now that I

think about it)

simple_mover (velocity)

create a simple_mover instance

Parameters:
  • velocity – a (u, v, w) triple – in meters per second

  • uncertainty_scale=0.5 – the scale of the uncertainty of the velocity

Remaining kwargs are passed onto Mover’s __init__ using super. See Mover documentation for remaining valid kwargs.

_schema
__repr__()

Return repr(self).

get_move(spill, time_step, model_time)

moves the particles defined in the spill object

Parameters:
  • spill – spill is an instance of the gnome.spills.Spill class

  • time_step – time_step in seconds

  • model_time – current model time as a datetime object

In this case, it uses the positions and status_code data arrays.

Returns delta:

Nx3 numpy array of movement – in (long, lat, meters) units