Index: LMDZ.3.3/branches/rel-LF/libf/phylmd/clmain.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/phylmd/clmain.F	(revision 257)
+++ LMDZ.3.3/branches/rel-LF/libf/phylmd/clmain.F	(revision 258)
@@ -93,5 +93,5 @@
       REAL dflux_t(klon), dflux_q(klon)
       REAL flux_u(klon,klev, nbsrf), flux_v(klon,klev, nbsrf)
-      REAL rugmer(klon), agesno(klon),rugoro(klon)
+      REAL rugmer(klon), agesno(klon,nbsrf),rugoro(klon)
       REAL cdragh(klon), cdragm(klon)
       integer jour            ! jour de l'annee en cours
@@ -136,5 +136,5 @@
       REAL yalb(klon),yevap(klon)
       REAL yu1(klon), yv1(klon)
-      real ysnow(klon), yqsol(klon)
+      real ysnow(klon), yqsol(klon), yagesno(klon)
       real yrain_f(klon), ysnow_f(klon)
       real ysollw(klon), ysolsw(klon), ysollwdown(klon)
@@ -374,8 +374,15 @@
         yrain_f(j) = rain_f(i)
         ysnow_f(j) = snow_f(i)
+        yagesno(j) = agesno(i,nsrf)
         yfder(j) = fder(i)
         ytaux(j) = flux_u(i,1,nsrf)
         ytauy(j) = flux_v(i,1,nsrf)
-        ysolsw(j) = solsw(i)
+c$$$        ysolsw(j) = solsw(i)
+       ysolsw(j) = (1 - albe(i,nsrf)) 
+     $      /(1 - pctsrf(i,is_ter) * albe(i,is_ter) 
+     $      - pctsrf(i, is_lic) *albe(i,is_lic) 
+     $      - pctsrf(i, is_oce) *albe(i,is_oce)
+     $      - pctsrf(i, is_sic) *albe(i,is_sic) 
+     $      ) * solsw(i)
         ysollw(j) = sollw(i)
         ysollwdown(j) = sollwdown(i)
@@ -451,5 +458,5 @@
 c$$$     e          ysollw, ysolsw,
      e          ysollw, ysollwdown, ysolsw,yfluxlat,
-     s          pctsrf_new, agesno,
+     s          pctsrf_new, yagesno,
      s          y_d_t, y_d_q, y_d_ts, yz0_new,
      s          y_flux_t, y_flux_q, y_dflux_t, y_dflux_q)
@@ -569,5 +576,4 @@
      e                delp,radsol,evap,albedo,snow,qsol, 
      e                precip_rain, precip_snow, fder, taux, tauy,
-c$$$     e                lwdown, swdown, 
      $                sollw, sollwdown, swdown,fluxlat, 
      s                pctsrf_new, agesno,
Index: LMDZ.3.3/branches/rel-LF/libf/phylmd/condsurf.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/phylmd/condsurf.F	(revision 257)
+++ LMDZ.3.3/branches/rel-LF/libf/phylmd/condsurf.F	(revision 258)
@@ -163,5 +163,5 @@
      $       pctsrf(i, is_oce) + pctsrf(i, is_sic)  - 1.) .GT. EPSFRA) 
      $       THEN 
-             WRITE(*,*) 'physiq : pb sous surface au point ', i, 
+             WRITE(*,*) 'condsurf : pb sous surface au point ', i, 
      $           pctsrf(i, 1 : nbsrf)
          ENDIF 
Index: LMDZ.3.3/branches/rel-LF/libf/phylmd/interface_surf.F90
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/phylmd/interface_surf.F90	(revision 257)
+++ LMDZ.3.3/branches/rel-LF/libf/phylmd/interface_surf.F90	(revision 258)
@@ -192,5 +192,5 @@
   real, dimension(klon):: alb_ice
   real, dimension(klon):: tsurf_temp
-  real, allocatable, dimension(:), save :: alb_neig_grid
+!!  real, allocatable, dimension(:), save :: alb_neig_grid
   real, dimension(klon):: alb_neig, alb_eau
   real, DIMENSION(klon):: zfra
@@ -294,5 +294,5 @@
 !
 !!$ PB ATTENTION changement ordre des appels
