{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Satellite\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from opendrift.readers import reader_netCDF_CF_generic\nfrom opendrift.models.openoil import OpenOil\n\no = OpenOil(loglevel=20) # Set loglevel to 0 for debug information" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Adjusting some configuration\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "o.set_config('drift:vertical_mixing', False)\no.set_config('processes:dispersion', True)\no.set_config('processes:evaporation', False)\no.set_config('processes:emulsification', True)\no.set_config('drift:current_uncertainty', .1) # Diffusion\no.set_config('drift:wind_uncertainty', 1)\n\n# Arome\nreader_arome = reader_netCDF_CF_generic.Reader(o.test_data_folder() +\n '16Nov2015_NorKyst_z_surface/arome_subset_16Nov2015.nc')\n\n# Norkyst\nreader_norkyst = reader_netCDF_CF_generic.Reader(o.test_data_folder() +\n '16Nov2015_NorKyst_z_surface/norkyst800_subset_16Nov2015.nc')\n\no.add_reader([reader_norkyst, reader_arome])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Seed oil particles within contour detected from satellite\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "o.seed_from_gml(o.test_data_folder() + 'radarsat_oil_satellite_observation/RS2_20151116_002619_0127_SCNB_HH_SGF_433012_9730_12182143_Oil.gml',\n num_elements=2000)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Running model for 6 hours\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "o.run(steps=6*4, time_step=900)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Print and plot results\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "print(o)\no.animation(fast=True, buffer=0.1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "o.plot(fast=True, buffer=0.1)" ] } ], "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 }