philambda_quadrant Subroutine

private subroutine philambda_quadrant(x, y, z, phi, lambda)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: y
real(kind=wp), intent(in) :: z
real(kind=wp), intent(inout) :: phi
real(kind=wp), intent(inout) :: lambda

Called by

proc~~philambda_quadrant~~CalledByGraph proc~philambda_quadrant geodesy_module::philambda_quadrant proc~cartesian_to_geodetic_triaxial geodesy_module::cartesian_to_geodetic_triaxial proc~cartesian_to_geodetic_triaxial->proc~philambda_quadrant proc~cartesianintogeodetici geodesy_module::CartesianIntoGeodeticI proc~cartesianintogeodetici->proc~philambda_quadrant proc~cartesianintogeodeticii geodesy_module::CartesianIntoGeodeticII proc~cartesianintogeodeticii->proc~philambda_quadrant

Source Code

subroutine philambda_quadrant(x, y, z, phi, lambda)

    real(wp),intent(in) :: x, y, z
    real(wp),intent(inout) :: phi, lambda

    if (z < zero) then
        phi = -phi
    end if

    if (x >= zero) then
        if (y >= zero) then
            lambda = lambda
        else
            lambda = -lambda
        end if
    else
        if (y >= zero) then
            lambda = pi-lambda
        else
            lambda = lambda-pi
        end if
    end if

end subroutine philambda_quadrant