 MODULE comstatic

!!======================================================================
!!                   ***  MODULE comstatic  ***
!!
!!  2010-05 (F. Vandermeirsch) New arrays for interpolation of velocities and ssh
!!  2010-11 (F. Dumas, S. Theetten) management of child ranks with coarser resolution (imxx,jmxx)
!!
!!======================================================================
!! * Modules used
   USE parameters

!! * Shared or public module variables
   INTEGER, parameter :: imxx=1000,jmxx=1000
   REAL(kind=rsh),DIMENSION(nmarmax) :: omegat

!real(kind=rsh),dimension(:),pointer   :: coefficient
   REAL(kind=rsh),DIMENSION(:),ALLOCATABLE :: coefficient

!cvalinusitereal                         :: somdem
   REAL(kind=rsh),DIMENSION(36) :: cg
   REAL(kind=rsh),DIMENSION(71) :: cofi

   INTEGER                                   :: kobc,kcl
   INTEGER         ,DIMENSION(:),ALLOCATABLE :: ilbc,jlbc
   INTEGER         ,DIMENSION(:),ALLOCATABLE :: iclac,jclac
   REAL(kind=rsh)  ,DIMENSION(:),ALLOCATABLE :: xclac,yclac
!   REAL(kind=riosh),DIMENSION(:),ALLOCATABLE :: xe1,xe2
   REAL(kind=rlg)                            :: tclim1,tclim2

   INTEGER                                   :: mx,my,idh,jhh
   REAL(kind=riosh),DIMENSION(imin:imxx)     :: xe1_n,xe2_n,hlim_n
   REAL(kind=riosh),DIMENSION(imin:imxx,1:2) :: v1_n,v2_n,v1_s,v2_s
   REAL(kind=riosh),DIMENSION(imin:imxx)     :: u1_n,u2_n,u1_s,u2_s,xlim
   REAL(kind=riosh),DIMENSION(imin:imxx)     :: xe1_s,xe2_s,hlim_s
   REAL(kind=riosh),DIMENSION(jmin:jmxx)     :: v1_w,v2_w,v1_e,v2_e,ylim
   REAL(kind=riosh),DIMENSION(1:2,jmin:jmxx) :: u1_w,u2_w,u1_e,u2_e
   REAL(kind=riosh),DIMENSION(jmin:jmxx)     :: xe1_e,xe2_e,hlim_e
   REAL(kind=riosh),DIMENSION(jmin:jmxx)     :: xe1_w,xe2_w,hlim_w
   REAL(kind=riolg)                          :: t1,t2
   REAL(kind=riosh),DIMENSION(imin:imxx)     :: ulim_n,ulim_s
   REAL(kind=riosh),DIMENSION(jmin:jmxx)     :: vlim_e,vlim_w
   REAL(kind=riosh),DIMENSION(1:2,jmin:jmxx) :: ulim_e,ulim_w
   REAL(kind=riosh),DIMENSION(imin:imxx,1:2) :: vlim_n,vlim_s

   REAL(kind=riolg)                          :: st1,st2
   REAL(kind=riosh),DIMENSION(imin:imxx)     :: sxe1_n,sxe2_n
   REAL(kind=riosh),DIMENSION(imin:imxx,1:2) :: sv1_n,sv2_n,sv1_s,sv2_s
   REAL(kind=riosh),DIMENSION(imin:imxx)     :: su1_n,su2_n,su1_s,su2_s
   REAL(kind=riosh),DIMENSION(imin:imxx)     :: sxe1_s,sxe2_s
   REAL(kind=riosh),DIMENSION(jmin:jmxx)     :: sv1_w,sv2_w,sv1_e,sv2_e
   REAL(kind=riosh),DIMENSION(1:2,jmin:jmxx) :: su1_w,su2_w,su1_e,su2_e
   REAL(kind=riosh),DIMENSION(jmin:jmxx)     :: sxe1_e,sxe2_e
   REAL(kind=riosh),DIMENSION(jmin:jmxx)     :: sxe1_w,sxe2_w

 END MODULE comstatic