-    CALL albsno(klon,agesno,alb_neig_grid)  
+!!$    CALL albsno(klon,agesno,alb_neig_grid)  
 
     if (.not. ok_veget) then
@@ -337,18 +337,21 @@
      &   tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l)
 
-       DO ii = 1, knon
-         index = knindex(ii)
-         alb_neig(ii) = alb_neig_grid(index)
-         agesno(index)  = (agesno(index) + (1.-agesno(index)/50.)*dtime/86400.)&
-            &             * EXP(-1.*MAX(0.0,precip_snow(ii))*dtime/0.3)
-         agesno(index) = MAX(agesno(index),0.0)
-         IF(snow(ii) .LT. 0.0001) agesno(index) = 0.
-       ENDDO
-       zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0)))
-       alb_new = alb_neig*zfra + alb_new*(1.0-zfra)
-       z0_new = SQRT(z0_new**2+rugoro**2)
+!!$       DO ii = 1, knon
+!!$         index = knindex(ii)
+!!$         alb_neig(ii) = alb_neig_grid(index)
+!!$         agesno(index)  = (agesno(index) + (1.-agesno(index)/50.)*dtime/86400.)&
+!!$            &             * EXP(-1.*MAX(0.0,precip_snow(ii))*dtime/0.3)
+!!$         agesno(index) = MAX(agesno(index),0.0)
+!!$         IF(snow(ii) .LT. 0.0001) agesno(index) = 0.
+!!$       ENDDO
+
+     call albsno(klon,knon,dtime,agesno(:),alb_neig(:), precip_snow(:))  
+     where (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0.
+     zfra = max(0.0,min(1.0,snow/(snow+10.0)))
+     alb_new(1 : knon)  = alb_neig(1 : knon) *zfra + alb_new(1 : knon)*(1.0-zfra)
+     z0_new = sqrt(z0_new**2+rugoro**2)
 
     else
-      CALL albsno(klon,agesno,alb_neig_grid)  
+!!      CALL albsno(klon,agesno,alb_neig_grid)  
 !
 !  appel a sechiba
@@ -413,4 +416,6 @@
     beta = 1.
     dif_grnd = 0.
+    alb_neig(:) = 0.
+    agesno(:) = 0.
 
     call calcul_fluxs( klon, knon, nisurf, dtime, &
@@ -552,12 +557,12 @@
 !
 !
-      zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0)))
-      DO ii = 1, knon
-        index = knindex(ii)
-        alb_neig(ii) = alb_neig_grid(index)
-      ENDDO
-      alb_new = alb_neig*zfra + 0.6 * (1.0-zfra)
-      
-      z0_new = 0.001
+     CALL albsno(klon,knon,dtime,agesno(:),alb_neig(:), precip_snow(:))  
+     WHERE (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0.
+     zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0)))
+!!$     alb_new(1 : knon) = alb_neig(1 : knon) *zfra + 0.6 * (1.0-zfra)
+     alb_new(1 : knon) = 0.6
+     
+     z0_new = 0.001
+     z0_new = SQRT(z0_new**2+rugoro**2)
 
   else if (nisurf == is_lic) then
@@ -601,14 +606,9 @@
 ! calcul albedo
 !
-    zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0)))
-    DO ii = 1, knon
-      index = knindex(ii)
-      alb_neig(ii) = alb_neig_grid(index)
-      agesno(index)  = (agesno(index) + (1.-agesno(index)/50.)*dtime/86400.)&
-         &             * EXP(-1.*MAX(0.0,precip_snow(ii))*dtime/0.3)
-      agesno(index) = MAX(agesno(index),0.0)
-        IF(snow(ii) .LT. 0.0001) agesno(index) = 0.
-    ENDDO
-    alb_new = alb_neig*zfra + 0.6 * (1.0-zfra)
+     CALL albsno(klon,knon,dtime,agesno(:),alb_neig(:), precip_snow(:))  
+     WHERE (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0.
+     zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0)))
+!!$     alb_new(1 : knon)  = alb_neig(1 : knon)*zfra + 0.6 * (1.0-zfra)
+     alb_new(1 : knon)  = 0.6
 !
 ! Rugosite
@@ -1997,4 +1997,5 @@
 #include "YOETHF.inc"
 #include "FCTTRE.inc"
