diff --git a/Convert_Matlab/inst_eddies_v6.py b/Convert_Matlab/inst_eddies_v6.py index f3b80e1bf80ca8f8e94e9d7c67156253ff5b22f9..1a35e8c75d7ca83219fbbb3647edf3bbc52fa7d3 100755 --- a/Convert_Matlab/inst_eddies_v6.py +++ b/Convert_Matlab/inst_eddies_v6.py @@ -23,6 +23,9 @@ def define_fields(writers): writers["extr"].field("eddy_index", "N", 5) writers["extr"].field("speed", "N", 13, 6) + writers["center"].field("date_index", "N", 5) + writers["center"].field("eddy_index", "N", 5) + writers["outer"].field("r_eq_area", "N", 10, 4) writers["outer"].field("ssh", "N", 13, 6) writers["outer"].field("date_index", "N", 5) @@ -61,6 +64,10 @@ def write(writers, cell, cyclone): else: ssh = matlab_data["ADT"][i, j] - eddy[7] + writers["center"].point(eddy[2], eddy[3]) + writers["center"].record(date_index = date_index, + eddy_index = eddy_index) + writers["outer"].record(r_eq_area = eddy[6], ssh = ssh, date_index = date_index, eddy_index = eddy_index) @@ -98,6 +105,9 @@ for f in factories: file = path.join(f["SHP_coll"], "extremum") f["writers"]["extr"] = shapefile.Writer(file, shapeType = shapefile.POINT) + file = path.join(f["SHP_coll"], "center") + f["writers"]["center"] = shapefile.Writer(file, shapeType = shapefile.POINT) + file = path.join(f["SHP_coll"], "outermost_contour") f["writers"]["outer"] = shapefile.Writer(file, shapeType = shapefile.POLYGON)