예제 #1
0
class LeewayObj(LagrangianArray):
    """Extending LagrangianArray with variables relevant for leeway objects.

    """
    variables = LagrangianArray.add_variables([
        ('objectType', {'dtype': np.int16,
                        'unit': '1',
                        'default': 0}),
        ('orientation', {'dtype': np.int16,
                         'unit': '1',
                         'default': 1}),
        ('jibeProbability', {'dtype': np.float32,
                             'unit': '1/h',
                             'default': 0.04}),
        ('downwindSlope', {'dtype': np.float32,
                           'unit': '%',
                           'default': 1}),
        ('crosswindSlope', {'dtype': np.float32,
                            'unit': '1',
                            'default': 1}),
        ('downwindOffset', {'dtype': np.float32,
                            'unit': 'cm/s',
                            'default': 0}),
        ('crosswindOffset', {'dtype': np.float32,
                             'unit': 'cm/s',
                             'default': 0}),
        ('downwindEps', {'dtype': np.float32,
                         'unit': 'cm/s',
                         'default': 0}),
        ('crosswindEps', {'dtype': np.float32,
                          'unit': 'cm/s',
                          'default': 0})
        ])
예제 #2
0
파일: larvae.py 프로젝트: trondkr/opendrift
class Larvae(LagrangianArray):
    """Extending LagrangianArray with variables relevant for (marine) larvae."""

    variables = LagrangianArray.add_variables(
        {'length': {
            'dtype': np.float32,
            'unit': 'mm'
        }})
예제 #3
0
class Lagrangian3DArray(LagrangianArray):
    """Extending LagrangianArray for elements moving in 3 dimensions
    The Particle may be buoyant and/or subject to vertical mixing
    buoyant bahaviour is described by terminal velocity
    """

    variables = LagrangianArray.add_variables([
        ('terminal_velocity', {'dtype': np.float32,
                               'units': 'm/s',
                               'default': 0.})])
예제 #4
0
class TemplateElementType(LagrangianArray):
    """Extending LagrangianArray with relevant properties."""
    # Define and name the properties which the elements shall have.
    # These are added to the four core properties (ID, lon, lat, z)
    # inherited from the basic/generic LagrangianArray class.
    # Property names may be freely chosen, but the "update" function (below)
    # will refer to the names in the specifications of the processes.
    variables = LagrangianArray.add_variables([('mass_oil', {
        'dtype': np.float32,
        'unit': 'kg'
    }), ('mass_evaporated', {
        'dtype': np.float32,
        'unit': 'kg',
        'default': 0
    }), ('mass_emulsion', {
        'dtype': np.float32,
        'unit': 'kg',
        'default': 0
    })])
예제 #5
0
class PelagicEgg(Lagrangian3DArray):
    """Extending Lagrangian3DArray with specific properties for pelagic eggs
    """

    variables = LagrangianArray.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.float32,
                     'units': '',
                     'default': 0.})])
예제 #6
0
class Oil(LagrangianArray):
    """Extending LagrangianArray with variables relevant for oil particles."""

    variables = LagrangianArray.add_variables([
        ('mass_oil', {
            'dtype': np.float32,
            'units': 'kg',
            'default': 1
        }),
        (
            'viscosity',
            {
                'dtype': np.float32,
                #'unit': 'mm2/s (centiStokes)',
                'units': 'N s/m2 (Pa s)',
                'default': 0.5
            }),
        ('density', {
            'dtype': np.float32,
            'units': 'kg/m^3',
            'default': 880
        }),
        ('wind_drift_factor', {
            'dtype': np.float32,
            'units': '%',
            'default': 0.03
        }),
        ('age_seconds', {
            'dtype': np.float32,
            'units': 's',
            'default': 0
        }),
        ('age_exposure_seconds', {
            'dtype': np.float32,
            'units': 's',
            'default': 0
        }),
        ('age_emulsion_seconds', {
            'dtype': np.float32,
            'units': 's',
            'default': 0
        }),
        ('mass_emulsion', {
            'dtype': np.float32,
            'units': 'kg',
            'default': 0
        }),
        ('mass_dispersed', {
            'dtype': np.float32,
            'units': 'kg',
            'default': 0
        }),
        ('mass_evaporated', {
            'dtype': np.float32,
            'units': 'kg',
            'default': 0
        }),
        ('fraction_evaporated', {
            'dtype': np.float32,
            'units': '%',
            'default': 0
        }),
        ('water_content', {
            'dtype': np.float32,
            'units': '%',
            'default': 0
        })
    ])