S2P Subroutine

public subroutine S2P(theta, phi, r, p)

Convert spherical polar coordinates to p-vector.

Status: vector/matrix support routine.

History

  • IAU SOFA revision: 2006 November 13

Arguments

TypeIntentOptionalAttributesName
real(kind=wp), intent(in) :: theta

longitude angle (radians)

real(kind=wp), intent(in) :: phi

latitude angle (radians)

real(kind=wp), intent(in) :: r

radial distance

real(kind=wp), intent(out), dimension(3):: p

Cartesian coordinates


Calls

proc~~s2p~~CallsGraph proc~s2p S2P proc~s2c S2C proc~s2p->proc~s2c proc~sxp SXP proc~s2p->proc~sxp

Contents

Source Code

S2P

Source Code

    subroutine S2P ( theta, phi, r, p )

    implicit none

    real(wp),intent(in) :: theta !! longitude angle (radians)
    real(wp),intent(in) :: phi !! latitude angle (radians)
    real(wp),intent(in) :: r !! radial distance
    real(wp),dimension(3),intent(out) :: p !! Cartesian coordinates

    real(wp) :: u(3)

    call S2C ( theta, phi, u )
    call SXP ( r, u, p )

    end subroutine S2P