Index: trunk/LMDZ.COMMON/libf/evolution/changelog.txt
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3286)
+++ trunk/LMDZ.COMMON/libf/evolution/changelog.txt	(revision 3287)
@@ -258,2 +258,6 @@
     - several subroutines to manipulate the 'layering' and 'stratum' (initilize, finalize, display, modify, etc);
     - subroutines of the algorithm to make the layering evolve according to the input tendencies (new layer, change of content in a layer, creation of dust lag layer, etc).
+
+== 29/03/2024 == JBC
+- Small correction to make the 3D PEM be able to compile.
+- Improvement of "launch_pem.sh": a file "kill_launch_pem.sh" is now automatically created which allows the user to kill the process of the launching script in case.
Index: trunk/LMDZ.COMMON/libf/evolution/deftank/launch_pem.sh
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/deftank/launch_pem.sh	(revision 3286)
+++ trunk/LMDZ.COMMON/libf/evolution/deftank/launch_pem.sh	(revision 3287)
@@ -6,6 +6,11 @@
 echo "The launching script is starting!"
 echo "The output file is \"loglaunch.txt\"."
-if [ "$1" = "bg" ]; then
+
+# Re-spawn the script as a background process and create a bash file to kill it in case
+if [ "$1" = "bg" ]; then 
     date
+    echo '#!/bin/bash' > kill_launch_pem.sh
+    echo 'kill' $$ >> kill_launch_pem.sh
+    chmod +x kill_launch_pem.sh
 else
     nohup "$0" bg > loglaunch.txt 2>&1 &
Index: trunk/LMDZ.COMMON/libf/evolution/pem.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3286)
+++ trunk/LMDZ.COMMON/libf/evolution/pem.F90	(revision 3287)
@@ -82,5 +82,5 @@
     use mod_phys_lmdz_para, only: is_parallel, is_sequential, is_mpi_root, is_omp_root, is_master
     use planete_h,          only: aphelie, periheli, year_day, peri_day, obliquit, iniorbit
-    use comcstfi_h,         only: pi, rad, g, mugaz, r
+    use comcstfi_h,         only: pi, rad, g, cpp, mugaz, r
     use surfini_mod,        only: surfini
 #else
@@ -91,5 +91,5 @@
     use aerosol_mod,        only: iniaerosol
     use planete_mod,        only: apoastr, periastr, year_day, peri_day, obliquit
-    use comcstfi_mod,       only: pi, rad, g, mugaz, r
+    use comcstfi_mod,       only: pi, rad, g, cpp, mugaz, r
 #endif
 
