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

Create intermediary variable `n_dates_slice`

Because we are also going to use it to check continuity of dates
across slices.
parent b53178f2
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,9 @@ program eddy_graph
type(snapshot), allocatable:: flow(:) ! (max_delta + 1)
character(len = 30) file
integer, allocatable:: n_dates_slice(:) ! (n_slices)
! number of dates in each slice
namelist /main_nml/ n_dates, i_slice
!-------------------------------------------------------------------------
......@@ -95,8 +98,9 @@ program eddy_graph
end do
if (rank == 0) then
if (n_dates == huge(0)) &
n_dates = sum([(size(ssm(i)%ishape_last), i = 1, n_slices)])
allocate(n_dates_slice(n_slices))
forall (i = 1:n_slices) n_dates_slice(i) = size(ssm(i)%ishape_last)
if (n_dates == huge(0)) n_dates = sum(n_dates_slice)
print *, "n_dates = ", n_dates
call assert(n_dates >= max_delta + 1, &
"eddy_graph: n_dates should be >= max_delta + 1")
......
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