Index: /LMDZ6/trunk/libf/phylmd/cv30_routines.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cv30_routines.f90	(revision 5274)
+++ /LMDZ6/trunk/libf/phylmd/cv30_routines.f90	(revision 5275)
@@ -1816,10 +1816,9 @@
     mp, rp, up, vp, trap, wt, water, evap, b & ! RomP-jyg
     , wdtraina, wdtrainm) ! 26/08/10  RomP-jyg
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
-
-
   include "cvthermo.h"
   include "cv30param.h"
-  include "cvflag.h"
 
   ! inputs:
@@ -2182,9 +2181,10 @@
     tvp, iflag, precip, vprecip, ft, fr, fu, fv, ftra, upwd, dnwd, dnwd0, ma, &
     mike, tls, tps, qcondc, wd)
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
   include "cvthermo.h"
   include "cv30param.h"
-  include "cvflag.h"
   include "conema3.h"
 
@@ -3082,5 +3082,5 @@
 
   ! fraction deau condensee dans les melanges convertie en precip : epm
-  ! et eau condensée précipitée dans masse d'air saturé : l_m*dM_m/dzdz.dzdz
+  ! et eau condens�e pr�cipit�e dans masse d'air satur� : l_m*dM_m/dzdz.dzdz
   DO j = 1, nam1
     DO k = 1, j - 1
@@ -3277,7 +3277,7 @@
 
         ! On fait varier epmax en fn de la cape
-        ! Il faut donc recalculer ep, et hp qui a déjà été calculé et
-        ! qui en dépend
-        ! Toutes les autres variables fn de ep sont calculées plus bas.
+        ! Il faut donc recalculer ep, et hp qui a d�j� �t� calcul� et
+        ! qui en d�pend
+        ! Toutes les autres variables fn de ep sont calcul�es plus bas.
 
         INCLUDE "cvthermo.h"
Index: /LMDZ6/trunk/libf/phylmd/cv3_routines.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cv3_routines.f90	(revision 5274)
+++ /LMDZ6/trunk/libf/phylmd/cv3_routines.f90	(revision 5275)
@@ -7,4 +7,6 @@
 SUBROUTINE cv3_param(nd, k_upper, delt)
 
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   USE ioipsl_getin_p_mod, ONLY : getin_p
   use mod_phys_lmdz_para
@@ -35,5 +37,4 @@
 
   include "cv3param.h"
-  include "cvflag.h"
   include "conema3.h"
 
@@ -183,5 +184,7 @@
 SUBROUTINE cv3_incrcount(len, nd, delt, sig)
 
-IMPLICIT NONE
+USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
+  IMPLICIT NONE
 
 ! =====================================================================
@@ -190,5 +193,4 @@
 
   include "cv3param.h"
-  include "cvflag.h"
 
 !inputs:
@@ -603,4 +605,6 @@
 SUBROUTINE cv3_undilute1(len, nd, t, qs, gz, plcl, p, icb, tnk, qnk, gznk, &
                          tp, tvp, clw, icbs)
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
@@ -1101,5 +1105,5 @@
 
 !JAM--------------------------------------------------------------------
-! Calcul de la quantité d'eau sous forme de glace
+! Calcul de la quantit� d'eau sous forme de glace
 ! --------------------------------------------------------------------
   INTEGER nl, len
@@ -1135,4 +1139,6 @@
                          frac_a, frac_s, qpreca, qta)
   USE print_control_mod, ONLY: prt_level
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
@@ -1158,5 +1164,4 @@
   include "cv3param.h"
   include "conema3.h"
-  include "cvflag.h"
   include "YOMCST2.h"
 
@@ -2045,4 +2050,6 @@
                        pbase, p, ph, tv, buoy, &
                        sig, w0, cape, m, iflag)
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
@@ -2287,4 +2294,6 @@
                       unk, vnk, hp, tv, tvp, ep, clw, m, sig, &
                       ment, qent, uent, vent, nent, sij, elij, ments, qents, traent)
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
@@ -2296,5 +2305,4 @@
   include "cvthermo.h"
   include "cv3param.h"
-  include "cvflag.h"
 
 !inputs:
