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

Create function `date_eddy_to_node`

parent 109dc020
No related branches found
No related tags found
No related merge requests found
......@@ -18,3 +18,10 @@ def node_to_date_eddy(node_index, e_overestim, d_init):
return {"eddy_index": node_index - k * e_overestim, "date_index": k,
"days_1950": d,
"date": datetime.date(1950, 1, 1) + datetime.timedelta(d)}
def date_eddy_to_node(d, eddy_index, e_overestim, d_init):
"""Convert from eddy identification in shapefiles to node
identification in graph.
"""
return (d- d_init) * e_overestim + eddy_index
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