Index: LMDZ6/trunk/libf/phylmd/cv3p_mixing.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/cv3p_mixing.f90	(revision 5696)
+++ LMDZ6/trunk/libf/phylmd/cv3p_mixing.f90	(revision 5697)
@@ -4,4 +4,7 @@
 CONTAINS
 
+SUBROUTINE cv3p_mixing_pre
+
+END SUBROUTINE cv3p_mixing_pre
 
 SUBROUTINE cv3p_mixing(nloc, ncum, nd, na, ntra, icb, nk, inb, &
@@ -19,5 +22,5 @@
 ! **************************************************************
 
-USE yomcst2_mod_h
+USE yomcst2_mod_h, ONLY : Fmax, gammas, scut, qqa1, qqa2 
    USE lmdz_cv_ini, ONLY : cpd,cpv,minorig,nl,rrv
   USE cvflag_mod_h
@@ -87,5 +90,9 @@
 
   REAL Qcoef1, Qcoef2, QFF, QFFF, Qmix, Rmix, Qmix1, Rmix1, Qmix2, Rmix2, F
-
+  REAL :: Qcoef1max,Qcoef2max  !ym WARNING
+                               !ym redefine local variable instead use module variable
+                               !ym to check when refactoring deep convection
+                               !ym => eliminate "first" SAVE variable 
+                               !ym probably all these folowing lines will be removed
   Qcoef1(F) = tanh(F/gammas)
   Qcoef2(F) = (tanh(F/gammas)+gammas*log(cosh((1.-F)/gammas)/cosh(F/gammas)))
@@ -99,7 +106,4 @@
   Rmix(F) = qqa1*Rmix1(F) + qqa2*Rmix2(F)
 
-  INTEGER, SAVE :: ifrst
-  DATA ifrst/0/
-!$OMP THREADPRIVATE(ifrst)
 
 
@@ -108,16 +112,6 @@
 ! =====================================================================
 
-! -- Initialize mixing PDF coefficients
-  IF (ifrst==0) THEN
-    ifrst = 1
-    Qcoef1max = Qcoef1(Fmax)
-    Qcoef2max = Qcoef2(Fmax)
-!<jyg
-   print*, 'fmax, gammas, qqa1, qqa2, Qcoef1max, Qcoef2max ', &
-            fmax, gammas, qqa1, qqa2, Qcoef1max, Qcoef2max
-!>jyg
-!
-  END IF
-
+  Qcoef1max = Qcoef1(Fmax)
+  Qcoef2max = Qcoef2(Fmax)
 
 ! ori        do 360 i=1,ncum*nlp
