From 58fa4232ca1458c8d96519e47a30b06d25e88a3f Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Tue, 26 Apr 2022 12:39:41 +0200
Subject: [PATCH] Rename variable location to ishape

---
 cost_function.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cost_function.py b/cost_function.py
index fd8d8579..29f8a37b 100755
--- a/cost_function.py
+++ b/cost_function.py
@@ -45,17 +45,17 @@ def calculate_radii_rossby(list_eddies, e_overestim, handlers, array_d_init):
     for n in list_eddies:
         date_index, eddy_index = report_graph.node_to_date_eddy(n, e_overestim)
         i_SHPC = get_SHPC(array_d_init, date_index)
-        location = util_eddies.comp_ishape(handlers[i_SHPC], date_index,
-                                           eddy_index)
+        ishape = util_eddies.comp_ishape(handlers[i_SHPC], date_index,
+                                         eddy_index)
 
         # now that we have the location in the shapefiles, we need to
         # get the radius and the rossby number
-        shapeRec = handlers[i_SHPC]["readers"]["extremum"].shapeRecord(location)
+        shapeRec = handlers[i_SHPC]["readers"]["extremum"].shapeRecord(ishape)
         lat_in_deg = shapeRec.shape.points[0][1] # in degrees
         f = 2 * Omega * math.sin(math.radians(lat_in_deg)) # in s-1
         V_max = shapeRec.record[4] # in m/s
         R_Vmax = handlers[i_SHPC]["readers"]["max_speed_contour"]\
-            .record(location)['r_eq_area'] * 1000 # in m
+            .record(ishape)['r_eq_area'] * 1000 # in m
 
         if (V_max < 100):
             rossby += V_max / (f * R_Vmax)
-- 
GitLab