MODULE lmdz_cv_ini

  !------------------------------------------------------------
  ! Parameters for convectL, iflag_con=3:
  ! (includes - microphysical parameters,
  !            - parameters that control the rate of approach
  !               to quasi-equilibrium)
  !            - noff & minorig (previously in input of convect1)
  !------------------------------------------------------------
  IMPLICIT NONE; PRIVATE
  PUBLIC sigdz, spfac, pbcrit, ptcrit, elcrit, tlcrit, coef_peel, omtrain, dtovsh, dpbase, &
          dttrig, dtcrit, tau, beta, alpha, alpha1, T_top_max, tau_stop, noconv_stop, wbmax, &
          delta, betad, ejectliq, ejectice, flag_wb, flag_epKEorig, cv_flag_feed, noff, minorig, &
          nl, nlp, nlm
  PUBLIC cpd, cpv, cl, ci, rrv, rrd, lv0, lf0, g, rowl, t0, clmcpv, clmcpd, cpdmcp, cpvmcpd, cpvmcl,  &
          clmci, eps, epsi, epsim1, ginv, hrd, grav, keep_bug_indices_cv3_tracer, restore_bug_cvdn



  ! provenant de cvparam
  PUBLIC entp, sigs,sigd, omtsnow,coeffr, coeffs, dtmax, cu, damp


  INTEGER flag_epKEorig
  REAL flag_wb
  INTEGER cv_flag_feed
  INTEGER noff, minorig, nl, nlp, nlm
  REAL sigdz, spfac
  REAL pbcrit, ptcrit
  REAL elcrit, tlcrit
  REAL coef_peel
  REAL omtrain
  REAL dtovsh, dpbase, dttrig
  REAL dtcrit, tau, beta, alpha, alpha1
  REAL T_top_max
  REAL tau_stop, noconv_stop
  REAL wbmax
  REAL delta
  REAL betad
  REAL ejectliq
  REAL ejectice

  !$OMP THREADPRIVATE(sigdz, spfac, pbcrit, ptcrit, elcrit, tlcrit, coef_peel, omtrain, dtovsh, dpbase, &
  !$OMP      dttrig, dtcrit, tau, beta, alpha, alpha1, T_top_max, tau_stop, noconv_stop, wbmax, &
  !$OMP      delta, betad, ejectliq, ejectice, flag_wb, flag_epKEorig, cv_flag_feed, noff, minorig, &
  !$OMP      nl, nlp, nlm)

  ! Thermodynamical constants for convectL:
  REAL cpd, cpv, cl, ci, rrv, rrd, lv0, lf0, g, rowl, t0
  REAL clmcpv, clmcpd, cpdmcp, cpvmcpd, cpvmcl, clmci
  REAL eps, epsi, epsim1
  REAL ginv, hrd
  REAL grav

  !$OMP THREADPRIVATE(cpd, cpv, cl, ci, rrv, rrd, lv0, lf0, g, rowl, t0, clmcpv, clmcpd, cpdmcp, cpvmcpd, cpvmcl  &
  !$OMP      , clmci, eps, epsi, epsim1, ginv, hrd, grav)

  ! provenant de cvparam
  real entp
  real sigs, sigd
  real omtsnow, coeffr, coeffs
  real dtmax
  real cu
  real damp

  ! provenant de cvparam
  !$OMP THREADPRIVATE( entp &
  !$OMP          , sigs, sigd &
  !$OMP          , omtsnow, coeffr, coeffs &
  !$OMP          , dtmax, cu, damp)

LOGICAL keep_bug_indices_cv3_tracer,restore_bug_cvdn
 !$OMP THREADPRIVATE( keep_bug_indices_cv3_tracer,restore_bug_cvdn)

END MODULE lmdz_cv_ini
