-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ci-build
committed
Mar 8, 2024
1 parent
e8de62d
commit d5d5e8d
Showing
278 changed files
with
334,163 additions
and
313,928 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: e36d92882cbff06d990f33b55f556eca | ||
config: 5d9e0e9a7bc6ca85ecd21cda503e4d4b | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file modified
BIN
+1.64 KB
(100%)
_downloads/46b4cb42d5bb56cc39e2b5b2b520b38d/gallery_python.zip
Binary file not shown.
140 changes: 140 additions & 0 deletions
140
_downloads/db165b7788ff8b7c69580e0e56514a8c/example_biodegradation.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"\n# Biodegradation of oil\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\nfrom datetime import datetime, timedelta\nfrom opendrift.readers import reader_netCDF_CF_generic\nfrom opendrift.models.openoil import OpenOil\n\no = OpenOil(loglevel=0) # Set loglevel to 0 for debug information\ntime = datetime.now()\n\n# No motion is needed for this test\no.set_config('environment:constant', {k: 0 for k in\n ['x_wind', 'y_wind', 'x_sea_water_velocity', 'y_sea_water_velocity']})\no.set_config('drift', {'current_uncertainty': 0, 'wind_uncertainty': 0})" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Seeding some particles\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"o.set_config('drift:vertical_mixing', False) # Keeping oil at fixed depths\no.set_config('processes:biodegradation', True)\no.set_config('biodegradation:method', 'decay_rate')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Fast decay for droplets, and slow decay for slick \n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"decay = {'biodegradation_decay_rate_slick': np.log(2)/timedelta(days=100).total_seconds(),\n 'biodegradation_decay_rate_droplet': np.log(2)/timedelta(days=3).total_seconds(),\n 'oil_type': 'GENERIC MEDIUM CRUDE'}" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Seed 5000 oil elements at surface, and 5000 elements at 100m depth\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"o.seed_elements(lon=4, lat=60.0, z=0, number=5000, time=datetime.now(), **decay)\no.seed_elements(lon=4, lat=60.0, z=-100, number=5000, time=datetime.now(), **decay)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Running model\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"o.run(duration=timedelta(hours=24), 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": [ | ||
"o.plot_oil_budget(show_watercontent_and_viscosity=False, show_wind_and_current=False)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"<img src=\"file://gallery/animations/example_biodegradation_0.gif\">\n\n" | ||
] | ||
} | ||
], | ||
"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 | ||
} |
46 changes: 46 additions & 0 deletions
46
_downloads/db8475e1b1e79daba41dce5a4853bec8/example_biodegradation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env python | ||
""" | ||
Biodegradation of oil | ||
====================== | ||
""" | ||
|
||
import numpy as np | ||
from datetime import datetime, timedelta | ||
from opendrift.readers import reader_netCDF_CF_generic | ||
from opendrift.models.openoil import OpenOil | ||
|
||
o = OpenOil(loglevel=0) # Set loglevel to 0 for debug information | ||
time = datetime.now() | ||
|
||
# No motion is needed for this test | ||
o.set_config('environment:constant', {k: 0 for k in | ||
['x_wind', 'y_wind', 'x_sea_water_velocity', 'y_sea_water_velocity']}) | ||
o.set_config('drift', {'current_uncertainty': 0, 'wind_uncertainty': 0}) | ||
|
||
#%% | ||
# Seeding some particles | ||
o.set_config('drift:vertical_mixing', False) # Keeping oil at fixed depths | ||
o.set_config('processes:biodegradation', True) | ||
o.set_config('biodegradation:method', 'decay_rate') | ||
|
||
#%% | ||
# Fast decay for droplets, and slow decay for slick | ||
decay = {'biodegradation_decay_rate_slick': np.log(2)/timedelta(days=100).total_seconds(), | ||
'biodegradation_decay_rate_droplet': np.log(2)/timedelta(days=3).total_seconds(), | ||
'oil_type': 'GENERIC MEDIUM CRUDE'} | ||
|
||
#%% | ||
# Seed 5000 oil elements at surface, and 5000 elements at 100m depth | ||
o.seed_elements(lon=4, lat=60.0, z=0, number=5000, time=datetime.now(), **decay) | ||
o.seed_elements(lon=4, lat=60.0, z=-100, number=5000, time=datetime.now(), **decay) | ||
|
||
#%% | ||
# Running model | ||
o.run(duration=timedelta(hours=24), time_step=900) | ||
|
||
#%% | ||
# Print and plot results | ||
o.plot_oil_budget(show_watercontent_and_viscosity=False, show_wind_and_current=False) | ||
|
||
#%% | ||
# .. image:: /gallery/animations/example_biodegradation_0.gif |
Binary file modified
BIN
+3.87 KB
(100%)
_downloads/fcaddee3a42ae2e2c41e00ae08d70347/gallery_jupyter.zip
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+438 Bytes
(100%)
_images/sphx_glr_example_entrainment_rate_oil_types_001.png
Oops, something went wrong.
Binary file modified
BIN
+529 Bytes
(100%)
_images/sphx_glr_example_entrainment_rate_oil_types_002.png
Oops, something went wrong.
Binary file modified
BIN
+35 Bytes
(100%)
_images/sphx_glr_example_entrainment_rate_oil_types_thumb.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
-135 Bytes
(100%)
_images/sphx_glr_example_sediments_resuspension_thumb.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.