.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/example_plot.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_example_plot.py: Example plot (for front page) ================================== .. GENERATED FROM PYTHON SOURCE LINES 6-19 .. code-block:: Python from datetime import datetime, timedelta from opendrift.models.oceandrift import OceanDrift o = OceanDrift(loglevel=30) 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') .. rst-class:: sphx-glr-script-out .. code-block:: none /opt/conda/envs/opendrift/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py:1683: UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored result = super().scatter(*args, **kwargs) .. GENERATED FROM PYTHON SOURCE LINES 20-21 .. image:: /gallery/animations/example_plot_0.gif .. rst-class:: sphx-glr-timing **Total running time of the script:** (2 minutes 7.204 seconds) .. _sphx_glr_download_gallery_example_plot.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: example_plot.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: example_plot.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_