|
57 | 57 | "source": [ |
58 | 58 | "# Create the simulation settings\n", |
59 | 59 | "settings['simulation'] = {\n", |
60 | | - " 'start_date': datetime.strptime('2019-01-01-00:00:00', '%Y-%m-%d-%H:%M:%S'), # Start date of simulation\n", |
61 | | - " 'runtime': timedelta(days=30), # Runtime of simulation, use negative if releasing particles backwards in time\n", |
62 | | - " 'dt_write': timedelta(hours=12), # Timestep of output\n", |
63 | | - " 'dt_timestep': timedelta(minutes=20), # Timestep of advection\n", |
| 60 | + " 'startdate': datetime.strptime('2019-01-01-00:00:00', '%Y-%m-%d-%H:%M:%S'), # Start date of simulation\n", |
| 61 | + " 'runtime': timedelta(days=30), # Runtime of simulation\n", |
| 62 | + " 'outputdt': timedelta(hours=12), # Timestep of output\n", |
| 63 | + " 'dt': timedelta(minutes=20), # Timestep of advection\n", |
64 | 64 | " }\n", |
65 | 65 | "\n", |
66 | 66 | "# Subset the ocean data to just include the Mediterranean Sea\n", |
|
210 | 210 | "name": "stdout", |
211 | 211 | "output_type": "stream", |
212 | 212 | "text": [ |
213 | | - "<function PolyTEOS10_bsq at 0x7f38b955f910>\n", |
214 | | - "<function AdvectionRK4_3D at 0x7f38ba1b2d40>\n", |
215 | | - "<function Biofouling at 0x7f38b955f880>\n", |
216 | | - "<function StokesDrift at 0x7f38b955f6d0>\n", |
217 | | - "<function unbeaching at 0x7f38b955fa30>\n", |
218 | | - "<function checkThroughBathymetry at 0x7f38b955fac0>\n", |
219 | | - "<function checkErrorThroughSurface at 0x7f38b955fbe0>\n", |
220 | | - "<function periodicBC at 0x7f38b955fb50>\n", |
221 | | - "<function deleteParticle at 0x7f38b955fc70>\n" |
| 213 | + "<function PolyTEOS10_bsq at 0x7f19fefcb910>\n", |
| 214 | + "<function AdvectionRK4_3D at 0x7f19ffd2ad40>\n", |
| 215 | + "<function Biofouling at 0x7f19fefcb880>\n", |
| 216 | + "<function StokesDrift at 0x7f19fefcb6d0>\n", |
| 217 | + "<function unbeaching at 0x7f19fefcba30>\n", |
| 218 | + "<function checkThroughBathymetry at 0x7f19fefcbac0>\n", |
| 219 | + "<function checkErrorThroughSurface at 0x7f19fefcbbe0>\n", |
| 220 | + "<function periodicBC at 0x7f19fefcbb50>\n", |
| 221 | + "<function deleteParticle at 0x7f19fefcbc70>\n" |
222 | 222 | ] |
223 | 223 | } |
224 | 224 | ], |
|
245 | 245 | "output_type": "stream", |
246 | 246 | "text": [ |
247 | 247 | "INFO: Output files are stored in example_Tunisia_fisheries_prebuilt.zarr.\n", |
248 | | - "100%|██████████| 2592000.0/2592000.0 [14:30<00:00, 2977.08it/s]\n" |
| 248 | + "100%|██████████| 2592000.0/2592000.0 [07:48<00:00, 5529.73it/s]\n" |
249 | 249 | ] |
250 | 250 | } |
251 | 251 | ], |
252 | 252 | "source": [ |
253 | 253 | "# Define the runtime, the timestepping, and the output frequency of the simulation from the settings\n", |
254 | 254 | "runtime = settings['simulation']['runtime']\n", |
255 | | - "dt_timestep = settings['simulation']['dt_timestep']\n", |
256 | | - "dt_write = settings['simulation']['dt_write']\n", |
| 255 | + "dt = settings['simulation']['dt']\n", |
| 256 | + "outputdt = settings['simulation']['outputdt']\n", |
257 | 257 | "\n", |
258 | 258 | "# Create the particle file where output will be stored\n", |
259 | | - "pfile = pp.ParticleFile('example_Tunisia_fisheries_prebuilt.zarr', pset, settings=settings, outputdt=dt_write)\n", |
| 259 | + "pfile = pp.ParticleFile('example_Tunisia_fisheries_prebuilt.zarr', pset, settings=settings, outputdt=outputdt)\n", |
260 | 260 | "\n", |
261 | 261 | "# Execute the simulation\n", |
262 | | - "pset.execute(kernels, runtime=runtime, dt=dt_timestep, output_file=pfile)" |
| 262 | + "pset.execute(kernels, runtime=runtime, dt=dt, output_file=pfile)" |
263 | 263 | ] |
264 | 264 | }, |
265 | 265 | { |
|
359 | 359 | "name": "stdout", |
360 | 360 | "output_type": "stream", |
361 | 361 | "text": [ |
362 | | - "<function PolyTEOS10_bsq at 0x7f38b955f910>\n", |
363 | | - "<function AdvectionRK4_3D at 0x7f38ba1b2d40>\n", |
364 | | - "<function Biofouling at 0x7f38b955f880>\n", |
365 | | - "<function StokesDrift at 0x7f38b955f6d0>\n", |
366 | | - "<function unbeaching at 0x7f38b955fa30>\n", |
367 | | - "<function checkThroughBathymetry at 0x7f38b955fac0>\n", |
368 | | - "<function checkErrorThroughSurface at 0x7f38b955fbe0>\n", |
369 | | - "<function periodicBC at 0x7f38b955fb50>\n", |
370 | | - "<function deleteParticle at 0x7f38b955fc70>\n" |
| 362 | + "<function PolyTEOS10_bsq at 0x7f19fefcb910>\n", |
| 363 | + "<function AdvectionRK4_3D at 0x7f19ffd2ad40>\n", |
| 364 | + "<function Biofouling at 0x7f19fefcb880>\n", |
| 365 | + "<function StokesDrift at 0x7f19fefcb6d0>\n", |
| 366 | + "<function unbeaching at 0x7f19fefcba30>\n", |
| 367 | + "<function checkThroughBathymetry at 0x7f19fefcbac0>\n", |
| 368 | + "<function checkErrorThroughSurface at 0x7f19fefcbbe0>\n", |
| 369 | + "<function periodicBC at 0x7f19fefcbb50>\n", |
| 370 | + "<function deleteParticle at 0x7f19fefcbc70>\n" |
371 | 371 | ] |
372 | 372 | } |
373 | 373 | ], |
|
392 | 392 | "name": "stdout", |
393 | 393 | "output_type": "stream", |
394 | 394 | "text": [ |
395 | | - "<function PolyTEOS10_bsq at 0x7f38b955f910>\n", |
396 | | - "<function AdvectionRK4_3D at 0x7f38ba1b2d40>\n", |
397 | | - "<function Biofouling at 0x7f38b955f880>\n", |
398 | | - "<function StokesDrift at 0x7f38b955f6d0>\n", |
399 | | - "<function NorthwardDrift at 0x7f38889ba440>\n", |
400 | | - "<function EastwardDrift at 0x7f38889ba290>\n", |
401 | | - "<function unbeaching at 0x7f38b955fa30>\n", |
402 | | - "<function checkThroughBathymetry at 0x7f38b955fac0>\n", |
403 | | - "<function checkErrorThroughSurface at 0x7f38b955fbe0>\n", |
404 | | - "<function periodicBC at 0x7f38b955fb50>\n", |
405 | | - "<function deleteParticle at 0x7f38b955fc70>\n" |
| 395 | + "<function PolyTEOS10_bsq at 0x7f19fefcb910>\n", |
| 396 | + "<function AdvectionRK4_3D at 0x7f19ffd2ad40>\n", |
| 397 | + "<function Biofouling at 0x7f19fefcb880>\n", |
| 398 | + "<function StokesDrift at 0x7f19fefcb6d0>\n", |
| 399 | + "<function NorthwardDrift at 0x7f19d409a4d0>\n", |
| 400 | + "<function EastwardDrift at 0x7f19d409a440>\n", |
| 401 | + "<function unbeaching at 0x7f19fefcba30>\n", |
| 402 | + "<function checkThroughBathymetry at 0x7f19fefcbac0>\n", |
| 403 | + "<function checkErrorThroughSurface at 0x7f19fefcbbe0>\n", |
| 404 | + "<function periodicBC at 0x7f19fefcbb50>\n", |
| 405 | + "<function deleteParticle at 0x7f19fefcbc70>\n" |
406 | 406 | ] |
407 | 407 | } |
408 | 408 | ], |
|
432 | 432 | "output_type": "stream", |
433 | 433 | "text": [ |
434 | 434 | "INFO: Output files are stored in example_Tunisia_fisheries_custom.zarr.\n", |
435 | | - "100%|██████████| 2592000.0/2592000.0 [15:12<00:00, 2839.68it/s]\n" |
| 435 | + "100%|██████████| 2592000.0/2592000.0 [19:57<00:00, 2164.59it/s] \n" |
436 | 436 | ] |
437 | 437 | } |
438 | 438 | ], |
439 | 439 | "source": [ |
440 | 440 | "# Create the particle file where output will be stored\n", |
441 | | - "pfile = pp.ParticleFile('example_Tunisia_fisheries_custom.zarr', pset, settings=settings, outputdt=dt_write)\n", |
| 441 | + "pfile = pp.ParticleFile('example_Tunisia_fisheries_custom.zarr', pset, settings=settings, outputdt=outputdt)\n", |
442 | 442 | "\n", |
443 | 443 | "# Execute the simulation\n", |
444 | | - "pset.execute(kernels, runtime=runtime, dt=dt_timestep, output_file=pfile)" |
| 444 | + "pset.execute(kernels, runtime=runtime, dt=dt, output_file=pfile)" |
445 | 445 | ] |
446 | 446 | }, |
447 | 447 | { |
|
0 commit comments