Index: trunk/LMDZ.COMMON/libf/evolution/changelog.txt
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3313)
+++ trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3317)
@@ -283,2 +283,5 @@
 == 23/04/2024 == JBC
 Small correction about the dimension of an array.
+
+== 25/04/2024 == JBC
+The "start" and "startfi" file names are renamed to match those from the Mars PCM. This is necessary to initialize correctly the 3D PEM with "phys_state_var_init_mod.F90".
Index: trunk/LMDZ.COMMON/libf/evolution/deftank/launch_pem.sh
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/deftank/launch_pem.sh	(revision 3313)
+++ trunk/LMDZ.COMMON/libf/evolution/deftank/launch_pem.sh	(revision 3317)
@@ -190,12 +190,6 @@
 echo "Run PEM $iPEM..."
 cp run_PEM.def run.def
-mv startfi.nc startfi_evol.nc
-if [ -f "start.nc" ]; then
-    mv start.nc start_evol.nc
-elif [ -f "start1D.txt" ]; then
-    mv start1D.txt start1D_evol.txt
-fi
 ./$exePEM > out_runPEM${iPEM} 2>&1
-if [ ! -f "restartfi_evol.nc" ]; then # Check if run ended abnormally
+if [ ! -f "restartfi.nc" ]; then # Check if run ended abnormally
     echo "Error: the run PEM $iPEM crashed!"
     exit 1
@@ -209,12 +203,12 @@
 cp restartpem.nc starts/startpem${iPEM}.nc
 mv restartpem.nc startpem.nc
-cp restartfi_evol.nc starts/startfi_postPEM${iPEM}.nc
-mv restartfi_evol.nc startfi.nc
-if [ -f "restart_evol.nc" ]; then
-    cp restart_evol.nc starts/restart_postPEM${iPEM}.nc
-    mv restart_evol.nc start.nc
-elif [ -f "restart1D_evol.txt" ]; then
-    cp restart1D_evol.txt starts/restart1D_postPEM${iPEM}.txt
-    mv restart1D_evol.txt start1D.txt
+cp restartfi.nc starts/startfi_postPEM${iPEM}.nc
+mv restartfi.nc startfi.nc
+if [ -f "restart.nc" ]; then
+    cp restart.nc starts/restart_postPEM${iPEM}.nc
+    mv restart.nc start.nc
+elif [ -f "restart1D.txt" ]; then
+    cp restart1D.txt starts/restart1D_postPEM${iPEM}.txt
+    mv restart1D.txt start1D.txt
 fi
 ((iPEM++))
@@ -274,12 +268,6 @@
     echo "Run PEM $iPEM..."
     cp run_PEM.def run.def
-    mv startfi.nc startfi_evol.nc
-    if [ -f "start.nc" ]; then
-        mv start.nc start_evol.nc
-    elif [ -f "start1D.txt" ]; then
-        mv start1D.txt start1D_evol.txt
-    fi
     ./$exePEM > out_runPEM${iPEM} 2>&1
-    if [ ! -f "restartfi_evol.nc" ]; then # Check if run ended abnormally
+    if [ ! -f "restartfi.nc" ]; then # Check if run ended abnormally
         echo "Error: the run PEM $iPEM crashed!"
         exit 1
@@ -293,12 +281,12 @@
     cp restartpem.nc starts/startpem${iPEM}.nc
     mv restartpem.nc startpem.nc
-    cp restartfi_evol.nc starts/startfi_postPEM${iPEM}.nc
-    mv restartfi_evol.nc startfi.nc
-    if [ -f "restart_evol.nc" ]; then
-        cp restart_evol.nc starts/restart_postPEM${iPEM}.nc
-        mv restart_evol.nc start.nc
-    elif [ -f "restart1D_evol.txt" ]; then
-        cp restart1D_evol.txt starts/restart1D_postPEM${iPEM}.txt
-        mv restart1D_evol.txt start1D.txt
+    cp restartfi.nc starts/startfi_postPEM${iPEM}.nc
+    mv restartfi.nc startfi.nc
+    if [ -f "restart.nc" ]; then
+        cp restart.nc starts/restart_postPEM${iPEM}.nc
+        mv restart.nc start.nc
+    elif [ -f "restart1D.txt" ]; then
+        cp restart1D.txt starts/restart1D_postPEM${iPEM}.txt
+        mv restart1D.txt start1D.txt
     fi
     ((iPEM++))
