Index: /LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 3170)
+++ /LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 3171)
@@ -1505,4 +1505,6 @@
   TYPE(ctrl_out), SAVE :: o_mc = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'mc', 'Convective mass flux', 'kg/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ftime_deepcv = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ftime_deepcv', 'Fraction of time deep convection Occurs', ' ', (/ ('', i=1, 10) /))
   TYPE(ctrl_out), SAVE :: o_ftime_con = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'ftime_con', 'Fraction of time convection Occurs', ' ', (/ ('', i=1, 10) /))
Index: /LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 3170)
+++ /LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 3171)
@@ -72,5 +72,5 @@
          o_ptop, o_fbase, o_plcl, o_plfc, &
          o_wbeff, o_convoccur, o_cape_max, o_upwd, o_ep,o_epmax_diag, o_Ma, &
-         o_dnwd, o_dnwd0, o_ftime_con, o_mc, &
+         o_dnwd, o_dnwd0, o_ftime_deepcv, o_ftime_con, o_mc, &
          o_prw, o_prlw, o_prsw, o_s_pblh, o_s_pblt, o_s_lcl, &
          o_s_therm, o_uSTDlevs, o_vSTDlevs, &
@@ -402,5 +402,5 @@
     INTEGER :: itau_w
     INTEGER :: i, iinit, iinitend=1, iff, iq, iiq, nsrf, k, ll, naero
-    REAL, DIMENSION (klon) :: zx_tmp_fi2d
+    REAL, DIMENSION (klon) :: zx_tmp_fi2d, zpt_conv2d
     REAL, DIMENSION (klon,klev) :: zx_tmp_fi3d, zpt_conv
     REAL, DIMENSION (klon,klev+1) :: zx_tmp_fi3d1
@@ -977,13 +977,8 @@
           CALL histwrite_phy(o_dnwd, dnwd)
           CALL histwrite_phy(o_dnwd0, dnwd0)
-!!          IF (vars_defined)         zx_tmp_fi2d=float(itau_con)/float(itap)
-!!          CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d)
-          IF (vars_defined) THEN
-             zx_tmp_fi2d(:) = 0.
-             DO k=1,klev
-               WHERE (ptconv(:,k)) zx_tmp_fi2d(:) = 1.
-             ENDDO
-          ENDIF
-          CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d)
+          !! The part relative to the frequency of occurence of convection
+          !! is now grouped with the part relative to thermals and shallow
+          !! convection (output of the 3 fields: ftime_deepcv, ftime_th and
+          !!  ftime_con).
           IF (vars_defined) THEN
              IF (iflag_thermals>=1)THEN
@@ -1643,4 +1638,10 @@
           CALL histwrite_phy(o_plulst, plul_st)
           IF (vars_defined) THEN
+             do i=1,klon
+                zx_tmp_fi2d(1:klon)=lmax_th(:)
+             enddo
+          ENDIF
+          CALL histwrite_phy(o_lmaxth, zx_tmp_fi2d)
+          IF (vars_defined) THEN
              DO k=1,klev
                 DO i=1,klon
@@ -1654,11 +1655,29 @@
           ENDIF
           CALL histwrite_phy(o_ptconvth, zx_tmp_fi3d)
-          IF (vars_defined) THEN
-             do i=1,klon
-                zx_tmp_fi2d(1:klon)=lmax_th(:)
-             enddo
-          ENDIF
-          CALL histwrite_phy(o_lmaxth, zx_tmp_fi2d)
        ENDIF ! iflag_thermals>=1
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+       zpt_conv = 0.
+       WHERE (ptconv) zpt_conv = 1.
+       CALL histwrite_phy(o_ptconv, zpt_conv)
+!!       IF (vars_defined)         zx_tmp_fi2d=float(itau_con)/float(itap)
+!!       CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d)
+       IF (vars_defined) THEN
+          zpt_conv2d(:) = 0.
+          DO k=1,klev
+            WHERE (ptconv(:,k)) zpt_conv2d(:) = 1.
+          ENDDO
+       ENDIF
+       CALL histwrite_phy(o_ftime_deepcv, zpt_conv2d)
+       IF (vars_defined) THEN
+          zx_tmp_fi2d(:) = 0.
+          DO k=1,klev
+            WHERE (ptconvth(:,k)) zx_tmp_fi2d(:) = 1.
+          ENDDO
+       ENDIF
+       CALL histwrite_phy(o_ftime_th, zx_tmp_fi2d)
+       IF (vars_defined) THEN
+           zx_tmp_fi2d(:) = max(zx_tmp_fi2d(:),zpt_conv2d(:))
+       ENDIF
+       CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys
@@ -1676,7 +1695,4 @@
        CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
        CALL histwrite_phy(o_dqeva2d, zx_tmp_fi2d)
-       zpt_conv = 0.
-       WHERE (ptconv) zpt_conv = 1.
-       CALL histwrite_phy(o_ptconv, zpt_conv)
        CALL histwrite_phy(o_ratqs, ratqs)
        IF (vars_defined) THEN
@@ -1696,6 +1712,7 @@
        IF (iflag_thermals>=1) THEN
           ! Pour l instant 0 a y reflichir pour les thermiques
-          zx_tmp_fi2d=0. 
-          CALL histwrite_phy(o_ftime_th, zx_tmp_fi2d)
+          ! regroupe avec ftime_deepcv et ftime_con
+          !!zx_tmp_fi2d=0. 
+          !!CALL histwrite_phy(o_ftime_th, zx_tmp_fi2d)
           CALL histwrite_phy(o_f_th, fm_therm)
           CALL histwrite_phy(o_e_th, entr_therm)
