mpas_tools.viz.transects.subdivide_great_circle¶
- 
mpas_tools.viz.transects.subdivide_great_circle(x, y, z, maxRes, earthRadius)[source]¶
- Subdivide each segment of the transect so the horizontal resolution approximately matches the requested resolution - Uses a formula for interpolating unit vectors on the sphere from https://en.wikipedia.org/wiki/Slerp - Parameters
- x, y, z (numpy.array) – The Cartesian coordinates of a transect, where the number of segments is - len(x) - 1.- x,- yand- zare of the same length.
- maxRes (float) – The maximum allowed spacing in m after subdivision 
- earthRadius (float) – The radius of the Earth in m 
 
- Returns
- xOut, yOut, zOut (numpy.array) – The transect subdivided into segments with segment length at most - maxRes. All the points in- x,- yand- zare guaranteed to be included.
- dIn (numpy.array) – The distance along the transect before subdivision 
- dOut (numpy.array) – The distance along the transect after subdivision