Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_MOBILIS
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_MOBILIS	(revision 4924)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_MOBILIS	(revision 4924)
@@ -0,0 +1,94 @@
+#!/bin/bash
+#SBATCH -N NODES
+#SBATCH --time=00:59:00 
+
+module purge
+module load shared
+module load gcc
+module load intel/compiler/64/14.0/2013_sp1.2.144
+module load openmpi/intel/64/1.6.5
+module load slurm/2.5.7
+
+#
+  export OMP_NUM_THREADS=1
+  export OCORES=NPROCS
+  export XCORES=NXIOPROCS
+  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 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 ./opa 
+            time `which mpirun` --report-bindings -x MALLOC_MMAP_MAX_=-1                 \
+                                -x MALLOC_TRIM_THRESHOLD_=33554432 -np $OCORES --bynode  \
+                                --mca mpi_paffinity_alone 1 ./opa 
+  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 ./opa 
+#
+            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 ./opa 
+#
+  fi
+#
+  post_test_tidyup
+# END_BODY
+# Don't remove neither change the previous line
+  exit
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-XC_ARCHER_INTEL
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-XC_ARCHER_INTEL	(revision 4924)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-XC_ARCHER_INTEL	(revision 4924)
@@ -0,0 +1,94 @@
+#!/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 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 ./opa
+            time aprun -b  -n $OCORES -N $O_PER_NODE ./opa
+  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 ./opa
+            time aprun -b -n $XCORES -N $X_PER_NODE ./xios_server.exe : -n $OCORES -N $O_PER_NODE ./opa
+#
+  fi
+#
+  post_test_tidyup
+# END_BODY
+# Don't remove neither change the previous line
+  exit
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-x3750_ADA
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-x3750_ADA	(revision 4657)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-x3750_ADA	(revision 4924)
@@ -65,6 +65,6 @@
 #
   if [ MPI_FLAG == "yes" ]; then
-     echo "Running time ${MPIRUN} ./opa"
-     time ${MPIRUN} ./opa
+     echo "Running time ${MPIRUN} ./opa -procs $OCEANCORES"
+     time ${MPIRUN} ./opa -procs $OCEANCORES
   else
      echo "Running time ./opa"
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-x3750_ADA_O0
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-x3750_ADA_O0	(revision 4924)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-x3750_ADA_O0	(revision 4924)
@@ -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="poe -procs $OCEANCORES"
+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 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} ./opa"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     echo "Running time ${MPIRUN} ./opa -procs $OCEANCORES"
+     time ${MPIRUN} ./opa  -procs $OCEANCORES
+  else
+     echo "Running time ./opa"
+     time ./opa
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/input_ISOMIP.cfg
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/input_ISOMIP.cfg	(revision 4924)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/input_ISOMIP.cfg	(revision 4924)
@@ -0,0 +1,1 @@
+
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/input_ORCA2_LIM3.cfg
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/input_ORCA2_LIM3.cfg	(revision 4924)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/input_ORCA2_LIM3.cfg	(revision 4924)
@@ -0,0 +1,1 @@
+ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/iodef_sette.xml
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/iodef_sette.xml	(revision 4657)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/iodef_sette.xml	(revision 4924)
@@ -2,5 +2,5 @@
 <simulation> 
 
- <context id="nemo" time_origin="1900-01-01 00:00:00" >
+ <context id="nemo" time_origin="1950-01-01 00:00:00" >
     
     <!-- $id$ -->
@@ -21,27 +21,25 @@
     -->
     
-    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">
+    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
     
-      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".FALSE."/> <!-- 1h files -->
-      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".FALSE."/> <!-- 2h files -->
-      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".FALSE."/> <!-- 3h files -->     
-      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".FALSE."/> <!-- 4h files -->
-      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".FALSE."/> <!-- 6h files -->
-     
-      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".FALSE."/> <!-- 1d files -->
+      <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="3d" output_freq="3d"  output_level="10" enabled=".FALSE."/> <!-- 3d files -->
-      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".FALSE."/> <!-- 5d files -->
-
-      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".FALSE."/> <!-- real monthly files -->
-      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".FALSE."/> <!-- real 2m files -->
-      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".FALSE."/> <!-- real 3m files -->
-      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".FALSE."/> <!-- real 4m files -->
-      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".FALSE."/> <!-- real 6m files -->
-
-      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".FALSE."/> <!-- real yearly files -->
-      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".FALSE."/> <!-- real 2y files -->
-      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".FALSE."/> <!-- real 5y files -->
-      <file_group id="10y" output_freq="10y" output_level="10" enabled=".FALSE."/> <!-- real 10y 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>
@@ -64,6 +62,14 @@
    <domain_definition src="./domain_def.xml"/>
    
