Fish Eggs and Larvae

from datetime import datetime, timedelta
from opendrift.readers.reader_constant import Reader as ConstantReader
from opendrift.models.larvalfish import LarvalFish

o = LarvalFish(loglevel=50)

No horizontal movement, here only investigating vertical mixing and swimming

r = ConstantReader(
        {'x_sea_water_velocity': 0, 'y_sea_water_velocity': 0, 'x_wind': 0, 'y_wind': 0,
         'sea_water_temperature': 10,
         'land_binary_mask': 0, 'ocean_vertical_diffusivity': .02})
o.add_reader(r)
o.set_config('general:use_auto_landmask', False)

Seeding 20 fish eggs, which will hatch as larvae after some time, depending om temperature

time = datetime(2020, 7, 1, 12)
o.seed_elements(lon=4, lat=60, time=[time, time+timedelta(hours=24)], number=20)

o.run(duration=timedelta(days=40))
<xarray.Dataset> Size: 2MB
Dimensions:                                   (trajectory: 20, time: 961)
Coordinates:
  * trajectory                                (trajectory) int64 160B 0 1 ... 19
  * time                                      (time) datetime64[ns] 8kB 2020-...
Data variables: (12/31)
    status                                    (trajectory, time) float32 77kB ...
    moving                                    (trajectory, time) float32 77kB ...
    age_seconds                               (trajectory, time) float32 77kB ...
    origin_marker                             (trajectory, time) float32 77kB ...
    lon                                       (trajectory, time) float32 77kB ...
    lat                                       (trajectory, time) float32 77kB ...
    ...                                        ...
    ocean_vertical_diffusivity                (trajectory, time) float32 77kB ...
    ocean_mixed_layer_thickness               (trajectory, time) float32 77kB ...
    sea_water_temperature                     (trajectory, time) float32 77kB ...
    sea_water_salinity                        (trajectory, time) float32 77kB ...
    sea_surface_wave_stokes_drift_x_velocity  (trajectory, time) float32 77kB ...
    sea_surface_wave_stokes_drift_y_velocity  (trajectory, time) float32 77kB ...
Attributes: (12/128)
    Conventions:                                                           CF...
    standard_name_vocabulary:                                              CF...
    featureType:                                                           tr...
    title:                                                                 Op...
    summary:                                                               Ou...
    keywords:                                                              tr...
    ...                                                                    ...
    geospatial_lon_units:                                                  de...
    geospatial_lon_resolution:                                             point
    runtime:                                                               0:...
    geospatial_vertical_min:                                               -1...
    geospatial_vertical_max:                                               0.0
    geospatial_vertical_positive:                                          up


After 20 days eggs are hatched as Larvae, and starting to grow

o.plot_property('weight')
o.plot_property('length')
  • weight
  • length

We see that larvae (after hatching) avoid the upper meters at daytime, to avoid predators. Vertical motion is a combination of vertical mixing, buoyancy and swimming.

o.plot_property('z')
z

Mean daily depth shows more clearly the diurnal migration of larvae

o.plot_property('z', mean=True)
z

Total running time of the script: (0 minutes 46.835 seconds)

Gallery generated by Sphinx-Gallery