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

Change order of dummy arguments of `set_max_speed`

Because `cont_list` is going to become `intent(inout)`.
parent 1c027cb9
No related branches found
No related tags found
No related merge requests found
...@@ -68,9 +68,9 @@ program test_set_max_speed ...@@ -68,9 +68,9 @@ program test_set_max_speed
corner_window = corner + (llc - 1) * step corner_window = corner + (llc - 1) * step
e%extr%coord_proj = nint((e%extr%coord - corner) / step) + 1 e%extr%coord_proj = nint((e%extr%coord - corner) / step) + 1
cont_list(1) = e%out_cont cont_list(1) = e%out_cont
call set_max_speed(e, ssh(llc(1):urc(1), llc(2):urc(2)), & call set_max_speed(e, cont_list, ssh(llc(1):urc(1), llc(2):urc(2)), &
u(llc(1):urc(1), llc(2):urc(2)), & u(llc(1):urc(1), llc(2):urc(2)), &
v(llc(1):urc(1), llc(2):urc(2)), corner_window, step, cont_list) v(llc(1):urc(1), llc(2):urc(2)), corner_window, step)
call shpc_create(hshp, shpc_dir = "SHPC", cyclone = cyclone, slice = 0, & call shpc_create(hshp, shpc_dir = "SHPC", cyclone = cyclone, slice = 0, &
grid_lon_lat = .true.) grid_lon_lat = .true.)
call write_eddy(e, hshp, d, i) call write_eddy(e, hshp, d, i)
......
...@@ -156,10 +156,10 @@ contains ...@@ -156,10 +156,10 @@ contains
corner_window = corner + (llc - 1) * step corner_window = corner + (llc - 1) * step
call set_max_speed(e, ssh(llc(1):urc(1), llc(2):urc(2)), & call set_max_speed(e, cont_list(:n_cont), &
ssh(llc(1):urc(1), llc(2):urc(2)), &
u(llc(1):urc(1), llc(2):urc(2)), & u(llc(1):urc(1), llc(2):urc(2)), &
v(llc(1):urc(1), llc(2):urc(2)), corner_window, step, & v(llc(1):urc(1), llc(2):urc(2)), corner_window, step)
cont_list(:n_cont))
end if end if
end associate end associate
end do loop_extr end do loop_extr
......
...@@ -4,7 +4,7 @@ module set_max_speed_m ...@@ -4,7 +4,7 @@ module set_max_speed_m
contains contains
subroutine set_max_speed(e, ssh, u, v, corner, step, cont_list) subroutine set_max_speed(e, cont_list, ssh, u, v, corner, step)
! This procedure defines the components speed_cont and max_speed ! This procedure defines the components speed_cont and max_speed
! of argument e. On return, e%speed_cont may be a null ssh contour ! of argument e. On return, e%speed_cont may be a null ssh contour
...@@ -27,6 +27,12 @@ contains ...@@ -27,6 +27,12 @@ contains
! e%out_cont, e%cyclone, e%extr%ssh and e%extr%coord ! e%out_cont, e%cyclone, e%extr%ssh and e%extr%coord
! should be defined on input. ! should be defined on input.
type(ssh_contour), intent(in):: cont_list(:) ! (n_cont)
! Contour list. n_cont >= 1. The outermost contour is element with
! subscript n_cont. The contours are in monotonic order of ssh. If
! n_cont >= 2, cont_list(:n_cont - 1)%area are missing and
! cont_list(:n_cont - 1) are not oriented.
real, intent(in):: ssh(:, :), u(:, :), v(:, :) real, intent(in):: ssh(:, :), u(:, :), v(:, :)
! The domain should be the bounding box of out_cont, because we do ! The domain should be the bounding box of out_cont, because we do
! not exclude other extrema. ! not exclude other extrema.
...@@ -36,12 +42,6 @@ contains ...@@ -36,12 +42,6 @@ contains
real, intent(in):: step(:) ! (2) longitude and latitude steps, in rad real, intent(in):: step(:) ! (2) longitude and latitude steps, in rad
type(ssh_contour), intent(in):: cont_list(:) ! (n_cont)
! Contour list. n_cont >= 1. The outermost contour is element with
! subscript n_cont. The contours are in monotonic order of ssh. If
! n_cont >= 2, cont_list(:n_cont - 1)%area are missing and
! cont_list(:n_cont - 1) are not oriented.
! Local: ! Local:
real speed(size(cont_list)) ! (n_cont) speed on the contour real speed(size(cont_list)) ! (n_cont) speed on the contour
integer i, n_cont integer i, 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