Index: LMDZ.3.3/branches/rel-LF/libf/dyn3d/create_etat0_limit.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/dyn3d/create_etat0_limit.F	(revision 352)
+++ LMDZ.3.3/branches/rel-LF/libf/dyn3d/create_etat0_limit.F	(revision 353)
@@ -18,5 +18,5 @@
 
       LOGICAL interbar, extrap , oldice
-      PARAMETER ( interbar = .TRUE. , extrap = .FALSE. , oldice=.TRUE.)
+      PARAMETER ( interbar = .TRUE. , extrap = .FALSE. , oldice=.true.)
 #include "dimensions.h"
 #include "paramet.h"
Index: LMDZ.3.3/branches/rel-LF/libf/dyn3d/dynetat0.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/dyn3d/dynetat0.F	(revision 352)
+++ LMDZ.3.3/branches/rel-LF/libf/dyn3d/dynetat0.F	(revision 353)
@@ -82,6 +82,6 @@
       jm         = tab_cntrl(2)
       lllm       = tab_cntrl(3)
-      day_ini    = tab_cntrl(4)
-      anne_ini   = tab_cntrl(5)
+      day_ref    = tab_cntrl(4)
+      annee_ref  = tab_cntrl(5)
       rad        = tab_cntrl(6)
       omeg       = tab_cntrl(7)
@@ -115,4 +115,7 @@
         IF( tab_cntrl(27).EQ.1. ) ysinus = . TRUE. 
       ENDIF
+
+      day_ini = tab_cntrl(30)
+      itau_dyn = tab_cntrl(31)
 c   .................................................................
 c
Index: LMDZ.3.3/branches/rel-LF/libf/dyn3d/dynredem.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/dyn3d/dynredem.F	(revision 352)
+++ LMDZ.3.3/branches/rel-LF/libf/dyn3d/dynredem.F	(revision 353)
@@ -1,5 +1,5 @@
 c $Header$
 c
-      SUBROUTINE dynredem0(fichnom,idayref,anneeref,phis,nq)
+      SUBROUTINE dynredem0(fichnom,iday_end,phis,nq)
       USE IOIPSL
       IMPLICIT NONE
@@ -23,5 +23,5 @@
 c   Arguments:
 c   ----------
-      INTEGER*4 idayref,anneeref
+      INTEGER iday_end
       REAL phis(ip1jmp1)
       CHARACTER*(*) fichnom
@@ -56,6 +56,6 @@
       modname='dynredem'
 
-      call ymds2ju(anneeref,1,idayref,0.0, zjulian)
-      call ju2ymds(zjulian, yyears0,mmois0,jjour0,hours)
+      call ymds2ju(annee_ref, 1, iday_end, 0.0, zjulian)
+      call ju2ymds(zjulian, yyears0, mmois0, jjour0, hours)
         
 
@@ -66,6 +66,6 @@
        tab_cntrl(2)  = FLOAT(jjm)
        tab_cntrl(3)  = FLOAT(llm)
-       tab_cntrl(4)  = FLOAT(idayref)
-       tab_cntrl(5)  = FLOAT(anneeref)
+       tab_cntrl(4)  = FLOAT(day_ref)
+       tab_cntrl(5)  = FLOAT(annee_ref)
        tab_cntrl(6)  = rad
        tab_cntrl(7)  = omeg
@@ -106,4 +106,7 @@
        IF( ysinus )  tab_cntrl(27) = 1.
       ENDIF
+
+       tab_cntrl(30) = FLOAT(iday_end)
+       tab_cntrl(31) = FLOAT(itau_dyn + itaufin)
 c
 c    .........................................................
@@ -378,5 +381,5 @@
       ierr = NF_CLOSE(nid) ! fermer le fichier
 
-      PRINT*,'iim,jjm,llm,idayref',iim,jjm,llm,idayref
+      PRINT*,'iim,jjm,llm,iday_end',iim,jjm,llm,iday_end
       PRINT*,'rad,omeg,g,cpp,kappa',
      ,        rad,omeg,g,cpp,kappa
Index: LMDZ.3.3/branches/rel-LF/libf/dyn3d/gcm.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/dyn3d/gcm.F	(revision 352)
+++ LMDZ.3.3/branches/rel-LF/libf/dyn3d/gcm.F	(revision 353)
@@ -299,5 +299,5 @@
       PRINT 300, itau,itaufin,day_ini,day_end
 
