{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Thredds (global)\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from datetime import datetime, timedelta\nfrom opendrift.models.oceandrift import OceanDrift\n\n# Basic ocean drift module: current + 2% of wind\no = OceanDrift()\n\n# Adding readers for global Thredds datasets:\n# - Ocean forecast from global HYCOM model\n# - Weather forecast from NOAA/NCEP\no.add_readers_from_list([\n 'https://tds.hycom.org/thredds/dodsC/FMRC_ESPC-D-V02_uv3z/FMRC_ESPC-D-V02_uv3z_best.ncd',\n 'https://pae-paha.pacioos.hawaii.edu/thredds/dodsC/ncep_global/NCEP_Global_Atmospheric_Model_best.ncd'])\n\no.seed_elements(lat=24, lon=-81, time=datetime.utcnow(),\n number=5000, radius=10000)\n\no.run(time_step=timedelta(minutes=30),\n duration=timedelta(days=5))\no.animation()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.6" } }, "nbformat": 4, "nbformat_minor": 0 }