class LarvalFishElement(Lagrangian3DArray):
    """
    Extending Lagrangian3DArray with specific properties for larval and juvenile stages of fish
    """

    variables = Lagrangian3DArray.add_variables([
        ('diameter', {'dtype': np.float32,
                      'units': 'm',
                      'default': 0.0014}),  # for NEA Cod
        ('neutral_buoyancy_salinity', {'dtype': np.float32,
                                       'units': 'PSU',
                                       'default': 31.25}),  # for NEA Cod
        ('stage_fraction', {'dtype': np.float32,  # to track percentage of development time completed
                            'units': '',
                            'default': 0.}),
        ('hatched', {'dtype': np.int64,  # 0 for eggs, 1 for larvae
                     'units': '',
                     'default': 0}),
        ('length', {'dtype': np.float32,
                    'units': 'mm',
                    'default': 0}),
        ('weight', {'dtype': np.float32,
                    'units': 'mg',
                    'default': 0.08}),
        ('survival', {'dtype': np.float32,  # Not yet used
                      'units': '',
                      'default': 1.})])
Пример #2
0
class SedimentElement(Lagrangian3DArray):
    # Lagrangian3DArray has already the variables terminal_velocity, and wind_drift_factor
    variables = Lagrangian3DArray.add_variables([
        (
            'settled',
            {
                'dtype': np.int16,  # 0 is active, 1 is settled
                'units': '1',
                'default': 0
            }),
        ('age_seconds', {
            'dtype': np.float32,
            'units': 's',
            'default': 0
        }),
        ('terminal_velocity', {
            'dtype': np.float32,
            'units': 'm/s',
            'default': -0.001
        }),  # 1 mm/s negative buoyancy
        ('critical_shear_stress', {
            'dtype': np.float32,
            'units': 'N/m2',
            'default': 0.0
        })
    ])
class BivalveLarvaeObj(Lagrangian3DArray):
    """Extending Lagrangian3DArray with specific properties for pelagic eggs/larvae
    """

    variables = Lagrangian3DArray.add_variables([
        ('diameter', {
            'dtype': np.float32,
            'units': 'm',
            'default': 0.0014
        }),  # for NEA Cod
        ('neutral_buoyancy_salinity', {
            'dtype': np.float32,
            'units': '[]',
            'default': 31.25
        }),  # for NEA Cod
        ('density', {
            'dtype': np.float32,
            'units': 'kg/m^3',
            'default': 1028.
        }),
        ('hatched', {
            'dtype': np.float32,
            'units': '',
            'default': 0.
        }),
        ('terminal_velocity', {
            'dtype': np.float32,
            'units': 'm/s',
            'default': 0.
        })
    ])
class FishLarvaeOrientObj(Lagrangian3DArray):
    """Extending Lagrangian3DArray with specific properties for pelagic larvae and orientation
	"""

    variables = Lagrangian3DArray.add_variables([('neutral_buoyancy_salinity',
                                                  {
                                                      'dtype': np.float32,
                                                      'units': '[]',
                                                      'default': 31.25
                                                  }),
                                                 ('age_seconds', {
                                                     'dtype': np.float32,
                                                     'units': 's',
                                                     'default': 0.
                                                 }),
                                                 ('density', {
                                                     'dtype': np.float32,
                                                     'units': 'kg/m^3',
                                                     'default': 1028.
                                                 }),
                                                 ('terminal_velocity', {
                                                     'dtype': np.float32,
                                                     'units': 'm/s',
                                                     'default': 0.
                                                 }),
                                                 ('light', {
                                                     'dtype': np.float32,
                                                     'units': 'ugEm2',
                                                     'default': 0.
                                                 })])
Пример #5
0
class TemplateElementType(Lagrangian3DArray):
    """Extending LagrangianArray with relevant properties."""

    # Define and name the properties which the elements shall have.
    # These are added to the inherited properties (e.g. from OceanDrift)
    # Property names may be freely chosen, but the "update" function (below)
    # will refer to the names in the specifications of the processes.
    #
    # The "default" value is used for alle elements, unless a custom
    # value is provided at time of seeding:
    # o.seed_elements(......., <property>=<value>)
    #
    # The default value can also be updated by the user
    # before seeding with the config mechanism:
    # o.set_config('seed:<property>', <new default value>)
    #
    # The "units" attribute is used for labeling.

    variables = Lagrangian3DArray.add_variables([('new_property_1', {
        'dtype': np.float32,
        'units': '1',
        'default': 0
    }), ('new_property_2', {
        'dtype': np.float32,
        'units': '1',
        'default': 0
    })])
