Index: trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/rcm1d.F
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/rcm1d.F	(revision 3669)
+++ trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/rcm1d.F	(revision 3672)
@@ -34,5 +34,5 @@
       use mod_interface_dyn_phys, only: init_interface_dyn_phys
       use inifis_mod, only: inifis
-      use phys_state_var_mod, only: phys_state_var_init
+      use phys_state_var_mod, only: phys_state_var_init, tsurf, tsoil
       use physiq_mod, only: physiq
       implicit none
@@ -84,5 +84,5 @@
       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
@@ -90,5 +90,4 @@
       REAL,ALLOCATABLE :: q(:,:)      ! tracer mixing ratio (e.g. kg/kg)
       REAL,ALLOCATABLE :: qsurf(:)    ! tracer surface budget (e.g. kg.m-2)
-      REAL,ALLOCATABLE :: tsoil(:)    ! subsurface soil temperature (K)
 !      REAL n2ice               ! n2ice layer (kg.m-2) !not used anymore
       integer :: i_n2=0     ! tracer index of n2 ice
@@ -577,9 +576,4 @@
 
       nsoil=nsoilmx
-      allocate(tsoil(nsoilmx))
-      !! those are defined in comsoil_h.F90
-      IF (.not.ALLOCATED(layer)) ALLOCATE(layer(nsoilmx))
-      IF (.not.ALLOCATED(mlayer)) ALLOCATE(mlayer(0:nsoilmx-1))
-      IF (.not.ALLOCATED(inertiedat)) ALLOCATE(inertiedat(1,nsoilmx))
 
 ! At this point, both getin() and getin_p() functions have been used,
@@ -866,5 +860,5 @@
          OPEN(14,file='proftsoil',status='old',form='formatted',err=101)
          DO isoil=1,nsoil
-            READ (14,*) tsoil(isoil)
+            READ (14,*) tsoil(1,isoil)
             inertiedat(1,isoil)=inertiedat(1,1) ! soil thermal inertia
          ENDDO
@@ -874,8 +868,8 @@
          CLOSE(14)
 
-      else 
+      else
         DO isoil=1,nsoil
          inertiedat(1,isoil)=inertiedat(1,1) ! soil thermal inertia
-         tsoil(isoil)=tsurf(1)  ! soil temperature
+         tsoil(1,isoil)=tsurf(1)  ! soil temperature
         ENDDO
       endif
@@ -1065,5 +1059,5 @@
       endif
 ! save haze profile
-      if (haze.and.lecthaze.eq.1) then 
+      if (haze.and.lecthaze.eq.1) then
             OPEN(16,file='profhaze.out',form='formatted')
             DO iq=1,nq
