Index: /trunk/LMDZ.COMMON/libf/evolution/pem.F90
===================================================================
--- /trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 2918)
+++ /trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 2919)
@@ -858,5 +858,5 @@
 
       if (co2glaciersflow) then
-       call co2glaciers_evol(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,vmr_co2_pem_phys,ps_phys_timeseries,&
+       call co2glaciers_evol(timelen,ngrid,nslope,iflat,subslope_dist,def_slope_mean,vmr_co2_pem_phys,ps_timeseries,&
                          global_ave_press_GCM,global_ave_press_new,co2ice_slope,flag_co2flow,flag_co2flow_mesh)
       endif
Index: /trunk/LMDZ.MARS/libf/phymars/comsoil_h.F90
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/comsoil_h.F90	(revision 2918)
+++ /trunk/LMDZ.MARS/libf/phymars/comsoil_h.F90	(revision 2919)
@@ -25,5 +25,5 @@
   real,save,allocatable :: beta(:,:,:)        ! beta_k coefficients
   real,save :: mu
-  real,save,allocatable :: flux_geo(:)       ! Geothermal Flux (W/m^2)
+  real,save,allocatable :: flux_geo(:,:)       ! Geothermal Flux (W/m^2)
 
 !$OMP THREADPRIVATE(tsoil,mthermdiff,thermdiff,coefq,coefd,alph,beta,mu,flux_geo)
@@ -48,5 +48,5 @@
     allocate(alph(ngrid,nsoilmx-1,nslope))
     allocate(beta(ngrid,nsoilmx-1,nslope))
-    allocate(flux_geo(ngrid))
+    allocate(flux_geo(ngrid,nslope))
  
   end subroutine ini_comsoil_h
Index: /trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F	(revision 2918)
+++ /trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F	(revision 2919)
@@ -6,5 +6,5 @@
       use mod_grid_phy_lmdz, only : regular_lonlat
       use infotrac, only: nqtot, tname, nqperes,nqfils
-      use comsoil_h, only: volcapa, layer, mlayer, inertiedat, nsoilmx
+      use comsoil_h, only: volcapa, layer, mlayer, inertiedat, nsoilmx,flux_geo
       use comgeomfi_h, only: sinlat, ini_fillgeom
       use surfdat_h, only: albedodat, z0_default, emissiv, emisice,
@@ -144,4 +144,6 @@
       logical :: present
 
+c   LL: Subsurface geothermal flux
+      real :: flux_geo_tmp
 c=======================================================================
 
@@ -626,4 +628,5 @@
 
 
+
 ! Initialize soil properties and temperature
 ! ------------------------------------------
@@ -634,4 +637,11 @@
       ENDDO
 
+      call getin("flux_geo",flux_geo_tmp)
+      flux_geo(:,:) = flux_geo_tmp
+
+
+
+
+flux_geo
 ! Initialize depths
 ! -----------------
Index: /trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90	(revision 2918)
+++ /trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90	(revision 2919)
@@ -732,5 +732,5 @@
   call soil_settings(nid_start,ngrid,nsoil,tsurf,tsoil,indextime)
 else
-    flux_geo(:) = 0.
+    flux_geo(:,:) = 0.
 endif ! of if (startphy_file)
 
Index: /trunk/LMDZ.MARS/libf/phymars/soil.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/soil.F	(revision 2918)
+++ /trunk/LMDZ.MARS/libf/phymars/soil.F	(revision 2919)
@@ -161,5 +161,6 @@
         beta(ig,nsoil-1,islope)=coefq(nsoil-1)*tsoil(ig,nsoil,islope)
      &      /(coefq(nsoil-1)+coefd(ig,nsoil-1,islope))
-     &      +flux_geo(ig)/(coefq(nsoil-1) + coefd(ig,nsoil-1,islope))
+     &      +flux_geo(ig,islope)/
+     &      (coefq(nsoil-1) + coefd(ig,nsoil-1,islope))
       enddo
    
Index: /trunk/LMDZ.MARS/libf/phymars/soil_settings.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/soil_settings.F	(revision 2918)
+++ /trunk/LMDZ.MARS/libf/phymars/soil_settings.F	(revision 2919)
@@ -454,5 +454,5 @@
            write(*,*) "soil_settings: Failed loading <flux_geo>"
            write(*,*) "soil_settings: Will put  <flux_geo> to 0."
-           flux_geo(:) = 0.
+           flux_geo(:,:) = 0.
       endif
 
