diff --git a/Inst_eddies/set_max_speed.F90 b/Inst_eddies/set_max_speed.F90
index 322d7d626694e23e41e4d9596aa40c5358b5cbf9..05abace1bece0ac166db2e80ee2181c4659f16a0 100644
--- a/Inst_eddies/set_max_speed.F90
+++ b/Inst_eddies/set_max_speed.F90
@@ -19,7 +19,7 @@ contains
          IEEE_QUIET_NAN
 
     ! Libraries:
-    use jumble, only: new_unit, rad_to_deg
+    use jumble, only: rad_to_deg
     use shapelib, only: shpt_polygon
     use shapelib_03, only: shp_append_object_03, dbf_write_attribute_03
 
@@ -70,7 +70,7 @@ contains
     ! Local:
 
     real, allocatable:: speed(:) ! (n_cont) speed on the contour
-    integer i, i_outer, unit, ishape
+    integer i, i_outer, ishape
 
     integer sort_ssh(size(cont_list)) ! (n_max_cont)
     ! Sorts cont_list%ssh in ascending order. Defined only for
@@ -102,16 +102,6 @@ contains
     end do
 
 #ifdef DEBUG
-    call new_unit(unit)
-    open(unit, file = "speed.csv", status = "replace", action = "write")
-    write(unit, fmt = *) "speed(sort_ssh) cont_list%ssh(sort_ssh)"
-
-    do i = 1, n_cont
-       write(unit, fmt = *) speed(sort_ssh(i)), cont_list(sort_ssh(i))%ssh
-    end do
-
-    close(unit)
-
     if (write_cont_list) then
        do i = 1, n_cont
           call shp_append_object_03(ishape, hshp_cont_list, shpt_polygon, &