Index: /trunk/LMDZ.GENERIC/README
===================================================================
--- /trunk/LMDZ.GENERIC/README	(revision 1483)
+++ /trunk/LMDZ.GENERIC/README	(revision 1484)
@@ -1094,2 +1094,5 @@
 == 14/10/2015 == MT
 - Cleanup of callcorrk.F90
+
+== 15/10/2015 == MT
+- Harmonization of the calculation of the surface tracer tendencies in physiq.F90.
Index: /trunk/LMDZ.GENERIC/libf/phystd/condense_co2.F90
===================================================================
--- /trunk/LMDZ.GENERIC/libf/phystd/condense_co2.F90	(revision 1483)
+++ /trunk/LMDZ.GENERIC/libf/phystd/condense_co2.F90	(revision 1484)
@@ -2,5 +2,5 @@
           pcapcal,pplay,pplev,ptsrf,pt,                  &
           pphi,pdt,pdu,pdv,pdtsrf,pu,pv,pq,pdq,          &
-          piceco2,albedo,pemisurf,                       &
+          piceco2,pdqsurfc,albedo,pemisurf,              &
           albedo_bareground,albedo_co2_ice_SPECTV,       &
           pdtc,pdtsrfc,pdpsrf,pduc,pdvc,                 &
@@ -89,4 +89,5 @@
       REAL,INTENT(OUT) :: pdvc(ngrid,nlayer)
       REAL,INTENT(OUT) :: pdqc(ngrid,nlayer,nq)
+      REAL,INTENT(OUT) :: pdqsurfc(ngrid)
 
 !-----------------------------------------------------------------------
@@ -102,5 +103,4 @@
       REAL ztnuc (ngrid,nlayer)
       REAL ztcondsol(ngrid) 
-      REAL zdiceco2(ngrid)
       REAL zcondicea(ngrid,nlayer), zcondices(ngrid)
       REAL zfallice(ngrid), Mfallice(ngrid) 
@@ -225,5 +225,5 @@
          pdpsrf(ig) = 0.
          condsub(ig) = .false.
-         zdiceco2(ig) = 0.
+         pdqsurfc(ig) = 0.
       ENDDO
 
@@ -435,7 +435,7 @@
 !     Changing CO2 ice amount and pressure
 
-            zdiceco2(ig) = zcondices(ig) + zfallice(ig)
-            piceco2(ig)  = piceco2(ig) + zdiceco2(ig)*ptimestep
-            pdpsrf(ig)   = -zdiceco2(ig)*g
+            pdqsurfc(ig) = zcondices(ig) + zfallice(ig)
+            piceco2(ig)  = piceco2(ig) + pdqsurfc(ig)*ptimestep
+            pdpsrf(ig)   = -pdqsurfc(ig)*g
 
             IF(ABS(pdpsrf(ig)*ptimestep).GT.pplev(ig,1)) THEN
@@ -461,8 +461,8 @@
          if(.not.piceco2(ig).ge.0.) THEN
             if(piceco2(ig).le.-1.e-8) print*,   &
-                'WARNING in condense_co2cloud: piceco2(',ig,')=', piceco2(ig)
+              'WARNING : in condense_co2cloud: piceco2(',ig,')=', piceco2(ig)
             piceco2(ig)=0.
          endif
-         if (piceco2(ig) .gt. 1.) then  ! CO2 Albedo condition changed to 1 mm coverage. Change by MT2015.
+         if (piceco2(ig) .gt. 1.) then  ! CO2 Albedo condition changed to ~1 mm coverage. Change by MT2015.
 	    DO nw=1,L_NSPECTV
                albedo(ig,nw) = albedo_co2_ice_SPECTV(nw)
@@ -476,4 +476,12 @@
             pemisurf(ig)  = emissiv
          end if
+         
+         piceco2(ig)  = piceco2(ig) - pdqsurfc(ig)*ptimestep ! This line was added so that tendencies are added outside the routine. MT2015.
+         if(.not.piceco2(ig).ge.0.) THEN
+            if(piceco2(ig).le.-1.e-8) print*,   &
+              'WARNING 2 : in condense_co2cloud: piceco2(',ig,')=', piceco2(ig)
+            piceco2(ig)=0.
+         endif
+         
       end do
 
Index: /trunk/LMDZ.GENERIC/libf/phystd/hydrol.F90
===================================================================
--- /trunk/LMDZ.GENERIC/libf/phystd/hydrol.F90	(revision 1483)
+++ /trunk/LMDZ.GENERIC/libf/phystd/hydrol.F90	(revision 1484)
@@ -393,7 +393,7 @@
 
 
-      do ig=1,ngrid
-         dqs_hyd(ig,iliq)=(zqsurf(ig,iliq) - qsurf(ig,iliq))/ptimestep
-         dqs_hyd(ig,iice)=(zqsurf(ig,iice) - qsurf(ig,iice))/ptimestep
+      do ig=1,ngrid ! We calculate here the tracer tendencies. Don't forget that we have to retrieve the dqsurf tendencies we added at the beginning of the routine !
+         dqs_hyd(ig,iliq)=(zqsurf(ig,iliq) - qsurf(ig,iliq))/ptimestep - dqsurf(ig,iliq)
+         dqs_hyd(ig,iice)=(zqsurf(ig,iice) - qsurf(ig,iice))/ptimestep - dqsurf(ig,iice)
       enddo
 
