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

Polish

parent ecf6347e
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@ import numpy as np
import sys
def comp_ishape(handler, date, eddy_index):
"""handler should be a dictionary returned by open_shpc."""
k = date - handler["d_init"]
if k == 0:
......
......@@ -107,9 +107,7 @@ delta_r_std = 8.6953 * 1000
orientation = input("Enter orientation (anti or cyclo): ")
##########################
# load the edgelist file #
##########################
# Load the graph_tool file:
t0 = time.perf_counter()
......@@ -126,10 +124,6 @@ g.set_fast_edge_removal()
# Calculating the Cost Function: #
##################################
#######################
# Load the shapefiles #
#######################
# setup the dicts for the shapefiles and the ishape_last files
extremum = {}
max_speed = {}
......@@ -163,11 +157,10 @@ for yr in range(1993, 2019):
first_days = first['date_index']
# get year
first_date = datetime.date(1950,1,1) + datetime.timedelta(first['date_index'])
first_date = datetime.date(1950, 1, 1) \
+ datetime.timedelta(first['date_index'])
first_year = first_date.year
#print(f'Segment size: {len(segment)}, first: {first_year}, last: {last_year}, yr: {yr}')
# chech if we are in the current year
if (first_year == yr):
......@@ -184,8 +177,6 @@ for yr in range(1993, 2019):
last_date = datetime.date(1950,1,1) + datetime.timedelta(last['date_index'])
last_year = last_date.year
print(f'Segment size: {len(segment)}, first: {first_year}, last: {last_year}, yr: {yr}')
# calculate the location in the shapefile
d_init_1 = extremum[first_year].record(0)[1]
......
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