@@ -2709,11 +2717,11 @@
                      faci, b, sigd, &
                      wdtrainA, wdtrainS, wdtrainM)                                      ! RomP
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   USE print_control_mod, ONLY: prt_level, lunout
   IMPLICIT NONE
 
-
   include "cvthermo.h"
   include "cv3param.h"
-  include "cvflag.h"
   include "nuage.h"
 
@@ -2782,5 +2790,5 @@
 
 ! =============================
-! --- INITIALIZE OUTPUT ARRAYS 
+! --- INITIALIZE OUTPUT ARRAYS
 ! =============================
 !  (loops up to nl+1)
@@ -2856,5 +2864,5 @@
 
 !
-! Get adiabatic ascent mass flux 
+! Get adiabatic ascent mass flux
 !
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -2915,11 +2923,11 @@
 
 
-    DO il = 1, ncum                                                   
-      IF (i<=inb(il) .AND. lwork(il)) THEN                            
-        wdtrain(il) = grav*ep(il, i)*m(il, i)*clw(il, i)            
+    DO il = 1, ncum
+      IF (i<=inb(il) .AND. lwork(il)) THEN
+        wdtrain(il) = grav*ep(il, i)*m(il, i)*clw(il, i)
         wdtrainS(il, i) = wdtrain(il)/grav                                            !   Ps   jyg
 !!        wdtrainA(il, i) = wdtrain(il)/grav                                          !   Ps   RomP
-      END IF                                                          
-    END DO                                                            
+      END IF
+    END DO
 
     IF (i>1) THEN
@@ -3072,5 +3080,5 @@
 !!---end jyg---
 
-! --------retour à la formulation originale d'Emanuel.
+! --------retour � la formulation originale d'Emanuel.
         IF (cvflag_ice) THEN
 
@@ -3082,7 +3090,7 @@
 
 !JAM  Attention: evap=sigt*E
-!    Modification: evap devient l'évaporation en milieu de couche
-!    car nécessaire dans cv3_yield
-!    Du coup, il faut modifier pas mal d'équations...
+!    Modification: evap devient l'�vaporation en milieu de couche
+!    car n�cessaire dans cv3_yield
+!    Du coup, il faut modifier pas mal d'�quations...
 !    et l'expression de afac qui devient afac1
 !    revap=sqrt((prec(i+1)+prec(i))/2)
@@ -3103,5 +3111,5 @@
 !JYG    Dans sa formulation originale, Emanuel calcule l'evaporation par:
 ! c             evap(il,i)=sigt*afac*revap
-! ce qui n'est pas correct. Dans cv_routines, la formulation a été modifiee.
+! ce qui n'est pas correct. Dans cv_routines, la formulation a �t� modifiee.
 ! Ici,l'evaporation evap est simplement calculee par l'equation de
 ! conservation.
@@ -3162,5 +3170,5 @@
 !           water(il,i)=water(il,i)+fondue(il,i)
 !           ice(il,i)=ice(il,i)-fondue(il,i)
-            
+
 !           if((water(il,i)+ice(il,i)).lt.1.e-30)then
 !             faci(il,i)=0.
@@ -3456,4 +3464,6 @@
     USE print_control_mod, ONLY: lunout, prt_level
     USE add_phys_tend_mod, only : fl_cor_ebil
+    USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
 
   IMPLICIT NONE
@@ -3461,5 +3471,4 @@
   include "cvthermo.h"
   include "cv3param.h"
-  include "cvflag.h"
   include "conema3.h"
 
@@ -3515,5 +3524,5 @@
       REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: qcondc                      ! cld
       REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: qtc, sigt                   ! cld
-      REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: detrain                     ! Louis : pour le calcul de Klein du terme de variance qui dÃ©traine dans lenvironnement
+      REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: detrain                     ! Louis : pour le calcul de Klein du terme de variance qui détraine dans lenvironnement
       REAL, DIMENSION (nloc), INTENT (OUT)               :: wd                          ! gust
       REAL, DIMENSION (nloc), INTENT (OUT)               :: cbmf
@@ -4897,10 +4906,10 @@
         IF  (k<=inb(il) .AND. i<=inb(il) .AND. iflag(il)<=1) THEN   ! cld
           sument(il) =sument(il) + abs(ment(il,k,i))
