diff --git a/Inst_eddies/Tests/test_complete_ssh.f90 b/Inst_eddies/Tests/test_complete_ssh.f90
index f72b9c65bbec4c9a3d8b53d39a34333cc95088de..76e6a98f9566699ee6c8679615ee11fcf139e406 100644
--- a/Inst_eddies/Tests/test_complete_ssh.f90
+++ b/Inst_eddies/Tests/test_complete_ssh.f90
@@ -5,10 +5,6 @@ program test_complete_ssh
   implicit none
 
   integer, parameter:: n_max_cont = 31
-
-  integer sort_ssh(n_max_cont)
-  ! Sorts ssh_lev in ascending order.
-
   real ssh_lev(n_max_cont)
   integer n_cont
 
@@ -16,8 +12,7 @@ program test_complete_ssh
 
   n_cont = 4
   ssh_lev(:n_cont) = [7, 4, 2, 1]
-  call complete_ssh(sort_ssh, ssh_lev, n_cont)
-  print *, "sort_ssh = ", sort_ssh
+  call complete_ssh(ssh_lev, n_cont)
   print *, "ssh_lev = ", ssh_lev
   print *, "n_cont = ", n_cont
 
diff --git a/Inst_eddies/complete_ssh.f90 b/Inst_eddies/complete_ssh.f90
index ee4bc4bce9727203c93f678875e6b73176f79953..767127a24b8dab558dbbe6a8e8156378bd1e07ba 100644
--- a/Inst_eddies/complete_ssh.f90
+++ b/Inst_eddies/complete_ssh.f90
@@ -4,16 +4,13 @@ module complete_ssh_m
 
 contains
 
-  subroutine complete_ssh(sort_ssh, ssh_lev, n_cont)
+  subroutine complete_ssh(ssh_lev, n_cont)
 
     ! This procedure completes the array ssh_lev by dividing the
     ! largest intervals between values of ssh_lev.
 
     use jumble, only: ediff1d
 
-    integer, intent(out):: sort_ssh(:) ! (n_max_cont)
-    ! Sorts ssh_lev in ascending order.
-
     real, intent(inout):: ssh_lev(:) ! (n_max_cont)
     ! Defined only for subscripts 1:n_cont.
 
@@ -22,6 +19,11 @@ contains
     ! <= n_max_cont.
 
     ! Local:
+
+    integer sort_ssh(size(ssh_lev)) ! (n_max_cont)
+    ! Sorts ssh_lev in ascending order. Defined only for subscripts
+    ! 1:n_cont.
+
     real delta_ssh(size(ssh_lev) - 1) ! (n_max_cont - 1)
     integer i
     integer n_max_cont ! >= 3
diff --git a/Inst_eddies/set_max_speed.f90 b/Inst_eddies/set_max_speed.f90
index ca797c2814be7f6740f5de80895d5a522cfa7f46..7335fa5b41bade7b0af6aba93f7193a8cfefd10e 100644
--- a/Inst_eddies/set_max_speed.f90
+++ b/Inst_eddies/set_max_speed.f90
@@ -72,14 +72,10 @@ contains
     real, allocatable:: speed(:) ! (n_cont) speed on the contour
     integer i, i_outer, ishape
 
-    integer sort_ssh(size(cont_list)) ! (n_max_cont)
-    ! Sorts cont_list%ssh in ascending order. Defined only for
-    ! subscripts 1:n_cont.
-
     !---------------------------------------------------------------
 
     i_outer = n_cont
-    if (n_cont >= 2) call complete_ssh(sort_ssh, cont_list%ssh, n_cont)
+    if (n_cont >= 2) call complete_ssh(cont_list%ssh, n_cont)
 
     ! Now find the contours associated to the new values of SSH:
     do i = i_outer + 1, n_cont