Index: /trunk/LMDZ.COMMON/libf/dyn3d/mod_const_mpi.F90
===================================================================
--- /trunk/LMDZ.COMMON/libf/dyn3d/mod_const_mpi.F90	(revision 901)
+++ /trunk/LMDZ.COMMON/libf/dyn3d/mod_const_mpi.F90	(revision 901)
@@ -0,0 +1,16 @@
+MODULE mod_const_mpi
+
+  INTEGER :: COMM_LMDZ
+  INTEGER :: MPI_REAL_LMDZ
+ 
+
+CONTAINS 
+
+  SUBROUTINE Init_const_mpi
+  IMPLICIT NONE
+  
+    COMM_LMDZ=0
+    MPI_REAL_LMDZ=0
+  END SUBROUTINE Init_const_mpi
+
+END MODULE mod_const_mpi
Index: unk/LMDZ.COMMON/libf/dyn3d/mod_const_para.F90
===================================================================
--- /trunk/LMDZ.COMMON/libf/dyn3d/mod_const_para.F90	(revision 900)
+++ 	(revision )
@@ -1,16 +1,0 @@
-MODULE mod_const_mpi
-
-  INTEGER :: COMM_LMDZ
-  INTEGER :: MPI_REAL_LMDZ
- 
-
-CONTAINS 
-
-  SUBROUTINE Init_const_mpi
-  IMPLICIT NONE
-  
-    COMM_LMDZ=0
-    MPI_REAL_LMDZ=0
-  END SUBROUTINE Init_const_mpi
-
-END MODULE mod_const_mpi
Index: /trunk/LMDZ.VENUS/libf/phyvenus/iostart.F90
===================================================================
--- /trunk/LMDZ.VENUS/libf/phyvenus/iostart.F90	(revision 900)
+++ /trunk/LMDZ.VENUS/libf/phyvenus/iostart.F90	(revision 901)
@@ -25,9 +25,9 @@
 
     PUBLIC get_field,get_var,put_field,put_var
-    PUBLIC Open_startphy,close_startphy,open_restartphy,close_restartphy
+    PUBLIC open_startphy,close_startphy,open_restartphy,close_restartphy
     
 CONTAINS
 
-  SUBROUTINE Open_startphy(filename)
+  SUBROUTINE open_startphy(filename)
   USE netcdf
   USE mod_phys_lmdz_para
@@ -45,5 +45,5 @@
     ENDIF
    
-  END SUBROUTINE Open_startphy
+  END SUBROUTINE open_startphy
 
   SUBROUTINE Close_startphy
@@ -326,5 +326,5 @@
       ENDIF
 
-      ierr = NF90_PUT_ATT (nid_restart, NF90_GLOBAL, "title","Fichier redemmarage physique")
+      ierr = NF90_PUT_ATT (nid_restart, NF90_GLOBAL, "title","Fichier redemarrage physique")
 
       ierr = NF90_DEF_DIM (nid_restart, "index", length, idim1)
Index: /trunk/LMDZ.VENUS/libf/phyvenus/phys_state_var_mod.F90
===================================================================
--- /trunk/LMDZ.VENUS/libf/phyvenus/phys_state_var_mod.F90	(revision 900)
+++ /trunk/LMDZ.VENUS/libf/phyvenus/phys_state_var_mod.F90	(revision 901)
@@ -137,5 +137,5 @@
 IMPLICIT NONE
 
-      deallocate(ftsol, falbe)
+      deallocate(ftsol, ftsoil, falbe)
       deallocate(zmea, zstd, zsig, zgam)
       deallocate(zthe, zpic, zval)
Index: /trunk/LMDZ.VENUS/libf/phyvenus/rcm1d.F
===================================================================
--- /trunk/LMDZ.VENUS/libf/phyvenus/rcm1d.F	(revision 900)
+++ /trunk/LMDZ.VENUS/libf/phyvenus/rcm1d.F	(revision 901)
@@ -5,4 +5,5 @@
       use control_mod
       use comgeomphy
