diff --git a/Common/Tests/tests.json b/Common/Tests/tests.json
index a9bedab0daff385b73bed5bbb570a60a4e0236fd..b7c0deeb00a66ff2ff8ff4769bdddc9dc2c0c9e7 100644
--- a/Common/Tests/tests.json
+++ b/Common/Tests/tests.json
@@ -17,7 +17,8 @@
 		"Anticyclones"
             ]
 	],
-	"input": "20455, 1\n", "exclude_cmp": ["timings.txt", "perf_report.csv"]
+	"input": "20455, 1\n",
+	"sel_diff_args": {"exclude": ["timings.txt", "perf_report.csv"]}
     },
     "Create_ishape_last_missing": {
 	"description": "Create ishape_last with a missing date.",
diff --git a/Convert_Matlab/Tests/tests_with_Matlab.json b/Convert_Matlab/Tests/tests_with_Matlab.json
index 85ffebc7f20e64d7509dc1cde3f0f9f385294610..819efb8519a9a38375bdc007f2890a1796d1ce23 100644
--- a/Convert_Matlab/Tests/tests_with_Matlab.json
+++ b/Convert_Matlab/Tests/tests_with_Matlab.json
@@ -11,7 +11,8 @@
 	"symlink": [
             "$src_dir/Convert_Matlab/inst_eddies.m"
 	],
-	"stdout": "inst_eddies_v6_stdout.txt", "exclude_cmp": ["n_slices.txt"]
+	"stdout": "inst_eddies_v6_stdout.txt",
+	"sel_diff_args": {"exclude": ["n_slices.txt"]}
     },
     "Inst_eddies_v6_global": {
 	"description": "On a global file to test the processing of ghost eddies.",
diff --git a/Inst_eddies/Tests/long_tests.json b/Inst_eddies/Tests/long_tests.json
index 843e6429f1aa363acbf182f61242dfe1a9b8e403..c18064cb85d6ef8d78f3c18e892fc20f9871a0a0 100644
--- a/Inst_eddies/Tests/long_tests.json
+++ b/Inst_eddies/Tests/long_tests.json
@@ -18,7 +18,7 @@
             "&config_nml min_radius = 20./\n"
 	],
 	"input": "&dates_nml date = 1/\n",
-	"exclude_cmp": ["timings.txt"]
+	"sel_diff_args": {"exclude": ["timings.txt"]}
     },
     "Extraction_eddies_region_3": {
 	"commands": [
@@ -40,7 +40,7 @@
 	],
 	"input": "&dates_nml date = 20454/\n",
 	"description": "Larger region, 120 x 120. Includes degenerate extrema.",
-	"exclude_cmp": ["timings.txt"]
+	"sel_diff_args": {"exclude": ["timings.txt"]}
     },
     "Extraction_eddies_region_3_min": {
 	"commands": [
@@ -62,7 +62,7 @@
 	],
 	"input": "&dates_nml date = 20454/\n",
 	"description": "Same as Extraction_eddies_region_3 except with 1 mm minimum amplitude.",
-	"exclude_cmp": ["timings.txt"]
+	"sel_diff_args": {"exclude": ["timings.txt"]}
     },
     "Extraction_eddies_region_5": {
 	"commands": [
@@ -84,7 +84,7 @@
 	],
 	"input": "&dates_nml date = 20454/\n",
 	"description": "Same as Extraction_eddies_region_4 with larger domain.",
-	"exclude_cmp": ["n_slices.txt", "timings.txt"]
+	"sel_diff_args": {"exclude": ["n_slices.txt", "timings.txt"]}
     },
     "Extraction_eddies_region_2_noise": {
 	"create_file": [
@@ -101,7 +101,7 @@
             "$Aviso_DT_dir/dt_global_allsat_phy_l4_%Y%m%d_20210726.nc",
             "2006-01-01", "2006-01-15", "0"
 	],
-	"exclude_cmp": ["timings.txt", "perf_report.csv"]
+	"sel_diff_args": {"exclude": ["timings.txt", "perf_report.csv"]}
     },
     "Region_6": {
 	"create_file": [
@@ -119,7 +119,7 @@
             "-26.875"
 	],
 	"input": "20454\n0\n",
-	"exclude_cmp": ["timings.txt", "perf_report.csv"]
+	"sel_diff_args": {"exclude": ["timings.txt", "perf_report.csv"]}
     },
     "Missing_file": {
 	"create_file": [
@@ -132,7 +132,7 @@
 	    "2020-01-31", "2020-02-02", "0"
 	],
 	"description": "Date 2020-02-01 is missing. Test of the script with a missing date.",
-	"exclude_cmp": ["timings.txt", "perf_report.csv"]
+	"sel_diff_args": {"exclude": ["timings.txt", "perf_report.csv"]}
     },
     "Greece": {
 	"description": "This is a case where the speed is not defined on a whole segment.",
@@ -146,7 +146,7 @@
             "config_nml.txt",
             "&config_nml /\n"
 	],
