Skip to content

Commit 168e404

Browse files
Merge pull request #1577 from OceanParcels/tutorial_note_particle_sampling
Note in the Parcels structure tutorial on the `field[particle]` sampling speed
2 parents 8b71099 + fcdc107 commit 168e404

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

docs/examples/tutorial_jit_vs_scipy.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"cell_type": "markdown",
66
"metadata": {},
77
"source": [
8-
"# JIT Particles and Scipy particles\n"
8+
"# JIT-vs-Scipy Particles"
99
]
1010
},
1111
{

docs/examples/tutorial_parcels_structure.ipynb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@
302302
" ```python\n",
303303
" value = fieldset.U[time, particle.depth, particle.lat, particle.lon]\n",
304304
" ```\n",
305-
" or simple\n",
305+
" or simply\n",
306306
" ```python\n",
307307
" value = fieldset.U[particle]\n",
308308
" ```\n",
@@ -321,7 +321,14 @@
321321
" \n",
322322
" - It is advised _not_ to update the particle location (`particle.lon`, `particle.lat`, `particle.depth`, and/or `particle.time`) directly, as that can negatively interfere with the way that particle movements by different kernels are vectorially added. Use `particle_dlon`, `particle_dlat`, `particle_ddepth`, and/or `particle_dtime` instead. See also the [kernel loop tutorial](https://docs.oceanparcels.org/en/latest/examples/tutorial_kernelloop.html).\n",
323323
" \n",
324-
" - Note that one has to be careful with writing kernels for vector fields on Curvilinear grids. While Parcels automatically rotates the U and V field when necessary, this is not the case for for example wind data. In that case, a custom rotation function will have to be written.\n"
324+
" - Note that one has to be careful with writing kernels for vector fields on Curvilinear grids. While Parcels automatically rotates the U and V field when necessary, this is not the case for for example wind data. In that case, a custom rotation function will have to be written.\n",
325+
"\n",
326+
" <div class=\"alert alert-info\">\n",
327+
" A note on Field interpoaltion notation\n",
328+
"\n",
329+
" Note that for the interpolation of a `Field`, the second option (`value = fieldset.U[particle]`) is not only a short-hand notation for the (`value = fieldset.U[time, particle.depth, particle.lat, particle.lon]`); it is actually a _faster_ way to interpolate the field at the particle location in Scipy mode, as described in [this section of the JIT-vs-Scipy tutorial](https://docs.oceanparcels.org/en/latest/examples/tutorial_jit_vs_scipy.html#Further-digging-into-Scipy-mode:-adding-particle-keyword-to-Field-sampling).\n",
330+
" \n",
331+
" </div>"
325332
]
326333
},
327334
{

0 commit comments

Comments
 (0)