+      USE phys_state_var_mod
       IMPLICIT NONE
 
@@ -48,18 +49,13 @@
       REAL play(llm)   ! Pressure at the middle of the layers (Pa)
       REAL plev(llm+1) ! intermediate pressure levels (pa)
-      REAL psurf,tsurf(1)      
+      REAL psurf      
       REAL u(llm),v(llm)  ! zonal, meridional wind
       REAL gru,grv   ! prescribed "geostrophic" background wind
       REAL temp(llm)   ! temperature at the middle of the layers
       REAL,allocatable :: q(:,:) ! tracer mixing ratio (e.g. kg/kg)
-      REAL tsoil(nsoilmx)   ! subsurface soik temperature (K)
       REAL zlay(llm)   ! altitude estimee dans les couches (km)
       REAL long(1),lati(1),area(1)
       REAL cufi(1),cvfi(1)
-      REAL phisfi(1),albedo(1)
-      REAL solsw(1),sollwdown(1),dlw(1),radsol(1)
-      REAL zmea(1), zstd(1)
-      REAL zsig(1), zgam(1), zthe(1)
-      REAL zpic(1), zval(1)
+      REAL phisfi(1)
 
 c    Physical and dynamical tandencies (e.g.  m.s-2, K/s, Pa/s)
@@ -196,12 +192,4 @@
       long(1)=0.E+0
 
-c  Initialisation albedo 
-c  ----------------------
-c ne sert pas ici...
-      albedo(1)=0.1
-c      PRINT *,'Albedo du sol nu ?'
-c      READ(unit,*) albedo(1)
-c      PRINT *,albedo(1)
-
 c   Initialisation speciales "physiq"
 c   ---------------------------------
@@ -271,4 +259,8 @@
       pks=cpp*(psurf/preff)**rcp
 
+c  init des variables pour phyredem
+c  --------------------------------
+      call phys_state_var_init
+
 c  profil de temperature et altitude au premier appel
 c  --------------------------------------------------
@@ -286,8 +278,8 @@
       print*,"               Pression        Altitude     Temperature"
       ilayer=1
-      tsurf(1)=tmp2(0)
+      ftsol(1)=tmp2(0)
        temp(1)=tmp2(1)
        zlay(1)=tmp2(1)*tmp1(1)
-      print*,"           0",tsurf(1)
+      print*,"           0",ftsol(1)
       print*,ilayer,play(ilayer),zlay(ilayer),temp(ilayer)
       DO ilayer=2,nlayer
@@ -300,5 +292,5 @@
 c     ~~~~~~~~~~~~~~~~~~~~~~~
       DO isoil=1,nsoil
-         tsoil(isoil)=tsurf(1)
+         ftsoil(1,isoil)=ftsol(1)
       ENDDO
 
@@ -323,4 +315,9 @@
       zval(1) = 0.
 
+c  Initialisation albedo 
+c  ----------------------
+
+      falbe(1)=0.1
+
 c  Ecriture de "startphy.nc"
 c  -------------------------
@@ -330,6 +327,6 @@
 
       solsw(1)    = 0.
-      sollwdown(1)= 0.
-      dlw(1)      = 0.
+      sollw(1)    = 0.
+      fder(1)      = 0.
       radsol(1)   = 0.
      
@@ -337,10 +334,9 @@
       soil_model  = .true.
 
-      call phyredem("startphy.nc  ",
-     .              lati,long,
-     .              tsurf,tsoil,albedo,
-     .              solsw,sollwdown,dlw,radsol,
-     .    zmea, zstd, zsig, zgam, zthe, zpic, zval, 
-     .              temp)
+      call phyredem("startphy.nc")
+
+c  deallocation des variables phyredem
+c  -----------------------------------
+      call phys_state_var_end
 
 c=======================================================================
@@ -457,5 +453,4 @@
 
       OPEN(11,file='profile.new')
-      write (11,*) tsurf
       DO ilayer=1,nlayer
         write (11,*) zlay(ilayer),temp(ilayer),tmp1(ilayer)