+#include "indicesol.inc"
 
 ! Parametres d'entree
@@ -2046,13 +2047,15 @@
 ! Traitement neige et humidite du sol
 !
-    if (nisurf == is_oce) then
-      snow = 0.
-      qsol = max_eau_sol
-    else
-      snow = snow + (precip_snow * dtime)
-      where (snow > epsilon(snow)) snow = max(0.0, snow - (evap * dtime))
-!      snow = max(0.0, snow + (precip_snow - evap) * dtime)
-      qsol = qsol + (precip_rain - evap) * dtime
-    endif 
+!!$  WRITE(*,*)'test calcul_flux, surface ', nisurf
+!!PB test
+!!$    if (nisurf == is_oce) then
+!!$      snow = 0.
+!!$      qsol = max_eau_sol
+!!$    else
+!!$      where (precip_snow > 0.) snow = snow + (precip_snow * dtime)
+!!$      where (snow > epsilon(snow)) snow = max(0.0, snow - (evap * dtime))
+!!$!      snow = max(0.0, snow + (precip_snow - evap) * dtime)
+!!$      where (precip_rain > 0.) qsol = qsol + (precip_rain - evap) * dtime
+!!$    endif 
     IF (nisurf /= is_ter) qsol = max_eau_sol
 
@@ -2161,7 +2164,7 @@
 !      qsol(i) = qsol(i) + (fq_fonte * dtime)
 !    endif
-    if (nisurf == is_ter)  &
-     &  run_off(i) = run_off(i) + max(qsol(i) - max_eau_sol, 0.0)
-    qsol(i) = min(qsol(i), max_eau_sol) 
+!!$    if (nisurf == is_ter)  &
+!!$     &  run_off(i) = run_off(i) + max(qsol(i) - max_eau_sol, 0.0)
+!!$    qsol(i) = min(qsol(i), max_eau_sol) 
   ENDDO
 
@@ -2263,11 +2266,12 @@
 !#########################################################################
 !
-  SUBROUTINE albsno(klon, agesno,alb_neig_grid)
+  SUBROUTINE albsno(klon, knon,dtime,agesno,alb_neig_grid, precip_snow)
   IMPLICIT none
  
-  integer :: klon
+  INTEGER :: klon, knon
   INTEGER, PARAMETER :: nvm = 8
+  REAL   :: dtime
   REAL, dimension(klon,nvm) :: veget
-  REAL, DIMENSION(klon) :: alb_neig_grid, agesno
+  REAL, DIMENSION(klon) :: alb_neig_grid, agesno, precip_snow
  
   INTEGER :: i, nv
@@ -2280,12 +2284,20 @@
   veget = 0.
   veget(:,1) = 1.     ! desert partout
-  DO i = 1, klon
+  DO i = 1, knon
     alb_neig_grid(i) = 0.0
   ENDDO
   DO nv = 1, nvm
-    DO i = 1, klon
+    DO i = 1, knon
       as = init(nv)+decay(nv)*EXP(-agesno(i)/5.)
       alb_neig_grid(i) = alb_neig_grid(i) + veget(i,nv)*as
     ENDDO
+  ENDDO
+!
+!! modilation en fonction de l'age de la neige
+!
+  DO i = 1, knon
+    agesno(i)  = (agesno(i) + (1.-agesno(i)/50.)*dtime/86400.)&
+            &             * EXP(-1.*MAX(0.0,precip_snow(i))*dtime/0.3)
+    agesno(i) =  MAX(agesno(i),0.0)
   ENDDO
  
@@ -2337,4 +2349,5 @@
 #include "YOETHF.inc"
 #include "FCTTRE.inc"
+#include "indicesol.inc"
 
 ! Parametres d'entree
@@ -2436,4 +2449,8 @@
   enddo
 
+
+  WHERE (precip_snow > 0.) snow = snow + (precip_snow * dtime)
+  WHERE (evap > 0 ) snow = MAX(0.0, snow - (evap * dtime))
+  qsol = qsol + (precip_rain - evap) * dtime
 !
 ! Y'a-t-il fonte de neige?
@@ -2443,5 +2460,9 @@
      & .AND. tsurf_new(i) >= RTT)
     if (neige_fond) then
