RZ Subroutine

public subroutine RZ(psi, r)

Rotate an r-matrix about the z-axis.

Status: vector/matrix support routine.

Notes

  1. Calling this routine with positive PSI incorporates in the supplied r-matrix R an additional rotation, about the z-axis, anticlockwise as seen looking towards the origin from positive z.

  2. The additional rotation can be represented by this matrix:

         (  + cos(PSI)   + sin(PSI)     0  )
         (                                 )
         (  - sin(PSI)   + cos(PSI)     0  )
         (                                 )
         (       0            0         1  )

History

  • IAU SOFA revision: 2012 April 3

Arguments

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

angle (radians)

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

r-matrix, rotated


Called by

proc~~rz~~CalledByGraph proc~rz RZ proc~c2ixys C2IXYS proc~c2ixys->proc~rz proc~c2teqx C2TEQX proc~c2teqx->proc~rz proc~numat NUMAT proc~numat->proc~rz proc~bp00 BP00 proc~bp00->proc~rz proc~fw2m FW2M proc~fw2m->proc~rz proc~pom00 POM00 proc~pom00->proc~rz proc~c2tcio C2TCIO proc~c2tcio->proc~rz proc~pb06 PB06 proc~pb06->proc~rz proc~pmat06 PMAT06 proc~pb06->proc~pmat06 proc~pmat76 PMAT76 proc~pmat76->proc~rz proc~c2i06a C2I06A proc~c2i06a->proc~c2ixys proc~pnm06a PNM06A proc~c2i06a->proc~pnm06a proc~pn00 PN00 proc~pn00->proc~numat proc~pn00->proc~bp00 proc~pnm80 PNM80 proc~pnm80->proc~pmat76 proc~nutm80 NUTM80 proc~pnm80->proc~nutm80 proc~apco APCO proc~apco->proc~c2ixys proc~pvtob PVTOB proc~apco->proc~pvtob proc~pvtob->proc~pom00 proc~c2tpe C2TPE proc~c2tpe->proc~c2teqx proc~c2tpe->proc~pom00 proc~c2tpe->proc~pn00 proc~c2ixy C2IXY proc~c2ixy->proc~c2ixys proc~fw2xy FW2XY proc~fw2xy->proc~fw2m proc~nutm80->proc~numat proc~pnm06a->proc~fw2m proc~pn06 PN06 proc~pn06->proc~fw2m proc~pmat06->proc~fw2m proc~apci APCI proc~apci->proc~c2ixys proc~num06a NUM06A proc~num06a->proc~numat proc~pmat00 PMAT00 proc~pmat00->proc~bp00 proc~c2t00b C2T00B proc~c2t00b->proc~pom00 proc~c2t00b->proc~c2tcio proc~c2i00b C2I00B proc~c2t00b->proc~c2i00b proc~c2tceo C2TCEO proc~c2tceo->proc~c2tcio proc~bp06 BP06 proc~bp06->proc~fw2m proc~bp06->proc~pmat06 proc~c2t00a C2T00A proc~c2t00a->proc~pom00 proc~c2t00a->proc~c2tcio proc~c2i00a C2I00A proc~c2t00a->proc~c2i00a proc~c2txy C2TXY proc~c2txy->proc~pom00 proc~c2txy->proc~c2tcio proc~c2txy->proc~c2ixy proc~c2t06a C2T06A proc~c2t06a->proc~pom00 proc~c2t06a->proc~c2tcio proc~c2t06a->proc~c2i06a proc~pn00a PN00A proc~pn00a->proc~pn00 proc~c2ibpn C2IBPN proc~c2ibpn->proc~c2ixy proc~apio APIO proc~apio->proc~pvtob proc~apco13 APCO13 proc~apco13->proc~apco proc~apco13->proc~pnm06a proc~gst06a GST06A proc~gst06a->proc~pnm06a proc~s06a S06A proc~s06a->proc~pnm06a proc~xys06a XYS06A proc~xys06a->proc~pnm06a proc~pn06a PN06A proc~pn06a->proc~pn06 proc~pn00b PN00B proc~pn00b->proc~pn00 proc~apci13 APCI13 proc~apci13->proc~pnm06a proc~apci13->proc~apci proc~eo06a EO06A proc~eo06a->proc~pnm06a proc~ecm06 ECM06 proc~ecm06->proc~pmat06 proc~num00a NUM00A proc~num00a->proc~pn00a proc~atco13 ATCO13 proc~atco13->proc~apco13 proc~atci13 ATCI13 proc~atci13->proc~apci13 proc~atic13 ATIC13 proc~atic13->proc~apci13 proc~eceq06 ECEQ06 proc~eceq06->proc~ecm06 proc~pnm00a PNM00A proc~pnm00a->proc~pn00a proc~c2i00b->proc~c2ibpn proc~pnm00b PNM00B proc~c2i00b->proc~pnm00b proc~apio13 APIO13 proc~apio13->proc~apio proc~c2i00a->proc~c2ibpn proc~c2i00a->proc~pnm00a proc~atoc13 ATOC13 proc~atoc13->proc~apco13 proc~ee06a EE06A proc~ee06a->proc~gst06a proc~pnm00b->proc~pn00b proc~num00b NUM00B proc~num00b->proc~pn00b proc~eqec06 EQEC06 proc~eqec06->proc~ecm06 proc~atoi13 ATOI13 proc~atoi13->proc~apio13 proc~xys00a XYS00A proc~xys00a->proc~pnm00a proc~atio13 ATIO13 proc~atio13->proc~apio13 proc~s00a S00A proc~s00a->proc~pnm00a proc~s00b S00B proc~s00b->proc~pnm00b proc~xys00b XYS00B proc~xys00b->proc~pnm00b

Contents

Source Code

RZ

Source Code

    subroutine RZ ( psi, r )

    implicit none

    real(wp),intent(in) :: psi !! angle (radians)
    real(wp),dimension(3,3),intent(out) :: r !! r-matrix, rotated

    real(wp) :: s, c, a11, a12, a13, a21, a22, a23

    s = sin(psi)
    c = cos(psi)

    a11 =   c*r(1,1) + s*r(2,1)
    a12 =   c*r(1,2) + s*r(2,2)
    a13 =   c*r(1,3) + s*r(2,3)
    a21 = - s*r(1,1) + c*r(2,1)
    a22 = - s*r(1,2) + c*r(2,2)
    a23 = - s*r(1,3) + c*r(2,3)

    r(1,1) = a11
    r(1,2) = a12
    r(1,3) = a13
    r(2,1) = a21
    r(2,2) = a22
    r(2,3) = a23

    end subroutine RZ