|
239 | 239 | "```" |
240 | 240 | ] |
241 | 241 | }, |
| 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 | + }, |
242 | 252 | { |
243 | 253 | "cell_type": "markdown", |
244 | 254 | "metadata": {}, |
|
276 | 286 | "metadata": {}, |
277 | 287 | "outputs": [], |
278 | 288 | "source": [ |
| 289 | + "import numpy as np\n", |
| 290 | + "\n", |
279 | 291 | "import parcels\n", |
280 | 292 | "\n", |
281 | 293 | "grid = parcels.UxGrid(ds.uxgrid, ds.nz, mesh=\"flat\")\n", |
|
337 | 349 | "pset = {}\n", |
338 | 350 | "\n", |
339 | 351 | "xv, yv = np.meshgrid(np.linspace(0.2, 0.8, 8), np.linspace(0.2, 0.9, 8))\n", |
| 352 | + "\n", |
340 | 353 | "pset[\"node\"] = parcels.ParticleSet(\n", |
341 | 354 | " fieldset, pclass=SampleParticle, lon=xv.flatten(), lat=yv.flatten()\n", |
342 | 355 | ")\n", |
|
461 | 474 | "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." |
462 | 475 | ] |
463 | 476 | }, |
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 | | - }, |
474 | 477 | { |
475 | 478 | "cell_type": "markdown", |
476 | 479 | "metadata": {}, |
|
0 commit comments