-      tsurf_new(i) = RTT  
+      fq_fonte = MIN( MAX((tsurf_new(i)-RTT )/chasno,0.0),snow(i))
+      snow(i) = max(0., snow(i) - fq_fonte)
+      qsol(i) = qsol(i) + fq_fonte 
+      tsurf_new(i) = tsurf_new(i) - fq_fonte * chasno  
+      IF (nisurf == is_sic .OR. nisurf == is_lic ) tsurf_new(i) = RTT -1.8
       d_ts(i) = tsurf_new(i) - tsurf(i)
 !      zx_h_ts(i) = tsurf_new(i) * RCPD * zx_pkh(i)
@@ -2449,21 +2470,19 @@
 !== flux_q est le flux de vapeur d'eau: kg/(m**2 s)  positive vers bas
 !== flux_t est le flux de cpt (energie sensible): j/(m**2 s)
-      evap(i) = - zx_mq(i) - zx_nq(i) * tsurf_new(i) 
-      fluxlat(i) = - evap(i) * zx_sl(i)
-      fluxsens(i) = zx_mh(i) + zx_nh(i) * tsurf_new(i)
+!!$      evap(i) = - zx_mq(i) - zx_nq(i) * tsurf_new(i) 
+!!$      fluxlat(i) = - evap(i) * zx_sl(i)
+!!$      fluxsens(i) = zx_mh(i) + zx_nh(i) * tsurf_new(i)
 ! Derives des flux dF/dTs (W m-2 K-1):
-      dflux_s(i) = zx_nh(i)
-      dflux_l(i) = (zx_sl(i) * zx_nq(i))
-      bilan_f = radsol(i) + fluxsens(i) - (zx_sl(i) * evap (i)) - &
-     &          dif_grnd(i) * (tsurf_new(i) - t_grnd) - &
-     &          RCPD * (zx_pkh(i))/cal(i)/dtime * (tsurf_new(i) - tsurf(i))
-      bilan_f = max(0., bilan_f)
-      fq_fonte = bilan_f / zx_sl(i)
-      snow(i) = max(0., snow(i) - fq_fonte * dtime)
-      qsol(i) = qsol(i) + (fq_fonte * dtime)
-      if (nisurf == is_ter)  &
-     &  run_off(i) = run_off(i) + max(qsol(i) - max_eau_sol, 0.0)
-      qsol(i) = min(qsol(i), max_eau_sol) 
-    endif
+!!$      dflux_s(i) = zx_nh(i)
+!!$      dflux_l(i) = (zx_sl(i) * zx_nq(i))
+!!$      bilan_f = radsol(i) + fluxsens(i) - (zx_sl(i) * evap (i)) - &
+!!$     &          dif_grnd(i) * (tsurf_new(i) - t_grnd) - &
+!!$     &          RCPD * (zx_pkh(i))/cal(i)/dtime * (tsurf_new(i) - tsurf(i))
+!!$      bilan_f = max(0., bilan_f)
+!!$      fq_fonte = bilan_f / zx_sl(i)
+    endif
+    IF (nisurf == is_ter)  &
+       &  run_off(i) = run_off(i) + MAX(qsol(i) - max_eau_sol, 0.0)
+    qsol(i) = MIN(qsol(i), max_eau_sol) 
   enddo
 
Index: LMDZ.3.3/branches/rel-LF/libf/phylmd/phyredem.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/phylmd/phyredem.F	(revision 257)
+++ LMDZ.3.3/branches/rel-LF/libf/phylmd/phyredem.F	(revision 258)
@@ -42,5 +42,5 @@
       REAL radsol(klon)
       REAL frugs(klon,nbsrf)
-      REAL agesno(klon)
+      REAL agesno(klon,nbsrf)
       REAL zmea(klon)
       REAL zstd(klon)
@@ -417,14 +417,23 @@
       ENDDO
 c
