Skip to content

Commit c09bd55

Browse files
Apply suggestions from code review
Co-authored-by: Erik van Sebille <[email protected]>
1 parent 217f1cb commit c09bd55

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/user_guide/examples/tutorial_statuscodes.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,15 @@ If we advect particles with the `AdvectionRK2_3D` kernel, Parcels will raise a `
8282

8383
```{code-cell}
8484
:tags: [raises-exception]
85-
pset = parcels.ParticleSet(fieldset, parcels.Particle, z=[0.5],lat=[2], lon=[1.5])
86-
pset.execute([parcels.kernels.AdvectionRK2_3D],runtime=np.timedelta64(1, "m"), dt=np.timedelta64(1, "s"), verbose_progress=False)
85+
pset = parcels.ParticleSet(fieldset, parcels.Particle, z=[0.5], lat=[2], lon=[1.5])
86+
kernels = [parcels.kernels.AdvectionRK2_3D]
87+
pset.execute(kernels, runtime=np.timedelta64(1, "m"), dt=np.timedelta64(1, "s"), verbose_progress=False)
8788
```
8889

8990
When we add the `KeepInOcean` Kernel, particles will stay at the surface:
9091

9192
```{code-cell}
92-
pset = parcels.ParticleSet(fieldset, parcels.Particle, z=[0.5],lat=[2], lon=[1.5])
93+
pset = parcels.ParticleSet(fieldset, parcels.Particle, z=[0.5], lat=[2], lon=[1.5])
9394
9495
kernels = [parcels.kernels.AdvectionRK2_3D, KeepInOcean]
9596
@@ -99,5 +100,5 @@ print(f"particle z at end of run = {pset.z}")
99100
```
100101

101102
```{note}
102-
Kernels that control what to do with `particles.state` should typically be added at the _end_ of the Kernel list, because otherwise later Kernels may overwrite the `particles.state` or the `particles.dlon` variables.
103+
Kernels that control what to do with `particles.state` should typically be added at the _end_ of the Kernel list, because otherwise later Kernels may overwrite the `particles.state` or the `particles.dlon` variables (see [Kernel loop explanation](explanation_kernelloop.md)).
103104
```

0 commit comments

Comments
 (0)