-          detrain(il,i) = detrain(il,i) + abs(ment(il,k,i))*(qdet(il,k,i) - rr(il,i))*(qdet(il,k,i) - rr(il,i)) ! Louis terme de dÃ©trainement dans le bilan de variance
+          detrain(il,i) = detrain(il,i) + abs(ment(il,k,i))*(qdet(il,k,i) - rr(il,i))*(qdet(il,k,i) - rr(il,i)) ! Louis terme de détrainement dans le bilan de variance
         ENDIF
       ENDDO     ! il
     ENDDO       ! k
 
-! 14/01/15 AJ delta n'a rien à faire là...                                                 
+! 14/01/15 AJ delta n'a rien � faire l�...                                                 
     DO il = 1, ncum                                                  ! cld
 !!      IF (wa(il,i)>0.0 .AND. iflag(il)<=1) &                         ! cld
@@ -4918,5 +4927,5 @@
 
 ! IM cf. FH 
-! 14/01/15 AJ ne correspond pas à ce qui a été codé par JYG et SB           
+! 14/01/15 AJ ne correspond pas � ce qui a �t� cod� par JYG et SB           
                                                          
       IF (iflag_clw==0) THEN                                         ! cld
@@ -4952,4 +4961,6 @@
                       ep, Vprecip, elij, clw, epmlmMm, eplaMm, &
                       icb, inb)
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
@@ -4991,9 +5002,9 @@
 
 ! fraction deau condensee dans les melanges convertie en precip : epm
-! et eau condensée précipitée dans masse d'air saturé : l_m*dM_m/dzdz.dzdz
+! et eau condens�e pr�cipit�e dans masse d'air satur� : l_m*dM_m/dzdz.dzdz
   DO j = 1, nl
     DO k = 1, nl
       DO i = 1, ncum
-        IF (k>=icb(i) .AND. k<=inb(i) .AND. & 
+        IF (k>=icb(i) .AND. k<=inb(i) .AND. &
 !!jyg              j.ge.k.and.j.le.inb(i)) then
 !!jyg             epm(i,j,k)=1.-(1.-ep(i,j))*clw(i,j)/elij(i,k,j)
@@ -5138,15 +5149,16 @@
                  , pbase, p, ph, tv, buoy, sig, w0,iflag &
                  , epmax_diag)
+          USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
         implicit none
 
         ! On fait varier epmax en fn de la cape
-        ! Il faut donc recalculer ep, et hp qui a déjà été calculé et
-        ! qui en dépend
-        ! Toutes les autres variables fn de ep sont calculées plus bas.
+        ! Il faut donc recalculer ep, et hp qui a d�j� �t� calcul� et
+        ! qui en d�pend
+        ! Toutes les autres variables fn de ep sont calcul�es plus bas.
 
   include "cvthermo.h"
-  include "cv3param.h"  
+  include "cv3param.h"
   include "conema3.h"
-  include "cvflag.h"
 
 ! inputs:
@@ -5178,5 +5190,5 @@
 
         ! il faut calculer la cape: on fait un calcule simple car tant qu'on ne
-        ! connait pas ep, on ne connait pas les mélanges, ddfts etc... qui sont
+        ! connait pas ep, on ne connait pas les m�langes, ddfts etc... qui sont
         ! necessaires au calcul de la cape dans la nouvelle physique
         
Index: /LMDZ6/trunk/libf/phylmd/cv3p2_closure.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cv3p2_closure.f90	(revision 5274)
+++ /LMDZ6/trunk/libf/phylmd/cv3p2_closure.f90	(revision 5275)
@@ -18,4 +18,6 @@
   ! **************************************************************
 
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   USE print_control_mod, ONLY: prt_level, lunout
   USE yomcst_mod_h, ONLY: RPI, RCLUM, RHPLA, RKBOL, RNAVO                   &
@@ -35,5 +37,4 @@
   include "cvthermo.h"
   include "cv3param.h"
-  include "cvflag.h"
   include "YOMCST2.h"
 