-      ierr = NF_REDEF (nid)
-      ierr = NF_DEF_VAR (nid, "AGESNO", NF_FLOAT, 1, idim2,nvarid)
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 15,
-     .                        "Age de la neige")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,agesno)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,agesno)
-#endif
+      DO nsrf = 1, nbsrf
+        IF (nsrf.LE.99) THEN
+            WRITE(str2,'(i2.2)') nsrf
+            ierr = NF_REDEF (nid)
+            ierr = NF_DEF_VAR (nid,"AGESNO"//str2,NF_FLOAT,1,idim2
+     $          ,nvarid)
+            ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 15,
+     .                        "Age de la neige surface No."//str2)
+            ierr = NF_ENDDEF(nid)
+        ELSE
+            PRINT*, "Trop de sous-mailles"
+            CALL abort
+        ENDIF
+#ifdef NC_DOUBLE
+        ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,agesno(1,nsrf))
+#else
+      ierr = NF_PUT_VAR_REAL (nid,nvarid,agesno(1,nsrf))
+#endif
+      ENDDO
 c
       ierr = NF_REDEF (nid)
Index: LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F	(revision 257)
+++ LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F	(revision 258)
@@ -278,5 +278,5 @@
       INTEGER igwd,idx(klon),itest(klon)
 c
-      REAL agesno(klon)
+      REAL agesno(klon,nbsrf)
       SAVE agesno                 ! age de la neige
 c
@@ -340,4 +340,5 @@
       REAL evap(klon), devap(klon) ! evaporation et sa derivee
       REAL sens(klon), dsens(klon) ! chaleur sensible et sa derivee
+      REAL dlw(klon)    ! derivee infra rouge
       REAL bils(klon) ! bilan de chaleur au sol
       REAL fder(klon) ! Derive de flux (sensible et latente) 
@@ -627,5 +628,5 @@
      .       rlat,rlon,pctsrf, ftsol,ftsoil,deltat,fqsol,fsnow,
      .       falbe, fevap, rain_fall,snow_fall,solsw, sollwdown,
-     .       fder,radsol,frugs,agesno,clesphy0,
+     .       dlw,radsol,frugs,agesno,clesphy0,
      .       zmea,zstd,zsig,zgam,zthe,zpic,zval,rugoro,tabcntr0,
      .       t_ancien, q_ancien, ancien_ok )
@@ -1022,8 +1023,4 @@
      .                "ave(X)", zsto,zout)
 c
-         CALL histdef(nid_mth, "ages", "Snow age", "day",
-     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
-     .                "ave(X)", zsto,zout)
-c
          CALL histdef(nid_mth, "evap", "Evaporation", "mm/day",
      .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
@@ -1127,4 +1124,9 @@
      $         iim,jjmp1,nhori, 1,1,1, -99, 32,
      $         "ave(X)", zsto,zout)
+c
+         CALL histdef(nid_mth, "ages_"//clnsurf(nsrf), "Snow age","day",
+     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
+     .                "ave(X)", zsto,zout)
+
          END DO
 C
@@ -1440,4 +1442,20 @@
      .                "inst(X)", zsto,zout)
 c
+        CALL histdef(nid_ins, "qsol", "Surface humidity", "mm",
+     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
+     .                "inst(X)", zsto,zout)
+c
+         CALL histdef(nid_ins, "rain", "Precipitation", "mm/day",
+     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
+     .                "inst(X)", zsto,zout)
+c
+         CALL histdef(nid_ins, "snow", "Snow fall", "mm/day",
+     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
+     .                "inst(X)", zsto,zout)
+c
+         CALL histdef(nid_ins, "snow_cov", "Snow cover", "mm",
+     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
+     .                "inst(X)", zsto,zout)
+c
          CALL histdef(nid_ins, "topl", "OLR", "W/m2",
      .                iim,jjmp1,nhori, 1,1,1, -99, 32,
@@ -1458,5 +1476,5 @@
          CALL histdef(nid_ins, "solldown", "Down. IR rad. at surface", 
      .                "W/m2", iim,jjmp1,nhori, 1,1,1, -99, 32, 
-     .                "ave(X)", zsto,zout)
+     .                "inst(X)", zsto,zout)
 c
          CALL histdef(nid_ins, "bils", "Surf. total heat flux", "W/m2",
@@ -1521,5 +1539,5 @@
 c
            call histdef(nid_ins, "albe_"//clnsurf(nsrf), 
-     $         "Albedo surf. "//clnsurf(nsrf), "-",  
+     $         "Albedo "//clnsurf(nsrf), "-",  
      $         iim,jjmp1,nhori, 1,1,1, -99, 32,
      $         "inst(X)", zsto,zout)
@@ -1540,7 +1558,4 @@
      .                "inst(X)", zsto,zout)
 c
