Index: /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth.F90	(revision 5225)
+++ /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth.F90	(revision 5226)
@@ -542,5 +542,5 @@
           ztv, po, zqta, fraca, &
           qcloud, ctot, ctot_vol, zpspsk, paprs, pplay, ztla, zthl, &
-          ratqs, zqs, t, &
+          ratqs, sigma_qtherm,zqs, t, &
           cloudth_sth, cloudth_senv, cloudth_sigmath, cloudth_sigmaenv)
 
@@ -575,5 +575,5 @@
     REAL, DIMENSION(ngrid, klev), INTENT(IN) :: ztla
     REAL, DIMENSION(ngrid, klev), INTENT(INOUT) :: zthl
-    REAL, DIMENSION(ngrid, klev), INTENT(IN) :: ratqs
+    REAL, DIMENSION(ngrid, klev), INTENT(IN) :: ratqs, sigma_qtherm
     REAL, DIMENSION(ngrid), INTENT(IN) :: zqs
     REAL, DIMENSION(ngrid, klev), INTENT(IN) :: t
@@ -611,5 +611,5 @@
               ztv, po, zqta, fraca, &
               qcloud, ctot, ctot_vol, zpspsk, paprs, pplay, ztla, zthl, &
-              ratqs, zqs, t, &
+              ratqs, sigma_qtherm, zqs, t, &
               cloudth_sth, cloudth_senv, cloudth_sigmath, cloudth_sigmaenv)
       RETURN
@@ -761,5 +761,5 @@
           ztv, po, zqta, fraca, &
           qcloud, ctot, ctot_vol, zpspsk, paprs, pplay, ztla, zthl, &
-          ratqs, zqs, t, &
+          ratqs, sigma_qtherm, zqs, t, &
           cloudth_sth, cloudth_senv, cloudth_sigmath, cloudth_sigmaenv)
 
@@ -821,5 +821,5 @@
     REAL Tbef, zdelta, qsatbef, zcor
     REAL qlbef
-    REAL ratqs(ngrid, klev) ! determine la largeur de distribution de vapeur
+    REAL ratqs(ngrid, klev), sigma_qtherm(ngrid,klev) ! determine la largeur de distribution de vapeur
     ! Change the width of the PDF used for vertical subgrid scale heterogeneity
     ! (J Jouhaud, JL Dufresne, JB Madeleine)
@@ -924,8 +924,11 @@
         ENDIF
         sigma1s = sigma1s_fraca + sigma1s_ratqs
-        IF (iflag_ratqs==11) THEN
+        sigma2s=(sigma2s_factor*(((sth-senv)**2)**0.5)/((fraca(ind1,ind2)+0.02)**sigma2s_power))+0.002*zqta(ind1,ind2)
+      IF (iflag_ratqs==10.or.iflag_ratqs==11) THEN
           sigma1s = ratqs(ind1, ind2) * po(ind1) * aenv
-        ENDIF
-        sigma2s = (sigma2s_factor * (((sth - senv)**2)**0.5) / ((fraca(ind1, ind2) + 0.02)**sigma2s_power)) + 0.002 * zqta(ind1, ind2)
+        IF (iflag_ratqs==10.and.sigma_qtherm(ind1, ind2) /= 0) then
+            sigma2s = sigma_qtherm(ind1, ind2)*ath
+         ENDIF
+      ENDIF
         !      tests
         !      sigma1s=(0.92**0.5)*(fraca(ind1,ind2)**0.5)/(1-fraca(ind1,ind2))*((sth-senv)**2)**0.5+ratqs(ind1,ind2)*po(ind1)