Index: /LMDZ6/trunk/libf/phylmd/cv3p_mixing.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cv3p_mixing.f90	(revision 5274)
+++ /LMDZ6/trunk/libf/phylmd/cv3p_mixing.f90	(revision 5275)
@@ -13,4 +13,6 @@
 ! **************************************************************
 
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level
   USE ioipsl_getin_p_mod, ONLY: getin_p
@@ -22,5 +24,4 @@
   include "cv3param.h"
   include "YOMCST2.h"
-  include "cvflag.h"
 
 !inputs:
Index: /LMDZ6/trunk/libf/phylmd/cv_driver.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cv_driver.F90	(revision 5274)
+++ /LMDZ6/trunk/libf/phylmd/cv_driver.F90	(revision 5275)
@@ -682,4 +682,6 @@
 SUBROUTINE cv_flag(iflag_ice_thermo)
 
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   USE ioipsl_getin_p_mod, ONLY : getin_p
 
@@ -690,5 +692,4 @@
   INTEGER iflag_ice_thermo
 
-  include "cvflag.h"
 
   ! -- si .TRUE., on rend la gravite plus explicite et eventuellement
Index: DZ6/trunk/libf/phylmd/cvflag.h
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cvflag.h	(revision 5274)
+++ 	(revision )
@@ -1,27 +1,0 @@
-!
-! $Header$
-!
-      logical cvflag_grav
-      logical cvflag_ice
-      logical ok_optim_yield
-      logical ok_entrain
-      logical ok_homo_tend
-      logical ok_convstop
-      logical ok_intermittent
-      logical cvflag_prec_eject
-      logical qsat_depends_on_qt
-      logical adiab_ascent_mass_flux_depends_on_ejectliq
-      logical keepbug_ice_frac
-      integer icvflag_Tpa
-
-      COMMON /cvflag/ icvflag_Tpa, &
-                      cvflag_grav, cvflag_ice, &
-                      ok_optim_yield, &
-                      ok_entrain, &
-                      ok_homo_tend, &
-                      ok_convstop, ok_intermittent, &
-                      cvflag_prec_eject, &
-                      qsat_depends_on_qt, &
-                      adiab_ascent_mass_flux_depends_on_ejectliq, &
-                      keepbug_ice_frac
-!$OMP THREADPRIVATE(/cvflag/)
Index: /LMDZ6/trunk/libf/phylmd/cvflag_mod_h.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cvflag_mod_h.f90	(revision 5275)
+++ /LMDZ6/trunk/libf/phylmd/cvflag_mod_h.f90	(revision 5275)
@@ -0,0 +1,23 @@
+! Replaces cvflag.h
+
+MODULE cvflag_mod_h
+  IMPLICIT NONE; PRIVATE
+  PUBLIC  icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
+
+  LOGICAL cvflag_grav
+  LOGICAL cvflag_ice
+  LOGICAL ok_optim_yield
+  LOGICAL ok_entrain
+  LOGICAL ok_homo_tend
+  LOGICAL ok_convstop
+  LOGICAL ok_intermittent
+  LOGICAL cvflag_prec_eject
+  LOGICAL qsat_depends_on_qt
+  LOGICAL adiab_ascent_mass_flux_depends_on_ejectliq
+  LOGICAL keepbug_ice_frac
+  INTEGER icvflag_Tpa
+
+  !$OMP THREADPRIVATE(icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+  !$OMP      ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac)
+END MODULE cvflag_mod_h
Index: /LMDZ6/trunk/libf/phylmdiso/cv30_routines.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/cv30_routines.F90	(revision 5274)
+++ /LMDZ6/trunk/libf/phylmdiso/cv30_routines.F90	(revision 5275)
@@ -2668,4 +2668,6 @@
 #endif
 
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
@@ -2673,5 +2675,4 @@
   include "cvthermo.h"
   include "cv30param.h"
-  include "cvflag.h"
 
   ! inputs:
@@ -3402,9 +3403,10 @@
 #endif
 
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
   include "cvthermo.h"
   include "cv30param.h"
-  include "cvflag.h"
   include "conema3.h"
 
Index: /LMDZ6/trunk/libf/phylmdiso/cv3_routines.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/cv3_routines.F90	(revision 5274)
+++ /LMDZ6/trunk/libf/phylmdiso/cv3_routines.F90	(revision 5275)
@@ -7,4 +7,6 @@
 SUBROUTINE cv3_param(nd, k_upper, delt)
 
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   USE ioipsl_getin_p_mod, ONLY : getin_p
   use mod_phys_lmdz_para
