Index: trunk/LMDZ.MARS/libf/phymars/albedocaps.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/albedocaps.F90	(revision 3129)
+++ trunk/LMDZ.MARS/libf/phymars/albedocaps.F90	(revision 3130)
@@ -11,5 +11,5 @@
 USE mod_phys_lmdz_transfert_para, ONLY: bcast
 USE mod_phys_lmdz_para, ONLY: is_master
-USE paleoclimate_mod, ONLY: paleoclimate,albedo_perenialco2
+USE paleoclimate_mod, ONLY: paleoclimate,albedo_perennialco2
 
 implicit none
@@ -21,5 +21,5 @@
 integer,intent(in) :: ngrid
 real,intent(in) :: piceco2(ngrid) ! amount of CO2 ice on the surface (kg/m2)
-real,intent(inout) :: piceco2_peren(ngrid) ! amount of perenial co2 ice (kg/m^2)
+real,intent(inout) :: piceco2_peren(ngrid) ! amount of perennial co2 ice (kg/m^2)
 real,intent(out) :: psolaralb(ngrid,2) ! albedo of the surface
 real,intent(out) :: emisref(ngrid) ! emissivity of the surface
@@ -109,6 +109,6 @@
       if(paleoclimate) then
          if((piceco2_peren(ig).gt.0.).and.(piceco2(ig).lt.piceco2_peren(ig))) then
-             psolaralb(ig,1) = albedo_perenialco2
-             psolaralb(ig,2) = albedo_perenialco2
+             psolaralb(ig,1) = albedo_perennialco2
+             psolaralb(ig,2) = albedo_perennialco2
              piceco2_peren(ig) = piceco2(ig)
          endif
Index: trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F	(revision 3129)
+++ trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F	(revision 3130)
@@ -11,5 +11,5 @@
      $                  pcapcal,pplay,pplev,ptsrf,pt,
      $                  pphi,pdt,pdu,pdv,pdtsrf,pu,pv,pq,pdq,
-     $                  piceco2,perenial_co2ice,
+     $                  piceco2,perennial_co2ice,
      $                  psolaralb,pemisurf,rdust,
      $                  pdtc,pdtsrfc,pdpsrf,pduc,pdvc,pdqc,
@@ -90,5 +90,5 @@
 
       REAL,INTENT(INOUT) :: piceco2(ngrid,nslope) ! CO2 ice on the surface (kg.m-2)
-      REAL,INTENT(INOUT) :: perenial_co2ice(ngrid,nslope) ! Perenial CO2 ice on the surface (kg.m-2)
+      REAL,INTENT(INOUT) :: perennial_co2ice(ngrid,nslope) ! perennial CO2 ice on the surface (kg.m-2)
       REAL,INTENT(INOUT) :: psolaralb(ngrid,2,nslope) ! albedo of the surface
       REAL,INTENT(INOUT) :: pemisurf(ngrid,nslope) ! emissivity of the surface
@@ -186,5 +186,5 @@
       REAL   :: zcondices_tmp(ngrid)          ! temporary condensation rate [kg/m^2/s]
       REAL   :: piceco2_tmp(ngrid)            ! temporary amount of CO2 frost on the surface [kg/m^2]
-      REAL   :: perenial_co2ice_tmp(ngrid)    ! temporary amount of perenial CO2 frost on the surface [kg/m^2]
+      REAL   :: perennial_co2ice_tmp(ngrid)    ! temporary amount of perennial CO2 frost on the surface [kg/m^2]
       LOGICAL :: condsub_tmp(ngrid)           ! Boolean to check if CO2 ice is condensing / sublimating on the sub grid surface [1]
       REAL :: zfallice_tmp(ngrid,nlayer+1)    ! temporary amount of ice falling from layer l for a specific sub-grid surface [kg/m^2/s]
@@ -581,8 +581,8 @@
         alb_tmp(:,:) = psolaralb(:,:,islope)
         emisref_tmp(:) = 0.
