opendrift.models.tobis

Attributes

logger

Classes

TobisElement

Extending Lagrangian3DArray with specific properties for Tobis

Tobis

Tobis egg and larval drift model based on the OpenDrift framework.

Module Contents

opendrift.models.tobis.logger
class opendrift.models.tobis.TobisElement(**kwargs)[source]

Bases: 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.

variables
class opendrift.models.tobis.Tobis(*args, **kwargs)[source]

Bases: 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 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:

[<filename.log>, logging.StreamHandler(sys.stdout)]

ElementType

Any trajectory model implementation must define an ElementType.

required_variables

Any trajectory model implementation must list needed variables.

hatch_time
prepare_run()[source]

Settle scheduled eggs before the simulation starts.

sink_eggs_to_seafloor()[source]

Move scheduled eggs above the local seafloor to bottom depth.

get_hatch_time_func()[source]

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.

update_egg_stage_fraction()[source]

Egg development according to Christensen et al. (2008), doi:10.1139/F08-073

Using initialization model e (variable maturation)

update_larval_stage_fraction()[source]

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

larvae_vertical_migration()[source]
freeze_egg()[source]
deactivate_metamorphed()[source]
update()[source]

Update positions and properties of elements.