diff --git a/Overlap/eddy_graph.f90 b/Overlap/eddy_graph.f90 index c837280f7c7bfda9317e937a0666ca236b5bb49b..7a64f6f8ff318d083473574a6682f13929ee28bb 100644 --- a/Overlap/eddy_graph.f90 +++ b/Overlap/eddy_graph.f90 @@ -50,10 +50,10 @@ program eddy_graph logical periodic ! grid is periodic in longitude integer unit_isolated, unit - integer n_shpc ! number of input SHPC directories + integer n_slices ! number of input SHPC directories integer e_overestim ! over-estimation of the number of eddies at each date - TYPE(shpc_slice_handler), allocatable:: hshpc(:) ! (n_shpc) - type(shpc_slice_meta), allocatable:: ssm(:) ! (n_shpc) + TYPE(shpc_slice_handler), allocatable:: hshpc(:) ! (n_slices) + type(shpc_slice_meta), allocatable:: ssm(:) ! (n_slices) type(snapshot), allocatable:: flow(:) ! (max_delta + 1) character(len = 30) file @@ -69,15 +69,15 @@ program eddy_graph call MPI_Comm_size(MPI_Comm_world, n_proc) if (rank == 0) then - n_shpc = COMMAND_ARGUMENT_COUNT() - call assert(n_shpc /= 0, & + n_slices = COMMAND_ARGUMENT_COUNT() + call assert(n_slices /= 0, & "Required arguments: SHPC-directory [SHPC-directory] ...") end if - call ezmpi_bcast(n_shpc, root = 0) - allocate(hshpc(n_shpc), ssm(n_shpc)) + call ezmpi_bcast(n_slices, root = 0) + allocate(hshpc(n_slices), ssm(n_slices)) - do i = 1, n_shpc + do i = 1, n_slices call get_command_arg_dyn(i, shpc_dir) call shpc_open(hshpc(i), trim(shpc_dir), pszaccess = "rb") call dbf_read_attribute_03(ssm(i)%d0, hshpc(i)%extremum, & @@ -99,7 +99,7 @@ program eddy_graph read(unit = *, nml = main_nml) write(unit = *, nml = main_nml) call assert(max_delta >= 1, "eddy_graph max_delta") - call assert(n_dates == huge(0) .or. n_shpc == 1, "If we have several " & + call assert(n_dates == huge(0) .or. n_slices == 1, "If we have several " & // "SHPC directories, then we read all the dates from them") ! As we are requiring the grid spacing to be uniform, the value of @@ -111,14 +111,14 @@ program eddy_graph copy = merge(dist_lim, 0, periodic) if (n_dates == huge(0)) & - n_dates = sum([(size(ssm(i)%ishape_last), i = 1, n_shpc)]) + n_dates = sum([(size(ssm(i)%ishape_last), i = 1, n_slices)]) print *, "n_dates = ", n_dates call assert(n_dates >= max_delta + 1, & "eddy_graph: n_dates should be >= max_delta + 1") call assert(n_proc <= n_dates / (max_delta + 1), & "eddy_graph: n_proc should be <= n_dates / (max_delta + 1)") e_overestim = maxval([(ssm(i)%ishape_last(ssm(i)%d0) + 1, & - ediff1d(ssm(i)%ishape_last), i = 1, n_shpc)]) + ediff1d(ssm(i)%ishape_last), i = 1, n_slices)]) open(unit, file = "e_overestim.txt", status = "replace", action = "write") write(unit, fmt = *) e_overestim close(unit) @@ -213,7 +213,7 @@ program eddy_graph ! 5. Back matter - do i = 1, n_shpc + do i = 1, n_slices CALL shpc_close(hshpc(i)) end do