Introduction to OpenDrift¶
OpenDrift is a software package for modeling the trajectories and fate of objects or substances drifting in the ocean, or even in the atmosphere.
OpenDrift is open source (available on GitHub), and is programmed in Python. As the software is very
generic, it is rather a “framework” than a “trajectory model” in the
traditional sense. Trajectory models for specific purposes (e.g.
search and rescue,
larvae drift etc) may reuse all common functionality from the
core model, and need only implement a Python Class describing the
purpose-specific processes (physics/biology etc). See
Specifications and background requirements and Data model for more detailed
Drift at different depths
Some key features of OpenDrift are:
Open source (GPLv2): providing full transparency.
Fast: optimised and vectorised Python code. Reading forcing data from disk/internet is normally the bottleneck.
Modular: may simulate transport and fate of any kind of particles (oil, ships, persons, icebergs, micro plastics…)
May use input forcing data (current, wind and waves) from any model, in many file formats and any map projection.
May use backup data sources if first choice is temporarily unavailable.
Can simulate backwards in time (specify a negative time step).
Output is saved to CF-compliant netCDF files.
Basic graphical user interface.
Can use input from ensemble models.
Running a simulation can be as simple as:
>>> from datetime import datetime, timedelta >>> from opendrift.models.oceandrift import OceanDrift >>> >>> o = OceanDrift() >>> o.add_readers_from_list( >>> ['https://thredds.met.no/thredds/dodsC/sea/norkyst800m/1h/aggregate_be']) >>> o.disable_vertical_motion() >>> o.seed_elements(lon=4.85, lat=60, time=datetime.now(), number=10000, radius=1000) >>> >>> o.run(duration=timedelta(hours=24)) >>> o.animation(filename='animation.mp4')
Once you have OpenDrift installed, take a look at the
Tutorial on how to get started, or check out the gallery for some examples. The details and physics of each model
is documented in the reference, along with specific examples for that model.
Models can be configured in nuanced ways which are important for more realistic
simulation (e.g. diffusion for
simulations). These should also be documented under the reference for the
particular model. See
opendrift.models for an overview.
If you found OpenDrift useful for your study, please cite it as:
Dagestad, K.-F., Röhrs, J., Breivik, Ø., and Ådlandsvik, B.: OpenDrift v1.0: a generic framework for trajectory modelling, Geosci. Model Dev., 11, 1405-1420, https://doi.org/10.5194/gmd-11-1405-2018, 2018.
For the oil spill module, please cite in addition to the above:
Röhrs, J., Dagestad, K.-F., Asbjørnsen, H., Nordam, T., Skancke, J., Jones, C. E., and Brekke, C.: The effect of vertical mixing on the horizontal drift of oil spills, Ocean Sci., 14, 1581-1601, https://doi.org/10.5194/os-14-1581-2018, 2018.
- Installing OpenDrift
- How to choose which model to use
- How to write a new module
- Oil types
- Interaction with coastline
- Graphical User Interface
- API Reference