Пример #6
0
class SedimentElement(Lagrangian3DArray):
    variables = Lagrangian3DArray.add_variables([
        ('settled', {'dtype': np.uint8,  # 0 is active, 1 is settled
                     'units': '1',
                     'default': 0}),
        ('terminal_velocity', {'dtype': np.float32,
                               'units': 'm/s',
                               'default': -0.001})  # 1 mm/s negative buoyancy
        ])
Пример #7
0
class PlastElement(Lagrangian3DArray):
    variables = Lagrangian3DArray.add_variables([('terminal_velocity', {
        'dtype': np.float32,
        'units': 'm/s',
        'level': OceanDrift.CONFIG_LEVEL_ESSENTIAL,
        'description':
        'Positive value means rising particles (positive buoyancy)',
        'default': 0.01
    })])
Пример #8
0
class FishLarvaeObj(Lagrangian3DArray):
    """Extending Lagrangian3DArray with specific properties for pelagic eggs/larvae
    """

    variables = Lagrangian3DArray.add_variables([
                ('flexion_stage', {'dtype': np.int64,
                             'units': '',
                             'default': 0}),
                ('u_swim', {'dtype': np.float32,
                             'units': 'm/s',
                             'default': 0.}),
                ('v_swim', {'dtype': np.float32,
                             'units': 'm/s',
                             'default': 0.})]) # pre_flexion,flexion,post_flexion 0,1,2 - to implement
Пример #9
0
class LobsterLarvaeObj(Lagrangian3DArray):
    """Extending Lagrangian3DArray with specific properties for pelagic eggs/larvae
    """

    variables = Lagrangian3DArray.add_variables([('light', {
        'dtype': np.float32,
        'units': 'ugEm2',
        'default': 0.
    }), ('u_swim', {
        'dtype': np.float32,
        'units': 'm/s',
        'default': 0.
    }), ('v_swim', {
        'dtype': np.float32,
        'units': 'm/s',
        'default': 0.
    })])
Пример #10
0
class LobsterLarvaeObj(Lagrangian3DArray):
    """Extending Lagrangian3DArray with specific properties for pelagic eggs/larvae
    """

    variables = Lagrangian3DArray.add_variables([('neutral_buoyancy_salinity',
                                                  {
                                                      'dtype': np.float32,
                                                      'units': '[]',
                                                      'default': 31.25
                                                  }),
                                                 ('age_seconds', {
                                                     'dtype': np.float32,
                                                     'units': 's',
                                                     'default': 0.
                                                 }),
                                                 ('density', {
                                                     'dtype': np.float32,
                                                     'units': 'kg/m^3',
                                                     'default': 1028.
                                                 }),
                                                 ('terminal_velocity', {
                                                     'dtype': np.float32,
                                                     'units': 'm/s',
                                                     'default': 0.
                                                 }),
                                                 ('light', {
                                                     'dtype': np.float32,
                                                     'units': 'ugEm2',
                                                     'default': 0.
                                                 }),
                                                 ('metamorphosis', {
                                                     'dtype': np.float32,
                                                     'units': '[]',
                                                     'default': 0.
                                                 }),
                                                 ('u_swim', {
                                                     'dtype': np.float32,
                                                     'units': 'm/s',
                                                     'default': 0.
                                                 }),
                                                 ('v_swim', {
                                                     'dtype': np.float32,
                                                     'units': 'm/s',
                                                     'default': 0.
                                                 })])
class TemplateElementType(Lagrangian3DArray):
    """
    Extending LagrangianArray with relevant properties.

    Define and name the properties which the elements shall have.
    These are added to the inherited properties (e.g. from OceanDrift)
    Property names may be freely chosen, but the "update" function (below)
    will refer to the names in the specifications of the processes.
    """
    variables = Lagrangian3DArray.add_variables([('new_property_1', {
        'dtype': np.float32,
        'units': '1',
        'default': 0
    }), ('new_property_2', {
        'dtype': np.float32,
        'units': '1',
        'default': 0
    })])
Пример #12
0
class PelagicPlankton(Lagrangian3DArray):
    """Extending Lagrangian3DArray with specific properties for pelagic plankton

    """

    variables = Lagrangian3DArray.add_variables([
        ('diameter', {'dtype': np.float32,
                      'units': 'm',
                      'default': 0.0014}),  # for NEA Cod
        ('neutral_buoyancy_salinity', {'dtype': np.float32,
                                       'units': '[]',
                                       'default': 31.25}),  # for NEA Cod
        ('age_seconds', {'dtype': np.float32,
                         'units': 's',
                         'default': 0.}),           
         ('light', {'dtype': np.float32,
                     'units': 'ugEm2',
                     'default': 0.}),
         ('survival', {'dtype': np.float32, # generic load to track mortality
                          'units': '',
                          'default': 1.})])
