Index: LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F	(revision 385)
+++ LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F	(revision 391)
@@ -456,5 +456,5 @@
       REAL cldt(klon),cldq(klon) !nuage total, eau liquide integree
 c
-      REAL zxtsol(klon), zxqsol(klon), zxsnow(klon)
+      REAL zxtsol(klon), zxqsol(klon), zxsnow(klon), zxfluxlat(klon)
 c
       REAL dist, rmu0(klon), fract(klon)
@@ -881,9 +881,10 @@
      .                "ave(X)", zsto,zout)
 c
-         CALL histdef(nid_day, "rain", "Precipitation", "mm/day",
-     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
-     .                "ave(X)", zsto,zout)
-c
-         CALL histdef(nid_day, "snow", "Snow fall", "mm/day",
+         CALL histdef(nid_day, "rain","Precipitation Totale liq+sol"
+     .                , "kg/s",
+     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
+     .                "ave(X)", zsto,zout)
+c
+         CALL histdef(nid_day, "snow", "Snow fall", "kg/s",
      .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
      .                "ave(X)", zsto,zout)
@@ -893,5 +894,5 @@
      .                "ave(X)", zsto,zout)
 c
-         CALL histdef(nid_day, "evap", "Evaporation", "mm/day",
+         CALL histdef(nid_day, "evap", "Evaporation", "kg/s",
      .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
      .                "ave(X)", zsto,zout)
@@ -905,9 +906,10 @@
      .                "ave(X)", zsto,zout)
 c
-         CALL histdef(nid_day, "sols", "Solar rad. at surf.", "W/m2",
-     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
-     .                "ave(X)", zsto,zout)
-c
-         CALL histdef(nid_day, "soll", "IR rad. at surface", "W/m2",
+         CALL histdef(nid_day, "sols", "Net Solar rad. at surf.", 
+     .                "W/m2",
+     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
+     .                "ave(X)", zsto,zout)
+c
+         CALL histdef(nid_day, "soll", "Net IR rad. at surface", "W/m2",
      .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
      .                "ave(X)", zsto,zout)
@@ -1093,17 +1095,18 @@
      .                "ave(X)", zsto,zout)
 c
-         CALL histdef(nid_mth, "rain", "Precipitation", "mm/day",
-     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
-     .                "ave(X)", zsto,zout)
-c
-         CALL histdef(nid_mth, "plul", "Large-scale Precip.", "mm/day",
-     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
-     .                "ave(X)", zsto,zout)
-c
-         CALL histdef(nid_mth, "pluc", "Convective Precip.", "mm/day",
-     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
-     .                "ave(X)", zsto,zout)
-c
-         CALL histdef(nid_mth, "snow", "Snow fall", "mm/day",
+         CALL histdef(nid_mth, "rain", "Precipitation Totale liq+sol", 
+     .                "kg/s",
+     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
+     .                "ave(X)", zsto,zout)
+c
+         CALL histdef(nid_mth, "plul", "Large-scale Precip.", "kg/s",
+     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
+     .                "ave(X)", zsto,zout)
+c
+         CALL histdef(nid_mth, "pluc", "Convective Precip.", "kg/s",
+     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
+     .                "ave(X)", zsto,zout)
+c
+         CALL histdef(nid_mth, "snow", "Snow fall", "kg/s",
      .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
      .                "ave(X)", zsto,zout)
@@ -1113,5 +1116,5 @@
      .                "ave(X)", zsto,zout)
 c
-         CALL histdef(nid_mth, "evap", "Evaporation", "mm/day",
+         CALL histdef(nid_mth, "evap", "Evaporation", "kg/s",
      .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
      .                "ave(X)", zsto,zout)
@@ -1559,9 +1562,10 @@
      .                "inst(X)", zsto,zout)
 c
-         CALL histdef(nid_ins, "rain", "Precipitation", "mm/day",
+         CALL histdef(nid_ins, "rain", "Precipitation Totale liq+sol", 
+     .                "kg/s",
      .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
      .                "inst(X)", zsto,zout)
 c
-         CALL histdef(nid_ins, "snow", "Snow fall", "mm/day",
+         CALL histdef(nid_ins, "snow", "Snow fall", "kg/s",
      .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
      .                "inst(X)", zsto,zout)
@@ -1575,5 +1579,5 @@
      .                "inst(X)", zsto,zout)
 c
-         CALL histdef(nid_ins, "evap", "Evaporation", "mm/day",
+         CALL histdef(nid_ins, "evap", "Evaporation", "kg/s",
      .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
      .                "inst(X)", zsto,zout)
@@ -1787,6 +1791,8 @@
           ztsol(i) = 0.
         ENDDO
-        DO i = 1, klon
-          ztsol(i) = ztsol(i) + ftsol(i,nsrf)*pctsrf(i,nsrf)
+        DO nsrf = 1, nbsrf
+          DO i = 1, klon
+            ztsol(i) = ztsol(i) + ftsol(i,nsrf)*pctsrf(i,nsrf)
+          ENDDO
         ENDDO
         ztit='after dynamic'
@@ -1988,4 +1994,5 @@
       DO i = 1, klon
          zxtsol(i) = 0.0
+         zxfluxlat(i) = 0.0
          IF ( abs( pctsrf(i, is_ter) + pctsrf(i, is_lic) + 
      $       pctsrf(i, is_oce) + pctsrf(i, is_sic)  - 1.) .GT. EPSFRA) 
@@ -1996,10 +2003,11 @@
       ENDDO
       DO nsrf = 1, nbsrf
-      DO i = 1, klon
-c$$$        IF (pctsrf(i,nsrf) .GE. EPSFRA) THEN 
+        DO i = 1, klon
+c$$$      IF (pctsrf(i,nsrf) .GE. EPSFRA) THEN 
             ftsol(i,nsrf) = ftsol(i,nsrf) + d_ts(i,nsrf)
             zxtsol(i) = zxtsol(i) + ftsol(i,nsrf)*pctsrf(i,nsrf)
-c$$$        ENDIF 
-      ENDDO
+            zxfluxlat(i) = zxfluxlat(i) + fluxlat(i,nsrf)*pctsrf(i,nsrf)
+c$$$      ENDIF 
+        ENDDO
       ENDDO
 
@@ -2524,5 +2532,7 @@
 c
       DO i = 1, klon
-         bils(i) = radsol(i) - sens(i) - evap(i)*RLVTT
+c         bils(i) = radsol(i) - sens(i) - evap(i)*RLVTT
+c a la demande de JLD
+         bils(i) = radsol(i) - sens(i) + zxfluxlat(i)
       ENDDO
 c
@@ -2757,5 +2767,5 @@
 c
       DO i = 1, klon
-         zx_tmp_fi2d(i) = (rain_fall(i) + snow_fall(i))* 86400.
+         zx_tmp_fi2d(i) = (rain_fall(i) + snow_fall(i))
       ENDDO
       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