-        perenial_co2ice_tmp(:) =  perenial_co2ice(:,islope) 
-        CALL albedocaps(zls,ngrid,piceco2_tmp,perenial_co2ice_tmp,
+        perennial_co2ice_tmp(:) =  perennial_co2ice(:,islope) 
+        CALL albedocaps(zls,ngrid,piceco2_tmp,perennial_co2ice_tmp,
      &                  alb_tmp,emisref_tmp)
-        perenial_co2ice(:,islope) = perenial_co2ice_tmp(:)
+        perennial_co2ice(:,islope) = perennial_co2ice_tmp(:)
         psolaralb(:,1,islope) =  alb_tmp(:,1)
         psolaralb(:,2,islope) =  alb_tmp(:,2)
Index: trunk/LMDZ.MARS/libf/phymars/conf_phys.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/conf_phys.F	(revision 3129)
+++ trunk/LMDZ.MARS/libf/phymars/conf_phys.F	(revision 3130)
@@ -37,5 +37,5 @@
       use aeropacity_mod, only: iddist, topdustref
       USE mod_phys_lmdz_transfert_para, ONLY: bcast
-      USE paleoclimate_mod,ONLY: paleoclimate,albedo_perenialco2,
+      USE paleoclimate_mod,ONLY: paleoclimate,albedo_perennialco2,
      &                           lag_layer 
       use microphys_h, only: mteta
@@ -351,8 +351,8 @@
 
 
-         write(*,*)"Albedo for perenial CO2 ice?"
-         albedo_perenialco2 = 0.85 ! default value
-         call getin_p("albedo_perenialco2",albedo_perenialco2)
-         write(*,*)"albedo_perenialco2 = ",albedo_perenialco2
+         write(*,*)"Albedo for perennial CO2 ice?"
+         albedo_perennialco2 = 0.85 ! default value
+         call getin_p("albedo_perennialco2",albedo_perennialco2)
+         write(*,*)"albedo_perennialco2 = ",albedo_perennialco2
 
 ! TRACERS:
Index: trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90	(revision 3129)
+++ trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90	(revision 3130)
@@ -2,5 +2,5 @@
 
 use comsoil_h,           only: inertiedat, inertiesoil, nsoilmx, tsoil, nqsoil, qsoil
-use surfdat_h,           only: albedodat, perenial_co2ice, watercap, tsurf, emis, qsurf
+use surfdat_h,           only: albedodat, perennial_co2ice, watercap, tsurf, emis, qsurf
 use comslope_mod,        only: def_slope, subslope_dist
 use phyredem,            only: physdem0, physdem1
@@ -161,5 +161,5 @@
     call physdem1("startfi.nc",nsoilmx,ngrid,llm,nq,nqsoil,dttestphys,time,      &
                   tsurf,tsoil,inertiesoil,albedo,emis,q2,qsurf,qsoil,tauscaling, &
-                  totcloudfrac,wstar,watercap,perenial_co2ice)
+                  totcloudfrac,wstar,watercap,perennial_co2ice)
 endif !(.not. therestartfi)
 
Index: trunk/LMDZ.MARS/libf/phymars/paleoclimate_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/paleoclimate_mod.F90	(revision 3129)
+++ trunk/LMDZ.MARS/libf/phymars/paleoclimate_mod.F90	(revision 3130)
@@ -17,8 +17,8 @@
     real, save, allocatable :: h2o_ice_depth(:,:)  ! Thickness of the lag before H2O ice [m]
     real, save, allocatable :: lag_co2_ice(:,:)  ! Thickness of the lag before CO2 ice [m]
-    real, save :: albedo_perenialco2             ! Albedo for perenial co2 ice [1]
+    real, save :: albedo_perennialco2             ! Albedo for perennial co2 ice [1]
     real, save, allocatable :: d_coef(:,:)  ! Diffusion coeficent
     LOGICAL,SAVE :: lag_layer ! does lag layer is present?
