Skip to content

Commit 8c2dbce

Browse files
committed
add logging messages when encountering shallow waters
1 parent 09ee876 commit 8c2dbce

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/virtualship/instruments/argo_float.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,9 @@ def _argo_float_vertical_movement(particle, fieldset, time):
7777
particle_ddepth = loc_bathy - particle.depth + 50.0 # 50m above bathy
7878
particle.cycle_phase = 1
7979
particle.grounded = 1
80-
# TODO: print statments not working properly with JIT compiler...
81-
# print(
82-
# f"Argo float grounded at bathymetry depth: {loc_bathy}m during sinking to drift depth. Location: ({particle.lat}, {particle.lon}). Raising by 50m above bathymetry and continuing cycle."
83-
# )
80+
print(
81+
"Shallow bathymetry warning: Argo float grounded at bathymetry depth during sinking to drift depth. Raising by 50m above bathymetry and continuing cycle."
82+
)
8483

8584
elif particle.depth + particle_ddepth <= particle.drift_depth:
8685
particle_ddepth = particle.drift_depth - particle.depth
@@ -103,9 +102,9 @@ def _argo_float_vertical_movement(particle, fieldset, time):
103102
particle_ddepth = loc_bathy - particle.depth + 50.0 # 50m above bathy
104103
particle.cycle_phase = 3
105104
particle.grounded = 1
106-
# print(
107-
# f"Argo float grounded at bathymetry depth: {loc_bathy}m during sinking to max depth. Location: ({particle.lat}, {particle.lon}). Raising by 50m above bathymetry and continuing cycle."
108-
# )
105+
print(
106+
"Shallow bathymetry warning: Argo float grounded at bathymetry depth during sinking to max depth. Raising by 50m above bathymetry and continuing cycle."
107+
)
109108
elif particle.depth + particle_ddepth <= particle.max_depth:
110109
particle_ddepth = particle.max_depth - particle.depth
111110
particle.cycle_phase = 3

0 commit comments

Comments
 (0)