Skip to content

Commit

Permalink
[skip ci] Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ci-build committed Jun 20, 2024
1 parent 19d4f74 commit a6d2c9e
Show file tree
Hide file tree
Showing 292 changed files with 463,433 additions and 461,696 deletions.
Binary file modified _downloads/46b4cb42d5bb56cc39e2b5b2b520b38d/gallery_python.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
#%%
# Seeding some particles
time = reader_arome.start_time
oil_type = 'GULLFAKS, EXXON'
oil_type = 'ARABIAN MEDIUM, API'
oil_type = 'ALGERIAN CONDENSATE, STATOIL'
oil_type = 'HEIDRUN AARE 2023'
o.seed_elements(lon=4.9, lat=60.1, radius=3000, number=2000,
time=time, z=0, oil_type=oil_type)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"time = reader_arome.start_time\noil_type = 'GULLFAKS, EXXON'\noil_type = 'ARABIAN MEDIUM, API'\noil_type = 'ALGERIAN CONDENSATE, STATOIL'\no.seed_elements(lon=4.9, lat=60.1, radius=3000, number=2000,\n time=time, z=0, oil_type=oil_type)"
"time = reader_arome.start_time\noil_type = 'HEIDRUN AARE 2023'\no.seed_elements(lon=4.9, lat=60.1, radius=3000, number=2000,\n time=time, z=0, oil_type=oil_type)"
]
},
{
Expand Down
Binary file modified _downloads/fcaddee3a42ae2e2c41e00ae08d70347/gallery_jupyter.zip
Binary file not shown.
Binary file modified _images/example_2d_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_biodegradation_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_chemicaldrift_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_chemicaldrift_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_coastline_options_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_codegg_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_codegg_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_cone_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_depth_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_dominating_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_ensemble_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_entrainment_rate_oil_types_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_entrainment_rate_oil_types_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_huge_output_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_huge_output_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_manual_aggregate_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_mixed_layer_depth_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_mixed_layer_depth_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_mixed_layer_depth_2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_oil_ice_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_oil_thickness_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_oil_thickness_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_oil_verticalmixing_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_oil_verticalmixing_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_oilspill_seafloor_biodegradation_0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/example_oilspill_seafloor_biodegradation_1.gif
Binary file modified _images/example_openoil_0.gif
Binary file modified _images/example_plast_0.gif
Binary file modified _images/example_plot_0.gif
Binary file modified _images/example_radionuclides_0.gif
Binary file modified _images/example_radionuclides_1.gif
Binary file modified _images/example_river_runoff_0.gif
Binary file modified _images/example_sediments_0.gif
Binary file modified _images/example_sediments_resuspension_0.gif
Binary file modified _images/example_seed_from_shapefile_0.gif
Binary file modified _images/example_shipdrift_0.gif
Binary file modified _images/example_shipdrift_leeway_0.gif
Binary file modified _images/example_static_2d_current_0.gif
Binary file modified _images/sphx_glr_example_2d_001.png
Binary file modified _images/sphx_glr_example_2d_thumb.png
Binary file modified _images/sphx_glr_example_advection_schemes_eddy_001.png
Binary file modified _images/sphx_glr_example_advection_schemes_eddy_thumb.png
Binary file modified _images/sphx_glr_example_biodegradation_001.png
Binary file modified _images/sphx_glr_example_biodegradation_thumb.png
Binary file modified _images/sphx_glr_example_chemicaldrift_001.png
Binary file modified _images/sphx_glr_example_chemicaldrift_thumb.png
Binary file modified _images/sphx_glr_example_coastline_options_001.png
Binary file modified _images/sphx_glr_example_coastline_options_thumb.png
Binary file modified _images/sphx_glr_example_codegg_001.png
Binary file modified _images/sphx_glr_example_codegg_thumb.png
Binary file modified _images/sphx_glr_example_cone_001.png
Binary file modified _images/sphx_glr_example_cone_thumb.png
Binary file modified _images/sphx_glr_example_depth_001.png
Binary file modified _images/sphx_glr_example_depth_thumb.png
Binary file modified _images/sphx_glr_example_ensemble_001.png
Binary file modified _images/sphx_glr_example_ensemble_thumb.png
Binary file modified _images/sphx_glr_example_entrainment_rate_oil_types_001.png
Binary file modified _images/sphx_glr_example_entrainment_rate_oil_types_002.png
Binary file modified _images/sphx_glr_example_entrainment_rate_oil_types_thumb.png
Binary file modified _images/sphx_glr_example_huge_output_001.png
Binary file modified _images/sphx_glr_example_huge_output_thumb.png
Binary file modified _images/sphx_glr_example_oil_ice_001.png
Binary file modified _images/sphx_glr_example_oil_ice_thumb.png
Binary file modified _images/sphx_glr_example_oil_thickness_001.png
Binary file modified _images/sphx_glr_example_oil_thickness_002.png
Binary file modified _images/sphx_glr_example_oil_thickness_thumb.png
Binary file modified _images/sphx_glr_example_oil_verticalmixing_001.png
Binary file modified _images/sphx_glr_example_oil_verticalmixing_002.png
Binary file modified _images/sphx_glr_example_oil_verticalmixing_003.png
Binary file modified _images/sphx_glr_example_oil_verticalmixing_thumb.png
Binary file modified _images/sphx_glr_example_oilspill_seafloor_biodegradation_002.png
Binary file modified _images/sphx_glr_example_oilspill_seafloor_biodegradation_thumb.png
Binary file modified _images/sphx_glr_example_openberg_new_001.png
Binary file modified _images/sphx_glr_example_openberg_new_thumb.png
Binary file modified _images/sphx_glr_example_openoil_001.png
Binary file modified _images/sphx_glr_example_openoil_002.png
Binary file modified _images/sphx_glr_example_openoil_003.png
Binary file modified _images/sphx_glr_example_openoil_004.png
Binary file modified _images/sphx_glr_example_openoil_005.png
Binary file modified _images/sphx_glr_example_openoil_thumb.png
Binary file modified _images/sphx_glr_example_radionuclides_001.png
Binary file modified _images/sphx_glr_example_radionuclides_002.png
Binary file modified _images/sphx_glr_example_radionuclides_thumb.png
Binary file modified _images/sphx_glr_example_river_runoff_001.png
Binary file modified _images/sphx_glr_example_river_runoff_002.png
Binary file modified _images/sphx_glr_example_river_runoff_thumb.png
Binary file modified _images/sphx_glr_example_sediments_001.png
Binary file modified _images/sphx_glr_example_sediments_resuspension_001.png
Binary file modified _images/sphx_glr_example_sediments_resuspension_thumb.png
Binary file modified _images/sphx_glr_example_sediments_thumb.png
Binary file modified _images/sphx_glr_example_seed_from_shapefile_001.png
Binary file modified _images/sphx_glr_example_seed_from_shapefile_thumb.png
Binary file modified _images/sphx_glr_example_shipdrift_001.png
Binary file modified _images/sphx_glr_example_shipdrift_leeway_001.png
Binary file modified _images/sphx_glr_example_shipdrift_leeway_thumb.png
Binary file modified _images/sphx_glr_example_shipdrift_thumb.png
4 changes: 2 additions & 2 deletions _modules/opendrift/models/basemodel.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h1>Source code for opendrift.models.basemodel</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">opendrift.timer</span> <span class="kn">import</span> <span class="n">Timeable</span>
<span class="kn">from</span> <span class="nn">opendrift.errors</span> <span class="kn">import</span> <span class="n">WrongMode</span>
<span class="kn">from</span> <span class="nn">opendrift.models.physics_methods</span> <span class="kn">import</span> <span class="n">PhysicsMethods</span>
<span class="kn">from</span> <span class="nn">opendrift.config</span> <span class="kn">import</span> <span class="n">Configurable</span><span class="p">,</span> <span class="n">CONFIG_LEVEL_BASIC</span><span class="p">,</span> <span class="n">CONFIG_LEVEL_ADVANCED</span>
<span class="kn">from</span> <span class="nn">opendrift.config</span> <span class="kn">import</span> <span class="n">Configurable</span><span class="p">,</span> <span class="n">CONFIG_LEVEL_BASIC</span><span class="p">,</span> <span class="n">CONFIG_LEVEL_ADVANCED</span><span class="p">,</span> <span class="n">CONFIG_LEVEL_ESSENTIAL</span>

<span class="n">Mode</span> <span class="o">=</span> <span class="n">Enum</span><span class="p">(</span><span class="s1">&#39;Mode&#39;</span><span class="p">,</span> <span class="p">[</span><span class="s1">&#39;Config&#39;</span><span class="p">,</span> <span class="s1">&#39;Ready&#39;</span><span class="p">,</span> <span class="s1">&#39;Run&#39;</span><span class="p">,</span> <span class="s1">&#39;Result&#39;</span><span class="p">])</span>

Expand Down Expand Up @@ -420,7 +420,7 @@ <h1>Source code for opendrift.models.basemodel</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">_add_config</span><span class="p">({</span>
<span class="c1"># type, default, min, max, enum, important, value, units, description</span>
<span class="s1">&#39;general:simulation_name&#39;</span><span class="p">:</span> <span class="p">{</span><span class="s1">&#39;type&#39;</span><span class="p">:</span> <span class="s1">&#39;str&#39;</span><span class="p">,</span> <span class="s1">&#39;min_length&#39;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;max_length&#39;</span><span class="p">:</span> <span class="mi">64</span><span class="p">,</span>
<span class="s1">&#39;default&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="s1">&#39;level&#39;</span><span class="p">:</span> <span class="n">CONFIG_LEVEL_BASIC</span><span class="p">,</span>
<span class="s1">&#39;default&#39;</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="s1">&#39;level&#39;</span><span class="p">:</span> <span class="n">CONFIG_LEVEL_ESSENTIAL</span><span class="p">,</span>
<span class="s1">&#39;description&#39;</span><span class="p">:</span> <span class="s1">&#39;Name of simulation&#39;</span><span class="p">},</span>
<span class="s1">&#39;general:coastline_action&#39;</span><span class="p">:</span> <span class="p">{</span>
<span class="s1">&#39;type&#39;</span><span class="p">:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h1>Source code for opendrift.models.openoil.adios.get_max_water_fraction_for_oi
<span class="n">oot</span> <span class="o">=</span> <span class="n">OpenOil</span><span class="p">(</span><span class="n">location</span><span class="o">=</span><span class="s1">&#39;Norway&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">oiltypes</span>
<span class="nb">print</span><span class="p">(</span><span class="n">oot</span><span class="p">)</span>

<span class="n">o</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_excel</span><span class="p">(</span><span class="s1">&#39;oljedatabase_alle-25.10.2023.xlsx&#39;</span><span class="p">)</span>
<span class="n">o</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_excel</span><span class="p">(</span><span class="s1">&#39;oljedatabase_alle_03052024.xlsx&#39;</span><span class="p">)</span>
<span class="n">oljer</span> <span class="o">=</span> <span class="n">o</span><span class="p">[</span><span class="s1">&#39;Oljetype&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">unique</span><span class="p">()</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="nb">list</span><span class="p">)</span>
<span class="n">oljer</span> <span class="o">=</span> <span class="n">oljer</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
<span class="nb">print</span><span class="p">(</span><span class="n">oljer</span><span class="p">)</span>
Expand Down Expand Up @@ -185,6 +185,7 @@ <h1>Source code for opendrift.models.openoil.adios.get_max_water_fraction_for_oi
<span class="s1">&#39;GYDA 2002&#39;</span><span class="p">:</span> <span class="s1">&#39;Gyda 2002&#39;</span><span class="p">,</span>
<span class="s1">&#39;HAVIS 2013&#39;</span><span class="p">:</span> <span class="s1">&#39;Havis 2013&#39;</span><span class="p">,</span>
<span class="s1">&#39;HEIDRUN AaRE 2004&#39;</span><span class="p">:</span> <span class="s1">&#39;Heidrun Åre 2004&#39;</span><span class="p">,</span>
<span class="s1">&#39;HEIDRUN AARE 2023&#39;</span><span class="p">:</span> <span class="s1">&#39;Heidrun Åre 2023&#39;</span><span class="p">,</span>
<span class="s1">&#39;HEIDRUN EXPORT BLEND 2004&#39;</span><span class="p">:</span> <span class="s1">&#39;Heidrun Åre 2004&#39;</span><span class="p">,</span>
<span class="s1">&#39;HEIDRUN TILJE 2004&#39;</span><span class="p">:</span> <span class="s1">&#39;Heidrun Åre 2004&#39;</span><span class="p">,</span>
<span class="s1">&#39;HULDRA KONDENSAT 1998&#39;</span><span class="p">:</span> <span class="s1">&#39;Huldra 1998&#39;</span><span class="p">,</span>
Expand Down Expand Up @@ -212,6 +213,7 @@ <h1>Source code for opendrift.models.openoil.adios.get_max_water_fraction_for_oi
<span class="s1">&#39;NORNE BLEND 2010&#39;</span><span class="p">:</span> <span class="s1">&#39;Norne Blend 2010&#39;</span><span class="p">,</span>
<span class="s1">&#39;NORNE CRUDE 2017&#39;</span><span class="p">:</span> <span class="s1">&#39;Norne 2018&#39;</span><span class="p">,</span>
<span class="s1">&#39;ODA 2019&#39;</span><span class="p">:</span> <span class="s1">&#39;Oda 2019&#39;</span><span class="p">,</span>
<span class="s1">&#39;OFELIA 2023&#39;</span><span class="p">:</span> <span class="s1">&#39;Ofelia 2023&#39;</span><span class="p">,</span>
<span class="s1">&#39;ORMEN LANGE KONDENSAT 2008&#39;</span><span class="p">:</span> <span class="s1">&#39;Ormen Lange 2008&#39;</span><span class="p">,</span>
<span class="s1">&#39;OSEBERG A 2013&#39;</span><span class="p">:</span> <span class="s1">&#39;Oseberg A 2013&#39;</span><span class="p">,</span>
<span class="s1">&#39;OSEBERG BLEND 2007&#39;</span><span class="p">:</span> <span class="s1">&#39;Oseberg Blend 2007&#39;</span><span class="p">,</span>
Expand Down Expand Up @@ -283,8 +285,6 @@ <h1>Source code for opendrift.models.openoil.adios.get_max_water_fraction_for_oi
<span class="n">oilmax</span> <span class="o">=</span> <span class="p">{</span> <span class="c1"># Some known limits not in NOFO excel file</span>
<span class="s1">&#39;MARINE GAS OIL 500 ppm S 2017&#39;</span><span class="p">:</span>
<span class="p">{</span><span class="s1">&#39;temperatures&#39;</span><span class="p">:</span> <span class="p">[</span><span class="mi">15</span><span class="p">],</span> <span class="s1">&#39;max_water_fraction&#39;</span><span class="p">:</span> <span class="p">[</span><span class="mf">.1</span><span class="p">]},</span>
<span class="s1">&#39;OFELIA 2023&#39;</span><span class="p">:</span>
<span class="p">{</span><span class="s1">&#39;temperatures&#39;</span><span class="p">:</span> <span class="p">[</span><span class="mi">5</span><span class="p">,</span> <span class="mi">15</span><span class="p">],</span> <span class="s1">&#39;max_water_fraction&#39;</span><span class="p">:</span> <span class="p">[</span><span class="mf">.4</span><span class="p">,</span> <span class="mf">.7</span><span class="p">]},</span>
<span class="p">}</span>

<span class="k">for</span> <span class="n">ot</span> <span class="ow">in</span> <span class="n">mapping</span><span class="p">:</span>
Expand Down
13 changes: 11 additions & 2 deletions _modules/opendrift/readers/reader_copernicusmarine.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ <h1>Source code for opendrift.readers.reader_copernicusmarine</h1><div class="hi
<span class="c1">#</span>
<span class="c1"># Copyright 2024, Knut-Frode Dagestad, MET Norway</span>

<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">logging</span>
<span class="n">logger</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">opendrift.readers.reader_netCDF_CF_generic</span> <span class="kn">import</span> <span class="n">Reader</span> <span class="k">as</span> <span class="n">Reader_CF_generic</span>
Expand All @@ -130,9 +131,17 @@ <h1>Source code for opendrift.readers.reader_copernicusmarine</h1><div class="hi
<span class="k">except</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;Copernicus Marine Client is not installed&#39;</span><span class="p">)</span>

<span class="k">if</span> <span class="n">username</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">password</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Using CMEMS password for user </span><span class="si">{</span><span class="n">username</span><span class="si">}</span><span class="s1"> from provided variables&#39;</span><span class="p">)</span>

<span class="k">if</span> <span class="n">username</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">username</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getenv</span><span class="p">(</span><span class="s1">&#39;COPERNICUSMARINE_USER&#39;</span><span class="p">)</span>
<span class="n">password</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getenv</span><span class="p">(</span><span class="s1">&#39;COPERNICUSMARINE_PASSWORD&#39;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">username</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">password</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Using CMEMS password for user </span><span class="si">{</span><span class="n">username</span><span class="si">}</span><span class="s1"> from environment variables COPERNICUSMARINE_USER and COPERNICUSMARINE_PASSWORD&#39;</span><span class="p">)</span>

<span class="k">if</span> <span class="n">username</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">netrc</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">n</span> <span class="o">=</span> <span class="n">netrc</span><span class="o">.</span><span class="n">netrc</span><span class="p">()</span>
Expand All @@ -153,7 +162,7 @@ <h1>Source code for opendrift.readers.reader_copernicusmarine</h1><div class="hi
<span class="k">pass</span>

<span class="k">if</span> <span class="n">username</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;To use CMEMS datasets, provide username and password, or store these in .netrc file in home folder or main opendrift folder with machine name &quot;copernicusmarine&quot;&#39;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;To use CMEMS datasets, provide username and password, or store these in .netrc file in home folder or main opendrift folder with machine name &quot;copernicusmarine&quot;. Alternatively, creadentials can be stored as environment variables COPERNICUSMARINE_USER and COPERNICUSMARINE_PASSWORD.&#39;</span><span class="p">)</span>

<span class="n">ds</span> <span class="o">=</span> <span class="n">copernicusmarine</span><span class="o">.</span><span class="n">open_dataset</span><span class="p">(</span><span class="n">dataset_id</span><span class="o">=</span><span class="n">dataset_id</span><span class="p">,</span> <span class="n">username</span><span class="o">=</span><span class="n">username</span><span class="p">,</span> <span class="n">password</span><span class="o">=</span><span class="n">password</span><span class="p">)</span>
<span class="n">ds</span><span class="p">[</span><span class="s1">&#39;name&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">dataset_id</span><span class="p">)</span>
Expand Down
6 changes: 6 additions & 0 deletions _sources/autoapi/opendrift/models/basemodel/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Attributes
opendrift.models.basemodel.logger
opendrift.models.basemodel.CONFIG_LEVEL_BASIC
opendrift.models.basemodel.CONFIG_LEVEL_ADVANCED
opendrift.models.basemodel.CONFIG_LEVEL_ESSENTIAL
opendrift.models.basemodel.Mode


Expand Down Expand Up @@ -449,6 +450,11 @@ Attributes



.. py:data:: CONFIG_LEVEL_ESSENTIAL
:value: 1



.. py:data:: Mode
Expand Down
Loading

0 comments on commit a6d2c9e

Please sign in to comment.