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

Assume the Earth is a sphere

It does not make sense here to assume an ellipsoid: the computation of
the distance with $\cos \phi \delta \lambda$ and $\delta \phi$ is a
rougher approximation than treating the Earth as a sphere.
parent 7df063e0
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@ import graph_tool
import util_eddies
Omega = 2 * math.pi / 86164.0
r_Earth = 6371 # radius of the Earth, in km
def calculate_radii_rossby(properties):
......@@ -240,10 +241,9 @@ for edge in g.edges():
if lon_diff > math.radians(300):
lon_diff = 2 * math.pi - lon_diff
Delta_Cent = math.sqrt(
(lon_diff * 6378.166175 * math.cos(latitude)) ** 2
+ ((pos_last[source_node][1] - pos_first[target_node][1]) * 6335.423523)
** 2
Delta_Cent = r_Earth * math.sqrt(
(lon_diff * math.cos(latitude)) ** 2
+ (pos_last[source_node][1] - pos_first[target_node][1]) ** 2
)
# Rossbies:
......
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