-	"exclude_cmp": ["timings.txt", "perf_report.csv"]
+	"sel_diff_args": {"exclude": ["timings.txt", "perf_report.csv"]}
     },
     "Region_5_15_days": {
 	"description": "This is used in several tests in Overlap.",
@@ -160,6 +160,6 @@
             "config_nml.txt",
             "&config_nml /\n"
 	],
-	"exclude_cmp": ["timings.txt", "perf_report.csv"]
+	"sel_diff_args": {"exclude": ["timings.txt", "perf_report.csv"]}
     }
 }
diff --git a/Inst_eddies/Tests/short_tests.json b/Inst_eddies/Tests/short_tests.json
index 996d00d2c168ac1a83457764c6fb2f9a9ebfeb7f..84946cae2651bef0f234d638f3f9235e9a6c397f 100644
--- a/Inst_eddies/Tests/short_tests.json
+++ b/Inst_eddies/Tests/short_tests.json
@@ -18,7 +18,7 @@
 		"$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc"
             ]
 	],
-	"exclude_cmp": ["timings.txt", "n_slices.txt"]
+	"sel_diff_args": {"exclude": ["timings.txt", "n_slices.txt"]}
     },
     "Region_1_20454_cyclone_3":
     {
@@ -53,7 +53,7 @@
 		"$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc"
             ]
 	],
-	"exclude_cmp": ["n_slices.txt"]
+	"sel_diff_args": {"exclude": ["n_slices.txt"]}
     },
     "Get_1_outerm_noise_2_8": {
 	"description": "Assume insufficient amplitude for extrema 2 and 8. Even if extremum 8 does not have a particularly small amplitude, we just want to see the target extremum, 6, grow its outermost contour compared to the case without minimum amplitude.",
@@ -73,7 +73,7 @@
 		"$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc"
             ]
 	],
-	"exclude_cmp": ["n_slices.txt"]
+	"sel_diff_args": {"exclude": ["n_slices.txt"]}
     },
     "Good_contour": {
 	"description": "3 contours at that level. 2 contain the inside point, one of which contains the 2 outside points.",
@@ -197,7 +197,7 @@
             ]
 	],
 	"input": "t\n",
-	"exclude_cmp": ["n_slices.txt"]
+	"sel_diff_args": {"exclude": ["n_slices.txt"]}
     },
     "Set_max_speed_noise": {
 	"symlink": ["$tests_old_dir/Get_1_outerm_noise_2_8/config_nml.txt"],
@@ -212,7 +212,7 @@
             ]
 	],
 	"input": "t\n",
-	"exclude_cmp": ["n_slices.txt"]
+	"sel_diff_args": {"exclude": ["n_slices.txt"]}
     },
     "SHPC_degenerate":
     {
@@ -248,7 +248,7 @@
             ]
 	],
 	"input": "f\n",
-	"exclude_cmp": ["n_slices.txt"]
+	"sel_diff_args": {"exclude": ["n_slices.txt"]}
     },
     "Extraction_eddies_region_2": {
 	"create_file": [
@@ -269,7 +269,7 @@
 		"$src_dir/Inst_eddies/Tests/Input/huv_region_2.nc"
             ]
 	],
-	"exclude_cmp": ["timings.txt", "n_slices.txt"]
+	"sel_diff_args": {"exclude": ["timings.txt", "n_slices.txt"]}
     },
     "Extraction_eddies_region_4": {
 	"description": "Part of the domain has missing values.",
@@ -288,7 +288,7 @@
             "$Aviso_DT_dir/dt_global_allsat_phy_l4_20060102_20210726.nc"
 	],
 	"input": "20454\n0\n",
-	"exclude_cmp": ["timings.txt", "perf_report.csv"]
+	"sel_diff_args": {"exclude": ["timings.txt", "perf_report.csv"]}
     },
     "Inst_eddies_py": {
 	"description": "Like Extraction_eddies_region_4, but for a single date. This is a test of options of the wrapper script rather than a test of the Fortran executable.",
@@ -306,7 +306,7 @@
             "$Aviso_DT_dir/dt_global_allsat_phy_l4_20060101_20210726.nc"
 	],
 	"input": "20454\n0\n",
-	"exclude_cmp": ["timings.txt", "perf_report.csv"]
+	"sel_diff_args": {"exclude": ["timings.txt", "perf_report.csv"]}
     },
     "Inst_eddies_loop": {
 	"create_file": [
@@ -319,7 +319,7 @@
 	    "2006-01-01", "2006-01-04", "0"
 	],
 	"input": "20454\n",
-	"exclude_cmp": ["timings.txt", "perf_report.csv"]
+	"sel_diff_args": {"exclude": ["timings.txt", "perf_report.csv"]}
     },
     "Nearby_extr": {
 	"command": [
@@ -349,7 +349,7 @@
 		"$src_dir/Inst_eddies/Tests/Input/uv_2006_01_01_coarse.nc"
             ]
 	],
-	"exclude_cmp": ["timings.txt", "n_slices.txt"]
+	"sel_diff_args": {"exclude": ["timings.txt", "n_slices.txt"]}
     },
     "Extraction_eddies_periodic": {
 	"description": "Periodic domain.",
@@ -371,7 +371,7 @@
 		"$src_dir/Inst_eddies/Tests/Input/uv_2006_01_01_coarse.nc"
             ]
 	],
-	"exclude_cmp": ["timings.txt", "n_slices.txt"]
+	"sel_diff_args": {"exclude": ["timings.txt", "n_slices.txt"]}
     },
     "Extr_proj": {
 	"description": "Create shapefile extr_proj.",
@@ -393,7 +393,7 @@
 		"$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc"
             ]
 	],
-	"exclude_cmp": ["n_slices.txt"]
+	"sel_diff_args": {"exclude": ["n_slices.txt"]}
     },
     "Region_4_15_days": {
 	"description": "This is used in several tests in Overlap.",
@@ -404,7 +404,7 @@
             "--bbox", "16.125", "20.875", "-38.875", "-34.125"
 	],
 	"create_file": ["config_nml.txt", "&config_nml /\n"],
-	"exclude_cmp": ["timings.txt", "perf_report.csv"]
+	"sel_diff_args": {"exclude": ["timings.txt", "perf_report.csv"]}
     },
     "Complete_SSH":
     {"command": "$build_dir/Inst_eddies/Tests/test_complete_ssh"},
diff --git a/Inst_eddies/Tests/test_output.json b/Inst_eddies/Tests/test_output.json
index dccb15d2eb9108702285876600884af131de7bdb..fc3ba610c93b880ed7b33fe57816dd904d645a36 100644
--- a/Inst_eddies/Tests/test_output.json
+++ b/Inst_eddies/Tests/test_output.json
@@ -31,9 +31,7 @@
             ]
 	],
 	"stdout": "test_write_null_stdout.txt",
-	"exclude_cmp": [
-            "test_write_null_stderr.txt"
-	]
+	"sel_diff_args": {"exclude": ["test_write_null_stderr.txt"]}
     },
     "Small_mix": {
 	"description": "Append to small SHPC, mixing output to the three shapefiles.",
@@ -49,9 +47,7 @@
             ]
 	],
 	"stdout": "test_write_null_stdout.txt",
-	"exclude_cmp": [
-            "test_write_null_stderr.txt"
-	]
+	"sel_diff_args": {"exclude": ["test_write_null_stderr.txt"]}
     },
     "Medium_sep": {
 	"description": "Append to medium-sized SHPC, separating output to the three shapefiles.",
@@ -67,9 +63,7 @@
             ]
 	],
 	"stdout": "test_write_null_stdout.txt",
-	"exclude_cmp": [
-            "test_write_null_stderr.txt"
-	]
+	"sel_diff_args": {"exclude": ["test_write_null_stderr.txt"]}
     },
     "Small_sep": {
 	"description": "Append to small SHPC, separating output to the three shapefiles.",
@@ -85,9 +79,7 @@
             ]
 	],
 	"stdout": "test_write_null_stdout.txt",
