Index: /LMDZ5/trunk/libf/phylmd/phys_local_var_mod.F90
===================================================================
--- /LMDZ5/trunk/libf/phylmd/phys_local_var_mod.F90	(revision 2495)
+++ /LMDZ5/trunk/libf/phylmd/phys_local_var_mod.F90	(revision 2496)
@@ -21,4 +21,6 @@
       REAL, SAVE, ALLOCATABLE :: d_t_dyn(:,:), d_q_dyn(:,:)
       !$OMP THREADPRIVATE(d_t_dyn, d_q_dyn)
+      REAL, SAVE, ALLOCATABLE :: d_ql_dyn(:,:), d_qs_dyn(:,:)
+      !$OMP THREADPRIVATE(d_ql_dyn, d_qs_dyn)
       REAL, SAVE, ALLOCATABLE :: d_u_dyn(:,:), d_v_dyn(:,:)
       !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn)
@@ -255,6 +257,6 @@
       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: JrNt
 !$OMP THREADPRIVATE(JrNt)
-      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, fder, plcl, plfc, prw
-!$OMP THREADPRIVATE(dthmin, evap, fder, plcl, plfc, prw)
+      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, fder, plcl, plfc, prw, prlw, prsw
+!$OMP THREADPRIVATE(dthmin, evap, fder, plcl, plfc, prw, prlw, prsw)
       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zustar, zu10m, zv10m, rh2m
 !$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m)
@@ -401,4 +403,5 @@
       allocate(tr_seri(klon,klev,nbtr))
       allocate(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
+      allocate(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev))
       allocate(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
       allocate(d_tr_dyn(klon,klev,nbtr))                   !RomP
@@ -521,5 +524,5 @@
       ALLOCATE(JrNt(klon))
       ALLOCATE(dthmin(klon), evap(klon), fder(klon), plcl(klon), plfc(klon))
-      ALLOCATE(prw(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon))
+      ALLOCATE(prw(klon), prlw(klon), prsw(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon))
       ALLOCATE(s_lcl(klon))
       ALLOCATE(s_pblh(klon), s_pblt(klon), s_therm(klon))
@@ -615,4 +618,5 @@
       deallocate(tr_seri)
       deallocate(d_t_dyn,d_q_dyn)
+      deallocate(d_ql_dyn,d_qs_dyn)
       deallocate(d_u_dyn,d_v_dyn)
       deallocate(d_tr_dyn)                      !RomP
@@ -725,5 +729,5 @@
       DEALLOCATE(cldljn, cldmjn, cldhjn, cldtjn, JrNt)
       DEALLOCATE(dthmin, evap, fder, plcl, plfc)
-      DEALLOCATE(prw, zustar, zu10m, zv10m, rh2m, s_lcl)
+      DEALLOCATE(prw, prlw, prsw, zustar, zu10m, zv10m, rh2m, s_lcl)
       DEALLOCATE(s_pblh, s_pblt, s_therm)
 !
Index: /LMDZ5/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
===================================================================
--- /LMDZ5/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 2495)
+++ /LMDZ5/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 2496)
@@ -449,4 +449,8 @@
   TYPE(ctrl_out), SAVE :: o_prw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
     'prw', 'Precipitable water', 'kg/m2', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_prlw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
+    'prlw', 'Precipitable liquid water', 'kg/m2', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_prsw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
+    'prsw', 'Precipitable solid water', 'kg/m2', (/ ('', i=1, 9) /))
   TYPE(ctrl_out), SAVE :: o_s_pblh = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
     's_pblh', 'Boundary Layer Height', 'm', (/ ('', i=1, 9) /))
@@ -992,4 +996,12 @@
   TYPE(ctrl_out), SAVE :: o_dqphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
     'dqphy2d', 'Physics dQ', '(kg/m2)/s', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_dqlphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