Index: /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp.F90	(revision 5225)
+++ /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp.F90	(revision 5226)
@@ -7,5 +7,5 @@
   !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   SUBROUTINE lscp(klon, klev, dtime, missing_val, &
-          paprs, pplay, temp, qt, qice_save, ptconv, ratqs, &
+          paprs, pplay, temp, qt, qice_save, ptconv, ratqs, sigma_qtherm, &
           d_t, d_q, d_ql, d_qi, rneb, rneblsvol, &
           pfraclr, pfracld, &
@@ -156,6 +156,6 @@
     !------------------------
 
-    REAL, DIMENSION(klon, klev), INTENT(INOUT) :: thl              ! liquid potential temperature [K]
-    REAL, DIMENSION(klon, klev), INTENT(INOUT) :: ratqs            ! function of pressure that sets the large-scale
+    REAL, DIMENSION(klon, klev), INTENT(INOUT) :: thl          ! liquid potential temperature [K]
+    REAL, DIMENSION(klon, klev), INTENT(INOUT) :: ratqs, sigma_qtherm        ! function of pressure that sets the large-scale
 
     ! INPUT/OUTPUT condensation and ice supersaturation
@@ -809,5 +809,5 @@
                   zq, qta, fraca, &
                   qcloud, ctot, ctot_vol, pspsk, paprs, pplay, tla, thl, &
-                  ratqs, zqs, temp, &
+                  ratqs, sigma_qtherm, zqs, temp, &
                   cloudth_sth, cloudth_senv, cloudth_sigmath, cloudth_sigmaenv)
 
Index: /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_old.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_old.F90	(revision 5225)
+++ /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_lscp_old.F90	(revision 5226)
@@ -4,5 +4,5 @@
 MODULE lmdz_lscp_old
 CONTAINS
-SUBROUTINE fisrtilp(klon,klev,dtime,paprs,pplay,t,q,ptconv,ratqs, &
+SUBROUTINE fisrtilp(klon,klev,dtime,paprs,pplay,t,q,ptconv,ratqs, sigma_qtherm, &
      d_t, d_q, d_ql, d_qi, rneb,rneblsvol,radliq, rain, snow,          &
      pfrac_impa, pfrac_nucl, pfrac_1nucl,               &
@@ -76,5 +76,5 @@
 
   !  Input/output
-  REAL, DIMENSION(klon,klev),      INTENT(INOUT):: ratqs  ! determine la largeur de distribution de vapeur
+  REAL, DIMENSION(klon,klev),      INTENT(INOUT):: ratqs, sigma_qtherm  ! determine la largeur de distribution de vapeur
 
   ! Principaux outputs:
@@ -787,5 +787,5 @@
                    zq,zqta,fraca, &
                    qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, &
-                   ratqs,zqs,t, &
+                   ratqs,sigma_qtherm,zqs,t, &
                    cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv)
               !----------------------------------
Index: /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_main.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_main.F90	(revision 5225)
+++ /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_main.F90	(revision 5226)
@@ -13,5 +13,5 @@
            omega,tke,tke_dissip,lmix,wprime, &
            t2m,q2m,fm_therm,entr_therm,detr_therm,cell_area,&
-           ratqs,ratqsc,ratqs_inter_)
+           ratqs,ratqsc,ratqs_inter_,sigma_qtherm)
 
 
@@ -52,5 +52,5 @@
 
 ! Output
-REAL, DIMENSION(klon,klev),INTENT(INOUT) :: ratqs,ratqsc,ratqs_inter_
+REAL, DIMENSION(klon,klev),INTENT(INOUT) :: ratqs,ratqsc,ratqs_inter_,sigma_qtherm
 
 logical, DIMENSION(klon,klev),INTENT(INOUT) :: ptconvth
@@ -190,14 +190,10 @@
       
           IF (iflag_ratqs == 10) THEN
-             ! interactive ratqs in presence of cold pools     
+             print*,'avant ratqs_inter'
+            ! interactive ratqs with several sources
              CALL ratqs_inter(klon,klev,iflag_ratqs,pdtphys,paprs, &
                        ratqsbas,wake_deltaq,wake_s,q_seri,qtc_cv, sigt_cv, &
                        fm_therm,entr_therm,detr_therm,detrain_cv,fm_cv,fqd,fqcomp,sigd, &
-                       ratqs_inter_)
-             DO k=1,klev
-                DO i=1,klon
-                    ratqs_inter_(i,k)=ratqs_inter_(i,k)-0.5*ratqs_inter_(i,k)*(tanh((ratqsp0-pplay(i,k))/ratqsdp)+1.)
-                enddo
-             enddo
+                       ratqs_inter_,sigma_qtherm)
              ratqss=ratqss+ratqs_inter_
           ELSE IF (iflag_ratqs == 11) THEN
