Calculates the distance in degrees along a great circle between two points.
dist = Ngl.gc_dist(lat1, lon1, lat2, lon2)
Latitude and longitude of first point on the globe.lat2, lon2
Latitude and longitude of second point on the globe.
The distance along the great circle, in degrees, between the two input points.
This function calculates the distance in degrees along a great circle between two points on the globe. The arguments lat1 and lon1 specify the latitude and longitude of the first point on the globe; the arguments lat2 and lon2 specify the latitude and longitude of the second point on the globe. The returned distance is always a positive number. If you want the returned distance expressed in some other units, use Ngl.gc_convert.
import Ngl dist = Ngl.gc_dist(0., -90., 0., -110.) print "Great circle distance = " + str(dist) + " degrees"produces:
Great circle distance = 20.0 degrees