class BuoyantTracer(PassiveTracer): """Extending PassiveTracer (which is same as LagrangianArray) for elements moving in 3 dimensions The BuoyantTracer may be buoyant and/or subject to vertical mixing, and has some additional properties (as used in oceandrift3D.py) Buoyant behaviour is described by terminal velocity terminal_velocity>0 particle moves up towards the surface terminal_velocity<0 particle moves down towards the seabed """ variables = PassiveTracer.add_variables([('terminal_velocity', { 'dtype': np.float32, 'units': 'm/s', 'default': 0. }), ('wind_drift_factor', { 'dtype': np.float32, 'unit': '%', 'default': 0.0 }), ('age_seconds', { 'dtype': np.float32, 'units': 's', 'default': 0 })])
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with OpenDrift. If not, see <http://www.gnu.org/licenses/>. # # Copyright 2015, Knut-Frode Dagestad, MET Norway import numpy as np from opendrift.models.basemodel import OpenDriftSimulation from opendrift.elements.passivetracer import PassiveTracer # We add the property 'wind_drift_factor' to the element class PassiveTracer.variables = PassiveTracer.add_variables([('wind_drift_factor', { 'dtype': np.float32, 'unit': '%', 'default': 0.02 })]) class OceanDrift(OpenDriftSimulation): """Trajectory model based on the OpenDrift framework. Simply propagation with ocean currents and possibly additional wind drag. Suitable for passive tracers or simple object like ocean drifters. Developed at MET Norway. """ ElementType = PassiveTracer required_variables = [
# # You should have received a copy of the GNU General Public License # along with OpenDrift. If not, see <https://www.gnu.org/licenses/>. # # Copyright 2015, Knut-Frode Dagestad, MET Norway import numpy as np from opendrift.models.oceandrift3D import OceanDrift3D from opendrift.elements.passivetracer import PassiveTracer # We add the property 'wind_drift_factor' to the element class PassiveTracer.variables = PassiveTracer.add_variables([ ('wind_drift_factor', {'dtype': np.float32, 'unit': '%', 'default': 0.02}), ('terminal_velocity', {'dtype': np.float32, 'units': 'm/s', 'default': 0.01}), ('origin_marker', {'dtype': np.int16, 'unit': '', 'default': 0})]) class PlastDrift(OceanDrift3D): """Trajectory model based on the OpenDrift framework. Propagation of plastics particles with ocean currents and additional Stokes drift and wind drag. Developed at MET Norway. """
# # You should have received a copy of the GNU General Public License # along with OpenDrift. If not, see <http://www.gnu.org/licenses/>. # # Copyright 2015, Knut-Frode Dagestad, MET Norway import logging import numpy as np from opendrift.models.basemodel import OpenDriftSimulation from opendrift.elements.passivetracer import PassiveTracer # We add the property 'wind_drift_factor' to the element class PassiveTracer.variables = PassiveTracer.add_variables([ ('wind_drift_factor', {'dtype': np.float32, 'unit': '%', 'default': 0.02}), ('age_seconds', {'dtype': np.float32, 'units': 's', 'default': 0})]) class OceanDrift(OpenDriftSimulation): """Trajectory model based on the OpenDrift framework. Simply propagation with ocean currents and possibly additional wind drag. Suitable for passive tracers or simple object like ocean drifters. Developed at MET Norway. """ ElementType = PassiveTracer
# You should have received a copy of the GNU General Public License # along with OpenDrift. If not, see <http://www.gnu.org/licenses/>. # # Copyright 2015, Knut-Frode Dagestad, MET Norway import logging import numpy as np from opendrift.models.oceandrift3D import OceanDrift3D from opendrift.elements.passivetracer import PassiveTracer # We add the property 'wind_drift_factor' to the element class PassiveTracer.variables = PassiveTracer.add_variables([ ('wind_drift_factor', {'dtype': np.float32, 'unit': '%', 'default': 0.02}), ('depth', {'dtype': np.float32, 'unit': '%', 'default': -16.0}), ('terminal_velocity', {'dtype': np.float32, 'units': 'm/s', 'default': 0.01})]) class PlastDrift(OceanDrift3D): """Trajectory model based on the OpenDrift framework. Propagation of plastics particles with ocean currents and additional Stokes drift and wind drag. Developed at MET Norway. """
import numpy as np import logging logger = logging.getLogger(__name__) from opendrift.models.oceandrift import OceanDrift from opendrift.elements.passivetracer import PassiveTracer # We add the property 'wind_drift_factor' to the element class PassiveTracer.variables = PassiveTracer.add_variables([ ('wind_drift_factor', { 'dtype': np.float32, 'units': '1', 'default': 0.02 }), ('terminal_velocity', { 'dtype': np.float32, 'units': 'm/s', 'level': OceanDrift.CONFIG_LEVEL_ESSENTIAL, 'description': 'Positive value means rising particles (positive buoyancy)', 'default': 0.01 }) ]) class PlastDrift(OceanDrift): """Trajectory model based on the OpenDrift framework. Propagation of plastics particles with ocean currents and additional Stokes drift and wind drag.
# You should have received a copy of the GNU General Public License # along with OpenDrift. If not, see <http://www.gnu.org/licenses/>. # # Copyright 2015, Knut-Frode Dagestad, MET Norway import numpy as np from opendrift.models.opendrift3D import OpenDrift3DSimulation from opendrift.models.oceandrift import OceanDrift from opendrift.elements.passivetracer import PassiveTracer # We add the property 'wind_drift_factor' to the element class PassiveTracer.variables = PassiveTracer.add_variables([('wind_drift_factor', { 'dtype': np.float32, 'unit': '%', 'default': 0.0 }), ('age_seconds', { 'dtype': np.float32, 'units': 's', 'default': 0 })]) class OceanDrift3D(OpenDrift3DSimulation, OceanDrift): """Trajectory model based on the OpenDrift framework. Simply propagation with horizontal and vertical ocean currents and possibly additional wind drag. Suitable for passive tracers, e.g. for tracking water particles. Developed at MET Norway. """