Skip to content

Commit

Permalink
Update to Croatian fisheries example settings variables to be inline …
Browse files Browse the repository at this point in the history
…with parcels style
  • Loading branch information
michaeldenes committed May 29, 2024
1 parent 21a0b83 commit ec3169a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/examples/example_Croatian_fisheries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
"source": [
"# Create the simulation settings\n",
"settings['simulation'] = {\n",
" 'start_date': datetime.strptime('2019-01-01-00:00:00', '%Y-%m-%d-%H:%M:%S'), # Start date of simulation\n",
" 'startdate': datetime.strptime('2019-01-01-00:00:00', '%Y-%m-%d-%H:%M:%S'), # Start date of simulation\n",
" 'runtime': timedelta(days=30), # Runtime of simulation\n",
" 'dt_write': timedelta(hours=12), # Timestep of output\n",
" 'dt_timestep': timedelta(minutes=20), # Timestep of advection\n",
" 'outputdt': timedelta(hours=12), # Timestep of output\n",
" 'dt': timedelta(minutes=20), # Timestep of advection\n",
" }\n",
"\n",
"# Overwrite some settings\n",
Expand Down Expand Up @@ -155,8 +155,8 @@
"outputs": [],
"source": [
"runtime = settings['simulation']['runtime']\n",
"dt_timestep = settings['simulation']['dt_timestep']\n",
"dt_write = settings['simulation']['dt_write']"
"dt = settings['simulation']['dt']\n",
"outputdt = settings['simulation']['outputdt']"
]
},
{
Expand All @@ -174,7 +174,7 @@
"outputs": [],
"source": [
"# Create the particle file where output will be stored\n",
"pfile = pp.ParticleFile('example_Croatia_fisheries.zarr', pset, settings=settings, outputdt=dt_write)"
"pfile = pp.ParticleFile('example_Croatia_fisheries.zarr', pset, settings=settings, outputdt=outputdt)"
]
},
{
Expand All @@ -193,7 +193,7 @@
],
"source": [
"# Execute the simulation\n",
"pset.execute(kernels, runtime=runtime, dt=dt_timestep, output_file=pfile)"
"pset.execute(kernels, runtime=runtime, dt=dt, output_file=pfile)"
]
},
{
Expand Down Expand Up @@ -326,7 +326,7 @@
"outputs": [],
"source": [
"# Create the particle file where output will be stored\n",
"pfile = pp.ParticleFile('example_Croatia_fisheries_sensitivity.zarr', pset, settings=settings, outputdt=dt_write)"
"pfile = pp.ParticleFile('example_Croatia_fisheries_sensitivity.zarr', pset, settings=settings, outputdt=outputdt)"
]
},
{
Expand All @@ -345,7 +345,7 @@
],
"source": [
"# Execute the simulation\n",
"pset.execute(kernels, runtime=runtime, dt=dt_timestep, output_file=pfile)"
"pset.execute(kernels, runtime=runtime, dt=dt, output_file=pfile)"
]
},
{
Expand Down

0 comments on commit ec3169a

Please sign in to comment.