Index: /LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90	(revision 4741)
+++ /LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90	(revision 4742)
@@ -38,6 +38,6 @@
       REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:)
       !$OMP THREADPRIVATE(d_tr_dyn)
-      REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:)
-      !$OMP THREADPRIVATE(d_t_con,d_q_con)
+      REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:),d_q_con_zmasse(:,:)
+      !$OMP THREADPRIVATE(d_t_con,d_q_con,d_q_con_zmasse)
       REAL, SAVE, ALLOCATABLE :: d_u_con(:,:),d_v_con(:,:)
       !$OMP THREADPRIVATE(d_u_con,d_v_con)
@@ -640,5 +640,5 @@
       ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
       ALLOCATE(d_tr_dyn(klon,klev,nbtr))                   !RomP
-      ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev))
+      ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev),d_q_con_zmasse(klon,klev))
       ALLOCATE(d_u_con(klon,klev),d_v_con(klon,klev))
       ALLOCATE(d_t_wake(klon,klev),d_q_wake(klon,klev))
@@ -767,5 +767,4 @@
       ALLOCATE(toplwad0_aero_s2(klon), sollwad0_aero_s2(klon))
 
-
 ! FH Ajout de celles necessaires au phys_output_write_mod
 
@@ -987,5 +986,5 @@
       DEALLOCATE(d_u_dyn,d_v_dyn)
       DEALLOCATE(d_tr_dyn)                      !RomP
-      DEALLOCATE(d_t_con,d_q_con)
+      DEALLOCATE(d_t_con,d_q_con,d_q_con_zmasse)
       DEALLOCATE(d_u_con,d_v_con)
       DEALLOCATE(d_t_wake,d_q_wake)
Index: /LMDZ6/trunk/libf/phylmd/physiq_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 4741)
+++ /LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 4742)
@@ -162,5 +162,5 @@
        d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d,d_qbs_dyn2d, &
        ! Physic tendencies
-       d_t_con,d_q_con,d_u_con,d_v_con, &
+       d_t_con,d_q_con,d_q_con_zmasse,d_u_con,d_v_con, &
        d_tr, &                              !! to be removed?? (jyg)
        d_t_wake,d_q_wake, &
@@ -1256,4 +1256,7 @@
     LOGICAL, PARAMETER :: mass_fixer=.FALSE.
     REAL qql1(klon),qql2(klon),corrqql
+
+    !--OB flag to activate better conservation of water tendency when convection is not called every timestep
+    LOGICAL, PARAMETER :: ok_conserv_d_q_con=.FALSE.
 
     REAL, dimension(klon,klev) :: t_env,q_env
@@ -3377,4 +3380,9 @@
     ENDIF
 
+    !--saving d_q_con * zmass for next timestep if convection is not called every timestep
+    IF (ok_conserv_d_q_con) THEN
+      d_q_con_zmasse(:,:) = d_q_con(:,:) * zmasse(:,:)
+    ENDIF
+
     !     CALL homogene(paprs, q_seri, d_q_con, u_seri,v_seri,
     !    .              d_u_con, d_v_con)
@@ -3406,4 +3414,10 @@
 !!
 !!
+
+    !--recompute d_q_con with zmasse from new timestep
+    IF (ok_conserv_d_q_con) THEN
+      d_q_con(:,:)=d_q_con_zmasse(:,:)/zmasse(:,:)
+    ENDIF
+
     CALL add_phys_tend(d_u_con, d_v_con, d_t_con, d_q_con, dql0, dqi0, dqbs0, paprs, &
          'convection',abortphy,flag_inhib_tend,itap,0)
Index: /LMDZ6/trunk/libf/phylmdiso/phys_local_var_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/phys_local_var_mod.F90	(revision 4741)
+++ /LMDZ6/trunk/libf/phylmdiso/phys_local_var_mod.F90	(revision 4742)
@@ -36,6 +36,6 @@
       REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:)
       !$OMP THREADPRIVATE(d_tr_dyn)
-      REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:)
-      !$OMP THREADPRIVATE(d_t_con,d_q_con)
+      REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:),d_q_con_zmasse(:,:)
+      !$OMP THREADPRIVATE(d_t_con,d_q_con,d_q_con_zmasse)
       REAL, SAVE, ALLOCATABLE :: d_u_con(:,:),d_v_con(:,:)
       !$OMP THREADPRIVATE(d_u_con,d_v_con)
@@ -737,5 +737,5 @@
       ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
       ALLOCATE(d_tr_dyn(klon,klev,nbtr))                   !RomP
-      ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev))
+      ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev),d_q_con_zmasse(klon,klev))
       ALLOCATE(d_u_con(klon,klev),d_v_con(klon,klev))
       ALLOCATE(d_t_wake(klon,klev),d_q_wake(klon,klev))
@@ -1139,5 +1139,5 @@
       DEALLOCATE(d_u_dyn,d_v_dyn)
       DEALLOCATE(d_tr_dyn)                      !RomP
-      DEALLOCATE(d_t_con,d_q_con)
+      DEALLOCATE(d_t_con,d_q_con,d_q_con_zmasse)
       DEALLOCATE(d_u_con,d_v_con)
       DEALLOCATE(d_t_wake,d_q_wake)
Index: /LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90	(revision 4741)
+++ /LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90	(revision 4742)
@@ -197,5 +197,5 @@
        d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d,d_qbs_dyn2d, &
        ! Physic tendencies
-       d_t_con,d_q_con,d_u_con,d_v_con, &
+       d_t_con,d_q_con,d_q_con_zmasse,d_u_con,d_v_con, &
        d_tr, &                              !! to be removed?? (jyg)
        d_t_wake,d_q_wake, &
@@ -1332,5 +1332,7 @@
     real xtql1(ntraciso,klon),xtql2(ntraciso,klon),corrxtql(ntraciso)
 #endif
-    
+
+    !--OB flag to activate better conservation of water tendency when convection is not called every timestep
+    LOGICAL, PARAMETER :: ok_conserv_d_q_con=.FALSE.
 
     REAL, dimension(klon,klev) :: t_env,q_env
@@ -4042,4 +4044,9 @@
     ENDIF
 
+    !--saving d_q_con * zmass for next timestep if convection is not called every timestep
+    IF (ok_conserv_d_q_con) THEN
+      d_q_con_zmasse(:,:) = d_q_con(:,:) * zmasse(:,:)
+    ENDIF
+
     !     CALL homogene(paprs, q_seri, d_q_con, u_seri,v_seri,
     !    .              d_u_con, d_v_con)
@@ -4071,4 +4078,10 @@
 !!
 !!
+
+    !--recompute d_q_con with zmasse from new timestep
+    IF (ok_conserv_d_q_con) THEN
+      d_q_con(:,:)=d_q_con_zmasse(:,:)/zmasse(:,:)
+    ENDIF
+
     CALL add_phys_tend(d_u_con, d_v_con, d_t_con, d_q_con, dql0, dqi0, dqbs0, paprs, &
          'convection',abortphy,flag_inhib_tend,itap,0 &
