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

Work with date index in `test_get_dispatch_snap`

Follow-up to commit 3b68dd5. A default value of 0 for k in main
program unit `test_get_dispatch_snap` now makes sense.
parent e48b7f7e
No related branches found
No related tags found
No related merge requests found
&MAIN_NML CORNER = 5.125, -36.375, NLON = 29, NLAT = 17, k = 20454 /
&MAIN_NML CORNER = 5.125, -36.375, NLON = 29, NLAT = 17 /
&MAIN_NML CORNER = 5.125, -36.375, NLON = 29, NLAT = 17, k = 20456 /
&MAIN_NML CORNER = 5.125, -36.375, NLON = 29, NLAT = 17, k = 2 /
......@@ -41,7 +41,7 @@ program test_get_dispatch_snap
! We look for an overlapping eddy at dist_lim (in grid points) of
! the first extremum.
integer:: k = - 1
integer:: k = 0
integer, allocatable:: ishape_last(:)
! shape index (0-based) in the collection of shapefiles of the last
......@@ -99,12 +99,12 @@ program test_get_dispatch_snap
if (rank == 0) call dbf_read_attribute_03(d_init, hshp%extremum, &
hshp%extr_date, ishape = 0)
call ezmpi_bcast(d_init, root = 0)
k_begin = d_init + (rank * n_dates) / n_proc
k_begin = (rank * n_dates) / n_proc
if (rank < n_proc - 1) then
k_end = d_init + ((rank + 1) * n_dates) / n_proc
k_end = ((rank + 1) * n_dates) / n_proc
else
k_end = d_init + n_dates - 1
k_end = n_dates - 1
end if
call get_snapshot(s, nlon, nlat, ishape_last, corner * deg_to_rad, &
......@@ -112,10 +112,10 @@ program test_get_dispatch_snap
max_delta = 1)
CALL shpc_close(hshp)
call dispatch_snapshot(s, unit_isolated, unit_number_eddies, rank, k_begin, &
max_delta = 1, k = k)
max_delta = 1, d_init = d_init, k = k)
if (rank == 0) then
call write_snapshot(s, corner, step, nlon, nlat, copy, k)
call write_snapshot(s, corner, step, nlon, nlat, copy, d = d_init + k)
close(unit_isolated)
close(unit_number_eddies)
end if
......
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