Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-IBM_EKMAN_INGV
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-IBM_EKMAN_INGV	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-IBM_EKMAN_INGV	(revision 13118)
@@ -0,0 +1,89 @@
+#!/bin/bash 
+#!
+#BSUB -q long
+#BSUB -n TOTAL_NPROCS
+#BSUB -J MPI_config
+#BSUB -o stdout.%J
+#BSUB -e stderr.%J
+
+ 
+
+###############################################################
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  XIOS_NUMPROCS=NXIOPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM (EKMAN at INGV)
+#
+
+ MPIPROGINF=detail
+ export MPIPROGINF
+ export LSF_PJL_TYPE="intelmpi"
+ export MP_PGMMODEL=mpmd
+ export MP_SHARED_MEMORY=yes
+ export MPIRUN="mpirun -n $OCEANCORES"
+ export MPIRUN_MPMD="mpirun -np $OCEANCORES ./nemo : -np $XIOS_NUMPROCS /home/delrosso/XIOS_1.0/xios-1.0/bin/xios_server.exe"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+
+
+# Don't remove neither change the following line 
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+
+
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+#
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+#  echo "Running time ${MPIRUN} " $OCEANCORES " ./nemo"
+#
+
+  if [ MPI_FLAG == "yes" ]; then
+     if [ $XIOS_NUMPROCS -eq 0 ]; then
+       time ${MPIRUN} ./nemo
+     else
+       time ${MPIRUN_MPMD}
+     fi
+  else
+       time ./nemo
+  fi
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line 
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-PW6_CALYPSO
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-PW6_CALYPSO	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-PW6_CALYPSO	(revision 13118)
@@ -0,0 +1,81 @@
+#!/bin/bash 
+#!
+#BSUB -q poe_short
+#BSUB -n NPROCS
+#BSUB -a poe
+#BSUB -J MPI_config
+#BSUB -o poe.stdout.%J
+#BSUB -e poe.stderr.%J
+
+ 
+
+###############################################################
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
+#
+
+# export MPIRUN="mpirun -n $OCEANCORES"
+
+export MPIRUN="mpirun.lsf"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+
+
+# Don't remove neither change the following line 
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+
+
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+#
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+#  echo "Running time ${MPIRUN} " $OCEANCORES " ./nemo"
+#
+
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./nemo
+  else
+     time ./nemo
+  fi
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line 
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-PW7_METO
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-PW7_METO	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-PW7_METO	(revision 13118)
@@ -0,0 +1,91 @@
+#!/bin/bash 
+#!
+# @ shell = /usr/bin/ksh
+# @ job_name = MPI_config
+# @ output = out.$(job_name).$(jobid)
+# @ error =  err.$(job_name).$(jobid)
+# @ job_type = parallel
+# @ total_tasks = NPROCS
+# @ wall_clock_limit = 0:30:00
+# @ resources = ConsumableMemory(1562mb)
+# @ class = parallel
+# @ node_usage = shared
+# @ notification = error
+# @ task_affinity = core
+# @ group = science
+# @ queue
+
+ulimit -c unlimited
+ulimit -s unlimited
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power7 (hpc2e at UK Met Office)
+#
+export MPIRUN="poe -pgmodel $MP_PGMMODEL -n $OCEANCORES -cmdfile"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+
+# Don't remove neither change the following comment line
+# BODY
+
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+
+
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  if [ MPI_FLAG == "yes" ]; then
+     n=1
+     echo "./nemo" > ./alltasks
+     while [ $n -lt $OCEANCORES ]
+     do
+       echo "./nemo" >> ./alltasks
+       n=$(( $n + 1 ))
+     done
+     time ${MPIRUN} ./alltasks
+  else
+     time ./nemo
+  fi
+
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous comment line
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-PW7_MONSOON
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-PW7_MONSOON	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-PW7_MONSOON	(revision 13118)
@@ -0,0 +1,90 @@
+#!/bin/bash 
+#!
+# @ shell = /usr/bin/ksh
+# @ job_name = MPI_config
+# @ output = out.$(job_name).$(jobid)
+# @ error =  err.$(job_name).$(jobid)
+# @ job_type = parallel
+# @ total_tasks = NPROCS
+# @ wall_clock_limit = 0:30:00
+# @ resources = ConsumableMemory(1562mb)
+# @ class = parallel
+# @ node_usage = shared
+# @ notification = error
+# @ task_affinity = core
+# @ queue
+
+ulimit -c unlimited
+ulimit -s unlimited
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power7 (hpc2e at UK Met Office)
+#
+export MPIRUN="poe -pgmodel $MP_PGMMODEL -n $OCEANCORES -cmdfile"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+
+# Don't remove neither change the following comment line
+# BODY
+
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+
+
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  if [ MPI_FLAG == "yes" ]; then
+     n=1
+     echo "./nemo" > ./alltasks
+     while [ $n -lt $OCEANCORES ]
+     do
+       echo "./nemo" >> ./alltasks
+       n=$(( $n + 1 ))
+     done
+     time ${MPIRUN} ./alltasks
+  else
+     time ./nemo
+  fi
+
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous comment line
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_ADA
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_ADA	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_ADA	(revision 13118)
@@ -0,0 +1,84 @@
+#!/bin/bash 
+#!
+# @ job_name = MPI_config
+# standard output file  
+# @ output = $(job_name).$(jobid)
+# standard error file
+# @ error =  $(job_name).$(jobid)
+# job type
+# @ job_type = parallel
+# Number of procs 
+# @ total_tasks = NPROCS
+# time
+# @ wall_clock_limit = 00:59:00
+# @ queue
+
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
+#
+#export MPIRUN="mpirun"
+export MPIRUN="poe"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# Don't remove neither change the following line
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+#  echo "Running time ${MPIRUN} ./nemo"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     echo "Running time ${MPIRUN} -np $OCEANCORES ./nemo"
+     #time ${MPIRUN} -np $OCEANCORES ./nemo
+     time ${MPIRUN} ./nemo -procs $OCEANCORES
+  else
+     echo "Running time ./nemo"
+     time ./nemo
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_ADA_DEBUG
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_ADA_DEBUG	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_ADA_DEBUG	(revision 13118)
@@ -0,0 +1,85 @@
+#!/bin/bash 
+#!
+# @ job_name = MPI_config
+# standard output file  
+# @ output = $(job_name).$(jobid)
+# standard error file
+# @ error =  $(job_name).$(jobid)
+# job type
+# @ job_type = parallel
+# Number of procs 
+# @ total_tasks = NPROCS
+# time
+# @ wall_clock_limit = 00:59:00
+## @ class = debug
+# @ queue
+
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
+#
+#export MPIRUN="mpirun"
+export MPIRUN="poe"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# Don't remove neither change the following line
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+#  echo "Running time ${MPIRUN} ./nemo"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     echo "Running time ${MPIRUN} -np $OCEANCORES ./nemo"
+     #time ${MPIRUN} -np $OCEANCORES ./nemo
+     time ${MPIRUN} ./nemo -procs $OCEANCORES
+  else
+     echo "Running time ./nemo"
+     time ./nemo
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_ADA_O0
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_ADA_O0	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_ADA_O0	(revision 13118)
@@ -0,0 +1,85 @@
+#!/bin/bash 
+#!
+# @ job_name = MPI_config
+# standard output file  
+# @ output = $(job_name).$(jobid)
+# standard error file
+# @ error =  $(job_name).$(jobid)
+# job type
+# @ job_type = parallel
+# Number of procs 
+# @ total_tasks = NPROCS
+# time
+# @ wall_clock_limit = 00:59:00
+# @ queue
+
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
+#
+#export MPIRUN="poe -procs $OCEANCORES"
+#export MPIRUN="mpirun"
+export MPIRUN="poe"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# Don't remove neither change the following line
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+#  echo "Running time ${MPIRUN} ./nemo"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     echo "Running time ${MPIRUN} -np $OCEANCORES ./nemo"
+     #time ${MPIRUN} -np $OCEANCORES ./nemo
+     time ${MPIRUN} ./nemo -procs $OCEANCORES
+  else
+     echo "Running time ./nemo"
+     time ./nemo
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE	(revision 13118)
@@ -0,0 +1,76 @@
+#!/bin/bash
+#MSUB -T 3600                # elapsed time limit in seconds   (60 minutes)
+#MSUB -r SETTE_JOB           # Job name
+#MSUB -o sette.jobid_%I.txt  # standard output
+#MSUB -e sette.jobid_%I.txt  # standard error
+#MSUB -n NPROCS              # Total number of mpi task to use
+#MSUB -A   gen7451          # project name
+#MSUB -q   skylake          # (queue name) only for thin nodes
+#MSUB -m store,work,scratch
+##########################################################################
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+#
+# set up mpp computing environment
+#
+# Local settings for machine BULL (TITANE at CCRT France)
+#
+export MPIRUN="ccc_mprun -n $OCEANCORES"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# modules to load
+
+# Don't remove neither change the following line
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  echo "Running time ${MPIRUN} ./nemo"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./nemo
+  else
+     time ./nemo
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
+
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE_DEBUG
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE_DEBUG	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE_DEBUG	(revision 13118)
@@ -0,0 +1,76 @@
+#!/bin/bash
+#MSUB -T 3600                # elapsed time limit in seconds   (60 minutes)
+#MSUB -r SETTE_JOB           # Job name
+#MSUB -o sette.jobid_%I.txt  # standard output
+#MSUB -e sette.jobid_%I.txt  # standard error
+#MSUB -n NPROCS              # Total number of mpi task to use
+#MSUB -A   gen7451          # project name
+#MSUB -q   skylake          # (queue name) only for thin nodes
+#MSUB -m store,work,scratch
+##########################################################################
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+#
+# set up mpp computing environment
+#
+# Local settings for machine BULL (TITANE at CCRT France)
+#
+export MPIRUN="ccc_mprun -n $OCEANCORES"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# modules to load
+
+# Don't remove neither change the following line
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  echo "Running time ${MPIRUN} ./nemo"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./nemo
+  else
+     time ./nemo
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
+
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE_GCC
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE_GCC	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE_GCC	(revision 13118)
@@ -0,0 +1,87 @@
+#!/bin/bash
+#MSUB -T 2000                # elapsed time limit in seconds   (60 minutes)
+#MSUB -r SETTE_JOB           # Job name
+#MSUB -o sette.jobid_%I.txt  # standard output
+#MSUB -e sette.jobid_%I.txt  # standard error
+#MSUB -n NPROCS              # Total number of mpi task to use
+#MSUB -A   gen7451          # project name
+#MSUB -q   skylake          # (queue name) only for thin nodes
+#MSUB -m store,work,scratch
+##########################################################################
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+#
+# set up mpp computing environment
+#
+  set +vx
+  module purge
+  module load gnu/8.3.0
+  module load flavor/buildcompiler/gcc/8
+  module load flavor/buildmpi/openmpi/2.0
+  module load flavor/hdf5/parallel
+  module load mpi/openmpi/2.0.4
+  module load hdf5/1.8.20
+  module load netcdf-c/4.6.0
+  module load netcdf-fortran/4.4.4
+#
+# Local settings for machine BULL (TITANE at CCRT France)
+#
+  export MPIRUN="ccc_mprun -n $OCEANCORES"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# modules to load
+
+# Don't remove neither change the following line
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  echo "Running time ${MPIRUN} ./nemo"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./nemo
+  else
+     time ./nemo
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
+
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE_GCC_DEBUG
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE_GCC_DEBUG	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_IRENE_GCC_DEBUG	(revision 13118)
@@ -0,0 +1,87 @@
+#!/bin/bash
+#MSUB -T 4000                # elapsed time limit in seconds   (60 minutes)
+#MSUB -r SETTE_JOB           # Job name
+#MSUB -o sette.jobid_%I.txt  # standard output
+#MSUB -e sette.jobid_%I.txt  # standard error
+#MSUB -n NPROCS              # Total number of mpi task to use
+#MSUB -A   gen7451          # project name
+#MSUB -q   skylake          # (queue name) only for thin nodes
+#MSUB -m store,work,scratch
+##########################################################################
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+#
+# set up mpp computing environment
+#
+  set +vx
+  module purge
+  module load gnu/8.3.0
+  module load flavor/buildcompiler/gcc/8
+  module load flavor/buildmpi/openmpi/2.0
+  module load flavor/hdf5/parallel
+  module load mpi/openmpi/2.0.4
+  module load hdf5/1.8.20
+  module load netcdf-c/4.6.0
+  module load netcdf-fortran/4.4.4
+#
+# Local settings for machine BULL (TITANE at CCRT France)
+#
+  export MPIRUN="ccc_mprun -n $OCEANCORES"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# modules to load
+
+# Don't remove neither change the following line
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  echo "Running time ${MPIRUN} ./nemo"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./nemo
+  else
+     time ./nemo
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
+
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_JEANZAY
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_JEANZAY	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_JEANZAY	(revision 13118)
@@ -0,0 +1,79 @@
+#!/bin/bash
+#SBATCH -A GROUP_IDRIS@cpu
+#SBATCH --job-name=SETTE_JOB      # nom du job
+#SBATCH --partition=cpu_p1        # Nom de la partition d'exécution
+#SBATCH --ntasks=NPROCS                # Nombre total de processus MPI
+#SBATCH --ntasks-per-node=40       # Nombre de processus MPI par noeud
+# /!\ Attention, la ligne suivante est trompeuse mais dans le vocabulaire
+# de Slurm "multithread" fait bien référence à l'hyperthreading.
+#SBATCH --hint=nomultithread       # 1 processus MPI par coeur physique (pas d'hyperthreading)
+#SBATCH --time=00:59:00            # Temps d’exécution maximum demande (HH:MM:SS)
+#SBATCH --output=sette.jobid_%j.out  # Nom du fichier de sortie
+#SBATCH --error=sette.jobid_%j.out   # Nom du fichier d'erreur (ici commun avec la sortie)
+##########################################################################
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+#
+# set up mpp computing environment
+#
+# Local settings for machine BULL (TITANE at CCRT France)
+#
+export MPIRUN="srun --mpi=pmi2 --cpu-bind=cores -K1"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# modules to load
+
+# Don't remove neither change the following line
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  echo "Running time ${MPIRUN} ./nemo"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./nemo
+  else
+     time ./nemo
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
+
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_JEANZAY_DEBUG
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_JEANZAY_DEBUG	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_JEANZAY_DEBUG	(revision 13118)
@@ -0,0 +1,79 @@
+#!/bin/bash
+#SBATCH -A GROUP_IDRIS@cpu
+#SBATCH --job-name=SETTE_JOB      # nom du job
+#SBATCH --partition=cpu_p1        # Nom de la partition d'exécution
+#SBATCH --ntasks=NPROCS                # Nombre total de processus MPI
+#SBATCH --ntasks-per-node=40       # Nombre de processus MPI par noeud
+# /!\ Attention, la ligne suivante est trompeuse mais dans le vocabulaire
+# de Slurm "multithread" fait bien référence à l'hyperthreading.
+#SBATCH --hint=nomultithread       # 1 processus MPI par coeur physique (pas d'hyperthreading)
+#SBATCH --time=00:59:00            # Temps d’exécution maximum demande (HH:MM:SS)
+#SBATCH --output=sette.jobid_%j.out  # Nom du fichier de sortie
+#SBATCH --error=sette.jobid_%j.out   # Nom du fichier d'erreur (ici commun avec la sortie)
+##########################################################################
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+#
+# set up mpp computing environment
+#
+# Local settings for machine BULL (TITANE at CCRT France)
+#
+export MPIRUN="srun --mpi=pmi2 --cpu-bind=cores -K1"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# modules to load
+
+# Don't remove neither change the following line
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  echo "Running time ${MPIRUN} ./nemo"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./nemo
+  else
+     time ./nemo
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
+
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_MOBILIS
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_MOBILIS	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-X64_MOBILIS	(revision 13118)
@@ -0,0 +1,94 @@
+#!/bin/bash
+#SBATCH -N NODES
+#SBATCH --time=00:59:00 
+#SBATCH -J nemo_sette
+
+module purge
+module load shared
+module use /home/acc/MyMods
+# set programming environment and XIO_HOME 
+module load nemo-PrgEnv/4.0 
+
+#
+  export OMP_NUM_THREADS=1
+  export OCORES=NPROCS
+  export XCORES=NXIOPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+###############################################################
+#
+# set up mpp computing environment
+#
+#
+# Local settings. These settings are for a particular machine (the MOBILIS ClusterVision 
+# system at NOCS) at a particular stage of that machine's evolution. This template file
+# is provided for illustration purposes only and will not work on any other machine. There
+# should, however, be sufficient similarity with other MPP platforms and batch systems
+# for this example to provide a useful guide for experienced users
+#
+# Don't remove neither change the following line
+# BODY
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). Note that the number of compute nodes required
+# is also set by the fcm_job.sh on the PBS select header line above.
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+  export EXE_DIR=DEF_EXE_DIR
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+  cd $EXE_DIR
+  echo Directory is `pwd`
+  if [ $XCORES -eq 0 ]; then
+#
+# Run SPMD case
+#
+       echo time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1                 \
+                                -x MALLOC_TRIM_THRESHOLD_=33554432 -np $OCORES --bynode  \
+                                --mca mpi_paffinity_alone 1 ./nemo 
+            time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1                 \
+                                -x MALLOC_TRIM_THRESHOLD_=33554432 -np $OCORES --bynode  \
+                                --mca mpi_paffinity_alone 1 ./nemo 
+  else
+       if [ ! -f ./xios_server.exe ] && [ -f ${XIO_HOME}/bin/xios_server.exe ]; then
+          cp ${XIO_HOME}/bin/xios_server.exe .
+       fi
+       if [ ! -f ./xios_server.exe ]; then
+          echo "./xios_server.exe not found"
+          echo "run aborted"
+          exit
+       fi
+#
+#  Run MPMD case
+#
+       echo time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1 \
+                                -x MALLOC_TRIM_THRESHOLD_=33554432       \
+                                -np $XCORES ./xios_server.exe            \
+                              : -np $OCORES --bynode  --mca mpi_paffinity_alone 1 ./nemo 
+#
+            time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1 \
+                                -x MALLOC_TRIM_THRESHOLD_=33554432       \
+                                -np $XCORES ./xios_server.exe            \
+                              : -np $OCORES --bynode  --mca mpi_paffinity_alone 1 ./nemo 
+#
+  fi
+#
+  post_test_tidyup
+# END_BODY
+# Don't remove neither change the previous line
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-XC40_METO
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-XC40_METO	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-XC40_METO	(revision 13118)
@@ -0,0 +1,91 @@
+#/bin/bash 
+#!
+#PBS -N nemo_sette
+#PBS -l walltime=00:30:00
+#PBS -j oe
+#PBS -q normal
+#PBS -V
+#PBS -l SELECT
+
+  export PBS_O_WORKDIR=$(readlink -f $PBS_O_WORKDIR)
+  export OMP_NUM_THREADS=1
+  cd $PBS_O_WORKDIR
+  export XIO_HOME=$xios_path
+#
+  echo " ";
+  export OMP_NUM_THREADS=1
+  O_PER_NODE=32
+  X_PER_NODE=4
+  OCORES=NPROCS
+  XCORES=NXIOPROCS
+  if [ $OCORES -le 32 ] ; then O_PER_NODE=$OCORES; fi
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+###############################################################
+#
+# Don't remove neither change the following line
+# BODY
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). Note that the number of compute nodes required
+# is also set by the fcm_job.sh on the PBS select header line above.
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+  export EXE_DIR=DEF_EXE_DIR
+  ulimit -c unlimited
+  ulimit -s unlimited
+  export FORT_FMT_RECL=132
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+  cd $EXE_DIR
+  echo Directory is `pwd`
+  
+  if [ $XCORES -gt 0 ]; then
+#
+#  Run MPMD case
+#
+     #XIOS will run on a separate node so will run in parallel queue
+     if [ ! -f ./xios_server.exe ] && [ -f ${XIO_HOME}/bin/xios_server.exe ]; then
+        cp ${XIO_HOME}/bin/xios_server.exe .
+     fi
+     if [ ! -f ./xios_server.exe ]; then
+        echo "./xios_server.exe not found"
+        echo "run aborted"
+        exit
+     fi
+       echo time aprun -b -n $XCORES -N $X_PER_NODE ./xios_server.exe : -n $OCORES -N $O_PER_NODE ./nemo
+            time aprun -b -n $XCORES -N $X_PER_NODE ./xios_server.exe : -n $OCORES -N $O_PER_NODE ./nemo
+#
+  else
+#
+# Run SPMD case
+#
+    echo time aprun -b  -n $OCORES -N $O_PER_NODE ./nemo
+         time aprun -b  -n $OCORES -N $O_PER_NODE ./nemo
+  fi
+#
+
+#
+  post_test_tidyup
+# END_BODY
+# Don't remove neither change the previous line
+  exit
+
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-XC40_METO_IFORT
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-XC40_METO_IFORT	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-XC40_METO_IFORT	(revision 13118)
@@ -0,0 +1,90 @@
+#/bin/bash 
+#!
+#PBS -N nemo_sette
+#PBS -l walltime=00:30:00
+#PBS -j oe
+#PBS -q normal
+#PBS -V
+#PBS -l SELECT
+
+  export PBS_O_WORKDIR=$(readlink -f $PBS_O_WORKDIR)
+  export OMP_NUM_THREADS=1
+  cd $PBS_O_WORKDIR
+  export XIO_HOME=$xios_path
+#
+  echo " ";
+  export OMP_NUM_THREADS=1
+  O_PER_NODE=32
+  X_PER_NODE=4
+  OCORES=NPROCS
+  XCORES=NXIOPROCS
+  if [ $OCORES -le 32 ] ; then O_PER_NODE=$OCORES; fi
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+###############################################################
+#
+# Don't remove neither change the following line
+# BODY
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). Note that the number of compute nodes required
+# is also set by the fcm_job.sh on the PBS select header line above.
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+  export EXE_DIR=DEF_EXE_DIR
+  ulimit -c unlimited
+  ulimit -s unlimited
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+  cd $EXE_DIR
+  echo Directory is `pwd`
+  
+  if [ $XCORES -gt 0 ]; then
+#
+#  Run MPMD case
+#
+     #XIOS will run on a separate node so will run in parallel queue
+     if [ ! -f ./xios_server.exe ] && [ -f ${XIO_HOME}/bin/xios_server.exe ]; then
+        cp ${XIO_HOME}/bin/xios_server.exe .
+     fi
+     if [ ! -f ./xios_server.exe ]; then
+        echo "./xios_server.exe not found"
+        echo "run aborted"
+        exit
+     fi
+       echo time aprun -b -n $XCORES -N $X_PER_NODE ./xios_server.exe : -n $OCORES -N $O_PER_NODE ./nemo
+            time aprun -b -n $XCORES -N $X_PER_NODE ./xios_server.exe : -n $OCORES -N $O_PER_NODE ./nemo
+#
+  else
+#
+# Run SPMD case
+#
+    echo time aprun -b  -n $OCORES -N $O_PER_NODE ./nemo
+         time aprun -b  -n $OCORES -N $O_PER_NODE ./nemo
+  fi
+#
+
+#
+  post_test_tidyup
+# END_BODY
+# Don't remove neither change the previous line
+  exit
+
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-XC_ARCHER_INTEL
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-XC_ARCHER_INTEL	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-XC_ARCHER_INTEL	(revision 13118)
@@ -0,0 +1,95 @@
+#!/bin/bash 
+#!
+#PBS -N nemo_sette
+#PBS -l walltime=00:59:00
+#PBS -l select=NODES
+#PBS -j oe
+#PBS -A n01-Global
+
+
+  export PBS_O_WORKDIR=$(readlink -f $PBS_O_WORKDIR)               
+  export OMP_NUM_THREADS=1
+  cd $PBS_O_WORKDIR
+#
+  echo " ";
+  export OMP_NUM_THREADS=1
+  O_PER_NODE=24
+  X_PER_NODE=4
+  OCORES=NPROCS
+  if [ $OCORES -le 23 ] ; then O_PER_NODE=$OCORES; fi
+  XCORES=NXIOPROCS
+  if [ $XCORES -le 3 ] ; then X_PER_NODE=$XCORES; fi
+  export SETTE_DIR=DEF_SETTE_DIR
+  export XIO_HOME=/home/acc/XIOS
+###############################################################
+#
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+###############################################################
+#
+# set up mpp computing environment
+#
+#
+# Local settings. These settings are for a particular machine (the MOBILIS ClusterVision 
+# system at NOCS) at a particular stage of that machine's evolution. This template file
+# is provided for illustration purposes only and will not work on any other machine. There
+# should, however, be sufficient similarity with other MPP platforms and batch systems
+# for this example to provide a useful guide for experienced users
+#
+# Don't remove neither change the following line
+# BODY
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). Note that the number of compute nodes required
+# is also set by the fcm_job.sh on the PBS select header line above.
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+  export EXE_DIR=DEF_EXE_DIR
+  ulimit -c unlimited
+  ulimit -s unlimited
+  export FORT_FMT_RECL=132
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+  cd $EXE_DIR
+  echo Directory is `pwd`
+  if [ $XCORES -eq 0 ]; then
+#
+# Run SPMD case
+#
+       echo time aprun -b  -n $OCORES -N $O_PER_NODE ./nemo
+            time aprun -b  -n $OCORES -N $O_PER_NODE ./nemo
+  else
+       if [ ! -f ./xios_server.exe ] && [ -f ${XIO_HOME}/bin/xios_server.exe ]; then
+          cp ${XIO_HOME}/bin/xios_server.exe .
+       fi
+       if [ ! -f ./xios_server.exe ]; then
+          echo "./xios_server.exe not found"
+          echo "run aborted"
+          exit
+       fi
+#
+#  Run MPMD case
+#
+       echo time aprun -b -n $XCORES -N $X_PER_NODE ./xios_server.exe : -n $OCORES -N $O_PER_NODE ./nemo
+            time aprun -b -n $XCORES -N $X_PER_NODE ./xios_server.exe : -n $OCORES -N $O_PER_NODE ./nemo
+#
+  fi
+#
+  post_test_tidyup
+# END_BODY
+# Don't remove neither change the previous line
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-ifort_athena
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-ifort_athena	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-ifort_athena	(revision 13118)
@@ -0,0 +1,81 @@
+#!/bin/bash 
+#!
+#BSUB -q poe_short
+#BSUB -n NPROCS
+#BSUB -a poe
+#BSUB -J NEMO_SETTE
+#BSUB -o poe.stdout.%J
+#BSUB -e poe.stderr.%J
+
+ 
+
+###############################################################
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
+#
+
+# export MPIRUN="mpirun -n $OCEANCORES"
+
+export MPIRUN="mpirun.lsf"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+
+
+# Don't remove neither change the following line 
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+
+
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+#
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+#  echo "Running time ${MPIRUN} " $OCEANCORES " ./nemo"
+#
+
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./nemo
+  else
+     time ./nemo
+  fi
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line 
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-ifort_athena_xios
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-ifort_athena_xios	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-ifort_athena_xios	(revision 13118)
@@ -0,0 +1,107 @@
+#!/bin/bash 
+#!
+#BSUB -q poe_short
+#BSUB -n TOTAL_NPROCS
+#BSUB -a poe
+#BSUB -J NEMO_SETTE
+#BSUB -o poe.stdout.%J
+#BSUB -e poe.stderr.%J
+
+ 
+
+###############################################################
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  XIOS_NUMPROCS=NXIOPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
+#
+
+# export MPIRUN="mpirun -n $OCEANCORES"
+
+module load  INTEL/intel_xe_2013 NETCDF/netcdf-4.3_parallel NETCDF/parallel-netcdf-1.3.1 HDF5/hdf5-1.8.11_parallel
+export MPIRUN="mpirun.lsf"
+
+export LD_LIBRARY_PATH=${XIOS}/lib:${LD_LIBRARY_PATH}
+
+XIOS_SERVER_PATHNAME="${XIOS}/bin/xios_server.exe"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+
+
+# Don't remove neither change the following line 
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+
+
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+#
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+#  echo "Running time ${MPIRUN} " $OCEANCORES " ./nemo"
+#
+
+  if [ MPI_FLAG == "yes" ]; then
+     if [ $XIOS_NUMPROCS -eq 0 ]; then
+       time ${MPIRUN} ./nemo
+     else
+
+       export MP_PGMMODEL=mpmd
+       export MP_CMDFILE=xioscmdfile
+       rm xioscmdfile &> /dev/null
+       touch xioscmdfile
+       k=0
+       while (( k < $OCEANCORES )) ; do
+          echo ./nemo >> xioscmdfile
+          k=`expr $k + 1`
+       done
+       k=0
+       while (( k < $XIOS_NUMPROCS )) ; do
+          echo $XIOS_SERVER_PATHNAME >> xioscmdfile
+          k=`expr $k + 1`
+       done
+
+       time ${MPIRUN}
+     fi
+  else
+     time ./nemo
+  fi
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line 
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-ifort_beaufix_sette
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-ifort_beaufix_sette	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-ifort_beaufix_sette	(revision 13118)
@@ -0,0 +1,141 @@
+#!/usr/bin/env bash
+
+#SBATCH -J sette
+#SBATCH -o sette.%j.out
+#SBATCH -e sette.%j.err
+#SBATCH --export=ALL
+#SBATCH --parsable
+#SBATCH --exclusive
+#SBATCH --nodes=NODES
+#SBATCH --time=00:15:00
+
+##SBATCH -p debug64
+##SBATCH -A smer
+##SBATCH --qos=debug
+
+#SBATCH -p normal64
+##SBATCH -A cmems
+##SBATCH --qos=coper
+
+
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  export XIO_HOME="/home/ext/mr/smer/samsong/SRC/XIOS/xios-2.5/MET_INTEL16_r1859"
+  export SETTE_DIR="DEF_SETTE_DIR"
+
+  # DEFAULT NEMO/XIOS PROC NUMBER PER NODE
+  O_PER_NODE=38
+  X_PER_NODE=2
+
+  # REQUESTED TOTAL NEMO/XIOS PROC NUMBER
+  OCORES=NPROCS
+  XCORES=NXIOPROCS
+
+  # AVAILABLE PER NODE & TOTAL PROC NUMBER
+  A_PER_NODE=$((SLURM_CPUS_ON_NODE/2))
+  ACORES=$((SLURM_CPUS_ON_NODE/2*SLURM_JOB_NUM_NODES))
+
+  # ADJUST PROC PER NODE
+  if [ $OCORES -le $O_PER_NODE ]; then O_PER_NODE=$OCORES; fi
+  if [ $XCORES -gt $X_PER_NODE ]; then X_PER_NODE=$((A_PER_NODE-O_PER_NODE)); fi
+
+  # TOTAL NEMO/XIOS PROC NUMBER
+  OCORES=$(( O_PER_NODE * SLURM_JOB_NUM_NODES ))
+  XCORES=$(( X_PER_NODE * SLURM_JOB_NUM_NODES ))
+  TCORES=$(( OCORES + XCORES ))
+
+  # CHECK PROC PER NODE + CHECK TOTAL PROC
+  if [[ $((O_PER_NODE+X_PER_NODE)) -gt $((SLURM_CPUS_ON_NODE/2)) ]] || [[ ${TCORES} -gt ${ACORES} ]]; then
+    exit 1
+  else
+    echo "OCORES: $OCORES"
+    echo "XCORES: $XCORES"
+  fi
+
+
+###############################################################
+#
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+###############################################################
+#
+# modules to load
+#module purge
+#module load intel/16.1.150
+#module load intelmpi/5.1.2.150
+#module load netcdf/4.4.0
+#module load hdf5/1.8.16
+#module load zlib/1.2.8 szip/2.1
+
+# Don't remove neither change the following line
+# BODY
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). Note that the number of compute nodes required
+# is also set by the fcm_job.sh on the PBS select header line above.
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+  export EXE_DIR=DEF_EXE_DIR
+  ulimit -a
+  ulimit -s unlimited
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+  cd $EXE_DIR
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  if [ $XCORES -gt 0 ]; then
+#
+#  Run MPMD case
+#
+     #XIOS will run on a separate node so will run in parallel queue
+     if [ ! -f ./xios_server.exe ] && [ -f ${XIO_HOME}/bin/xios_server.exe ]; then
+        cp ${XIO_HOME}/bin/xios_server.exe .
+     fi
+     if [ ! -f ./xios_server.exe ]; then
+        echo "./xios_server.exe not found"
+        echo "run aborted"
+        exit
+     fi
+
+    cat > mpmd.conf <<EOF
+0-$((OCORES-1)) ./nemo
+${OCORES}-$((TCORES-1)) ./xios_server.exe
+EOF
+     echo time srun --cpu_bind=cores --mpi=pmi2 -m cyclic -n ${TCORES} --multi-prog ./mpmd.conf
+          time srun --cpu_bind=cores --mpi=pmi2 -m cyclic -n ${TCORES} --multi-prog ./mpmd.conf
+#
+  else
+#
+# Run SPMD case
+#
+    echo time srun --cpu_bind=cores --mpi=pmi2 -m cyclic -n ${OCORES} ./nemo
+         time srun --cpu_bind=cores --mpi=pmi2 -m cyclic -n ${OCORES} ./nemo
+  fi
+#
+
+#
+  post_test_tidyup
+# END_BODY
+# Don't remove neither change the previous line
+  exit
+
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-macport_osx
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-macport_osx	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-macport_osx	(revision 13118)
@@ -0,0 +1,82 @@
+#!/bin/bash 
+#!
+# @ job_name = MPI_config
+# standard output file  
+# @ output = $(job_name).$(jobid)
+# standard error file
+# @ error =  $(job_name).$(jobid)
+# job type
+# @ job_type = parallel
+# Number of procs 
+# @ total_tasks = NPROCS
+# time
+# @ wall_clock_limit = 0:30:00
+# @ queue
+
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine mac osx using macport
+#
+export MPIRUN="mpirun -np $OCEANCORES"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+
+# Don't remove neither change the following comment line
+# BODY
+
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+
+
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  if [ MPI_FLAG == "yes" ]; then
+  echo "Running time ${MPIRUN} ./nemo"
+     time ${MPIRUN} ./nemo
+  else
+  echo "Running time./nemo"
+     time ./nemo
+  fi
+
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous comment line
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-macport_osx_debug
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-macport_osx_debug	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-macport_osx_debug	(revision 13118)
@@ -0,0 +1,82 @@
+#!/bin/bash 
+#!
+# @ job_name = MPI_config
+# standard output file  
+# @ output = $(job_name).$(jobid)
+# standard error file
+# @ error =  $(job_name).$(jobid)
+# job type
+# @ job_type = parallel
+# Number of procs 
+# @ total_tasks = NPROCS
+# time
+# @ wall_clock_limit = 0:30:00
+# @ queue
+
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine mac osx using macport
+#
+export MPIRUN="mpirun -np $OCEANCORES"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+
+# Don't remove neither change the following comment line
+# BODY
+
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+
+
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  if [ MPI_FLAG == "yes" ]; then
+  echo "Running time ${MPIRUN} ./nemo"
+     time ${MPIRUN} ./nemo
+  else
+  echo "Running time./nemo"
+     time ./nemo
+  fi
+
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous comment line
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-mpmd-X64_MOBILIS
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-mpmd-X64_MOBILIS	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-mpmd-X64_MOBILIS	(revision 13118)
@@ -0,0 +1,1 @@
+link batch-X64_MOBILIS
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-mpmd-ifort_beaufix_sette
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-mpmd-ifort_beaufix_sette	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-mpmd-ifort_beaufix_sette	(revision 13118)
@@ -0,0 +1,1 @@
+link batch-ifort_beaufix_sette
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-openmpi_KARA_MERCATOR_XIOS
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-openmpi_KARA_MERCATOR_XIOS	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/batch-openmpi_KARA_MERCATOR_XIOS	(revision 13118)
@@ -0,0 +1,75 @@
+#!/bin/sh 
+#SBATCH -J sette
+#SBATCH -o sette.%j.out
+#SBATCH -e sette.%j.err
+#SBATCH -N NODES
+#SBATCH --ntasks-per-node=NPROC_NODE
+#SBATCH -p multi
+#SBATCH --time=02:00:00
+#SBATCH --exclusive
+
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
+#
+#cbr export MPIRUN="mpiexec -n $OCEANCORES"
+export MPIRUN="mpirun -np $OCEANCORES"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# Don't remove neither change the following line
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  echo "Running time ${MPIRUN} ./nemo"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     mpirun -np $OCEANCORES ./nemo
+  else
+     time ./nemo
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/sette_batch_template
===================================================================
--- utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/sette_batch_template	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/BATCH_TEMPLATE/sette_batch_template	(revision 13118)
@@ -0,0 +1,82 @@
+#!/bin/bash 
+#!
+# @ job_name = MPI_config
+# standard output file  
+# @ output = $(job_name).$(jobid)
+# standard error file
+# @ error =  $(job_name).$(jobid)
+# job type
+# @ job_type = parallel
+# Number of procs 
+# @ total_tasks = NPROCS
+# time
+# @ wall_clock_limit = 0:30:00
+# @ queue
+
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
+#
+export MPIRUN="mpiexec -n $OCEANCORES"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+
+# Don't remove neither change the following comment line
+# BODY
+
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+
+
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  if [ MPI_FLAG == "yes" ]; then
+  echo "Running time ${MPIRUN} ./nemo"
+     time ${MPIRUN} ./nemo
+  else
+  echo "Running time./nemo"
+     time ./nemo
+  fi
+
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous comment line
+
+  exit
Index: utils/CI/r12931_sette_ticket2366/OLD_SCRIPT/sette_beginner.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/OLD_SCRIPT/sette_beginner.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/OLD_SCRIPT/sette_beginner.sh	(revision 13118)
@@ -0,0 +1,167 @@
+#!/bin/bash
+#############################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# sette_beginner.sh   : example of script of SET TEsts for NEMO (SETTE)
+# ----------------------------------------------------------------------
+# NEMO/SETTE , NEMO Consortium (2010)
+# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+# ----------------------------------------------------------------------
+#
+#############################################################
+#set -vx
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ===================
+# sette_beginner.sh
+# ===================
+#
+# COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory 
+# BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs
+# BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs  
+# INTERACT_FLAG     : flag to run in interactive mode "yes"
+#                           to run in batch mode "no"
+# MPIRUN_FLAG       : flag to run in parallel (MPI) "yes"
+#                           to run in sequential mode (NB_PROC = 1) "no"
+# USING_XIOS        : flag to control the activation of key_iomput
+#                      "yes" to compile using key_iomput and link to the external XIOS library
+#                      "no"  to compile without key_iomput and link to the old IOIPSL library
+# USING_MPMD        : flag to control the use of stand-alone IO servers
+#                     requires USING_XIOS="yes"
+#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers
+#                      "no"  to run in SPMD (attached) mode without separate IO servers 
+# NUM_XIOSERVERS    : number of stand-alone IO servers to employ
+#                     set to zero if USING_MPMD="no"
+#
+# Principal script is sette.sh, that calls 
+#
+#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe 
+#              and links to nemo in ${CONFIG_NAME}/EXP00)
+#
+#  param.cfg : sets and loads following directories:
+#
+#   FORCING_DIR         : is the directory for forcing files (tarfile)
+#   INPUT_DIR           : is the directory for input files storing 
+#   TMPDIR              : is the temporary directory (if needed)
+#   NEMO_VALIDATION_DIR : is the validation directory
+#
+#   (NOTE: this file is the same for all configrations to be tested with sette)
+#
+#   all_functions.sh : loads functions used by sette (note: new functions can be added here)
+#   set_namelist     : function declared in all_functions that sets namelist parameters 
+#   post_test_tidyup : creates validation storage directory and copies required output files 
+#                      (run.stat and ocean.output) in it after execution of test.
+#
+#  VALIDATION tree is:
+#
+#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
+#
+#  prepare_exe_dir.sh : defines and creates directory where the test is executed
+#                       execution directory takes name of TEST_NAME defined for every test 
+#                       in sette.sh. (each test in executed in its own directory)
+#
+#  prepare_job.sh     : to generate the script run_job.sh
+#
+#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes")
+#                        see sette.sh and BATCH_TEMPLATE directory
+#
+#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which 
+#        can be found paths to the input tar file)
+#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR} 
+#        directory
+#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists 
+#        remain in ${NEW_CONF}/EXP00
+# 
+#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of 
+#        executed commands
+#
+#  NOTE: if sette.sh is stopped in output.sette there is written the last command 
+#        executed by sette.sh
+#
+# example use: ./sette_beginner.sh 
+#########################################################################################
+#
+# Compiler among those in NEMOGCM/ARCH
+COMPILER=x3750_ADA
+export BATCH_COMMAND_PAR="llsubmit"
+export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
+export INTERACT_FLAG="yes"
+export MPIRUN_FLAG="yes"
+
+export DEL_KEYS="key_iomput"
+if [ ${USING_XIOS} == "yes" ]
+ then 
+   export DEL_KEYS=""
+fi
+
+#
+# Settings which control the use of stand alone servers (only relevant if using xios)
+#
+export USING_MPMD="no"
+export NUM_XIOSERVERS=4
+export JOB_PREFIX=batch-mpmd
+#
+if [ ${USING_MPMD} == "no" ] 
+ then
+   export NUM_XIOSERVERS=0
+   export JOB_PREFIX=batch
+fi
+#
+#
+if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"]
+ then
+   echo "Incompatible choices. MPMD mode requires the XIOS server"
+   exit
+fi
+#
+
+# Directory to run the tests
+SETTE_DIR=$(cd $(dirname "$0"); pwd)
+MAIN_DIR=${SETTE_DIR%/SETTE}
+CONFIG_DIR=${MAIN_DIR}/cfgs
+TOOLS_DIR=${MAIN_DIR}/tools
+
+CMP_NAM=${1:-$COMPILER}
+# Copy job_batch_COMPILER file for specific compiler into job_batch_template
+cd ${SETTE_DIR}
+cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
+
+# Run for GYRE CONFIG
+# small test to start
+# compile GYRE configuration with gfortran_osx compiler run with 4 proc : 
+export TEST_NAME="SHORT_TEST"
+cd ${CONFIG_DIR}
+. ./makenemo -m ${CMP_NAM} -n GYRE_SHORT -r GYRE -j 10 add_key "key_nosignedzero" del_key ${DEL_KEYS}
+cd ${SETTE_DIR}
+. ./param.cfg 
+. ./all_functions.sh
+. ./prepare_exe_dir.sh
+# creation of execution directory
+JOB_FILE=${EXE_DIR}/run_job.sh
+# setting number of procs used
+NPROC=4
+if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+cd ${EXE_DIR}
+# setting namelist parameters
+# experience name
+set_namelist namelist_cfg cn_exp \"GYRE_SHORT\"
+# first time step
+set_namelist namelist_cfg nn_it000 1
+# last time step
+set_namelist namelist_cfg nn_itend 120
+# frequency of creation of a restart file
+set_namelist namelist_cfg nn_stock 60
+if [ ${USING_MPMD} == "yes" ] ; then
+      set_xio_using_server iodef.xml true
+   else
+      set_xio_using_server iodef.xml false
+fi
+cd ${SETTE_DIR}
+. ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+# run job, with 4 processors, test named SHORT (= 60 time steps)
+cd ${SETTE_DIR}   
+. ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
Index: utils/CI/r12931_sette_ticket2366/OLD_SCRIPT/sette_rpt.SAS.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/OLD_SCRIPT/sette_rpt.SAS.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/OLD_SCRIPT/sette_rpt.SAS.sh	(revision 13118)
@@ -0,0 +1,316 @@
+#!/bin/bash -f
+#set -vx
+#
+# simple SETTE report generator.
+#
+# This version should be run in the SETTE directory. 
+# The machine name will be picked up from the sette.sh script but the location of the
+# validation directory needs to be set here (currently assumed to reside in the ../cfgs directory)
+#
+#########################################################################################
+######################### Start of function definitions #################################
+##
+
+function restfile() {
+# Rebuild ice restart for SAS CONFIG, and restartability checks. Expects LONG and SHORT run directories.
+# For Stand Alone Surface configuration ocean is not running, just run ice model; so no outputs ocean files.
+# Compares LONG rebuild restart ice file with equivalent entry from the SHORT rebuild restart ice file.
+#
+  vdir=$1
+  nam=$2
+  pass=$3
+#
+  if [ -d $vdir/$nam ]; then
+    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l `
+    dorv=`echo $dorv | sed -e 's:.*/::'`
+    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -2l | head -1 `
+    rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -1l`
+    cd ${SAS_RESTART_DIR}/LONG
+    #SF add here compilation of rebuild_tools to rebuild restart files, and add comparison of restart files
+    cd ${TOOLS_DIR}
+    ./maketools -n REBUILD_NEMO -m ${mach} > /dev/null 2>&1
+    cd ${TOOLS_DIR}/REBUILD_NEMO
+    #SF echo "REBUILD LONG restart SAS files, without standard output"
+    ./rebuild_nemo -t 4 ../../cfgs/SAS_LONG/LONG/SAS_00000100_restart_ice  $NPROC > /dev/null 2>&1
+    #SF echo "REBUILD SHORT restart SAS files, without standard output"
+    ./rebuild_nemo -t 4 ../../cfgs/SAS_LONG/SHORT/SAS_00000100_restart_ice $NPROC >&-
+    cd ${SAS_RESTART_DIR}/LONG
+    #SF echo "COPY rebuild restart files"
+    cp SAS_00000100_restart_ice.nc $vdir/$nam/$mach/$dorv/LONG/.
+    cp ../SHORT/SAS_00000100_restart_ice.nc $vdir/$nam/$mach/$dorv/SHORT/.
+
+    f1o=$vdir/$nam/$mach/$dorv/LONG/SAS_00000100_restart_ice.nc
+    f2o=$vdir/$nam/$mach/$dorv/SHORT/SAS_00000100_restart_ice.nc
+    if  [ ! -f $f1o ] &&  [ ! -f $f2o ] ; then
+      printf "%-20s %s\n" $nam " REBUILD SAS restart ice DOES NOT exists; incomplete test";
+      return;
+    fi
+    #
+    done_oce=0
+    #
+    if  [  -f $f1o ] && [  -f $f2o ]; then
+      cmp -s $f1o $f2o 
+      #SF  cmp SAS_00000100_restart_ice.nc  ../SHORT/SAS_00000100_restart_ice.nc  > diff_restart.txt
+      if [ $? == 0 ]; then
+        if [ $pass == 0 ]; then
+          printf "%-20s %s %s\n" $nam  " SAS restart files are IDENTICAL :  passed : " $dorv
+        fi
+      else
+        printf "%-20s %s %s\n" $nam  " SAS restart files are DIFFERENT : FAILED : " $dorv 
+        #
+	# Offer view of differences on the second pass
+	#
+        if [ $pass == 1 ]; then
+          echo "BE CAREFUL:  NEED cdo to see differences!!!!! "
+          echo "DO which cdo and replace cdo PATH to the cdo command in SETTE_rpt.sh "
+          echo "IF cdo is not available you need to do difference of netcdf file by hand"
+          echo "<return> to view restart_ice.nc differences"
+          read y
+#SF           cdo -diffv $f1o $f2o
+          /smplocal/pub/cdo/1.5.9/bin/cdo -diffv $f1o $f2o
+          done_oce=1
+          #echo "<return> to continue"
+          #read y
+        fi
+      fi
+    fi
+#
+fi
+}
+
+function resttest() { 
+#
+# Restartability checks. Expects LONG and SHORT run directories
+# Compares end of LONG stat files with equivalent entries from the SHORT stat files.
+#
+  vdir=$1
+  nam=$2
+  pass=$3
+#
+  if [ -d $vdir/$nam ]; then
+    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l `
+    dorv=`echo $dorv | sed -e 's:.*/::'`
+    f1o=$vdir/$nam/$mach/$dorv/LONG/ocean.output
+    f1s=$vdir/$nam/$mach/$dorv/LONG/run.stat
+    f1t=$vdir/$nam/$mach/$dorv/LONG/tracer.stat
+    f2o=$vdir/$nam/$mach/$dorv/SHORT/ocean.output
+    f2s=$vdir/$nam/$mach/$dorv/SHORT/run.stat
+    f2t=$vdir/$nam/$mach/$dorv/SHORT/tracer.stat
+
+    if  [ ! -f $f1s ] &&  [ ! -f $f1t ] ; then 
+      printf "%-20s %s\n" $nam " incomplete test";
+      return; 
+    fi
+    if  [ ! -f $f2s ] &&  [ ! -f $f2t ] ; then 
+      printf "%-20s %s\n" $nam " incomplete test";
+      return; 
+    fi
+#
+    done_oce=0
+
+    if  [  -f $f1s ] && [  -f $f2s ]; then 
+      nl=(`wc -l $f2s`)
+      tail -${nl[0]} $f1s > f1.tmp$$
+      cmp -s f1.tmp$$ $f2s
+      if [ $? == 0 ]; then
+        if [ $pass == 0 ]; then 
+          printf "%-20s %s %s\n" $nam  " run.stat restartability  passed : " $dorv
+        fi
+      else
+        printf "%-20s %s %s\n" $nam  " run.stat restartability  FAILED : " $dorv 
+#
+# Offer view of differences on the second pass
+#
+        if [ $pass == 1 ]; then
+          echo "<return> to view run.stat differences"
+          read y
+          sdiff f1.tmp$$ $f2s
+          echo "<return> to view ocean.output differences"
+          read y
+          sdiff $f1o $f2o | grep "|"
+          done_oce=1
+          echo "<return> to continue"
+          read y
+        fi
+      fi
+    fi
+#
+# Check tracer.stat files (if they exist)
+#
+    if  [  -f $f1t ] && [  -f $f2t ]; then
+      nl=(`wc -l $f2t`)
+      tail -${nl[0]} $f1t > f1.tmp$$
+      cmp -s f1.tmp$$ $f2t
+      if [ $? == 0 ]; then
+        if [ $pass == 0 ]; then 
+          printf "%-20s %s %s\n" $nam  " tracer.stat restartability  passed : " $dorv
+        fi
+      else
+        printf "%-20s %s %s\n" $nam  " tracer.stat restartability  FAILED : " $dorv 
+#
+# Offer view of differences on the second pass
+#
+        if [ $pass == 1 ]; then
+          echo "<return> to view tracer.stat differences"
+          read y
+          sdiff f1.tmp$$ $f2t
+#
+# Only offer ocean.output view if it has not been viewed previously
+#
+          if [ $done_oce == 0 ]; then
+            echo "<return> to view ocean.output differences"
+            read y
+            sdiff $f1o $f2o | grep "|"
+          fi
+          echo "<return> to continue"
+          read y
+        fi
+      fi
+    fi
+    rm f1.tmp$$
+  fi
+}
+
+function reprotest(){
+#
+# Reproducibility checks. Expects REPRO_N_M and REPRO_I_J run directories
+# Compares end of stat files from each
+#
+  vdir=$1
+  nam=$2
+  pass=$3
+#
+  if [ -d $vdir/$nam ]; then
+    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l `
+    dorv=`echo $dorv | sed -e 's:.*/::'`
+    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -2l | head -1 `
+    rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -1l`
+    f1o=$vdir/$nam/$mach/$dorv/$rep1/ocean.output
+    f1s=$vdir/$nam/$mach/$dorv/$rep1/run.stat
+    f1t=$vdir/$nam/$mach/$dorv/$rep1/tracer.stat
+    f2o=$vdir/$nam/$mach/$dorv/$rep2/ocean.output
+    f2s=$vdir/$nam/$mach/$dorv/$rep2/run.stat
+    f2t=$vdir/$nam/$mach/$dorv/$rep2/tracer.stat
+
+    if  [ ! -f $f1s ] && [ ! -f $f1t ] ; then 
+      printf "%-20s %s\n" $nam " incomplete test";
+      return; 
+    fi
+    if  [ ! -f $f2s ] && [ ! -f $f2t ] ; then 
+      printf "%-20s %s\n" $nam " incomplete test";
+      return; 
+    fi
+#
+    done_oce=0
+
+    if  [ -f $f1s ] && [ -f $f2s ] ; then
+      cmp -s $f1s $f2s
+      if [ $? == 0 ]; then
+        if [ $pass == 0 ]; then 
+          printf "%-20s %s %s\n" $nam  " run.stat reproducibility passed : " $dorv
+        fi
+      else
+        printf "%-20s %s %s\n" $nam  " run.stat reproducibility FAILED : " $dorv 
+#
+# Offer view of differences on the second pass
+#
+        if [ $pass == 1 ]; then
+          echo "<return> to view run.stat differences"
+          read y
+          sdiff f1.tmp$$ $f2s
+          echo "<return> to view ocean.output differences"
+          read y
+          sdiff $f1o $f2o | grep "|"
+          done_oce=1
+          echo "<return> to continue"
+          read y
+        fi
+      fi
+    fi
+#
+# Check tracer.stat files (if they exist)
+#
+    if  [ -f $f1t ] && [ -f $f2t ] ; then
+      cmp -s $f1t $f2t
+      if [ $? == 0 ]; then
+        if [ $pass == 0 ]; then           printf "%-20s %s %s\n" $nam  " tracer.stat reproducibility passed : " $dorv
+        fi
+      else
+        printf "%-20s %s %s\n" $nam  " tracer.stat reproducibility  FAILED : " $dorv
+#
+# Offer view of differences on the second pass
+#
+        if [ $pass == 1 ]; then
+          echo "<return> to view tracer.stat differences"
+          read y
+          sdiff $f1t $f2t
+#
+# Only offer ocean.output view if it has not been viewed previously
+#
+          if [ $done_oce == 0 ]; then
+            echo "<return> to view ocean.output differences"
+            read y
+            sdiff $f1o $f2o | grep "|"
+          fi
+          echo "<return> to continue"
+          read y
+        fi
+      fi
+    fi
+  fi
+}
+########################### END of function definitions #################################
+##                                                                                     ##
+##    Main script                                                                      ##
+##                                                                                     ##
+#########################################################################################
+#
+  mach=`grep "COMPILER=" ./sette.sh | sed -e 's/COMPILER=//'`
+  NEMO_VALID=`grep "NEMO_VALIDATION_DIR=" ./param.cfg | sed -e 's/NEMO_VALIDATION_DIR=//'`
+# Directory to run the tests
+ SETTE_DIR=$(cd $(dirname "$0"); pwd)
+ MAIN_DIR=$(dirname $SETTE_DIR)
+ CONFIG_DIR0=${MAIN_DIR}/cfgs
+ TOOLS_DIR=${MAIN_DIR}/tools
+ NPROC=32
+
+  SAS_RESTART_DIR=${CONFIG_DIR0}/SAS_LONG
+#
+  if [ ! -d $NEMO_VALID ]; then
+    echo "$NEMO_VALID validation directory not found"
+    exit
+  fi
+#
+
+# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory
+#  
+for pass in  0 1 
+do
+#
+ if [ $pass == 1 ]; then echo "---------------2nd pass------------------";fi
+#
+
+# Rebuild and restartability test for SAS
+#
+ for restart_file in WSAS_LONG
+ do
+ #  restfile $SAS_RESTART_DIR LONG $pass
+   restfile $NEMO_VALID $restart_file $pass
+ done
+#
+# Restartability test
+#
+ for restart_test in WGYREPIS_LONG WORCA2ICEPIS_LONG WORCA2OFFPIS_LONG WAMM12_LONG WISOMIP_LONG WORCA2AGUL_LONG
+ do
+   resttest $NEMO_VALID $restart_test $pass
+ done
+#
+# Reproducibility tests
+#
+ for repro_test in WGYREPIS_32 WORCA2ICEPIS_32 WORCA2OFFPIS_32 WAMM12_32 WISOMIP_32 WORCA2_ICE_OBS WORCA2AGUL_1_2 WORCA2AGUL_16 WORCA2AGUL_2_2_NAG
+ do
+   reprotest $NEMO_VALID $repro_test $pass
+ done
+#
+done
+exit
Index: utils/CI/r12931_sette_ticket2366/OLD_SCRIPT/sette_xios.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/OLD_SCRIPT/sette_xios.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/OLD_SCRIPT/sette_xios.sh	(revision 13118)
@@ -0,0 +1,439 @@
+#!/bin/bash
+############################################################
+# Author : Italo Epicoco - CMCC
+# Contact: italo.epicoco@unisalento.it
+# 2014   : A.C. Coward added new namelist settings for GYRE configuration
+#
+# sette_xios.sh   : additional script of SET TEsts for XIOS within NEMO
+# ----------------------------------------------------------------------
+# NEMO/SETTE , NEMO Consortium (2014)
+# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+# ----------------------------------------------------------------------
+#
+#############################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+# ===========
+# DESCRIPTION
+# ===========
+#
+# Variables to be checked by user:
+#
+# COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory 
+# BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs
+# BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs  
+# INTERACT_FLAG     : flag to run in interactive mode "yes"
+#                           to run in batch mode "no"
+# MPIRUN_FLAG       : flag to run in parallel (MPI) "yes"
+#                           to run in sequential mode (NB_PROC = 1) "no"
+# USING_MPMD        : flag to control the use of stand-alone IO servers
+#                      "true" to run in MPMD (detached) mode with stand-alone IO servers
+#                      "false"  to run in SPMD (attached) mode without separate IO servers 
+# NUM_XIOSERVERS    : number of stand-alone IO servers to employ
+#                     set to zero if USING_MPMD="false"
+#
+# Principal script is sette_xios.sh, that calls 
+#
+#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe 
+#              and links to nemo in ${CONFIG_NAME}/EXP00)
+#
+#  param.cfg : sets and loads following directories:
+#
+#   FORCING_DIR         : is the directory for forcing files (tarfile)
+#   INPUT_DIR           : is the directory for input files storing 
+#   TMPDIR              : is the temporary directory (if needed)
+#   NEMO_VALIDATION_DIR : is the validation directory
+#
+#   (NOTE: this file is the same for all configrations to be tested with sette)
+#
+#   all_functions.sh : loads functions used by sette (note: new functions can be added here)
+#   set_namelist     : function declared in all_functions that sets namelist parameters 
+#   post_test_tidyup : creates validation storage directory and copies required output files 
+#                      (run.stat and ocean.output) in it after execution of test.
+#
+#  VALIDATION tree is:
+#
+#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
+#
+#  prepare_exe_dir.sh : defines and creates directory where the test is executed
+#                       execution directory takes name of TEST_NAME defined for every test 
+#                       in sette.sh. (each test in executed in its own directory)
+#
+#  prepare_job.sh     : to generate the script run_job.sh
+#
+#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes")
+#                        see sette.sh and BATCH_TEMPLATE directory
+#
+#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which 
+#        can be found paths to the input tar file)
+#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR} 
+#        directory
+#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists 
+#        remain in ${NEW_CONF}/EXP00
+# 
+#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of 
+#        executed commands
+#
+#  NOTE: if sette_xios.sh is stopped in output.sette there is written the last command 
+#        executed by sette_xios.sh
+#
+# example use: ./sette_xios.sh 
+#########################################################################################
+#
+# Compiler among those in NEMOGCM/ARCH
+COMPILER=
+export BATCH_COMMAND_PAR="llsubmit"
+export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
+export INTERACT_FLAG="no"
+export MPIRUN_FLAG="yes"
+#
+
+# Directory to run the tests
+SETTE_DIR=$(cd $(dirname "$0"); pwd)
+MAIN_DIR=${SETTE_DIR%/SETTE}
+CONFIG_DIR=${MAIN_DIR}/cfgs
+TOOLS_DIR=${MAIN_DIR}/tools
+
+CMP_NAM=${1:-$COMPILER}
+#
+#=================================================================================
+# Copy job_batch_COMPILER file for specific compiler into job_batch_template
+# Note this batch template needs to be capable of launching both SPMD and MPMD
+# tasks with internal selection depending on the value of NUM_XIOSERVERS
+# (0=SPMD; >0 = MPMD)
+#=================================================================================
+#
+cd ${SETTE_DIR}
+cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
+
+for config in 1 2  
+
+do
+
+#==========================================================
+# TESTS FOR XIOS USING GYRE CONFIGURATION AT LOW RESOLUTION
+#==========================================================
+
+if [ ${config} -eq 1 ] ;  then
+    ## Test of XIOS configured in attached mode with multiple output files (one for each process). 
+    ## $NPROC processes are used 
+
+    NPROC=4
+    jp_cfg=1
+    jpni=2
+    jpnj=2
+    export NUM_XIOSERVERS=0
+    export USING_MPMD="false"
+
+    export TEST_NAME="ATTACHED_MULTIPLE"
+
+    cd ${SETTE_DIR}
+    . ../cfgs/makenemo -m ${CMP_NAM} -n GYRE_XIOS_LR -r GYRE_XIOS -j 8 
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}  
+    set_namelist namelist_cfg cn_exp \"GYRE_XIOS_LR\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg jp_cfg $jp_cfg
+    set_namelist namelist_cfg jpidta $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjdta $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpiglo $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjglo $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpni $jpni
+    set_namelist namelist_cfg jpnj $jpnj
+    set_namelist namelist_cfg jpnij $NPROC
+
+    set_xio_using_server iodef.xml $USING_MPMD
+    set_xio_file_type    iodef.xml multiple_file
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+
+    ## Test of XIOS configured in attached mode with a single output file. 
+
+    export TEST_NAME="ATTACHED_ONE"
+    export NUM_XIOSERVERS=0
+    export USING_MPMD="false"
+    cd ${SETTE_DIR} 
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"GYRE_XIOS_LR\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg jp_cfg $jp_cfg
+    set_namelist namelist_cfg jpidta $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjdta $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpiglo $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjglo $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpni $jpni
+    set_namelist namelist_cfg jpnj $jpnj
+    set_namelist namelist_cfg jpnij $NPROC
+
+    set_xio_using_server iodef.xml $USING_MPMD
+    set_xio_file_type    iodef.xml one_file
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+
+    ## Test of XIOS configured in detached mode with a single output file. 
+    ## $NUM_XIOSERVERS IO server are used.
+    ## the total number of allocated cores is $NUM_XIOSERVERS + $NPROC 
+
+    export TEST_NAME="DETACHED_ONE"
+    export NUM_XIOSERVERS=2
+    export USING_MPMD="true"
+    cd ${SETTE_DIR}
+#
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"GYRE_XIOS_LR\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg jp_cfg $jp_cfg
+    set_namelist namelist_cfg jpidta $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjdta $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpiglo $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjglo $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpni $jpni
+    set_namelist namelist_cfg jpnj $jpnj
+    set_namelist namelist_cfg jpnij $NPROC
+
+    set_xio_using_server iodef.xml $USING_MPMD
+    set_xio_file_type    iodef.xml one_file
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    ## Test of XIOS configured in detached mode with multiple output files (one for each IO server). 
+    ## $NUM_XIOSERVERS IO server are used.
+    ## the total number of allocated cores is $NUM_XIOSERVERS + $NPROC 
+
+
+    export TEST_NAME="DETACHED_MULTIPLE"
+    export NUM_XIOSERVERS=2
+    export USING_MPMD="true"
+    cd ${SETTE_DIR}
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"GYRE_XIOS_LR\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg jp_cfg $jp_cfg
+    set_namelist namelist_cfg jpidta $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjdta $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpiglo $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjglo $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpni $jpni
+    set_namelist namelist_cfg jpnj $jpnj
+    set_namelist namelist_cfg jpnij $NPROC
+
+    set_xio_using_server iodef.xml $USING_MPMD
+    set_xio_file_type    iodef.xml multiple_file
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+fi
+
+#==========================================================
+# TESTS FOR XIOS USING GYRE CONFIGURATION AT HIGH RESOLUTION
+#==========================================================
+
+if [ ${config} -eq 2 ] ;  then
+    ## Test of XIOS configured in attached mode with multiple output files (one for each process). 
+    ## $NPROC processes are used 
+
+    NPROC=64
+    jp_cfg=30
+    jpni=8
+    jpnj=8
+    export NUM_XIOSERVERS=0
+    export USING_MPMD="false"
+
+    export TEST_NAME="ATTACHED_MULTIPLE"
+
+    cd ${SETTE_DIR}
+    . ../cfgs/makenemo -m ${CMP_NAM} -n GYRE_XIOS_HR -r GYRE_XIOS -j 8
+    cd ${SETTE_DIR}
+#
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+#
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"GYRE_XIOS_HR\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg nn_bench 1
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg jp_cfg $jp_cfg
+    set_namelist namelist_cfg jpidta $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjdta $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpiglo $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjglo $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpni $jpni
+    set_namelist namelist_cfg jpnj $jpnj
+    set_namelist namelist_cfg jpnij $NPROC
+
+    set_xio_using_server iodef.xml $USING_MPMD
+    set_xio_file_type    iodef.xml multiple_file
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+
+    ## Test of XIOS configured in attached mode with a single output file. 
+
+    export TEST_NAME="ATTACHED_ONE"
+    export NUM_XIOSERVERS=0
+    export USING_MPMD="false"
+    cd ${SETTE_DIR}
+#
+    . ./prepare_exe_dir.sh
+#
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"GYRE_XIOS_HR\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg nn_bench 1
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg jp_cfg $jp_cfg
+    set_namelist namelist_cfg jpidta $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjdta $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpiglo $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjglo $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpni $jpni
+    set_namelist namelist_cfg jpnj $jpnj
+    set_namelist namelist_cfg jpnij $NPROC
+
+    set_xio_using_server iodef.xml $USING_MPMD
+    set_xio_file_type    iodef.xml one_file
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+
+    ## Test of XIOS configured in detached mode with a single output file. 
+    ## $NUM_XIOSERVERS IO server are used.
+    ## the total number of allocated cores is $NUM_XIOSERVERS + $NPROC 
+
+    export TEST_NAME="DETACHED_ONE"
+    export NUM_XIOSERVERS=8
+    export USING_MPMD="true"
+    cd ${SETTE_DIR}
+#
+    . ./prepare_exe_dir.sh
+#
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"GYRE_XIOS_HR\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg nn_bench 1
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg jp_cfg $jp_cfg
+    set_namelist namelist_cfg jpidta $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjdta $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpiglo $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjglo $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpni $jpni
+    set_namelist namelist_cfg jpnj $jpnj
+    set_namelist namelist_cfg jpnij $NPROC
+
+    set_xio_using_server iodef.xml $USING_MPMD
+    set_xio_file_type    iodef.xml one_file
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    ## Test of XIOS configured in detached mode with multiple output files (one for each IO server). 
+    ## $NUM_XIOSERVERS IO server are used.
+    ## the total number of allocated cores is $NUM_XIOSERVERS + $NPROC 
+
+    export TEST_NAME="DETACHED_MULTIPLE"
+    export NUM_XIOSERVERS=8
+    export USING_MPMD="true"
+    cd ${SETTE_DIR}
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"GYRE_XIOS_HR\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg nn_bench 1
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg jp_cfg $jp_cfg
+    set_namelist namelist_cfg jpidta $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjdta $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpiglo $(( $jp_cfg * 30 + 2 ))
+    set_namelist namelist_cfg jpjglo $(( $jp_cfg * 20 + 2 ))
+    set_namelist namelist_cfg jpni $jpni
+    set_namelist namelist_cfg jpnj $jpnj
+    set_namelist namelist_cfg jpnij $NPROC
+
+    set_xio_using_server iodef.xml $USING_MPMD
+    set_xio_file_type    iodef.xml multiple_file
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+fi
+
+done
Index: utils/CI/r12931_sette_ticket2366/README.rst
===================================================================
--- utils/CI/r12931_sette_ticket2366/README.rst	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/README.rst	(revision 13118)
@@ -0,0 +1,147 @@
+======================
+usage of SETTE package
+======================
+
+INSTALLATION
+============
+* checkout the code as follow:
+.. code-block:: console
+
+        $ svn checkout http://forge.ipsl.jussieu.fr/nemo/svn/utils/CI/sette sette
+
+* The sette directory have to be located in the main directory (at the same level as ``src/`` or ``cfg/``).
+
+MASTER SCRIPT: sette.sh 
+=======================
+* ``sette.sh`` is a simple wrapper that runs tests on the reference configurations, test cases and generates the report at the end.
+* ``sette.sh`` is able n option, to take a list of configurations in argument (sette.sh -t "CFG1 CFG2 CFG3"). 
+       - The list of available configurations is available in running ./sette_list_avail_cfg.sh.
+       - The default for sette is to run all of the reference and test configurations.
+* Users need to set up the ``param.cfg`` file correctly and download input files before running the script.
+
+SECONDARY SCRIPT
+================
+* ``sette_reference-configuration.sh`` runs sette tests on the reference configurations.
+* ``sette_test-cases.sh``              runs sette tests on test cases.
+* ``sette_list_avail_rev.sh``          generates a listing on all the revisions available in the validation directory for each configuration. 
+* ``sette_list_avail_cfg.sh``          generates a listing of all the available configurations.
+* ``sette_rpt.sh``                     generates the report.
+
+USER SETUP (recommended)
+========================
+* in ``param.cfg`` :
+      - variables (NEMO_VALIDATION_REF, NEMO_REV_REF) have to be specified in param.cfg
+      - variables SETTE_(COMPILER, USING_XIOS, USING_MPMD, JOB_PREFIX_MPMD, JOB_PREFIX_NOMPMD, BATCH_CMD, BATCH_STAT, BATCH_NAME, FORCING_DIR, SVN_CMD, NEMO_VALIDATION_DIR, ADD_NOSIGNEDZERO)
+        can be exported from your shell startup files. It is advise to setup the default value in your startup file if it doesn't fit your need.
+        If you prefer not doing so, you need to update the default initialisation
+      - variable NEMO_VALIDATION_DIR is sette by default in MAIN_DIR/NEMO_VALIDATION (this is to avoid overwritting results when running sette on different branches).
+      - description of variables listed in param.cfg (SETTE_):
+                
+        # reference version for bit reproducibility results
+          |  NEMO_VALIDATION_REF : reference directory
+          |  NEMO_REV_REF        : reference revision
+                
+        # compiler information
+          |  COMPILER            : compiler among those available in NEMOGCM/ARCH
+                
+        # XIOS management
+          |  USING_XIOS        : flag to control the activation of key_iomput. 
+                                "yes" to compile using key_iomput and link to the external XIOS library.
+                                "no"  to compile without key_iomput and link to the old IOIPSL library.
+          |  USING_MPMD        : flag to control the use of stand-alone IO servers 
+                                (requires USING_XIOS="yes").
+                                "yes" to run in MPMD (detached) mode with stand-alone IO servers.
+                                "no"  to run in SPMD (attached) mode without separate IO servers. 
+        # generique batch scrip prefix name if MPMD set to true/false
+           | JOB_PREFIX_MPMD
+           | JOB_PREFIX_NOMPMD
+                
+        # batch command needed
+           | BATCH_CMD           : command for job submission in batch mode
+           | BATCH_STAT          : command to check job status
+           | BATCH_NAME          : generic sette job name (as it appears with $BATCH_STAT command)
+                
+        # file storing
+           | FORCING_DIR         : directory where is stored input.tar file (same name in input_CONFIG_NAME.cfg)
+                                   reference configuration input tar file could be found here : https://zenodo.org/record/1472245
+           | NEMO_VALIDATION_DIR : directory where is stored restarts, run.stat, tracer.stat and ocean.output files for each configuration
+                                   ( NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) )
+           | INPUT_DIR           : directory where is stored input files (DO NOT CHANGE IT)
+                
+        # misc.
+           | SVN_CMD             : svn command use to do svn info (default svn). Could be useful if you are using git svn
+                                 : Reference directory for result comparison will be NEMO_VALIDATION_REF/COMPILER/NEMO_REV_REF
+           | ADD_NODIGNEDZERO    : set "yes" if you need key_nosignedzero to run nemo
+
+USAGE of main scripts
+=====================
+* ``sette.sh``                : it is a simple wrapper to run tests on the reference configurations, test-cases and generate the report at the end.
+          - if no argument is given, sette run all the reference configurations and test cases 
+          - if a list of argument is provided (sette.sh -t "CFG1 CFG2 CFG3"), sette will only run these configurations. 
+             The list of available configurations is available in running ./sette_list_avail_cfg.sh.
+          - user need to set up the param.cfg file correctly and download input file before running the script.
+          - user can enforce synchronisation (-s option) of the existing CFG_ST with the REF configuration (EXPREF and MY_SRC). 
+          - user can enforce cleaning of the CFG_ST configuration (use of makenemo -n CFG_ST clean) (-c option)
+* ``sette_rpt.sh``            : it generates the sette report.
+          - if no argument is given, the report will be generated on the last changed revision.
+          - if an argument is given (revision number) the report will be generated for this revision only
+          - if 'old' is given as argument the former behavior is applied (the latest revision is check whatever the current revision
+          - it is possible to retreive all the available revision test using sette_list_avail_rev.sh
+          - XXXXX+ means sette results for revision XXXXX contain local modification in src/cfgs/test
+          - it is NOT possible to run sette_rpt.sh for a single configuration.
+* ``sette_list_avail_rev.sh`` : generate a listing on all the revisions available in the validation directory for each configuration.
+          - no argument needed
+          - XXXXX+ means sette results for revision XXXXX contain local modification in src/cfgs/test
+* ``sette_list_avail_cfg.sh`` : generate a listing of all the available configurations.
+          - no argument needed
+
+NOTES
+=====
+* compilation issues:
+   - in case of error you can remove your NEW_CONF directory and all files doing :
+
+     ::
+
+     $ ./makenemo -n MY_CONFIG clean_config
+
+   - if you want recompile nemo but before you want to clean compiled code do :
+
+     ::
+
+     ./makenemo clean
+
+   - if you have already compiled you can re-run all sette.sh and compilation part will be by-passed.
+
+* verbose sette output:
+   - if you want a completly verbose makenemo you can uncomment `set -x` in makenemo script
+     and then launch `./sette.sh 2>&1 | tee out.sette` . This creates out.sette file in ${SETTE_DIR}
+
+TO ADD NEW CONFIGURATION
+=========================
+1. creates a new ``input_NEW_CONFIG.cfg`` if you need tar file (if you use same tar file of GYRE, ORCA2_LIM or ORCA2_LIM_PISCES you can use it)
+2. add a bloc in one of the ``sette_reference-configuration.sh`` or ``sette_test-cases.sh`` script 
+3. add your configuration to the list in ``param.cfg``
+
+TO ADD NEW MACHINE
+===================
+1. add ``arch-compiler.fcm`` in ``NEMOGCM/ARCH`` directory
+2. makenemo -m new_compiler  (see makenemo -h for help)
+3. add new batch-file
+
+TO ADD NEW BATCH-FILE
+======================
+1. see in ``SETTE/BATCH_TEMPLATE`` directory existing examples
+2. create you own batch file like: ``batch-${COMPILER}`` file
+   (note: sette_test-cases.sh and ``sette_cfg-ref.sh`` will copy it in job_batch_template if you run tests in INTERACT_FLAG="no")
+
+EXTRA SETTING POSSIBLE
+======================
+Among the setting that can be modified by the user in sette_cfg-ref.sh and sette_test-cases.sh script,
+there are: sequential/parrallel (default), interacive or not (default) and mpi (default) or not.
+  - | BATCH_COMMAND_PAR is the command for job submission in batch mode parallel (specified in param.cfg).
+  - | BATCH_COMMAND_SEQ is the command for job submission in batch mode sequential (NB_PROC = 1).
+                     the default value is the BATCH_COMMAND_PAR value.
+  - | INTERACT_FLAG : "yes" if you want to run in interactive mode.
+                    "no"  if you want to run in batch mode (default).     
+  - | MPIRUN_FLAG   : "yes" if you want to run in parallel (MPI) (default).
+                    "no"  if you want to run in sequential mode (NB_PROC = 1).
Index: utils/CI/r12931_sette_ticket2366/all_functions.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/all_functions.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/all_functions.sh	(revision 13118)
@@ -0,0 +1,549 @@
+######################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# ----------------------------------------------------------------------
+# NEMO/SETTE , NEMO Consortium (2010)
+# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+# ----------------------------------------------------------------------
+#
+# Some scripts called by sette.sh
+# all_functions.sh   : all functions used by sette.sh  
+######################################################
+#set -x
+#set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# all_functions.sh
+# ================
+#
+# ----------------------------------------------
+# Set of functions used by sette.sh (NEMO tests) 
+# ----------------------------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ ./set_namelist INPUT_NAMELIST VARIABLE VALUE 
+#  $ post_test_tidyup 
+#
+#
+# DESCRIPTION
+# ===========
+#
+# function superegrep
+#   input variable value
+#
+# function set_namelist
+#   input namelist_name variable value
+#   output namelist
+#
+# function post_test_tidyup
+#   creates nemo_validation tree, and save output & debug files
+#   this function creates tree of validation in NEMO_VALIDATION_DIR as follows : 
+#
+# NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/REVISION_NUMBER(or DATE)/TEST_NAME
+# 
+# NEMO_VALIDATION_DIR           : is choosen in param.cfg
+#
+# WCONFIG_NAME                  : set by makenemo at the moment of compilation
+#
+# WCOMPILER_NAME                : set by makenemo at the moment of compilation
+#
+# REVISION_NUMBER(or DATE)      : revision number by svn info, if problems with svn date is taken
+#
+# TEST_NAME                     : set in sette.sh for each configuration to be tested (directory TEST_NAME is created under ${NEW_CONF} directory )
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./set_namelist namelist          nn_itend        75
+#  $ ./set_namelist namelist_ice      cn_icerst_in  \"00101231_restart_ice\"
+#  $ post_test_tidyup 
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#   * creation
+#-
+# function to find namelists parameters
+supergrep () {
+            grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%"
+    }
+
+usage=" Usage : set_namelist input_namelist variable_name value"
+usage=" if value is a string ths is neede syntax : ./set_namelist namelist_name var_name \"new_value\" "
+
+# sync MYSRC files (input CFG and CFG_ST)
+sync_config() {
+   if [ ${SYNC_CONFIGS} == "yes" ]; then
+
+      lREF=$3/$1    # reference 
+      lCFG=$3/$2    # target
+
+      echo '-------------------------------------------------------------------------------'
+      echo '                    SOURCE AND CONFIG FILES SYNCHRONISATION                    '
+      echo ''
+      echo "configuration $lCFG/MY_SRC will be synchronised with $lREF/MY_SRC"
+      echo ''
+      # synchronise MY_SRC if $lCFG directory exist
+      if [ -d $lREF/MY_SRC ] && [ -d $lCFG ] ; then
+
+         if [ -d $lCFG/MY_SRC ] ; then
+
+            # Manage case number of file in MY_SRC changes
+            # find number of file only in $lCFG/MY_SRC
+            FCFG=`diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep "Only in $lCFG/MY_SRC" | awk '{print $4}'`
+
+            # if more than 0, trigger a cleaning as Makenemo do not properly manage this case.
+            if [ ! -z "$FCFG" ]; then 
+               echo ''
+               echo "$lCFG contains a different file list than $lREF :"
+               diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep "Only in $lCFG/MY_SRC" | awk '{print $4}'
+               echo "Synchronisation is not enough because Makenemo does not handle well case where a file in MY_SRC is removed"
+               echo "Therefore, we need to clean $lCFG before starting runing it"
+               echo ''
+               CLEAN_CONFIGS="yes"
+            fi
+         fi
+
+         # synchronisation $lREF/MY_SRC directory (and delete file in target location if needed)
+         rsync -a --delete $lREF/MY_SRC/ $lCFG/MY_SRC
+
+         # rsync keep preserve the modification time stamp.
+         # To avoid case where a file in MY_SRC is replace by an older file, we touch the file
+         touch $lCFG/MY_SRC/*
+      fi
+
+      echo ''
+      echo "configuration $lCFG/EXP00 will be synchronised with $lREF/EXPREF"
+      echo "(links are skipped)"
+      echo ''
+      # synchronize EXPREF
+      if [ -d $lREF/EXPREF ] && [ -d $lCFG/EXP00 ] ; then
+         rsync -a --no-links $lREF/EXPREF/ $lCFG/EXP00/.
+      fi
+      echo '-------------------------------------------------------------------------------'
+   fi
+}
+
+# clean _ST config (input CFG CFG_ST TYPE (test or ref))
+clean_config() {
+   if [ ${CLEAN_CONFIGS} == "yes" ]; then
+      lREF=$1
+      lCFG=$2
+      lTYP=$3
+      echo ''
+      echo '-------------------------------------------------------------------------------'
+      echo '                         CLEANING CONFIGURATION                                '
+      echo ''
+      echo "./makenemo -n $lCFG -a/-r $lREF clean"
+      echo ''
+      if [ ${lTYP} == 'tests' ]; then
+         ./makenemo -n $lCFG -a $lREF clean
+      elif [ ${lTYP} == 'cfgs' ]; then
+         ./makenemo -n $lCFG -r $lREF clean
+      else
+         echo 'ERROR in the cleaning process'; exit 42
+      fi
+      echo ''
+      echo "$lCFG configuration has been cleaned"
+      echo ''
+      echo '-------------------------------------------------------------------------------'
+   fi
+}
+
+# define validation dir
+set_valid_dir () {
+    REVISION_NB=`${SVN_CMD} info ${SETTE_DIR}/.. | grep "Last Changed Rev" | awk '{print $NF}'`
+    if [ ${#REVISION_NB} -eq 0 ]
+    then
+        echo "some problems with ${SVN_CMD} info command"
+        echo "some problems with ${SVN_CMD} info command" >> ${SETTE_DIR}/output.sette
+        REVISION_NB=`date +%Y%m%d`
+        echo "put in ${REVISION_NB} date"
+        echo "put in ${REVISION_NB} date" >> ${SETTE_DIR}/output.sette
+    else
+    echo "value of revision number of NEMOGCM: ${REVISION_NB}"
+    fi
+    [ `${SVN_CMD} status -q ${SETTE_DIR}/../{cfg,tests,src} | wc -l` -ge 1 ] && REVISION_NB=${REVISION_NB}+
+    NEMO_VALID=${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME}
+}
+
+# clean valid dir (move old ocean_output/run.stat and tracer to avoid checking them in case something wrong happen.
+clean_valid_dir () {
+#   set_valid_dir # already done in sette_ref/sette_test
+   echo "validation directory is : $NEMO_VALID"
+   if [ -d $NEMO_VALID ] ; then
+      [ -f ${NEMO_VALID}/ocean.output ] && mv ${NEMO_VALID}/ocean.output ${NEMO_VALID}/ocean.output_old
+      [ -f ${NEMO_VALID}/run.stat ]     && mv ${NEMO_VALID}/run.stat     ${NEMO_VALID}/run.stat_old
+      [ -f ${NEMO_VALID}/tracer.stat ]  && mv ${NEMO_VALID}/tracer.stat  ${NEMO_VALID}/tracer.stat_old
+   fi
+}
+
+# function to set namelists parameters
+set_namelist () {
+	minargcount=3
+	if [ ${#} -lt ${minargcount} ]
+	then
+		echo "not enough arguments for set_namelist"
+		echo "${usage}"
+		exit 1
+	fi
+	unset minargcount
+	if [  ! -f ${SETTE_DIR}/output.sette ] ; then
+                touch ${SETTE_DIR}/output.sette
+        fi
+
+        echo "executing script : set_namelist $@" >> ${SETTE_DIR}/output.sette
+        echo "################" >> ${SETTE_DIR}/output.sette
+      
+	VAR_NAME=$( supergrep $2 ${EXE_DIR}/$1 )
+	if [ ${#VAR_NAME} -eq 0 ] 
+	then
+		echo "doing \"set_namelist $@\". "  >> ${SETTE_DIR}/output.sette
+		echo "variable: \"$2\" not found in \"${EXE_DIR}/$1\" "  >> ${SETTE_DIR}/output.sette
+                NAMREF=$( basename $1 _cfg )_ref
+		echo "doing more : search in ${EXE_DIR}/$NAMREF " >> ${SETTE_DIR}/output.sette
+                VAR_NAME=$( supergrep $2 ${EXE_DIR}/$NAMREF )
+	        if [ ${#VAR_NAME} -eq 0 ] 
+	        then
+                    echo " variable $VAR_NAME not found in ${EXE_DIR}/$1 nor in ${EXE_DIR}/$NAMREF "
+                    echo " check your variable name "
+        		echo "exit"
+	        	echo "error in executing script : set_namelist $@" >> ${SETTE_DIR}/output.sette
+	        	echo "....." >> ${SETTE_DIR}/output.sette
+        		exit 1
+                fi
+                LINEVAR=$( grep -s -n "$VAR_NAME" ${EXE_DIR}/$NAMREF | awk -F: '{ { print $1} }' )
+                echo " $VAR_NAME found in ${EXE_DIR}/$NAMREF at line $LINEVAR " >> ${SETTE_DIR}/output.sette
+
+#   search for namelist group name
+                NAMGRP=$( head -n$LINEVAR ${EXE_DIR}/$NAMREF | grep --line-buffered "^&nam" | tail -1 | awk -F" " '{ { print $1} }' ) 
+                echo " variable $VAR_NAME will be added in $NAMGRP namelist-group of namelist file ${EXE_DIR}/$1 " >> ${SETTE_DIR}/output.sette
+
+# check if namelist group present in namelist_cfg
+# if missing group is added at the end of namelist_cfg
+                NGRP=$(grep ${NAMGRP} ${EXE_DIR}/$1 | wc -l )
+                if [ ${NGRP} -eq 0 ]; then
+                   echo ''                                                                          >> ${SETTE_DIR}/output.sette
+                   echo "+++++ Group ${NAMGRP} containing ${2} is missing in ${EXE_DIR}/$1 +++++ "  >> ${SETTE_DIR}/output.sette
+                   echo "+++++ Group ${NAMGRP}                 is added   in ${EXE_DIR}/$1 +++++ "  >> ${SETTE_DIR}/output.sette
+                   echo ''                                                                          >> ${SETTE_DIR}/output.sette
+                   echo "&${NAMGRP}" >> ${EXE_DIR}/$1
+                   echo "/"          >> ${EXE_DIR}/$1
+                fi
+
+# Add $VARNAME in namelist file ${EXE_DIR}/$1 in namelist group $NAMGRP
+# on mac osx, replace sed --posix by gsed (available with mac port)
+                sed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp || gsed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
+
+# if file not empty replace ${EXE_DIR}/$1
+               if [ -s ${EXE_DIR}/$1.tmp ] ; then
+                   mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 
+                else
+                echo "file ${EXE_DIR}/$1.tmp is empty. sed command went wrong "; exit 200
+                fi
+	fi
+
+        ARGS_LST="${@:3}"
+        sed -e "s;${VAR_NAME}.*;${VAR_NAME};" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
+        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1
+        sed -e "s;${VAR_NAME};$2=${ARGS_LST};"  ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
+        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1
+
+        echo "finished script : set_namelist $@" >> ${SETTE_DIR}/output.sette
+        echo "++++++++++++++++" >> ${SETTE_DIR}/output.sette
+        echo "                " >> ${SETTE_DIR}/output.sette
+}
+
+
+# function to tidy up after each test and populate the NEMO_VALIDATION store
+post_test_tidyup () {
+# Save current exit status of caller script 
+    RUN_STATUS=$? 
+    echo "Exit status: ${RUN_STATUS}" 
+#
+# requires the following variables defined and exported from the calling script:
+#  SETTE_DIR
+#  INPUT_DIR
+#  EXE_DIR
+#  CONFIG_DIR
+#  NEMO_VALIDATION_DIR
+#  NEW_CONF
+#  CMP_NAM
+#  TEST_NAME
+echo "SETTE directory is : ${SETTE_DIR}"
+echo "INPUT directory is : ${INPUT_DIR}"
+echo "EXECUTION directory is : ${EXE_DIR}"
+echo "CONFIG directory is : ${CONFIG_DIR}"
+echo "VALIDATION directory is : ${NEMO_VALID}"
+echo "NEW CONFIGURATION is : ${NEW_CONF}"
+echo "COMPILER is : ${CMP_NAM}"
+echo "TEST is : ${TEST_NAME}"
+echo "TOOLS directory is : ${TOOLS_DIR}"
+################################################################
+# SMALL DEBUG
+    EXIT_STATUS=${RUN_STATUS}
+    if [ ! -r ${EXE_DIR}/ocean.output ]
+        then
+        grep "E R R O R" ${EXE_DIR}/ocean.output && echo "Some ERRORS at execution time, see ${EXE_DIR}/ocean.output"
+        EXIT_STATUS=2
+        # exit 2 Error now catch in the report 
+    fi
+
+    if [ ! -r ${EXE_DIR}/time.step ]
+        then
+        echo "file time.step does not exist"   >> ${SETTE_DIR}/output.sette
+        echo "some problems during execution of model"  >> ${SETTE_DIR}/output.sette 
+        EXIT_STATUS=1
+        # exit 1 Error now catch in the report
+    else
+        echo "file time.step exists"  >> ${SETTE_DIR}/output.sette
+        echo "execution of model time step loop started"   >> ${SETTE_DIR}/output.sette
+    fi
+
+################################################################
+
+################################################################
+#
+# Creation of NEMO_VALIDATION tree
+#    set_valid_dir already done in sette_reference_config
+    mkdir -p ${NEMO_VALIDATION_DIR}
+    if [ -d ${NEMO_VALIDATION_DIR} ] ; then
+	echo "created ${NEMO_VALIDATION_DIR} directory"   >> ${SETTE_DIR}/output.sette
+    else 
+	echo "problems in creating ${NEMO_VALIDATION_DIR} directory"   >> ${SETTE_DIR}/output.sette
+	echo "EXIT,"
+	exit 1
+    fi
+# 
+# Exit before populating validation directory if the model run has 
+# returned a non-zero exit status 
+# On CRAY NEMO exit is not the expected 999 or 123456 (let this bloc in case useful later on).
+#    case ${EXIT_STATUS} in
+#        0|123456|999) echo " NEMO finished with exit code $EXIT_STATUS " ; post_test_tidyup ;;
+#        *) echo " NEMO abort on an unexpected error (segmentation fault or whatever) $EXIT_STATUS "
+#    esac
+
+    [ ${EXIT_STATUS} -ne 0 ] && exit ${EXIT_STATUS}  
+#
+# Save output & debug files in NEMO_VALIDATION tree
+    echo "saving ocean & ice output, run.stat, tracer.stat files ...." >> ${SETTE_DIR}/output.sette
+    echo "            " >> ${SETTE_DIR}/output.sette
+    [ -f ${EXE_DIR}/ocean.output ] && cp ${EXE_DIR}/*ocean.output ${NEMO_VALIDATION_DIR}/.
+    [ -f ${EXE_DIR}/run.stat ] && cp ${EXE_DIR}/*run.stat ${NEMO_VALIDATION_DIR}/.
+    [ -f ${EXE_DIR}/output.namelist.dyn ] && cp ${EXE_DIR}/*output.nam* ${NEMO_VALIDATION_DIR}/.
+    [ -f ${EXE_DIR}/tracer.stat ] && cp ${EXE_DIR}/*tracer.stat ${NEMO_VALIDATION_DIR}/.
+
+    if [ -n "$(ls ${NEMO_VALIDATION_DIR}/*run*)" ] ; then
+	echo "moved run.stat in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette
+	echo "moved run.stat in ${NEMO_VALIDATION_DIR} directory"  
+    else
+	echo "problem in looking for run.stat file in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette
+	echo "run.stat IS NOT in ${NEMO_VALIDATION_DIR} directory" 
+    fi
+    if [ -n "$(ls ${NEMO_VALIDATION_DIR}/*ocean.output*)" ] ; then
+	echo "moved ocean.output in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette
+	echo "moved ocean.output in ${NEMO_VALIDATION_DIR} directory" 
+    else
+	echo "problem in looking for ocean.output file in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette
+	echo "ocean.output IS NOT in ${NEMO_VALIDATION_DIR} directory" 
+    fi
+    if [ -n "$(ls ${NEMO_VALIDATION_DIR}/*tracer.stat*)" ] ; then
+        echo "moved tracer.stat in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette
+        echo "moved tracer.stat in ${NEMO_VALIDATION_DIR} directory"
+    else
+        echo "problem in looking for tracer.stat file in ${NEMO_VALIDATION_DIR} directory"  >> ${SETTE_DIR}/output.sette
+        echo "tracer.stat IS NOT in ${NEMO_VALIDATION_DIR} directory"
+    fi
+}
+
+#############################################################
+# extra functions to manipulate settings in the iodef.xml file
+#
+# Examples:
+#   set_xio_file_type    iodef.xml one_file
+#   set_xio_using_server iodef.xml true
+#   set_xio_buffer_size  iodef.xml 50000000
+#   set_xio_field_defs   iodef.xml
+#
+#############################################################
+
+usage2=" Usage : set_xio_file_type input_iodef.xml one_file||multiple_file"
+usage3=" Usage : set_xio_using_server input_iodef.xml true||false"
+usage4=" Usage : set_xio_buffer_size input_iodef.xml int_buffer_size"
+usage5=" Usage : set_xio_field_defs input_iodef.xml"
+
+set_xio_file_type () {
+        minargcount=2
+        if [ ${#} -lt ${minargcount} ]
+        then
+                echo "not enough arguments for set_xio_file_type"
+                echo "${usage2}"
+                exit 1
+        fi
+        if [ $2 != "one_file" ] && [ $2 != "multiple_file" ]
+        then
+                echo "unrecognised argument for set_xio_file_type"
+                echo "${usage2}"
+                echo $2
+                exit 1
+        fi
+        unset minargcount
+        if [  ! -f ${SETTE_DIR}/output.sette ] ; then
+                touch ${SETTE_DIR}/output.sette
+        fi
+
+        echo "executing script : set_xio_file_type $@" >> ${SETTE_DIR}/output.sette
+        echo "################" >> ${SETTE_DIR}/output.sette
+
+        VAR_NAME=$( grep "^.*<.*file_definition.*type.*=" ${EXE_DIR}/$1 | sed -e "s% *\!.*%%" )
+        if [ ${#VAR_NAME} -eq 0 ]
+        then
+                echo "doing \"set_xio_file_type $@\". "
+                echo "xml_tag: file_definition with variable: type is empty"
+                echo "confirm that an appropriate file_definition is in \"${EXE_DIR}/$1\" "
+                echo "exit"
+                echo "error in executing script : set_xio_file_type $@" >> ${SETTE_DIR}/output.sette
+                echo "....." >> ${SETTE_DIR}/output.sette
+                exit 1
+        fi
+        if [ $2 == "one_file" ] 
+        then
+           sed -e "s:multiple_file:one_file:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
+        else
+           sed -e "s:one_file:multiple_file:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
+        fi
+        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1
+
+        echo "finished script : set_xio_file_type $@" >> ${SETTE_DIR}/output.sette
+        echo "++++++++++++++++" >> ${SETTE_DIR}/output.sette
+        echo "                " >> ${SETTE_DIR}/output.sette
+}
+
+set_xio_using_server () {
+        minargcount=2
+        if [ ${#} -lt ${minargcount} ]
+        then
+                echo "not enough arguments for set_xio_using_server"
+                echo "${usage2}"
+                exit 1
+        fi
+        if [ $2 != "true" ] && [ $2 != "false" ]
+        then
+                echo "unrecognised argument for set_xio_using_server"
+                echo "${usage2}"
+                echo $2
+                exit 1
+        fi
+        unset minargcount
+        if [  ! -f ${SETTE_DIR}/output.sette ] ; then
+                touch ${SETTE_DIR}/output.sette
+        fi
+
+        echo "executing script : set_xio_using_server $@" >> ${SETTE_DIR}/output.sette
+        echo "################" >> ${SETTE_DIR}/output.sette
+
+        VAR_NAME=$( grep "^.*<.*variable id.*=.*using_server.*=.*bool" ${EXE_DIR}/$1 | sed -e "s% *\!.*%%" )
+        if [ ${#VAR_NAME} -eq 0 ]
+        then
+                echo "doing \"set_xio_using_server $@\". "
+                echo "xml_tag: "variable id=using_server" with variable: bool is empty"
+                echo "confirm that an appropriate variable id is in \"${EXE_DIR}/$1\" "
+                echo "exit"
+                echo "error in executing script : set_xio_using_server $@" >> ${SETTE_DIR}/output.sette
+                echo "....." >> ${SETTE_DIR}/output.sette
+                exit 1
+        fi
+        if [ $2 == "false" ]
+        then
+           sed -e "/using_server/s:true:false:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
+           export USING_MPMD=no
+        else
+           sed -e "/using_server/s:false:true:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
+           export USING_MPMD=yes
+        fi
+        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1
+
+        echo "finished script : set_xio_using_server $@" >> ${SETTE_DIR}/output.sette
+        echo "++++++++++++++++" >> ${SETTE_DIR}/output.sette
+        echo "                " >> ${SETTE_DIR}/output.sette
+}
+
+set_xio_buffer_size () {
+        minargcount=2
+        if [ ${#} -lt ${minargcount} ]
+        then
+                echo "not enough arguments for set_xio_buffer_size"
+                echo "${usage4}"
+                exit 1
+        fi
+        unset minargcount
+        if [  ! -f ${SETTE_DIR}/output.sette ] ; then
+                touch ${SETTE_DIR}/output.sette
+        fi
+
+        echo "executing script : set_xio_buffer_size $@" >> ${SETTE_DIR}/output.sette
+        echo "################" >> ${SETTE_DIR}/output.sette
+
+        VAR_NAME=$( grep "^.*<.*variable id.*=.*buffer_size.*=.*integer" ${EXE_DIR}/$1 | sed -e "s% *\!.*%%" )
+        if [ ${#VAR_NAME} -eq 0 ]
+        then
+                echo "doing \"set_xio_buffer_size $@\". "
+                echo "xml_tag: "variable id=buffer_size" with variable: integer is empty"
+                echo "confirm that an appropriate variable id is in \"${EXE_DIR}/$1\" "
+                echo "exit"
+                echo "error in executing script : set_xio_buffer_size $@" >> ${SETTE_DIR}/output.sette
+                echo "....." >> ${SETTE_DIR}/output.sette
+                exit 1
+        fi
+        sed -e "/buffer_size/s:>.*<:>$2<:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
+        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1
+
+        echo "finished script : set_xio_buffer_size $@" >> ${SETTE_DIR}/output.sette
+        echo "++++++++++++++++" >> ${SETTE_DIR}/output.sette
+        echo "                " >> ${SETTE_DIR}/output.sette
+}
+
+set_xio_field_defs () {
+        minargcount=1
+        if [ ${#} -lt ${minargcount} ]
+        then
+                echo "not enough arguments for set_xio_field_defs"
+                echo "${usage5}"
+                exit 1
+        fi
+        unset minargcount
+        if [  ! -f ${SETTE_DIR}/output.sette ] ; then
+                touch ${SETTE_DIR}/output.sette
+        fi
+
+        echo "executing script : set_xio_field_defs $@" >> ${SETTE_DIR}/output.sette
+        echo "################" >> ${SETTE_DIR}/output.sette
+
+
+        [ -f ${EXE_DIR}/field_def_nemo-oce.xml ] || sed -i '/field_def_nemo-oce/d' $1
+        [ -f ${EXE_DIR}/field_def_nemo-ice.xml ] || sed -i '/field_def_nemo-ice/d' $1
+        [ -f ${EXE_DIR}/field_def_nemo-pisces.xml ] || sed -i '/field_def_nemo-pisces/d' $1
+
+        echo "finished script : set_xio_field_defs $@" >> ${SETTE_DIR}/output.sette
+        echo "++++++++++++++++" >> ${SETTE_DIR}/output.sette
+        echo "                " >> ${SETTE_DIR}/output.sette
+}
Index: utils/CI/r12931_sette_ticket2366/fcm_job.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/fcm_job.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/fcm_job.sh	(revision 13118)
@@ -0,0 +1,103 @@
+#####################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# Some scripts called by sette.sh 
+# fcm_job.sh   : simple job to run NEMO with fcm 
+######################################################
+#set -vx
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# fcm_job.sh
+# ================
+#
+# --------------------------
+# Simple job for NEMO tests 
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# :: lauches the script $JOB_FILE interactive or batch, one task or MPI
+#
+#  $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT_FLAG MPIRUN_FLAG
+#
+#
+# DESCRIPTION
+# ===========
+#
+# Simple job for SET TESTS for NEMO (SETTE)
+# 
+#  
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT_FLAG MPIRUN_FLAG
+#
+#  run a job with 1 processor SHORT test ( 5 days ) 
+#  using an interactive run without mpirun 
+#
+#  ./fcm_job.sh        1           SHORT        yes          no 
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: $
+#
+#
+#
+#   * creation
+#
+#-
+#
+
+usage=" Usage : ./fcm_job.sh  NUMBER_OF_PROCS JOB_FILE INTERACT_FLAG MPIRUN_FLAG"
+usage=" example : ./fcm_job.sh       8          SHORT      no/yes       no/yes"
+
+
+minargcount=4
+        if [ ${#} -lt ${minargcount} ]
+        then
+                echo "not enough arguments for fcm_job.sh script"
+                echo "control number of argument of fcm_job.sh in sette.sh"
+                echo "${usage}"
+        exit 1
+        fi
+        unset minargcount
+	if [ ! -f ${SETTE_DIR}/output.sette ] ; then
+	        touch ${SETTE_DIR}/output.sette
+	fi
+       
+
+export NB_PROCS=$1
+export JOB_FILE=$2
+export INTERACT_FLAG=$3
+export MPIRUN_FLAG=$4
+################################################################
+# RUN OPA
+cd ${EXE_DIR}
+if [ "${INTERACT_FLAG}" == "yes" ]; then
+	eval ${JOB_FILE}
+else if [ "${INTERACT_FLAG}" == "no" ]; then
+	# submit job to batch system 
+        if [ "${NB_PROC}" == "1" ]; then
+		eval ${BATCH_COMMAND_SEQ} ${JOB_FILE} ; echo  ${BATCH_COMMAND_SEQ} ${JOB_FILE}
+        else
+		eval ${BATCH_COMMAND_PAR} ${JOB_FILE} ; echo ${BATCH_COMMAND_PAR} ${JOB_FILE}
+        fi
+fi
+fi
Index: utils/CI/r12931_sette_ticket2366/input_AGRIF.cfg
===================================================================
--- utils/CI/r12931_sette_ticket2366/input_AGRIF.cfg	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/input_AGRIF.cfg	(revision 13118)
@@ -0,0 +1,2 @@
+ORCA2_ICE_v4.0.tar ORCA2_ICE_v4.0
+AGRIF_DEMO_v4.0.tar AGRIF_DEMO_v4.0
Index: utils/CI/r12931_sette_ticket2366/input_AMM12.cfg
===================================================================
--- utils/CI/r12931_sette_ticket2366/input_AMM12.cfg	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/input_AMM12.cfg	(revision 13118)
@@ -0,0 +1,1 @@
+AMM12_v4.0.tar AMM12_v4.0
Index: utils/CI/r12931_sette_ticket2366/input_GYRE.cfg
===================================================================
--- utils/CI/r12931_sette_ticket2366/input_GYRE.cfg	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/input_GYRE.cfg	(revision 13118)
@@ -0,0 +1,1 @@
+
Index: utils/CI/r12931_sette_ticket2366/input_ICE_AGRIF.cfg
===================================================================
--- utils/CI/r12931_sette_ticket2366/input_ICE_AGRIF.cfg	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/input_ICE_AGRIF.cfg	(revision 13118)
@@ -0,0 +1,1 @@
+ICE_AGRIF_v4.0.tar ICE_AGRIF_v4.0
Index: utils/CI/r12931_sette_ticket2366/input_ORCA2_ICE_AGRIF.cfg
===================================================================
--- utils/CI/r12931_sette_ticket2366/input_ORCA2_ICE_AGRIF.cfg	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/input_ORCA2_ICE_AGRIF.cfg	(revision 13118)
@@ -0,0 +1,1 @@
+ORCA2_ICE_v4.0.tar ORCA2_ICE_v4.0
Index: utils/CI/r12931_sette_ticket2366/input_ORCA2_ICE_OBS.cfg
===================================================================
--- utils/CI/r12931_sette_ticket2366/input_ORCA2_ICE_OBS.cfg	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/input_ORCA2_ICE_OBS.cfg	(revision 13118)
@@ -0,0 +1,1 @@
+ORCA2_ICE_v4.0.tar ORCA2_ICE_v4.0
Index: utils/CI/r12931_sette_ticket2366/input_ORCA2_ICE_PISCES.cfg
===================================================================
--- utils/CI/r12931_sette_ticket2366/input_ORCA2_ICE_PISCES.cfg	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/input_ORCA2_ICE_PISCES.cfg	(revision 13118)
@@ -0,0 +1,1 @@
+ORCA2_ICE_v4.0.tar  ORCA2_ICE_v4.0
Index: utils/CI/r12931_sette_ticket2366/input_ORCA2_OFF_PISCES.cfg
===================================================================
--- utils/CI/r12931_sette_ticket2366/input_ORCA2_OFF_PISCES.cfg	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/input_ORCA2_OFF_PISCES.cfg	(revision 13118)
@@ -0,0 +1,1 @@
+ORCA2_OFF_v4.0.tar ORCA2_OFF_v4.0
Index: utils/CI/r12931_sette_ticket2366/input_SAS.cfg
===================================================================
--- utils/CI/r12931_sette_ticket2366/input_SAS.cfg	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/input_SAS.cfg	(revision 13118)
@@ -0,0 +1,2 @@
+ORCA2_ICE_v4.0.tar ORCA2_ICE_v4.0
+INPUTS_SAS_v4.0.tar SAS
Index: utils/CI/r12931_sette_ticket2366/input_SPITZ12.cfg
===================================================================
--- utils/CI/r12931_sette_ticket2366/input_SPITZ12.cfg	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/input_SPITZ12.cfg	(revision 13118)
@@ -0,0 +1,1 @@
+SPITZ12_v4.0.tar SPITZ12_v4.0
Index: utils/CI/r12931_sette_ticket2366/iodef_sette.xml
===================================================================
--- utils/CI/r12931_sette_ticket2366/iodef_sette.xml	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/iodef_sette.xml	(revision 13118)
@@ -0,0 +1,155 @@
+<?xml version="1.0"?>
+<simulation> 
+
+ <context id="nemo">
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="DEF_SHARED/field_def_nemo-oce.xml"/>
+    <field_definition src="DEF_SHARED/field_def_nemo-ice.xml"/>
+    <field_definition src="DEF_SHARED/field_def_nemo-pisces.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files -->
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
+      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE."/>  <!-- 5d files -->  
+      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    <axis_definition>
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"                 />
+      <axis id="icbcla"  long_name="Iceberg class"      unit="1"               />
+      <axis id="ncatice" long_name="Ice category"       unit="1"               />
+      <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            />
+      <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            />
+    </axis_definition>
+ 
+    <domain_definition src="./domain_def_nemo.xml"/>
+  
+    <grid_definition src="./grid_def_nemo.xml"/>
+
+ </context>
+  
+ <context id="1_nemo" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="DEF_SHARED/field_def_nemo-oce.xml"/>
+    <field_definition src="DEF_SHARED/field_def_nemo-ice.xml"/>
+    <field_definition src="DEF_SHARED/field_def_nemo-pisces.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files -->
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
+      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE."/>  <!-- 5d files -->  
+      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    <axis_definition>
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"                 />
+      <axis id="icbcla"  long_name="Iceberg class"      unit="1"               />
+      <axis id="ncatice" long_name="Ice category"       unit="1"               />
+      <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            />
+      <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            />
+    </axis_definition>
+ 
+    <domain_definition src="./domain_def_nemo.xml"/>
+  
+    <grid_definition src="./grid_def_nemo.xml"/>
+    
+  </context>
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
+-->
+	  <variable id="info_level"                type="int">0</variable>
+	  <variable id="using_server"              type="bool">false</variable>
+	  <variable id="using_oasis"               type="bool">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+</simulation>
Index: utils/CI/r12931_sette_ticket2366/param.cfg
===================================================================
--- utils/CI/r12931_sette_ticket2366/param.cfg	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/param.cfg	(revision 13118)
@@ -0,0 +1,81 @@
+# Computer/user dependant variable needed to run sette
+#
+# REFERENCE run.stat tracer.stat you want to compare with
+# (if no change to the default, no check on result change will be done)
+NEMO_VALIDATION_REF=/path/to/reference/sette/results
+NEMO_REV_REF=0000
+#
+# ------------------------------------------------------------------------------------------
+# IMPORTANT:
+# variables (COMPILER, USING_XIOS, USING_MPMD, BATCH_CMD, BATCH_STAT, BATCH_NAME, FORCING_DIR, SVN_CMD, ADD_NOSIGNEDZERO)
+# can be exported from your shell startup files. 
+# If it is the case, nothing to do
+# otherwise, you need to update the default initialisation
+#
+# ADVISE: setup the default value in your startup file if it doesn't fit your need for at least
+# SETTE_COMPILER, SETTE_BATCH_CMD, SETTE_BATCH_STAT, SETTE_BATCH_NAME, SETTE_FORCING_DIR, 
+#
+# ------------------------------------------------------------------------------------------
+# COMPILER setting
+# Compiler among those in NEMOGCM/ARCH
+COMPILER=${SETTE_COMPILER:-XXXXXXXX}
+# ------------------------------------------------------------------------------------------
+#
+# BATCH command
+# command to submit a job
+BATCH_CMD=${SETTE_BATCH_CMD:-llsubmit}
+# command to check job status
+BATCH_STAT=${SETTE_BATCH_STAT:-llq}
+# generic sette job name (as it appears with $BATCH_STAT command)
+BATCH_NAME=${SETTE_BATCH_NAME:-sette}
+# ------------------------------------------------------------------------------------------
+#
+# FILES STORING paths
+# forcing files storing
+FORCING_DIR=${SETTE_FORCING_DIR:-$WORKDIR/FORCING}
+# validation files storing
+NEMO_VALIDATION_DIR=${SETTE_NEMO_VALIDATION_DIR:-$MAIN_DIR}/NEMO_VALIDATION
+# input files storing (namelist, iodef ...) (DO NOT CHANGE)
+INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
+# ------------------------------------------------------------------------------------------
+#
+# RUN set up
+# USING_XIOS        : flag to control the activation of key_iomput
+#                      "yes" to compile using key_iomput and link to the external XIOS library
+#                      "no"  to compile without key_iomput and link to the old IOIPSL library
+USING_XIOS=${SETTE_XIOS:-"yes"}
+# USING_MPMD        : flag to control the use of stand-alone IO servers
+#                     requires USING_XIOS="yes"
+#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers
+#                      "no"  to run in SPMD (attached) mode without separate IO servers 
+# MPMD
+USING_MPMD=${SETTE_MPMD:-"no"}
+# generique batch scrip prefix name if MPMD set to true/false
+JOB_PREFIX_MPMD=${SETTE_JOB_PREFIX_MPMD:-batch-mpmd}
+JOB_PREFIX_NOMPMD=${SETTE_JOB_PREFIX_NOMPMD:-batch}
+# ------------------------------------------------------------------------------------------
+#
+# MISCELENIOUS
+# command for svn (some people use git svn) 
+# used in sette_rpt and in all_function to display revision and build correct repository name
+SVN_CMD=${SETTE_SVN_CMD:-svn}
+# add key key_nosignedzero at the compilation step
+ADD_NOSIGNEDZERO=${SETTE_ADD_NOSIGNEDZERO:-"yes"}
+# only for IBM
+#TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
+# cleaning CFG_ST
+CLEAN_CONFIGS=${SETTE_CLEAN_CONFIGS:-"no"}
+# synchronisation MY_SRC and EXP00 of CFG_ST with MY_SRC and EXPREF form CFG
+SYNC_CONFIGS=${SETTE_SYNC_CONFIGS:-"no"}
+# langage (only en_US supported). This is used to grep information form linux/svn command.
+LC_MESSAGES=en_US
+# ------------------------------------------------------------------------------------------
+#
+# LIST OF CONFIGURATIONS
+# to be updated if you added an new configuration in sette_test-cases.sh or sette_reference-configuration.sh
+TEST_CONFIGS=${SETTE_TEST_CONFIGS:-"ORCA2_ICE_PISCES ORCA2_OFF_PISCES AMM12 AGRIF SPITZ12 GYRE_PISCES SAS ORCA2_ICE_OBS ICE_AGRIF OVERFLOW LOCK_EXCHANGE VORTEX ISOMIP"}
+# ------------------------------------------------------------------------------------------
+#
+# reporting  
+# Set number of passes (default only 1). For a second pass, set '0 1'
+RPT_PASSES=${SETTE_RPT_NPASSES:-'0'} 
Index: utils/CI/r12931_sette_ticket2366/prepare_exe_dir.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/prepare_exe_dir.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/prepare_exe_dir.sh	(revision 13118)
@@ -0,0 +1,82 @@
+#!/bin/bash
+##########################################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# ----------------------------------------------------------------------
+# NEMO/SETTE , NEMO Consortium (2010)
+# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+# ----------------------------------------------------------------------
+#
+# Some scripts called by sette.sh
+# prepare_exe_dir.sh : script prepares execution directory for test
+##########################################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==================
+# prepare_exe_dir.sh
+# ==================
+#
+# ----------------------------------------------
+# Set of functions used by sette.sh (NEMO tests) 
+# ----------------------------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ ./prepare_exe_dir.sh
+#
+# DESCRIPTION
+# ===========
+#
+# prepare_exe_dir.sh creates execution directory takes name of TEST_NAME defined in every test in sette.sh
+# 
+# it is necessary to define in sette.sh TEST_NAME ( example : export TEST_NAME="LONG") to create execution directory in where run test.
+#
+# NOTE : each test has to run in its own directory ( of execution), if not existing files are re-written (for example namelist)
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./prepare_exe_dir.sh
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: $
+#
+#   * creation
+#-
+
+
+cd ${CONFIG_DIR}
+mkdir -p ${NEW_CONF}/${TEST_NAME}
+
+# PREPARE EXEC_DIR
+#==================
+export EXE_DIR=${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}
+
+cp -RL ${CONFIG_DIR}/${NEW_CONF}/EXP00/* ${EXE_DIR}/.
+#cat ${SETTE_DIR}/iodef_sette.xml | sed -e"s;DEF_SHARED;${CONFIG_DIR0}/SHARED;" > ${EXE_DIR}/iodef.xml
+cd ${EXE_DIR}
+
+# Remove previously generated output files used for test evaluation
+# (if any)
+[ -f ./ocean.output ] && mv ./ocean.output ./ocean.output.old
+[ -f ./run.stat ]     && mv ./run.stat     ./run.stat.old
+[ -f ./tracer.stat ]  && mv ./tracer.stat  ./tracer.stat.old
Index: utils/CI/r12931_sette_ticket2366/prepare_job.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/prepare_job.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/prepare_job.sh	(revision 13118)
@@ -0,0 +1,320 @@
+#####################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# ----------------------------------------------------------------------
+# NEMO/SETTE , NEMO Consortium (2010)
+# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+# ----------------------------------------------------------------------
+#
+# Some scripts called by sette.sh
+# prepare_job.sh   : creates the job script for running job 
+######################################################
+#set -vx
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# prepare_job.sh
+# ================
+#
+# -------------------------------------------------
+# script that creates the job script for NEMO tests 
+# -------------------------------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE
+#
+#
+# DESCRIPTION
+# ===========
+#
+# Part of the SETTE package to run tests for NEMO
+# 
+# prepare the script $JOB_FILE to run the tests 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG $JOB_FILE
+#
+# prepare the $JOB_FILE for execution 
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: prepare_job.sh 3050 2011-11-07 14:11:34Z acc $
+#
+#
+#
+#   * creation
+#
+#-
+#
+
+usage=" Usage : ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE NUM_XIO_SERVERS"
+usage=" example : ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg 8 SHORT no/yes $JOB_FILE 0 2"
+
+
+minargcount=6
+        if [ ${#} -lt ${minargcount} ]
+        then
+                echo "not enough arguments for prepare_job.sh script"
+                echo "control number of argument of prepare_job.sh in sette.sh"
+                echo "${usage}"
+        exit 1
+        fi
+        unset minargcount
+	if [ ! -f ${SETTE_DIR}/output.sette ] ; then
+	        touch ${SETTE_DIR}/output.sette
+	fi
+       
+#
+# set and export TEST_NAME. It will be used within the post_test_tidyup function
+#
+INPUTARFILE=$1
+NB_PROC=$2
+TEST_NAME=$3
+MPI_FLAG=$4
+JOB_FILE=$5
+NXIO_PROC=$6
+NEMO_VALID=$7
+
+# export EXE_DIR. This directory is used to execute model 
+#
+#
+#
+echo "date: `date`" >> ${SETTE_DIR}/output.sette
+echo "" >> ${SETTE_DIR}/output.sette
+echo "running config: ${NEW_CONF}" >> ${SETTE_DIR}/output.sette
+echo "" >> ${SETTE_DIR}/output.sette
+echo "list of cpp_keys: " >> ${SETTE_DIR}/output.sette
+echo "`more ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm`" >> ${SETTE_DIR}/output.sette 
+echo "" >> ${SETTE_DIR}/output.sette
+echo "compiling with: ${CMP_NAM}" >> ${SETTE_DIR}/output.sette
+echo "" >> ${SETTE_DIR}/output.sette
+echo "executing script : \"fcm_job $@\" " >> ${SETTE_DIR}/output.sette
+echo "            " >> ${SETTE_DIR}/output.sette
+
+################################################################
+# SET INPUT 
+# get the input tarfile if needed
+if [ "$(cat ${SETTE_DIR}/$INPUTARFILE | wc -w)" -ne 0 ] ; then
+   echo "looking for input files in ${SETTE_DIR}/$INPUTARFILE " >> ${SETTE_DIR}/output.sette
+# number of tarfiles: NBTAR
+   NBTAR=`cat ${SETTE_DIR}/$INPUTARFILE |wc -l` 
+   echo "NB of tarfiles ${NBTAR} " >> ${SETTE_DIR}/output.sette
+# loop on tarfiles
+# read file name and directory
+while read tar_file dir_conf_forc 
+do
+      echo looking for tarfile ${tar_file} and directory ${FORCING_DIR}/${dir_conf_forc} ; echo looking for tarfile ${tar_file} and directory ${FORCING_DIR}/${dir_conf_forc} >> ${SETTE_DIR}/output.sette
+      if [ -f ${FORCING_DIR}/${tar_file} ] && [ -d ${FORCING_DIR}/${dir_conf_forc} ] ; then
+# Tarfile and input dir ar there, only check the links
+         echo "Tarfile and input dir ar there, only check the links" >> ${SETTE_DIR}/output.sette
+# extract tarfile
+      else 
+
+if [ ! -f ${FORCING_DIR}/${tar_file} ] ; then  
+     echo "tarfile  ${FORCING_DIR}/${tar_file} cannot be found we stop " ; exit 2 ; fi 
+
+echo "mkdir ${FORCING_DIR}/${dir_conf_forc}" >> ${SETTE_DIR}/output.sette
+         mkdir ${FORCING_DIR}/${dir_conf_forc}  
+         cd    ${FORCING_DIR}/${dir_conf_forc}
+echo " extract from tarfile ${FORCING_DIR}/${tar_file} in  ${FORCING_DIR}/${dir_conf_forc}" >> ${SETTE_DIR}/output.sette
+         tar xvof ${FORCING_DIR}/${tar_file} ; gunzip -f `find . -name "*.gz"` 
+      fi
+# Tarfile and input dir ar there, only check the links
+      cd ${FORCING_DIR}/${dir_conf_forc}
+      for fida in *
+         do
+           [ -f ${EXE_DIR}/${fida} ] || ln -s ${FORCING_DIR}/${dir_conf_forc}/${fida} ${EXE_DIR}/${fida}
+         done
+    done < ${SETTE_DIR}/$INPUTARFILE
+
+else
+  echo "no input file to be searched "
+fi
+################################################################
+
+################################################################
+# RUN OPA
+cd ${EXE_DIR}
+if [ ! -r ${EXE_DIR}/nemo ]
+    then
+    echo "executable nemo does not exist"
+    echo "executable nemo does not exist, exit"  >> ${SETTE_DIR}/output.sette
+    exit 1
+fi
+
+# example for NOCS ClusterVision system using SLURM batch submission (requires ${SETTE_DIR}/sette_batch_template file)
+#
+  #  if [ ${MPI_FLAG} == "no" ] ; then
+		case ${COMPILER} in 
+			X64_MOBILIS)
+                                NB_REM=$( echo $NB_PROC $NXIO_PROC | awk '{print ( $1 + $2 ) % 16}')
+		        	if [ ${NB_REM} == 0 ] ; then
+					# number of processes required is an integer multiple of 16
+					#
+					NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{print ($1 + $2 ) / 16}')
+				else
+					#
+					# number of processes required is not an integer multiple of 16
+					# round up the number of nodes required.
+					#
+					NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{printf("%d",($1 + $2 ) / 16 + 1 )}')
+	       			fi
+				;;
+                        XC_ARCHER_INTEL)
+                                # ocean cores are packed 24 to a node
+                                NB_REM=$( echo $NB_PROC | awk '{print ( $1 % 24 ) }')
+                                if [ ${NB_REM} == 0 ] ; then
+                                        # number of processes required is an integer multiple of 24
+                                        #
+                                        NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{print ($1) / 24}')
+                                else
+                                        #
+                                        # number of processes required is not an integer multiple of 24
+                                        # round up the number of nodes required.
+                                        #
+                                        NB_NODES=$( echo $NB_PROC | awk '{printf("%d",($1) / 24 + 1 )}')
+                                fi
+                                # xios cores are sparsely packed at 4 to a node
+                                # but can not share nodes with the ocean cores
+                                NB_REM=$( echo $NXIO_PROC | awk '{print ( $2 % 4 ) }')
+                                if [ ${NB_REM} == 0 ] ; then
+                                        # number of processes required is an integer multiple of 4                           
+                                        #
+                                        NB_NODES=$( echo $NB_NODES $NXIO_PROC | awk '{print ($1 + ( $2 / 4 ))}')                    
+                                else
+                                        #
+                                        # number of processes required is not an integer multiple of 4                             
+                                        # round up the number of nodes required.
+                                        #
+                                        NB_NODES=$( echo $NB_NODES $NXIO_PROC | awk '{print ($1 + ( $2 / 4 ) + 1)}') 
+                                fi
+                                ;;
+                        XC40_METO*) #Setup for Met Office XC40 with any compiler
+                                # ocean cores are packed 32 to a node
+                                # If we need more than one node then have to use parallel queue and XIOS must have a node to itself
+                                NB_REM=$( echo $NB_PROC | awk '{print ( $1 % 32 ) }')
+                                if [ ${NB_REM} == 0 ] ; then
+                                        # number of processes required is an integer multiple of 32
+                                        #
+                                        NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{print ($1) / 32}')
+                                else
+                                        #
+                                        # number of processes required is not an integer multiple of 32
+                                        # round up the number of nodes required.
+                                        #
+                                        NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{printf("%d",($1) / 32 + 1 )}')
+                                fi
+                                # xios cores are sparsely packed at 4 to a node
+                                if [ $NXIO_PROC == 0 ] ; then
+                                    NB_XNODES=0
+                                else
+                                    NB_REM=$( echo $NXIO_PROC | awk '{print ( $1 % 4 ) }')
+                                    if [ ${NB_REM} == 0 ] ; then
+                                            # number of processes required is an integer multiple of 4                           
+                                            #
+                                            NB_XNODES=$( echo $NXIO_PROC | awk '{print (( $1 / 4 ) + 1)}') 
+                                    else
+                                            #
+                                            # number of processes required is not an integer multiple of 4                             
+                                            # round up the number of nodes required.
+                                            #
+                                            NB_XNODES=$( echo $NXIO_PROC | awk '{printf("%d",($1) / 4 + 1) }')                    
+                                    fi
+                                fi
+                                if [ ${NB_XNODES} -ge 1 ] ; then
+                                   NB_NODES=$((NB_NODES+NB_XNODES))
+                                fi
+                                echo NB_XNODES=${NB_XNODES} 
+                                echo Total NB_NODES=${NB_NODES}
+                                QUEUE=normal
+                                SELECT="select=$NB_NODES"
+                                module unload cray-snplauncher #Make sure snplauncher module is not loaded
+                                ;;
+                        X64_JEANZAY*) #Setup for Jean-Zay
+                                export GROUP_IDRIS=`echo ${USER} |cut -c 2-4`
+                                ;;
+                        openmpi_KARA_MERCATOR*)
+                                NB_PROC_NODE=32
+                                NB_NODES=$( echo $NB_PROC | awk '{print $1 - $1 % $NB_PROC_NODE }' | awk '{print $1 / $NB_PROC_NODE }' )
+                                if [ ${NB_PROC} -le 128 ] ; then
+                                      QUEUE=multi
+                                fi
+                                ;;
+                        ifort_beaufix_sette*)
+                                NB_PROC_NODE=40
+                                NB_NODES=$( echo $NB_PROC | awk '{print $1 - $1 % $NB_PROC_NODE }' | awk '{print $1 / $NB_PROC_NODE }' )
+                                ;;
+			*)
+				NB_NODES=${NB_PROC}
+				;;
+		esac
+#
+# Pass settings into job file by using sed to edit predefined strings
+#
+        TOTAL_NPROCS=$(( $NB_PROC + $NXIO_PROC ))
+        cat ${SETTE_DIR}/job_batch_template | sed -e"s/\(=\| \)NODES/\1${NB_NODES}/" \
+             -e"s/TOTAL_NPROCS/${TOTAL_NPROCS}/" \
+             -e"s/NPROCS/${NB_PROC}/" \
+             -e"s/NXIOPROCS/${NXIO_PROC}/" \
+             -e"s:DEF_SETTE_DIR:${SETTE_DIR}:" -e"s:DEF_INPUT_DIR:${INPUT_DIR}:" \
+             -e"s:DEF_EXE_DIR:${EXE_DIR}:" \
+             -e"s:DEF_CONFIG_DIR:${CONFIG_DIR}:" \
+             -e"s:DEF_TOOLS_DIR:${TOOLS_DIR}:" \
+             -e"s:MPI_FLAG:${MPI_FLAG}:" \
+             -e"s:DEF_NEMO_VALIDATION:${NEMO_VALID}:" -e"s:DEF_NEW_CONF:${NEW_CONF}:" \
+             -e"s:DEF_CMP_NAM:${CMP_NAM}:" -e"s:DEF_TEST_NAME:${TEST_NAME}:" > run_sette_test.job
+
+        case ${COMPILER} in
+              openmpi_KARA_MERCATOR_XIOS )
+                    cat run_sette_test.job | sed -e"s/NPROC_NODE/${NB_PROC_NODE}/" \
+                                                 -e"s:QUEUE:${QUEUE}:" > run_sette_test1.job
+                    mv run_sette_test1.job run_sette_test.job
+                    ;;
+              XC40_METO*)
+                    cat run_sette_test.job | sed -e"s/SELECT/${SELECT}/" > run_sette_test1.job
+                    mv run_sette_test1.job run_sette_test.job
+                    ;;
+              X64_JEANZAY*)
+                    cat run_sette_test.job | sed -e"s/GROUP_IDRIS/${GROUP_IDRIS}/" > run_sette_test1.job
+                    mv run_sette_test1.job run_sette_test.job
+                    ;;
+	esac
+#
+# create the unique submission job script
+#
+	if [ ! -f $JOB_FILE ] ; then
+		mv run_sette_test.job $JOB_FILE
+	else
+	    e=`grep -n "# END_BODY" ${JOB_FILE} | cut -d : -f 1`
+            e=$(($e - 1))
+	    head -$e $JOB_FILE > ${JOB_FILE}_new 
+	    mv ${JOB_FILE}_new ${JOB_FILE}
+	    l=`wc -l run_sette_test.job | sed -e "s:run_sette_test.job::"`
+	    b=`grep -n "# BODY" run_sette_test.job | cut -d : -f 1`
+	    t=$(($l - $b))
+	    tail -$t run_sette_test.job >> $JOB_FILE
+	fi
+	
+	chmod a+x $JOB_FILE ; echo "$JOB_FILE is ready"
+
+#fi
Index: utils/CI/r12931_sette_ticket2366/sette.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/sette.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/sette.sh	(revision 13118)
@@ -0,0 +1,79 @@
+#!/bin/sh
+# initialise user dependent variable
+SETTE_DIR=$(cd $(dirname "$0"); pwd)
+MAIN_DIR=$(dirname $SETTE_DIR)
+
+# Parse command-line arguments
+if [ $# -gt 0 ]; then
+  while getopts t:csh option; do 
+     case $option in
+        c) export SETTE_CLEAN_CONFIGS='yes'
+           export SETTE_SYNC_CONFIGS='yes'
+           echo ""
+           echo "Configuration $SETTE_TEST_CONFIGS will be cleaned; this option enforces also synchronisation"
+           echo "";;
+        s) export SETTE_SYNC_CONFIGS='yes'
+           echo ""
+           echo "MY_SRC and EXP00 in $SETTE_TEST_CONFIGS will be synchronised with the MY_SRC and EXPREF from the reference configuration"
+           echo "";;
+        t) export SETTE_TEST_CONFIGS=$OPTARG
+           echo ""
+           echo "Configuration $SETTE_TEST_CONFIGS will be tested if they are available"
+           echo "" ;;
+        h | *) echo 'sette.sh allows no arguments (in this case all configuration will be tested)'
+               echo '-t "CFG1_to_test CFG2_to_test ..." to test some specific configurations'
+               echo '-c to clean each configuration'
+               echo '-s to synchronise the sette MY_SRC and EXP00 with the reference MY_SRC and EXPREF'; exit 42 ;;
+     esac
+  done
+  shift $((OPTIND - 1))
+fi
+
+. ./param.cfg
+
+# run sette on reference configuration
+./sette_reference-configurations.sh
+if [[ $? != 0 ]]; then
+   echo ""
+   echo "--------------------------------------------------------------"
+   echo "./sette_cfg-ref.sh didn't finish properly, need investigations"
+   echo "--------------------------------------------------------------"
+   echo ""
+   exit 42
+fi
+
+# run sette on test cases
+./sette_test-cases.sh
+if [[ $? != 0 ]]; then
+   echo ""
+   echo "-----------------------------------------------------------------"
+   echo "./sette_test-cases.sh didn't finish properly, need investigations"
+   echo "-----------------------------------------------------------------"
+   echo ""
+   exit 42
+fi
+
+# run sette report
+echo ""
+echo "-------------------------------------------------------------"
+echo "./sette_rpt.sh (script will wait all nemo_sette run are done)"
+echo "-------------------------------------------------------------"
+echo ""
+NRUN=999
+NIT=0
+while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do
+   nit=$((nit+1))
+   NRUN=$( ${BATCH_STAT} | grep ${BATCH_NAME} | wc -l ) 
+   if [[ $NRUN -ne 0 ]]; then 
+      printf "%-3d %s\r" $NRUN 'nemo_sette runs still in queue or running ...';
+   else
+      printf "%-50s\n" " "
+      ./sette_rpt.sh
+      exit
+   fi
+   sleep 10
+done
+printf "\n"
+echo ""
+echo "Something wrong happened, it tooks more than 3 hours to run all the sette tests"
+echo ""
Index: utils/CI/r12931_sette_ticket2366/sette_list_avail_cfg.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/sette_list_avail_cfg.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/sette_list_avail_cfg.sh	(revision 13118)
@@ -0,0 +1,19 @@
+#!/bin/sh
+echo ''
+echo 'Reference configurations available are named :'
+printf "%-15s \n" GYRE_PISCES
+printf "%-15s \n" ORCA2_ICE_PISCES
+printf "%-15s \n" ORCA2_OFF_PISCES
+printf "%-15s \n" AMM12
+printf "%-15s \n" SAS
+printf "%-15s \n" ORCA2_ICE_OBS
+printf "%-15s \n" AGRIF
+printf "%-15s \n" SPITZ12
+echo ''
+echo 'Test cases available are named :'
+printf "%-15s \n" OVERFLOW
+printf "%-15s \n" LOCK_EXCHANGE
+printf "%-15s \n" VORTEX
+printf "%-15s \n" ICE_AGRIF
+printf "%-15s \n" ISOMIP
+echo ''
Index: utils/CI/r12931_sette_ticket2366/sette_list_avail_rev.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/sette_list_avail_rev.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/sette_list_avail_rev.sh	(revision 13118)
@@ -0,0 +1,84 @@
+#!/bin/bash -f
+# set -vx
+
+SETTE_DIR=$(cd $(dirname "$0"); pwd)
+MAIN_DIR=$(dirname $SETTE_DIR)
+
+. ./param.cfg
+
+if [ $# -gt 0 ]; then
+  while getopts c:h option; do 
+     case $option in
+        c) COMPILER=$OPTARG;;
+        h | *) echo ''
+               echo 'sette_list_avail_rev.sh : ' 
+               echo '     list all sette directory and available revisions created with the compiler specified in param.cfg or in the startup file)'
+               echo '-c COMPILER_name :'
+               echo '     list all sette directory and available revisions created with the compiler specified'
+               echo ''
+               exit 42;;
+     esac
+  done
+  shift $((OPTIND - 1))
+fi
+
+#
+lst_rev () {
+    # get the list of revision available for a configuration
+    if [ ! -d $1 ] ; then 
+       CFGLST=-9999
+    else
+       CFGLST=`ls $1 | sort -u -r ` 
+    fi
+    # config name
+    CONFIG=$2
+    # list of all revision available
+    ALLLST=${@:3}
+    # number of revision total and for CONFIG
+    nrevall=`echo $ALLLST | wc -w`
+    nrevcfg=`echo $CFGLST | wc -w`
+    # display
+    echo ""
+    printf "%-27s : " $CONFIG
+    irev=1
+    irevcfg=1
+    while [[ $irev -le $nrevall ]] ; do
+       rev=`echo $ALLLST | cut -d\  -f ${irev}`
+       cfgrev=`echo $CFGLST | cut -d\  -f ${irevcfg}`
+       if [ -z $cfgrev ] ; then cfgrev=-9999 ; fi
+       if [ $cfgrev == $rev ] ; then
+          printf "%-6s  " $rev
+          irevcfg=$((irevcfg+1))
+       else
+          printf "%-5s  " "***** " 
+       fi
+       irev=$((irev+1))
+    done
+}
+
+
+  NEMO_VALID=${NEMO_VALIDATION_DIR}/
+ 
+ # list of all revision available
+ DIRLST=`find ${NEMO_VALID} -maxdepth 3 -mindepth 3 -type d -regex ".*\/W.*\/${COMPILER}\/.*" | sed -e "s/.*\/W.*\/${COMPILER}\///" | sort -u -r`
+
+ # display header
+ echo ""
+ echo " Compiler used is : $COMPILER"
+ echo ""
+ printf " List of all avail. rev. is : "
+ for dir in `echo $DIRLST`; do printf "%-6s  " $dir ; done
+ printf "\n"
+
+ # start checking configuration revision
+ echo ""
+ echo "   !---- check revision available for each configuration ----!   "
+ for CONFIG in WGYRE_PISCES_ST WORCA2_ICE_PISCES_ST WORCA2_OFF_PISCES_ST WAMM12_ST WORCA2_SAS_ICE_ST WAGRIF_DEMO_ST WSPITZ12_ST WISOMIP_ST WOVERFLOW_ST WLOCK_EXCHANGE_ST WVORTEX_ST WICE_AGRIF_ST 
+ do
+    DIR=${NEMO_VALIDATION_DIR}/${CONFIG}/${COMPILER}
+    lst_rev $DIR $CONFIG $DIRLST
+ done
+ printf "\n"
+ printf "\n"
+#
+exit
Index: utils/CI/r12931_sette_ticket2366/sette_reference-configurations.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/sette_reference-configurations.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/sette_reference-configurations.sh	(revision 13118)
@@ -0,0 +1,1473 @@
+#!/bin/bash
+############################################################
+# Author : Simona Flavoni for NEMO
+# Contact: sflod@locean-ipsl.upmc.fr
+# 2013   : A.C. Coward added options for testing with XIOS in dettached mode
+#
+# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
+# ----------------------------------------------------------------------
+# NEMO/SETTE , NEMO Consortium (2010)
+# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+# ----------------------------------------------------------------------
+#
+#############################################################
+#set -vx
+set -o posix
+#set -u
+#set -e
+# ===========
+# DESCRIPTION
+# ===========
+#
+# Variables to be checked by user:
+#
+# COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory 
+# BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs
+# BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs  
+# INTERACT_FLAG     : flag to run in interactive mode "yes"
+#                           to run in batch mode "no"
+# MPIRUN_FLAG       : flag to run in parallel (MPI) "yes"
+#                           to run in sequential mode (NB_PROC = 1) "no"
+# USING_XIOS        : flag to control the activation of key_iomput
+#                      "yes" to compile using key_iomput and link to the external XIOS library
+#                      "no"  to compile without key_iomput and link to the old IOIPSL library
+# USING_MPMD        : flag to control the use of stand-alone IO servers
+#                     requires USING_XIOS="yes"
+#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers
+#                      "no"  to run in SPMD (attached) mode without separate IO servers 
+# NUM_XIOSERVERS    : number of stand-alone IO servers to employ
+#                     set to zero if USING_MPMD="no"
+#
+# Principal script is sette.sh, that calls 
+#
+#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe 
+#              and links to nemo in ${CONFIG_NAME}/EXP00)
+#
+#  param.cfg : sets and loads following directories:
+#
+#   FORCING_DIR         : is the directory for forcing files (tarfile)
+#   INPUT_DIR           : is the directory for input files storing 
+#   TMPDIR              : is the temporary directory (if needed)
+#   NEMO_VALIDATION_DIR : is the validation directory
+#
+#   (NOTE: this file is the same for all configrations to be tested with sette)
+#
+#   all_functions.sh : loads functions used by sette (note: new functions can be added here)
+#   set_namelist     : function declared in all_functions that sets namelist parameters 
+#   post_test_tidyup : creates validation storage directory and copies required output files 
+#                      (run.stat and ocean.output) in it after execution of test.
+#
+#  VALIDATION tree is:
+#
+#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
+#
+#  prepare_exe_dir.sh : defines and creates directory where the test is executed
+#                       execution directory takes name of TEST_NAME defined for every test 
+#                       in sette.sh. (each test in executed in its own directory)
+#
+#  set_valid_dir       : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report 
+#
+#  clean_valid_dir    : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report 
+#                       ( not doing it could lead to false positive )
+#
+#  prepare_job.sh     : to generate the script run_job.sh
+#
+#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes")
+#                        see sette.sh and BATCH_TEMPLATE directory
+#
+#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which 
+#        can be found paths to the input tar file)
+#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR} 
+#        directory
+#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists 
+#        remain in ${NEW_CONF}/EXP00
+# 
+#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of 
+#        executed commands
+#
+#  NOTE: if sette.sh is stopped in output.sette there is written the last command 
+#        executed by sette.sh
+#
+# example use: ./sette.sh 
+#########################################################################################
+#
+# LOAD param value
+SETTE_DIR=$(cd $(dirname "$0"); pwd)
+MAIN_DIR=$(dirname $SETTE_DIR)
+. ./param.cfg
+
+export BATCH_COMMAND_PAR=${BATCH_CMD}
+export BATCH_COMMAND_SEQ=${BATCH_CMD}
+export INTERACT_FLAG="no"
+export MPIRUN_FLAG="yes"
+export USING_ICEBERGS="yes"
+#
+export DEL_KEYS="key_iomput"
+if [ ${USING_XIOS} == "yes" ] 
+ then 
+   export DEL_KEYS=""
+fi
+#
+export ADD_KEYS=""
+if [ ${ADD_NOSIGNEDZERO} == "yes" ]
+ then
+   export ADD_KEYS="key_nosignedzero"
+fi
+#
+# Settings which control the use of stand alone servers (only relevant if using xios)
+#
+export NUM_XIOSERVERS=4
+export JOB_PREFIX=${JOB_PREFIX_MPMD}
+#
+if [ ${USING_MPMD} == "no" ] 
+ then
+   export NUM_XIOSERVERS=0
+   export JOB_PREFIX=${JOB_PREFIX_NOMPMD}
+fi
+#
+#
+if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no" ]
+ then
+   echo "Incompatible choices. MPMD mode requires the XIOS server"
+   exit
+fi
+
+# Directory to run the tests
+CONFIG_DIR0=${MAIN_DIR}/cfgs
+TOOLS_DIR=${MAIN_DIR}/tools
+
+CMP_NAM=${1:-$COMPILER}
+# Copy job_batch_COMPILER file for specific compiler into job_batch_template
+cd ${SETTE_DIR}
+cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
+# Description of available configurations:
+# GYRE_PISCES       :
+# ORCA2_ICE_PISCES  :
+# ORCA2_OFF_PISCES  :
+# AMM12             :
+# SAS               :
+# ORCA2_ICE_OBS     :
+# AGRIF             : test AGRIF in a double zoom configuration in the nordic seas + 1 zoom in the eq. Pacific (AGRIF_DEMO)
+#                       and check that key_agrif without zoom = no key_agrif
+# SPITZ12           : regional configuration including sea-ice and tides (Spitzbergen)
+
+for config in ${TEST_CONFIGS}
+do
+
+# -----------
+# GYRE_PISCES
+# -----------
+if [ ${config} == "GYRE_PISCES" ] ;  then
+## Restartability tests for GYRE_PISCES
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_config  GYRE_PISCES GYRE_PISCES_ST 'cfgs'
+    clean_config GYRE_PISCES GYRE_PISCES_ST 'cfgs'
+    #
+    . ./makenemo -m ${CMP_NAM} -n GYRE_PISCES_ST -r GYRE_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=8
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}  
+    set_namelist namelist_cfg cn_exp \"GYREPIS_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 1080
+    set_namelist namelist_cfg nn_stock  540
+    set_namelist namelist_cfg ln_linssh .true.
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"GYREPIS_SHORT\"
+    set_namelist namelist_cfg nn_it000 541
+    set_namelist namelist_cfg nn_itend 1080
+    set_namelist namelist_cfg nn_stock 540
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg ln_linssh .true.
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    set_namelist namelist_top_cfg ln_rsttr .true.
+    set_namelist namelist_top_cfg nn_rsttr 2
+    set_namelist namelist_cfg cn_ocerst_in \"GYREPIS_LONG_00000540_restart\"
+    set_namelist namelist_top_cfg cn_trcrst_in \"GYREPIS_LONG_00000540_restart_trc\"
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/GYREPIS_LONG_00000540_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/GYREPIS_LONG_00000540_restart_trc_${L_NPROC}.nc .
+    done
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+## Reproducibility tests for GYRE_PISCES
+    export TEST_NAME="REPRO_2_4"
+    cd ${MAIN_DIR}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=8
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"GYREPIS_48\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 1080
+    set_namelist namelist_cfg ln_linssh .true.
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_4_2"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=8
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"GYREPIS_84\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 1080
+    set_namelist namelist_cfg ln_linssh .true.
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 2
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+fi
+
+# -----------------
+# ORCA2_ICE_PISCES
+# -----------------
+if [ ${config} == "ORCA2_ICE_PISCES" ] ;  then
+## Restartability tests for ORCA2_ICE_PISCES
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_config  ORCA2_ICE_PISCES ORCA2_ICE_PISCES_ST 'cfgs'
+    clean_config ORCA2_ICE_PISCES ORCA2_ICE_PISCES_ST 'cfgs'
+    #
+    . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_PISCES_ST -r ORCA2_ICE_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"O2L3P_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 992
+    set_namelist namelist_cfg nn_stock 496
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    set_namelist namelist_cfg ln_use_calving .true.
+    set_namelist namelist_cfg ln_wave .true.
+    set_namelist namelist_cfg ln_cdgw .true.
+    set_namelist namelist_cfg ln_sdw  .true.
+    set_namelist namelist_cfg nn_sdrift 1
+    set_namelist namelist_cfg ln_stcor .true.
+    set_namelist namelist_cfg ln_tauwoc .true.
+    #
+    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
+    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
+    #
+    set_namelist namelist_ice_cfg ln_icediachk .true.
+    set_namelist namelist_top_cfg ln_trcdta .false.
+    set_namelist namelist_top_cfg ln_trcbc  .false.
+    # put ln_ironsed, ln_hydrofe to false
+    # if not you need input files, and for tests is not necessary
+    set_namelist namelist_pisces_cfg ln_varpar .false.
+    set_namelist namelist_pisces_cfg ln_ironsed .false.
+    set_namelist namelist_pisces_cfg ln_ironice .false.
+    set_namelist namelist_pisces_cfg ln_hydrofe .false.
+    # put ln_pisdmp to false : no restoring to global mean value
+    set_namelist namelist_pisces_cfg ln_pisdmp .false.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
+    set_namelist namelist_cfg nn_it000 497
+    set_namelist namelist_cfg nn_itend 992
+    set_namelist namelist_cfg nn_stock 496
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    set_namelist namelist_cfg nn_test_icebergs -1
+    set_namelist namelist_cfg ln_wave .true.
+    set_namelist namelist_cfg ln_cdgw .true.
+    set_namelist namelist_cfg ln_sdw  .true.
+    set_namelist namelist_cfg nn_sdrift 1
+    set_namelist namelist_cfg ln_stcor .true.
+    set_namelist namelist_cfg ln_tauwoc .true.
+    #
+    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
+    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
+    #
+    set_namelist namelist_ice_cfg ln_icediachk .true.
+    set_namelist namelist_top_cfg ln_rsttr .true.
+    set_namelist namelist_top_cfg nn_rsttr 2
+    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000496_restart\"
+    set_namelist namelist_cfg cn_icbrst_in \"O2L3P_LONG_00000496_restart_icb\"
+    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000496_restart_trc\"
+    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000496_restart_ice\"
+    set_namelist namelist_top_cfg ln_trcbc  .false.
+    # put ln_ironsed, ln_hydrofe to false
+    # if not you need input files, and for tests is not necessary
+    set_namelist namelist_pisces_cfg ln_varpar .false.
+    set_namelist namelist_pisces_cfg ln_ironsed .false.
+    set_namelist namelist_pisces_cfg ln_ironice .false.
+    set_namelist namelist_pisces_cfg ln_hydrofe .false.
+    # put ln_pisdmp to false : no restoring to global mean value
+    set_namelist namelist_pisces_cfg ln_pisdmp .false.
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/O2L3P_LONG_00000496_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/O2L3P_LONG_00000496_restart_trc_${L_NPROC}.nc .
+        ln -sf ../LONG/O2L3P_LONG_00000496_restart_ice_${L_NPROC}.nc .
+        if [ ${USING_ICEBERGS} == "yes" ]
+            then
+             ln -sf ../LONG/O2L3P_LONG_00000496_restart_icb_${L_NPROC}.nc O2L3P_LONG_00000496_restart_icb_${L_NPROC}.nc
+        fi
+    done
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+## Reproducibility tests for ORCA2_ICE_PISCES
+    export TEST_NAME="REPRO_4_8"
+    cd ${MAIN_DIR}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"O2L3P_48\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 992
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    set_namelist namelist_cfg ln_wave .true.
+    set_namelist namelist_cfg ln_cdgw .true.
+    set_namelist namelist_cfg ln_sdw  .true.
+    set_namelist namelist_cfg nn_sdrift 1
+    set_namelist namelist_cfg ln_stcor .true.
+    set_namelist namelist_cfg ln_tauwoc .true.
+
+    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
+    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
+
+    set_namelist namelist_top_cfg ln_trcdta .false.
+    set_namelist namelist_top_cfg ln_trcbc  .false.
+    # put ln_ironsed, ln_hydrofe to false
+    # if not you need input files, and for tests is not necessary
+    set_namelist namelist_pisces_cfg ln_varpar .false.
+    set_namelist namelist_pisces_cfg ln_ironsed .false.
+    set_namelist namelist_pisces_cfg ln_ironice .false.
+    set_namelist namelist_pisces_cfg ln_hydrofe .false.
+    # put ln_pisdmp to false : no restoring to global mean value
+    set_namelist namelist_pisces_cfg ln_pisdmp .false.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_8_4"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"O2L3P_84\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 992
+    set_namelist namelist_cfg jpni 8
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    set_namelist namelist_cfg ln_wave .true.
+    set_namelist namelist_cfg ln_cdgw .true.
+    set_namelist namelist_cfg ln_sdw  .true.
+    set_namelist namelist_cfg nn_sdrift 1
+    set_namelist namelist_cfg ln_stcor .true.
+    set_namelist namelist_cfg ln_tauwoc .true.
+
+    if [ ${USING_ICEBERGS} == "no" ] ; then set_namelist namelist_cfg ln_icebergs .false. ; fi
+    # for debugging purposes set_namelist namelist_cfg rn_test_box -180.0, 180.0, -90.0, -55.0
+
+    set_namelist namelist_top_cfg ln_trcdta .false.
+    set_namelist namelist_top_cfg ln_trcbc  .false.
+    # put ln_ironsed, ln_hydrofe to false
+    # if not you need input files, and for tests is not necessary
+    set_namelist namelist_pisces_cfg ln_varpar .false.
+    set_namelist namelist_pisces_cfg ln_ironsed .false.
+    set_namelist namelist_pisces_cfg ln_ironice .false.
+    set_namelist namelist_pisces_cfg ln_hydrofe .false.
+    # put ln_pisdmp to false : no restoring to global mean value
+    set_namelist namelist_pisces_cfg ln_pisdmp .false.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_ICE_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+fi
+
+# ----------------
+# ORCA2_OFF_PISCES
+# ----------------
+if [ ${config} == "ORCA2_OFF_PISCES" ] ;  then
+## Restartability tests for ORCA2_OFF_PISCES
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_config  ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST 'cfgs'
+    clean_config ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST 'cfgs'
+    #
+    . ./makenemo -m ${CMP_NAM} -n ORCA2_OFF_PISCES_ST -r ORCA2_OFF_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 380
+    set_namelist namelist_cfg nn_stock 190
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    set_namelist namelist_cfg ln_qsr_rgb .true.
+    set_namelist namelist_top_cfg ln_trcdta .false.
+    set_namelist namelist_top_cfg ln_trcbc  .false.
+    # put ln_ironsed, ln_hydrofe to false
+    # if not you need input files, and for tests is not necessary
+    set_namelist namelist_pisces_cfg ln_varpar .false.
+    set_namelist namelist_pisces_cfg ln_ironsed .false.
+    set_namelist namelist_pisces_cfg ln_ironice .false.
+    set_namelist namelist_pisces_cfg ln_hydrofe .false.
+    # put ln_pisdmp to false : no restoring to global mean value
+    set_namelist namelist_pisces_cfg ln_pisdmp .false.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
+    set_namelist namelist_cfg nn_it000 191
+    set_namelist namelist_cfg nn_itend 380
+    set_namelist namelist_cfg nn_stock 190
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    set_namelist namelist_cfg ln_qsr_rgb .true.
+    set_namelist namelist_top_cfg ln_rsttr .true.
+    set_namelist namelist_top_cfg nn_rsttr 2
+    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000190_restart_trc\"
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/OFFP_LONG_00000190_restart_trc_${L_NPROC}.nc .
+    done
+    set_namelist namelist_top_cfg ln_trcbc  .false.
+    # put ln_ironsed, ln_hydrofe to false
+    # if not you need input files, and for tests is not necessary
+    set_namelist namelist_pisces_cfg ln_varpar .false.
+    set_namelist namelist_pisces_cfg ln_ironsed .false.
+    set_namelist namelist_pisces_cfg ln_ironice .false.
+    set_namelist namelist_pisces_cfg ln_hydrofe .false.
+    # put ln_pisdmp to false : no restoring to global mean value
+    set_namelist namelist_pisces_cfg ln_pisdmp .false.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+## Reproducibility tests for ORCA2_OFF_PISCES
+    export TEST_NAME="REPRO_4_8"
+    cd ${MAIN_DIR}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"OFFP_48\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 380
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    set_namelist namelist_cfg ln_qsr_rgb .true.
+    set_namelist namelist_top_cfg ln_trcdta .false.
+    set_namelist namelist_top_cfg ln_trcbc  .false.
+    # put ln_ironsed, ln_hydrofe to false
+    # if not you need input files, and for tests is not necessary
+    set_namelist namelist_pisces_cfg ln_varpar .false.
+    set_namelist namelist_pisces_cfg ln_ironsed .false.
+    set_namelist namelist_pisces_cfg ln_ironice .false.
+    set_namelist namelist_pisces_cfg ln_hydrofe .false.
+    # put ln_pisdmp to false : no restoring to global mean value
+    set_namelist namelist_pisces_cfg ln_pisdmp .false.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_8_4"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"OFFP_84\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 380
+    set_namelist namelist_cfg jpni 8
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    set_namelist namelist_cfg ln_qsr_rgb .true.
+    set_namelist namelist_top_cfg ln_trcdta .false.
+    set_namelist namelist_top_cfg ln_trcbc  .false.
+    # put ln_ironsed, ln_hydrofe to false
+    # if not you need input files, and for tests is not necessary
+    set_namelist namelist_pisces_cfg ln_varpar .false.
+    set_namelist namelist_pisces_cfg ln_ironsed .false.
+    set_namelist namelist_pisces_cfg ln_ironice .false.
+    set_namelist namelist_pisces_cfg ln_hydrofe .false.
+    # put ln_pisdmp to false : no restoring to global mean value
+    set_namelist namelist_pisces_cfg ln_pisdmp .false. 
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+fi
+
+# -----
+# AMM12
+# -----
+if [ ${config} == "AMM12" ] ;  then
+    ## Restartability tests for AMM12
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_config  AMM12 AMM12_ST 'cfgs'
+    clean_config AMM12 AMM12_ST 'cfgs'
+    #
+    . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AMM12_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 576
+    set_namelist namelist_cfg nn_stock 288
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AMM12_SHORT\"
+    set_namelist namelist_cfg nn_it000 289
+    set_namelist namelist_cfg nn_itend 576
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg cn_ocerst_in \"AMM12_LONG_00000288_restart\"
+    set_namelist namelist_cfg nn_date0 20120102
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/AMM12_LONG_00000288_restart_${L_NPROC}.nc .
+    done
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+## Reproducibility tests for AMM12
+    export TEST_NAME="REPRO_8_4"
+    cd ${MAIN_DIR}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AMM12_84\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 576
+    set_namelist namelist_cfg jpni 8
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_4_8"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AMM12_48\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 576
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+fi
+
+
+# ---------
+# ORCA2_SAS
+# ---------
+if [ ${config} == "SAS" ] ;  then
+## Restartability tests
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_config  ORCA2_SAS_ICE ORCA2_SAS_ICE_ST 'cfgs'
+    clean_config ORCA2_SAS_ICE ORCA2_SAS_ICE_ST 'cfgs'
+    #
+    . ./makenemo -m ${CMP_NAM} -n ORCA2_SAS_ICE_ST -r ORCA2_SAS_ICE -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"SAS\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 256
+    set_namelist namelist_cfg nn_stock 128
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_ice_cfg ln_icediachk .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"SAS\"
+    set_namelist namelist_cfg nn_it000 129
+    set_namelist namelist_cfg nn_itend 256
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg nn_date0 010109
+    set_namelist namelist_cfg cn_ocerst_in \"SAS_00000128_restart\"
+    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000128_restart_ice\"
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/SAS_00000128_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/SAS_00000128_restart_ice_${L_NPROC}.nc .
+    done
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+## Reproducibility tests
+    export TEST_NAME="REPRO_4_8"
+    cd ${MAIN_DIR}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"SAS_48\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 80
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_8_4"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"SAS_84\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 80
+    set_namelist namelist_cfg jpni 8
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+fi
+
+
+# --------------
+# ORCA2_ICE_OBS
+# --------------
+## Test assimilation interface code, OBS and ASM for reproducibility
+## Restartability not tested (ASM code not restartable while increments are being applied)
+if [ ${config} == "ORCA2_ICE_OBS" ] ; then
+## Reproducibility tests
+    export TEST_NAME="REPRO_4_8"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_config  ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST 'cfgs'
+    clean_config ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST 'cfgs'
+    #
+    . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_OBS_ST -r ORCA2_ICE_PISCES -d "OCE ICE"  -j 8 add_key "key_asminc ${ADD_KEYS}" del_key "key_top"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"O2L3OBS_48\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 80
+    set_namelist namelist_cfg ln_read_cfg .true.
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    set_namelist namelist_cfg ln_diaobs .true.
+    set_namelist namelist_cfg ln_t3d .true.
+    set_namelist namelist_cfg ln_s3d .true.
+    set_namelist namelist_cfg ln_sst .true.
+    set_namelist namelist_cfg ln_sla .true.
+    set_namelist namelist_cfg ln_sic .true.
+    set_namelist namelist_cfg ln_vel3d .true.
+    set_namelist namelist_cfg ln_bkgwri .true.
+    set_namelist namelist_cfg ln_trainc .true.
+    set_namelist namelist_cfg ln_dyninc .true.
+    set_namelist namelist_cfg ln_sshinc .true.
+    set_namelist namelist_cfg ln_asmiau .true.
+    #remove all useless options for pisces (due to ORCA2_ICE_PISCES reference configuration)
+    set_namelist namelist_top_cfg ln_trcdta .false. 
+    set_namelist namelist_top_cfg ln_trcbc  .false. 
+    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
+    # if not you need input files, and for tests is not necessary
+    set_namelist namelist_pisces_cfg ln_varpar .false.
+    set_namelist namelist_pisces_cfg ln_ironsed .false.
+    set_namelist namelist_pisces_cfg ln_ironice .false.
+    set_namelist namelist_pisces_cfg ln_hydrofe .false.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_ICE_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+   cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_8_4"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"O2L3OBS_84\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 80
+    set_namelist namelist_cfg ln_read_cfg .true.
+    set_namelist namelist_cfg jpni 8
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg sn_cfctl%l_trcstat .true.
+    set_namelist namelist_cfg ln_diaobs .true.
+    set_namelist namelist_cfg ln_t3d .true.
+    set_namelist namelist_cfg ln_s3d .true.
+    set_namelist namelist_cfg ln_sst .true.
+    set_namelist namelist_cfg ln_sla .true.
+    set_namelist namelist_cfg ln_sic .true.
+    set_namelist namelist_cfg ln_vel3d .true.
+    set_namelist namelist_cfg ln_bkgwri .true.
+    set_namelist namelist_cfg ln_trainc .true.
+    set_namelist namelist_cfg ln_dyninc .true.
+    set_namelist namelist_cfg ln_sshinc .true.
+    set_namelist namelist_cfg ln_asmiau .true.
+    #remove all useless options for pisces (due to ORCA2_ICE_PISCES reference configuration)
+    set_namelist namelist_top_cfg ln_trcdta .false.
+    set_namelist namelist_top_cfg ln_trcbc  .false.
+    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
+    # if not you need input files, and for tests is not necessary
+    set_namelist namelist_pisces_cfg ln_varpar .false.
+    set_namelist namelist_pisces_cfg ln_ironsed .false.
+    set_namelist namelist_pisces_cfg ln_ironice .false.
+    set_namelist namelist_pisces_cfg ln_hydrofe .false.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_ICE_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+fi
+
+# ------------
+# AGRIF ICE
+# -----------
+if [ ${config} == "AGRIF" ] ;  then
+## Restartability tests
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_config  AGRIF_DEMO AGRIF_DEMO_ST 'cfgs'
+    clean_config AGRIF_DEMO AGRIF_DEMO_ST 'cfgs'
+    #
+    . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_ST -r AGRIF_DEMO -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=16
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AGRIF_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 20
+    set_namelist namelist_cfg nn_stock 10
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 1_namelist_cfg cn_exp \"AGRIF_LONG\"
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 20
+    set_namelist 1_namelist_cfg nn_stock 10
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 2_namelist_cfg cn_exp \"AGRIF_LONG\"
+    set_namelist 2_namelist_cfg nn_it000 1
+    set_namelist 2_namelist_cfg nn_itend 80
+    set_namelist 2_namelist_cfg nn_stock 40
+    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 3_namelist_cfg cn_exp \"AGRIF_LONG\"
+    set_namelist 3_namelist_cfg nn_it000 1
+    set_namelist 3_namelist_cfg nn_itend 240
+    set_namelist 3_namelist_cfg nn_stock 120
+    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
+
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AGRIF_SHORT\"
+    set_namelist namelist_cfg nn_it000 11
+    set_namelist namelist_cfg nn_itend 20
+    set_namelist namelist_cfg nn_stock 10
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist 1_namelist_cfg cn_exp \"AGRIF_SHORT\"
+    set_namelist 1_namelist_cfg nn_it000 11
+    set_namelist 1_namelist_cfg nn_itend 20
+    set_namelist 1_namelist_cfg nn_stock 10
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 1_namelist_cfg ln_rstart .true.
+    set_namelist 1_namelist_cfg nn_rstctl 2
+    set_namelist 2_namelist_cfg cn_exp \"AGRIF_SHORT\"
+    set_namelist 2_namelist_cfg nn_it000 41
+    set_namelist 2_namelist_cfg nn_itend 80
+    set_namelist 2_namelist_cfg nn_stock 40
+    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 2_namelist_cfg ln_rstart .true.
+    set_namelist 2_namelist_cfg nn_rstctl 2
+    set_namelist 3_namelist_cfg cn_exp \"AGRIF_SHORT\"
+    set_namelist 3_namelist_cfg nn_it000 121
+    set_namelist 3_namelist_cfg nn_itend 240
+    set_namelist 3_namelist_cfg nn_stock 120
+    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 3_namelist_cfg ln_rstart .true.
+    set_namelist 3_namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
+    set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
+    set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
+    set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
+    set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000040_restart\"
+    set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000040_restart_ice\"
+    set_namelist 3_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000120_restart\"
+    set_namelist 3_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000120_restart_ice\"
+
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
+        ln -sf ../LONG/1_AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/1_AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
+        ln -sf ../LONG/2_AGRIF_LONG_00000040_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/2_AGRIF_LONG_00000040_restart_ice_${L_NPROC}.nc .
+        ln -sf ../LONG/3_AGRIF_LONG_00000120_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/3_AGRIF_LONG_00000120_restart_ice_${L_NPROC}.nc .
+    done
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+## Reproducibility tests
+    export TEST_NAME="REPRO_2_8"
+    cd ${MAIN_DIR}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=16
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AGRIF_28\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 20
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 1_namelist_cfg cn_exp \"AGRIF_28\"
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 20
+    set_namelist 1_namelist_cfg jpni 2
+    set_namelist 1_namelist_cfg jpnj 8
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 2_namelist_cfg cn_exp \"AGRIF_28\"
+    set_namelist 2_namelist_cfg nn_it000 1
+    set_namelist 2_namelist_cfg nn_itend 80
+    set_namelist 2_namelist_cfg jpni 2
+    set_namelist 2_namelist_cfg jpnj 8
+    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 3_namelist_cfg cn_exp \"AGRIF_28\"
+    set_namelist 3_namelist_cfg nn_it000 1
+    set_namelist 3_namelist_cfg nn_itend 240
+    set_namelist 3_namelist_cfg jpni 2
+    set_namelist 3_namelist_cfg jpnj 8
+    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
+
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_4_4"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=16
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AGRIF_44\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 20
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 1_namelist_cfg cn_exp \"AGRIF_44\"
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 20
+    set_namelist 1_namelist_cfg jpni 4
+    set_namelist 1_namelist_cfg jpnj 4
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 2_namelist_cfg cn_exp \"AGRIF_44\"
+    set_namelist 2_namelist_cfg nn_it000 1
+    set_namelist 2_namelist_cfg nn_itend 80
+    set_namelist 2_namelist_cfg jpni 4
+    set_namelist 2_namelist_cfg jpnj 4
+    set_namelist 2_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 3_namelist_cfg cn_exp \"AGRIF_44\"
+    set_namelist 3_namelist_cfg nn_it000 1
+    set_namelist 3_namelist_cfg nn_itend 240
+    set_namelist 3_namelist_cfg jpni 4
+    set_namelist 3_namelist_cfg jpnj 4
+    set_namelist 3_namelist_cfg sn_cfctl%l_runstat .true.
+
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+## test code corruption with AGRIF (phase 1) ==> Compile with key_agrif but run with no zoom
+    export TEST_NAME="ORCA2"
+    cd ${MAIN_DIR}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"ORCA2\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 150
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+
+#   Set the number of fine grids to zero:    
+    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
+
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+fi
+
+
+## test code corruption with AGRIF (phase 2) ==> Compile without key_agrif (to be compared with AGRIF_DEMO_ST/ORCA2)
+if [ ${config} == "AGRIF" ] ;  then
+    export TEST_NAME="ORCA2"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_config  AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST 'cfgs'
+    clean_config AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST 'cfgs'
+    #
+    . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_NOAGRIF_ST -r AGRIF_DEMO -j 8 add_key "${ADD_KEYS}" del_key "key_agrif"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"ORCA2\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 150
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+#
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+fi
+
+# -------
+# SPITZ12
+# -------
+if [ ${config} == "SPITZ12" ] ;  then
+## Restartability tests
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_config  SPITZ12 SPITZ12_ST 'cfgs'
+    clean_config SPITZ12 SPITZ12_ST 'cfgs'
+    #
+    . ./makenemo -m ${CMP_NAM} -n SPITZ12_ST -r SPITZ12 -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"S12_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 240
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg nn_date0 20020101
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    #set_namelist namelist_ice_cfg ln_icediachk .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"S12_SHORT\"
+    set_namelist namelist_cfg nn_it000 121
+    set_namelist namelist_cfg nn_itend 240
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg cn_ocerst_in \"S12_LONG_00000120_restart\"
+    set_namelist namelist_ice_cfg cn_icerst_in \"S12_LONG_00000120_restart_ice\"
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/S12_LONG_00000120_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/S12_LONG_00000120_restart_ice_${L_NPROC}.nc .
+    done
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+## Reproducibility tests
+    export TEST_NAME="REPRO_4_8"
+    cd ${MAIN_DIR}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"S12_48\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_date0 20020101
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_8_4"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"S12_84\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_date0 20020101
+    set_namelist namelist_cfg jpni 8
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+fi
+
+
+done
Index: utils/CI/r12931_sette_ticket2366/sette_rpt.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/sette_rpt.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/sette_rpt.sh	(revision 13118)
@@ -0,0 +1,539 @@
+#!/bin/bash -f
+# set -vx
+# simple SETTE report generator.
+#
+# This version should be run in the SETTE directory. 
+# The machine name will be picked up from the sette.sh script but the location of the
+# validation directory needs to be set here (currently assumed to reside in the ../cfgs directory)
+#
+#########################################################################################
+######################### Start of function definitions #################################
+##
+
+function get_dorv() {
+  if [ $lastchange == 'old' ] ; then 
+    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l `
+    dorv=`echo $dorv | sed -e 's:.*/::'`
+    dorv2=`ls -1rt $vdir/$nam2/$mach/ 2>/dev/null | tail -1l `
+    dorv2=`echo $dorv2 | sed -e 's:.*/::'`
+  else
+    dorv=$lastchange
+    dorv2=$lastchange
+  fi
+}
+
+function get_ktdiff() {
+  ktdiff=`diff ${1} ${2} | head -2 | grep it | awk '{ print $4 }'`
+}
+
+function resttest() { 
+#
+# Restartability checks. Expects LONG and SHORT run directories
+# Compares end of LONG stat files with equivalent entries from the SHORT stat files.
+#
+  vdir=$1
+  nam=$2
+  pass=$3
+#
+# get $dorv
+  get_dorv
+#
+# check if directory is here
+  if [ ! -d $vdir/$nam/$mach/$dorv ]; then
+    printf "%-27s %s %s\n" $nam  " directory                  MISSING : " $dorv
+    return
+  fi
+
+  if [ -d $vdir/$nam/$mach/$dorv ]; then
+    # check ocean output
+    runtest $vdir $nam $pass RST
+    #
+    # run restartibility test
+    f1o=$vdir/$nam/$mach/$dorv/LONG/ocean.output
+    f1s=$vdir/$nam/$mach/$dorv/LONG/run.stat
+    f1t=$vdir/$nam/$mach/$dorv/LONG/tracer.stat
+    f2o=$vdir/$nam/$mach/$dorv/SHORT/ocean.output
+    f2s=$vdir/$nam/$mach/$dorv/SHORT/run.stat
+    f2t=$vdir/$nam/$mach/$dorv/SHORT/tracer.stat
+
+    if  [ ! -f $f1s ] &&  [ ! -f $f1t ] ; then 
+      printf "%-27s %s\n" $nam " incomplete test";
+      return; 
+    fi
+    if  [ ! -f $f2s ] &&  [ ! -f $f2t ] ; then 
+      printf "%-27s %s\n" $nam " incomplete test";
+      return; 
+    fi
+#
+    done_oce=0
+
+    if  [  -f $f1s ] && [  -f $f2s ]; then 
+      nl=(`wc -l $f2s`)
+      tail -${nl[0]} $f1s > f1.tmp$$
+      cmp -s f1.tmp$$ $f2s
+      if [ $? == 0 ]; then
+        if [ $pass == 0 ]; then 
+          printf "%-27s %s %s\n" $nam  " run.stat    restartability  passed : " $dorv
+        fi
+      else
+        get_ktdiff f1.tmp$$ $f2s
+        printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " run.stat    restartability  FAILED : " $dorv " (results are different after " $ktdiff " time steps)"
+#
+# Offer view of differences on the second pass
+#
+        if [ $pass == 1 ]; then
+          echo "<return> to view run.stat differences"
+          read y
+          sdiff f1.tmp$$ $f2s
+          echo "<return> to view ocean.output differences"
+          read y
+          sdiff $f1o $f2o | grep "|"
+          done_oce=1
+          echo "<return> to continue"
+          read y
+        fi
+      fi
+    fi
+#
+# Check tracer.stat files (if they exist)
+#
+    if  [  -f $f1t ] && [  -f $f2t ]; then
+      nl=(`wc -l $f2t`)
+      tail -${nl[0]} $f1t > f1.tmp$$
+      cmp -s f1.tmp$$ $f2t
+      if [ $? == 0 ]; then
+        if [ $pass == 0 ]; then 
+          printf "%-27s %s %s\n" $nam  " tracer.stat restartability  passed : " $dorv
+        fi
+      else
+        get_ktdiff f1.tmp$$ $f2t
+        printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " tracer.stat    restartability  FAILED : " $dorv " (results are different after " $ktdiff " time steps)"
+#
+# Offer view of differences on the second pass
+#
+        if [ $pass == 1 ]; then
+          echo "<return> to view tracer.stat differences"
+          read y
+          sdiff f1.tmp$$ $f2t
+#
+# Only offer ocean.output view if it has not been viewed previously
+#
+          if [ $done_oce == 0 ]; then
+            echo "<return> to view ocean.output differences"
+            read y
+            sdiff $f1o $f2o | grep "|"
+          fi
+          echo "<return> to continue"
+          read y
+        fi
+      fi
+    fi
+    rm f1.tmp$$
+  fi
+}
+
+function reprotest(){
+#
+# Reproducibility checks. Expects REPRO_N_M and REPRO_I_J run directories
+# Compares end of stat files from each
+#
+  vdir=$1
+  nam=$2
+  pass=$3
+#
+# get $dorv
+  get_dorv
+#
+# check if directory is here
+  if [ ! -d $vdir/$nam/$mach/$dorv ]; then
+    printf "%-27s %s %s\n" $nam  " directory                  MISSING : " $dorv
+    return
+  fi
+#
+  if [ -d $vdir/$nam/$mach/$dorv ]; then
+    # check ocean output
+    runtest $vdir $nam $pass REPRO
+    #
+    # check reproducibility
+    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -2l | head -1 `
+    rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -1l`
+    f1o=$vdir/$nam/$mach/$dorv/$rep1/ocean.output
+    f1s=$vdir/$nam/$mach/$dorv/$rep1/run.stat
+    f1t=$vdir/$nam/$mach/$dorv/$rep1/tracer.stat
+    f2o=$vdir/$nam/$mach/$dorv/$rep2/ocean.output
+    f2s=$vdir/$nam/$mach/$dorv/$rep2/run.stat
+    f2t=$vdir/$nam/$mach/$dorv/$rep2/tracer.stat
+
+    if  [ ! -f $f1s ] && [ ! -f $f1t ] ; then 
+      printf "%-27s %s\n" $nam " incomplete test";
+      return; 
+    fi
+    if  [ ! -f $f2s ] && [ ! -f $f2t ] ; then 
+      printf "%-27s %s\n" $nam " incomplete test";
+      return; 
+    fi
+#
+    done_oce=0
+
+    if  [ -f $f1s ] && [ -f $f2s ] ; then
+      cmp -s $f1s $f2s
+      if [ $? == 0 ]; then
+        if [ $pass == 0 ]; then 
+          printf "%-27s %s %s\n" $nam  " run.stat    reproducibility passed : " $dorv
+        fi
+      else
+        get_ktdiff $f1s $f2s
+        printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " run.stat    reproducibility FAILED : " $dorv " (results are different after " $ktdiff " time steps)"
+#
+# Offer view of differences on the second pass
+#
+        if [ $pass == 1 ]; then
+          echo "<return> to view run.stat differences"
+          read y
+          sdiff $f1s $f2s
+          echo "<return> to view ocean.output differences"
+          read y
+          sdiff $f1o $f2o | grep "|"
+          done_oce=1
+          echo "<return> to continue"
+          read y
+        fi
+      fi
+    fi
+#
+# Check tracer.stat files (if they exist)
+#
+    if  [ -f $f1t ] && [ -f $f2t ] ; then
+      cmp -s $f1t $f2t
+      if [ $? == 0 ]; then
+        if [ $pass == 0 ]; then           printf "%-27s %s %s\n" $nam  " tracer.stat reproducibility passed : " $dorv
+        fi
+      else
+        get_ktdiff $f1t $f2t
+        printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " tracer.stat reproducibility FAILED : " $dorv " (results are different after " $ktdiff " time steps)"
+#
+# Offer view of differences on the second pass
+#
+        if [ $pass == 1 ]; then
+          echo "<return> to view tracer.stat differences"
+          read y
+          sdiff $f1t $f2t
+#
+# Only offer ocean.output view if it has not been viewed previously
+#
+          if [ $done_oce == 0 ]; then
+            echo "<return> to view ocean.output differences"
+            read y
+            sdiff $f1o $f2o | grep "|"
+          fi
+          echo "<return> to continue"
+          read y
+        fi
+      fi
+    fi
+  fi
+}
+function runcmpres(){
+#
+# compare *.stat file with reference file from a previous sette test or previous version
+# store in NEMO_VALID_REF at revision NEMO_REV_REF
+# Compares end of stat files from each
+#
+  vdir=$1
+  nam=$2
+  vdirref=$3
+  dorvref=$4
+  pass=$5
+#
+# get $dorv
+  get_dorv
+#
+# check if reference directory is present
+  if [ ! -d $vdirref/$nam/$mach/$dorvref ]; then
+    printf "%-27s %s\n" $nam " REFERENCE directory at $dorvref is MISSING"
+    return
+  fi
+  if [ ! -d $vdir/$nam/$mach/$dorv ]; then
+    printf "%-27s %s\n" $nam " VALID     directory at $dorv is MISSING"
+    return
+  fi
+
+#
+  if [ -d $vdir/$nam/$mach/$dorv ]; then
+    f1s=$vdir/$nam/$mach/$dorv/LONG/run.stat
+    f1t=$vdir/$nam/$mach/$dorv/LONG/tracer.stat
+    f2s=$vdirref/$nam/$mach/$dorvref/LONG/run.stat
+    f2t=$vdirref/$nam/$mach/$dorvref/LONG/tracer.stat
+    if  [ ! -f $f1s ] && [ ! -f $f1t ] ; then
+      printf "%-20s %s\n" $nam " incomplete test";
+      return;
+    fi
+    if  [ ! -f $f2s ] && [ ! -f $f2t ] ; then
+      printf "%-20s %s\n" $nam " incomplete test";
+      return;
+    fi
+#
+    done_oce=0
+
+    if  [ -f $f1s ] && [ -f $f2s ] ; then
+      cmp -s $f1s $f2s
+      if [ $? == 0 ]; then
+        if [ $pass == 0 ]; then
+          printf "%-20s %s %s\n" $nam  " run.stat    files are identical "
+        fi
+      else
+        get_ktdiff $f1s $f2s
+        printf "%-20s %s %s %-5s %s\n" $nam  " run.stat    files are DIFFERENT (results are different after " $ktdiff " time steps)"
+#
+# Offer view of differences on the second pass
+#
+        if [ $pass == 1 ]; then
+          echo "<return> to view run.stat differences"
+          read y
+          sdiff $f1s $f2s
+          done_oce=1
+          echo "<return> to continue"
+          read y
+        fi
+      fi
+    fi
+    # Check tracer.stat files (if they exist)
+#
+    if  [ -f $f1t ] && [ -f $f2t ] ; then
+      cmp -s $f1t $f2t
+      if [ $? == 0 ]; then
+        if [ $pass == 0 ]; then          
+          printf "%-20s %s %s\n" $nam  " tracer.stat files are identical "
+        fi
+      else
+        get_ktdiff $f1t $f2t
+        printf "%-20s %s %s %-5s %s\n" $nam  " tracer.stat files are DIFFERENT (results are different after " $ktdiff " time steps) "
+#
+# Offer view of differences on the second pass
+#
+        if [ $pass == 1 ]; then
+          echo "<return> to view tracer.stat differences"
+          read y
+          sdiff $f1t $f2t
+        fi
+      fi
+    fi
+  fi
+}
+
+function runtest(){
+#
+# Run checks.
+# Check presence of E R R O R in ocean.output from each
+#
+  vdir=$1
+  nam=$2
+  pass=$3
+  ttype=$4
+  [[ $ttype == 'RST' ]] && ttype="LONG|SHORT"
+#
+# get $dorv
+  get_dorv
+#
+# no print needed if the repository is not here (already catch before)
+#
+  if [ -d $vdir/$nam/$mach/$dorv/ ]; then
+    #
+    # apply check for all ttype directory
+    rep1=$(ls -rt $vdir/$nam/$mach/$dorv/ | grep -E $ttype)
+    for tdir in $rep1 ; do
+       f1o=$vdir/$nam/$mach/$dorv/$tdir/ocean.output
+       if  [ ! -f $f1o ] ; then
+          if [ $pass == 0 ]; then printf "%-27s %s %s\n" $nam " ocean.output               MISSING : " $dorv ; fi
+          return;
+       else 
+          nerr=`grep 'E R R O R' $f1o | wc -l`
+          if [[ $nerr > 0 ]]; then
+             printf "\e[38;5;196m%-27s %s %s %s\e[0m\n" $nam " run                         FAILED : " $dorv " ( E R R O R in ocean.output) " 
+             if [ $pass == 1 ]; then
+                echo "<return> to view end of ocean.output"
+                read y
+                tail -100 $f1o
+                echo ''
+                echo "full ocean.output available here: $f1o"
+             fi
+             return;
+          fi
+       fi
+    done
+  else
+    if [ $pass == 0 ]; then printf "%-27s %s %s\n" $nam  " directory                  MISSING : " $dorv ; fi
+  fi
+}
+
+function identictest(){
+#
+# Checks AGRIF does not corrupt results with no AGRIF zoom by comparing run.stat files
+#
+  vdir=$1
+  nam=$2
+  nam2=$3
+  pass=$4
+#
+  get_dorv
+#
+  rep=`ls -1rt $vdir/$nam/$mach/$dorv/ |  tail -1l`
+  f1s=${vdir}/${nam}/${mach}/${dorv}/${rep}/run.stat
+  f2s=${vdir}/${nam2}/${mach}/${dorv2}/${rep}/run.stat
+#
+  if  [ -f $f1s ] && [ -f $f2s ] ; then
+      cmp -s $f1s $f2s
+      if [ $? == 0 ]; then
+          if [ $pass == 0 ]; then 
+	      printf "%-5s %s %-5s %s %s %s\n" $rep "AGRIF vs" $rep "NOAGRIF run.stat    unchanged  -    passed : " $dorv $dorv2
+          fi
+      else
+          get_ktdiff $f1s $f2s
+          printf "\e[38;5;196m%-5s %s %-5s %s %s %s %s %-5s %s\e[0m\n" $rep "AGRIF vs" $rep "NOAGRIF run.stat    changed  -     FAILED : " $dorv $dorv2 " (results are different after " $ktdiff " time steps)"
+#
+# Offer view of differences on the second pass
+#
+          if [ $pass == 1 ]; then
+	      echo "<return> to view run.stat differences"
+	      read y
+	      sdiff $f1s $f2s
+	      echo "<return> to continue"
+	      read y
+          fi
+      fi
+  else
+      printf "%-27s %-27s %s\n" $nam $nam2 " incomplete test"
+  fi
+}
+########################### END of function definitions #################################
+##                                                                                     ##
+##    Main script                                                                      ##
+##                                                                                     ##
+#########################################################################################
+#
+# LOAD param variable (COMPILER, NEMO_VALIDATION_DIR, SVN_CMD)
+  SETTE_DIR=$(cd $(dirname "$0"); pwd)
+  MAIN_DIR=$(dirname $SETTE_DIR)
+  . ./param.cfg
+
+  mach=${COMPILER}
+  NEMO_VALID=${NEMO_VALIDATION_DIR}
+  NEMO_VALID_REF=${NEMO_VALIDATION_REF}
+#
+  if [ ! -d $NEMO_VALID ]; then
+    echo "$NEMO_VALID validation directory not found"
+    exit
+  fi
+#
+#
+# Show current revision tag and branch name
+#
+echo ""
+lastchange=`${SVN_CMD} info ${MAIN_DIR} | grep 'Last Changed Rev' | awk '{print $NF}'`
+revision=`${SVN_CMD} info ${MAIN_DIR} | grep 'Revision' | awk '{print $NF}'`
+branchname=`${SVN_CMD} info ${MAIN_DIR} | grep ^URL | awk -F ipsl/forge/projets/nemo/svn/ '{print $NF}'`
+echo "Current code is : $branchname @ r$revision  ( last change @ r$lastchange )"
+[ `${SVN_CMD} status -q ${MAIN_DIR}/{cfg,tests,src} | wc -l` -ge 1 ] && lastchange=${lastchange}+
+
+# overwrite revision or compiler
+  if [ $# -gt 0 ]; then
+    while getopts r:c:h option; do 
+       case $option in
+          c) mach=$OPTARG;;
+          r) rev=$OPTARG;;
+          h | *) echo ''
+                 echo 'sette_rpt.sh : ' 
+                 echo '     display result for the latest change'
+                 echo ' -c COMPILER_name :'
+                 echo '     display result for the specified compiler'
+                 echo ' -r REVISION_number :'
+                 echo '     display sette results for the specified revision (set old for the latest revision available for each config)'
+                 echo ''
+                 exit 42;;
+       esac
+    done
+    shift $((OPTIND - 1))
+fi
+
+# if $1 (remaining arguments)
+if [[ ! -z $1 ]] ; then rev=$1 ; fi
+
+# by default use the current lastchanged revision
+lastchange=${rev:-$lastchange}
+
+echo ""
+echo "SETTE validation report generated for : "
+echo ""
+echo "       $branchname @ r$lastchange (last changed revision)"
+echo ""
+echo "       on $COMPILER arch file"
+echo ""
+
+#
+# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory
+#  
+for pass in  $RPT_PASSES 
+do
+#
+ if [ $pass == 0 ]; then 
+   echo "" 
+   echo "!!---------------1st pass------------------!!"
+ fi
+ if [ $pass == 1 ]; then
+    echo ""
+    echo "!!---------------2nd pass------------------!!"
+ fi
+#
+
+# Restartability test
+ echo ""
+ echo "   !----restart----!   "
+ for restart_test in WGYRE_PISCES_ST WORCA2_ICE_PISCES_ST WORCA2_OFF_PISCES_ST WAMM12_ST WORCA2_SAS_ICE_ST WAGRIF_DEMO_ST WSPITZ12_ST WISOMIP_ST WOVERFLOW_ST WLOCK_EXCHANGE_ST WVORTEX_ST WICE_AGRIF_ST 
+ do
+   resttest $NEMO_VALID $restart_test $pass
+ done
+#
+# Reproducibility tests
+ echo ""
+ echo "   !----repro----!   "
+ for repro_test in WGYRE_PISCES_ST WORCA2_ICE_PISCES_ST WORCA2_OFF_PISCES_ST WAMM12_ST WORCA2_SAS_ICE_ST WORCA2_ICE_OBS_ST WAGRIF_DEMO_ST WSPITZ12_ST WISOMIP_ST WVORTEX_ST WICE_AGRIF_ST
+ do
+   reprotest $NEMO_VALID $repro_test $pass
+ done
+
+# AGRIF special check to ensure results are unchanged with and without key_agrif
+ echo ""
+ echo "   !----agrif check----!   "
+ dir1=WAGRIF_DEMO_NOAGRIF_ST
+ dir2=WAGRIF_DEMO_ST
+ identictest $NEMO_VALID $dir1 $dir2 $pass 
+#
+# before/after tests
+ if [ $lastchange == 'old' ] ; then
+    echo ""
+    echo "   !---- 'old' specified as revision => no comparison with reference results ----!   "
+    echo ""
+ else
+   echo ""
+   echo "   !----result comparison check----!   "
+   if [ $NEMO_VALID_REF != "/path/to/reference/sette/results" ]; then
+     echo ''
+     echo 'check result differences between :'
+     echo "VALID directory : $NEMO_VALID at rev $lastchange"
+     echo 'and'
+     echo "REFERENCE directory : $NEMO_VALID_REF at rev $NEMO_REV_REF"
+     echo ''
+     for repro_test in WGYRE_PISCES_ST WORCA2_ICE_PISCES_ST WORCA2_OFF_PISCES_ST WAMM12_ST WISOMIP_ST WORCA2_SAS_ICE_ST WAGRIF_DEMO_ST WSPITZ12_ST WISOMIP_ST WVORTEX_ST WICE_AGRIF_ST
+     do
+       runcmpres $NEMO_VALID $repro_test $NEMO_VALID_REF $NEMO_REV_REF $pass
+     done
+   else
+     echo ''
+     echo ' No path for comparison specified. Result are not compare with any other revision. '
+     echo ' To do it please fill NEMO_VALID_REF and NEMO_REV_REF in param.cfg. '
+     echo ''
+   fi
+ fi
+done
+#
+exit
Index: utils/CI/r12931_sette_ticket2366/sette_test-cases.sh
===================================================================
--- utils/CI/r12931_sette_ticket2366/sette_test-cases.sh	(revision 13118)
+++ utils/CI/r12931_sette_ticket2366/sette_test-cases.sh	(revision 13118)
@@ -0,0 +1,837 @@
+#!/bin/bash
+############################################################
+# Author : Simona Flavoni for NEMO
+# Contact: sflod@locean-ipsl.upmc.fr
+#
+# sette_test-cases.sh   : principal script of SET TEsts for NEMO (SETTE)
+#                       : this script : compiles, run and tests TEST_CASES
+#
+#                       : TO DO: test if nitend is equal to end of run.stat
+# ----------------------------------------------------------------------
+# NEMO/SETTE , NEMO Consortium (2018)
+# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+# ----------------------------------------------------------------------
+#
+#############################################################
+#set -vx
+set -o posix
+#set -u
+#set -e
+# ===========
+# DESCRIPTION
+# ===========
+#
+# Variables to be checked by user:
+#
+# COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory 
+# BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs
+# BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs  
+# INTERACT_FLAG     : flag to run in interactive mode "yes"
+#                           to run in batch mode "no"
+# MPIRUN_FLAG       : flag to run in parallel (MPI) "yes"
+#                           to run in sequential mode (NB_PROC = 1) "no"
+# USING_XIOS        : flag to control the activation of key_iomput
+#                      "yes" to compile using key_iomput and link to the external XIOS library
+#                      "no"  to compile without key_iomput and link to the old IOIPSL library
+# USING_MPMD        : flag to control the use of stand-alone IO servers
+#                     requires USING_XIOS="yes"
+#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers
+#                      "no"  to run in SPMD (attached) mode without separate IO servers 
+# NUM_XIOSERVERS    : number of stand-alone IO servers to employ
+#                     set to zero if USING_MPMD="no"
+#
+# Principal script is sette_test-cases.sh, that calls 
+#
+#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe 
+#              and links to nemo in ${CONFIG_NAME}/EXP00)
+#
+#  param.cfg : sets and loads following directories:
+#
+#   FORCING_DIR         : is the directory for forcing files (tarfile)
+#   INPUT_DIR           : is the directory for input files storing 
+#   TMPDIR              : is the temporary directory (if needed)
+#   NEMO_VALIDATION_DIR : is the validation directory
+#
+#   (NOTE: this file is the same for all configrations to be tested with sette_test-cases.sh)
+#
+#   all_functions.sh : loads functions used by sette (note: new functions can be added here)
+#   set_namelist     : function declared in all_functions that sets namelist parameters 
+#   post_test_tidyup : creates validation storage directory and copies required output files 
+#                      (run.stat and ocean.output) in it after execution of test.
+#
+#  VALIDATION tree is:
+#
+#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
+#
+#  prepare_exe_dir.sh : defines and creates directory where the test is executed
+#                       execution directory takes name of TEST_NAME defined for every test 
+#                       in sette_test-cases.sh. (each test in executed in its own directory)
+#
+#  set_valid_dir       : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report 
+#
+#  clean_valid_dir    : rename ocean.output/run.stat and tracer.stat to avoid checking them in the report 
+#                       ( not doing it could lead to false positive )
+#
+#  prepare_job.sh     : to generate the script run_job.sh
+#
+#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes")
+#                        see sette_test-cases.sh and BATCH_TEMPLATE directory
+#
+#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which 
+#        can be found paths to the input tar file)
+#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR} 
+#        directory
+#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists 
+#        remain in ${NEW_CONF}/EXP00
+# 
+#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of 
+#        executed commands
+#
+#  NOTE: if sette_test-cases.sh is stopped in output.sette there is written the last command 
+#        executed by sette_test-cases.sh
+#
+# example use: ./sette_test-cases.sh 
+#########################################################################################
+#
+# LOAD param value
+SETTE_DIR=$(cd $(dirname "$0"); pwd)
+MAIN_DIR=$(dirname $SETTE_DIR)
+. ./param.cfg
+
+export BATCH_COMMAND_PAR=${BATCH_CMD}
+export BATCH_COMMAND_SEQ=${BATCH_CMD}
+export INTERACT_FLAG="no"
+export MPIRUN_FLAG="yes"
+#
+export DEL_KEYS="key_iomput"
+if [ ${USING_XIOS} == "yes" ] 
+ then 
+   export DEL_KEYS=""
+fi
+#
+export ADD_KEYS=""
+if [ ${ADD_NOSIGNEDZERO} == "yes" ]
+ then
+   export ADD_KEYS="key_nosignedzero"
+fi
+#
+# Settings which control the use of stand alone servers (only relevant if using xios)
+#
+export NUM_XIOSERVERS=4
+export JOB_PREFIX=${JOB_PREFIX_MPMD}
+#
+if [ ${USING_MPMD} == "no" ] 
+ then
+   export NUM_XIOSERVERS=0
+   export JOB_PREFIX=${JOB_PREFIX_NOMPMD}
+fi
+#
+#
+if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no" ]
+ then
+   echo "Incompatible choices. MPMD mode requires the XIOS server"
+   exit
+fi
+
+# Directory to run the tests
+CONFIG_DIR0=${MAIN_DIR}/cfgs
+TOOLS_DIR=${MAIN_DIR}/tools
+
+CMP_NAM=${1:-$COMPILER}
+# Copy job_batch_COMPILER file for specific compiler into job_batch_template
+cd ${SETTE_DIR}
+cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
+# Description of configuration tested:
+# OVERFLOW       : TEST s-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs 
+#                                     & (dynamics) advection schemes: flux form (ubs, centered), vector form (een)
+#                       zps-coordinates : (tracers) Advection schemes: FCT2, FCT4, ubs
+#                                     & (dynamics) advection schemes: flux form (ubs, centered), vector form (een, and een + Hollingsworth correction)
+# LOCK_EXCHANGE  : 
+# VORTEX         : 
+# ICE_AGRIF      : 
+# ISOMIP         : 
+# WAD
+
+
+for config in ${TEST_CONFIGS}
+do
+
+# ---------
+#  OVERFLOW
+# ---------
+if [ ${config} == "OVERFLOW" ] ;  then
+    ## Restartability tests for OVERFLOW
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    . ${SETTE_DIR}/all_functions.sh
+    #
+    clean_config OVERFLOW OVERFLOW_ST 'tests'
+    #
+    sync_config  OVERFLOW OVERFLOW_ST 'tests'
+    #
+    . ./makenemo -m ${CMP_NAM} -n OVERFLOW_ST -a OVERFLOW -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=1
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}  
+    set_namelist namelist_cfg cn_exp \"OVF_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_stock 60
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"OVF_SHORT\"
+    set_namelist namelist_cfg nn_it000 61
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_stock 60
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg cn_ocerst_in \"OVF_LONG_00000060_restart\"
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    ln -sf ../LONG/OVF_LONG_00000060_restart.nc .
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+
+    ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps
+    ## Needed namelist-xxxx for every type of run tested
+    cd ${CONFIG_DIR}/${NEW_CONF}/EXP00
+
+    for file in $(echo `ls namelist_*_cfg `) ; do
+        TEST_NAME=`echo $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"`
+        TEST_NAME="EXP-${TEST_NAME}"
+        if [ ! -d ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} ] ; then mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} ; fi
+        export TEST_NAME="${TEST_NAME}"
+         ##
+        cd ${SETTE_DIR}
+        . ./param.cfg
+        . ./all_functions.sh
+        . ./prepare_exe_dir.sh
+        set_valid_dir
+        clean_valid_dir
+        JOB_FILE=${EXE_DIR}/run_job.sh
+        NPROC=1
+        if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+        cd ${EXE_DIR}
+        rm namelist_*_*_*_*
+        cp -pL ${CONFIG_DIR}/${NEW_CONF}/EXP00/$file namelist_cfg
+        if [ ${USING_MPMD} == "yes" ] ; then
+           set_xio_using_server iodef.xml true
+        else
+           set_xio_using_server iodef.xml false
+        fi
+        cd ${SETTE_DIR}
+        . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+        cd ${SETTE_DIR}
+        . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+       ##
+     done
+fi
+
+# --------------
+#  LOCK_EXCHANGE
+# --------------
+if [ ${config} == "LOCK_EXCHANGE" ] ;  then
+    ## Restartability tests for LOCK_EXCHANGE
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    #
+    clean_config LOCK_EXCHANGE LOCK_EXCHANGE_ST 'tests'
+    #
+    sync_config  LOCK_EXCHANGE LOCK_EXCHANGE_ST 'tests'
+    #
+    . ./makenemo -m ${CMP_NAM} -n LOCK_EXCHANGE_ST -a LOCK_EXCHANGE -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=1
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"LOCK_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_stock 60
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg nn_itend 120
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"LOCK_SHORT\"
+    set_namelist namelist_cfg nn_it000 61
+    set_namelist namelist_cfg nn_itend 120
+    set_namelist namelist_cfg nn_stock 60
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg cn_ocerst_in \"LOCK_LONG_00000060_restart\"
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    ln -sf ../LONG/LOCK_LONG_00000060_restart.nc .
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    ## Test for all advection, vector form, flux form: test runability and complete all time steps
+    ## Needed namelist-xxxx for every type of run tested
+    cd ${CONFIG_DIR}/${NEW_CONF}/EXP00
+
+    for file in $(echo `ls namelist_*_cfg `) ; do
+        echo ''
+        TEST_NAME=`echo $file | sed -e "s/namelist_//" | sed -e "s/_cfg//"`
+        TEST_NAME="EXP-${TEST_NAME}"
+        `mkdir ${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}`
+        export TEST_NAME="${TEST_NAME}"
+        ##  
+        cd ${SETTE_DIR}
+        . ./param.cfg
+        . ./all_functions.sh
+        . ./prepare_exe_dir.sh
+        set_valid_dir
+        clean_valid_dir
+        JOB_FILE=${EXE_DIR}/run_job.sh
+        NPROC=1
+        if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+        cd ${EXE_DIR}
+        rm namelist_*_*_*_*
+        cp -pL ${CONFIG_DIR}/${NEW_CONF}/EXP00/$file namelist_cfg
+        if [ ${USING_MPMD} == "yes" ] ; then
+           set_xio_using_server iodef.xml true
+        else
+           set_xio_using_server iodef.xml false
+        fi
+        cd ${SETTE_DIR}
+        . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+        cd ${SETTE_DIR}
+        . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+        ##
+        echo ''
+   done
+fi
+
+# ---------
+# VORTEX
+# ---------
+if [ ${config} == "VORTEX" ] ;  then 
+## Restartability tests for VORTEX
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    #
+    clean_config VORTEX VORTEX_ST 'tests'
+    #
+    sync_config  VORTEX VORTEX_ST 'tests'
+    #
+    . ./makenemo -m ${CMP_NAM} -n VORTEX_ST -a VORTEX -j 8  add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=6
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"VORTEX_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 240
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+
+    set_namelist 1_namelist_cfg cn_exp \"VORTEX_LONG\"
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 720
+    set_namelist 1_namelist_cfg nn_stock 360
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+	
+    if [ ${USING_MPMD} == "yes" ] ; then
+        set_xio_using_server iodef.xml true
+    else
+        set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"VORTEX_SHORT\"
+    set_namelist namelist_cfg nn_it000 121
+    set_namelist namelist_cfg nn_itend 240
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg cn_ocerst_in \"VORTEX_LONG_00000120_restart\"
+    
+    set_namelist 1_namelist_cfg cn_exp \"VORTEX_SHORT\"
+    set_namelist 1_namelist_cfg nn_it000 361
+    set_namelist 1_namelist_cfg nn_itend 720
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 1_namelist_cfg nn_stock 360
+    set_namelist 1_namelist_cfg ln_rstart .true.
+    set_namelist 1_namelist_cfg nn_rstctl 2
+    set_namelist 1_namelist_cfg cn_ocerst_in \"VORTEX_LONG_00000360_restart\"
+      
+    if [ ${USING_MPMD} == "yes" ] ; then
+        set_xio_using_server iodef.xml true
+    else
+        set_xio_using_server iodef.xml false
+    fi
+    if [ $NPROC -eq 1 ] ;  then
+        ln -sf ../LONG/VORTEX_LONG_00000120_restart.nc .
+        ln -sf ../LONG/1_VORTEX_LONG_00000360_restart.nc .
+    else
+        for (( i=1; i<=$NPROC; i++)) ; do
+            L_NPROC=$(( $i - 1 ))
+            L_NPROC=`printf "%04d\n" ${L_NPROC}`
+            ln -sf ../LONG/VORTEX_LONG_00000120_restart_${L_NPROC}.nc .
+            ln -sf ../LONG/1_VORTEX_LONG_00000360_restart_${L_NPROC}.nc .
+        done
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+## Reproducibility tests for VORTEX
+    export TEST_NAME="REPRO_2_3"
+    cd ${MAIN_DIR}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=6
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"VORTEX_23\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 240
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 3
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+   
+    set_namelist 1_namelist_cfg cn_exp \"VORTEX_23\"
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 720
+    set_namelist 1_namelist_cfg nn_stock 360
+    set_namelist 1_namelist_cfg jpni 2
+    set_namelist 1_namelist_cfg jpnj 3
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_3_2"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=6
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+
+    set_namelist namelist_cfg cn_exp \"VORTEX_32\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 240
+    set_namelist namelist_cfg nn_stock 120
+    set_namelist namelist_cfg jpni 3
+    set_namelist namelist_cfg jpnj 2
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+
+    set_namelist 1_namelist_cfg cn_exp \"VORTEX_32\"
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 720
+    set_namelist 1_namelist_cfg nn_stock 360
+    set_namelist 1_namelist_cfg jpni 3
+    set_namelist 1_namelist_cfg jpnj 2
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_EMPTY.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+fi
+
+
+# ---------
+# ICE_AGRIF
+# ---------
+if [ ${config} == "ICE_AGRIF" ] ;  then 
+## Restartability tests for ICE_AGRIF
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    #
+    clean_config ICE_AGRIF ICE_AGRIF_ST 'tests'
+    #
+    sync_config  ICE_AGRIF ICE_AGRIF_ST 'tests'
+    #
+    . ./makenemo -m ${CMP_NAM} -n ICE_AGRIF_ST -a ICE_AGRIF -j 8  add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=6
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 200
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg nn_stock 100
+    
+    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_LONG\"
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 600
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 1_namelist_cfg nn_stock 300
+    
+    if [ ${USING_MPMD} == "yes" ] ; then
+        set_xio_using_server iodef.xml true
+    else
+        set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_SHORT\"
+    set_namelist namelist_cfg nn_it000 101
+    set_namelist namelist_cfg nn_itend 200
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg nn_stock 100
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg cn_ocerst_in \"ICE_AGRIF_LONG_00000100_restart\"
+    set_namelist namelist_ice_cfg cn_icerst_in \"ICE_AGRIF_LONG_00000100_restart_ice\"
+    
+    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_SHORT\"
+    set_namelist 1_namelist_cfg nn_it000 301
+    set_namelist 1_namelist_cfg nn_itend 600
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist 1_namelist_cfg nn_stock 300
+    set_namelist 1_namelist_cfg ln_rstart .true.
+    set_namelist 1_namelist_cfg nn_rstctl 2
+    set_namelist 1_namelist_cfg cn_ocerst_in \"ICE_AGRIF_LONG_00000300_restart\"
+    set_namelist 1_namelist_ice_cfg cn_icerst_in \"ICE_AGRIF_LONG_00000300_restart_ice\"
+    
+    
+    if [ ${USING_MPMD} == "yes" ] ; then
+        set_xio_using_server iodef.xml true
+    else
+        set_xio_using_server iodef.xml false
+    fi
+    if [ $NPROC -eq 1 ] ;  then
+        ln -sf ../LONG/ICE_AGRIF_LONG_00000100_restart.nc .
+        ln -sf ../LONG/ICE_AGRIF_LONG_00000100_restart_ice.nc .
+        ln -sf ../LONG/1_ICE_AGRIF_LONG_00000300_restart.nc .
+        ln -sf ../LONG/1_ICE_AGRIF_LONG_00000300_restart_ice.nc .
+    else
+        for (( i=1; i<=$NPROC; i++)) ; do
+            L_NPROC=$(( $i - 1 ))
+            L_NPROC=`printf "%04d\n" ${L_NPROC}`
+            ln -sf ../LONG/ICE_AGRIF_LONG_00000100_restart_${L_NPROC}.nc .
+            ln -sf ../LONG/ICE_AGRIF_LONG_00000100_restart_ice_${L_NPROC}.nc .
+            ln -sf ../LONG/1_ICE_AGRIF_LONG_00000300_restart_${L_NPROC}.nc .
+            ln -sf ../LONG/1_ICE_AGRIF_LONG_00000300_restart_ice_${L_NPROC}.nc .
+        done
+    fi
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+
+## Reproducibility tests for ICE_AGRIF
+    export TEST_NAME="REPRO_2_3"
+    cd ${MAIN_DIR}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=6
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_23\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 200
+    set_namelist namelist_cfg nn_stock 100
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 3
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    
+    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_23\"
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 600
+    set_namelist 1_namelist_cfg nn_stock 300
+    set_namelist 1_namelist_cfg jpni 2
+    set_namelist 1_namelist_cfg jpnj 3
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_3_2"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=6
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+
+    set_namelist namelist_cfg cn_exp \"ICE_AGRIF_32\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 200
+    set_namelist namelist_cfg nn_stock 100
+    set_namelist namelist_cfg jpni 3
+    set_namelist namelist_cfg jpnj 2
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    
+    set_namelist 1_namelist_cfg cn_exp \"ICE_AGRIF_32\"
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 600
+    set_namelist 1_namelist_cfg nn_stock 300
+    set_namelist 1_namelist_cfg jpni 3
+    set_namelist 1_namelist_cfg jpnj 2
+    set_namelist 1_namelist_cfg sn_cfctl%l_runstat .true.
+    
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ICE_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+fi
+
+# ------
+# ISOMIP
+# ------
+if [ ${config} == "ISOMIP" ] ;  then
+## Restartability tests
+    export TEST_NAME="LONG"
+    cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    #
+    clean_config ISOMIP ISOMIP_ST 'tests'
+    #
+    sync_config  ISOMIP ISOMIP_ST 'tests'
+    #
+    . ./makenemo -m ${CMP_NAM} -n ISOMIP_ST -a ISOMIP -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=15
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"ISOMIP_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 96
+    set_namelist namelist_cfg nn_stock 48
+    set_namelist namelist_cfg jpni 5
+    set_namelist namelist_cfg jpnj 3
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\"
+    set_namelist namelist_cfg nn_it000 49
+    set_namelist namelist_cfg nn_itend 96
+    set_namelist namelist_cfg nn_stock 48
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg jpni 5
+    set_namelist namelist_cfg jpnj 3
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    set_namelist namelist_cfg cn_ocerst_in \"ISOMIP_LONG_00000048_restart\"
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/ISOMIP_LONG_00000048_restart_${L_NPROC}.nc .
+    done
+
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+## Reproducibility tests
+    export TEST_NAME="REPRO_7_3"
+    cd ${MAIN_DIR}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=21
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"ISOMIP_73\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 48
+    set_namelist namelist_cfg jpni 7
+    set_namelist namelist_cfg jpnj 3
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_8_4"
+    . ./prepare_exe_dir.sh
+    set_valid_dir
+    clean_valid_dir
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"ISOMIP_84\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 48
+    set_namelist namelist_cfg jpni 8
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg sn_cfctl%l_runstat .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${NEMO_VALID}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+fi
+
+#----
+done
