!!======================================================================
 
  SUBROUTINE init_uv(u,v,uz,vz)
 
!&E---------------------------------------------------------------------
!&E                 ***  ROUTINE init_uv  ***
!&E
!&E ** Purpose : initialize barotropic velocities :
!&E              u : zonal component
!&E              v : meridional component
!&E
!&E ** Description :
!&E
!&E ** Called by : main
!&E
!&E ** External calls :
!&E
!&E ** Used ij-arrays : uz, vz
!&E
!&E ** Modified variables : u, v
!&E
!&E ** Reference :
!&E
!&E ** History :
!&E       ! 2004-08-17  last modifications
!&E
!&E---------------------------------------------------------------------





























































!! * Modules used
   USE parameters
   USE comvars2d, ONLY : hex,hey
   USE comvars3d

   USE toolmpi,       ONLY : ex_i_rsh,ex_j_rsh

   IMPLICIT NONE

!! * Arguments
   REAL(kind=rsh),DIMENSION(kmax,liminm2:limaxp2,ljminm2:ljmaxp2),INTENT(in ) :: uz,vz
   REAL(kind=rsh),DIMENSION(     liminm2:limaxp2,ljminm2:ljmaxp2),INTENT(out) :: u,v

!! * Local declarations
   INTEGER :: i,j
!!----------------------------------------------------------------------
!! * Executable part

!$OMP parallel do schedule(static) private(i,j)
   DO j=ljmin,ljmax
     DO i=limin,limax

       u(i,j)=SUM(dsigu(:)*uz(:,i,j))
       v(i,j)=SUM(dsigu(:)*vz(:,i,j))

     END DO
   END DO
!$OMP end parallel do

   CALL ex_i_rsh(-2,2,1,liminm2,limaxp2,ljminm2,ljmaxp2,u(liminm2:limaxp2,ljminm2:ljmaxp2))
   CALL ex_j_rsh(-2,2,1,liminm2,limaxp2,ljminm2,ljmaxp2,u(liminm2:limaxp2,ljminm2:ljmaxp2))
   CALL ex_i_rsh(-2,2,1,liminm2,limaxp2,ljminm2,ljmaxp2,v(liminm2:limaxp2,ljminm2:ljmaxp2))
   CALL ex_j_rsh(-2,2,1,liminm2,limaxp2,ljminm2,ljmaxp2,v(liminm2:limaxp2,ljminm2:ljmaxp2))

   END SUBROUTINE init_uv
