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

Do not test validity of eddies

Since we now only write valid eddies to shapefiles.
parent 3f629c54
No related branches found
No related tags found
No related merge requests found
......@@ -54,18 +54,16 @@ def set_attribute(G, SHPC):
G.graph["e_overestim"])
ishape = SHPC.comp_ishape(date_index, eddy_index, 0)
shape_rec = reader.shapeRecord(ishape)
if shape_rec.record.valid == 1:
G.add_node(n, coordinates = tuple(shape_rec.shape.points[0]),
speed = shape_rec.record.speed,
ssh = shape_rec.record.ssh)
G.add_node(n, coordinates = tuple(shape_rec.shape.points[0]),
speed = shape_rec.record.speed,
ssh = shape_rec.record.ssh)
else:
for shape_rec in reader:
n = date_eddy_to_node(shape_rec.record.date,
shape_rec.record.eddy_index,
G.graph["e_overestim"])
if shape_rec.record.valid == 1 and n in G:
if n in G:
G.add_node(n, coordinates = tuple(shape_rec.shape.points[0]),
speed = shape_rec.record.speed,
ssh = shape_rec.record.ssh)
......
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