diff --git a/Tests/Input/Test_read_eddy/extremum_1_old.dbf b/Tests/Input/Test_read_eddy/extremum_1_old.dbf
new file mode 100644
index 0000000000000000000000000000000000000000..19cd71437df15410b8c7ea2a525f3ec9913dd32d
Binary files /dev/null and b/Tests/Input/Test_read_eddy/extremum_1_old.dbf differ
diff --git a/Tests/Input/Test_read_eddy/extremum_1_old.shp b/Tests/Input/Test_read_eddy/extremum_1_old.shp
new file mode 100644
index 0000000000000000000000000000000000000000..f84cd5163e4b19aed1b5bf899db292bdfe102bb7
Binary files /dev/null and b/Tests/Input/Test_read_eddy/extremum_1_old.shp differ
diff --git a/Tests/Input/Test_read_eddy/extremum_1_old.shx b/Tests/Input/Test_read_eddy/extremum_1_old.shx
new file mode 100644
index 0000000000000000000000000000000000000000..2bff1147ba37c96c9bcbcd972397ecd30452f31f
Binary files /dev/null and b/Tests/Input/Test_read_eddy/extremum_1_old.shx differ
diff --git a/Tests/Input/Test_read_eddy/max_speed_contour_1_old.dbf b/Tests/Input/Test_read_eddy/max_speed_contour_1_old.dbf
new file mode 100644
index 0000000000000000000000000000000000000000..809a9550348fca293184a836f4ac267144d35df1
Binary files /dev/null and b/Tests/Input/Test_read_eddy/max_speed_contour_1_old.dbf differ
diff --git a/Tests/Input/Test_read_eddy/max_speed_contour_1_old.shp b/Tests/Input/Test_read_eddy/max_speed_contour_1_old.shp
new file mode 100644
index 0000000000000000000000000000000000000000..90c56c20b6e0997580e43e477fbd7d03b9f26622
Binary files /dev/null and b/Tests/Input/Test_read_eddy/max_speed_contour_1_old.shp differ
diff --git a/Tests/Input/Test_read_eddy/max_speed_contour_1_old.shx b/Tests/Input/Test_read_eddy/max_speed_contour_1_old.shx
new file mode 100644
index 0000000000000000000000000000000000000000..ff27e0545f6c10648084c92a9bc03633c300f2f7
Binary files /dev/null and b/Tests/Input/Test_read_eddy/max_speed_contour_1_old.shx differ
diff --git a/Tests/Input/Test_read_eddy/outermost_contour_1_old.dbf b/Tests/Input/Test_read_eddy/outermost_contour_1_old.dbf
new file mode 100644
index 0000000000000000000000000000000000000000..60ffcc3359249e70721472b183d1eca976cd8b0b
Binary files /dev/null and b/Tests/Input/Test_read_eddy/outermost_contour_1_old.dbf differ
diff --git a/Tests/Input/Test_read_eddy/outermost_contour_1_old.shp b/Tests/Input/Test_read_eddy/outermost_contour_1_old.shp
new file mode 100644
index 0000000000000000000000000000000000000000..5b208577e95028093289cdc6eee88a7c8da36768
Binary files /dev/null and b/Tests/Input/Test_read_eddy/outermost_contour_1_old.shp differ
diff --git a/Tests/Input/Test_read_eddy/outermost_contour_1_old.shx b/Tests/Input/Test_read_eddy/outermost_contour_1_old.shx
new file mode 100644
index 0000000000000000000000000000000000000000..0e98a0960ed59290eb92dfba8995dd813d7b4981
Binary files /dev/null and b/Tests/Input/Test_read_eddy/outermost_contour_1_old.shx differ
diff --git a/Tests/Input/empty_outside_points.csv b/Tests/Input/empty_outside_points.csv
new file mode 100644
index 0000000000000000000000000000000000000000..19fcab18b6c0f15b64e19d075d0d8c43145d42b8
--- /dev/null
+++ b/Tests/Input/empty_outside_points.csv
@@ -0,0 +1,2 @@
+"degrees east" "degrees north"
+"longitude" "latitude"
diff --git a/Tests/Input/example.nc b/Tests/Input/example.nc
new file mode 100644
index 0000000000000000000000000000000000000000..92ad95ff8d479940ed67b94e100613b909739fc9
Binary files /dev/null and b/Tests/Input/example.nc differ
diff --git a/Tests/Input/extr_map_negative_2.nc b/Tests/Input/extr_map_negative_2.nc
new file mode 100644
index 0000000000000000000000000000000000000000..593f73e0fa2e56247782b598da4c4e6532788c67
Binary files /dev/null and b/Tests/Input/extr_map_negative_2.nc differ
diff --git a/Tests/Input/extr_map_negative_2_8.nc b/Tests/Input/extr_map_negative_2_8.nc
new file mode 100644
index 0000000000000000000000000000000000000000..561a969a0558d83ad9d8f85039266765c3cae07a
Binary files /dev/null and b/Tests/Input/extr_map_negative_2_8.nc differ
diff --git a/Tests/Input/extr_map_outermost.nc b/Tests/Input/extr_map_outermost.nc
new file mode 100644
index 0000000000000000000000000000000000000000..6ac87412a29e574922d3e616a325c28f99555d4f
Binary files /dev/null and b/Tests/Input/extr_map_outermost.nc differ
diff --git a/Tests/Stdin/good_contour.txt b/Tests/Input/good_contour.txt
similarity index 100%
rename from Tests/Stdin/good_contour.txt
rename to Tests/Input/good_contour.txt
diff --git a/Tests/Stdin/good_contour_2.txt b/Tests/Input/good_contour_2.txt
similarity index 100%
rename from Tests/Stdin/good_contour_2.txt
rename to Tests/Input/good_contour_2.txt
diff --git a/Tests/Input/h_outermost.nc b/Tests/Input/h_outermost.nc
new file mode 100644
index 0000000000000000000000000000000000000000..934d89f5147c5465c8374d7e9b3cc0bcdb8d956e
Binary files /dev/null and b/Tests/Input/h_outermost.nc differ
diff --git a/Tests/Input/h_region_1.nc b/Tests/Input/h_region_1.nc
new file mode 100644
index 0000000000000000000000000000000000000000..ebdef98d17d8e1d8c49df1037b9fde437e432bb7
Binary files /dev/null and b/Tests/Input/h_region_1.nc differ
diff --git a/Tests/Input/h_region_2.nc b/Tests/Input/h_region_2.nc
new file mode 100644
index 0000000000000000000000000000000000000000..e7ab9b1f8fc1b0a72f998f8d70f8c4cf6224fb30
Binary files /dev/null and b/Tests/Input/h_region_2.nc differ
diff --git a/Tests/Input/h_region_3.nc b/Tests/Input/h_region_3.nc
new file mode 100644
index 0000000000000000000000000000000000000000..a9a61de787f5af8ae8043a11a080ada44926bdb1
Binary files /dev/null and b/Tests/Input/h_region_3.nc differ
diff --git a/Tests/Input/h_region_4.nc b/Tests/Input/h_region_4.nc
new file mode 100644
index 0000000000000000000000000000000000000000..8b279a4569eb463ea4bd80da623037d7cdc33555
Binary files /dev/null and b/Tests/Input/h_region_4.nc differ
diff --git a/Tests/Input/h_region_5.nc b/Tests/Input/h_region_5.nc
new file mode 100644
index 0000000000000000000000000000000000000000..20eb566ef18761361b3ff3b726fd423b260ed67f
Binary files /dev/null and b/Tests/Input/h_region_5.nc differ
diff --git a/Tests/Stdin/inside_4_false_nml.txt b/Tests/Input/inside_4_false_nml.txt
similarity index 100%
rename from Tests/Stdin/inside_4_false_nml.txt
rename to Tests/Input/inside_4_false_nml.txt
diff --git a/Tests/Stdin/inside_4_true_nml.txt b/Tests/Input/inside_4_true_nml.txt
similarity index 100%
rename from Tests/Stdin/inside_4_true_nml.txt
rename to Tests/Input/inside_4_true_nml.txt
diff --git a/Tests/Stdin/max_speed_contour_ssh_nml.txt b/Tests/Input/max_speed_contour_ssh_nml.txt
similarity index 100%
rename from Tests/Stdin/max_speed_contour_ssh_nml.txt
rename to Tests/Input/max_speed_contour_ssh_nml.txt
diff --git a/Tests/Stdin/no_good_contour.txt b/Tests/Input/no_good_contour.txt
similarity index 100%
rename from Tests/Stdin/no_good_contour.txt
rename to Tests/Input/no_good_contour.txt
diff --git a/Tests/Input/outermost_contour_alt.dbf b/Tests/Input/outermost_contour_alt.dbf
new file mode 100644
index 0000000000000000000000000000000000000000..96571f8de0fad86d4aed8f549c3e095a094abd31
Binary files /dev/null and b/Tests/Input/outermost_contour_alt.dbf differ
diff --git a/Tests/Input/outermost_contour_alt.shp b/Tests/Input/outermost_contour_alt.shp
new file mode 100644
index 0000000000000000000000000000000000000000..d46af02cc11312d10c9a955cca8636965d0d1006
Binary files /dev/null and b/Tests/Input/outermost_contour_alt.shp differ
diff --git a/Tests/Input/outermost_contour_alt.shx b/Tests/Input/outermost_contour_alt.shx
new file mode 100644
index 0000000000000000000000000000000000000000..dc87e547082503f0d7dd91c08af7e4e1c21dc971
Binary files /dev/null and b/Tests/Input/outermost_contour_alt.shx differ
diff --git a/Tests/Input/outermost_eddy_5.dbf b/Tests/Input/outermost_eddy_5.dbf
new file mode 100644
index 0000000000000000000000000000000000000000..1f6cf584ab893e3dbd62c65bfa56e2d5b613e73e
Binary files /dev/null and b/Tests/Input/outermost_eddy_5.dbf differ
diff --git a/Tests/Input/outermost_eddy_5.shp b/Tests/Input/outermost_eddy_5.shp
new file mode 100644
index 0000000000000000000000000000000000000000..5b4037045c6672eced4e77696103890166ba853d
Binary files /dev/null and b/Tests/Input/outermost_eddy_5.shp differ
diff --git a/Tests/Input/outermost_eddy_5.shx b/Tests/Input/outermost_eddy_5.shx
new file mode 100644
index 0000000000000000000000000000000000000000..b4e42dcc8ec98ce455f0c54af82e96151ef84765
Binary files /dev/null and b/Tests/Input/outermost_eddy_5.shx differ
diff --git a/Tests/Input/outside_points.csv b/Tests/Input/outside_points.csv
new file mode 100644
index 0000000000000000000000000000000000000000..6b40dd182d9543357ad87a3a9f89463c24918985
--- /dev/null
+++ b/Tests/Input/outside_points.csv
@@ -0,0 +1,7 @@
+"degrees east" "degrees north"
+"longitude" "latitude"
+8.375 -36.125
+6.125 -35.375
+8.125 -34.625
+10.875 -34.625
+5.875 -33.125
diff --git a/Tests/Stdin/outside_points_1.csv b/Tests/Input/outside_points_1.csv
similarity index 100%
rename from Tests/Stdin/outside_points_1.csv
rename to Tests/Input/outside_points_1.csv
diff --git a/Tests/Stdin/outside_points_2.csv b/Tests/Input/outside_points_2.csv
similarity index 100%
rename from Tests/Stdin/outside_points_2.csv
rename to Tests/Input/outside_points_2.csv
diff --git a/Tests/Input/outside_points_get_1_outerm.csv b/Tests/Input/outside_points_get_1_outerm.csv
new file mode 100644
index 0000000000000000000000000000000000000000..8ac279a79b8c056c720d9c8292ec474b646fed12
--- /dev/null
+++ b/Tests/Input/outside_points_get_1_outerm.csv
@@ -0,0 +1,9 @@
+"degrees east" "degrees north"
+"longitude" "latitude"
+8.375 -36.125
+9.375 -35.875
+6.125 -35.375
+8.125 -34.625
+10.875 -34.625
+5.875 -33.125
+8.125 -33.125
diff --git a/Tests/Input/outside_points_get_1_outerm_noise_2.csv b/Tests/Input/outside_points_get_1_outerm_noise_2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..64073516a65d6f12395b83ab48cfa9b1d1a54e0b
--- /dev/null
+++ b/Tests/Input/outside_points_get_1_outerm_noise_2.csv
@@ -0,0 +1,8 @@
+"degrees east" "degrees north"
+"longitude" "latitude"
+8.375 -36.125
+6.125 -35.375
+8.125 -34.625
+10.875 -34.625
+5.875 -33.125
+8.125 -33.125
diff --git a/Tests/Stdin/read_snapshot_nml.txt b/Tests/Input/read_snapshot_nml.txt
similarity index 100%
rename from Tests/Stdin/read_snapshot_nml.txt
rename to Tests/Input/read_snapshot_nml.txt
diff --git a/Tests/Stdin/successive_overlap_nml.txt b/Tests/Input/successive_overlap_nml.txt
similarity index 100%
rename from Tests/Stdin/successive_overlap_nml.txt
rename to Tests/Input/successive_overlap_nml.txt
diff --git a/Tests/Input/tri_square_hole.dbf b/Tests/Input/tri_square_hole.dbf
new file mode 100644
index 0000000000000000000000000000000000000000..8168f08fcf9a40f417ced40e759949f00bf8f057
Binary files /dev/null and b/Tests/Input/tri_square_hole.dbf differ
diff --git a/Tests/Input/tri_square_hole.shp b/Tests/Input/tri_square_hole.shp
new file mode 100644
index 0000000000000000000000000000000000000000..03e7264fc5360b97cd0a22be8c549b5b789dd42e
Binary files /dev/null and b/Tests/Input/tri_square_hole.shp differ
diff --git a/Tests/Input/tri_square_hole.shx b/Tests/Input/tri_square_hole.shx
new file mode 100644
index 0000000000000000000000000000000000000000..7f82301b5dd3a19a8986d0dad1570e3849d699b2
Binary files /dev/null and b/Tests/Input/tri_square_hole.shx differ
diff --git a/Tests/Input/triangle.dbf b/Tests/Input/triangle.dbf
new file mode 100644
index 0000000000000000000000000000000000000000..8168f08fcf9a40f417ced40e759949f00bf8f057
Binary files /dev/null and b/Tests/Input/triangle.dbf differ
diff --git a/Tests/Input/triangle.shp b/Tests/Input/triangle.shp
new file mode 100644
index 0000000000000000000000000000000000000000..9b08d9d3dea3d2364803d2d574a2e764e3655238
Binary files /dev/null and b/Tests/Input/triangle.shp differ
diff --git a/Tests/Input/triangle.shx b/Tests/Input/triangle.shx
new file mode 100644
index 0000000000000000000000000000000000000000..c9efe91377d3d44bd52e42b32b69b5e7c02bcb7b
Binary files /dev/null and b/Tests/Input/triangle.shx differ
diff --git a/Tests/Input/uv_outermost.nc b/Tests/Input/uv_outermost.nc
new file mode 100644
index 0000000000000000000000000000000000000000..8a93c0d74b491ffecfeb7e5264bd09f323ff05c4
Binary files /dev/null and b/Tests/Input/uv_outermost.nc differ
diff --git a/Tests/Input/uv_region_1.nc b/Tests/Input/uv_region_1.nc
new file mode 100644
index 0000000000000000000000000000000000000000..98570648e0b6c8347ad9656a394bd5835b66dda3
Binary files /dev/null and b/Tests/Input/uv_region_1.nc differ
diff --git a/Tests/Input/uv_region_2.nc b/Tests/Input/uv_region_2.nc
new file mode 100644
index 0000000000000000000000000000000000000000..65c4baac999209d615a8b371edb6290845c31b66
Binary files /dev/null and b/Tests/Input/uv_region_2.nc differ
diff --git a/Tests/Input/uv_region_3.nc b/Tests/Input/uv_region_3.nc
new file mode 100644
index 0000000000000000000000000000000000000000..d63cfb25fa8584f41cb4563b21073d0df41fbfa9
Binary files /dev/null and b/Tests/Input/uv_region_3.nc differ
diff --git a/Tests/Input/uv_region_4.nc b/Tests/Input/uv_region_4.nc
new file mode 100644
index 0000000000000000000000000000000000000000..0148d63298deb90e2f43ba7cf23fdb778009e98d
Binary files /dev/null and b/Tests/Input/uv_region_4.nc differ
diff --git a/Tests/Input/uv_region_5.nc b/Tests/Input/uv_region_5.nc
new file mode 100644
index 0000000000000000000000000000000000000000..dfb2cf2b78e8ab930555a63260e75ea3a8046549
Binary files /dev/null and b/Tests/Input/uv_region_5.nc differ
diff --git a/Tests/read_eddy.f b/Tests/read_eddy.f
index 10c7ce1e9e9541aaa8ea9f5623df4a98217635cb..4cdfae95cd4d349062df3f1892b7153ab8a5dadb 100644
--- a/Tests/read_eddy.f
+++ b/Tests/read_eddy.f
@@ -32,7 +32,7 @@ contains
     integer, intent(in):: ishape ! 0-based
 
     ! Local:
-    integer interpolated, cyclone, suff_amp, twice
+    integer int_attr ! integer attribute
     TYPE(shpobject) psobject
     type(polygon) p
 
@@ -49,14 +49,14 @@ contains
     call dbfreadattribute(hshp_extremum, ishape, ifield = 2, attr = i)
 
     call dbfreadattribute(hshp_extremum, ishape, ifield = 3, &
-         attr = interpolated)
-    e%interpolated = .false.
+         attr = int_attr)
+    e%interpolated = int_attr == 1
 
-    call dbfreadattribute(hshp_extremum, ishape, ifield = 4, attr = cyclone)
-    e%cyclone = cyclone == 1
+    call dbfreadattribute(hshp_extremum, ishape, ifield = 4, attr = int_attr)
+    e%cyclone = int_attr == 1
 
-    call dbfreadattribute(hshp_extremum, ishape, ifield = 5, attr = suff_amp)
-    e%suff_amp = suff_amp == 1
+    call dbfreadattribute(hshp_extremum, ishape, ifield = 5, attr = int_attr)
+    e%suff_amp = int_attr == 1
 
     call dbfreadattribute(hshp_extremum, ishape, ifield = 6, attr = attr)
     e%max_speed = attr
@@ -71,8 +71,8 @@ contains
     call dbfreadattribute(hshp_outermost, ishape, ifield = 1, attr = attr)
     e%out_cont%ssh = attr
 
-    call dbfreadattribute(hshp_outermost, ishape, ifield = 4, attr = twice)
-    e%twice = twice == 1
+    call dbfreadattribute(hshp_outermost, ishape, ifield = 4, attr = int_attr)
+    e%twice = int_attr == 1
 
     call dbfreadattribute(hshp_outermost, ishape, ifield = 5, attr = e%radius4)
 
diff --git a/Tests/test_get_1_outerm.f b/Tests/test_get_1_outerm.f
index 5e07f5a245aa19a1d8686941ad56532fc3b4de13..5c4a03079c42fa8be2e16d655afb10809dece305 100644
--- a/Tests/test_get_1_outerm.f
+++ b/Tests/test_get_1_outerm.f
@@ -32,7 +32,7 @@ program test_get_1_outerm
   TYPE(shpfileobject) shphandle
   integer field_number, shape_number
 
-  real, allocatable:: nearby_extr(:, :) ! (2, :) longitude and
+  real, allocatable:: outside_points(:, :) ! (2, :) longitude and
   ! latitude, in rad, of all the significant extrema, except the
   ! target extremum
 
@@ -62,27 +62,27 @@ program test_get_1_outerm
 
   step = [longitude(2) - longitude(1), latitude(2) - latitude(1)]
 
-  print *, "Reading from nearby_extr.csv..."
+  print *, "Reading from outside_points.csv..."
   call new_unit(unit)
