.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/example_long_vietnam.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_long_vietnam.py: Vietnam ================================== .. GENERATED FROM PYTHON SOURCE LINES 6-33 .. code-block:: Python from datetime import datetime, timedelta from opendrift.models.leeway import Leeway o = Leeway(loglevel=20) # Set loglevel to 0 for debug information # Adding readers for global Thredds datasets: # - Ocean forecast from global Hycom # - Weather forecast from NOAA/NCEP o.add_readers_from_list([ 'https://tds.hycom.org/thredds/dodsC/GLBy0.08/latest', 'https://pae-paha.pacioos.hawaii.edu/thredds/dodsC/ncep_global/NCEP_Global_Atmospheric_Model_best.ncd']) # Seed some particles object_type = 26 # 26 = Life-raft, no ballast o.seed_elements(lon=107.8, lat=10.0, radius=1000, number=1000, object_type=object_type, time=datetime.utcnow()) # Run model o.run(duration=timedelta(days=3), time_step=timedelta(hours=1), time_step_output=timedelta(hours=3)) # Print and plot results print(o) o.plot(fast=True) o.animation(fast=True) .. _sphx_glr_download_gallery_example_long_vietnam.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: example_long_vietnam.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: example_long_vietnam.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_