+    'dqlphy', 'Physics dQL', '(kg/kg)/s', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_dqlphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
+    'dqlphy2d', 'Physics dQL', '(kg/m2)/s', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_dqsphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
+    'dqsphy', 'Physics dQS', '(kg/kg)/s', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_dqsphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
+    'dqsphy2d', 'Physics dQS', '(kg/m2)/s', (/ ('', i=1, 9) /))
   TYPE(ctrl_out), SAVE :: o_pr_con_l = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
     'pr_con_l', 'Convective precipitation lic', ' ', (/ ('', i=1, 9) /))
@@ -1071,4 +1083,12 @@
   TYPE(ctrl_out), SAVE :: o_dqdyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
     'dqdyn2d', 'Dynamics dQ', '(kg/m2)/s', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_dqldyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
+    'dqldyn', 'Dynamics dQL', '(kg/kg)/s', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_dqldyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
+    'dqldyn2d', 'Dynamics dQL', '(kg/m2)/s', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_dqsdyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
+    'dqsdyn', 'Dynamics dQS', '(kg/kg)/s', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_dqsdyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
+    'dqsdyn2d', 'Dynamics dQS', '(kg/m2)/s', (/ ('', i=1, 9) /))
   TYPE(ctrl_out), SAVE :: o_dudyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
     'dudyn', 'Dynamics dU', 'm/s2', (/ ('', i=1, 9) /))
Index: /LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- /LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 2495)
+++ /LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 2496)
@@ -17,5 +17,5 @@
   SUBROUTINE phys_output_write(itap, pdtphys, paprs, pphis, &
        pplay, lmax_th, aerosol_couple,         &
-       ok_ade, ok_aie, ivap, new_aod, ok_sync, &
+       ok_ade, ok_aie, ivap, iliq, isol, new_aod, ok_sync, &
        ptconv, read_climoz, clevSTD, ptconvth, &
        d_t, qx, d_qx, zmasse, flag_aerosol, flag_aerosol_strat, ok_cdnc)
@@ -67,5 +67,5 @@
          o_wbeff, o_cape_max, o_upwd, o_ep,o_epmax_diag, o_Ma, &
          o_dnwd, o_dnwd0, o_ftime_con, o_mc, &
-         o_prw, o_s_pblh, o_s_pblt, o_s_lcl, &
+         o_prw, o_prlw, o_prsw, o_s_pblh, o_s_pblt, o_s_lcl, &
          o_s_therm, o_uSTDlevs, o_vSTDlevs, &
          o_wSTDlevs, o_zSTDlevs, o_qSTDlevs, &
@@ -120,8 +120,10 @@
          o_zfull, o_zhalf, o_rneb, o_rnebjn, o_rnebcon, &
          o_rnebls, o_rhum, o_ozone, o_ozone_light, &
-         o_dtphy, o_dqphy, o_dqphy2d, o_albe_srf, o_z0m_srf, o_z0h_srf, &
+         o_dtphy, o_dqphy, o_dqphy2d, o_dqlphy, o_dqlphy2d, &
+         o_dqsphy, o_dqsphy2d, o_albe_srf, o_z0m_srf, o_z0h_srf, &
          o_ages_srf, o_snow_srf, o_alb1, o_alb2, o_tke, &
          o_tke_max, o_kz, o_kz_max, o_clwcon, &
-         o_dtdyn, o_dqdyn, o_dqdyn2d, o_dudyn, o_dvdyn, &
+         o_dtdyn, o_dqdyn, o_dqdyn2d, o_dqldyn, o_dqldyn2d, & 
+         o_dqsdyn, o_dqsdyn2d, o_dudyn, o_dvdyn, &
          o_dtcon, o_tntc, o_ducon, o_dvcon, &
          o_dqcon, o_dqcon2d, o_tnhusc, o_tnhusc, o_dtlsc, &
@@ -201,5 +203,5 @@
          cldh, cldt, JrNt, cldljn, cldmjn, cldhjn, &
          cldtjn, cldq, flwp, fiwp, ue, ve, uq, vq, &
