Skip to content

Commit 71b3303

Browse files
committed
Updating the error through bathymetry kernel to use floats instead of integers.
1 parent f5ecf19 commit 71b3303

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

plasticparcels/kernels.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -589,11 +589,11 @@ def checkThroughBathymetry(particle, fieldset, time):
589589
particle_ddepth = fieldset.z_start - particle.depth # noqa # Stick particle to surface
590590
elif potential_depth > bathymetry_local:
591591
particle_ddepth = bathymetry_local - particle.depth # noqa # Stick particle at bottom of ocean
592-
elif particle.depth > 100 and potential_depth > (bathymetry_local*0.99): # for deeper particles; since bathymetry can be quite rough (and is interpolated linearly) look at the 99% value instead
592+
elif particle.depth > 100. and potential_depth > (bathymetry_local*0.99): # for deeper particles; since bathymetry can be quite rough (and is interpolated linearly) look at the 99% value instead
593593
particle_ddepth = bathymetry_local*0.99 - particle.depth # noqa # Stick particle at the 99% point
594594

595-
elif potential_depth > 3900: # If particle >3.9km deep, stick it there
596-
particle_ddepth = 3900 - particle.depth # noqa
595+
elif potential_depth > 3900.: # If particle >3.9km deep, stick it there
596+
particle_ddepth = 3900. - particle.depth # noqa
597597

598598

599599

0 commit comments

Comments
 (0)