opendrift.models.tobis ====================== .. py:module:: opendrift.models.tobis Attributes ---------- .. autoapisummary:: opendrift.models.tobis.logger Classes ------- .. autoapisummary:: opendrift.models.tobis.TobisElement opendrift.models.tobis.Tobis Module Contents --------------- .. py:data:: logger .. py:class:: TobisElement(**kwargs) Bases: :py:obj:`opendrift.models.oceandrift.Lagrangian3DArray` Extending Lagrangian3DArray with specific properties for Tobis Initialises a LagrangianArray with given properties. Args: Keyword arguments (kwargs) with names corresponding to the OrderedDict 'variables' of the class, and corresponding values. The values must be ndarrays of equal length, or scalars. All (or none) variables must be given, unless a default value is specified in the OrderedDict 'variables' An empty object may be created by giving no input. .. py:attribute:: variables .. py:class:: Tobis(*args, **kwargs) Bases: :py:obj:`opendrift.models.oceandrift.OceanDrift` Tobis egg and larval drift model based on the OpenDrift framework. Developed at MET Norway. Tobis eggs are demersal, meaning that they sink to the sea floor and get stuck there. Eggs seeded above the seafloor are placed on it before the simulation starts. Larvae can swim actively in the water column. Initialise OpenDriftSimulation Args: seed: integer or None. A given integer will yield identical random numbers drawn each simulation. Random numbers are e.g. used to distribute particles spatially when seeding, and may be used by modules (subclasses) for e.g. diffusion. Specifying a fixed value (default: 0) is useful for sensitivity tests. With seed = None, different random numbers will be drawn for subsequent runs, even with identical configuration/input. iomodule: name of module used to export data default: netcdf, see :py:mod:`opendrift.io` for more alternatives. `iomodule` is module/filename without preceeding `io_` loglevel: set to 0 (default) to retrieve all debug information. Provide a higher value (e.g. 20) to receive less output. logtime: if True, a time stamp is given for each logging line. logtime can also be given as a python time specifier (e.g. '%H:%M:%S') logfile: None (default) to send output to console. A string to send output to logfile. Or to get output to both terminal and file: [, logging.StreamHandler(sys.stdout)] .. py:attribute:: ElementType Any trajectory model implementation must define an ElementType. .. py:attribute:: required_variables Any trajectory model implementation must list needed variables. .. py:attribute:: hatch_time .. py:method:: prepare_run() Settle scheduled eggs before the simulation starts. .. py:method:: sink_eggs_to_seafloor() Move scheduled eggs above the local seafloor to bottom depth. .. py:method:: get_hatch_time_func() Total hatch time based on Smigielski et al. (1984), doi: 10.3354/meps014287 The underlying data table is taken directly from the paper. Interpolation is linear with date and second order in the rate direction. .. py:method:: update_egg_stage_fraction() Egg development according to Christensen et al. (2008), doi:10.1139/F08-073 Using initialization model `e` (variable maturation) .. py:method:: update_larval_stage_fraction() Larval development according to Christensen et al. (2008), doi:10.1139/F08-073 The function modifies (in-place) the variable `stage`. The length of the larvae is assumed to be related to the stage as L = L0 * (1 - s) + Lm * s where L0 = 7.73mm, Lm = 40mm and s = stage - 1 .. py:method:: larvae_vertical_migration() .. py:method:: freeze_egg() .. py:method:: deactivate_metamorphed() .. py:method:: update() Update positions and properties of elements.