Index: /trunk/LMDZ.GENERIC/libf/phystd/physiq.F90
===================================================================
--- /trunk/LMDZ.GENERIC/libf/phystd/physiq.F90	(revision 1483)
+++ /trunk/LMDZ.GENERIC/libf/phystd/physiq.F90	(revision 1484)
@@ -279,5 +279,5 @@
       ! For Surface Tracers : (kg/m2/s)
       real dqsurf(ngrid,nq)                 ! Cumulated tendencies.
-      real zdqslscale(ngrid,nq)             ! Largescale routine.
+      real zdqsurfc(ngrid)                  ! Condense_co2 routine.
       real zdqsdif(ngrid,nq)                ! Turbdiff/vdifc routines.
       real zdqssed(ngrid,nq)                ! Callsedim routine.
@@ -1200,15 +1200,17 @@
                            capcal,pplay,pplev,tsurf,pt,                  &
                            pphi,pdt,pdu,pdv,zdtsurf,pu,pv,pq,pdq,        &
-                           qsurf(1,igcm_co2_ice),albedo,emis,            &
+                           qsurf(1:ngrid,igcm_co2_ice),zdqsurfc,         &
+                           albedo,emis,                                  &
                            albedo_bareground,albedo_co2_ice_SPECTV,      &
                            zdtc,zdtsurfc,pdpsrf,zduc,zdvc,               &
                            zdqc)
 
-         pdt(1:ngrid,1:nlayer)=pdt(1:ngrid,1:nlayer)+zdtc(1:ngrid,1:nlayer)
-         pdv(1:ngrid,1:nlayer)=pdv(1:ngrid,1:nlayer)+zdvc(1:ngrid,1:nlayer)
-         pdu(1:ngrid,1:nlayer)=pdu(1:ngrid,1:nlayer)+zduc(1:ngrid,1:nlayer)
-         zdtsurf(1:ngrid) = zdtsurf(1:ngrid) + zdtsurfc(1:ngrid)
-
-         pdq(1:ngrid,1:nlayer,1:nq)=pdq(1:ngrid,1:nlayer,1:nq)+ zdqc(1:ngrid,1:nlayer,1:nq) 
+         pdt(1:ngrid,1:nlayer) = pdt(1:ngrid,1:nlayer)+zdtc(1:ngrid,1:nlayer)
+         pdv(1:ngrid,1:nlayer) = pdv(1:ngrid,1:nlayer)+zdvc(1:ngrid,1:nlayer)
+         pdu(1:ngrid,1:nlayer) = pdu(1:ngrid,1:nlayer)+zduc(1:ngrid,1:nlayer)
+         zdtsurf(1:ngrid)      = zdtsurf(1:ngrid) + zdtsurfc(1:ngrid)
+
+         pdq(1:ngrid,1:nlayer,1:nq)   = pdq(1:ngrid,1:nlayer,1:nq)+ zdqc(1:ngrid,1:nlayer,1:nq)
+         dqsurf(1:ngrid,igcm_co2_ice) = dqsurf(1:ngrid,igcm_co2_ice) + zdqsurfc(1:ngrid)
 
          ! test energy conservation
@@ -1503,6 +1505,8 @@
                         sea_ice)
 
-            zdtsurf(1:ngrid)    = zdtsurf(1:ngrid) + zdtsurf_hyd(1:ngrid)
-            qsurf(1:ngrid,1:nq) = qsurf(1:ngrid,1:nq) + ptimestep*dqs_hyd(1:ngrid,1:nq)
+            zdtsurf(1:ngrid)     = zdtsurf(1:ngrid) + zdtsurf_hyd(1:ngrid)
+            dqsurf(1:ngrid,1:nq) = dqsurf(1:ngrid,1:nq) + dqs_hyd(1:ngrid,1:nq)
+            
+            qsurf(1:ngrid,1:nq) = qsurf(1:ngrid,1:nq) + ptimestep*dqsurf(1:ngrid,1:nq)
 
             ! Test energy conservation
@@ -1525,5 +1529,5 @@
          else ! of if (hydrology)
 
-            qsurf(1:ngrid,1:nq)=qsurf(1:ngrid,1:nq)+ptimestep*dqsurf(1:ngrid,1:nq)
+            qsurf(1:ngrid,1:nq) = qsurf(1:ngrid,1:nq) + ptimestep*dqsurf(1:ngrid,1:nq)
 
          end if ! of if (hydrology)
