|
1 | | -Kernels: |
| 1 | +## Kernels: |
2 | 2 |
|
3 | | -- `particle.delete()` is no longer valid. Have to do `particle.state = StatusCode.Delete` |
4 | | -- Sharing state between kernels must be done via the particle data (as now the kernels are not combined under the hood). |
5 | | -- dt is a np.timedelta64 object |
| 3 | +- The Kernel loop has been 'vectorized', so that the input of a Kernel is not one particle anymore, but a list of particles. This means that `if`-statements in Kernels don't work anymore. Replace `if`-statements with `numpy.where` statements. |
| 4 | +- `particle.delete()` is no longer valid. Instead, use `particle.state = StatusCode.Delete`. |
| 5 | +- Sharing state between kernels must be done via the particle data (as the kernels are not combined under the hood anymore). |
| 6 | +- `particl_dlon`, `particle_dlat` etc have been renamed to `particle.dlon` and `particle.dlat`. |
| 7 | +- `particle.dt` is a np.timedelta64 object; be careful when multiplying `particle.dt` with a velocity, as its value may be cast to nanoseconds. |
| 8 | +- The `time` argument in the Kernel signature is now standard `None` (and may be removed in the Kernel API before release of v4), so can't be used. Use `particle.time` instead. |
6 | 9 |
|
7 | | -FieldSet |
| 10 | +## FieldSet |
8 | 11 |
|
9 | | -- `interp_method` has to be an Interpolation function, instead of a string |
| 12 | +- `interp_method` has to be an Interpolation function, instead of a string. |
10 | 13 |
|
11 | | -ParticleSet |
| 14 | +## ParticleSet |
12 | 15 |
|
13 | | -- ParticleSet init had `repeatdt` and `lonlatdepth_dtype` removed |
14 | | -- ParticleSet.execute() expects `numpy.datetime64`/`numpy.timedelta.64` for `runtime`, `endtime` and `dt` |
15 | | -- `ParticleSet.from_field()`, `ParticleSet.from_line()`, `ParticleSet.from_list()` has been removed |
| 16 | +- `repeatdt` and `lonlatdepth_dtype` have been removed from the ParticleSet. |
| 17 | +- ParticleSet.execute() expects `numpy.datetime64`/`numpy.timedelta.64` for `runtime`, `endtime` and `dt`. |
| 18 | +- `ParticleSet.from_field()`, `ParticleSet.from_line()`, `ParticleSet.from_list()` have been removed. |
0 commit comments