-         plcl, plfc, wbeff, upwd, dnwd, dnwd0, prw, &
+         plcl, plfc, wbeff, upwd, dnwd, dnwd0, prw, prlw, prsw, &
          s_pblh, s_pblt, s_lcl, s_therm, uwriteSTD, &
          vwriteSTD, wwriteSTD, phiwriteSTD, qwriteSTD, &
@@ -236,5 +238,6 @@
          zphi, u_seri, v_seri, omega, cldfra, &
 !>jyg
-         rneb, rnebjn, zx_rh, d_t_dyn, d_q_dyn, &
+         rneb, rnebjn, zx_rh, d_t_dyn, d_q_dyn,  &
+         d_ql_dyn, d_qs_dyn, &
          d_u_dyn, d_v_dyn, d_t_con, d_t_ajsb, d_t_ajs, &
          d_u_ajs, d_v_ajs, &
@@ -288,5 +291,5 @@
 
     ! Input
-    INTEGER :: itap, ivap, read_climoz
+    INTEGER :: itap, ivap, iliq, isol, read_climoz
     INTEGER, DIMENSION(klon) :: lmax_th
     LOGICAL :: aerosol_couple, ok_sync
@@ -671,4 +674,6 @@
        ENDIF !iflag_con .GE. 3
        CALL histwrite_phy(o_prw, prw)
+       CALL histwrite_phy(o_prlw, prlw)
+       CALL histwrite_phy(o_prsw, prsw)
        CALL histwrite_phy(o_s_pblh, s_pblh)
        CALL histwrite_phy(o_s_pblt, s_pblt)
@@ -1064,7 +1069,24 @@
 
        CALL histwrite_phy(o_dtphy, d_t)
+
        CALL histwrite_phy(o_dqphy,  d_qx(:,:,ivap))
        CALL water_int(klon,klev,d_qx(:,:,ivap),zmasse,zx_tmp_fi2d)
        CALL histwrite_phy(o_dqphy2d,  zx_tmp_fi2d)
+
+       CALL histwrite_phy(o_dqlphy,  d_qx(:,:,iliq))
+       CALL water_int(klon,klev,d_qx(:,:,iliq),zmasse,zx_tmp_fi2d)
+       CALL histwrite_phy(o_dqlphy2d,  zx_tmp_fi2d)
+
+       IF (nqo.EQ.3) THEN
+       CALL histwrite_phy(o_dqsphy,  d_qx(:,:,isol))
+       CALL water_int(klon,klev,d_qx(:,:,isol),zmasse,zx_tmp_fi2d)
+       CALL histwrite_phy(o_dqsphy2d,  zx_tmp_fi2d)
+       ELSE 
+       zx_tmp_fi3d=0.0
+       CALL histwrite_phy(o_dqsphy,  zx_tmp_fi3d)
+       zx_tmp_fi2d=0.0
+       CALL histwrite_phy(o_dqsphy2d,  zx_tmp_fi2d)
+       ENDIF
+
        DO nsrf=1, nbsrf
           IF (vars_defined) zx_tmp_fi2d(1 : klon) = falb1( 1 : klon, nsrf)
@@ -1103,7 +1125,17 @@
        CALL histwrite_phy(o_clwcon, clwcon0)
        CALL histwrite_phy(o_dtdyn, d_t_dyn)
+
        CALL histwrite_phy(o_dqdyn, d_q_dyn)
        CALL water_int(klon,klev,d_q_dyn,zmasse,zx_tmp_fi2d)
        CALL histwrite_phy(o_dqdyn2d,zx_tmp_fi2d)
