Skip to content
Snippets Groups Projects
Commit a446ee9a authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Downgrade `sort_ssh` from argument to local

Downgrade `sort_ssh` from argument of procedure `complete_ssh` to
local variable. `sort_ssh` is not used any longer in procedure
`set_max_speed` since commit 4a64f87d.
parent ea322d20
No related branches found
No related tags found
No related merge requests found
...@@ -5,10 +5,6 @@ program test_complete_ssh ...@@ -5,10 +5,6 @@ program test_complete_ssh
implicit none implicit none
integer, parameter:: n_max_cont = 31 integer, parameter:: n_max_cont = 31
integer sort_ssh(n_max_cont)
! Sorts ssh_lev in ascending order.
real ssh_lev(n_max_cont) real ssh_lev(n_max_cont)
integer n_cont integer n_cont
...@@ -16,8 +12,7 @@ program test_complete_ssh ...@@ -16,8 +12,7 @@ program test_complete_ssh
n_cont = 4 n_cont = 4
ssh_lev(:n_cont) = [7, 4, 2, 1] ssh_lev(:n_cont) = [7, 4, 2, 1]
call complete_ssh(sort_ssh, ssh_lev, n_cont) call complete_ssh(ssh_lev, n_cont)
print *, "sort_ssh = ", sort_ssh
print *, "ssh_lev = ", ssh_lev print *, "ssh_lev = ", ssh_lev
print *, "n_cont = ", n_cont print *, "n_cont = ", n_cont
......
...@@ -4,16 +4,13 @@ module complete_ssh_m ...@@ -4,16 +4,13 @@ module complete_ssh_m
contains 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 ! This procedure completes the array ssh_lev by dividing the
! largest intervals between values of ssh_lev. ! largest intervals between values of ssh_lev.
use jumble, only: ediff1d 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) real, intent(inout):: ssh_lev(:) ! (n_max_cont)
! Defined only for subscripts 1:n_cont. ! Defined only for subscripts 1:n_cont.
...@@ -22,6 +19,11 @@ contains ...@@ -22,6 +19,11 @@ contains
! <= n_max_cont. ! <= n_max_cont.
! Local: ! 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) real delta_ssh(size(ssh_lev) - 1) ! (n_max_cont - 1)
integer i integer i
integer n_max_cont ! >= 3 integer n_max_cont ! >= 3
......
...@@ -72,14 +72,10 @@ contains ...@@ -72,14 +72,10 @@ contains
real, allocatable:: speed(:) ! (n_cont) speed on the contour real, allocatable:: speed(:) ! (n_cont) speed on the contour
integer i, i_outer, 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
! subscripts 1:n_cont.
!--------------------------------------------------------------- !---------------------------------------------------------------
i_outer = 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: ! Now find the contours associated to the new values of SSH:
do i = i_outer + 1, n_cont do i = i_outer + 1, n_cont
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment