From 8759bf01f40e36f29dd41e24b14dcafb9e78c791 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Fri, 28 Jun 2024 17:13:04 +0200
Subject: [PATCH] Polish

---
 Inst_eddies/get_1_outerm.f90 | 5 +++--
 Inst_eddies/good_contour.f90 | 7 +++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Inst_eddies/get_1_outerm.f90 b/Inst_eddies/get_1_outerm.f90
index b1a61064..f1d18d48 100644
--- a/Inst_eddies/get_1_outerm.f90
+++ b/Inst_eddies/get_1_outerm.f90
@@ -55,8 +55,9 @@ contains
     ! points given by longitude, latitude, in rad
 
     type(ssh_contour), intent(out):: cont_list(:) ! (n_max_cont)
-    ! Contour list. Defined only for subscripts 1:n_cont. If n_cont >=
-    ! 1, the outermost contour is element with subscript n_cont. The
+    ! Contour list, with points given by longitude and latitude, in
+    ! radians. Defined only for subscripts 1:n_cont. If n_cont >= 1,
+    ! the outermost contour is element with subscript n_cont. The
     ! contours are in monotonic order of ssh. For i <= n_cont,
     ! cont_list(i)%area has its default initialization value and the
     ! order of points in cont_list(i)%polyline (clockwise or
diff --git a/Inst_eddies/good_contour.f90 b/Inst_eddies/good_contour.f90
index b0810f88..404d55ef 100644
--- a/Inst_eddies/good_contour.f90
+++ b/Inst_eddies/good_contour.f90
@@ -16,6 +16,13 @@ contains
     ! counter-clockwise) is not specified. The contour is in
     ! projection (x, y) coordinates.
 
+    ! Formally, the return value good_contour obeys:
+
+    ! good_contour%closed and good_contour%n_points >= 4 or
+    ! good_contour == null_polyline
+
+    ! good_contour%closed eqv good_contour%n_points /= 0
+
     ! Libraries:
     use contour_531, only: polyline, find_contours_reg_grid, null_polyline
     use geometry, only: polygon_contains_point
-- 
GitLab