dm_transform_cartesian_to_polar Subroutine

public pure elemental subroutine dm_transform_cartesian_to_polar(x, y, z, hz, v, r)

Transforms cartesian coordinates to polar (spherical) coordinates.

Arguments

Type IntentOptional Attributes Name
real(kind=r8), intent(in) :: x

X coordinate.

real(kind=r8), intent(in) :: y

Y coordinate.

real(kind=r8), intent(in) :: z

Z coordinate.

real(kind=r8), intent(out) :: hz

Horizontal angle (phi) [rad].

real(kind=r8), intent(out) :: v

Vertical angle (omega) [rad].

real(kind=r8), intent(out) :: r

Radius.