!-------------------------------------- LICENCE BEGIN ------------------------------------
!Environment Canada - Atmospheric Science and Technology License/Disclaimer,
!                     version 3; Last Modified: May 7, 2008.
!This is free but copyrighted software; you can use/redistribute/modify it under the terms
!of the Environment Canada - Atmospheric Science and Technology License/Disclaimer
!version 3 or (at your option) any later version that should be found at:
!http://collaboration.cmc.ec.gc.ca/science/rpn.comm/license.html
!
!This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
!without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!See the above mentioned License/Disclaimer for more details.
!You should have received a copy of the License/Disclaimer along with this software;
!if not, you can write to: EC-RPN COMM Group, 2121 TransCanada, suite 500, Dorval (Quebec),
!CANADA, H9P 1J3; or send e-mail to service.rpn@ec.gc.ca
!-------------------------------------- LICENCE END --------------------------------------
!

      subroutine suroto 1,1
#if defined (DOC) 
!
!**** suroto -  Precomputation of trigonometric factors for efficient wind-rotation at obs location.
!
!     Initialization of comroto
!
!     Modifications.
!     --------------
*Author : L. Fillion ARMA/MSC 25 Feb 05.
*Revision:
!
#endif
!
      IMPLICIT NONE
      integer kulout
#include "taglam4d.cdk"
#include "comcst.cdk"
#include "comdim.cdk"
#include "comdimo.cdk"
#include "comlun.cdk"
#include "comgrd_param.cdk"
#include "comgrd.cdk"
#include "comroto.cdk"
#include "comoahdr.cdk"
#include "comoba.cdk"
#include "comoabdy.cdk"
!
      integer j1,j2,jobs
      real zlat4rot_deg,zlon4rot_deg,zlat4_deg,zlon4_deg
      real*8 zlatr,zlonr,zlonob,zlatob
      real*8 zro(3,3),zri(3,3)
!
!!
      WRITE(nulout,FMT='(/,'' suroto- Precomputations for Fast Wind Rotation'')')
!
      do j1=1,3
        do j2=1,3
          zro(j1,j2)=Grd_rot_8(j1,j2)
          zri(j1,j2)=Grd_rot_8(j2,j1)
        enddo
      enddo
!
      do jobs = 1, nobtot
        zlonob = ROBHDR(NCMLON,JOBS)  ! radians  single to double precision
        zlatob = ROBHDR(NCMLAT,JOBS)  ! radians  ...
        zlon4_deg = rrad2deg * zlonob
        zlat4_deg = rrad2deg * zlatob
!
        call ll2ll(zlat4rot_deg,zlon4rot_deg,zlat4_deg,zlon4_deg,zro,1,1)
        zlatr = rdeg2rad*zlat4rot_deg
        zlonr = rdeg2rad*zlon4rot_deg
        rcoslatr(jobs)= cos(zlatr)
        rsinlatr(jobs)= sin(zlatr)
        rcoslonr(jobs)= cos(zlonr)
        rsinlonr(jobs)= sin(zlonr)
        rcoslonob(jobs)= cos(zlonob)
        rsinlonob(jobs)= sin(zlonob)
        rrsinlatob(jobs)= 1.0/sin(zlatob)
      enddo
!
      return
      end