Ngl.gc_dist
Calculates the distance in degrees along a great circle between two points.
Prototype
dist = Ngl.gc_dist(lat1, lon1, lat2, lon2)
Arguments
lat1, lon1Latitude and longitude of first point on the globe.
lat2, lon2Latitude and longitude of second point on the globe.
Return value
distThe distance along the great circle, in degrees, between the two input points.
Description
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.
See Also
Ngl.gc_convert, Ngl.gc_dist, Ngl.gc_inout, Ngl.gc_interp, Ngl.gc_qarea, Ngl.gc_tarea
Examples
The following:
import Ngl dist = Ngl.gc_dist(0., -90., 0., -110.) print "Great circle distance = " + str(dist) + " degrees"produces:
Great circle distance = 20.0 degrees