Skip to content
Knut-Frode Dagestad edited this page Nov 16, 2015 · 103 revisions

OpenDrift

OpenDrift is a software for modeling the trajectories and fate of particles (Lagrangian Elements) drifting in the ocean, or even in the atmosphere.

OpenDrift is open source, and is programmed in Python. As the software is very generic, it is more a "framework" than a "trajectory model" in the traditional sense. Trajectory models for specific purposes (e.g. oil drift, 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 Requirements and Data model for more detailed information.

OpenDrift animation

Some key features:

  • Open source, GPL v2 license, providing full transparency - no black boxes
  • Very simple installation, core OpenDrift requires only Python standard libraries
  • Platform independent, runs on Linux, Mac/OS X, Windows
  • Fast - typical simulation time is ~30 seconds for a 66 hour simulation with 1000 particles
  • Modular, may simulate transport and fate of any kind of of particles (oil, ships, persons, icebergs etc.)
    • Simple to make new modules, based on existing modules or blank template
  • May use input forcing data (e.g. current, wind and waves) from any model, in any file format and any map projection
    • avoids need to preprocess driver data
    • map reprojection and vector rotation performed on-the-fly, using PyProj library
    • may use input forcing from remote datasets (e.g. Thredds)
  • May use backup driver models (e.g. current, wind, waves) for robustness if first choice is not available
  • May run backwards in time by simply specifying a negative time step
  • Output saved to CF-compliant netCDF files (but export modules may be written for other formats).
  • Coming soon:
    • Input from ensemble models
    • Built-in user interface (probably Tkinter-based)

Disclaimer

OpenDrift is still in early development phase, and should not be used for real studies and applications. A stable first version is expected by the end of 2015.

Download and installation

OpenDrift can be downloaded with the command:

git clone https://github.com/knutfrode/opendrift.git

No installation is required for OpenDrift, but the following Python packages are required for some features:

  • Basemap for plotting and default landmask
  • python-netcdf4 for obtaining driver data from Thredds servers and netCDF4 files.

To test that OpenDrift works as expected, run the script 'testall' in the root folder. The last line of the output should report that all tests have been executed successfully.

For a demonstration of various capabilities, run some of the executable example scripts located in the opendrift folder (example.py, example_leeway.py etc). These examples will automatically download required wind and ocean current input data. If this works well, you may play with the model by editing the example scrips.

Here is an example of running the model.

License

OpenDrift is licensed under GPL v2.0

Contact

OpenDrift is under development at MET Norway in cooperation with Institute of Marine Research. Please contact knutfd@met.no for any questions.

Clone this wiki locally