:py:mod:`gnome.movers.ship_drift_mover` ======================================= .. py:module:: gnome.movers.ship_drift_mover .. autoapi-nested-parse:: Ship drift mover Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: gnome.movers.ship_drift_mover.ShipDriftMover .. py:class:: ShipDriftMover(wind_file=None, topology_file=None, grid_type=1, drift_angle=0, time_offset=0, **kwargs) Bases: :py:obj:`gnome.movers.Mover` Base class from which all Python movers/weatherers can inherit It defines the base functionality for mover/weatherer. NOTE: Since base class is not Serializable, it does not need a class level _schema attribute. :param wind_file: file containing wind data on a grid :param topology_file: Default is None. When exporting topology, it is stored in this file :param wind_scale: Value to scale wind data :param extrapolate: Allow current data to be extrapolated before and after file data :param time_offset: Time zone shift if data is in GMT Pass optional arguments to base class uses super: ``super(ShipDriftMover,self).__init__(**kwargs)`` .. py:attribute:: _schema .. py:attribute:: wind_scale .. py:attribute:: extrapolate .. py:attribute:: time_offset .. py:method:: __repr__() .. todo:: We probably want to include more information. .. py:method:: __str__() Return str(self). .. py:method:: export_topology(topology_file) :param topology_file=None: absolute or relative path where topology file will be written. .. py:method:: prepare_for_model_run() Override this method if a derived mover class needs to perform any actions prior to a model run .. py:method:: prepare_for_model_step(sc, time_step, model_time_datetime) Call base class method using super Also updates windage for this timestep :param sc: an instance of gnome.spill_container.SpillContainer class :param time_step: time step in seconds :param model_time_datetime: current time of model as a date time object .. py:method:: prepare_data_for_get_move(sc, model_time_datetime) organizes the spill object into inputs for calling with Cython wrapper's get_move(...) :param sc: an instance of gnome.spill_container.SpillContainer class :param model_time_datetime: current model time as datetime object .. py:method:: get_move(sc, time_step, model_time_datetime) Override base class functionality because mover has a different get_move signature :param sc: an instance of the gnome.SpillContainer class :param time_step: time step in seconds :param model_time_datetime: current time of the model as a date time object .. py:method:: model_step_is_done(sc=None) This method gets called by the model after everything else is done in a time step, and is intended to perform any necessary clean-up operations. Subclassed movers can override this method.