gnome.movers.ship_drift_mover¶
Ship drift mover
Classes¶
Base class from which all Python movers/weatherers can inherit |
Module Contents¶
- class gnome.movers.ship_drift_mover.ShipDriftMover(wind_file=None, topology_file=None, grid_type=1, drift_angle=0, time_offset=0, **kwargs)¶
Bases:
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.
- Parameters:
wind_file – file containing wind data on a grid
topology_file – Default is None. When exporting topology, it is stored in this file
wind_scale – Value to scale wind data
extrapolate – Allow current data to be extrapolated before and after file data
time_offset – Time zone shift if data is in GMT
Pass optional arguments to base class uses super:
super(ShipDriftMover,self).__init__(**kwargs)
- wind_file = None¶
- topology_file = None¶
- name¶
define as property in base class so all objects will have a name by default
- drift_angle = 0¶
- grid_type = 1¶
- grid¶
- mover¶
- model_time = 0¶
- positions¶
- delta¶
- status_codes¶
- wind_scale¶
- extrapolate¶
- time_offset¶
- export_topology(topology_file)¶
- Parameters:
topology_file=None – absolute or relative path where topology file will be written.
- prepare_for_model_run()¶
Override this method if a derived mover class needs to perform any actions prior to a model run
- prepare_for_model_step(sc, time_step, model_time_datetime)¶
Call base class method using super Also updates windage for this timestep
- Parameters:
sc – an instance of gnome.spill_container.SpillContainer class
time_step – time step in seconds
model_time_datetime – current time of model as a date time object
- prepare_data_for_get_move(sc, model_time_datetime)¶
organizes the spill object into inputs for calling with Cython wrapper’s get_move(…)
- Parameters:
sc – an instance of gnome.spill_container.SpillContainer class
model_time_datetime – current model time as datetime object
- get_move(sc, time_step, model_time_datetime)¶
Override base class functionality because mover has a different get_move signature
- Parameters:
sc – an instance of the gnome.SpillContainer class
time_step – time step in seconds
model_time_datetime – current time of the model as a date time object
- 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.