Index: trunk/LMDZ.COMMON/libf/evolution/changelog.txt
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3618)
+++ trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3620)
@@ -591,2 +591,5 @@
 == 11/02/2025 == JBC
 Correction for a problem concerning an imported variable whether in 1D or 3D.
+
+== 12/02/2025 == JBC
+Few small adjustments in the code.
Index: trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh	(revision 3618)
+++ trunk/LMDZ.COMMON/libf/evolution/deftank/lib_launchPEM.sh	(revision 3620)
@@ -348,7 +348,7 @@
         il=$(echo "($irelaunch - $nPCM_ini + 1)%$nPCM + 1" | bc)
         if [ $2 -ne 0 ]; then # Counting: PCM runs taken into account
-            i_myear=$(($(awk "NR==$iPEM {print \$3}" "info_PEM.txt") + $il))
+            i_myear=$(($(awk "NR==$iPEM {printf \"%s\n\", \$3}" "info_PEM.txt") + $il))
         else # Counting: only PEM runs count
-            i_myear=$(awk "NR==$iPEM {print \$3}" "info_PEM.txt")
+            i_myear=$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "info_PEM.txt")
         fi
         sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt
@@ -380,5 +380,5 @@
     iPEM=$(echo "$irelaunch + 1" | bc)
     iPCM=$(echo "$nPCM_ini + $nPCM*($irelaunch - 1) + 1" | bc)
-    i_myear=$(awk "NR==$(($iPEM + 1)) {print \$3}" "info_PEM.txt")
+    i_myear=$(awk "NR==$iPEM {printf \"%s\n\", \$3}" "info_PEM.txt")
     sed -i "1s/.*/$i_myear $n_myear $convert_years $iPCM $iPEM $nPCM $nPCM_ini/" info_PEM.txt
     cleanfiles diags/diagfi .nc $(($iPCM - 1))
Index: trunk/LMDZ.COMMON/libf/evolution/pem.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3618)
+++ trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3620)
@@ -1015,10 +1015,10 @@
 !------------------------
     call recomp_tend_co2(ngrid,nslope,timelen,d_co2ice,d_co2ice_ini,co2_ice,emis,vmr_co2_PCM,vmr_co2_PEM_phys,ps_timeseries,ps_avg_global_old,ps_avg_global_new)
-    
-    do ig = 1,ngrid
-        do islope = 1,nslope
-            call recomp_tend_h2o(icetable_depth_old(ig,islope),icetable_depth(ig,islope),tsurf_avg(ig,islope),tsoil_PEM_timeseries_old(ig,:,islope,:),tsoil_PEM_timeseries(ig,:,islope,:),d_h2oice(ig,islope))
-        enddo
-    enddo
+    !write(*,*) "> Updating the H2O sub-surface ice tendency due to lag layer"
+    !do ig = 1,ngrid
+    !    do islope = 1,nslope
+    !        call recomp_tend_h2o(icetable_depth_old(ig,islope),icetable_depth(ig,islope),tsurf_avg(ig,islope),tsoil_PEM_timeseries_old(ig,:,islope,:),tsoil_PEM_timeseries(ig,:,islope,:),d_h2oice(ig,islope))
+    !    enddo
+    !enddo
     deallocate(vmr_co2_PEM_phys,icetable_depth_old,tsoil_PEM_timeseries_old)
 
Index: trunk/LMDZ.COMMON/libf/evolution/read_data_PCM_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/read_data_PCM_mod.F90	(revision 3618)
+++ trunk/LMDZ.COMMON/libf/evolution/read_data_PCM_mod.F90	(revision 3620)
@@ -52,5 +52,5 @@
 real, dimension(ngrid,nsoilmx,nslope,timelen), intent(out) :: watersoil_density_timeseries ! Water density timeseries in the soil layer [kg/m^3]
 ! Local variables
-integer                               :: i, j, l, islope                       ! Loop variables
+integer                               :: i, j, t, islope                       ! Loop variables
 real                                  :: A, B                                  ! Intermediate variables to compute the mean molar mass of the layer
 character(:), allocatable             :: num                                   ! For reading sloped variables
@@ -243,5 +243,5 @@
     !------
     call get_var3("tsurf"//num,var3_read_1)
-       write(*,*) "Data for tsurf"//num//" downloaded."
+    write(*,*) "Data for tsurf"//num//" downloaded."
 
     ! Compute average over the year for each point
@@ -263,6 +263,6 @@
         var3_read_3 = sum(var4_read,4)/timelen
 #ifndef CPP_1D
-        do l = 1,nsoilmx
-            call gr_dyn_fi(timelen,iim_input + 1,jjm_input + 1,ngrid,var4_read(:,:,l,:),tsoil_timeseries(:,l,islope,:))
+        do t = 1,timelen
+            call gr_dyn_fi(nsoilmx,iim_input + 1,jjm_input + 1,ngrid,var4_read(:,:,:,t),tsoil_timeseries(:,:,islope,t))
         enddo
         call gr_dyn_fi(nsoilmx,iim_input + 1,jjm_input + 1,ngrid,var3_read_3,tsoil_avg(:,:,islope))
@@ -277,6 +277,6 @@
         call get_var4("waterdensity_soil"//num,var4_read)
 #ifndef CPP_1D
-        do l = 1,nsoilmx
-            call gr_dyn_fi(timelen,iim_input + 1,jjm_input + 1,ngrid,var4_read(:,:,l,:),watersoil_density_timeseries(:,l,islope,:))
+        do t = 1,timelen
+            call gr_dyn_fi(nsoilmx,iim_input + 1,jjm_input + 1,ngrid,var4_read(:,:,:,t),watersoil_density_timeseries(:,:,islope,t))
         enddo
 #else
Index: trunk/LMDZ.COMMON/libf/evolution/recomp_tend_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/recomp_tend_mod.F90	(revision 3618)
+++ trunk/LMDZ.COMMON/libf/evolution/recomp_tend_mod.F90	(revision 3620)
@@ -89,6 +89,4 @@
 real, parameter :: zcdv = 0.0325     ! Drag coefficient
 
-write(*,*) "> Updating the H2O tendency due to lag layer"
-
 ! Higher resistance due to growing lag layer (higher depth)
 Rz_old = icetable_depth_old*zcdv/coef_diff ! Old resistance from PCM
