forked from OceanParcels/oceanparcels_website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·3364 lines (3046 loc) · 334 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="The OceanParcels project is a set of Python classes and methods to create customisable particle tracking simulations using output from Ocean Circulation models">
<meta property="og:image" content="http://oceanparcels.org/images/parcelslogo_large.png">
<meta property="twitter:image" content="http://oceanparcels.org/images/parcelslogo_large.png">
<meta name="author" content="The OceanParcels team">
<title>OceanParcels - a Lagrangian Ocean Analysis toolbox</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="vendor/academicons/css/academicons.min.css"/>
<!-- syntax highlighting for Python and Bash -->
<link href="vendor/prism/prism.css" rel="stylesheet" />
<script src="vendor/prism/prism.js"></script>
<!-- Custom styles for this template -->
<link href="css/modern-business.css" rel="stylesheet">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('set', 'anonymizeIp', true)
ga('create', 'UA-96368922-1', 'auto');
ga('send', 'pageview');
</script>
<script>
/**
* Function that records clicks on tutorial links
* The function takes the tutorial link as an argument and sends it to Google Analytics as an event
* These clicks can be seen under Behaviour -> Events
* The hit is sent when 'navigator.sendBeacon' is used in a compatible browser
*/
var captureTutorialLink = function(url) {
ga('send', 'event', 'tutorial', 'click', url, {
'transport': 'beacon',
'hitCallback': function(){document.location = url;}
});
}
var captureGalleryLink = function(url) {
ga('send', 'event', 'tutorial', 'click', url, {
'transport': 'beacon',
'hitCallback': function(){
prefix = "https://nbviewer.org/github/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/"
extension = "ipynb"
document.location = prefix+url+"."+extension;
}
});
}
</script>
</head>
<body>
<!-- Navigation -->
<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<a class="navbar-brand" href="index.html"><img src="images/parcelslogo_inverse.png" height="30px">  Ocean<b>Parcels</b></a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="#whatisparcels">What is Parcels?</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#installing">Installation</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#tutorials">Tutorials</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#developmentstatus">Development</a>
</li>
<li class="nav-item">
<a class="nav-link" href="faq.html">FAQ</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://parcels.readthedocs.io/">Documentation</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#gallery">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#peerreviewedarticles">Articles</a>
</li>
</ul>
</div>
</div>
</nav>
<header>
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<!--<ol class="carousel-indicators">-->
<!--<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>-->
<!--<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>-->
<!--</ol>-->
<div class="carousel-inner" role="listbox">
<!-- Slide One - Set the background image for this slide in the line below -->
<div class="carousel-item active" style="background-image: url('images/homepage.gif')">
<div class="carousel-caption d-none d-md-block">
<h4>Animation of virtual particles in the global oceans</h4>
<p>Particles are advected with Parcels in data from the NEMO Ocean Model <a href="https://www.nemo-ocean.eu/"><i class="fa fa-external-link fa-1x" style="color:white"></i></a><br>
See <a style="color:white" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/documentation_homepage_animation.ipynb">this tutorial <i class="fa fa-external-link fa-1x" style="color:white"></i></a> for the code to animate this gif.</p>
</div>
</div>
</div>
<!--<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">-->
<!--<span class="carousel-control-prev-icon" aria-hidden="true"></span>-->
<!--<span class="sr-only">Previous</span>-->
<!--</a>-->
<!--<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">-->
<!--<span class="carousel-control-next-icon" aria-hidden="true"></span>-->
<!--<span class="sr-only">Next</span>-->
<!--</a>-->
</div>
</header>
<!-- Page Content -->
<div class="container">
<hr>
<h2 id="whatisparcels">What is Ocean<b>Parcels</b>?</h2>
<div class="row">
<div class="col align-self-center">
<p class="card-text">
The Ocean<b>Parcels</b> project develops <b>Parcels</b> (<b>P</b>robably <b>A</b> <b>R</b>eally <b>C</b>omputationally <b>E</b>fficient <b>L</b>agrangian <b>S</b>imulator), a set of Python classes and methods to create customisable particle tracking simulations using output from Ocean Circulation models. Parcels can be used to track passive and active particulates such as water, plankton, <a href="http://www.topios.org/">plastic</a> and <a href="https://github.com/Jacketless/IKAMOANA">fish</a>.
</p><p>
The code from the Ocean<b>Parcels</b> project is licensed under an open source <a href="https://github.com/OceanParcels/parcels/blob/master/LICENSE.md">MIT license</a> and can be downloaded from <a href="https://github.com/OceanParcels/parcels">github.com/OceanParcels/parcels</a> or installed via <a href="https://anaconda.org/conda-forge/parcels">anaconda.org/conda-forge/parcels</a>:
</p><p>
<a href="https://mybinder.org/v2/gh/OceanParcels/parcels_examples_binder/master?urlpath=lab/tree/parcels_examples/parcels_tutorial.ipynb"><img src="https://mybinder.org/badge.svg"></a>
<a href="https://github.com/oceanparcels/parcels/"><img src="https://github.com/OceanParcels/parcels/actions/workflows/unit-tests.yml/badge.svg"></a>
<a href="https://codecov.io/gh/OceanParcels/parcels"><img src="https://codecov.io/gh/OceanParcels/parcels/branch/master/graph/badge.svg"></a>
<a href="https://anaconda.org/conda-forge/parcels/"><img src="https://anaconda.org/conda-forge/parcels/badges/version.svg"></a>
<a href="https://anaconda.org/conda-forge/parcels/"><img src="https://anaconda.org/conda-forge/parcels/badges/latest_release_date.svg"></a>
<a href="https://doi.org/10.5281/zenodo.823561"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.823561.svg"></a>
<a href="https://bestpractices.coreinfrastructure.org/projects/5353"><img src="https://bestpractices.coreinfrastructure.org/projects/5353/badge"></a>
</p><p>
The manuscript detailing this first release of Parcels, version 0.9, has been published in <a href="https://www.geosci-model-dev.net/10/4175/2017/gmd-10-4175-2017.html">Geoscientific Model Development</a> and can be cited as:
</p><p>
<div class="card">
<div class="card-header" role="tab">
<h5 class="mb-0">
Parcels v0.9: prototyping a Lagrangian Ocean Analysis framework for the petascale age
</h5>
Lange, M and E van Sebille (2017), <i>Geoscientific Model Development</i>, <i>10</i>, 4175-4186 <br>
<a class="collapsed card-link" data-toggle="collapse" href="#LangeVanSebille1" aria-expanded="true">[ Expand abstract]</a>
<a class="card-link" href="https://doi.org/10.5194/gmd-10-4175-2017"><i class="fa fa-external-link fa-1x"></i> [ Link to article - <i class="ai ai-open-access ai-1x"></i> ]</a>
</div>
<div id="LangeVanSebille1" class="collapse" role="tabpanel">
<div class="card-body">
As ocean general circulation models (OGCMs) move into the petascale age, where the output of single simulations exceeds petabytes of storage space, tools to analyse the output of these models will need to scale up too. Lagrangian ocean analysis, where virtual particles are tracked through hydrodynamic fields, is an increasingly popular way to analyse OGCM output, by mapping pathways and connectivity of biotic and abiotic particulates. However, the current software stack of Lagrangian ocean analysis codes is not dynamic enough to cope with the increasing complexity, scale and need for customization of use-cases. Furthermore, most community codes are developed for stand-alone use, making it a nontrivial task to integrate virtual particles at runtime of the OGCM. Here, we introduce the new Parcels code, which was designed from the ground up to be sufficiently scalable to cope with petascale computing. We highlight its API design that combines flexibility and customization with the ability to optimize for HPC workflows, following the paradigm of domain-specific languages. Parcels is primarily written in Python, utilizing the wide range of tools available in the scientific Python ecosystem, while generating low-level C code and using just-in-time compilation for performance-critical computation. We show a worked-out example of its API, and validate the accuracy of the code against seven idealized test cases. This version 0.9 of Parcels is focused on laying out the API, with future work concentrating on support for curvilinear grids, optimization, efficiency and at-runtime coupling with OGCMs.
</div>
</div>
</div>
</p><p>
The manuscript detailing version 2.0 of Parcels is available at <a href="https://doi.org/10.5194/gmd-2018-339">Geoscientific Model Development</a> and can be cited as:
<div class="card">
<div class="card-header" role="tab">
<h5 class="mb-0">
The Parcels v2.0 Lagrangian framework: new field interpolation schemes
</h5>
Delandmeter, P and E van Sebille (2019), <i>Geoscientific Model Development</i>, <i>12</i>, 3571–3584<br>
<a class="collapsed card-link" data-toggle="collapse" href="#DelandmeterVanSebille1" aria-expanded="true">[ Expand abstract]</a>
<a class="card-link" href="https://www.geosci-model-dev.net/12/3571/2019/gmd-12-3571-2019.html"><i class="fa fa-external-link fa-1x"></i> [ Link to article - <i class="ai ai-open-access ai-1x"></i> ]</a>
</div>
<div id="DelandmeterVanSebille1" class="collapse" role="tabpanel">
<div class="card-body">
With the increasing amount of data produced by numerical ocean models, so increases the need for efficient tools to analyse these data. One of these tools is Lagrangian ocean analysis, where a set of virtual particles are released and their dynamics is integrated in time based on fields defining the ocean state, including the hydrodynamics and biogeochemistry if available. This popular methodology needs to adapt to the large variety of models producing these fields at different formats. This is precisely the aim of Parcels, a Lagrangian ocean analysis framework designed to combine (1) a wide flexibility to model particles of different natures and (2) an efficient implementation in accordance with modern computing infrastructure. In the new Parcels v2.0, we implement a set of interpolation schemes to read various types of discretised fields, from rectilinear to curvilinear grids in the horizontal direction, from z- to s- levels in the vertical and different variable distributions such as the Arakawa's A-, B- and C- grids. In particular, we develop a new interpolation scheme for a three-dimensional curvilinear C-grid and analyse its properties. Parcels v2.0 capabilities, including a suite of meta-field objects, are then illustrated in a brief study of the distribution of floating microplastic in the North West European continental shelf and its sensitivity to different physical processes.
</div>
</div>
</div>
</p><p>
The manuscript detailing the performance of Parcels is available at <a href="https://doi.org/10.1016/j.cageo.2023.105322">Computers and Geosciences</a> and can be cited as:
<div class="row">
<div class="col">
<div class="card">
<div class="card-header" role="tab">
<h5 class="mb-0">
Efficiently simulating Lagrangian particles in large-scale ocean flows — Data structures and their impact on geophysical applications
</h5>
Kehl, C, PD Nooteboom, MLA Kaandorp, E van Sebille (2023), <i>Computers and Geosciences</i>, <i>in press</i>.<br>
<a class="collapsed card-link" data-toggle="collapse" href="#Kehl2023_top" aria-expanded="true">[ Expand abstract ]</a>
<a class="card-link" href="https://doi.org/10.1016/j.cageo.2023.105322"><i class="fa fa-external-link fa-1x"></i> [ Link to article - <i class="ai ai-open-access ai-1x"></i>]</a>
</div>
<div id="Kehl2023_top" class="collapse" role="tabpanel">
<div class="card-body">
Studying oceanography by using Lagrangian simulations has been adopted for a range of scenarios, such as the determining the fate of microplastics in the ocean, simulating the origin locations of microplankton used for palaeoceanographic reconstructions, for studying the impact of fish aggregation devices on the migration behaviour of tuna. These simulations are complex and represent a considerable runtime effort to obtain trajectory results, which is the prime motivation for enhancing the performance of Lagrangian particle simulators. This paper assesses established performance enhancing techniques from Eulerian simulators in light of computational conditions and demands of Lagrangian simulators. A performance enhancement strategy specifically targeting physics-based Lagrangian particle simulations is outlined to address the performance gaps, and techniques for closing the performance gap are presented and implemented. Realistic experiments are derived from three specific oceanographic application scenarios, and the suggested performance-enhancing techniques are benchmarked in detail, so to allow for a good attribution of speed-up measurements to individual techniques. The impacts and insights of the performance enhancement strategy are further discussed for Lagrangian simulations in other geoscience applications. The experiments show that I/O-enhancing techniques, such as dynamic loading and buffering, lead to considerable speed-up on-par with an idealised parallelisation of the process over 20 nodes. Conversely, while the cache-efficient structure-of-arrays collection yields a visible speed-up, other alternative data structures fail in fulfilling the theoretically-expected performance increase. This insight demonstrates the importance of good data alignment in memory and caches for Lagrangian physics simulations.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<h2 id="installing">Installing Parcels</h2>
The simplest way to install the Parcels code is to use Anaconda and the Parcels Conda-Forge package with the latest release of Parcels. This package will automatically install (almost) all the requirements for a fully functional installation of Parcels. This is the “batteries-included” solution probably suitable for most users.
<p></p>
The steps below are the installation instructions for Linux / macOS and for Windows. If the commands for Linux / macOS and Windows differ, this is indicated with a comment at the end of the line.
<p></p>
<ol>
<li>Install Anaconda's Miniconda following the steps at <a href="https://conda.io/docs/user-guide/install/">https://conda.io/docs/user-guide/install/</a>, making sure to select the Python-3 version. If you're on Linux / macOS, it also assumes that you installed Miniconda-3 to your home directory.</li>
<p></p>
<li>Start a terminal (Linux / macOS) or the Anaconda prompt (Windows). Activate the root (or base) environment of your Miniconda and create an environment containing Parcels, all its essential dependencies, and the nice-to-have Jupyter, cartopy, and ffmpeg packages:
<pre><code class="language-bash">conda activate root # Linux / macOS
activate root # Windows
conda create -n py3_parcels -c conda-forge parcels jupyter cartopy ffmpeg</code></pre></li>
<!--<i>*Note that Parcels has a problem with the latest release of the netCDF4 library, v1.4.2 (see also <a href="https://github.com/OceanParcels/parcels/issues/513">Issue #513 on github</a>). For the time being, we recommend downgrading to v1.4.1, using <code class="language-bash">conda install netcdf4=1.4.1</code></i>-->
<i>*Note that for some of the examples, <code class="language-bash">pytest</code> needs to be installed with <code class="language-bash">conda install -n py3_parcels pytest</code>.</i>
<p></p>
<li>Activate the newly created Parcels environment.
<pre><code class="language-bash">conda activate py3_parcels # Linux / macOS
activate py3_parcels # Windows</code></pre></li>
<li>Get a copy of the Parcels tutorials and examples, as well as the data required to run these:
<pre><code class="language-bash">parcels_get_examples parcels_examples</code></pre></li>
<i>*Note that if you are on Windows and you get a <code>Fatal error in launcher</code> error, you can instead download the data with</i>
<i><pre><code class="language-bash">curl https://raw.githubusercontent.com/OceanParcels/parcels/master/parcels/scripts/get_examples.py > parcels_get_examples.py
python parcels_get_examples.py parcels_examples</code></pre></i></li>
<li>Run the simplest of the examples to validate that you have a working Parcels setup:
<pre><code class="language-bash">cd parcels_examples
python example_peninsula.py --fieldset 100 100</code></pre></li>
<i>*Note that if you are on macOS and get a compilation error, you may need to accept the Apple xcode license </i> (<code class="language-bash">xcode-select --install</code>). <i>If this does not solve the compilation error, you may want to try running </i> <code class="language-bash">export CC=gcc</code> <i>. If the compilation error remains, you may want to check <a href="https://stackoverflow.com/a/58323411/5172570">this solution</a></i>.
<p></p>
<li>Optionally, if you want to run all the examples and tutorials, start Jupyter and open the tutorial notebooks:
<pre><code class="language-bash">jupyter notebook</code></pre></li>
<p></p>
<li>The next time you start a terminal and want to work with Parcels, activate the environment with:
<pre><code class="language-bash">conda activate py3_parcels # Linux / macOS
activate py3_parcels # Windows</code></pre></li>
</ol>
<p></p>
<h4>Installing a non-released version of Parcels</h4>
There might be cases where you want to install a version of Parcels that has not been released yet. (Perhaps, if you want to use a bleeding-edge feature which already is included on Github, but not in the conda-forge package.)
Then, just after step 2 of <a href="#installing">Installing Parcels</a> above, use the following commands to remove the conda-forge package again, and use <code>pip</code> to install Parcels from Github:
<pre><code class="language-bash">conda activate py3_parcels # Linux / macOS
activate py3_parcels # Windows
conda remove --force parcels
pip install git+https://github.com/OceanParcels/parcels.git@master
</code></pre>
<p></p>
<h4>Installation for developers</h4>
Parcels depends on a working Python installation, a netCDF installation, a C compiler, and various Python packages. If you prefer to maintain your own Python installation providing all this, <code class="language-bash">git clone</code> the <a href="https://github.com/OceanParcels/parcels">master branch of Parcels</a> and manually install all packages listed under <code>dependencies</code> in the environment files (<a href="https://raw.githubusercontent.com/OceanParcels/parcels/master/environment_py3_linux.yml">environment_py3_linux.yml</a> for Linux, <a href="https://raw.githubusercontent.com/OceanParcels/parcels/master/environment_py3_osx.yml">environment_py3_osx.yml</a> for OSX and
<a href="https://raw.githubusercontent.com/OceanParcels/parcels/master/environment_py3_win.yml">environment_py3_win.yml</a> for Windows), before running <code class="language-bash">python setup.py install --prefix=PREFIX</code> where <code class="language-bash">PREFIX</code> is the path to the directory of your local branch of the parcels code.
<p></p>
<h4 id="parallel_install">Installation of Parallel Parcels with MPI</h4>
Parcels uses MPI for parallel execution, but this only works on linux and macOS. To install it, follow the steps below and see <a href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/documentation_MPI.ipynb">here for further documentation</a>
<p></p>
<ol>
<li>We strongly encourage to create a new environment for Parallel Parcels:
<pre><code class="language-bash">conda create -n py3_parcels_mpi -c conda-forge parcels mpi4py mpich scikit-learn jupyter cartopy ffmpeg
conda activate py3_parcels_mpi</code></pre></li>
<p></p>
<li>If you are on a Mac, you may need to issue
<pre><code class="language-bash">export CONDA_BUILD_SYSROOT=/
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/Applications/Xcode.app/Contents//Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/
</code></pre>
Where possibly you may need to change the <code class="language-bash">MacOSX10.14.sdk</code> into the macOS version you have.</li>
<p></p>
<li>Now, you can run in Parallel with e.g.
<pre><code class="language-bash">mpirun -np 2 python parcels/examples/example_stommel.py -p 10
</code></pre>
Let us know <a href="https://github.com/OceanParcels/parcels/issues/553">your feedback</a>!</li>
</ol>
<p></p>
<h4>Contributing to Parcels development</h4>
Ocean<b>Parcels</b> is fully open-source community and strongly encourages contributions from users, as also stated in our <a href="https://github.com/OceanParcels/parcels/blob/master/CODE_OF_CONDUCT.md">Contributor Code of Conduct</a>. If you want to help make Ocean<b>Parcels</b> even better, then please consider contributing to its development. To get started, see <a href="https://www.asmeurer.com/git-workflow/">this excellent tutorial on the Git workflow</a> and <a href="https://opensource.guide/how-to-contribute/">this great general overview of contributing to open source software</a>.
<hr>
<h2 id="tutorials">Parcels tutorials</h2>
The best way to get started with Parcels is to explore the Jupyter notebooks below. By clicking on the tutorials you can read them on the Jupyter notebook viewer. Due to some issues with the GitHub API some notebooks are temporarily not found, resulting in a 404 Error. Please find the corresponding notebook file by clicking the GitHub tag in the card. If you want to practice by interacting with them, you can either visit <a href="https://mybinder.org/v2/gh/OceanParcels/parcels_examples_binder/master?urlpath=lab/tree/parcels_examples/parcels_tutorial.ipynb">mybinder.org</a> or run them on your own device if you have installed them with <code class="language-bash">parcels_get_examples parcels_examples</code> (see 4. in the <a href="#installing"> installation</a>).
<p></p>
<div class="row">
<div class="col-lg-4 mb-4">
<div class="card h-100">
<h4 class="card-header">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_parcels_structure.ipynb" onclick="captureTutorialLink('tutorial_parcels_structure');">
General Parcels structure
</a>
</h4>
<div class="card-body">
<a href="http://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_parcels_structure.ipynb" onclick="captureTutorialLink('tutorial_parcels_structure');"><img class="card-img-top team-photo" src="images/parcels_user_diagram.svg" alt=""></a>
<p class="card-text">
The Parcels structure tutorial introduces the main building blocks for a Parcels simulation and is therefore a good starting point for new users
</p>
</div>
<div class="card-footer">
<img src="https://img.shields.io/badge/level-beginner-brightgreen">
<img src="https://img.shields.io/badge/type-general-red">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_parcels_structure.ipynb" onclick="captureTutorialLink('tutorial_parcels_structure');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</div>
</div>
<div class="col-lg-4 mb-4">
<div class="card h-100">
<h4 class="card-header">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/parcels_tutorial.ipynb" onclick="captureTutorialLink('parcels_tutorial');">
Simple Parcels tutorial
</a>
</h4>
<div class="card-body">
<a href="http://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/parcels_tutorial.ipynb" onclick="captureTutorialLink('parcels_tutorial');"><img class="card-img-top team-photo" src="images/parcels_tutorial.svg" alt=""></a>
<p class="card-text">
This tutorial guides you through a simple example of what you can do with the building blocks described in the General structure tutorial
</p>
</div>
<div class="card-footer">
<img src="https://img.shields.io/badge/level-beginner-brightgreen">
<img src="https://img.shields.io/badge/type-general-red">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/parcels_tutorial.ipynb" onclick="captureTutorialLink('parcels_tutorial');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</div>
</div>
<div class="col-lg-4 mb-4">
<div class="card h-100">
<h4 class="card-header">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_output.ipynb" onclick="captureTutorialLink('tutorial_output');">
Output tutorial
</a>
</h4>
<div class="card-body">
<a href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_output.ipynb" onclick="captureTutorialLink('tutorial_output');"><img class="card-img-top team-photo" src="images/tutorial_output.svg" alt=""></a>
<p class="card-text">
A tutorial on how to start analyzing the Parcels output
</p>
</div>
<div class="card-footer">
<img src="https://img.shields.io/badge/level-beginner-brightgreen">
<img src="https://img.shields.io/badge/type-output-1fba3f">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_output.ipynb" onclick="captureTutorialLink('tutorial_output');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</div>
</div>
</div>
<p></p>
<h3 id="Fieldset-tutorials">Tutorials on setting up FieldSets</h3>
<p></p>
<div class="card-columns">
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_periodic_boundaries.ipynb" onclick="captureTutorialLink('tutorial_periodic_boundaries');">
<div class="card-header" role="tab">
<h5>
Periodic boundaries tutorial
</h5>
A tutorial to explain how to implement periodic (east-west or north-south) boundaries in Parcels
<br>
<img src="https://img.shields.io/badge/type-FieldSet-c3b100">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_periodic_boundaries.ipynb" onclick="captureTutorialLink('tutorial_periodic_boundaries');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_interpolation.ipynb" onclick="captureTutorialLink('tutorial_interpolation');">
<div class="card-header" role="tab">
<h5>
Interpolation tutorial
</h5>
A tutorial on the different interpolation methods available in Parcels
<br>
<img src="https://img.shields.io/badge/type-FieldSet-c3b100">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_interpolation.ipynb" onclick="captureTutorialLink('tutorial_interpolation');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_unitconverters.ipynb" onclick="captureTutorialLink('tutorial_unitconverters');">
<div class="card-header" role="tab">
<h5>
UnitConverter tutorial
</h5>
A tutorial on how Parcels automatically converts the units of velocity and diffusion fields from meters to degrees
<br>
<img src="https://img.shields.io/badge/type-FieldSet-c3b100">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_unitconverters.ipynb" onclick="captureTutorialLink('tutorial_unitconverters');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_timestamps.ipynb" onclick="captureTutorialLink('tutorial_timestamps');">
<div class="card-header" role="tab">
<h5>
TimeStamps tutorial
</h5>
A tutorial on how to create <code class="language-python">FieldSets</code> from NetCDF files with Calendars that can't be parsed by <code class="language-python">xarray</code>
<br>
<img src="https://img.shields.io/badge/type-FieldSet-c3b100">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_timestamps.ipynb" onclick="captureTutorialLink('tutorial_timestamps');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/documentation_indexing.ipynb" onclick="captureTutorialLink('documentation_indexing');">
<div class="card-header" role="tab">
<h5>
Grid indexing documentation
</h5>
A notebook with background on the different types of grid indexing
<br>
<img src="https://img.shields.io/badge/type-FieldSet-c3b100">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/documentation_indexing.ipynb" onclick="captureTutorialLink('documentation_indexing');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_nemo_curvilinear.ipynb" onclick="captureTutorialLink('tutorial_nemo_curvilinear');">
<div class="card-header" role="tab">
<h5>
Curvilinear grid tutorial
</h5>
A tutorial to explain how to use Parcels with hydrodynamic models that use curvilinear grids, such as NEMO
<br>
<img src="https://img.shields.io/badge/type-FieldSet-c3b100">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_nemo_curvilinear.ipynb" onclick="captureTutorialLink('tutorial_nemo_curvilinear');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_nemo_3D.ipynb" onclick="captureTutorialLink('tutorial_nemo_3D');">
<div class="card-header" role="tab">
<h5>
Nemo 3D tutorial
</h5>
A tutorial to create a <code class="language-python">FieldSet</code> for three-dimensional NEMO data and other C-grids
<br>
<img src="https://img.shields.io/badge/type-FieldSet-c3b100">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_nemo_3D.ipynb" onclick="captureTutorialLink('tutorial_nemo_3D');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_SummedFields.ipynb" onclick="captureTutorialLink('tutorial_SummedFields');">
<div class="card-header" role="tab">
<h5>
SummedFields tutorial
</h5>
A tutorial on how to combine different Fields for advection
<br>
<img src="https://img.shields.io/badge/type-FieldSet-c3b100">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_SummedFields.ipynb" onclick="captureTutorialLink('tutorial_SummedFields');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_NestedFields.ipynb" onclick="captureTutorialLink('tutorial_NestedFields');">
<div class="card-header" role="tab">
<h5>
NestedFields tutorial
</h5>
A tutorial on how to use Fields with (multiple) nested domains
<br>
<img src="https://img.shields.io/badge/type-FieldSet-c3b100">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_NestedFields.ipynb" onclick="captureTutorialLink('tutorial_NestedFields');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_timevaryingdepthdimensions.ipynb" onclick="captureTutorialLink('tutorial_TimevaryingSigma');">
<div class="card-header" role="tab">
<h5>
Time-varying depths tutorial
</h5>
A tutorial on how to use Fields with time-varying vertical (sigma) depth coordinates
<br>
<img src="https://img.shields.io/badge/type-FieldSet-c3b100">
<a href="https://github.com/OceanParcels/parcels/blob/master/parcels/examples/tutorial_timevaryingdepthdimensions.ipynb" onclick="captureTutorialLink('tutorial_TimevaryingSigma');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
</div>
<p></p>
<h3 id="Particleset-tutorials">Tutorials on creating ParticleSets</h3>
<p></p>
<div class="card-columns">
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_jit_vs_scipy.ipynb" onclick="captureTutorialLink('tutorial_jit_vs_scipy');">
<div class="card-header" role="tab">
<h5>
JIT Particles and Scipy particles
</h5>
A tutorial that explains the different types of particles that come with Parcels
<br>
<img src="https://img.shields.io/badge/type-ParticleSet-11aed5">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_jit_vs_scipy.ipynb" onclick="captureTutorialLink('tutorial_jit_vs_scipy');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_delaystart.ipynb" onclick="captureTutorialLink('tutorial_delaystart');">
<div class="card-header" role="tab">
<h5>
Delay start tutorial
</h5>
A tutorial on how to release particles after the start of a run
<br>
<img src="https://img.shields.io/badge/type-ParticleSet-11aed5">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_delaystart.ipynb" onclick="captureTutorialLink('tutorial_delaystart');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
</div>
<p></p>
<h3 id="Kernels-tutorials">Tutorials on writing kernels to be executed on each particle</h3>
<p></p>
<div class="card-columns">
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_diffusion.ipynb" onclick="captureTutorialLink('tutorial_diffusion');">
<div class="card-header" role="tab">
<h5>
Diffusion tutorial
</h5>
A tutorial about how to use the advection-diffusion kernels, with a short explanation of how diffusion is implemented in a Lagrangian setting
<br>
<img src="https://img.shields.io/badge/type-kernels-aa11d5">
<img src="https://img.shields.io/badge/type-FieldSet-c3b100">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_diffusion.ipynb" onclick="captureTutorialLink('tutorial_diffusion');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_sampling.ipynb?flush_cache=true" onclick="captureTutorialLink('tutorial_sampling');">
<div class="card-header" role="tab">
<h5>
Field Sampling tutorial
</h5>
A tutorial on how to sample fields with particles
<br>
<img src="https://img.shields.io/badge/type-kernels-aa11d5">
<img src="https://img.shields.io/badge/type-ParticleSet-11aed5">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_sampling.ipynb" onclick="captureTutorialLink('tutorial_sampling');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_particle_field_interaction.ipynb?flush_cache=true" onclick="captureTutorialLink('tutorial_particle_field_interaction');">
<div class="card-header" role="tab">
<h5>
Particle-Field interaction tutorial
</h5>
A tutorial on how to update Fields based on Particle properties
<br>
<img src="https://img.shields.io/badge/type-kernels-aa11d5">
<img src="https://img.shields.io/badge/type-ParticleSet-11aed5">
<img src="https://img.shields.io/badge/type-FieldSet-c3b100"> <a href="https://github.com/OceanParcels/parcels/blob/master/parcels/examples/tutorial_particle_field_interaction.ipynb" onclick="captureTutorialLink('tutorial_particle_field_interaction');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_interaction.ipynb?flush_cache=true" onclick="captureTutorialLink('tutorial_interaction');">
<div class="card-header" role="tab">
<h5>
Particle-Particle interaction tutorial
</h5>
A tutorial on how to implement interaction between Particles
<br>
<img src="https://img.shields.io/badge/type-kernels-aa11d5">
<img src="https://img.shields.io/badge/type-ParticleSet-11aed5">
<img src="https://img.shields.io/badge/type-FieldSet-c3b100"> <a href="https://github.com/OceanParcels/parcels/blob/master/parcels/examples/tutorial_interaction.ipynb" onclick="captureTutorialLink('tutorial_interaction');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_Argofloats.ipynb" onclick="captureTutorialLink('tutorial_Argofloats');">
<div class="card-header" role="tab">
<h5>
Argo Kernel tutorial
</h5>
A tutorial on how to create a custom Kernel that mimics sampling of Argo floats
<br>
<img src="https://img.shields.io/badge/type-kernels-aa11d5">
<img src="https://img.shields.io/badge/type-ParticleSet-11aed5">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_Argofloats.ipynb" onclick="captureTutorialLink('tutorial_Argofloats');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
</div>
<p></p>
<h3 id="Other-tutorials">Other tutorials</h3>
<p></p>
<div class="card-columns">
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/documentation_MPI.ipynb" onclick="captureTutorialLink('documentation_MPI');">
<div class="card-header" role="tab">
<h5>
Parallelisation documentation
</h5>
A notebook with background on the parallelisation approach
<br>
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/documentation_MPI.ipynb" onclick="captureTutorialLink('documentation_MPI');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/documentation_stuck_particles.ipynb" onclick="captureTutorialLink('documentation_stuck');">
<div class="card-header" role="tab">
<h5>
Stuck particle documentation
</h5>
A notebook on how particles may end up stuck on land.
<br>
<img src="https://img.shields.io/badge/type-general-red">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/documentation_stuck_particles.ipynb" onclick="captureTutorialLink('documentation_stuck');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/documentation_unstuck_Agrid.ipynb" onclick="captureTutorialLink('documentation_unstuck_Agrid');">
<div class="card-header" role="tab">
<h5>
Preventing stuck particles documentation
</h5>
A notebook on how to prevent particles from getting stuck on an Arakawa A-grid.
<br>
<img src="https://img.shields.io/badge/type-general-red">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/documentation_unstuck_Agrid.ipynb" onclick="captureTutorialLink('documentation_unstuck_Agrid');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
<div class="card">
<a class="tutorialLink" href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_plotting.ipynb" onclick="captureTutorialLink('tutorial_plotting');">
<div class="card-header" role="tab">
<h5>
Plotting tutorial
</h5>
A tutorial on how to quickly plot particle trajectories
<br>
<img src="https://img.shields.io/badge/type-output-1fba3f">
<a href="https://github.com/OceanParcels/parcels/tree/master/parcels/examples/tutorial_plotting.ipynb" onclick="captureTutorialLink('tutorial_plotting');"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</a>
</div>
</div>
<hr>
<h2 id="developmentstatus">Parcels development status</h2>
The current release of Parcels, version 2.4, is a fully-functional, feature-complete code for offline Lagrangian ocean analysis. See below for a list of features, or keep an eye on the <a href="https://github.com/OceanParcels/parcels/projects/1">Github Development Timeline page</a>
<p></p>
<h4>Major features</h4>
<div class="card-columns">
<div class="card">
<div class="card-header" role="tab">
<h5>Advection of particles in 2D and 3D </h5>
<small class="text-muted">Using built-in kernels for <code class="language-python">Runge-Kutta4</code>, <code class="language-python">Runge-Kutta45</code> and <code class="language-python">Euler Forward</code></small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Horizontal diffusion of particles</h5>
<small class="text-muted">Through built-in advection-diffusion kernels using the <code class="language-python">Milstein</code> and <code class="language-python">Euler-Maruyama</code> schemes. See the <a href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_diffusion.ipynb">diffusion tutorial</a>.</small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Define and execute custom kernels</h5>
<small class="text-muted">See the <a href="http://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/parcels_tutorial.ipynb#Adding-a-custom-behaviour-kernel">Adding-a-custom-behaviour-kernel</a> part of the Parcels tutorial</small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Add custom Variables to Particles</h5>
<small class="text-muted">See the <a href="http://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/parcels_tutorial.ipynb#Sampling-a-Field-with-Particles">sampling a Field with Particles</a> part of the Parcels tutorial</small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Combine Fields on different grids for advection</h5>
<small class="text-muted">See the <a href="http://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_SummedFields.ipynb">SummedFields</a> and <a href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_NestedFields.ipynb">NestedFields</a> tutorials</small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Start and remove Particles during execution.</h5>
<small class="text-muted"> See the <a href="http://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_delaystart.ipynb">delayed start tutorial</a></small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Read in hydrodynamic data from any rectilinear or curvilinear horizontal grid</h5>
<small class="text-muted">see the <a href="http://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/parcels_tutorial.ipynb#Reading-in-data-from-arbritrary-NetCDF-files">reading in data from arbitrary NetCDF files</a> part of the Parcels tutorial</small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Output particle data in <a href="https://zarr.dev">zarr</a> format</h5>
<small class="text-muted"></small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Basic plotting of particles</h5>
<small class="text-muted">Both on the fly and from zarr output files, see the <a href="http://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_plotting.ipynb">plotting tutorial</a></small>
</div>
</div>
</div>
<p></p>
<h4>Experimental features</h4>
<div class="card-columns">
<div class="card">
<div class="card-header" role="tab">
<h5>Parallel execution</h5>
<small class="text-muted">Implementing advanced load balancing techniques. See <a href="#parallel_install">here for installation instructions</a> and <a href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/documentation_MPI.ipynb">here for further documentation</a></small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Compute particles in any vertical coordinate model</h5>
<small class="text-muted">z-level, sigma-level (terrain-following), or rho-level (density-following). The latter either in time-fixed or <a href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_timevaryingdepthdimensions.ipynb">time-varying coordinates</a></small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Particle-Particle interaction</h5>
<small class="text-muted">Support for rudimentary particle-particle interaction, see <a href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_interaction.ipynb?flush_cache=true">this tutorial</a> </small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Particle-Field interaction</h5>
<small class="text-muted">Support for particles that change a Field (in <a href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_jit_vs_scipy.ipynb">Scipy-mode</a> only), see <a href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_particle_field_interaction.ipynb?flush_cache=true">this tutorial</a> </small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Advection in 2D and 3D using Analytical Advection</h5>
<small class="text-muted">Using <a href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_analyticaladvection.ipynb">inbuilt kernel</a> for <code class="language-python">AdvectionAnalytical</code></small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Advanced control of particles near land boundaries</h5>
<small class="text-muted">By for example implementing <a href="https://nbviewer.jupyter.org/github/OceanParcels/parcels/blob/master/parcels/examples/documentation_unstuck_Agrid.ipynb">free- and partial-slip boundary conditions</a></small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Complex three-dimensional particle diffusion</h5>
<small class="text-muted"><a href="https://public.yoda.uu.nl/science/UU01/RXA2PB.html">Kernels</a> for particle diffusion in three dimensions for nontrivial diffusivity tensors.</small>
</div>
</div>
</div>
<p></p>
<h4>Future development goals</h4>
<div class="card-columns">
<div class="card">
<div class="card-header" role="tab">
<h5>Support for unstructured grids</h5>
<small class="text-muted">Support data from hydrodynamic models with fully unstructured grids</small>
</div>
</div>
<div class="card">
<div class="card-header" role="tab">
<h5>Dynamic adding of particles</h5>
<small class="text-muted">Create new particles during runtime from within a kernel</small>
</div>
</div>
</div>
<hr>
<h2 id="gallery">Gallery</h2>
<div class="row">
<div class="col-lg-4 mb-4">
<div class="card h-100">
<h5 class="card-header">
<a class="tutorialLink" href="https://nbviewer.org/github/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/bathymetry_plot_cartopy.ipynb" onclick="captureGalleryLink('bathymetry_plot_cartopy');">
Plot bathymetric data
</a>
</h5>
<div class="card-body">
<a href="https://nbviewer.org/github/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/bathymetry_plot_cartopy.ipynb" onclick="captureGalleryLink('bathymetry_plot_cartopy');"><img class="card-img-top team-photo" src="https://github.com/OceanParcels/parcels_gallery/raw/main/images/bathymetry_plot_cartopy.png" alt=""></a>
<p class="card-text">
A notebook to plot bathymetry with continental contoured-geometries. The used colour map is 'cmo.ice'. Created by <a href="https://github.com/cpierard">Claudio Pierard</a>.
</p>
</div>
<div class="card-footer">
<a href="https://github.com/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/bathymetry_plot_cartopy.ipynb"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</div>
</div>
<div class="col-lg-4 mb-4">
<div class="card h-100">
<h5 class="card-header">
<a class="tutorialLink" href="https://nbviewer.org/github/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/parcels_trails.ipynb" onclick="captureGalleryLink('parcels_trails');">
Animating particles with trails
</a>
</h5>
<div class="card-body">
<a href="https://nbviewer.org/github/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/parcels_trails.ipynb" onclick="captureGalleryLink('parcels_trails');"><img class="card-img-top team-photo" src="https://github.com/OceanParcels/parcels_gallery/raw/main/images/parcels_trails.png" alt=""></a>
<p class="card-text">
A notebook to animate particles with their vanishing trails over past timesteps in an unsteady doublegyre fluid. The background shows the absolute velocity magnitude. Created by <a href="https://github.com/CKehl">Christian Kehl</a>.
</p>
</div>
<div class="card-footer">
<a href="https://github.com/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/parcels_trails.ipynb"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</div>
</div>
<div class="col-lg-4 mb-4">
<div class="card h-100">
<h5 class="card-header">
<a class="tutorialLink" href="https://nbviewer.org/github/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/Animation_example_Laura.ipynb" onclick="captureGalleryLink('Animation_example_Laura');">
Animating particles with tidal background flow
</a>
</h5>
<div class="card-body">
<a href="https://nbviewer.org/github/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/Animation_example_Laura.ipynb" onclick="captureGalleryLink('Animation_example_Laura');"><img class="card-img-top team-photo" src="https://github.com/OceanParcels/parcels_gallery/raw/main/images/Animation_example_Laura.png" alt=""></a>
<p class="card-text">
A notebook animating particles with a tidally-influenced flow field, animated with continental contoured-geometries using cartopy. Created by <a href="https://github.com/LauraGomezNavarro">Laura Navarro Gomez</a>.
</p>
</div>
<div class="card-footer">
<a href="https://github.com/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/Animation_example_Laura.ipynb"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 mb-4">
<div class="card h-100">
<h5 class="card-header">
<a class="tutorialLink" href="https://nbviewer.org/github/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/Animation_RotatingEarth.ipynb" onclick="captureGalleryLink('Animation_RotatingEarth');">
Animating data on a rotating sphere
</a>
</h5>
<div class="card-body">
<a href="https://nbviewer.org/github/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/Animation_RotatingEarth.ipynb" onclick="captureGalleryLink('Animation_RotatingEarth');"><img class="card-img-top team-photo" src="https://github.com/OceanParcels/parcels_gallery/raw/main/images/RotatingEarth.png" alt=""></a>
<p class="card-text">
A notebook animating data on a rotating Earth using cartopy. Created by <a href="https://github.com/pdnooteboom">Peter Nooteboom</a>.
</p>
</div>
<div class="card-footer">
<a href="https://github.com/OceanParcels/parcels_gallery/blob/main/scripts_ipynb/Animation_RotatingEarth.ipynb"><img src="https://img.shields.io/static/v1?label=&message=GitHub&color=blue&logo=github"></a>
</div>
</div>
</div>
</div>
<hr>
<h2 id="faq">Frequently Asked Questions and further support</h2>
See the <a href="faq.html">FAQ page</a> for further information on using and developing Parcels. This includes information on <a href="faq.html#designoverview">the Parcels design overview</a>, <a href="faq.html#fieldset_construction">tips on construction of FieldSet objects</a>, <a href="faq.html#kernelwriting">support for writing custom Kernels</a> and <a href="faq.html#outputformat">an explanation of the zarr output format</a>.
<p></p>
If you need help with Parcels, try the <a href="https://github.com/OceanParcels/parcels/discussions">Discussions page on GitHub</a>. There is also an <a href="https://parcels.readthedocs.io/">extensive documentation</a> of all methods and classes in Parcels.
<hr>
<h2 id="peerreviewedarticles">Peer-reviewed articles using Parcels</h2>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header" role="tab">
<h5 class="mb-0">
Efficiently simulating Lagrangian particles in large-scale ocean flows — Data structures and their impact on geophysical applications
</h5>
Kehl, C, PD Nooteboom, MLA Kaandorp, E van Sebille (2023), <i>Computers and Geosciences</i>, <i>in press</i>.<br>
<a class="collapsed card-link" data-toggle="collapse" href="#Kehl2023" aria-expanded="true">[ Expand abstract ]</a>
<a class="card-link" href="https://doi.org/10.1016/j.cageo.2023.105322"><i class="fa fa-external-link fa-1x"></i> [ Link to article - <i class="ai ai-open-access ai-1x"></i>]</a>
<span class="pubnum">110</span>
</div>
<div id="Kehl2023" class="collapse" role="tabpanel">
<div class="card-body">
Studying oceanography by using Lagrangian simulations has been adopted for a range of scenarios, such as the determining the fate of microplastics in the ocean, simulating the origin locations of microplankton used for palaeoceanographic reconstructions, for studying the impact of fish aggregation devices on the migration behaviour of tuna. These simulations are complex and represent a considerable runtime effort to obtain trajectory results, which is the prime motivation for enhancing the performance of Lagrangian particle simulators. This paper assesses established performance enhancing techniques from Eulerian simulators in light of computational conditions and demands of Lagrangian simulators. A performance enhancement strategy specifically targeting physics-based Lagrangian particle simulations is outlined to address the performance gaps, and techniques for closing the performance gap are presented and implemented. Realistic experiments are derived from three specific oceanographic application scenarios, and the suggested performance-enhancing techniques are benchmarked in detail, so to allow for a good attribution of speed-up measurements to individual techniques. The impacts and insights of the performance enhancement strategy are further discussed for Lagrangian simulations in other geoscience applications. The experiments show that I/O-enhancing techniques, such as dynamic loading and buffering, lead to considerable speed-up on-par with an idealised parallelisation of the process over 20 nodes. Conversely, while the cache-efficient structure-of-arrays collection yields a visible speed-up, other alternative data structures fail in fulfilling the theoretically-expected performance increase. This insight demonstrates the importance of good data alignment in memory and caches for Lagrangian physics simulations.
</div>
</div>
</div>
</div>
</div>
<p></p>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header" role="tab">
<h5 class="mb-0">
Modeling carbon export mediated by biofouled microplastics in the Mediterranean Sea
</h5>
Guerrini, F, D Lobelle, L Mari, R Casagrandi, E van Sebille (2023), <i>Limnology and Oceanography</i>, <i>in press</i>.<br>
<a class="collapsed card-link" data-toggle="collapse" href="#Guerrini2023" aria-expanded="true">[ Expand abstract ]</a>
<a class="card-link" href="https://doi.org/10.1002/lno.12330"><i class="fa fa-external-link fa-1x"></i> [ Link to article - <i class="ai ai-open-access ai-1x"></i>]</a>
<span class="pubnum">109</span>
</div>
<div id="Guerrini2023" class="collapse" role="tabpanel">
<div class="card-body">
Marine microplastics can be colonized by biofouling microbial organisms, leading to a decrease in microplastics' buoyancy. The sinking of biofouled microplastics could therefore represent a novel carbon export pathway within the ocean carbon cycle. Here, we model how microplastics are biofouled by diatoms, their consequent vertical motion due to buoyancy changes, and the interactions between particle-attached diatoms and carbon pools within the water column. We initialise our Lagrangian framework with biogeochemical data from NEMO-MEDUSA-2.0 and estimate the amount of organic carbon exported below 100 m depth starting from different surface concentrations of 1 mm microplastics. We focus on the Mediterranean Sea, that is characterized by some of the world’s highest microplastics concentrations and is a hotspot for biogeochemical changes induced by rising atmospheric carbon dioxide levels. Our results show that the carbon export caused by sinking biofouled microplastics is proportional to the concentration of microplastics in the sea surface layer, at least at modelled concentrations. We estimate that, while current concentrations of microplastics can modify the natural biological carbon export by less than 1%, future concentrations projected under business-as-usual pollution scenarios may lead to carbon exports up to 5% larger than the baseline (1998-2012) by 2050. Areas characterized by high primary productivity, i.e., the western and central Mediterranean, are those where microplastics-mediated carbon export results to be highest. While highlighting the potential and quantitatively limited occurrence of this phenomenon in the Mediterranean Sea, our results call for further investigation of a microplastics-related carbon export pathway in the global ocean.
</div>
</div>
</div>
</div>
</div>
<p></p>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header" role="tab">
<h5 class="mb-0">
Predicting Coral Reef Carbonate Chemistry Through Statistical Modeling: Constraining Nearshore Residence Time Around Guam
</h5>
Hirsh, HK, TA Oliver, HC Barkley, JLK Wren, SG Monismith, DP Manzello, IC Enochs (2023), <i>Aquatic Geochemistry</i>, <i>in press</i>.<br>
<a class="collapsed card-link" data-toggle="collapse" href="#Hirsch2023" aria-expanded="true">[ Expand abstract ]</a>
<a class="card-link" href="https://doi.org/10.1007/s10498-023-09411-6"><i class="fa fa-external-link fa-1x"></i> [ Link to article - <i class="ai ai-open-access ai-1x"></i>]</a>
<span class="pubnum">108</span>
</div>
<div id="Hirsch2023" class="collapse" role="tabpanel">
<div class="card-body">
To accurately predict the impacts of ocean acidification on shallow-water ecosystems, we must account for the biogeochemical impact of local benthic communities, as well as the connectivity between offshore and onshore water masses. Estimation of residence time can help quantify this connectivity and determine the degree to which the benthos can influence the chemistry of the overlying water column. We present estimates of nearshore residence time for Guam and utilize these estimates to model the effects of benthic ecosystem metabolism on the coral reef carbonate system. Control volume and particle tracking approaches were used to estimate nearshore residence time. These estimates were paired with observed patterns in the reef carbonate system around Guam using water samples collected by NOAA’s National Coral Reef Monitoring Program. Model performance results suggest that when considering the effects of benthic metabolism on the carbonate system, it is paramount to represent the contact time of the water volume with the benthos. Even coarse estimates of residence time significantly increase model skill. We observed the highest predictive skill in models including control volume derived estimates of residence time, but only when those estimates were included as an interaction with benthic composition. This work shows that not only is residence time critically important to better predict biogeochemical variability in coral reef environments, but that even coarse hydrodynamic models can provide useful residence time estimates at management relevant, whole-ecosystem scales.
</div>
</div>
</div>
</div>
</div>
<p></p>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header" role="tab">
<h5 class="mb-0">
Effects of Eulerian current, Stokes drift and wind while simulating surface drifter trajectories in the Baltic Sea
</h5>
Pärn, O, L Davulienė, D Macias, K Vahter, A Stips, T Torsvik (2023), <i>Oceanologia</i>, <i>in press</i>.<br>
<a class="collapsed card-link" data-toggle="collapse" href="#Parn2023" aria-expanded="true">[ Expand abstract ]</a>