Index: /trunk/LMDZ.MARS/changelog.txt
===================================================================
--- /trunk/LMDZ.MARS/changelog.txt	(revision 4112)
+++ /trunk/LMDZ.MARS/changelog.txt	(revision 4113)
@@ -5098,2 +5098,5 @@
 == 05/03/2026 == JBC
 Deletion of unused and redundant declaration of coefficient 'dryness' in "tracer_mod.F90".
+
+== 09/03/2026 == JBC
+Addition of file examples in "deftank/mesu" to submit jobs on MCMeSU cluster (Sorbonne Universite supercomputing resources) + Addition of partition details (nb of cores & memory per node) for Adastra/Spirit/Mesu.
Index: /trunk/LMDZ.MARS/deftank/adastra/run_month1
===================================================================
--- /trunk/LMDZ.MARS/deftank/adastra/run_month1	(revision 4112)
+++ /trunk/LMDZ.MARS/deftank/adastra/run_month1	(revision 4113)
@@ -2,5 +2,5 @@
 #SBATCH --job-name=run_month1
 #SBATCH --account=cin0391
-#SBATCH --constraint=GENOA
+#SBATCH --constraint=GENOA # 192 cores/node and 768 Gio memory/node
 #SBATCH --nodes=1
 #SBATCH --ntasks-per-node=24
Index: /trunk/LMDZ.MARS/deftank/adastra/run_year1
===================================================================
--- /trunk/LMDZ.MARS/deftank/adastra/run_year1	(revision 4112)
+++ /trunk/LMDZ.MARS/deftank/adastra/run_year1	(revision 4113)
@@ -2,5 +2,5 @@
 #SBATCH --job-name=run_year1
 #SBATCH --account=cin0391
-#SBATCH --constraint=GENOA
+#SBATCH --constraint=GENOA # 192 cores/node and 768 Gio memory/node
 #SBATCH --nodes=1
 #SBATCH --ntasks-per-node=24