-!$OMP THREADPRIVATE(h2o_ice_depth,d_coef,lag_co2_ice,albedo_perenialco2)
+!$OMP THREADPRIVATE(h2o_ice_depth,d_coef,lag_co2_ice,albedo_perennialco2)
 
     CONTAINS
Index: trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90	(revision 3129)
+++ trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90	(revision 3130)
@@ -10,5 +10,5 @@
 subroutine phyetat0 (fichnom,tab0,Lmodif,nsoil,ngrid,nlay,nq,nqsoil, &
                      day_ini,time0,tsurf,tsoil,albedo,emis,q2,qsurf,qsoil, &
-                     tauscaling,totcloudfrac,wstar,watercap,perenial_co2ice, &
+                     tauscaling,totcloudfrac,wstar,watercap,perennial_co2ice, &
                      def_slope,def_slope_mean,subslope_dist)
 
@@ -75,5 +75,5 @@
   real,intent(out) :: wstar(ngrid) ! Max vertical velocity in thermals (m/s)
   real,intent(out) :: watercap(ngrid,nslope) ! h2o_ice_cover
-  real,intent(out) :: perenial_co2ice(ngrid,nslope) ! perenial co2 ice(kg/m^2)
+  real,intent(out) :: perennial_co2ice(ngrid,nslope) ! perennial co2 ice(kg/m^2)
   real,intent(out) :: def_slope(nslope+1) !boundaries for bining of the slopes
   real,intent(out) :: def_slope_mean(nslope)
@@ -753,5 +753,5 @@
    endif
 
-! Diffuesion coeficent 
+! Diffusion coeficent 
    call get_field("d_coef",d_coef,found,indextime)
    if (.not.found) then
@@ -761,6 +761,5 @@
    endif
 
-
-!  Depth of CO2 lag
+! Depth of CO2 lag
    call get_field("lag_co2_ice",lag_co2_ice,found,indextime)
    if (.not.found) then
@@ -769,38 +768,37 @@
      lag_co2_ice(:,:) = -1.
    endif
-
-! Perenial CO2 ice   
-   call get_field("perenial_co2ice",perenial_co2ice,found,indextime)
-   if (.not.found) then
-     write(*,*) "phyetat0: Failed loading <perenial_co2ice> : ", &
-                "<perenial_co2ice> is set as 10m at the South Pole"
-     perenial_co2ice(:,:) = 0.
-     if (abs(latitude(ngrid)-(-pi/2.)).lt.1.e-5) then
-       DO islope = 1,nslope
-        perenial_co2ice(ngrid,islope) = 10*1.6e3 ! 10m which is convert to kg/m^2
-        qsurf(ngrid,igcm_co2_tmp,islope) = qsurf(ngrid-1,igcm_co2_tmp,islope) + & ! perenial ice + frost
-                                        perenial_co2ice(ngrid,islope)
-       ENDDO
-     endif
-   endif ! notfound
   else ! no startfiphyle
      h2o_ice_depth(:,:) = -1.
      lag_co2_ice(:,:) = -1.
-     perenial_co2ice(:,:) = 0.
      d_coef(:,:)= 4.e-4
-     if (abs(latitude(ngrid)-(-pi/2.)).lt.1.e-5) then
-       DO islope = 1,nslope
-        perenial_co2ice(ngrid,islope) = 10*1.6e3 ! 10m which is convert to kg/m^2
-        qsurf(ngrid,igcm_co2_tmp,islope) = qsurf(ngrid-1,igcm_co2_tmp,islope) + & ! perenial ice + frost
-                                        perenial_co2ice(ngrid,islope)
-       ENDDO
-     endif
   endif !startphy_file
 else
   h2o_ice_depth(:,:) = -1.
   lag_co2_ice(:,:) = -1.