-	"exclude_cmp": [
-            "test_write_null_stderr.txt"
-	]
+	"sel_diff_args": {"exclude": ["test_write_null_stderr.txt"]}
     },
     "Create_mix": {
 	"description": "Create SHPC, mixing output to the three shapefiles.",
@@ -104,9 +96,7 @@
             ]
 	],
 	"stdout": "test_write_null_stdout.txt",
-	"exclude_cmp": [
-            "test_write_null_stderr.txt"
-	]
+	"sel_diff_args": {"exclude": ["test_write_null_stderr.txt"]}
     },
     "Create_sep": {
 	"description": "Create SHPC, separating output to the three shapefiles.",
@@ -123,9 +113,7 @@
             ]
 	],
 	"stdout": "test_write_null_stdout.txt",
-	"exclude_cmp": [
-            "test_write_null_stderr.txt"
-	]
+	"sel_diff_args": {"exclude": ["test_write_null_stderr.txt"]}
     },
     "Big_mix": {
 	"description": "Append to big SHPC, mixing output to the three shapefiles.",
@@ -141,10 +129,7 @@
             ]
 	],
 	"stdout": "test_write_null_stdout.txt",
-	"exclude_cmp": [
-            "test_write_null_stderr.txt",
-            "*.shp"
-	]
+	"sel_diff_args": {"exclude": ["test_write_null_stderr.txt", "*.shp"]}
     },
     "Big_sep": {
 	"description": "Append to big SHPC, separating output to the three shapefiles.",
@@ -160,9 +145,6 @@
             ]
 	],
 	"stdout": "test_write_null_stdout.txt",
-	"exclude_cmp": [
-            "test_write_null_stderr.txt",
-            "*.shp"
-	]
+	"sel_diff_args": {"exclude": ["test_write_null_stderr.txt", "*.shp"]}
     }
 }
diff --git a/Overlap/Analysis/tests.json b/Overlap/Analysis/tests.json
index 2cf86f6bbf0225b2f6fc909585c5386762ebbded..db6f00e841348ea1dab125caa92d7aed265bce62 100644
--- a/Overlap/Analysis/tests.json
+++ b/Overlap/Analysis/tests.json
@@ -88,6 +88,6 @@
 	["$src_dir/Overlap/Analysis/extract_component_nx.py",
 	 "$tests_old_dir/EGr2nd15md4np3/edgelist.csv", "204618",
 	 "component.csv"],
-	"exclude_cmp": ["e_overestim.txt"]
+	"sel_diff_args": {"exclude": ["e_overestim.txt"]}
     }
 }
diff --git a/Overlap/Documentation_texfol/documentation.tex b/Overlap/Documentation_texfol/documentation.tex
index a6d7fd32f14f66bc2f2d5882f4f01265a754df76..3f565c988ccbaf4b2546416f70847764ad9fec2f 100644
--- a/Overlap/Documentation_texfol/documentation.tex
+++ b/Overlap/Documentation_texfol/documentation.tex
@@ -62,7 +62,9 @@ régulièrement espacées. Ces dates sont identifiées par un indice (un
 nombre entier) prenant les valeurs successives entre $k_1$ et
 $k_1 + \mathtt{n\_dates} - 1$. $k_1$ est le premier indice de date de
 la première tranche de SHPC. $\mathtt{n\_dates}$ est le nombre total
-de dates dans toutes les tranches de SHPC.
+de dates dans les \verb+ishape_last+ de toutes les tranches de SHPC
+(une date peut ne contenir aucun tourbillon : aucune forme dans le
+SHPC, mais une ligne dans \verb+ishape_last+).
 
 Chaque tourbillon à chaque date reçoit un identifiant. Les
 recouvrements de tourbillons à différentes dates peuvent être
@@ -77,10 +79,10 @@ Le code est écrit en Fortran, parallélisé avec MPI.
 La zone intérieure à la ligne de vitesse maximale est le c\oe{}ur du
 tourbillon. On cherche les recouvrements entre ces c\oe{}urs, l'idée
 étant que les extremums à deux dates correspondent au même tourbillon
