Index: trunk/LMDZ.COMMON/libf/evolution/changelog.txt
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3113)
+++ trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3114)
@@ -127,2 +127,5 @@
 == 27/10/2023 == JBC
 Addition of the possibility to ask for a number of Mars years to be simulated in total (previously it was only in Earth years).
+
+== 03/11/2023 == JBC
+Following r3113, addition of 'nqsoil' and 'qsoil' in the arguments of the subroutines 'phyetat0' and 'physdem1' to be able to compile.
Index: trunk/LMDZ.COMMON/libf/evolution/pem.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3113)
+++ trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3114)
@@ -73,5 +73,5 @@
 
 #ifndef CPP_STD
-    use comsoil_h,          only: tsoil, nsoilmx, ini_comsoil_h, inertiedat, mlayer, volcapa, inertiesoil
+    use comsoil_h,          only: tsoil, nsoilmx, ini_comsoil_h, inertiedat, mlayer, volcapa, inertiesoil, nqsoil, qsoil
     use surfdat_h,          only: tsurf, emis, qsurf, watercap, ini_surfdat_h, &
                                   albedodat, zmea, zstd, zsig, zgam, zthe,     &
@@ -367,6 +367,6 @@
 ! First we read the initial state (starfi.nc)
 #ifndef CPP_STD
-    call phyetat0(FILE_NAME,0,0,nsoilmx,ngrid,nlayer,nq,day_ini,time_phys,tsurf, &
-                  tsoil,albedo,emis,q2,qsurf,tauscaling,totcloudfrac,wstar,      &
+    call phyetat0(FILE_NAME,0,0,nsoilmx,ngrid,nlayer,nq,nqsoil,day_ini,time_phys,tsurf, &
+                  tsoil,albedo,emis,q2,qsurf,qsoil,tauscaling,totcloudfrac,wstar,       &
                   watercap,perenial_co2ice,def_slope,def_slope_mean,subslope_dist)
 
@@ -383,4 +383,5 @@
     allocate(qsurf_read_generic(ngrid,nq))
     allocate(tsoil_read_generic(ngrid,nsoilmx))
+    allocate(qsoil_read_generic(ngrid,nsoilmx,nqsoil,nslope))
     allocate(emis_read_generic(ngrid))
     allocate(tsurf(ngrid,1))
@@ -393,8 +394,8 @@
     allocate(albedo(ngrid,2,1))
     allocate(inertiesoil(ngrid,nsoilmx,1))
-    call phyetat0(.true.,ngrid,nlayer,FILE_NAME,0,0,nsoilmx,nq,day_ini,time_phys, &
-                  tsurf_read_generic,tsoil_read_generic,emis_read_generic,q2,     &
-                  qsurf_read_generic,cloudfrac,totcloudfrac,hice,rnat,pctsrf_sic, &
-                  tslab, tsea_ice,sea_ice)
+    call phyetat0(.true.,ngrid,nlayer,FILE_NAME,0,0,nsoilmx,nq,nqsoil,day_ini,time_phys, &
+                  tsurf_read_generic,tsoil_read_generic,emis_read_generic,q2,            &
+                  qsurf_read_generic,qsoil_read_generic,cloudfrac,totcloudfrac,hice,     &
+                  rnat,pctsrf_sic,tslab,tsea_ice,sea_ice)
     call surfini(ngrid,nq,qsurf_read_generic,albedo_read_generic,albedo_bareground,albedo_snow_SPECTV,albedo_co2_ice_SPECTV)
 
@@ -1112,7 +1113,7 @@
                   inertiedat,def_slope,subslope_dist)
 
-    call physdem1("restartfi_evol.nc",nsoilmx,ngrid,nlayer,nq,  &
-                  ptimestep,ztime_fin,tsurf,tsoil,inertiesoil,  &
-                  albedo,emis,q2,qsurf,tauscaling,totcloudfrac, &
+    call physdem1("restartfi_evol.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, &
+                  ptimestep,ztime_fin,tsurf,tsoil,inertiesoil,        &
+                  albedo,emis,q2,qsurf,qsoil,tauscaling,totcloudfrac, &
                   wstar,watercap,perenial_co2ice)
 #else
@@ -1121,8 +1122,8 @@
                   albedo_bareground,inertiedat,zmea,zstd,zsig,zgam,zthe)
 
-    call physdem1("restartfi_evol.nc",nsoilmx,ngrid,nlayer,nq,   &
-                  ptimestep,ztime_fin,tsurf,tsoil,emis,q2,qsurf, &
-                  cloudfrac,totcloudfrac,hice,rnat,pctsrf_sic,   &
-                  tslab,tsea_ice,sea_ice)
+    call physdem1("restartfi_evol.nc",nsoilmx,ngrid,nlayer,nq,nqsoil,  &
+                  ptimestep,ztime_fin,tsurf,tsoil,emis,q2,qsurf,qsoil, &
+                  cloudfrac,totcloudfrac,hice,rnat,pctsrf_sic,tslab,   &
+                  tsea_ice,sea_ice)
 #endif
 write(*,*) "restartfi_evol.nc has been written"