Index: trunk/LMDZ.COMMON/libf/evolution/layering_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/layering_mod.F90	(revision 3313)
+++ trunk/LMDZ.COMMON/libf/evolution/layering_mod.F90	(revision 3317)
@@ -31,8 +31,8 @@
     real               :: thickness          ! Layer thickness [m]
     real               :: top_elevation      ! Layer top_elevation (top height from the surface) [m]
-    real               :: co2ice_volfrac     ! CO2 ice volumic fraction
-    real               :: h2oice_volfrac     ! H2O ice volumic fraction
-    real               :: dust_volfrac       ! Dust volumic fraction
-    real               :: air_volfrac        ! Air volumic fraction inside pores
+    real               :: co2ice_volfrac     ! CO2 ice volumetric fraction
+    real               :: h2oice_volfrac     ! H2O ice volumetric fraction
+    real               :: dust_volfrac       ! Dust volumetric fraction
+    real               :: air_volfrac        ! Air volumetric fraction inside pores
     type(stratum), pointer :: up => null()   ! Upper stratum (next node)
     type(stratum), pointer :: down => null() ! Lower stratum (previous node)
@@ -122,5 +122,5 @@
 ! Verification of volume fraction
 if (abs(1. - (str%co2ice_volfrac + str%h2oice_volfrac + str%dust_volfrac + str%air_volfrac)) > tol) &
-     error stop 'add_stratum: properties for the new stratum are not possible (sum of volumic fraction /= 1)!'
+     error stop 'add_stratum: properties for the new stratum are not possible (sum of volumetric fraction /= 1)!'
 
 ! Increment the number of strata
@@ -175,5 +175,5 @@
     ! Verification of volume fraction
     if (abs(1. - (str%co2ice_volfrac + str%h2oice_volfrac + str%dust_volfrac + str%air_volfrac)) > tol) &
-         error stop 'insert_stratum: properties for the new stratum are not possible (sum of volumic fraction /= 1)!'
+         error stop 'insert_stratum: properties for the new stratum are not possible (sum of volumetric fraction /= 1)!'
 
     ! Increment the number of strata
Index: trunk/LMDZ.COMMON/libf/evolution/pem.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3313)
+++ trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3317)
@@ -2,5 +2,5 @@
 ! I   Initialization
 !    I_a Read the "run.def"
-!    I_b Read the "start_evol.nc" and "startfi_evol.nc"
+!    I_b Read the "start.nc" and "startfi.nc"
 !    I_c Subslope parametrisation
 !    I_d Read the PCM data and convert them to the physical grid
@@ -22,5 +22,5 @@
 ! III Output
 !    III_a Update surface value for the PCM start files
-!    III_b Write the "restart_evol.nc" and "restartfi_evol.nc"
+!    III_b Write the "restart.nc" and "restartfi.nc"
 !    III_c Write the "restartpem.nc"
 !------------------------
@@ -130,5 +130,5 @@
 
 ! Variables to read start.nc
-character(*), parameter :: start_name = "start_evol.nc" ! Name of the file used to initialize the PEM
+character(*), parameter :: start_name = "start.nc" ! Name of the file used to initialize the PEM
 
 ! Dynamic variables
@@ -145,5 +145,5 @@
 
 ! Variables to read starfi.nc
-character(*), parameter :: startfi_name = "startfi_evol.nc" ! Name of the file used to initialize the PEM
+character(*), parameter :: startfi_name = "startfi.nc" ! Name of the file used to initialize the PEM
 character(2)            :: str2
 integer                 :: ncid, status                           ! Variable for handling opening of files
@@ -313,11 +313,11 @@
     endif
     therestartfi = .false. ! Default value
-    inquire(file = 'startfi_evol.nc',exist = therestartfi)
+    inquire(file = 'startfi.nc',exist = therestartfi)
     if (.not. therestartfi) then
-        write(*,*) 'There is no "startfi_evol.nc" file!'
+        write(*,*) 'There is no "startfi.nc" file!'
         error stop 'Initialization cannot be done for the 1D PEM.'
     endif
 
