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

Bug fix: correct sign of variation of Rossby number and radius

Bug fix: correct sign of variation of Rossby number and radius. We
have to be consistent with the computation of `delta_ro_mean` and
`delta_r_mean`. `delta_ro_mean` and `delta_r_mean` were computed by
subtracting origin from tail.
parent 1a39ec4b
No related branches found
No related tags found
No related merge requests found
......@@ -245,13 +245,13 @@ for edge in g.edges():
# Rossby numbers:
if first_av_ros[target_node] and last_av_ros[source_node]:
Delta_Ro = last_av_ros[source_node] - first_av_ros[target_node]
Delta_Ro = first_av_ros[target_node] - last_av_ros[source_node]
else:
# At least one of the rossbies is invalid.
Delta_Ro = 0
# R_Vmax 1 and 2 already exist, just get the delta
Delta_R_Vmax = last_av_rad[source_node] - first_av_rad[target_node]
Delta_R_Vmax = first_av_rad[target_node] - last_av_rad[source_node]
# Calculate the cost and assign to the edge:
g.ep.cost_function[edge] = math.sqrt(
......
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