Skip to content

Commit d33b680

Browse files
Fixing kernelloop tutorial kernel to not use dt=timedelta
1 parent a114379 commit d33b680

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/user_guide/examples/explanation_kernelloop.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,11 @@ Now we define a wind kernel that uses a forward Euler method to apply the wind f
7878

7979
```{code-cell}
8080
def wind_kernel(particles, fieldset):
81-
dt_float = particles.dt / np.timedelta64(1, 's')
8281
particles.dlon += (
83-
fieldset.UWind[particles] * dt_float
82+
fieldset.UWind[particles] * particles.dt
8483
)
8584
particles.dlat += (
86-
fieldset.VWind[particles] * dt_float
85+
fieldset.VWind[particles] * particles.dt
8786
)
8887
```
8988

0 commit comments

Comments
 (0)