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

Polish

parent 442ce79b
No related branches found
No related tags found
No related merge requests found
......@@ -44,9 +44,13 @@ def define_fields(writers):
writers["max_speed"].field("eddy_index", "N", 5)
def write(writers, cell, cyclone):
"""writers is a dictionary. cell is a numpy.ndarray with shape (number
of eddies, 21). cyclone is a boolean. The eddy identification
numbers start at 1 and increment by 1 for each eddy in cell.
"""Write to shapefiles eddies with a given orientation, at a given
date.
writers is a dictionary. cell is a numpy.ndarray with shape
(number of eddies, 21). cyclone is a boolean. The eddy
identification numbers start at 1 and increment by 1 for each eddy
in cell.
"""
eddy_index = 0
......@@ -115,6 +119,7 @@ if len(sys.argv) == 3:
else:
final_date = my_date
# There are two factories, one for cyclones and one for anticyclones:
factories = [dict(writers = {}, cell_name = "Anticyclonic_Cell",
cyclone = False, SHPC = "SHPC_anti"),
dict(writers = {}, cell_name = "Cyclonic_Cell", cyclone = True,
......@@ -141,6 +146,7 @@ for f in factories:
f["writers"]["ishape_last"] = open(file, "w")
# Loop on dates:
while True:
if os.access(adt_file, os.R_OK):
print("Processing", my_date, "...")
......
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