Пример #13
0
class SedimentElement(Lagrangian3DArray):
    # Lagrangian3DArray has already the variables terminal_velocity, and wind_drift_factor
    variables = Lagrangian3DArray.add_variables([
        (
            'settled',
            {
                'dtype': np.int16,  # 0 is active, 1 is settled
                'units': '1',
                'default': 0
            }),
        ('age_seconds', {
            'dtype': np.float32,
            'units': 's',
            'default': 0
        }),
        ('terminal_velocity', {
            'dtype': np.float32,
            'units': 'm/s',
            'default': -0.001
        }),  # 1 mm/s negative buoyancy
        ('critical_shear_stress', {
            'dtype': np.float32,
            'units': 'N/m2',
            'default': 0.0
        }),
        (
            'd50',
            {
                'dtype': np.float32,  # median grain size
                'units': 'm',
                'default': 125.0 * 1e-6
            }),
        (
            'density',
            {
                'dtype': np.float32,  # grain density = mass_solid/volume_solid
                'units': 'kg/m^3',
                'default': 2650.
            }),
    ])
Пример #14
0
class SeaLiceElement(Lagrangian3DArray):
    """
    Extending Lagrangian3DArray with specific properties for larval and
    juvenile stages of sea lice into super individuals
    """

    variables = Lagrangian3DArray.add_variables([
        ('LicePerFish', {
            'dtype': np.float32,
            'units': '',
            'default': 0.5
        }),
        ('AvFishW8', {
            'dtype': np.float32,
            'units': 'kg',
            'default': 4.5
        }),
        ('particle_biomass', {
            'dtype': np.float32,
            'units': 'kg',
            'default': 1000.
        }),
        ('hatched', {
            'dtype': np.float32,
            'units': '',
            'default': 0.
        }),
        ('nauplii', {
            'dtype': np.float32,
            'units': '',
            'default': 0.
        }),
        ('copepodid', {
            'dtype': np.float32,
            'units': '',
            'default': 0.
        }),
        ('dead', {
            'dtype': np.float32,
            'units': '',
            'default': 0.
        }),
        ('eliminated', {
            'dtype': np.int8,
            'units': '',
            'default': 0
        }),
        ('degree_days', {
            'dtype': np.float32,
            'units': '',
            'default': 0
        }),  #range 40-170
        ('safe_salinity_above', {
            'dtype': np.int8,
            'units': '',
            'default': 0
        }),
        ('temperature_above', {
            'dtype': np.float32,
            'units': '',
            'default': 10
        }),
        ('temperature_below', {
            'dtype': np.float32,
            'units': '',
            'default': 10
        }),
        ('light', {
            'dtype': np.float32,
            'units': 'µmol photon s−1 m−2',
            'default': 0.
        }),
    ])
Пример #15
0
class PelagicPlankton(Lagrangian3DArray):
    """Extending Lagrangian3DArray with specific properties for pelagic plankton

    """

    variables = Lagrangian3DArray.add_variables([
        ('diameter', {
            'dtype': np.float32,
            'units': 'm',
            'default': 0.0014
        }),  # for NEA Cod
        ('neutral_buoyancy_salinity', {
            'dtype': np.float32,
            'units': '[]',
            'default': 31.25
        }),  # for NEA Cod
        ('density', {
            'dtype': np.float32,
            'units': 'kg/m^3',
            'default': 1028.
        }),
        ('age_seconds', {
            'dtype': np.float32,
            'units': 's',
            'default': 0.
        }),
        ('hatched', {
            'dtype': np.int64,
            'units': '',
            'default': 0
        }),
        (
            'stage_fraction',
            {
                'dtype': np.
                float32,  #KK: Added to track percentage of development time completed
                'units': '',
                'default': 0.
            }),
        ('length', {
            'dtype': np.float32,
            'units': 'mm',
            'default': 4.0
        }),
        ('weight', {
            'dtype': np.float32,
            'units': 'mg',
            'default': 0.08
        }),
        ('Eb', {
            'dtype': np.float32,
            'units': 'ugEm2',
            'default': 0.
        }),
        ('light', {
            'dtype': np.float32,
            'units': 'ugEm2',
            'default': 0.
        }),
        ('growth_rate', {
            'dtype': np.float32,
            'units': '%',
            'default': 0.
        }),
        ('ingestion_rate', {
            'dtype': np.float32,
            'units': '%',
            'default': 0.
        }),
        ('stomach_fullness', {
            'dtype': np.float32,
            'units': '%',
            'default': 0.
        }),
        ('stomach', {
            'dtype': np.float32,
            'units': '',
            'default': 0.
        }),
        (
            'survival',
            {
                'dtype': np.float32,  # generic load to track mortality
                'units': '',
                'default': 1.
            })
    ])