-  open(unit, file = "nearby_extr.csv", status = "old", action = "read", &
+  open(unit, file = "outside_points.csv", status = "old", action = "read", &
        position = "rewind")
   call count_lines(unit, n)
   n = n - 2 ! 2 title lines
-  allocate(nearby_extr(2, n))
+  allocate(outside_points(2, n))
   rewind(unit)
   read(unit, fmt = *)
   read(unit, fmt = *)
 
   do l = 1, n
-     read(unit, fmt = *) nearby_extr(:, l)
+     read(unit, fmt = *) outside_points(:, l)
   end do
 
-  nearby_extr = nearby_extr * deg_to_rad
+  outside_points = outside_points * deg_to_rad
   close(unit)
   
   outermost_contour = get_1_outerm(cyclone, &
        coord_extr = [longitude(1), latitude(1)] + (ind_targ_extr - 1) * step, &
-       innermost_level = innermost_level, nearby_extr = nearby_extr, &
+       innermost_level = innermost_level, outside_points = outside_points, &
        ssh = ssh(:, :, 1), corner = [longitude(1), latitude(1)], step = step)
 
   if (outermost_contour%closed) then
diff --git a/Tests/test_nearby_extr.f b/Tests/test_nearby_extr.f
index 91bc84a3e5963fa21136c27fbcb223d5f8a417d1..86465e1d8fff74c8f43cbb6a17602bf8b169cb4a 100644
--- a/Tests/test_nearby_extr.f
+++ b/Tests/test_nearby_extr.f
@@ -13,6 +13,7 @@ program test_nearby_extr
   implicit none
 
   integer ncid, varid, n_entities, ishape, i, l
+  integer int_attr ! integer attribute
 
   integer, allocatable:: extr_map(:, :)
   ! At a point of extremum SSH with out_cont found, of sufficient
@@ -41,6 +42,13 @@ program test_nearby_extr
 
   do ishape = 0, n_entities - 1
      call dbfreadattribute(hshp, ishape, ifield = 2, attr = i)
+
+     call dbfreadattribute(hshp, ishape, ifield = 4, attr = int_attr)
+     list_vis(i)%cyclone = int_attr == 1
+
+     call dbfreadattribute(hshp, ishape, ifield = 5, attr = int_attr)
+     list_vis(i)%suff_amp = int_attr == 1
+
      call shp_read_object_03(hshp, ishape, psobject)
      list_vis(i)%coord_extr = [psobject%padfx(1), psobject%padfy(1)] &
           * deg_to_rad
diff --git a/Tests/test_set_max_speed.f b/Tests/test_set_max_speed.f
index 951ef61ece9c8ea553d5e8745c1e02926aa5d4d9..df645c8f1e6cae7d50a9957b3dcf7a5d78b7d72c 100644
--- a/Tests/test_set_max_speed.f
+++ b/Tests/test_set_max_speed.f
@@ -37,7 +37,7 @@ program test_set_max_speed
   real:: coord_extr(2) = [9.625, - 33.875]
   real(kind = c_double) outermost_contour_ssh
 
-  real, allocatable:: nearby_extr(:, :) ! (2, :) longitude and
+  real, allocatable:: outside_points(:, :) ! (2, :) longitude and
   ! latitude, in rad, of all the extrema except the target extremum
 
   namelist /main_nml/ cyclone, ssh_extremum, coord_extr, ind_targ_extr
@@ -95,25 +95,25 @@ program test_set_max_speed
   e%out_cont%points(1, :) = psobject%padfx * deg_to_rad
   e%out_cont%points(2, :) = psobject%padfy * deg_to_rad
 
-  print *, "Reading from nearby_extr.csv..."
+  print *, "Reading from outside_points.csv..."
   call new_unit(unit)
-  open(unit, file = "nearby_extr.csv", status = "old", action = "read", &
+  open(unit, file = "outside_points.csv", status = "old", action = "read", &
        position = "rewind")
   call count_lines(unit, n)
   n = n - 2 ! 2 title lines
-  allocate(nearby_extr(2, n))
+  allocate(outside_points(2, n))
   rewind(unit)
   read(unit, fmt = *)
   read(unit, fmt = *)
 
   do l = 1, n
-     read(unit, fmt = *) nearby_extr(:, l)
+     read(unit, fmt = *) outside_points(:, l)
   end do
   
-  nearby_extr = nearby_extr * deg_to_rad
+  outside_points = outside_points * deg_to_rad
   close(unit)
   
-  call set_max_speed(e, ind_targ_extr, nearby_extr, ssh, u, v, &
+  call set_max_speed(e, ind_targ_extr, outside_points, ssh, u, v, &
        corner * deg_to_rad, step = [0.25, 0.25]  * deg_to_rad)
 
   call shp_create_03("test_set_max_speed", shpt_polygon, hshp)
diff --git a/Tests/tests.json b/Tests/tests.json
index 9c6647da4cb676562db2658f756adb9dad7842e1..eb3f4c02cb37966ad70a8b9aa529fdaf1b66b833 100644
--- a/Tests/tests.json
+++ b/Tests/tests.json
@@ -1,43 +1,43 @@
 [
     {
-	"stdin" : "$stdin_dir/good_contour.txt",
+	"stdin" : "$input_dir/good_contour.txt",
 	"args" : ["$compil_prod_dir/test_good_contour",
 		  "$input_dir/example.nc"],
 	"title" : "Good_contour",
-	"required": [["$stdin_dir/outside_points_1.csv", "outside_points.csv"]],
+	"required": [["$input_dir/outside_points_1.csv", "outside_points.csv"]],
 	"description": "3 contours at that level. 2 contain the inside point, one of which contains the 2 outside points."
     },
     {
-	"stdin" : "$stdin_dir/good_contour_2.txt",
+	"stdin" : "$input_dir/good_contour_2.txt",
 	"args" : ["$compil_prod_dir/test_good_contour",
 		  "$input_dir/example.nc"],
 	"title" : "Good_contour_2",
-	"required": [["$stdin_dir/outside_points_2.csv", "outside_points.csv"]],
+	"required": [["$input_dir/outside_points_2.csv", "outside_points.csv"]],
 	"description": "Select another good contour. Case where one of the contours tested does not contain inside point."
     },
     {
-	"stdin" : "$stdin_dir/no_good_contour.txt",
+	"stdin" : "$input_dir/no_good_contour.txt",
 	"args" : ["$compil_prod_dir/test_good_contour",
 		  "$input_dir/example.nc"],
 	"title" : "No_good_contour",
-	"required": [["$stdin_dir/outside_points_1.csv", "outside_points.csv"]]
+	"required": [["$input_dir/outside_points_1.csv", "outside_points.csv"]]
     },
     {
 	"args" : ["$compil_prod_dir/test_local_extrema",
-		  "$input_dir/2006_01/h_region_1.nc"],
+		  "$input_dir/h_region_1.nc"],
 	"title" : "Local_extrema"
     },
     {
 	"args" : ["$compil_prod_dir/test_local_extrema",
-		  "$input_dir/2006_01/h_region_2.nc"],
+		  "$input_dir/h_region_2.nc"],
 	"title" : "Local_extrema_larger"
     },
     {
 	"args" : "$compil_prod_dir/test_get_1_outerm",
 	"required":
 	[
-	    ["$input_dir/2006_01/h_region_1.nc", "h.nc"],
-	    ["$input_dir/nearby_extr_get_1_outerm.csv", "nearby_extr.csv"]
+	    ["$input_dir/h_region_1.nc", "h.nc"],
+	    ["$input_dir/outside_points_get_1_outerm.csv", "outside_points.csv"]
 	],
 	"title" : "Get_1_outerm",
 	"input" : "&main_nml /\n"
@@ -46,8 +46,8 @@
 	"args" : "$compil_prod_dir/test_get_1_outerm",
 	"required":
 	[
-	    ["$input_dir/2006_01/h_region_1.nc", "h.nc"],
-	    "$input_dir/nearby_extr.csv"
+	    ["$input_dir/h_region_1.nc", "h.nc"],
+	    "$input_dir/outside_points.csv"
 	],
 	"title" : "Get_1_outerm_noise_2_8",
 	"input" : "&main_nml /\n", 
@@ -56,10 +56,10 @@
     {
 	"args" : "$compil_prod_dir/test_get_1_outerm",
 	"required": [
-	    ["$input_dir/2006_01/h_region_1.nc", "h.nc"],
+	    ["$input_dir/h_region_1.nc", "h.nc"],
 	    [
-		"$input_dir/nearby_extr_get_1_outerm_noise_2.csv",
-		"nearby_extr.csv"
+		"$input_dir/outside_points_get_1_outerm_noise_2.csv",
+		"outside_points.csv"
 	    ]
 	],
 	"title" : "Get_1_outerm_noise_2",
@@ -68,19 +68,19 @@
     },
     {
 	"args" : ["$compil_prod_dir/test_max_speed_contour_ssh",
-		  "$input_dir/2006_01/h_2006_01_01.nc", "$input_dir/2006_01/uv_2006_01_01.nc"],
+		  "$large_input_dir/h_2006_01_01.nc", "$large_input_dir/uv_2006_01_01.nc"],
 	"title" : "Max_speed_contour_ssh",
 	"input" : "&main_nml /\n"
     },
     {
 	"args" : ["$compil_prod_dir/test_max_speed_contour_ssh",
-		  "$input_dir/2006_01/h_2006_01_01.nc", "$input_dir/2006_01/uv_2006_01_01.nc"],
+		  "$large_input_dir/h_2006_01_01.nc", "$large_input_dir/uv_2006_01_01.nc"],
 	"title" : "Max_speed_contour_ssh_north",
-	"stdin" : "$stdin_dir/max_speed_contour_ssh_nml.txt"
+	"stdin" : "$input_dir/max_speed_contour_ssh_nml.txt"
     },
     {
 	"args" : "$compil_prod_dir/test_mean_speed",
-	"required": [["$input_dir/2006_01/uv_region_1.nc", "uv.nc"],
+	"required": [["$input_dir/uv_region_1.nc", "uv.nc"],
 		     ["$tests_old_dir/Get_1_outerm/test_get_1_outerm.shp",
 		      "contour.shp"],
 		     ["$tests_old_dir/Get_1_outerm/test_get_1_outerm.dbf",
@@ -92,7 +92,7 @@
     },
     {
 	"args" : "$compil_prod_dir/test_mean_speed",
-	"required": [["$input_dir/2006_01/uv_region_1.nc","uv.nc"],
+	"required": [["$input_dir/uv_region_1.nc","uv.nc"],
 		     ["$input_dir/outermost_contour_alt.shp", "contour.shp"],
 		     ["$input_dir/outermost_contour_alt.dbf", "contour.dbf"],
 		     ["$input_dir/outermost_contour_alt.shx", "contour.shx"]],
@@ -102,9 +102,9 @@
     {
 	"args": "$compil_prod_dir/test_set_max_speed",
 	"title": "Set_max_speed",
-	"required": [["$input_dir/2006_01/h_outermost.nc", "h.nc"],
-		     ["$input_dir/2006_01/uv_outermost.nc", "uv.nc"],
-		     ["$input_dir/empty_nearby_extr.csv", "nearby_extr.csv"],
+	"required": [["$input_dir/h_outermost.nc", "h.nc"],
+		     ["$input_dir/uv_outermost.nc", "uv.nc"],
+		     ["$input_dir/empty_outside_points.csv", "outside_points.csv"],
 		     "$tests_old_dir/Get_1_outerm/test_get_1_outerm.shp",
 		     "$tests_old_dir/Get_1_outerm/test_get_1_outerm.shx",
 		     "$tests_old_dir/Get_1_outerm/test_get_1_outerm.dbf"],
@@ -115,89 +115,89 @@
 	"title": "Set_max_speed_noise",
 	"required":
 	[
-	    ["$input_dir/2006_01/h_region_1.nc", "h.nc"],
-	    ["$input_dir/2006_01/uv_region_1.nc", "uv.nc"],
-	    "$input_dir/nearby_extr.csv",
+	    ["$input_dir/h_region_1.nc", "h.nc"],
+	    ["$input_dir/uv_region_1.nc", "uv.nc"],
+	    "$input_dir/outside_points.csv",
 	    "$tests_old_dir/Get_1_outerm_noise_2_8/test_get_1_outerm.*"
 	],
 	"input": "&MAIN_NML IND_TARG_EXTR=19,11 /\n"
     },
     {
 	"args": ["$compil_prod_dir/test_set_all_outerm",
-		 "$input_dir/2006_01/h_region_3.nc"],
+		 "$input_dir/h_region_3.nc"],
 	"title": "Set_all_outerm",
 	"input": "0.001\n"
     },
     {
 	"args": "$compil_prod_dir/test_get_snapshot",
 	"title": "Get_snapshot_region_1",
-	"required": [["$input_dir/2006_01/h_region_1.nc", "h.nc"],
-		     ["$input_dir/2006_01/uv_region_1.nc", "uv.nc"]],
+	"required": [["$input_dir/h_region_1.nc", "h.nc"],
+		     ["$input_dir/uv_region_1.nc", "uv.nc"]],
 	"input": "0.\n"
     },
     {
 	"args": "$compil_prod_dir/test_get_snapshot",
 	"title": "Get_snapshot_region_1_noise",
-	"required": [["$input_dir/2006_01/h_region_1.nc", "h.nc"],
-		     ["$input_dir/2006_01/uv_region_1.nc", "uv.nc"]],
+	"required": [["$input_dir/h_region_1.nc", "h.nc"],
+		     ["$input_dir/uv_region_1.nc", "uv.nc"]],
 	"input": "1e-3\n",
 	"description" : "Same as Get_snapshot_region_1 but with non-zero minimal amplitude."
     },
     {
 	"args": "$compil_prod_dir/test_get_snapshot",
 	"title": "Get_snapshot_region_2",
-	"required": [["$input_dir/2006_01/h_region_2.nc", "h.nc"],
-		     ["$input_dir/2006_01/uv_region_2.nc", "uv.nc"]],
+	"required": [["$input_dir/h_region_2.nc", "h.nc"],
+		     ["$input_dir/uv_region_2.nc", "uv.nc"]],
 	"input": "0.\n"
     },
     {
 	"args": "$compil_prod_dir/test_get_snapshot",
 	"title": "Get_snapshot_region_2_noise",
-	"required": [["$input_dir/2006_01/h_region_2.nc", "h.nc"],
-		     ["$input_dir/2006_01/uv_region_2.nc", "uv.nc"]],
+	"required": [["$input_dir/h_region_2.nc", "h.nc"],
+		     ["$input_dir/uv_region_2.nc", "uv.nc"]],
 	"input": "1e-3\n"
     },
     {
 	"args": ["$compil_prod_dir/test_inside_4",
 		 "$input_dir/outermost_eddy_5"],
 	"title": "Inside_4_true",
-	"stdin": "$stdin_dir/inside_4_true_nml.txt"
+	"stdin": "$input_dir/inside_4_true_nml.txt"
     },
     {
 	"args": ["$compil_prod_dir/test_inside_4",
 		 "$input_dir/outermost_eddy_5"],
 	"title": "Inside_4_false",
-	"stdin": "$stdin_dir/inside_4_false_nml.txt"
+	"stdin": "$input_dir/inside_4_false_nml.txt"
     },
     {
 	"args": "$compil_prod_dir/test_get_snapshot",
 	"title": "Get_snapshot_region_3",
-	"required": [["$input_dir/2006_01/h_region_3.nc", "h.nc"],
-		     ["$input_dir/2006_01/uv_region_3.nc", "uv.nc"]],
+	"required": [["$input_dir/h_region_3.nc", "h.nc"],
+		     ["$input_dir/uv_region_3.nc", "uv.nc"]],
 	"input": "0.\n",
 	"description": "Larger region, 120 x 120. Includes degenerate extrema."
     },
     {
 	"args": "$compil_prod_dir/test_get_snapshot",
 	"title": "Get_snapshot_region_3_min",
-	"required": [["$input_dir/2006_01/h_region_3.nc", "h.nc"],
-		     ["$input_dir/2006_01/uv_region_3.nc", "uv.nc"]],
+	"required": [["$input_dir/h_region_3.nc", "h.nc"],
+		     ["$input_dir/uv_region_3.nc", "uv.nc"]],
 	"input": "1e-3\n",
 	"description": "Same as Get_snapshot_region_3 except with 1 mm minimum amplitude."
     },
     {
 	"args": "$compil_prod_dir/test_get_snapshot",
 	"title": "Get_snapshot_region_4",
-	"required": [["$input_dir/2006_01/h_region_4.nc", "h.nc"],
-		     ["$input_dir/2006_01/uv_region_4.nc", "uv.nc"]],
+	"required": [["$input_dir/h_region_4.nc", "h.nc"],
+		     ["$input_dir/uv_region_4.nc", "uv.nc"]],
 	"input": "1e-3\n",
 	"description": "Part of the domain has missing values."
     },
     {
 	"args": "$compil_prod_dir/test_get_snapshot",
 	"title": "Get_snapshot_region_5",
-	"required": [["$input_dir/2006_01/h_region_5.nc", "h.nc"],
-		     ["$input_dir/2006_01/uv_region_5.nc", "uv.nc"]],
+	"required": [["$input_dir/h_region_5.nc", "h.nc"],
+		     ["$input_dir/uv_region_5.nc", "uv.nc"]],
 	"input": "1e-3\n",
 	"description": "Same as Get_snapshot_region_4 with larger domain."
     },
@@ -226,11 +226,11 @@
 	"args": "$compil_prod_dir/test_read_snapshot",
 	"required": ["$input_dir/Test_read_eddy/*"],
 	"title": "Read_snapshot",
-	"stdin": "$stdin_dir/read_snapshot_nml.txt"
+	"stdin": "$input_dir/read_snapshot_nml.txt"
     },
     {
 	"args" : ["$compil_prod_dir/test_local_extrema",
-		  "$input_dir/2006_01/h_region_4.nc"],
+		  "$input_dir/h_region_4.nc"],
 	"title" : "Local_extrema_missing",
 	"description": "test_local_extrema with input file containing missing values."
     },
@@ -268,7 +268,7 @@
 		"outermost_contour_1.shx"
 	    ]
 	],
-	"stdin": "$stdin_dir/successive_overlap_nml.txt"
+	"stdin": "$input_dir/successive_overlap_nml.txt"
     },
     {
 	"args" : "$compil_prod_dir/test_nearby_extr",
diff --git a/get_1_outerm.f b/get_1_outerm.f
index ef8e3c6500b19efdc2ba259d10d3f1e438296a9a..3082da6741b6854e27691e9ce61dd6421e2bc36c 100644
--- a/get_1_outerm.f
+++ b/get_1_outerm.f
@@ -5,7 +5,7 @@ module get_1_outerm_m
 contains
 
   type(ssh_contour) function get_1_outerm(cyclone, coord_extr, &
-       innermost_level, nearby_extr, ssh, corner, step)
+       innermost_level, outside_points, ssh, corner, step)
 
     ! Gets one outermost contour, if it can find one. Method:
     ! dichotomy on level of ssh. If the procedure cannot find an
@@ -27,7 +27,7 @@ contains
     ! in m. By construction, innermost_level < extremum for a maximum,
     ! > extremum for a minimum.
 
-    real, intent(in):: nearby_extr(:, :) ! (2, :) longitude and
+    real, intent(in):: outside_points(:, :) ! (2, :) longitude and
     ! latitude, in rad, of all the significant extrema, except the
     ! target extremum
 
@@ -49,7 +49,7 @@ contains
     !-----------------------------------------------------------------
 
     get_1_outerm%polyline = good_contour(corner, step, ssh, innermost_level, &
-         coord_extr, nearby_extr)
+         coord_extr, outside_points)
 
     if (get_1_outerm%n_points == 0) then
        ! null ssh contour
