From 1a39ec4b0eeb7e3b4e31bc402ea849d14a642797 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Fri, 1 Dec 2023 10:58:24 +0100
Subject: [PATCH] Polish

---
 Trajectories/cost_function.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/Trajectories/cost_function.py b/Trajectories/cost_function.py
index 5e4c82b1..6e4000cb 100755
--- a/Trajectories/cost_function.py
+++ b/Trajectories/cost_function.py
@@ -232,12 +232,9 @@ print("Iterating on edges...")
 for edge in g.edges():
     source_node = edge.source()
     target_node = edge.target()
-
     latitude = (pos_last[source_node][1] + pos_first[target_node][1]) / 2
-
-    # Because of the wrapping issue (360° wrapping incorrectly to 0°),
-    # we check for that here:
     lon_diff = abs(pos_last[source_node][0] - pos_first[target_node][0])
+
     if lon_diff > math.radians(300):
         lon_diff = 2 * math.pi - lon_diff
 
@@ -246,7 +243,7 @@ for edge in g.edges():
         + (pos_last[source_node][1] - pos_first[target_node][1]) ** 2
     )
 
-    # Rossbies:
+    # Rossby numbers:
     if first_av_ros[target_node] and last_av_ros[source_node]:
         Delta_Ro = last_av_ros[source_node] - first_av_ros[target_node]
     else:
-- 
GitLab