-      CALL dynredem0("restart.nc",day_end,anne_ini,phis,nqmx)
+      CALL dynredem0("restart.nc", day_end, phis, nqmx)
 
       ecripar = .TRUE.
@@ -306,10 +306,10 @@
       t_ops = iecri * daysec
       t_wrt = iecri * daysec
-C      CALL inithist(dynhist_file,day_ini,anne_ini,time_step,
+C      CALL inithist(dynhist_file,day_ref,annee_ref,time_step,
 c     .              t_ops, t_wrt, nqmx, histid, histvid)
 
       t_ops = iperiod * time_step
       t_wrt = periodav * daysec
-      CALL initdynav(dynhistave_file,day_ini,anne_ini,time_step,
+      CALL initdynav(dynhistave_file,day_ref,annee_ref,time_step,
      .              t_ops, t_wrt, nqmx, histaveid)
 
Index: LMDZ.3.3/branches/rel-LF/libf/dyn3d/limit_netcdf.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/dyn3d/limit_netcdf.F	(revision 352)
+++ LMDZ.3.3/branches/rel-LF/libf/dyn3d/limit_netcdf.F	(revision 353)
@@ -226,17 +226,9 @@
      . dlon_msk, dlat_msk, champ_msk, interbar  )
 
-      CALL mask_c_o(imdep, jmdep, dlon_msk, dlat_msk,champ_msk,
-     .             iim, jjp1, rlonv, rlatu, champint)
-c      CALL gr_int_dyn(champint, masque, iim, jjp1)
-c      DO i = 1, iim
-c         masque(i,1) = FLOAT(NINT(masque(i,1)))
-c         masque(i,jjp1) = FLOAT(NINT(masque(i,jjp1)))
-c      ENDDO
       DO i = 1, iim
       DO j = 1, jjp1
-         mask(i,j) = champint(i,j)
-      ENDDO
-      ENDDO
-c      CALL gr_dyn_fi(1, iip1, jjp1, klon, masque, phy_nat0)
+         mask(i,j) = masque(i,j)
+      ENDDO
+      ENDDO
       ierr = NF_CLOSE(ncid)
 c
Index: LMDZ.3.3/branches/rel-LF/libf/dyn3d/offlinenc.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/dyn3d/offlinenc.F	(revision 352)
+++ LMDZ.3.3/branches/rel-LF/libf/dyn3d/offlinenc.F	(revision 353)
@@ -200,5 +200,5 @@
       else
          day_ini=0
-         anne_ini=0
+         annee_ref=0
       endif
 
@@ -347,5 +347,5 @@
       close(98)
 
-      CALL dynredem0("restart.nc",day_end,anne_ini,phis,nq)
+      CALL dynredem0("restart.nc",day_end,phis,nq)
 
 c-----------------------------------------------------------------------
@@ -398,5 +398,5 @@
          dynhistave_file = 'histmoy.nc'
          day_ini=0
-         anne_ini=0
+         annee_ref=0
          t_ops =(1./48.)*daysec
          t_wrt =(1./48.)*daysec
@@ -404,5 +404,5 @@
          mode=1
 
-c        CALL initdynav(dynhistave_file,day_ini,anne_ini,dtav,
+c        CALL initdynav(dynhistave_file,day_ini,annee_ref,dtav,
 c    .              t_ops, t_wrt, nq,mode, histaveid)
 
Index: LMDZ.3.3/branches/rel-LF/libf/dyn3d/physdem.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/dyn3d/physdem.F	(revision 352)
+++ 	(revision )
@@ -1,631 +1,0 @@
-      SUBROUTINE physdem (fichnom,dtime,radpas,co2_ppm,solaire,
-     .           rlat,rlon, pctsrf,tsol,tsoil,deltat,qsol,snow,
-     .           albedo, evap, rain_fall, snow_fall,
-     .           solsw, sollw,
-     .           radsol,frugs,agesno,
-     .           zmea,zstd,zsig,zgam,zthe,zpic,zval,rugsrel,
-     .           t_ancien, q_ancien)
-      IMPLICIT none
-c======================================================================
-c Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818
-c Objet: Ecriture de l'etat de redemarrage pour la physique
-c======================================================================
-#include "dimensions.h"
-#include "dimphy.h"
-#include "netcdf.inc"
-#include "indicesol.h"
-#include "dimsoil.h"
-#include "clesph0.h"
-#include "control.h"
-#include "temps.h"
-c======================================================================
-      CHARACTER*(*) fichnom
-      REAL dtime
-      INTEGER radpas
-      REAL rlat(klon), rlon(klon)
-      REAL co2_ppm
-      REAL solaire
-      REAL tsol(klon,nbsrf)
-      REAL tsoil(klon,nsoilmx,nbsrf)
-      REAL deltat(klon)
-      REAL qsol(klon,nbsrf)
-      REAL snow(klon,nbsrf)
-      REAL albedo(klon,nbsrf)
-      REAL evap(klon,nbsrf)
-      REAL rain_fall(klon)
-      REAL snow_fall(klon)
-      real solsw(klon)
-      real sollw(klon)
-      REAL radsol(klon)
-      REAL frugs(klon,nbsrf)
-      REAL agesno(klon)
-      REAL zmea(klon)
-      REAL zstd(klon)
-      REAL zsig(klon)
-      REAL zgam(klon)
-      REAL zthe(klon)
-      REAL zpic(klon)
-      REAL zval(klon)
-      REAL rugsrel(klon)
-      REAL pctsrf(klon, nbsrf)
-      REAL t_ancien(klon,klev), q_ancien(klon,klev)
-c
-      INTEGER nid, nvarid, idim1, idim2, idim3
-      INTEGER ierr
-      INTEGER length
-      PARAMETER (length=100)
-      REAL tab_cntrl(length)
-c
-      INTEGER isoil, nsrf
-      CHARACTER*7 str7
-      CHARACTER*2 str2
-c
-      ierr = NF_CREATE(fichnom, NF_CLOBBER, nid)
-      IF (ierr.NE.NF_NOERR) THEN
-        write(6,*)' Pb d''ouverture du fichier '//fichnom
-        write(6,*)' ierr = ', ierr
-        CALL ABORT
-      ENDIF
-c
-      ierr = NF_PUT_ATT_TEXT (nid, NF_GLOBAL, "title", 28,
-     .                       "Fichier redemmarage physique")
-c
-      ierr = NF_DEF_DIM (nid, "index", length, idim1)
-      ierr = NF_DEF_DIM (nid, "points_physiques", klon, idim2)
-      ierr = NF_DEF_DIM (nid, "horizon_vertical", klon*klev, idim3)
-c
-      ierr = NF_ENDDEF(nid)
-c
-      DO ierr = 1, length
-         tab_cntrl(ierr) = 0.0
-      ENDDO
-      tab_cntrl(1) = dtime
-      tab_cntrl(2) = radpas
-      tab_cntrl(3) = co2_ppm
-      tab_cntrl(4) = solaire
-      tab_cntrl(5) = iflag_con
-      tab_cntrl(6) = nbapp_rad
-
-      IF( cycle_diurne ) tab_cntrl( 7 ) = 1.
-      IF(   soil_model ) tab_cntrl( 8 ) = 1.
-      IF(     new_oliq ) tab_cntrl( 9 ) = 1.
-      IF(     ok_orodr ) tab_cntrl(10 ) = 1.
-      IF(     ok_orolf ) tab_cntrl(11 ) = 1.
-
-      tab_cntrl(13) = dayref
-      tab_cntrl(14) = anneeref
-      tab_cntrl(13) = day_end
-      tab_cntrl(14) = anne_ini
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "controle", NF_DOUBLE, 1, idim1,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "controle", NF_FLOAT, 1, idim1,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22,
-     .                        "Parametres de controle")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tab_cntrl)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,tab_cntrl)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "longitude", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "longitude", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 32,
-     .                        "Longitudes de la grille physique")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlon)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,rlon)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "latitude", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "latitude", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 31,
-     .                        "Latitudes de la grille physique")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlat)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,rlat)
-#endif
-c
-C PB ajout du masque terre/mer
-C
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "masque", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "masque", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 16,
-     .                        "masque terre mer")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zmasq)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zmasq)
-#endif      
-c BP ajout des fraction de chaque sous-surface
-C
-C 1. fraction de terre 
-C
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "FTER", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "FTER", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 21,
-     .                        "fraction de continent")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon, is_ter))
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_ter))
-#endif
-C 
-C 2. Fraction de glace de terre
-C 
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "FLIC", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "FLIC", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 24,
-     .                        "fraction glace de terre")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon,is_lic))
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_lic))
-#endif
-C
-C 3. fraction ocean
-C
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "FOCE", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "FOCE", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 14,
-     .                        "fraction ocean")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon, is_oce))
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_oce))
-#endif
-C
-C 4. Fraction glace de mer
-C
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "FSIC", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "FSIC", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 18,
-     .                        "fraction glace mer")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon, is_sic))
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_sic))
-#endif
-C
-C
-c
-      DO nsrf = 1, nbsrf
-        IF (nsrf.LE.99) THEN
-        WRITE(str2,'(i2.2)') nsrf
-        ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-        ierr = NF_DEF_VAR (nid, "TS"//str2, NF_DOUBLE, 1, idim2,nvarid)
-#else
-        ierr = NF_DEF_VAR (nid, "TS"//str2, NF_FLOAT, 1, idim2,nvarid)
-#endif
-        ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28,
-     .                        "Temperature de 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,tsol(1,nsrf))
-#else
-        ierr = NF_PUT_VAR_REAL (nid,nvarid,tsol(1,nsrf))
-#endif
-      ENDDO
-c
-      DO nsrf = 1, nbsrf
-      DO isoil=1, nsoilmx
-        IF (isoil.LE.99 .AND. nsrf.LE.99) THEN
-        WRITE(str7,'(i2.2,"srf",i2.2)') isoil,nsrf
-        ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-        ierr = NF_DEF_VAR (nid, "Tsoil"//str7,NF_DOUBLE,1,idim2,nvarid)
-#else
-        ierr = NF_DEF_VAR (nid, "Tsoil"//str7,NF_FLOAT,1,idim2,nvarid)
-#endif
-        ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 29,
-     .                        "Temperature du sol No."//str7)
-        ierr = NF_ENDDEF(nid)
-        ELSE
-        PRINT*, "Trop de couches"
-        CALL abort
-        ENDIF
-#ifdef NC_DOUBLE
-        ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tsoil(1,isoil,nsrf))
-#else
-        ierr = NF_PUT_VAR_REAL (nid,nvarid,tsoil(1,isoil,nsrf))
-#endif
-      ENDDO
-      ENDDO
-c
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "DELTAT", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "DELTAT", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 33,
-     .                        "Ecart de la SST (pour slab-ocean)")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,deltat)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,deltat)
-#endif
-c
-      DO nsrf = 1, nbsrf
-        IF (nsrf.LE.99) THEN
-        WRITE(str2,'(i2.2)') nsrf
-        ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-        ierr = NF_DEF_VAR (nid,"QS"//str2,NF_DOUBLE,1,idim2,nvarid)
-#else
-        ierr = NF_DEF_VAR (nid,"QS"//str2,NF_FLOAT,1,idim2,nvarid)
-#endif
-        ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 25,
-     .                        "Humidite de 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,qsol(1,nsrf))
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,qsol(1,nsrf))
-#endif
-      ENDDO
-c
-      DO nsrf = 1, nbsrf
-        IF (nsrf.LE.99) THEN
-        WRITE(str2,'(i2.2)') nsrf
-        ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-        ierr = NF_DEF_VAR (nid,"ALBE"//str2,NF_DOUBLE,1,idim2,nvarid)
-#else
-        ierr = NF_DEF_VAR (nid,"ALBE"//str2,NF_FLOAT,1,idim2,nvarid)
-#endif
-        ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 23,
-     .                        "albedo de 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,albedo(1,nsrf))
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,albedo(1,nsrf))
-#endif
-      ENDDO
-c
-      DO nsrf = 1, nbsrf
-        IF (nsrf.LE.99) THEN
-        WRITE(str2,'(i2.2)') nsrf
-        ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-        ierr = NF_DEF_VAR (nid,"EVAP"//str2,NF_DOUBLE,1,idim2,nvarid)
-#else
-        ierr = NF_DEF_VAR (nid,"EVAP"//str2,NF_FLOAT,1,idim2,nvarid)
-#endif
-        ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28,
-     .                        "Evaporation de 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,evap(1,nsrf))
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,evap(1,nsrf))
-#endif
-      ENDDO
-
-c
-      DO nsrf = 1, nbsrf
-        IF (nsrf.LE.99) THEN
-        WRITE(str2,'(i2.2)') nsrf
-        ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-        ierr = NF_DEF_VAR (nid,"SNOW"//str2,NF_DOUBLE,1,idim2,nvarid)
-#else
-        ierr = NF_DEF_VAR (nid,"SNOW"//str2,NF_FLOAT,1,idim2,nvarid)
-#endif
-        ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22,
-     .                        "Neige de 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,snow(1,nsrf))
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,snow(1,nsrf))
-#endif
-      ENDDO
-
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "RADS", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "RADS", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28,
-     .                        "Rayonnement net a la surface")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,radsol)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,radsol)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "solsw", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "solsw", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 32,
-     .                        "Rayonnement solaire a la surface")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,solsw)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,solsw)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "sollw", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "sollw", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 27,
-     .                        "Rayonnement IF a la surface")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,sollw)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,sollw)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "rain_f", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "rain_f", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 21,
-     .                        "precipitation liquide")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rain_fall)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,rain_fall)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "snow_f", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "snow_f", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 20,
-     .                        "precipitation solide")
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,snow_fall)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,snow_fall)
-#endif
-c
-      DO nsrf = 1, nbsrf
-        IF (nsrf.LE.99) THEN
-        WRITE(str2,'(i2.2)') nsrf
-        ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-        ierr = NF_DEF_VAR (nid,"RUG"//str2,NF_DOUBLE,1,idim2,nvarid)
-#else
-        ierr = NF_DEF_VAR (nid,"RUG"//str2,NF_FLOAT,1,idim2,nvarid)
-#endif
-        ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 23,
-     .                        "rugosite de 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,frugs(1,nsrf))
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,frugs(1,nsrf))
-#endif
-      ENDDO
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "AGESNO", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "AGESNO", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      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
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZMEA", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZMEA", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zmea)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zmea)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZSTD", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZSTD", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zstd)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zstd)
-#endif
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZSIG", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZSIG", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zsig)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zsig)
-#endif
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZGAM", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZGAM", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zgam)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zgam)
-#endif
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZTHE", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZTHE", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zthe)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zthe)
-#endif
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZPIC", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZPIC", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zpic)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zpic)
-#endif
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "ZVAL", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "ZVAL", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zval)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,zval)
-#endif
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "RUGSREL", NF_DOUBLE, 1, idim2,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "RUGSREL", NF_FLOAT, 1, idim2,nvarid)
-#endif
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rugsrel)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,rugsrel)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "TANCIEN", NF_DOUBLE, 1, idim3,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "TANCIEN", NF_FLOAT, 1, idim3,nvarid)
-#endif
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,t_ancien)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,t_ancien)
-#endif
-c
-      ierr = NF_REDEF (nid)
-#ifdef NC_DOUBLE
-      ierr = NF_DEF_VAR (nid, "QANCIEN", NF_DOUBLE, 1, idim3,nvarid)
-#else
-      ierr = NF_DEF_VAR (nid, "QANCIEN", NF_FLOAT, 1, idim3,nvarid)
-#endif
-      ierr = NF_ENDDEF(nid)
-#ifdef NC_DOUBLE
-      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,q_ancien)
-#else
-      ierr = NF_PUT_VAR_REAL (nid,nvarid,q_ancien)
-#endif
-c
-      ierr = NF_CLOSE(nid)
-c
-      RETURN
-      END
Index: LMDZ.3.3/branches/rel-LF/libf/dyn3d/temps.h
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/dyn3d/temps.h	(revision 352)
+++ LMDZ.3.3/branches/rel-LF/libf/dyn3d/temps.h	(revision 353)
@@ -4,9 +4,11 @@
 ! INCLUDE 'temps.h'
 