+
+       CALL histwrite_phy(o_dqldyn, d_ql_dyn)
+       CALL water_int(klon,klev,d_ql_dyn,zmasse,zx_tmp_fi2d)
+       CALL histwrite_phy(o_dqldyn2d,zx_tmp_fi2d)
+
+       CALL histwrite_phy(o_dqsdyn, d_qs_dyn)
+       CALL water_int(klon,klev,d_qs_dyn,zmasse,zx_tmp_fi2d)
+       CALL histwrite_phy(o_dqsdyn2d,zx_tmp_fi2d)
+
        CALL histwrite_phy(o_dudyn, d_u_dyn)
        CALL histwrite_phy(o_dvdyn, d_v_dyn)
Index: /LMDZ5/trunk/libf/phylmd/physiq_mod.F90
===================================================================
--- /LMDZ5/trunk/libf/phylmd/physiq_mod.F90	(revision 2495)
+++ /LMDZ5/trunk/libf/phylmd/physiq_mod.F90	(revision 2496)
@@ -115,4 +115,6 @@
     !! d_t_dyn-input-R-tendance dynamique pour "t" (K/s)
     !! d_q_dyn-input-R-tendance dynamique pour "q" (kg/kg/s)
+    !! d_ql_dyn-input-R-tendance dynamique pour "ql" (kg/kg/s)
+    !! d_qs_dyn-input-R-tendance dynamique pour "qs" (kg/kg/s)
     !! flxmass_w -input-R- flux de masse verticale
     !! d_u-----output-R-tendance physique de "u" (m/s/s)
@@ -1660,4 +1662,6 @@
              d_t_dyn(i,k) = (t_seri(i,k)-t_ancien(i,k))/dtime
              d_q_dyn(i,k) = (q_seri(i,k)-q_ancien(i,k))/dtime
+             d_ql_dyn(i,k) = (ql_seri(i,k)-ql_ancien(i,k))/dtime
+             d_qs_dyn(i,k) = (qs_seri(i,k)-qs_ancien(i,k))/dtime
           ENDDO
        ENDDO
@@ -1688,4 +1692,6 @@
              d_t_dyn(i,k) = 0.0
              d_q_dyn(i,k) = 0.0
+             d_ql_dyn(i,k) = 0.0
+             d_qs_dyn(i,k) = 0.0
           ENDDO
        ENDDO
@@ -4297,10 +4303,18 @@
     CALL diag_slp(klon,t_seri,paprs,pplay,pphis,ptstar,pt0,slp)
     !
-    !cc prw = eau precipitable
+    !cc prw  = eau precipitable
+    !   prlw = colonne eau liquide 
+    !   prlw = colonne eau solide
     DO i = 1, klon
        prw(i) = 0.
+       prlw(i) = 0.
+       prsw(i) = 0.
        DO k = 1, klev
           prw(i) = prw(i) + &
                q_seri(i,k)*(paprs(i,k)-paprs(i,k+1))/RG
+          prlw(i) = prlw(i) + &
+               ql_seri(i,k)*(paprs(i,k)-paprs(i,k+1))/RG
+          prsw(i) = prsw(i) + &
+               qs_seri(i,k)*(paprs(i,k)-paprs(i,k+1))/RG
        ENDDO
     ENDDO
@@ -4405,4 +4419,6 @@
           t_ancien(i,k) = t_seri(i,k)
           q_ancien(i,k) = q_seri(i,k)
+          ql_ancien(i,k) = ql_seri(i,k)
+          qs_ancien(i,k) = qs_seri(i,k)
        ENDDO
     ENDDO
@@ -4541,6 +4557,6 @@
     CALL phys_output_write(itap, pdtphys, paprs, pphis,  &
          pplay, lmax_th, aerosol_couple,                 &
-         ok_ade, ok_aie, ivap, new_aod, ok_sync,         &
-         ptconv, read_climoz, clevSTD,                   &
+         ok_ade, ok_aie, ivap, iliq, isol, new_aod,      & 
+         ok_sync, ptconv, read_climoz, clevSTD,          &
          ptconvth, d_t, qx, d_qx, zmasse,                &
          flag_aerosol, flag_aerosol_strat, ok_cdnc)