-si les c\oe{}urs se recouvrent.
-
-Les arcs relient les tourbillons dont les c\oe{}urs se recouvrent à
-deux dates successives.
+si les c\oe{}urs se recouvrent. Association (création d'un arc) entre
+tourbillons instantanées à deux dates si et seulement si :
+recouvrement des contours de vitesse max $\ge$ \verb+min_inters_speed+
+ou recouvrement des contours extérieurs $\ge$ \verb+min_inters_out+.
 
 Le graphe est orienté acyclique. L'ordre topologique est tout trouvé :
 numérotation par dates successives. Le graphe non orienté associé
@@ -273,9 +275,9 @@ fichier. Cf. figure (\ref{fig:input_output}).
   \label{fig:input_output}
 \end{figure}
 
-Le programme lit une liste de tranches de SHPC. Nous supposons que la
-première date présente dans une tranche est strictement supérieure à
-la dernière date de la tranche précédente.
+Le programme lit une liste de tranches de SHPC. Le premier indice de
+date d'une tranche doit être égal à 1 plus le dernier indice de date
+de la tranche précédente.
 
 On n'enregistre pas le fichier \verb+e_overestim.txt+ dans le SHPC
 parce qu'il dépend des choix \verb+n_dates+ et \verb+i_slice+ faits à
diff --git a/Trajectories/Tests/perf_tests.json b/Trajectories/Tests/perf_tests.json
index b91137ca3bb9ad586df6f5082bb95a82ca488e7f..04138ad51f93828ae9ccab0aadfb210c24873afd 100644
--- a/Trajectories/Tests/perf_tests.json
+++ b/Trajectories/Tests/perf_tests.json
@@ -6,7 +6,7 @@
             "$PWD/edgelist_head.csv",
             "segments.gt"
 	],
-	"exclude_cmp": ["timings_segments.txt"]
+	"sel_diff_args": {"exclude": ["timings_segments.txt"]}
     },
     "Perf_cost_function": {
 	"description": "Performance test with adjustable size of input.",
@@ -17,7 +17,7 @@
             "$PWD/Perf_segments/segments.gt",
             "segments_cost_functions.gt"
 	],
-	"exclude_cmp": ["timings.txt"]
+	"sel_diff_args": {"exclude": ["timings.txt"]}
     },
     "Perf_trajectories": {
 	"description": "Performance test with adjustable size of input.",
@@ -25,6 +25,6 @@
             "$src_dir/Trajectories/trajectories.py",
             "$PWD/Perf_cost_function/segments_cost_functions.gt"
 	],
- 	"exclude_cmp": ["timings.txt"]
+ 	"sel_diff_args": {"exclude": ["timings.txt"]}
    }
 }
diff --git a/Trajectories/Tests/tests.json b/Trajectories/Tests/tests.json
index 3bcd18886cdca4ae2d09831b1e292a37c055cdbc..78053e59f95b9310c6af8e298534f48f88b27157 100644
--- a/Trajectories/Tests/tests.json
+++ b/Trajectories/Tests/tests.json
@@ -35,7 +35,7 @@
             "$tests_old_dir/EGr2nd15md4/edgelist.csv",
             "segments.graphml"
 	],
-	"exclude_cmp": ["timings_segments.txt"],
+	"sel_diff_args": {"exclude": ["timings_segments.txt"]},
 	"description": "This is a case with only isolated segments."
     },
     "Cost_functions": {
@@ -46,9 +46,7 @@
             "$tests_old_dir/Segments/segments.graphml",
             "segments_cost_functions.graphml", "--debug"
 	],
-	"exclude_cmp": [
-            "timings.txt"
-	],
+	"sel_diff_args": {"exclude": ["timings.txt"]},
 	"description": "This is a case with only isolated segments."
     },
     "Greece_segments": {
@@ -68,9 +66,7 @@
             "$tests_old_dir/Greece_segments/segments.graphml",
             "segments_cost_functions.graphml", "--debug"
 	],
-	"exclude_cmp": [
-            "timings.txt"
-	]
+	"sel_diff_args": {"exclude": ["timings.txt"]}
     },
     "Cost_function_no_debug":
     {
@@ -82,7 +78,7 @@
             "$tests_old_dir/Greece_segments/segments.graphml",
             "segments_cost_functions.graphml"
 	],
-	"exclude_cmp": ["timings.txt"]
+	"sel_diff_args": {"exclude": ["timings.txt"]}
     },
     "Trajectories": {
 	"command": [