@@ -62,7 +62,7 @@ contains
        call assert(merge(level_try > level_good, level_try < level_good, &
             cyclone), "get_1_outerm level_try")
        tentative_contour = good_contour(corner, step, ssh, level_try, &
-            coord_extr, nearby_extr)
+            coord_extr, outside_points)
 
        if (tentative_contour%n_points /= 0) then
           get_1_outerm%polyline = tentative_contour
@@ -74,7 +74,7 @@ contains
           do while (abs(level_bad - level_good) > precision)
              level_try = (level_good + level_bad) / 2.
              tentative_contour = good_contour(corner, step, ssh, level_try, &
-                  coord_extr, nearby_extr)
+                  coord_extr, outside_points)
              if (tentative_contour%n_points /= 0) then
                 level_good = level_try
                 get_1_outerm%polyline = tentative_contour
diff --git a/nearby_extr.f b/nearby_extr.f
index 235bae1d5f78c72570a34dfd7f10b13a476124c9..2f2b4a560c47ab261a68fb91ef91633383cee49f 100644
--- a/nearby_extr.f
+++ b/nearby_extr.f
@@ -18,7 +18,10 @@ contains
     ! amplitude: the opposite of the identification number or this
     ! extremum. 0 at other points.
 
-    type(eddy), intent(in):: list_vis(:) ! visible eddies at a given date
+    type(eddy), intent(in):: list_vis(:)
+    ! Visible eddies at a given date. We need components coord_extr
+    ! and cyclone to be defined.
+    
     integer, intent(in):: i ! identifying number of the target extremum
 
     ! Local:
@@ -30,7 +33,9 @@ contains
 
     !--------------------------------------------------------------------------
 
-    selection = abs(pack(extr_map, extr_map > 0 .and. extr_map /= i))
+    selection = pack(extr_map, extr_map /= 0 .and. extr_map /= i)
+    selection = abs(pack(selection, (list_vis(abs(selection))%cyclone &
+         .neqv. list_vis(i)%cyclone) .or. selection > 0))
     n_select = size(selection)
     allocate(nearby_extr(2, n_select))
     forall (l = 1:n_select) &
diff --git a/set_all_outerm.f b/set_all_outerm.f
index 1f4d43f7b03c8176f53a3603e217e6459ca9142a..b7cc3e4b1ea506fc308f207a02724deec3f24649 100644
--- a/set_all_outerm.f
+++ b/set_all_outerm.f
@@ -57,7 +57,7 @@ contains
 
     integer, allocatable:: selection(:)
     ! identifying numbers of a selection of extrema
-    
+
     ! Window around each extremum:
 
     integer, allocatable:: llc(:, :) ! (2, s%number_vis_eddies)
@@ -86,6 +86,7 @@ contains
        s%list_vis(i)%ssh_extr = ssh(s%ind_extr(1, i), s%ind_extr(2, i))
        s%list_vis(i)%cyclone = cyclone(i)
        s%list_vis(i)%interpolated = .false.