-    call init_testphys1d('start1D_evol.txt','startfi_evol.nc',therestart1D,therestartfi,ngrid,nlayer,610.,nq,q, &
+    call init_testphys1d('start1D_evol.txt','startfi.nc',therestart1D,therestartfi,ngrid,nlayer,610.,nq,q, &
                          time_0,ps(1),ucov,vcov,teta,ndt,ptif,pks,dtphys,zqsat,dq,dqdyn,day0,day,gru,grv,w,     &
                          play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau)
@@ -330,7 +330,7 @@
 !------------------------
 ! I   Initialization
-!    I_b Read of the "start_evol.nc" and starfi_evol.nc
-!------------------------
-! I_b.1 Read "start_evol.nc"
+!    I_b Read of the "start.nc" and starfi_evol.nc
+!------------------------
+! I_b.1 Read "start.nc"
 allocate(ps_start_PCM(ngrid))
 #ifndef CPP_1D
@@ -351,5 +351,5 @@
     status = nf90_close(ncid)
 
-    call iniphysiq('startfi_evol.nc',iim,jjm,llm,(jjm-1)*iim+2,comm_lmdz,daysec,day_ini,dtphys/nsplit_phys,rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp,iflag_phys)
+    call iniphysiq('startfi.nc',iim,jjm,llm,(jjm-1)*iim+2,comm_lmdz,daysec,day_ini,dtphys/nsplit_phys,rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp,iflag_phys)
 #else
     ps_start_PCM(1) = ps(1)
@@ -357,5 +357,5 @@
 
 ! In the PCM, these values are given to the physic by the dynamic.
-! Here we simply read them in the "startfi_evol.nc" file
+! Here we simply read them in the "startfi.nc" file
 status = nf90_open(startfi_name, NF90_NOWRITE, ncid)
 
@@ -374,5 +374,5 @@
 status = nf90_close(ncid)
 
-! I_b.2 Read the "startfi_evol.nc"
+! I_b.2 Read the "startfi.nc"
 ! First we read the initial state (starfi.nc)
 #ifndef CPP_STD
@@ -1079,7 +1079,7 @@
 !------------------------
 ! III Output
-!    III_b Write "restart_evol.nc" and "restartfi_evol.nc"
-!------------------------
-! III_b.1 Write "restart_evol.nc"
+!    III_b Write "restart.nc" and "restartfi.nc"
+!------------------------
+! III_b.1 Write "restart.nc"
 ptimestep = iphysiq*daysec/real(day_step)/nsplit_phys ! dtphys/nsplit_phys
 pday = day_ini
@@ -1090,7 +1090,7 @@
     call pression (ip1jmp1,ap,bp,ps,p)
     call massdair(p,masse)
-    call dynredem0("restart_evol.nc",day_ini,phis)
-    call dynredem1("restart_evol.nc",time_0,vcov,ucov,teta,q,masse,ps)
-    write(*,*) "restart_evol.nc has been written"
+    call dynredem0("restart.nc",day_ini,phis)
+    call dynredem1("restart.nc",time_0,vcov,ucov,teta,q,masse,ps)
+    write(*,*) "restart.nc has been written"
 #else
     call writerestart1D('restart1D_evol.txt',ps(1),tsurf(1,:),nlayer,size(tsurf,2),teta,ucov,vcov,nq,noms,qsurf(1,:,:),q)
@@ -1098,23 +1098,23 @@
 #endif
 
-! III_b.2 Write the "restartfi_evol.nc"
+! III_b.2 Write the "restartfi.nc"
 #ifndef CPP_STD
-    call physdem0("restartfi_evol.nc",longitude,latitude,nsoilmx,ngrid, &
+    call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid, &
                   nlayer,nq,ptimestep,pday,0.,cell_area,albedodat,      &
                   inertiedat,def_slope,subslope_dist)
-    call physdem1("restartfi_evol.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, &
+    call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq,nqsoil, &
                   ptimestep,ztime_fin,tsurf,tsoil,inertiesoil,        &
                   albedo,emis,q2,qsurf,qsoil,tauscaling,totcloudfrac, &
                   wstar,watercap,perennial_co2ice)
 #else
-    call physdem0("restartfi_evol.nc",longitude,latitude,nsoilmx,ngrid, &
+    call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid, &
                   nlayer,nq,ptimestep,pday,time_phys,cell_area,         &
                   albedo_bareground,inertiedat,zmea,zstd,zsig,zgam,zthe)
-    call physdem1("restartfi_evol.nc",nsoilmx,ngrid,nlayer,nq,nqsoil,  &
+    call physdem1("restartfi.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"
+write(*,*) "restartfi.nc has been written"
 
 !------------------------
