dist_sphere (pyleoclim.utils.mapping.dist_sphere)

pyleoclim.utils.mapping.dist_sphere(lat1, lon1, lat2, lon2)[source]

Uses the harversine formula to calculate distance on a sphere

Parameters
  • lat1 (float) – Latitude of the first point, in radians

  • lon1 (float) – Longitude of the first point, in radians

  • lat2 (float) – Latitude of the second point, in radians

  • lon2 (float) – Longitude of the second point, in radians

Returns

dist – The distance between the two point in km

Return type

float