diff --git a/gt_segmented_cf.py b/gt_segmented_cf.py index 4a383ed8372043ada121876640b4075eec3b42cc..af8ec3c256c9028ac574aaac31449c2c2e116f30 100755 --- a/gt_segmented_cf.py +++ b/gt_segmented_cf.py @@ -101,11 +101,7 @@ print(t1 - t0, "s") g.set_fast_edge_removal() -################################## -# Calculating the Cost Function: # -################################## - -# setup the dicts for the shapefiles and the ishape_last files +# Set up the dictionarys for the shapefiles and the ishape_last files: shp_tr_dir = input('Directory containing %Y/SHPC_(anti|cyclo): ') handlers = {} @@ -150,7 +146,8 @@ for yr in range(1993, 2019): last = report_graph.node_to_date_eddy(segment[-1], e_overestim) last_days = last['date_index'] - last_date = datetime.date(1950,1,1) + datetime.timedelta(last['date_index']) + last_date = datetime.date(1950, 1, 1) \ + + datetime.timedelta(last['date_index']) last_year = last_date.year # calculate the location in the shapefile