@@ -556,10 +556,10 @@ def reflectAtSurface(particle, fieldset, time):
556556 None
557557
558558 """
559- potential_depth = particle .depth + particle_ddepth
559+ potential_depth = particle .depth + particle_ddepth # noqa
560560 if potential_depth < 0. :# Particle is above the surface
561561 particle .depth = - potential_depth
562- particle_ddepth = 0. # Set particle_ddepth to 0, as we have already updated the depth
562+ particle_ddepth = 0. # noqa
563563
564564
565565def unbeaching (particle , fieldset , time ):
@@ -619,11 +619,11 @@ def unbeachingBySamplingAfterwards(particle, fieldset, time):
619619 This kernel should be performed after all other movement kernels.
620620 """
621621 # In the case of being beached, these displacement will be zero
622- new_lon = particle .lon + particle_dlon
623- new_lat = particle .lat + particle_dlat
624- new_depth = particle .depth + particle_ddepth
622+ new_lon = particle .lon + particle_dlon # noqa
623+ new_lat = particle .lat + particle_dlat # noqa
624+ new_depth = particle .depth + particle_ddepth # noqa
625625
626- if math .fabs (particle_dlon ) + math .fabs (particle_dlat ) < 1e-14 :
626+ if math .fabs (particle_dlon ) + math .fabs (particle_dlat ) < 1e-14 : # noqa
627627 displacement = 1. / 8. # Degree displacement to sample the velocity field
628628
629629 # Convert 1m/s to degrees/s at the particle latitude in zonal and meridional directions
@@ -691,8 +691,8 @@ def unbeachingBySamplingAfterwards(particle, fieldset, time):
691691 U_dir = 1.
692692 V_dir = - 1.
693693
694- particle_dlon += U_dir * unbeach_U * particle .dt
695- particle_dlat += V_dir * unbeach_V * particle .dt
694+ particle_dlon += U_dir * unbeach_U * particle .dt # noqa
695+ particle_dlat += V_dir * unbeach_V * particle .dt # noqa
696696
697697
698698def checkThroughBathymetry (particle , fieldset , time ):
@@ -748,15 +748,15 @@ def reflectAtBathymetry(particle, fieldset, time):
748748 bathymetry field using the updated particle position.
749749 """
750750 local_bathymetry = fieldset .bathymetry [time , particle .depth , particle .lat , particle .lon ]
751- potential_depth = particle .depth + particle_ddepth
751+ potential_depth = particle .depth + particle_ddepth # noqa
752752
753753 if potential_depth > 100 :
754754 local_bathymetry = 0.99 * local_bathymetry # Handle linear interpolation issues for deep particles
755755
756756 if potential_depth > local_bathymetry :
757757 beyond_depth = potential_depth - local_bathymetry
758758 particle .depth = local_bathymetry - beyond_depth # Reflect the particle back above the bathymetry
759- particle_ddepth = 0. # Set particle_ddepth to 0, as we have already updated the depth
759+ particle_ddepth = 0. # noqa
760760
761761
762762def periodicBC (particle , fieldset , time ):
0 commit comments