diff --git a/Convert_Matlab/inst_eddies_v6.py b/Convert_Matlab/inst_eddies_v6.py index 5857b835a9257716af6166bc051ab66ef5e1a66b..4fad994aa78986892e5df70c36a2b1e0873ece7a 100755 --- a/Convert_Matlab/inst_eddies_v6.py +++ b/Convert_Matlab/inst_eddies_v6.py @@ -116,28 +116,28 @@ else: final_date = my_date factories = [dict(writers = {}, cell_name = "Anticyclonic_Cell", - cyclone = False, SHP_coll = "SHPC_anti"), + cyclone = False, SHPC = "SHPC_anti"), dict(writers = {}, cell_name = "Cyclonic_Cell", cyclone = True, - SHP_coll = "SHPC_cyclo")] + SHPC = "SHPC_cyclo")] for f in factories: - file = path.join(f["SHP_coll"], "extremum") + file = path.join(f["SHPC"], "extremum") f["writers"]["extr"] = shapefile.Writer(file, shapeType = shapefile.POINT) - file = path.join(f["SHP_coll"], "centroid") + file = path.join(f["SHPC"], "centroid") f["writers"]["centroid"] = shapefile.Writer(file, shapeType = shapefile.POINT) - file = path.join(f["SHP_coll"], "outermost_contour") + file = path.join(f["SHPC"], "outermost_contour") f["writers"]["outer"] = shapefile.Writer(file, shapeType = shapefile.POLYGON) - file = path.join(f["SHP_coll"], "max_speed_contour") + file = path.join(f["SHPC"], "max_speed_contour") f["writers"]["max_speed"] = shapefile.Writer(file, shapeType = shapefile.POLYGON) define_fields(f["writers"]) - file = path.join(f["SHP_coll"], "ishape_last.txt") + file = path.join(f["SHPC"], "ishape_last.txt") f["writers"]["ishape_last"] = open(file, "w") @@ -179,6 +179,6 @@ nml["grid_nml"] = dict(corner_deg = [matlab_data["X"][0], matlab_data["Y"][0]], matlab_data["Y"][1] - matlab_data["Y"][0]]) for f in factories: - file = path.join(f["SHP_coll"], "grid_nml.txt") + file = path.join(f["SHPC"], "grid_nml.txt") nml.write(file, force = True) for k, v in f["writers"].items(): v.close() diff --git a/Inst_eddies/Analysis/distribution_function.py b/Inst_eddies/Analysis/distribution_function.py index bb384fb77cbe674e3c153d6776f67e8d611051a6..3908e1c074260a11b9b45e6a9ca1dafa476279d6 100755 --- a/Inst_eddies/Analysis/distribution_function.py +++ b/Inst_eddies/Analysis/distribution_function.py @@ -130,7 +130,10 @@ def plot_all(dict_list, label = None): if __name__ == "__main__": import sys - if len(sys.argv) != 2: sys.exit("Required argument: directory") + if len(sys.argv) != 2: + sys.exit("Required argument: directory containing collection of " + "shapefiles") + d = read(sys.argv[1]) plot_all([d]) plt.show() diff --git a/Inst_eddies/config.f90 b/Inst_eddies/config.f90 index 7a2e63b3312fd1acecebee29145ac0c145106fe3..9cb8351bcb200a01d55f369942de18aed668f211 100644 --- a/Inst_eddies/config.f90 +++ b/Inst_eddies/config.f90 @@ -24,7 +24,7 @@ contains !---------------------------------------------------------------------- write(unit = error_unit, nml = main_nml) - write(unit = error_unit, fmt = *) "Enter namelist main_nml." + write(unit = error_unit, fmt = *) "config: Enter namelist main_nml." read(unit = *, nml = main_nml) call write_nml(shp_tr_dir = "SHPC_cyclo") call write_nml(shp_tr_dir = "SHPC_anti") @@ -54,9 +54,9 @@ contains ! (This also allows us to verify that the directory shp_tr_dir exists.) if (iostat /= 0) then - write(unit = error_unit, fmt = *) trim(iomsg) - write(unit = error_unit, fmt = *) 'Have you created the directory "', & - shp_tr_dir, '"?' + write(unit = error_unit, fmt = *) "write_nml: ", trim(iomsg) + write(unit = error_unit, fmt = *) 'write_nml: ', & + 'Have you created the directory "', shp_tr_dir, '"?' stop 1 end if diff --git a/Inst_eddies/inst_eddies.f90 b/Inst_eddies/inst_eddies.f90 index c4416e49d2f27d0a9648c19230d2d825bf9682d4..3799a74b0651bdeb69774056710bb9acb838657c 100644 --- a/Inst_eddies/inst_eddies.f90 +++ b/Inst_eddies/inst_eddies.f90 @@ -104,7 +104,7 @@ program inst_eddies ! As we are requiring the grid spacing to be uniform, the value of ! "periodic" may be deduced from the values of step(1) and nlon: periodic = nint(twopi / step(1)) == nlon - print *, "periodic = ", periodic + print *, "inst_eddies: periodic = ", periodic call assert(2 * max_radius_deg(1) < 180., "inst_eddies max_radius_deg") ! (Let us require this even if not periodic. This is clearer.) @@ -194,7 +194,8 @@ program inst_eddies CALL shp_tr_close(hshp_cyclo) CALL shp_tr_close(hshp_anti) - print *, 'Created shapefile collections in SHPC_cyclo and SHPC_anti.' + print *, 'inst_eddies: Created shapefile collections in SHPC_cyclo and ', & + 'SHPC_anti.' call write_aux(corner_deg, step_deg, nlon, nlat, n_cyclo, & shp_tr_dir = "SHPC_cyclo") call write_aux(corner_deg, step_deg, nlon, nlat, n_anti, & diff --git a/Inst_eddies/inst_eddies_in.py b/Inst_eddies/inst_eddies_in.py index 262a256a3a9b00bcbcae6e57b9318d6bece2cdc9..217176ba14e65d01b6491d52f02a823613a1066e 100755 --- a/Inst_eddies/inst_eddies_in.py +++ b/Inst_eddies/inst_eddies_in.py @@ -45,7 +45,7 @@ else: last_date = my_date while True: - print("Date:", my_date) + print("inst_eddies.py: Date:", my_date) if os.access(nc_file, os.F_OK): if args.bbox: @@ -69,7 +69,7 @@ while True: os.remove("h.nc") os.remove("uv.nc") else: - print("Missing file:", nc_file) + print("inst_eddies.py: Missing file:", nc_file) for orient in ["cyclo", "anti"]: if os.access(f"SHPC_{orient}_all_dates", os.F_OK):