From b95619a1993c5ef1b4d1c495d95cdbe9d029e213 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Tue, 4 Apr 2023 19:10:27 +0200
Subject: [PATCH] Read slice number at run time

---
 Overlap/Tests/test_overlap.f90 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Overlap/Tests/test_overlap.f90 b/Overlap/Tests/test_overlap.f90
index ddc3d734..5408f052 100644
--- a/Overlap/Tests/test_overlap.f90
+++ b/Overlap/Tests/test_overlap.f90
@@ -16,14 +16,14 @@ program test_overlap
   implicit none
 
   character(len = :), allocatable:: shpc_dir
-  integer:: k_test_1 = 0, k_test_2 = 1
+  integer:: k_test_1 = 0, k_test_2 = 1, i_slice = 0
   integer unit, i, n_dates
   type(snapshot), allocatable:: flow(:) ! (max_delta + 1)
   TYPE(shpc_slice_handler) hshp
   type(shpc_slice_meta) ssm
   integer e_overestim ! over-estimation of the number of eddies at each date
 
-  namelist /main_nml/ k_test_1, k_test_2
+  namelist /main_nml/ k_test_1, k_test_2, i_slice
 
   !-------------------------------------------------------------------------
 
@@ -37,7 +37,8 @@ program test_overlap
   read(unit = *, nml = main_nml)
   write(unit = *, nml = main_nml)
 
-  call shpc_open(hshp, trim(shpc_dir), cyclone, slice = 0, pszaccess = "rb")
+  call shpc_open(hshp, trim(shpc_dir), cyclone, slice = i_slice, &
+       pszaccess = "rb")
   call dbf_read_attribute_03(ssm%d0, hshp%extremum, hshp%extr_date, ishape = 0)
   call read_opcol(ssm%ishape_last, hshp%unit, my_lbound = ssm%d0)
   n_dates = size(ssm%ishape_last)
-- 
GitLab