@@ -36,5 +38,4 @@
 
   include "cv3param.h"
-  include "cvflag.h"
   include "conema3.h"
 
@@ -184,5 +185,7 @@
 SUBROUTINE cv3_incrcount(len, nd, delt, sig)
 
-IMPLICIT NONE
+USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
+  IMPLICIT NONE
 
 ! =====================================================================
@@ -191,5 +194,4 @@
 
   include "cv3param.h"
-  include "cvflag.h"
 
 !inputs:
@@ -1482,4 +1484,6 @@
 #endif
 #endif
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
@@ -1505,5 +1509,4 @@
   include "cv3param.h"
   include "conema3.h"
-  include "cvflag.h"
   include "YOMCST2.h"
 
@@ -2781,4 +2784,6 @@
 #endif
 #endif
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
@@ -2790,5 +2795,4 @@
   include "cvthermo.h"
   include "cv3param.h"
-  include "cvflag.h"
 
 !inputs:
@@ -3608,4 +3612,6 @@
 #endif
 #endif
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
@@ -3613,5 +3619,4 @@
   include "cvthermo.h"
   include "cv3param.h"
-  include "cvflag.h"
   include "nuage.h"
 
@@ -4720,9 +4725,10 @@
 #endif
 #endif
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
   include "cvthermo.h"
   include "cv3param.h"
-  include "cvflag.h"
   include "conema3.h"
 
@@ -7609,5 +7615,7 @@
                  , pbase, p, ph, tv, buoy, sig, w0,iflag &
                  , epmax_diag)
-        implicit none
+        USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
+  implicit none
 
         ! On fait varier epmax en fn de la cape
@@ -7617,7 +7625,6 @@
 
   include "cvthermo.h"
-  include "cv3param.h"  
+  include "cv3param.h"
   include "conema3.h"
-  include "cvflag.h"
 
 ! inputs:
Index: /LMDZ6/trunk/libf/phylmdiso/cv3p_mixing.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/cv3p_mixing.F90	(revision 5274)
+++ /LMDZ6/trunk/libf/phylmdiso/cv3p_mixing.F90	(revision 5275)
@@ -39,4 +39,6 @@
 #endif
 #endif
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   IMPLICIT NONE
 
@@ -44,5 +46,4 @@
   include "cv3param.h"
   include "YOMCST2.h"
-  include "cvflag.h"
 
 !inputs:
Index: /LMDZ6/trunk/libf/phylmdiso/cv_driver.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/cv_driver.F90	(revision 5274)
+++ /LMDZ6/trunk/libf/phylmdiso/cv_driver.F90	(revision 5275)
@@ -1229,4 +1229,6 @@
 SUBROUTINE cv_flag(iflag_ice_thermo)
 
+  USE cvflag_mod_h, ONLY: icvflag_Tpa, cvflag_grav, cvflag_ice, ok_optim_yield, ok_entrain, ok_homo_tend, &
+          ok_convstop, ok_intermittent, cvflag_prec_eject, qsat_depends_on_qt, adiab_ascent_mass_flux_depends_on_ejectliq, keepbug_ice_frac
   USE ioipsl_getin_p_mod, ONLY : getin_p
 
@@ -1249,5 +1251,4 @@
   INTEGER iflag_ice_thermo
 
-  include "cvflag.h"
 
   ! -- si .TRUE., on rend la gravite plus explicite et eventuellement
Index: DZ6/trunk/libf/phylmdiso/cvflag.h
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/cvflag.h	(revision 5274)
+++ 	(revision )
@@ -1,1 +1,0 @@
-link ../phylmd/cvflag.h
Index: /LMDZ6/trunk/libf/phylmdiso/cvflag_mod_h.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/cvflag_mod_h.f90	(revision 5275)
+++ /LMDZ6/trunk/libf/phylmdiso/cvflag_mod_h.f90	(revision 5275)
@@ -0,0 +1,1 @@
+link ../phylmd/cvflag_mod_h.f90
