Index: trunk/LMDZ.COMMON/libf/evolution/changelog.txt
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3591)
+++ trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3598)
@@ -551,2 +551,5 @@
 - Making allocation/deallocation systematically and more efficient in the main program.
 - Some cleanings (variables deletion, more adapted type/dimension, etc).
+
+== 23/01/2025 == JBC
+Correction of typos and minor bugs.
Index: trunk/LMDZ.COMMON/libf/evolution/comsoil_h_PEM.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/comsoil_h_PEM.F90	(revision 3591)
+++ trunk/LMDZ.COMMON/libf/evolution/comsoil_h_PEM.F90	(revision 3598)
@@ -22,5 +22,5 @@
 integer                             :: index_breccia      ! last index of the depth grid before having breccia
 integer                             :: index_bedrock      ! last index of the depth grid before having bedrock
-logical                             :: soil_pem           ! True by default, to run with the subsurface physic. Read in pem.def
+logical                             :: soil_pem           ! True by default, to run with the subsurface physic. Read in run_PEM.def
 real                                :: ini_huge_h2oice    ! Initial value for huge reservoirs of H2O ice [kg/m^2]
 logical                             :: reg_thprop_dependp ! thermal properites of the regolith vary with the surface pressure
Index: trunk/LMDZ.COMMON/libf/evolution/get_timelen_PCM_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/get_timelen_PCM_mod.F90	(revision 3591)
+++ trunk/LMDZ.COMMON/libf/evolution/get_timelen_PCM_mod.F90	(revision 3598)
@@ -40,17 +40,17 @@
 call error_msg(NF90_OPEN(var,NF90_NOWRITE,fID),"open",var)
 
-ierr = nf90_inq_varid (fID, "temps", vID)
+ierr = nf90_inq_varid(fID,"temps",vID)
 if (ierr /= nf90_noerr) then
     write(*,*)"read_data_PCM: Le champ <temps> est absent"
     write(*,*)"read_data_PCM: J essaie <time_counter>"
-    ierr = nf90_inq_varid (fID, "time_counter", vID)
+    ierr = nf90_inq_varid(fID,"time_counter",vID)
     if (ierr /= nf90_noerr) then
         write(*,*)"read_data_PCM: Le champ <time_counter> est absent"
         write(*,*)"read_data_PCM: J essaie <Time>"
-        ierr = nf90_inq_varid (fID,"Time",vID)
+        ierr = nf90_inq_varid(fID,"Time",vID)
         if (ierr /= nf90_noerr) then
             write(*,*)"read_data_PCM: Le champ <Time> est absent"
             write(*,*)trim(nf90_strerror(ierr))
-            call abort_gcm("get_timelen_PCM", "", 1)
+            call abort_gcm("get_timelen_PCM","",1)
         endif
         ! Get the length of the "Time" dimension
Index: trunk/LMDZ.COMMON/libf/evolution/pem.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3591)
+++ trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3598)
@@ -204,5 +204,5 @@
 ! Variables for surface and soil
 real, dimension(:,:),     allocatable :: tsurf_avg                        ! Grid points x Slope field: Averaged surface temperature [K]
-real, dimension(:,:),     allocatable :: tsurf_dev                        ! ngrid x Slope x Times field: Surface temperature deviation [K]
+real, dimension(:,:),     allocatable :: tsurf_dev                        ! Grid points x Slope field: Surface temperature deviation [K]
 real, dimension(:,:),     allocatable :: tsurf_avg_yr1                    ! Grid points x Slope field: Averaged surface temperature of first call of the PCM [K]
 real, dimension(:,:,:),   allocatable :: tsoil_avg                        ! Grid points x Soil x Slope field: Averaged Soil Temperature [K]
@@ -990,5 +990,5 @@
 enddo ! big time iteration loop of the pem
 deallocate(vmr_co2_PCM,q_co2_PEM_phys,q_h2o_PEM_phys,delta_co2_adsorbed)
-deallocate(watersoil_density_PEM_avg,watersurf_density_avg,)
+deallocate(watersoil_density_PEM_avg,watersurf_density_avg)
 deallocate(ps_timeseries,tsoil_PEM_timeseries,watersoil_density_PEM_timeseries)
 deallocate(co2ice_disappeared,delta_h2o_adsorbed,delta_h2o_icetablesublim)
Index: trunk/LMDZ.COMMON/libf/evolution/read_data_PCM_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/read_data_PCM_mod.F90	(revision 3591)
+++ trunk/LMDZ.COMMON/libf/evolution/read_data_PCM_mod.F90	(revision 3598)
@@ -80,6 +80,5 @@
 call error_msg(NF90_OPEN(filename1,NF90_NOWRITE,fID),"open",filename1)
 
-! Compute averages over the year for each point
-write(*,*) "Computing the average of tsurf..."
+! Download the data from the file
 if (nslope == 1) then ! There is no slope
     call get_var3("co2ice",co2_ice_slope_dyn(:,:,1,:))
@@ -289,5 +288,5 @@
 A = (1./m_co2 - 1./m_noco2)
 B = 1./m_noco2
-do i = 1,iim + 1
+do i = 1,iim_input + 1
     do j = 1,jjm_input + 1
         do t = 1, timelen