-   <grid_definition />    
-  
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>   
   </context>
   
@@ -86,34 +92,27 @@
 ============================================================================================================
     -->
- 
+    
     <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
     
-      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".FALSE."/> <!-- 1h files -->
-      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".FALSE."/> <!-- 2h files -->
-      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".FALSE."/> <!-- 3h files -->     
-      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".FALSE."/> <!-- 4h files -->
-      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".FALSE."/> <!-- 6h files -->
-     
-      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".FALSE."/> <!-- 1d files -->
+      <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="3d" output_freq="3d"  output_level="10" enabled=".FALSE."/> <!-- 3d files -->
-      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".FALSE."/> <!-- 5d 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_group id="1m" output_freq="1mo" output_level="10" enabled=".FALSE."/> <!-- real monthly files -->
-      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".FALSE."/> <!-- real 2m files -->
-      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".FALSE."/> <!-- real 3m files -->
-      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".FALSE."/> <!-- real 4m files -->
-      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".FALSE."/> <!-- real 6m files -->
-
-      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".FALSE."/> <!-- real yearly files -->
-      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".FALSE."/> <!-- real 2y files -->
-      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".FALSE."/> <!-- real 5y files -->
-      <file_group id="10y" output_freq="10y" output_level="10" enabled=".FALSE."/> <!-- real 10y files -->
-      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".FALSE."/> <!-- 1h files -->
-      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".FALSE."/> <!-- 2h files -->
-      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".FALSE."/> <!-- 3h files -->     
-      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".FALSE."/> <!-- 4h files -->
-      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".FALSE."/> <!-- 6h files -->
-     
    </file_definition>
     
@@ -130,4 +129,5 @@
       <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="-"  />
    </axis_definition> 
     
@@ -146,5 +146,4 @@
   </context>
 
-
   <context id="xios">
 
@@ -154,5 +153,5 @@
         We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
 -->
-	  <variable id="buffer_size"               type="integer">10000000</variable>
+	  <variable id="buffer_size"               type="integer">10155778</variable>
 	  <variable id="buffer_server_factor_size" type="integer">2</variable>
 	  <variable id="info_level"                type="integer">0</variable>
@@ -164,4 +163,3 @@
                
   </context>
-  
 </simulation>
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/param.cfg
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/param.cfg	(revision 4657)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/param.cfg	(revision 4924)
@@ -1,4 +1,4 @@
 #- forcing files storing 
-FORCING_DIR=~/FORCING
+FORCING_DIR=/data/scihub-users/piethi/WORKDIR/dev_r4650_UKMO2_ice_shelves_merge/NEMOGCM/SETTE/FORCING
 #- input files storing 
 INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
@@ -6,3 +6,3 @@
 #TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
 #- VALIDATION files storing 