-      COMMON/temps/itaufin,dt, day_ini,day_end,anne_ini
+      COMMON/temps/itaufin, dt, day_ini, day_end, annee_ref, day_ref,
+     .             itau_dyn, itau_phy
 
-      INTEGER  itaufin
-      INTEGER*4 day_ini,day_end,anne_ini
-      REAL     dt
+      INTEGER   itaufin
+      INTEGER*4 itau_dyn, itau_phy
+      INTEGER*4 day_ini, day_end, annee_ref, day_ref
+      REAL      dt
 
 !-----------------------------------------------------------------------
Index: LMDZ.3.3/branches/rel-LF/libf/dyn3d/temps.inc
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/dyn3d/temps.inc	(revision 352)
+++ LMDZ.3.3/branches/rel-LF/libf/dyn3d/temps.inc	(revision 353)
@@ -1,10 +1,14 @@
+!
+! $Header$
+!
 !-----------------------------------------------------------------------
 ! INCLUDE 'temps.h'
 
-      COMMON/temps/itaufin,dt, &
-     &  day_ini,day_end,anne_ini
+      COMMON/temps/itaufin, dt, &
+     &  day_ini, day_end, annee_ref, day_ref, itau_dyn, itau_phy
 
       INTEGER  itaufin
-      INTEGER*4 day_ini,day_end,anne_ini
+      INTEGER*4 itau_dyn, itau_phy
+      INTEGER*4 day_ini, day_end, annee_ref, day_ref
       REAL     dt
 
