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

Rename key `SHP_triplet` to `SHP_coll`

Preparing for a fourth shapefile containing centers.
parent 1431d67b
No related branches found
No related tags found
No related merge requests found
......@@ -90,24 +90,24 @@ else:
final_date = my_date
factories = [dict(writers = {}, cell_name = "Anticyclonic_Cell",
cyclone = False, SHP_triplet = "Snapshot_anti"),
cyclone = False, SHP_coll = "Snapshot_anti"),
dict(writers = {}, cell_name = "Cyclonic_Cell", cyclone = True,
SHP_triplet = "Snapshot_cyclo")]
SHP_coll = "Snapshot_cyclo")]
for f in factories:
file = path.join(f["SHP_triplet"], "extremum")
file = path.join(f["SHP_coll"], "extremum")
f["writers"]["extr"] = shapefile.Writer(file, shapeType = shapefile.POINT)
file = path.join(f["SHP_triplet"], "outermost_contour")
file = path.join(f["SHP_coll"], "outermost_contour")
f["writers"]["outer"] = shapefile.Writer(file,
shapeType = shapefile.POLYGON)
file = path.join(f["SHP_triplet"], "max_speed_contour")
file = path.join(f["SHP_coll"], "max_speed_contour")
f["writers"]["max_speed"] = shapefile.Writer(file,
shapeType = shapefile.POLYGON)
define_fields(f["writers"])
file = path.join(f["SHP_triplet"], "ishape_last.txt")
file = path.join(f["SHP_coll"], "ishape_last.txt")
f["writers"]["ishape_last"] = open(file, "w")
while my_date <= final_date:
......@@ -134,5 +134,5 @@ nml["grid_nml"] = dict(corner_deg = [matlab_data["X"][0], matlab_data["Y"][0]],
nlat = matlab_data["Y"].size)
for f in factories:
nml.write(path.join(f["SHP_triplet"], "grid_nml.txt"), force = True)
nml.write(path.join(f["SHP_coll"], "grid_nml.txt"), force = True)
for k, v in f["writers"].items(): v.close()
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