Skip to content

Commit 1ee1111

Browse files
Move "Interpolation at Boundaries" to subsubsection of structured grid sectio
1 parent 476bdc0 commit 1ee1111

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

docs/user_guide/examples/tutorial_interpolation.ipynb

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,16 @@
239239
"```"
240240
]
241241
},
242+
{
243+
"cell_type": "markdown",
244+
"metadata": {},
245+
"source": [
246+
"### Interpolation at boundaries\n",
247+
"In some cases, we need to implement specific boundary conditions, for example to prevent particles from \n",
248+
"getting \"stuck\" near land. [This guide](../examples_v3/documentation_unstuck_Agrid.ipynb) describes \n",
249+
"how to implement this in parcels using `parcels.interpolators.XFreeslip` and `parcels.interpolators.XPartialslip`."
250+
]
251+
},
242252
{
243253
"cell_type": "markdown",
244254
"metadata": {},
@@ -276,6 +286,8 @@
276286
"metadata": {},
277287
"outputs": [],
278288
"source": [
289+
"import numpy as np\n",
290+
"\n",
279291
"import parcels\n",
280292
"\n",
281293
"grid = parcels.UxGrid(ds.uxgrid, ds.nz, mesh=\"flat\")\n",
@@ -337,6 +349,7 @@
337349
"pset = {}\n",
338350
"\n",
339351
"xv, yv = np.meshgrid(np.linspace(0.2, 0.8, 8), np.linspace(0.2, 0.9, 8))\n",
352+
"\n",
340353
"pset[\"node\"] = parcels.ParticleSet(\n",
341354
" fieldset, pclass=SampleParticle, lon=xv.flatten(), lat=yv.flatten()\n",
342355
")\n",
@@ -461,16 +474,6 @@
461474
"In both plots the black lines show the edges that define the boundaries between the faces in the unstructured grid. For the node registered field, the background coloring is done using smooth shading based on the value of `T_node` at the corner nodes. For the face registered fields, each face is colored according to the value of `T_face` at the face center. The color of the particles is the value of the function that the particles take on via the corresponding interpolation method."
462475
]
463476
},
464-
{
465-
"cell_type": "markdown",
466-
"metadata": {},
467-
"source": [
468-
"## Interpolation at boundaries\n",
469-
"In some cases, we need to implement specific boundary conditions, for example to prevent particles from \n",
470-
"getting \"stuck\" near land. [This guide](../examples_v3/documentation_unstuck_Agrid.ipynb) describes \n",
471-
"how to implement this in parcels using `parcels.interpolators.XFreeslip` and `parcels.interpolators.XPartialslip`."
472-
]
473-
},
474477
{
475478
"cell_type": "markdown",
476479
"metadata": {},

0 commit comments

Comments
 (0)