Index: /trunk/LMDZ.MARS/deftank/mesu/README
===================================================================
--- /trunk/LMDZ.MARS/deftank/mesu/README	(revision 4113)
+++ /trunk/LMDZ.MARS/deftank/mesu/README	(revision 4113)
@@ -0,0 +1,7 @@
+>> EXAMPLES FOR THE MCMESU CLUSTER
+Job "run_month1" runs a simulation for month #1 and then possibly launches
+a job "run_month2" which runs a simulation for month #2 which then possibly
+launches a job "run_month3" etc.
+The starting and ending months of the simulation can be set in "run_month1"
+One should adapt the script (and underlying "run0" and "run.def.ref") to
+match their needs.
Index: /trunk/LMDZ.MARS/deftank/mesu/run0
===================================================================
--- /trunk/LMDZ.MARS/deftank/mesu/run0	(revision 4113)
+++ /trunk/LMDZ.MARS/deftank/mesu/run0	(revision 4113)
@@ -0,0 +1,110 @@
+#!/bin/bash
+########################################################################
+# Script to perform several chained LMD Mars GCM simulations
+# SET HERE the maximum total number of simulations
+
+nummax=1
+
+# Also, ensure that the gcm executable name is correct below:
+gcm=gcm_64x48x54_phymars_para.e
+#
+########################################################################
+set -x
+
+echo "---------------------------------------------------------"
+echo "Starting run0..."
+
+dir=`pwd`
+machine=`hostname`
+address=`whoami`
+
+# Check if GCM executable exists and is executable
+if [ ! -x $gcm ]; then
+  echo "Error: file \"$gcm\" not found or not executable in $dir!"
+  exit 1
+fi
+
+# Look for file "num_run" which should contain
+# the value of the previously computed season
+# (defaults to 0 if file "num_run" does not exist)
+if [[ -r num_run ]] ; then
+  echo "Found file \"num_run\""
+  numold=`cat num_run`
+else
+  numold=0
+fi
+echo "numold is set to" $numold
+
+# Set value of current season
+numnew=$((numold + 1 ))
+echo "numnew is set to" $numnew
+
+# Look for initialization data files (exit if none found)
+if [[ ( -r start${numold}.nc  &&  -r startfi${numold}.nc ) ]] ; then
+   \cp -f start${numold}.nc start.nc
+   \cp -f startfi${numold}.nc startfi.nc
+else
+   if (( numold == 99999 )) ; then
+     echo "Error: no run because previous run crashed! (99999 in \"num_run\")"
+     exit 1
+   else
+     echo "Error: missing input files \"start${numold}.nc\" or \"startfi${numold}.nc\" in $dir!"
+     exit 1
+   fi
+fi
+
+
+# Run GCM
+mpirun -map-by slot:PE=$SLURM_CPUS_PER_TASK --bind-to core $gcm > lrun${numnew} 2>&1
+
+
+# Check if run ended normaly and copy datafiles
+if [[ ( -r restartfi.nc  &&  -r restart.nc ) ]] ; then
+  echo "Run seems to have ended normally."
+  \mv -f restartfi.nc startfi${numnew}.nc
+  \mv -f restart.nc start${numnew}.nc
+else
+  echo "Error: Run crashed or incomplete output!"
+  if [[ -r num_run ]] ; then
+    \mv -f num_run num_run.crash
+  else
+    echo "No file num_run to build \"num_run.crash\" from!"
+    # Impose a default value of 0 for num_run
+    echo 0 > num_run.crash
+  fi
+  echo 99999 > num_run
+############## To receive an Email message if the run crashes ########
+mail -s "Crash in GCM run" $address <<ENDMAIL
+The GCM run on $machine in $dir has just crashed.
+Check the output logs for more information.
+ENDMAIL
+#############################################
+  exit 1
+fi
+
+# Copy other datafiles that may have been generated
+if [[ -r diagfi.nc ]] ; then
+  \mv -f diagfi.nc diagfi${numnew}.nc
+fi
+if [[ -r diagsoil.nc ]] ; then
+  \mv -f diagsoil.nc diagsoil${numnew}.nc
+fi
+if [[ -r stats.nc ]] ; then
+  \mv -f stats.nc stats${numnew}.nc
+fi
+if [[ -f profiles.dat ]] ; then
+  \mv -f profiles.dat profiles${numnew}.dat
+  \mv -f profiles.hdr profiles${numnew}.hdr
+fi
+
+# Prepare things for upcoming runs by writing
+# value of computed season in file num_run
+echo $numnew > num_run
+
+# If we are over nummax : stop
+if (( $numnew + 1 > $nummax )) ; then
+  exit 0
+else
+  \cp -f run0 exe_mars
+  ./exe_mars
+fi
Index: /trunk/LMDZ.MARS/deftank/mesu/run_month1
===================================================================
--- /trunk/LMDZ.MARS/deftank/mesu/run_month1	(revision 4113)
+++ /trunk/LMDZ.MARS/deftank/mesu/run_month1	(revision 4113)
@@ -0,0 +1,81 @@
+#!/bin/bash
+#SBATCH --ntasks-per-node=15
+#SBATCH --cpus-per-task=4
+##SBATCH --partition=thin # thin: 64 cores/node and 384 GB memory/node
+#SBATCH --partition=std # std: 32 cores/node and 256 GB memory/node
+##SBATCH --partition=bigm # bigm: 64 cores/node and 2048 GB memory/node
+#SBATCH -J run_month1
+#SBATCH --time=3:00:00
+#SBATCH --output %x.%j.out
+
+## Script to run chained simulations
+## (uses script "run0" and reference file "run.def.ref")
+## Set values of "num_now" and "num_end" in the script below
+## to set initial month # and final month # of the simulation
+
+# A few parameters that might need be changed depending on your setup:
+# Path to the arch.env to source
+source ../trunk/LMDZ.COMMON/arch.env
+# Number of threads to use (must be the same as "#SBATCH --cpus-per-task=" above)
+export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
+export OMP_STACKSIZE=400M
+#
+########################################################################
+set -exv
+ls -al
+trap 'echo -e "Error at line $LINENO!"' ERR
+
+# Set starting month and ending month below:
+num_now=1
+num_end=12
+num_previous=$(( num_now - 1 ))
+
+echo "$num_previous" > num_run
+# next month number
+num_next=$(( num_now + 1 ))
+# true (i.e. modulo 12) month number
+true_num=$(( num_now % 12 ))
+
+# Check if required files exist
+\rm -f  error; touch error
+
+if [ ! -f run.def.ref ]; then
+  echo "Error: file \"run.def.ref\" not found in current directory!" > error
+  exit 1
+fi
+
+if [ ! -x run0 ]; then
+  echo "Error: file \"run0\" not found or not executable in current directory!" > error
+  exit 1
+fi
+
+if [ ! -f run_month$num_now ]; then
+  echo "Error: file \"run_month${num_now}\" not found in current directory!" > error
+  exit 1
+fi
+
+# Run model depending on current month
+case $true_num in
+  1 ) sed s/9999/61/ run.def.ref > run.def ; ./run0 >> error ;;    #1
+  2 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;;    #2
+  3 ) sed s/9999/66/ run.def.ref > run.def ; ./run0 >> error ;;    #3
+  4 ) sed s/9999/65/ run.def.ref > run.def ; ./run0 >> error ;;    #4
+  5 ) sed s/9999/60/ run.def.ref > run.def ; ./run0 >> error ;;    #5
+  6 ) sed s/9999/54/ run.def.ref > run.def ; ./run0 >> error ;;    #6
+  7 ) sed s/9999/50/ run.def.ref > run.def ; ./run0 >> error ;;    #7
+  8 ) sed s/9999/46/ run.def.ref > run.def ; ./run0 >> error ;;    #8
+  9 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;;    #9
+ 10 ) sed s/9999/47/ run.def.ref > run.def ; ./run0 >> error ;;    #10
+ 11 ) sed s/9999/51/ run.def.ref > run.def ; ./run0 >> error ;;    #11
+  0 ) sed s/9999/56/ run.def.ref > run.def ; ./run0 >> error ;;    #12
+  * ) echo "Error: Invalid value of true_num ($true_num)" ; exit 1 ;;
+esac
+
+# Launch job for next month
+if (( num_next <= num_end )) ; then
+  cp -f run_month$num_now tmp
+  sed -e "s@run_month${num_now}@run_month${num_next}@" \
+      -e "s@num_now=${num_now}@num_now=${num_next}@" tmp > run_month$num_next
+  rm tmp
+  sbatch run_month$num_next
+fi
Index: /trunk/LMDZ.MARS/deftank/spirit/run_month1
===================================================================
--- /trunk/LMDZ.MARS/deftank/spirit/run_month1	(revision 4112)
+++ /trunk/LMDZ.MARS/deftank/spirit/run_month1	(revision 4113)
@@ -2,6 +2,6 @@
 #SBATCH --ntasks-per-node=15
 #SBATCH --cpus-per-task=4
-#SBATCH --partition=zen4 # zen4: 64cores/node and 240GB of memory
-##SBATCH --partition=zen16 # zen16: 32 cores/node core and 496GB of memory
+#SBATCH --partition=zen4 # zen4: 64 cores/node and 240 GB memory/node
+##SBATCH --partition=zen16 # zen16: 32 cores/node and 496 GB memory/node
 #SBATCH -J run_month1
 #SBATCH --time=3:00:00
