 MODULE comturb

!!======================================================================
!!                   ***  MODULE comturb  ***
!!
!!======================================================================





























































!! * Modules used
   USE parameters

   IMPLICIT NONE

!! * Shared or public module variables
   REAL(kind=rsh) :: mturb,pturb,nturb,c1turb,c2turb,c3pturb,c3mturb,cmu
   REAL(kind=rsh) :: sigmaect,sigmapsi,ectmin,psimin,epsmin,fwall
   REAL(kind=rsh),DIMENSION(:,:,:),ALLOCATABLE:: eps
   REAL(kind=rsh) :: gamma
   REAL(kind=rsh) :: emin   ! turbkl_gasp
   LOGICAL        :: l_bc_turb ! if true then the BC in the psi equation will be in flux form
! if false the BC is in Dirichlet form

! Stability functions
   REAL(kind=rsh) :: sf_d0, sf_d1, sf_d2, sf_d3, sf_d4, sf_d5
   REAL(kind=rsh) :: sf_n0, sf_n1, sf_n2, sf_nb0, sf_nb1, sf_nb2
   REAL(kind=rsh) :: alpha_n_min
   REAL(kind=rsh) :: lim_am0,lim_am1,lim_am2,lim_am3,lim_am4,lim_am5,lim_am6

 CONTAINS

!!======================================================================

  SUBROUTINE alloc_comturb

!&E---------------------------------------------------------------------
!&E                 ***  ROUTINE alloc_comturb  ***
!&E
!&E---------------------------------------------------------------------
!! * Modules used

!!----------------------------------------------------------------------
!! * Executable part

   IF (ALLOCATED(eps)) PRINT*,"error: comturb allocated"
   ALLOCATE(eps(kmax,limin:limax,ljmin:ljmax) )

  END SUBROUTINE alloc_comturb

!!======================================================================

  SUBROUTINE dealloc_comturb

!&E---------------------------------------------------------------------
!&E                 ***  ROUTINE dealloc_comturb  ***
!&E
!&E---------------------------------------------------------------------
!! * Modules used

!!----------------------------------------------------------------------
!! * Executable part

   DEALLOCATE(eps)

  END SUBROUTINE dealloc_comturb

 END MODULE comturb