-  perenial_co2ice(:,:) = 0.
   d_coef(:,:)= 4.e-4
 endif !paleoclimate
+
+! Perennial CO2 ice
+perennial_co2ice(:,:) = 0.
+if (startphy_file) then
+    call get_field("perennial_co2ice",perennial_co2ice,found,indextime)
+    if (.not. found) then
+        write(*,*) "phyetat0: Failed loading <perennial_co2ice> : ", &
+                   "<perennial_co2ice> is set as 10m at the South Pole"
+        if (abs(latitude(ngrid) - (-pi/2.)) < 1.e-5) then
+            do islope = 1,nslope
+                perennial_co2ice(ngrid,islope) = 10*1.6e3 ! 10m which is convert to kg/m^2
+               qsurf(ngrid,igcm_co2_tmp,islope) = qsurf(ngrid - 1,igcm_co2_tmp,islope) + perennial_co2ice(ngrid,islope) ! perennial ice + frost
+            enddo
+        endif
+    endif ! not found
+else
+    if (abs(latitude(ngrid) - (-pi/2.)) < 1.e-5) then
+        do islope = 1,nslope
+            perennial_co2ice(ngrid,islope) = 10*1.6e3 ! 10m which is convert to kg/m^2
+            qsurf(ngrid,igcm_co2_tmp,islope) = qsurf(ngrid - 1,igcm_co2_tmp,islope) + perennial_co2ice(ngrid,islope) ! perennial ice + frost
+        enddo
+    endif
+endif !startphy_file
 
 ! close file:
Index: trunk/LMDZ.MARS/libf/phymars/phyredem.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/phyredem.F90	(revision 3129)
+++ trunk/LMDZ.MARS/libf/phymars/phyredem.F90	(revision 3130)
@@ -168,5 +168,5 @@
                     albedo,emis,q2,qsurf,qsoil,&
                     tauscaling,totcloudfrac,wstar, &
-                    watercap,perenial_co2ice)
+                    watercap,perennial_co2ice)
   ! write time-dependent variable to restart file
   use iostart, only : open_restartphy, close_restartphy, & 
@@ -205,5 +205,5 @@
   real,intent(in) :: wstar(ngrid)
   real,intent(in) :: watercap(ngrid,nslope)
-  real,intent(in) :: perenial_co2ice(ngrid,nslope)
+  real,intent(in) :: perennial_co2ice(ngrid,nslope)
 
   integer :: iq
@@ -226,6 +226,6 @@
   call put_field("watercap","H2O ice cover",watercap,time)
  
- ! Perenial CO2 ice layer
-  if (paleoclimate) call put_field("perenial_co2ice","CO2 ice cover",perenial_co2ice,time)
+  ! Perennial CO2 ice layer
+  call put_field("perennial_co2ice","CO2 ice cover",perennial_co2ice,time)
 
   ! Surface temperature
Index: trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/physiq_mod.F	(revision 3129)
+++ trunk/LMDZ.MARS/libf/phymars/physiq_mod.F	(revision 3130)
@@ -59,5 +59,5 @@
      &                     capcal, fluxgrd, qsurf,
      &                     hmons,summit,base,watercap,watercaptag,
-     &                     perenial_co2ice
+     &                     perennial_co2ice
       use comsaison_h, only: dist_sol, declin, zls, 
      &                       mu0, fract, local_time
@@ -604,5 +604,5 @@
      &         tsurf,tsoil,albedo,emis,
      &         q2,qsurf,qsoil,tauscaling,totcloudfrac,wstar,
-     &         watercap,perenial_co2ice,
+     &         watercap,perennial_co2ice,
      &         def_slope,def_slope_mean,subslope_dist)
 
@@ -2209,5 +2209,5 @@
      $              capcal,zplay,zplev,tsurf,pt,
      $              pphi,pdt,pdu,pdv,zdtsurf,pu,pv,pq,pdq,