@@ -207,5 +203,5 @@
                        ratqsbas,wake_deltaq,wake_s,q_seri,qtc_cv, sigt_cv, &
                        fm_therm,entr_therm,detr_therm,detrain_cv,fm_cv,fqd,fqcomp,sigd, &
-                       ratqs_inter_)
+                       ratqs_inter_,sigma_qtherm)
              ratqss=ratqss+ratqs_inter_
           ELSE IF (iflag_ratqs == 12) THEN
Index: /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_multi.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_multi.F90	(revision 5225)
+++ /LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_multi.F90	(revision 5226)
@@ -23,5 +23,5 @@
            ratqsbas, wake_deltaq, wake_s, q_seri,qtc_cv, sigt_cv,     &
            fm_therm,entr_therm,detr_therm,detrain_cv,fm_cv,fqd,fqcomp,sigd, &
-           ratqs_inter_)
+           ratqs_inter_,sigma_qtherm)
 
 USE lmdz_ratqs_ini, ONLY: a_ratqs_cv,tau_var,fac_tau,tau_cumul,a_ratqs_wake, dqimpl
@@ -65,5 +65,5 @@
 REAL, DIMENSION(klon) :: max_sigd, max_dqconv,max_sigt
 REAL, DIMENSION(klon,klev) :: zoa,zocarrea,pdocarreadj,pocarre,po,pdoadj,varq_therm
-REAL, DIMENSION(klon,klev) :: var_moy, var_var, var_desc_th,var_det_conv,var_desc_prec,var_desc_conv,sigma_therm
+REAL, DIMENSION(klon,klev) :: var_moy, var_var, var_desc_th,var_det_conv,var_desc_prec,var_desc_conv,sigma_qtherm
 
 lev_out=0.
@@ -193,8 +193,8 @@
            IF(q_seri(i,k)>=1E-7) THEN
                ratqs_inter_(i,k) = abs(povariance(i,k))**0.5/q_seri(i,k)    
-               sigma_therm(i,k) = abs(varq_therm(i,k))**0.5     ! sigma dans les thermiques
+               sigma_qtherm(i,k) = abs(varq_therm(i,k))**0.5     ! sigma dans les thermiques
            else 
                ratqs_inter_(i,k) = 0.  
-               sigma_therm(i,k) = 0.
+               sigma_qtherm(i,k) = 0.
            endif
         enddo
Index: /LMDZ6/branches/Amaury_dev/libf/phylmd/phys_state_var_mod.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/phylmd/phys_state_var_mod.F90	(revision 5225)
+++ /LMDZ6/branches/Amaury_dev/libf/phylmd/phys_state_var_mod.F90	(revision 5226)
@@ -476,6 +476,6 @@
 !$OMP THREADPRIVATE(ale_bl_trig)
 
-      REAL,SAVE,ALLOCATABLE :: ratqs_inter_(:,:)
-!$OMP THREADPRIVATE(ratqs_inter_)
+      REAL,SAVE,ALLOCATABLE :: ratqs_inter_(:,:),sigma_qtherm(:,:)
+!$OMP THREADPRIVATE(ratqs_inter_,sigma_qtherm)
 
 #ifdef ISO
@@ -770,5 +770,5 @@
 
       ALLOCATE(ale_bl_trig(klon))
-      ALLOCATE(ratqs_inter_(klon,klev))
+      ALLOCATE(ratqs_inter_(klon,klev),sigma_qtherm(klon,klev))
       IF (ok_gwd_rando) THEN
         ALLOCATE(du_gwd_rando(klon, klev))
@@ -940,5 +940,5 @@
       IF (.NOT. ok_hines .AND. ok_gwd_rando) DEALLOCATE(du_gwd_front)
       DEALLOCATE(ale_bl_trig)
-      DEALLOCATE(ratqs_inter_)
+      DEALLOCATE(ratqs_inter_,sigma_qtherm)
 
       IF (activate_ocean_skin >= 1) THEN
Index: /LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90	(revision 5225)
+++ /LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90	(revision 5226)
@@ -3749,5 +3749,5 @@
             omega, pbl_tke(:, :, is_ave), pbl_eps(:, :, is_ave), l_mix_ave, wprime_ave, &
             t2m, q2m, fm_therm, entr_therm, detr_therm, cell_area, &
-            ratqs, ratqsc, ratqs_inter_)
+            ratqs, ratqsc, ratqs_inter_,sigma_qtherm)
 
     ! Appeler le processus de condensation a grande echelle
@@ -3768,5 +3768,5 @@
 
       CALL lscp(klon, klev, phys_tstep, missing_val, paprs, pplay, &
-              t_seri, q_seri, qs_ini, ptconv, ratqs, &
+              t_seri, q_seri, qs_ini, ptconv, ratqs,sigma_qtherm, &
               d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, &
               pfraclr, pfracld, cldfraliq, sigma2_icefracturb, mean_icefracturb, &
@@ -3791,5 +3791,5 @@
 
       CALL fisrtilp(klon, klev, phys_tstep, paprs, pplay, &
-              t_seri, q_seri, ptconv, ratqs, &
+              t_seri, q_seri, ptconv, ratqs,sigma_qtherm, &
               d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, radocond, &
               rain_lsc, snow_lsc, &
Index: /LMDZ6/branches/Amaury_dev/libf/phylmdiso/lmdz_lscp_old.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/phylmdiso/lmdz_lscp_old.F90	(revision 5225)
+++ /LMDZ6/branches/Amaury_dev/libf/phylmdiso/lmdz_lscp_old.F90	(revision 5226)
@@ -6,5 +6,5 @@
   USE lmdz_abort_physic, ONLY: abort_physic
 CONTAINS
-SUBROUTINE fisrtilp(dtime,paprs,pplay,t,q,ptconv,ratqs, &
+SUBROUTINE fisrtilp(dtime,paprs,pplay,t,q,ptconv,ratqs,sigma_qtherm, &
      d_t, d_q, d_ql, d_qi, rneb, radliq, rain, snow,          &
      pfrac_impa, pfrac_nucl, pfrac_1nucl,               &
@@ -119,5 +119,5 @@
 
   !  Input/output
-  REAL, DIMENSION(klon,klev),      INTENT(INOUT):: ratqs  ! determine la largeur de distribution de vapeur
+  REAL, DIMENSION(klon,klev),      INTENT(INOUT):: ratqs,sigma_qtherm  ! determine la largeur de distribution de vapeur
 
   ! Principaux outputs:
@@ -1132,5 +1132,5 @@
                    zq,zqta,fraca, &
                    qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, &
-                   ratqs,zqs,t, &
+                   ratqs,sigma_qtherm,zqs,t, &
                    cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv)
 
Index: /LMDZ6/branches/Amaury_dev/libf/phylmdiso/physiq_mod.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/phylmdiso/physiq_mod.F90	(revision 5225)
+++ /LMDZ6/branches/Amaury_dev/libf/phylmdiso/physiq_mod.F90	(revision 5226)
@@ -4942,5 +4942,5 @@
          omega,pbl_tke(:,:,is_ave),pbl_eps(:,:,is_ave),l_mix_ave,wprime_ave, &
          t2m,q2m,fm_therm,entr_therm,detr_therm,cell_area, &
-         ratqs,ratqsc,ratqs_inter_)
+         ratqs,ratqsc,ratqs_inter_,sigma_qtherm)
 
     ! Appeler le processus de condensation a grande echelle
@@ -5042,5 +5042,5 @@
 
     CALL lscp(klon,klev,phys_tstep,missing_val,paprs,pplay, &
-         t_seri, q_seri,qs_ini,ptconv,ratqs, &
+         t_seri, q_seri,qs_ini,ptconv,ratqs,sigma_qtherm, &
          d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, &
          pfraclr, pfracld, cldfraliq, sigma2_icefracturb, mean_icefracturb,  &
@@ -5067,5 +5067,5 @@
     ! Camille Risi mai 2024: on ne met pas à jour ici pour ne pas s'mbêter à modifier fisrtilp
     CALL fisrtilp(phys_tstep,paprs,pplay, &
-         t_seri, q_seri,ptconv,ratqs, &
+         t_seri, q_seri,ptconv,ratqs,sigma_qtherm, &
          d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, radocond, &
          rain_lsc, snow_lsc, &