-NEMO_VALIDATION_DIR=~/NEMO_VALIDATION
+NEMO_VALIDATION_DIR=/data/scihub-users/piethi/WORKDIR/dev_r4650_UKMO2_ice_shelves_merge/NEMOGCM/SETTE/NEMO_VALIDATION
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/prepare_exe_dir.sh
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/prepare_exe_dir.sh	(revision 4657)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/prepare_exe_dir.sh	(revision 4924)
@@ -71,4 +71,4 @@
 
 cp -r ${CONFIG_DIR}/${NEW_CONF}/EXP00/* ${EXE_DIR}/.
-#cp -r ${SETTE_DIR}/iodef_sette.xml ${EXE_DIR}/iodef.xml
+cp -r ${SETTE_DIR}/iodef_sette.xml ${EXE_DIR}/iodef.xml
 cd ${EXE_DIR}
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/prepare_job.sh
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/prepare_job.sh	(revision 4657)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/prepare_job.sh	(revision 4924)
@@ -182,22 +182,51 @@
 fi
 
-# example for NOCS Altix system using PBS batch submission (requires ${SETTE_DIR}/sette_batch_template file)
+# example for NOCS ClusterVision system using SLURM batch submission (requires ${SETTE_DIR}/sette_batch_template file)
 #
   #  if [ ${MPI_FLAG} == "no" ] ; then
 		case ${COMPILER} in 
-			ALTIX_NAUTILUS_MPT)
-                                NB_REM=$( echo $NB_PROC $NXIO_PROC | awk '{print ( $1 + $2 ) % 4}')
+			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 4
+					# number of processes required is an integer multiple of 16
 					#
-					NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{print ($1 + $2 ) / 4}')
+					NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{print ($1 + $2 ) / 16}')
 				else
 					#
-					# number of processes required is not an integer multiple of 4
+					# 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 ) / 4 + 1 )}')
+					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
+                                ;;
                         ifort_MERCATOR_CLUSTER)
                                 echo NB_PROCS ${NB_PROC}
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette.sh
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette.sh	(revision 4657)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette.sh	(revision 4924)
@@ -136,8 +136,10 @@
 # ORCA2_LIM_PISCES: 3 &  4
 # ORCA2_OFF_PISCES: 5 &  6
-# AMM12           : 7 &  8
-# SAS             : 9 & 10
-# ORCA2_AGRIF_LIM: 11
-for config in 1 2 3 4 5 6 7 8 9 10 11
+# ORCA2_LIM3      : 7 &  8
+# AMM12           : 9 & 10
+# SAS             :11 & 12
+# ISOMIP          :13 & 14
+# ORCA2_AGRIF_LIM :15
+for config in 9 10 #1 2 3 4 5 6 7 8 9 10 13 14 # 1 2 5 6 7 8 9 10 11 12 13 14
 
 do
@@ -629,6 +631,134 @@
 fi
 
+
+# TESTS FOR ORCA2_LIM3 CONFIGURATION
+if [ ${config} -eq 7 ] ;  then
+    ## Restartability tests for ORCA2_LIM3
+    export TEST_NAME="LONG"
+    cd ${CONFIG_DIR}
+    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3_LONG -r ORCA2_LIM3 -j 8 del_key ${DEL_KEYS}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=4
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"O2L3_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 150
+    set_namelist namelist_cfg nn_stock 75
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg nn_fwb 0
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 2
+    set_namelist namelist_cfg jpnij 4
+    set_namelist namelist_cfg nn_solv 2
+    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_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+    
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"O2L3_SHORT\"
+    set_namelist namelist_cfg nn_it000 76
+    set_namelist namelist_cfg nn_itend 150
+    set_namelist namelist_cfg nn_stock 75
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg nn_fwb 0
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 2
+    set_namelist namelist_cfg jpnij 4
+    set_namelist namelist_cfg nn_solv 2
+    set_namelist namelist_cfg cn_ocerst_in \"O2L3_LONG_00000075_restart\"
+    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3_LONG_00000075_restart_ice\"
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/O2L3_LONG_00000075_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/O2L3_LONG_00000075_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_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+fi
+
+if [ ${config} -eq 8 ] ;  then
+    ## Reproducibility tests for ORCA2_LIM3
+    export TEST_NAME="REPRO_4_4"
+    cd ${CONFIG_DIR}
+    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3_16 -r ORCA2_LIM3 -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    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 nn_it000 1
+    set_namelist namelist_cfg nn_itend 75
+    set_namelist namelist_cfg nn_fwb 0
+    set_namelist namelist_cfg ln_ctl .false.
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg jpnij 16
+    set_namelist namelist_cfg nn_solv 2
+    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_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_2_8"
+    . ./prepare_exe_dir.sh
+    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 nn_it000 1
+    set_namelist namelist_cfg nn_itend 75
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg nn_fwb 0
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg jpnij 16
+    set_namelist namelist_cfg nn_solv 2
+    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_LIM3.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 AMM12 CONFIGURATION
-if [ ${config} -eq 7 ] ;  then
+if [ ${config} -eq 9 ] ;  then
     ## Restartability tests for AMM12
     export TEST_NAME="LONG"
@@ -692,5 +822,5 @@
 fi
 
-if [ ${config} -eq 8 ] ;  then
+if [ ${config} -eq 10 ] ;  then
 ## Reproducibility tests for AMM12
     export TEST_NAME="REPRO_8_4"
@@ -748,5 +878,5 @@
 
 # TESTS FOR ORCA2_SAS_LIM CONFIGURATION
-if [ ${config} -eq 9 ] ;  then
+if [ ${config} -eq 11 ] ;  then
     ## Restartability tests for SAS
     export TEST_NAME="LONG"
@@ -810,5 +940,5 @@
 fi
 
-if [ ${config} -eq 10 ] ;  then
+if [ ${config} -eq 12 ] ;  then
 ## Reproducibility tests for ORCA2_SAS_LIM
     export TEST_NAME="REPRO_8_4"
@@ -864,7 +994,138 @@
     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
 fi
+# TESTS FOR ISOMIP CONFIGURATION
+if [ ${config} -eq 13 ] ;  then
+    ## Restartability tests for ISOMIP
+    export TEST_NAME="LONG"
+    cd ${CONFIG_DIR}
+    . ./makenemo -m ${CMP_NAM} -n ISOMIP_LONG -r ISOMIP -j 8 del_key ${DEL_KEYS}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=4
+    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 ln_clobber .true.
+    set_namelist namelist_cfg nn_fwb 0
+    set_namelist namelist_cfg nn_solv 2
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 2
+    set_namelist namelist_cfg jpnij 4
+    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}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    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 ln_clobber .true.
+    set_namelist namelist_cfg nn_fwb 0
+    set_namelist namelist_cfg nn_solv 2
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 2
+    set_namelist namelist_cfg jpnij 4
+    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
+    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}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+fi
+if [ ${config} -eq 14 ] ;  then
+    ## Reproducibility tests for ISOMIP
+    export TEST_NAME="REPRO_1_4"
+    cd ${CONFIG_DIR}
+    . ./makenemo -m ${CMP_NAM} -n ISOMIP_4 -r ISOMIP -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=4
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"ISOMIP_14\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 48
+    set_namelist namelist_cfg nn_fwb 0
+    set_namelist namelist_cfg nn_bench 0
+    set_namelist namelist_cfg ln_ctl .false.
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg nn_solv 2
+    set_namelist namelist_cfg jpni 1
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg jpnij 4
+    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}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_2_2"
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=4
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"ISOMIP_22\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 48
+    set_namelist namelist_cfg nn_fwb 0
+    set_namelist namelist_cfg ln_ctl .false.
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg nn_solv 2
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 2
+    set_namelist namelist_cfg jpnij 4
+    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}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+fi
 
 # TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
-if [ ${config} -eq 11 ] ;  then
+if [ ${config} -eq 15 ] ;  then
     ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
     export TEST_NAME="SHORT"
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette_beginner.sh
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette_beginner.sh	(revision 4657)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette_beginner.sh	(revision 4924)
@@ -4,5 +4,5 @@
 # Contact : sflod@locean-ipsl.upmc.fr
 #
-# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
+# sette_beginner.sh   : example of script of SET TEsts for NEMO (SETTE)
 # ----------------------------------------------------------------------
 # NEMO/SETTE , NEMO Consortium (2010)
@@ -21,26 +21,102 @@
 # ===================
 #
-# ----------------------------------------------
-# Set of tests for NEMO for beginners
-# ----------------------------------------------
+# 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"
 #
-# SYNOPSIS
-# ========
+# Principal script is sette.sh, that calls 
 #
-# ::
+#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe 
+#              and links to opa in ${CONFIG_NAME}/EXP00)
 #
-#  $ ./sette_beginner.sh
+#  param.cfg : sets and loads following directories:
 #
-# DESCRIPTION
-# ===========
-# First simple example of how to use SETTE: create GYRE_SHORT configuration, compile it with 1 proc, and test it for a SHORT test: 5days
-#-
+#   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 
+#                      (solver.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=macport_osx
+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
@@ -54,7 +130,5 @@
 # Copy job_batch_COMPILER file for specific compiler into job_batch_template
 cd ${SETTE_DIR}
-##if [ ${INTERACT_FLAG} == no ] ;  then
-    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
-##fi 
+cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
 
 # Run for GYRE CONFIG
@@ -63,13 +137,14 @@
 export TEST_NAME="SHORT_TEST"
 cd ${CONFIG_DIR}
-. ./makenemo -m ${CMP_NAM} -n GYRE_SHORT -r GYRE -j 10 add_key "key_mpp_mpi key_nosignedzero"
+. ./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
+. ./param.cfg 
+. ./all_functions.sh
+. ./prepare_exe_dir.sh
 # creation of execution directory
-. prepare_exe_dir.sh
 JOB_FILE=${EXE_DIR}/run_job.sh
+# setting number of procs used
 NPROC=4
-\rm $JOB_FILE
+if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
 cd ${EXE_DIR}
 # setting namelist parameters
@@ -82,7 +157,11 @@
 # 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}
+. ./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}   
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette_rpt
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette_rpt	(revision 4657)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette_rpt	(revision 4924)
@@ -17,9 +17,6 @@
   cd $NEMO_VALID
 #
-# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory
-# found in the WGYRE_LONG directory
-#
-  set dorv = `ls -1rtd ./WGYRE_LONG/{$mach}/* | tail -1l `
-  set dorv = $dorv:t
+# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory
+#
 #
 # Now loop through all the test directories. On the second pass the user can optionally examine any mismatched
@@ -30,4 +27,6 @@
 foreach pass (0 1 )
   if ( -d ./WGYRE_LONG ) then
+    set dorv = `ls -1rtd ./WGYRE_LONG/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
     set f1o = ./WGYRE_LONG/{$mach}/{$dorv}/LONG/ocean.output
     set f1s = ./WGYRE_LONG/{$mach}/{$dorv}/LONG/solver.stat
@@ -39,22 +38,54 @@
     cmp -s f1.tmp$$ $f2s
     if ( $status == 0 ) then
-      echo "GYRE     restartability  passed"
-    else
-      echo "GYRE     restartability  FAILED"
-      if ( $pass == 1 ) then
-        echo "<return> to view solver.stat differences"
-        set y = $<
-        sdiff f1.tmp$$ $f2s
-        echo "<return> to view ocean.output differences"
-        set y = $<
-        sdiff $f1o $f2o | grep "|"
-        echo "<return> to continue"
-        set y = $<
-      endif
-    endif
-    rm f1.tmp$$
-  endif
+      echo "GYRE        restartability  passed"
+    else
+      echo "GYRE        restartability  FAILED"
+      if ( $pass == 1 ) then
+        echo "<return> to view solver.stat differences"
+        set y = $<
+        sdiff f1.tmp$$ $f2s
+        echo "<return> to view ocean.output differences"
+        set y = $<
+        sdiff $f1o $f2o | grep "|"
+        echo "<return> to continue"
+        set y = $<
+      endif
+    endif
+    rm f1.tmp$$
+  endif
+
+  if ( -d ./WISOMIP_LONG ) then
+    set dorv = `ls -1rtd ./WISOMIP_LONG/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
+    set f1o = ./WISOMIP_LONG/{$mach}/{$dorv}/LONG/ocean.output
+    set f1s = ./WISOMIP_LONG/{$mach}/{$dorv}/LONG/solver.stat
+    set f2o = ./WISOMIP_LONG/{$mach}/{$dorv}/SHORT/ocean.output
+    set f2s = ./WISOMIP_LONG/{$mach}/{$dorv}/SHORT/solver.stat
+
+    set nl = `wc -l $f2s`
+    tail -$nl[1] $f1s > f1.tmp$$
+    cmp -s f1.tmp$$ $f2s
+    if ( $status == 0 ) then
+      echo "ISOMIP      restartability  passed"
+    else
+      echo "ISOMIP      restartability  FAILED"
+      if ( $pass == 1 ) then
+        echo "<return> to view solver.stat differences"
+        set y = $<
+        sdiff f1.tmp$$ $f2s
+        echo "<return> to view ocean.output differences"
+        set y = $<
+        sdiff $f1o $f2o | grep "|"
+        echo "<return> to continue"
+        set y = $<
+      endif
+    endif
+    rm f1.tmp$$
+  endif
+
   
   if ( -d ./WORCA2LIMPIS_LONG ) then
+    set dorv = `ls -1rtd ./WORCA2LIMPIS_LONG/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
     set f1o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output
     set f1s = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/solver.stat
@@ -84,4 +115,6 @@
 
   if ( -d ./WORCA2OFFPIS_LONG ) then
+    set dorv = `ls -1rtd ./WORCA2OFFPIS_LONG/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
     set f1o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output
     set f1s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/tracer.stat
@@ -111,4 +144,6 @@
   
   if ( -d ./WAMM12_LONG ) then
+    set dorv = `ls -1rtd ./WAMM12_LONG/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
     set f1o = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/ocean.output
     set f1s = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/solver.stat
@@ -136,8 +171,75 @@
     rm f1.tmp$$
   endif
-
+  if ( -d ./WORCA2LIM3_LONG ) then
+    set dorv = `ls -1rtd ./WORCA2LIM3_LONG/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
+    set f1o = ./WORCA2LIM3_LONG/{$mach}/{$dorv}/LONG/ocean.output
+    set f1s = ./WORCA2LIM3_LONG/{$mach}/{$dorv}/LONG/solver.stat
+    set f2o = ./WORCA2LIM3_LONG/{$mach}/{$dorv}/SHORT/ocean.output
+    set f2s = ./WORCA2LIM3_LONG/{$mach}/{$dorv}/SHORT/solver.stat
+
+    set nl = `wc -l $f2s`
+    tail -$nl[1] $f1s > f1.tmp$$
+    cmp -s f1.tmp$$ $f2s
+    if ( $status == 0 ) then
+      echo "ORCA2LIM3       restartability  passed"
+    else
+      echo "ORCA2LIM3       restartability  FAILED"
+      if ( $pass == 1 ) then
+        echo "<return> to view solver.stat differences"
+        set y = $<
+        sdiff f1.tmp$$ $f2s
+        echo "<return> to view ocean.output differences"
+        set y = $<
+        sdiff $f1o $f2o | grep "|"
+        echo "<return> to continue"
+        set y = $<
+      endif
+    endif
+    rm f1.tmp$$
+  endif
+NEXT0:
+  if ( -d ./WSAS_LONG ) then
+    set dorv = `ls -1rtd ./WSAS_LONG/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
+    set f1o = ./WSAS_LONG/{$mach}/{$dorv}/LONG/ocean.output
+    set f1s = ./WSAS_LONG/{$mach}/{$dorv}/LONG/solver.stat
+    set f2o = ./WSAS_LONG/{$mach}/{$dorv}/SHORT/ocean.output
+    set f2s = ./WSAS_LONG/{$mach}/{$dorv}/SHORT/solver.stat
+
+    foreach f ( $f1o $f1s $f2o $f2s )
+     if ( ! -f $f ) then
+      echo 'SAS         restartability  inconclusive ( ' $f:t ' not found )'
+      goto NEXT
+     endif
+    end
+
+    set nl = `wc -l $f2s`
+    tail -$nl[1] $f1s > f1.tmp$$
+    cmp -s f1.tmp$$ $f2s
+    if ( $status == 0 ) then
+      echo "SAS         restartability  passed"
+    else
+      echo "SAS         restartability  FAILED"
+      if ( $pass == 1 ) then
+        echo "<return> to view solver.stat differences"
+        set y = $<
+        sdiff f1.tmp$$ $f2s
+        echo "<return> to view ocean.output differences"
+        set y = $<
+        sdiff $f1o $f2o | grep "|"
+        echo "<return> to continue"
+        set y = $<
+      endif
+    endif
+    rm f1.tmp$$
+  endif
+
+NEXT:
 echo
   
   if ( -d ./WGYRE_4 ) then
+    set dorv = `ls -1rtd ./WGYRE_4/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
     set f1o = ./WGYRE_4/{$mach}/{$dorv}/REPRO_1_4/ocean.output
     set f1s = ./WGYRE_4/{$mach}/{$dorv}/REPRO_1_4/solver.stat
@@ -147,21 +249,49 @@
     cmp -s $f1s $f2s
     if ( $status == 0 ) then
-      echo "GYRE     reproducibility passed"
-    else
-      echo "GYRE     reproducibility FAILED"
-      if ( $pass == 1 ) then
-        echo "<return> to view solver.stat differences"
-        set y = $<
-        sdiff $f1s $f2s
-        echo "<return> to view ocean.output differences"
-        set y = $<
-        sdiff $f1o $f2o | grep "|"
-        echo "<return> to continue"
-        set y = $<
-      endif
-    endif
-  endif
-  
+      echo "GYRE        reproducibility passed"
+    else
+      echo "GYRE        reproducibility FAILED"
+      if ( $pass == 1 ) then
+        echo "<return> to view solver.stat differences"
+        set y = $<
+        sdiff $f1s $f2s
+        echo "<return> to view ocean.output differences"
+        set y = $<
+        sdiff $f1o $f2o | grep "|"
+        echo "<return> to continue"
+        set y = $<
+      endif
+    endif
+  endif
+
+  if ( -d ./WISOMIP_4 ) then
+    set dorv = `ls -1rtd ./WISOMIP_4/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
+    set f1o = ./WISOMIP_4/{$mach}/{$dorv}/REPRO_1_4/ocean.output
+    set f1s = ./WISOMIP_4/{$mach}/{$dorv}/REPRO_1_4/solver.stat
+    set f2o = ./WISOMIP_4/{$mach}/{$dorv}/REPRO_2_2/ocean.output
+    set f2s = ./WISOMIP_4/{$mach}/{$dorv}/REPRO_2_2/solver.stat
+
+    cmp -s $f1s $f2s
+    if ( $status == 0 ) then
+      echo "ISOMIP      reproducibility passed"
+    else
+      echo "ISOMIP      reproducibility FAILED"
+      if ( $pass == 1 ) then
+        echo "<return> to view solver.stat differences"
+        set y = $<
+        sdiff $f1s $f2s
+        echo "<return> to view ocean.output differences"
+        set y = $<
+        sdiff $f1o $f2o | grep "|"
+        echo "<return> to continue"
+        set y = $<
+      endif
+    endif
+  endif
+ 
   if ( -d ./WORCA2LIMPIS_16 ) then
+    set dorv = `ls -1rtd ./WORCA2LIMPIS_16/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
     set f1o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
     set f1s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/solver.stat
@@ -188,4 +318,6 @@
 
   if ( -d ./WORCA2OFFPIS_16 ) then
+    set dorv = `ls -1rtd ./WORCA2OFFPIS_16/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
     set f1o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
     set f1s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/tracer.stat
@@ -212,4 +344,6 @@
   
   if ( -d ./WAMM12_32 ) then
+    set dorv = `ls -1rtd ./WAMM12_32/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
     set f1o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/ocean.output
     set f1s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/solver.stat
@@ -234,6 +368,68 @@
     endif
   endif
+  if ( -d ./WORCA2LIM3_16 ) then
+    set dorv = `ls -1rtd ./WORCA2LIM3_16/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
+    set f1o = ./WORCA2LIM3_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
+    set f1s = ./WORCA2LIM3_16/{$mach}/{$dorv}/REPRO_2_8/solver.stat
+    set f2o = ./WORCA2LIM3_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output
+    set f2s = ./WORCA2LIM3_16/{$mach}/{$dorv}/REPRO_4_4/solver.stat
+
+    cmp -s $f1s $f2s
+    if ( $status == 0 ) then
+      echo "ORCA2LIM3   reproducibility passed"
+    else
+      echo "ORCA2LIM3   reproducibility FAILED"
+      if ( $pass == 1 ) then
+        echo "<return> to view solver.stat differences"
+        set y = $<
+        sdiff $f1s $f2s
+        echo "<return> to view ocean.output differences"
+        set y = $<
+        sdiff $f1o $f2o | grep "|"
+        echo "<return> to continue"
+        set y = $<
+      endif
+    endif
+  endif
+
+
+  if ( -d ./WSAS_32 ) then
+    set dorv = `ls -1rtd ./WSAS_32/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
+    set f1o = ./WSAS_32/{$mach}/{$dorv}/REPRO_4_8/ocean.output
+    set f1s = ./WSAS_32/{$mach}/{$dorv}/REPRO_4_8/solver.stat
+    set f2o = ./WSAS_32/{$mach}/{$dorv}/REPRO_8_4/ocean.output
+    set f2s = ./WSAS_32/{$mach}/{$dorv}/REPRO_8_4/solver.stat
+
+    foreach f ( $f1o $f1s $f2o $f2s )
+     if ( ! -f $f ) then
+      echo 'SAS         reproducibility inconclusive ( ' $f:t ' not found )'
+      goto NEXT1
+     endif
+    end
+
+    cmp -s $f1s $f2s
+    if ( $status == 0 ) then
+      echo "SAS reproducibility passed"
+    else
+      echo "SAS reproducibility FAILED"
+      if ( $pass == 1 ) then
+        echo "<return> to view solver.stat differences"
+        set y = $<
+        sdiff $f1s $f2s
+        echo "<return> to view ocean.output differences"
+        set y = $<
+        sdiff $f1o $f2o | grep "|"
+        echo "<return> to continue"
+        set y = $<
+      endif
+    endif
+  endif
+NEXT1:
 
   if ( -d ./WORCA2AGUL_1_2 ) then
+    set dorv = `ls -1rtd ./WORCA2AGUL_1_2/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
     set f1o = ./WORCA2AGUL_1_2/{$mach}/{$dorv}/SHORT/ocean.output
     set f1s = ./WORCA2AGUL_1_2/{$mach}/{$dorv}/SHORT/solver.stat
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette_xios.sh
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette_xios.sh	(revision 4657)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/SETTE/sette_xios.sh	(revision 4924)
@@ -1,11 +1,11 @@
 #!/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)
+# 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 (2010)
+# NEMO/SETTE , NEMO Consortium (2014)
 # Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
 # ----------------------------------------------------------------------
@@ -29,15 +29,11 @@
 # 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 
+#                      "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="no"
-#
-# Principal script is sette.sh, that calls 
+#                     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 
@@ -81,12 +77,12 @@
 #        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 
+#  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=tobedefined
+COMPILER=
 export BATCH_COMMAND_PAR="llsubmit"
 export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
@@ -103,17 +99,31 @@
 
 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 2  
+for config in 1 2  
 
 do
 
-# TESTS FOR GYRE CONFIGURATION
+#==========================================================
+# TESTS FOR XIOS USING GYRE CONFIGURATION AT LOW RESOLUTION
+#==========================================================
+
 if [ ${config} -eq 1 ] ;  then
-    ## Restartability tests for GYRE
+    ## 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"
@@ -124,7 +134,7 @@
     . ../CONFIG/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
+    . ./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
@@ -133,9 +143,13 @@
     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 ln_clobber .true.
-    set_namelist namelist_cfg jp_cfg 1
-    set_namelist namelist_cfg jpni 2
-    set_namelist namelist_cfg jpnj 2
+    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
 
@@ -149,4 +163,6 @@
     . ./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"
@@ -154,5 +170,5 @@
     export USING_MPMD="false"
     cd ${SETTE_DIR} 
-    . prepare_exe_dir.sh
+    . ./prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
@@ -161,9 +177,13 @@
     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 ln_clobber .true.
-    set_namelist namelist_cfg jp_cfg 1
-    set_namelist namelist_cfg jpni 2
-    set_namelist namelist_cfg jpnj 2
+    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
 
@@ -177,4 +197,8 @@
     . ./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"
@@ -182,5 +206,6 @@
     export USING_MPMD="true"
     cd ${SETTE_DIR}
-    . prepare_exe_dir.sh
+#
+    . ./prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
@@ -189,9 +214,13 @@
     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 ln_clobber .true.
-    set_namelist namelist_cfg jp_cfg 1
-    set_namelist namelist_cfg jpni 2
-    set_namelist namelist_cfg jpnj 2
+    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
 
@@ -204,4 +233,9 @@
     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"
@@ -209,5 +243,5 @@
     export USING_MPMD="true"
     cd ${SETTE_DIR}
-    . prepare_exe_dir.sh
+    . ./prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
@@ -216,9 +250,13 @@
     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 ln_clobber .true.
-    set_namelist namelist_cfg jp_cfg 1
-    set_namelist namelist_cfg jpni 2
-    set_namelist namelist_cfg jpnj 2
+    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
 
@@ -234,8 +272,16 @@
 fi
 
+#==========================================================
+# TESTS FOR XIOS USING GYRE CONFIGURATION AT HIGH RESOLUTION
+#==========================================================
+
 if [ ${config} -eq 2 ] ;  then
-    ## Restartability tests for GYRE
-
-    NPROC=152
+    ## 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"
@@ -246,7 +292,9 @@
     . ../CONFIG/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
+#
+    . ./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
@@ -258,7 +306,11 @@
     set_namelist namelist_cfg nn_bench 1
     set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg jp_cfg 144
-    set_namelist namelist_cfg jpni 19
-    set_namelist namelist_cfg jpnj 8
+    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
 
@@ -273,4 +325,5 @@
 
 
+    ## Test of XIOS configured in attached mode with a single output file. 
 
     export TEST_NAME="ATTACHED_ONE"
@@ -278,5 +331,7 @@
     export USING_MPMD="false"
     cd ${SETTE_DIR}
-    . prepare_exe_dir.sh
+#
+    . ./prepare_exe_dir.sh
+#
     JOB_FILE=${EXE_DIR}/run_job.sh
     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
@@ -288,7 +343,11 @@
     set_namelist namelist_cfg nn_bench 1
     set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg jp_cfg 144
-    set_namelist namelist_cfg jpni 19
-    set_namelist namelist_cfg jpnj 8
+    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
 
@@ -301,4 +360,9 @@
     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"
@@ -306,5 +370,7 @@
     export USING_MPMD="true"
     cd ${SETTE_DIR}
-    . prepare_exe_dir.sh
+#
+    . ./prepare_exe_dir.sh
+#
     JOB_FILE=${EXE_DIR}/run_job.sh
     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
@@ -316,7 +382,11 @@
     set_namelist namelist_cfg nn_bench 1
     set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg jp_cfg 144
-    set_namelist namelist_cfg jpni 19
-    set_namelist namelist_cfg jpnj 8
+    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
 
@@ -329,4 +399,8 @@
     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"
@@ -334,5 +408,5 @@
     export USING_MPMD="true"
     cd ${SETTE_DIR}
-    . prepare_exe_dir.sh
+    . ./prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
@@ -344,7 +418,11 @@
     set_namelist namelist_cfg nn_bench 1
     set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg jp_cfg 144
-    set_namelist namelist_cfg jpni 19
-    set_namelist namelist_cfg jpnj 8
+    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
 
