greatcircle module

Module pyroms/pyroms/extern/greatcircle.py copied from [HHT+21].

class gridtools.grids.greatcircle.GreatCircle(rmajor, rminor, lon1, lat1, lon2, lat2)

Bases: object

formula for perfect sphere from Ed Williams’ ‘Aviation Formulary’ (http://williams.best.vwh.net/avform.htm)

code for ellipsoid posted to GMT mailing list by Jim Leven in Dec 1999

Contact: Jeff Whitaker <jeffrey.s.whitaker@noaa.gov>

points(npoints)

compute arrays of npoints equally spaced intermediate points along the great circle.

input parameter npoints is the number of points to compute.

Returns lons, lats (lists with longitudes and latitudes of intermediate points in degrees).

For example npoints=10 will return arrays lons,lats of 10 equally spaced points along the great circle.

gridtools.grids.greatcircle.vinc_dist(f, a, phi1, lembda1, phi2, lembda2)

Returns the distance between two geographic points on the ellipsoid and the forward and reverse azimuths between these points. lats, longs and azimuths are in radians, distance in metres

Returns ( s, alpha12, alpha21 ) as a tuple

gridtools.grids.greatcircle.vinc_pt(f, a, phi1, lembda1, alpha12, s)

Returns the lat and long of projected point and reverse azimuth given a reference point and a distance and azimuth to project. lats, longs and azimuths are passed in decimal degrees

Returns ( phi2, lambda2, alpha21 ) as a tuple