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

Polish

parent a3f06018
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ import graph_tool
import util_eddies
Omega = 2 * math.pi / 86164.0
Omega = 2 * math.pi / 86164.0 # in s-1
r_Earth = 6371 # radius of the Earth, in km
......@@ -55,8 +55,10 @@ def calculate_radii_rossby(properties):
avg_rad += radius # in m
avg_rad /= len(properties)
if n_valid_Rossby != 0:
avg_Rossby /= n_valid_Rossby
return avg_rad, avg_Rossby
......@@ -109,13 +111,13 @@ parser.add_argument("SHPC_dir")
parser.add_argument("orientation", choices=["Anticyclones", "Cyclones"])
parser.add_argument(
"input_segments",
help="input graph of segments without "
"cost, suffix .gt (graph-tool) or .graphml",
help="input graph of segments without cost, suffix .gt (graph-tool) or "
".graphml",
)
parser.add_argument(
"output_segments",
help="output graph of segments with "
"cost, suffix .gt (graph-tool) or .graphml",
help="output graph of segments with cost, suffix .gt (graph-tool) or "
".graphml",
)
parser.add_argument(
"--debug", help="save properties to output file", action="store_true"
......@@ -124,11 +126,11 @@ args = parser.parse_args()
# Set some values needed for the cost function:
delta_cent_mean = 3.8481 # in km
delta_cent_std = 8.0388
delta_cent_std = 8.0388 # in km
delta_ro_mean = -0.0025965
delta_ro_std = 5.2168
delta_r_mean = -9.4709 # in m
delta_r_std = 8.6953e3
delta_r_std = 8.6953e3 # in m
# Load the graph_tool file:
......
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