clouddrift.sphere.tangentplane_to_cartesian

clouddrift.sphere.tangentplane_to_cartesian#

clouddrift.sphere.tangentplane_to_cartesian(up: float | ndarray, vp: float | ndarray, longitude: float | ndarray, latitude: float | ndarray) Tuple[float] | Tuple[ndarray][source]#

Return the three-dimensional Cartesian components of a vector contained in a plane tangent to a spherical Earth.

The Cartesian coordinate system is a right-handed system whose origin lies at the center of a sphere. It is oriented with the Z-axis passing through the north pole at lat = 90, the X-axis passing through the point lon = 0, lat = 0, and the Y-axis passing through the point lon = 90, lat = 0.

Parameters#

up: float or np.ndarray

First component of vector on tangent plane (positive eastward).

vp: float or np.ndarray

Second component of vector on tangent plane (positive northward).

longitudefloat or np.ndarray

Longitude in degrees of tangent point of plane.

latitudefloat or np.ndarray

Latitude in degrees of tangent point of plane.

Returns#

ufloat or np.ndarray

First component of Cartesian vector.

vfloat or np.ndarray

Second component of Cartesian vector.

wfloat or np.ndarray

Third component of Cartesian vector.

Examples#

>>> u, v, w = tangentplane_to_cartesian(1, 1, 45, 90)

Notes#

This function is inverted by cartesian_to_tangetplane().

See Also#

cartesian_to_tangentplane()