Index: LMDZ6/trunk/libf/phylmd/cloudth_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/cloudth_mod.F90	(revision 4377)
+++ LMDZ6/trunk/libf/phylmd/cloudth_mod.F90	(revision 4380)
@@ -1538,5 +1538,5 @@
 
 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-SUBROUTINE cloudth_mpc(klon,klev,ind2,mpc_bl_points,                        &
+SUBROUTINE cloudth_mpc(klon,klev,ind2,iflag_mpc_bl,mpc_bl_points,           &
 &           temp,ztv,po,zqta,fraca,zpspsk,paprs,pplay,ztla,zthl,            &
 &           ratqs,zqs,snowflux,qcloud,qincloud,icefrac,ctot,ctot_vol)
@@ -1586,4 +1586,6 @@
       REAL, DIMENSION(klon),      INTENT(IN)      ::  zqs           ! Saturation specific humidity in the mesh [kg/kg]
       REAL, DIMENSION(klon,klev+1), INTENT(IN)    ::  snowflux      ! snow flux at the interface of the layer [kg/m2/s]
+      INTEGER,                      INTENT(IN)    ::  iflag_mpc_bl  ! option flag for mpc boundary layer clouds param.
+
 
       INTEGER, DIMENSION(klon,klev), INTENT(INOUT) :: mpc_bl_points  ! grid points with convective (thermals) mixed phase clouds
Index: LMDZ6/trunk/libf/phylmd/conf_phys_m.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/conf_phys_m.F90	(revision 4377)
+++ LMDZ6/trunk/libf/phylmd/conf_phys_m.F90	(revision 4380)
@@ -185,5 +185,5 @@
     REAL,SAVE :: t_glace_min_omp, t_glace_max_omp
     REAL,SAVE :: exposant_glace_omp
-    INTEGER,SAVE :: iflag_gammasat_omp, iflag_mpc_bl_omp
+    INTEGER,SAVE :: iflag_gammasat_omp
     REAL,SAVE :: rei_min_omp, rei_max_omp
     INTEGER,SAVE :: iflag_sic_omp, iflag_inertie_omp
@@ -255,5 +255,4 @@
     LOGICAL, SAVE :: ok_new_lscp_omp
     LOGICAL, SAVE :: ok_icefra_lscp_omp
-    LOGICAL, SAVE :: ok_radliq_snow_omp
 
 
@@ -1429,15 +1428,4 @@
 
     !
-    !Config Key  = iflag_mpc_bl
-    !Config Desc =
-    !Config Def  = 0
-    !Config Help =
-    !
-    iflag_mpc_bl_omp=0
-    CALL getin('iflag_mpc_bl',iflag_mpc_bl_omp)
-
-
-
-    !
     !Config Key  = iflag_t_glace
     !Config Desc =  
@@ -2352,12 +2340,4 @@
     !Config Help = ...
 
-
-    ok_radliq_snow_omp = .FALSE.
-    CALL getin('ok_radliq_snow', ok_radliq_snow_omp)
-    !
-    !Config Key  = ok_radliq_snow_omp
-    !Config Desc = take into account snowfall for radiation
-    !Config Def  = .FALSE.
-    !Config Help = ...
 
     ecrit_LES_omp = 1./8.
@@ -2478,5 +2458,4 @@
     exposant_glace = exposant_glace_omp
     iflag_gammasat=iflag_gammasat_omp
-    iflag_mpc_bl=iflag_mpc_bl_omp
     iflag_t_glace = iflag_t_glace_omp
     iflag_cloudth_vert=iflag_cloudth_vert_omp
@@ -2688,5 +2667,4 @@
     ok_new_lscp = ok_new_lscp_omp
     ok_icefra_lscp=ok_icefra_lscp_omp
-    ok_radliq_snow=ok_radliq_snow_omp
     read_fco2_ocean_cor = read_fco2_ocean_cor_omp
     var_fco2_ocean_cor = var_fco2_ocean_cor_omp
@@ -2911,5 +2889,4 @@
     WRITE(lunout,*) ' exposant_glace = ',exposant_glace
     WRITE(lunout,*) ' iflag_gammasat = ',iflag_gammasat
-    WRITE(lunout,*) ' iflag_mpc_bl = ',iflag_mpc_bl
     WRITE(lunout,*) ' iflag_t_glace = ',iflag_t_glace
     WRITE(lunout,*) ' iflag_cloudth_vert = ',iflag_cloudth_vert
@@ -3030,5 +3007,4 @@
     WRITE(lunout,*) ' ok_new_lscp = ', ok_new_lscp
     WRITE(lunout,*) ' ok_icefra_lscp = ', ok_icefra_lscp
-    WRITE(lunout,*) ' ok_radliq_snow = ', ok_radliq_snow
     WRITE(lunout,*) ' read_climoz = ', read_climoz
     WRITE(lunout,*) ' carbon_cycle_tr = ', carbon_cycle_tr
Index: LMDZ6/trunk/libf/phylmd/fisrtilp.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/fisrtilp.F90	(revision 4377)
+++ LMDZ6/trunk/libf/phylmd/fisrtilp.F90	(revision 4380)
@@ -89,7 +89,7 @@
   ! Coeffients de fraction lessivee : pour OFF-LINE
   !
-  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_nucl
-  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_1nucl
-  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_impa
+  REAL, DIMENSION(klon,klev),      INTENT(INOUT)  :: pfrac_nucl
+  REAL, DIMENSION(klon,klev),      INTENT(INOUT)  :: pfrac_1nucl
+  REAL, DIMENSION(klon,klev),      INTENT(INOUT)  :: pfrac_impa
   !
   ! Fraction d'aerosols lessivee par impaction et par nucleation
Index: LMDZ6/trunk/libf/phylmd/lscp_ini_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/lscp_ini_mod.F90	(revision 4380)
+++ LMDZ6/trunk/libf/phylmd/lscp_ini_mod.F90	(revision 4380)
@@ -0,0 +1,85 @@
+module lscp_ini_mod
+
+implicit none
+
+  ! PARAMETERS for lscp:
+  !--------------------
+  
+  REAL, SAVE :: seuil_neb=0.001                 ! cloud fraction threshold: a cloud really exists when exceeded
+  !$OMP THREADPRIVATE(seuil_neb)
+
+  INTEGER, SAVE :: ninter=5                     ! number of iterations to calculate autoconversion to precipitation
+  !$OMP THREADPRIVATE(ninter)
+
+  INTEGER,SAVE :: iflag_evap_prec=1             ! precipitation evaporation flag. 0: nothing, 1: "old way", 
+                                                ! 2: Max cloud fraction above to calculate the max of reevaporation
+                                                ! 4: LTP'method i.e. evaporation in the clear-sky fraction of the mesh only
+  !$OMP THREADPRIVATE(iflag_evap_prec)
+
+  REAL t_coup                                   ! temperature threshold which determines the phase 
+  PARAMETER (t_coup=234.0)                      ! for which the saturation vapor pressure is calculated
+
+  REAL DDT0                                     ! iteration parameter 
+  PARAMETER (DDT0=.01)
+
+  REAL ztfondue                                 ! parameter to calculate melting fraction of precipitation
+  PARAMETER (ztfondue=278.15)
+
+  REAL, SAVE    :: rain_int_min=0.001           ! Minimum local rain intensity [mm/s] before the decrease in associated precipitation fraction 
+  !$OMP THREADPRIVATE(rain_int_min)
+
+  REAL, SAVE :: a_tr_sca(4)                     ! Variables for tracers temporary: alpha parameter for scavenging, 4 possible scavenging processes
+  !$OMP THREADPRIVATE(a_tr_sca)
+  
+  INTEGER, SAVE ::  iflag_mpc_bl=0              ! flag to activate boundary layer mixed phase cloud param
+  !$OMP THREADPRIVATE(iflag_mpc_bl)
+  
+  LOGICAL, SAVE :: ok_radliq_snow=.false.       ! take into account the mass of ice precip in the cloud ice content seen by radiation
+  !$OMP THREADPRIVATE(ok_radliq_snow)
+
+
+CONTAINS
+
+SUBROUTINE lscp_ini(dtime,ok_ice_sursat)
+
+
+   USE ioipsl_getin_p_mod, ONLY : getin_p
+   USE print_control_mod, ONLY: prt_level, lunout
+   USE ice_sursat_mod, ONLY: ice_sursat_init
+
+   REAL, INTENT(IN)      :: dtime
+   LOGICAL, INTENT(IN)   :: ok_ice_sursat  
+
+    CALL getin_p('ninter',ninter)
+    CALL getin_p('iflag_evap_prec',iflag_evap_prec)
+    CALL getin_p('seuil_neb',seuil_neb)
+    CALL getin_p('rain_int_min',rain_int_min) 
+    CALL getin_p('iflag_mpc_bl',iflag_mpc_bl)
+    CALL getin_p('ok_radliq_snow',ok_radliq_snow)         
+    WRITE(lunout,*) 'lscp, ninter:', ninter
+    WRITE(lunout,*) 'lscp, iflag_evap_prec:', iflag_evap_prec
+    WRITE(lunout,*) 'lscp, seuil_neb:', seuil_neb
+    WRITE(lunout,*) 'lscp, rain_int_min:', rain_int_min
+    WRITE(lunout,*) 'lscp, iflag_mpc_bl:', iflag_mpc_bl
+    WRITE(lunout,*) 'lscp, ok_radliq_snow:', ok_radliq_snow
+    
+    ! check for precipitation sub-time steps
+    IF (ABS(dtime/REAL(ninter)-360.0).GT.0.001) THEN
+        WRITE(lunout,*) 'lscp: it is not expected, see Z.X.Li', dtime
+        WRITE(lunout,*) 'I would prefer a 6 min sub-timestep'
+    ENDIF
+
+
+    !AA Temporary initialisation
+    a_tr_sca(1) = -0.5
+    a_tr_sca(2) = -0.5
+    a_tr_sca(3) = -0.5
+    a_tr_sca(4) = -0.5
+    
+    IF (ok_ice_sursat) CALL ice_sursat_init()
+
+
+
+end subroutine lscp_ini
+
+end module lscp_ini_mod
Index: LMDZ6/trunk/libf/phylmd/lscp_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/lscp_mod.F90	(revision 4377)
+++ LMDZ6/trunk/libf/phylmd/lscp_mod.F90	(revision 4380)
@@ -1,3 +1,3 @@
-MODULE LSCP_mod
+MODULE lscp_mod
 
 IMPLICIT NONE
@@ -6,13 +6,14 @@
 
 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-SUBROUTINE LSCP(dtime,missing_val,                      &
+SUBROUTINE lscp(klon,klev,dtime,missing_val,            &
      paprs,pplay,t,q,ptconv,ratqs,                      &
-     d_t, d_q, d_ql, d_qi, rneb, rneb_seri,             &
+     d_t, d_q, d_ql, d_qi, rneb, rneblsvol, rneb_seri,  &
      radliq, radicefrac, rain, snow,                    &
-     pfrac_impa, pfrac_nucl, pfrac_1nucl,               &
      frac_impa, frac_nucl, beta,                        &
      prfl, psfl, rhcl, zqta, fraca,                     &
      ztv, zpspsk, ztla, zthl, iflag_cld_th,             &
-     iflag_ice_thermo, ok_ice_sursat)
+     iflag_ice_thermo, ok_ice_sursat, qsatl, qsats,     &
+     qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss,   &
+     Tcontr, qcontr, qcontr2, fcontrN, fcontrP)
 
 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -28,5 +29,5 @@
 ! and 'ilp' (il pleut, L. Li)
 !
-! Compared to fisrtilp, LSCP 
+! Compared to the original fisrtilp code, lscp
 ! -> assumes thermcep = .TRUE. all the time (fisrtilp inconsistent when .FALSE.)
 ! -> consider always precipitation thermalisation (fl_cor_ebil>0)
@@ -76,7 +77,4 @@
 !   cldliq(physiq)=radliq(fisrt)=lwcon(nc)+iwcon(nc)
 !
-! Physics/Dynamics:
-! ql_seri(physiq)+qs_seri(physiq)=ocond(nc)
-!
 ! Notetheless, be aware of:
 !
@@ -87,26 +85,21 @@
 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 !
-USE dimphy
 USE print_control_mod, ONLY: prt_level, lunout
-USE cloudth_mod 
-USE ioipsl_getin_p_mod, ONLY : getin_p
-USE phys_local_var_mod, ONLY: ql_seri,qs_seri
-USE phys_local_var_mod, ONLY: rneblsvol
-USE lscp_tools_mod, ONLY : CALC_QSAT_ECMWF, ICEFRAC_LSCP, CALC_GAMMASAT, FALLICE_VELOCITY
-USE ice_sursat_mod
-!--ice supersaturation
-USE phys_local_var_mod, ONLY: zqsats, zqsatl
-USE phys_local_var_mod, ONLY: qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss
-USE phys_local_var_mod, ONLY: Tcontr, qcontr, qcontr2, fcontrN, fcontrP
+USE cloudth_mod, ONLY : cloudth, cloudth_v3, cloudth_v6, cloudth_mpc 
+USE lscp_tools_mod, ONLY : calc_qsat_ecmwf, icefrac_lscp, calc_gammasat, fallice_velocity
+USE ice_sursat_mod, ONLY : ice_sursat
+
+USE lscp_ini_mod, ONLY : seuil_neb, ninter, iflag_evap_prec, t_coup, DDT0, ztfondue, rain_int_min
+USE lscp_ini_mod, ONLY : iflag_mpc_bl, ok_radliq_snow, a_tr_sca
+
 
 IMPLICIT NONE
 
 !===============================================================================
-! VARIABLE DECLARATION
+! VARIABLES DECLARATION
 !===============================================================================
 
 include "YOMCST.h"
 include "YOETHF.h"
-include "FCTTRE.h"
 include "fisrtilp.h"
 include "nuage.h" 
@@ -115,11 +108,12 @@
 !-----------------
 
+  INTEGER,                         INTENT(IN)   :: klon,klev       ! number of horizontal grid points and vertical levels
   REAL,                            INTENT(IN)   :: dtime           ! time step [s]
-  REAL, INTENT(IN)                              :: missing_val     ! missing value for output
+  REAL,                            INTENT(IN)   :: missing_val     ! missing value for output
 
   REAL, DIMENSION(klon,klev+1),    INTENT(IN)   :: paprs           ! inter-layer pressure [Pa]
   REAL, DIMENSION(klon,klev),      INTENT(IN)   :: pplay           ! mid-layer pressure [Pa]
   REAL, DIMENSION(klon,klev),      INTENT(IN)   :: t               ! temperature (K)
-  REAL, DIMENSION(klon,klev),      INTENT(IN)   :: q               ! specific humidity [kg/kg]
+  REAL, DIMENSION(klon,klev),      INTENT(IN)   :: q               ! specific humidity [kg/kg] 
   INTEGER,                         INTENT(IN)   :: iflag_cld_th    ! flag that determines the distribution of convective clouds
   INTEGER,                         INTENT(IN)   :: iflag_ice_thermo! flag to activate the ice thermodynamics
@@ -143,4 +137,6 @@
 
   REAL, DIMENSION(klon,klev),      INTENT(INOUT):: ratqs            ! function of pressure that sets the large-scale
+  REAL, DIMENSION(klon,klev),      INTENT(INOUT):: beta             ! conversion rate of condensed water
+
 
   ! Input sursaturation en glace
@@ -155,4 +151,5 @@
   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: d_qi             ! cloud ice mass increment [kg/kg]
   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: rneb             ! cloud fraction [-]
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: rneblsvol        ! cloud fraction per unit volume [-]  
   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: radliq           ! condensed water used in the radiation scheme [kg/kg]
   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: radicefrac       ! ice fraction of condensed water for radiation scheme
@@ -160,13 +157,9 @@
   REAL, DIMENSION(klon),           INTENT(OUT)  :: rain             ! large-scale rainfall [kg/s/m2] 
   REAL, DIMENSION(klon),           INTENT(OUT)  :: snow             ! large-scale snowfall [kg/s/m2]
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qsatl            ! saturation specific humidity wrt liquid [kg/kg]
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qsats            ! saturation specific humidity wrt ice [kg/kg]  
   REAL, DIMENSION(klon,klev+1),    INTENT(OUT)  :: prfl             ! large-scale rainfall flux in the column [kg/s/m2]
   REAL, DIMENSION(klon,klev+1),    INTENT(OUT)  :: psfl             ! large-scale snowfall flux in the column [kg/s/m2]
 
-  ! cofficients of scavenging fraction (for off-line)
- 
-  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_nucl       ! scavenging fraction due tu nucleation [-]
-  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_1nucl      ! scavenging fraction due tu nucleation with a -1 factor [-]
-  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_impa       ! scavening fraction due to impaction [-]
-  
   ! fraction of aerosol scavenging through impaction and nucleation (for on-line)
   
@@ -174,34 +167,22 @@
   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: frac_nucl        ! scavenging fraction due tu nucleation [-]
   
-  ! PROGRAM PARAMETERS:
-  !--------------------
+  ! for supersaturation and contrails parameterisation
   
-  REAL, SAVE :: seuil_neb=0.001                 ! cloud fraction threshold: a cloud really exists when exceeded
-  !$OMP THREADPRIVATE(seuil_neb)
-
-  INTEGER, SAVE :: ninter=5                     ! number of iterations to calculate autoconversion to precipitation
-  !$OMP THREADPRIVATE(ninter)
-
-  INTEGER,SAVE :: iflag_evap_prec=1             ! precipitation evaporation flag. 0: nothing, 1: "old way", 
-                                                ! 2: Max cloud fraction above to calculate the max of reevaporation
-                                                ! 4: LTP'method i.e. evaporation in the clear-sky fraction of the mesh only
-  !$OMP THREADPRIVATE(iflag_evap_prec)
-
-  REAL t_coup                                   ! temperature threshold which determines the phase 
-  PARAMETER (t_coup=234.0)                      ! for which the saturation vapor pressure is calculated
-
-  REAL DDT0                                     ! iteration parameter 
-  PARAMETER (DDT0=.01)
-
-  REAL ztfondue                                 ! parameter to calculate melting fraction of precipitation
-  PARAMETER (ztfondue=278.15)
-
-  REAL, SAVE    :: rain_int_min=0.001           ! Minimum local rain intensity [mm/s] before the decrease in associated precipitation fraction 
-  !$OMP THREADPRIVATE(rain_int_min)
-
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qclr             ! specific total water content in clear sky region [kg/kg]
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qcld             ! specific total water content in cloudy region [kg/kg]
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qss              ! specific total water content in supersat region [kg/kg]
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qvc              ! specific vapor content in clouds [kg/kg] 
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: rnebclr          ! mesh fraction of clear sky [-]   
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: rnebss           ! mesh fraction of ISSR [-]  
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: gamma_ss         ! coefficient governing the ice nucleation RHi threshold [-]      
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: Tcontr           ! ?
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qcontr           ! ?
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qcontr2          ! ?          
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: fcontrN          ! ?
+  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: fcontrP          ! ?
+  
 
   ! LOCAL VARIABLES:
   !----------------
-
 
   REAL qsl(klon), qsi(klon)
@@ -236,13 +217,7 @@
   ! Variables precipitation energy conservation
   REAL zmqc(klon)
-  ! Variables for tracers
-  ! temporary: alpha parameter for scavenging
-  ! 4 possible scavenging processes
-  REAL,SAVE :: a_tr_sca(4)
-  !$OMP THREADPRIVATE(a_tr_sca)
   REAL zalpha_tr
   REAL zfrac_lessi
   REAL zprec_cond(klon)
-  REAL beta(klon,klev)                   ! conversion rate of condensed water
   REAL zmair(klon), zcpair, zcpeau
   REAL zlh_solid(klon), zm_solid         ! for liquid -> solid conversion
@@ -262,6 +237,4 @@
   INTEGER ncoreczq
   INTEGER mpc_bl_points(klon,klev)
-  INTEGER,SAVE :: itap=0
-  !$OMP THREADPRIVATE(itap)
 
   LOGICAL lognormale(klon)
@@ -291,9 +264,4 @@
 ENDIF
 
-IF (.NOT.thermcep) THEN
-    abort_message = 'lscp cannot be used when thermcep=false'
-    CALL abort_physic(modname,abort_message,1)
-ENDIF
-
 IF (iflag_fisrtilp_qsat .LT. 0) THEN
     abort_message = 'lscp cannot be used with iflag_fisrtilp<0'
@@ -303,5 +271,4 @@
 ! Few initialisations
 
-itap=itap+1
 znebprecip(:)=0.0
 ctot_vol(1:klon,1:klev)=0.0
@@ -314,50 +281,13 @@
 IF (prt_level>9) WRITE(lunout,*) 'NUAGES4 A. JAM'
 
-IF (appel1er) THEN
-    CALL getin_p('ninter',ninter)
-    CALL getin_p('iflag_evap_prec',iflag_evap_prec)
-    CALL getin_p('seuil_neb',seuil_neb)
-    CALL getin_p('rain_int_min',rain_int_min) 
-    WRITE(lunout,*) 'lscp, ninter:', ninter
-    WRITE(lunout,*) 'lscp, iflag_evap_prec:', iflag_evap_prec
-    WRITE(lunout,*) 'lscp, seuil_neb:', seuil_neb
-    WRITE(lunout,*) 'lscp, rain_int_min:', rain_int_min
-
-    ! check for precipitation sub-time steps
-    IF (ABS(dtime/REAL(ninter)-360.0).GT.0.001) THEN
-        WRITE(lunout,*) 'lscp: it is not expected, see Z.X.Li', dtime
-        WRITE(lunout,*) 'I would prefer a 6 min sub-timestep'
-    ENDIF
-
-    !AA Temporary initialisation
-    a_tr_sca(1) = -0.5
-    a_tr_sca(2) = -0.5
-    a_tr_sca(3) = -0.5
-    a_tr_sca(4) = -0.5
-
-    !AA Set scavenged fractions to 1
-    DO k = 1, klev
-        DO i = 1, klon
-            pfrac_nucl(i,k)=1.0
-            pfrac_1nucl(i,k)=1.0
-            pfrac_impa(i,k)=1.0
-            beta(i,k)=0.0
-        ENDDO
-    ENDDO
-
-    IF (ok_ice_sursat) CALL ice_sursat_init()
-
-    appel1er = .FALSE.
-
-ENDIF     !(appel1er)
-
 ! AA for 'safety' reasons
 zalpha_tr   = 0.
 zfrac_lessi = 0.
-
-! Initialisation of output variables (JYG):
+beta(:,:)= 0.
+
+! Initialisation of variables:
+
 prfl(:,:) = 0.0
 psfl(:,:) = 0.0
-
 d_t(:,:) = 0.0
 d_q(:,:) = 0.0
@@ -369,5 +299,4 @@
 frac_nucl(:,:) = 1.0 
 frac_impa(:,:) = 1.0 
-
 rain(:) = 0.0
 snow(:) = 0.0
@@ -390,5 +319,5 @@
 qzero(:) = 0.0
 
-!--ice sursaturation
+!--ice supersaturation
 gamma_ss(:,:) = 1.0
 qss(:,:) = 0.0
@@ -426,5 +355,5 @@
     ! ---------------------------------------------------------------------
     
-    IF (k.LE.klevm1) THEN 
+    IF (k.LE.klev-1) THEN 
 
         DO i = 1, klon
@@ -465,9 +394,9 @@
         ! Calculation of saturation specific humidity
         ! depending on temperature:
-        CALL CALC_QSAT_ECMWF(klon,zt(:),qzero(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
+        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
         ! wrt liquid water
-        CALL CALC_QSAT_ECMWF(klon,zt(:),qzero(:),pplay(:,k),RTT,1,.false.,qsl(:),dqsl(:))
+        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,1,.false.,qsl(:),dqsl(:))
         ! wrt ice
-        CALL CALC_QSAT_ECMWF(klon,zt(:),qzero(:),pplay(:,k),RTT,2,.false.,qsi(:),dqsi(:))
+        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,2,.false.,qsi(:),dqsi(:))
 
         DO i = 1, klon
@@ -626,5 +555,5 @@
 
      qtot(:)=zq(:)+zmqc(:)
-     CALL CALC_QSAT_ECMWF(klon,zt(:),qtot(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
+     CALL calc_qsat_ecmwf(klon,zt(:),qtot(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
      DO i = 1, klon
             zdelta = MAX(0.,SIGN(1.,RTT-zt(i)))
@@ -691,5 +620,5 @@
                 ! + stationary mixed-phase cloud model
 
-                    CALL cloudth_mpc(klon,klev,k,mpc_bl_points,            &
+                    CALL cloudth_mpc(klon,klev,k,iflag_mpc_bl,mpc_bl_points, &
                          t,ztv,zq,zqta,fraca, zpspsk,                      &
                          paprs,pplay,ztla,zthl,ratqs,zqs,psfl,             &
@@ -761,5 +690,5 @@
                   ENDDO
 
-                  ! Calculation of saturation specific humidity and ce fraction
+                  ! Calculation of saturation specific humidity and ice fraction
                   CALL calc_qsat_ecmwf(klon,Tbef(:),qtot(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
                   CALL calc_gammasat(klon,Tbef(:),qtot(:),pplay(:,k),gammasat(:),dgammasatdt(:))
@@ -975,5 +904,4 @@
     ENDDO
 
-    ! -------------------------------------------------------------------------------
     ! Autoconversion
     ! -------------------------------------------------------------------------------
@@ -1052,6 +980,10 @@
 
     DO i = 1, klon
-
-            ziflprev(i)=zifl(i)
+            
+            IF (iflag_evap_prec.EQ.4) THEN
+                ziflprev(i)=ziflcld(i)
+            ELSE
+                ziflprev(i)=zifl(i)*zneb(i)
+            ENDIF
 
             IF (rneb(i,k) .GT. 0.0) THEN
@@ -1200,10 +1132,8 @@
 
             zfrac_lessi = 1. - EXP(zalpha_tr*zprec_cond(i)/zneb(i))
-            pfrac_nucl(i,k)=pfrac_nucl(i,k)*(1.-zneb(i)*zfrac_lessi)
             frac_nucl(i,k)= 1.-zneb(i)*zfrac_lessi 
 
             ! Nucleation with a factor of -1 instead of -0.5
             zfrac_lessi = 1. - EXP(-zprec_cond(i)/zneb(i))
-            pfrac_1nucl(i,k)=pfrac_1nucl(i,k)*(1.-zneb(i)*zfrac_lessi)
 
         ENDIF
@@ -1226,5 +1156,4 @@
 
               zfrac_lessi = 1. - EXP(zalpha_tr*zprec_cond(i)/zneb(i))
-              pfrac_impa(i,kk)=pfrac_impa(i,kk)*(1.-zneb(i)*zfrac_lessi)
               frac_impa(i,kk)= 1.-zneb(i)*zfrac_lessi
 
@@ -1249,6 +1178,6 @@
    ENDDO
    !q_sat
-   CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,1,.false.,zqsatl(:,k),zdqs(:))
-   CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,2,.false.,zqsats(:,k),zdqs(:))
+   CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,1,.false.,qsatl(:,k),zdqs(:))
+   CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,2,.false.,qsats(:,k),zdqs(:))
 
 ENDDO
@@ -1268,6 +1197,6 @@
   ENDIF
 
-END SUBROUTINE LSCP
+END SUBROUTINE lscp
 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
-END MODULE LSCP_MOD
+END MODULE lscp_mod
Index: LMDZ6/trunk/libf/phylmd/nuage.h
===================================================================
--- LMDZ6/trunk/libf/phylmd/nuage.h	(revision 4377)
+++ LMDZ6/trunk/libf/phylmd/nuage.h	(revision 4380)
@@ -12,6 +12,6 @@
       INTEGER iflag_rain_incloud_vol
    
-      INTEGER iflag_mpc_bl, iflag_gammasat, iflag_vice, iflag_rei
-      LOGICAL ok_icefra_lscp, ok_radliq_snow
+      INTEGER iflag_gammasat, iflag_vice, iflag_rei
+      LOGICAL ok_icefra_lscp
 
       common /nuagecom/ rad_froid,rad_chau1, rad_chau2,t_glace_max,     &
@@ -21,6 +21,6 @@
      &                  iflag_t_glace,iflag_cloudth_vert,iflag_cld_cv,  &
      &                  iflag_rain_incloud_vol,                         &
-     &                  ok_icefra_lscp,ok_radliq_snow,                  &
-     &                  iflag_mpc_bl, iflag_gammasat, iflag_vice,       &
+     &                  ok_icefra_lscp,                  &
+     &                  iflag_gammasat, iflag_vice,       &
      &                  iflag_rei    
 !$OMP THREADPRIVATE(/nuagecom/)
Index: LMDZ6/trunk/libf/phylmd/physiq_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 4377)
+++ LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 4380)
@@ -82,4 +82,5 @@
     USE wake_ini_mod, ONLY : wake_ini
     USE thermcell_ini_mod, ONLY : thermcell_ini
+    USE lscp_ini_mod, ONLY : lscp_ini
 
     !USE cmp_seri_mod
@@ -285,4 +286,8 @@
        sij, &
        !
+       rneblsvol, &
+       zqsatl, zqsats, &
+       qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, &
+       Tcontr, qcontr, qcontr2, fcontrN, fcontrP, &
        cldemi,  &
        cldfra, cldtau, fiwc,  &
@@ -1742,5 +1747,7 @@
        CALL thermcell_ini(iflag_thermals,prt_level,tau_thermals,lunout, &
    &    RG,RD,RCPD,RKAPPA,RLVTT,RETV)
-
+       IF (ok_new_lscp) then
+           CALL lscp_ini(pdtphys,ok_ice_sursat)
+       endif
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
@@ -3627,13 +3634,14 @@
     ENDIF
 
-    CALL lscp(phys_tstep,missing_val,paprs,pplay, &
+    CALL lscp(klon,klev,phys_tstep,missing_val,paprs,pplay, &
          t_seri, q_seri,ptconv,ratqs, &
-         d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneb_seri, & 
+         d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, rneb_seri, & 
          cldliq, picefra, rain_lsc, snow_lsc, &
-         pfrac_impa, pfrac_nucl, pfrac_1nucl, &
          frac_impa, frac_nucl, beta_prec_fisrt, &
          prfl, psfl, rhcl,  &
          zqasc, fraca,ztv,zpspsk,ztla,zthl,iflag_cld_th, &
-         iflag_ice_thermo, ok_ice_sursat)
+         iflag_ice_thermo, ok_ice_sursat, zqsatl, zqsats, &
+         qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, &
+         Tcontr, qcontr, qcontr2, fcontrN, fcontrP )
 
     ELSE
