Index: trunk/LMDZ.COMMON/libf/evolution/changelog.txt
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3673)
+++ trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3680)
@@ -621,2 +621,5 @@
 - Addition of pore-filled ice information for 'stratum' in the layering algorithm.
 - Deactivating the soil temperature shifting because of bad values given by interpolation.
+
+== 12/03/2025 == JBC
+Updating the average pressure at each iteration.
Index: trunk/LMDZ.COMMON/libf/evolution/pem.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3673)
+++ trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3680)
@@ -246,5 +246,5 @@
 character(100)        :: chtimelimit     ! Time limit for the PEM job outputted by the SLURM command
 real                  :: timelimit       ! Time limit for the PEM job in seconds
-real, parameter       :: antetime = 2700 ! Anticipation time to prevent reaching the job time limit: 2700 s = 45 min by default (it should cover the computing time of the reshaping tool)
+real, parameter       :: antetime = 3600 ! Anticipation time to prevent reaching the job time limit: 3600 s by default (it should cover the computing time of the reshaping tool)
 integer               :: cstat, days, hours, minutes, seconds
 character(1)          :: sep
@@ -758,5 +758,4 @@
         enddo
     enddo
-
     if (adsorption_pem) then
         do i = 1,ngrid
@@ -764,4 +763,5 @@
         enddo
     endif
+    ps_avg = ps_avg*ps_avg_global_new/ps_avg_global_old
     write(*,*) 'Global average pressure old time step:',ps_avg_global_old
     write(*,*) 'Global average pressure new time step:',ps_avg_global_new
@@ -1131,5 +1131,6 @@
 write(*,*) '> Reconstructing the pressure for the PCM'
 allocate(ps_start(ngrid))
-ps_start = (ps_avg + ps_dev)*ps_avg_global_new/ps_avg_global_ini ! The pressure deviation is rescaled as well to avoid disproportionate oscillations in case of huge average pressure drop
+! The pressure deviation is rescaled as well to avoid disproportionate oscillations in case of huge average pressure drop
+ps_start = ps_avg + ps_dev*ps_avg_global_new/ps_avg_global_ini
 deallocate(ps_avg,ps_dev)
 