-     $              qsurf(:,igcm_co2,:),perenial_co2ice,
+     $              qsurf(:,igcm_co2,:),perennial_co2ice,
      $              albedo,emis,rdust,
      $              zdtc,zdtsurfc,pdpsrf,zduc,zdvc,zdqc,
@@ -2625,5 +2625,5 @@
      .                tsurf,tsoil,inertiesoil,albedo,
      .                emis,q2,qsurf,qsoil,tauscaling,totcloudfrac,
-     .                wstar,watercap,perenial_co2ice)
+     .                wstar,watercap,perennial_co2ice)
           ENDIF ! of IF (write_restart)
 
@@ -3205,4 +3205,13 @@
      &         "Perennial water ice thickness"
      &         ,"kg.m-2",watercap(:,islope))
+         ENDDO
+         call write_output("perennial_co2ice",
+     &         "Perennial co2 ice thickness","kg.m-2",
+     &         perennial_co2ice(:,iflat))
+         do islope=1,nslope
+          write(str2(1:2),'(i2.2)') islope
+         call write_output("perennial_co2ice_slope"//str2,
+     &         "Perennial c ice thickness"
+     &         ,"kg.m-2",perennial_co2ice(:,islope))
          ENDDO
          call write_output("temp_layer1","temperature in layer 1",
Index: trunk/LMDZ.MARS/libf/phymars/surfdat_h.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/surfdat_h.F90	(revision 3129)
+++ trunk/LMDZ.MARS/libf/phymars/surfdat_h.F90	(revision 3130)
@@ -53,6 +53,6 @@
   REAL,ALLOCATABLE,SAVE :: qsurf(:,:,:) ! tracer on surface (e.g. kg.m-2)
   REAL,SAVE,ALLOCATABLE :: watercap(:,:) ! Surface water ice (kg.m-2)
-  REAL,SAVE,ALLOCATABLE :: perenial_co2ice(:,:) ! Perenial CO2 ice (kg.m-2)
-!$OMP THREADPRIVATE(tsurf,emis,capcal,fluxgrd,qsurf,watercap,perenial_co2ice)
+  REAL,SAVE,ALLOCATABLE :: perennial_co2ice(:,:) ! Perennial CO2 ice (kg.m-2)
+!$OMP THREADPRIVATE(tsurf,emis,capcal,fluxgrd,qsurf,watercap,perennial_co2ice)
 
 contains
@@ -77,5 +77,5 @@
     allocate(tsurf(ngrid,nslope))
     allocate(watercap(ngrid,nslope))
-    allocate(perenial_co2ice(ngrid,nslope))
+    allocate(perennial_co2ice(ngrid,nslope))
     allocate(emis(ngrid,nslope))
     allocate(capcal(ngrid,nslope))
@@ -108,5 +108,5 @@
     if (allocated(tsurf))            deallocate(tsurf)
     if (allocated(watercap))         deallocate(watercap)
-    if (allocated(perenial_co2ice))  deallocate(perenial_co2ice)
+    if (allocated(perennial_co2ice))  deallocate(perennial_co2ice)
     if (allocated(emis))             deallocate(emis)
     if (allocated(capcal))           deallocate(capcal)
@@ -130,5 +130,5 @@
     allocate(tsurf(ngrid,nslope))
     allocate(watercap(ngrid,nslope))
-    allocate(perenial_co2ice(ngrid,nslope))
+    allocate(perennial_co2ice(ngrid,nslope))
     allocate(emis(ngrid,nslope))
     allocate(capcal(ngrid,nslope))
@@ -144,5 +144,5 @@
     if (allocated(tsurf))            deallocate(tsurf)
     if (allocated(watercap))         deallocate(watercap)
-    if (allocated(perenial_co2ice))  deallocate(perenial_co2ice)
+    if (allocated(perennial_co2ice)) deallocate(perennial_co2ice)
     if (allocated(emis))             deallocate(emis)
     if (allocated(capcal))           deallocate(capcal)
