Skip to content

Commit bd05c27

Browse files
committed
Changing the checkBelowDataDepth kernel to use 1m instead of 0.5, since the VerticalMixing kernel uses a 0.5m distance in the finite-differencing scheme. Also only running the test for 1d rather than 2.
1 parent d5bce74 commit bd05c27

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/test_kernels.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ def checkBelowDataDepth(particle, fieldset, time):
3636
# The vertical mixing kernel can push particles below the test dataset depth, throwing an
3737
# out of bounds error. This kernel will keep particles above the max depth.
3838
if particle.depth + particle_ddepth >= fieldset.max_depth: # noqa
39-
# move half a meter above the max depth
40-
particle_ddepth = fieldset.max_depth - particle.depth - 0.5 # noqa
39+
# move a meter above the max depth
40+
particle_ddepth = fieldset.max_depth - particle.depth - 1.0 # noqa
41+
particle.state = parcels.StatusCode.Success
4142

4243

4344
@pytest.mark.parametrize('use_3D', [True, False])
@@ -224,6 +225,9 @@ def test_mixing():
224225
fieldset = pp.constructors.create_fieldset(settings)
225226
fieldset.add_constant('max_depth', fieldset.U.depth[-1])
226227

228+
# Set the simulation runtime to just 1 day so particles aren't kicked around significantly
229+
settings['simulation']['runtime'] = timedelta(days=1)
230+
227231
kernels = [parcels.application_kernels.AdvectionRK4_3D, pp.kernels.checkThroughBathymetry,
228232
pp.kernels.checkErrorThroughSurface, pp.kernels.deleteParticle]
229233

0 commit comments

Comments
 (0)