+       s%list_vis(i)%suff_amp = .true.
 
        ! Define the geographical window around each eddy extremum:
        llc(:, i) = max(s%ind_extr(:, i) - max_radius, 1)
diff --git a/set_max_speed.f b/set_max_speed.f
index 89f615c2dbf65f79ce0bb6e13d87728308661f34..5a458aff05bdbbb5bb16fab361f25fef00659807 100644
--- a/set_max_speed.f
+++ b/set_max_speed.f
@@ -4,8 +4,8 @@ module set_max_speed_m
 
 contains
 
-  subroutine set_max_speed(e, ind_targ_extr, nearby_extr, ssh, u, v, corner, &
-       step)
+  subroutine set_max_speed(e, ind_targ_extr, outside_points, ssh, u, v, &
+       corner, step)
 
     ! Defines the components speed_cont, max_speed and radius4 of argument e.
 
@@ -28,7 +28,7 @@ contains
 
     integer, intent(in):: ind_targ_extr(:) ! (2) indices of the target extremum
 
-    real, intent(in):: nearby_extr(:, :) ! (2, :) longitude and
+    real, intent(in):: outside_points(:, :) ! (2, :) longitude and
     ! latitude, in rad, of all the extrema except the target extremum
 
     real, intent(in):: ssh(:, :), u(:, :), v(:, :)
@@ -71,7 +71,7 @@ contains
        e%speed_cont%ssh = max_speed_contour_ssh(ssh, u, v, ind_targ_extr, &
             e%radius4)
        e%speed_cont%polyline = good_contour(corner, step, ssh, &
-            e%speed_cont%ssh, e%coord_extr, nearby_extr)
+            e%speed_cont%ssh, e%coord_extr, outside_points)
        e%max_speed = mean_speed(u, v, e%speed_cont%polyline, e%coord_extr, &
             corner, step)