-         CALL histdef(nid_ins, "snow_cov", "Snow cover", "mm",
-     .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
-     .                "inst(X)", zsto,zout)
 c
 c Champs 3D:
@@ -1741,6 +1756,5 @@
       ENDIF
 
-      fder = 0.
-      date0 = day_ini
+      fder = dlw
 
       CALL clmain(dtime,itap,date0,pctsrf,
@@ -1784,8 +1798,5 @@
 c         evap(i) = - fluxq(i,1) ! flux d'evaporation au sol
          evap(i) = - zxfluxq(i,1) ! flux d'evaporation au sol
-C LF test signe flux
-         sens(i) = zxfluxt(i,1)
-         evap(i) = zxfluxq(i,1)
-         fder(i) = dsens(i) + devap(i)
+         fder(i) = dlw(i) + dsens(i) + devap(i)
       ENDDO
 
@@ -1831,10 +1842,12 @@
 c Calculer la derive du flux infrarouge
 c
-      DO nsrf = 1, nbsrf
-      DO i = 1, klon
-         fder(i) = fder(i) - 4.0*RSIGMA*zxtsol(i)**3 *
-     .                       (ftsol(i,nsrf)-zxtsol(i))
-     .                      *pctsrf(i,nsrf)
-      ENDDO
+c$$$      DO nsrf = 1, nbsrf
+      DO i = 1, klon
+c$$$        IF (pctsrf(i,nsrf) .GE. EPSFRA) THEN 
+            dlw(i) = - 4.0*RSIGMA*zxtsol(i)**3 
+c$$$     .          *(ftsol(i,nsrf)-zxtsol(i))
+c$$$     .          *pctsrf(i,nsrf)
+c$$$        ENDIF 
+c$$$      ENDDO
       ENDDO
 c
@@ -2536,7 +2549,4 @@
       CALL histwrite(nid_mth,"snow_cov",itap,zx_tmp_2d,iim*jjmp1,ndex2d)
 c
-      CALL gr_fi_ecrit(1, klon,iim,jjmp1, agesno,zx_tmp_2d)
-      CALL histwrite(nid_mth,"ages",itap,zx_tmp_2d,iim*jjmp1,ndex2d)
-c
       CALL gr_fi_ecrit(1, klon,iim,jjmp1, evap,zx_tmp_2d)
       CALL histwrite(nid_mth,"evap",itap,zx_tmp_2d,iim*jjmp1,ndex2d)
@@ -2632,4 +2642,9 @@
         CALL histwrite(nid_mth,"rugs_"//clnsurf(nsrf),itap,
      $      zx_tmp_2d,iim*jjmp1,ndex2d)
+c
+      zx_tmp_fi2d(1 : klon) = agesno( 1 : klon, nsrf)
+      CALL gr_fi_ecrit(1, klon,iim,jjmp1, agesno,zx_tmp_2d)
+      CALL histwrite(nid_mth,"ages_"//clnsurf(nsrf),itap
+     $    ,zx_tmp_2d,iim*jjmp1,ndex2d)
 
       END DO  
@@ -2908,4 +2923,14 @@
       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d)
       CALL histwrite(nid_ins,"tsol",itap,zx_tmp_2d,iim*jjmp1,ndex2d)
+c
+      DO i = 1, klon
+         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)
+      CALL histwrite(nid_ins,"rain",itap,zx_tmp_2d,iim*jjmp1,ndex2d)
+c
+      CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_fall,zx_tmp_2d)
+      CALL histwrite(nid_ins,"snow",itap,zx_tmp_2d,iim*jjmp1,ndex2d)
+
 c
       CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw,zx_tmp_2d)
@@ -3116,5 +3141,5 @@
      .      rlat, rlon, pctsrf, ftsol, ftsoil, deltat, fqsol, fsnow,
      .      falbe, fevap, rain_fall, snow_fall,
-     .      solsw, sollwdown,fder,
+     .      solsw, sollwdown,dlw,
      .      radsol,frugs,agesno,
      .      zmea,zstd,zsig,zgam,zthe,zpic,zval,rugoro,
