Skip to content
Snippets Groups Projects
Commit 58fa4232 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Rename variable location to ishape

parent baec7360
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment