Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/README
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/README	(revision 5094)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/README	(revision 5095)
@@ -80,2 +80,66 @@
 2. create you own batch file like: batch-${COMPILER}
 (note: sette.sh will copy it in job_batch_template if you run tests in INTERACT_FLAG="no")
+
+# 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 opa 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 
+#                      (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
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/all_functions.sh
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/all_functions.sh	(revision 5094)
+++ 	(revision )
@@ -1,395 +1,0 @@
-######################################################
-# 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_lim2 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\" "
-
-# 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
-# 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
-
-        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=$3:"  ${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 () {
-#
-# 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_VALIDATION_DIR}"
-echo "NEW CONFIGURATION is : ${NEW_CONF}"
-echo "COMPILER is : ${CMP_NAM}"
-echo "TEST is : ${TEST_NAME}"
-################################################################
-# SMALL DEBUG
-    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 2
-    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 1
-    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
-    export LANG=en_US 
-    cd ${CONFIG_DIR}
-    cd ../
-    REVISION_NB=`svn info | grep -i "Revision:" | sed -e "s/ //" | cut -d ":" -f 2`
-    if [ ${#REVISION_NB} -eq 0 ]
-    then
-    	echo "some problems with svn info command"
-    	echo "some problems with svn 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
-    cd ${NEMO_VALIDATION_DIR}
-    `mkdir -p ${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME}`
-    NEMO_VALID=${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME}
-    if [ -d ${NEMO_VALID} ] ; then
-	echo "created ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette
-    else 
-	echo "problems in creating ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette
-	echo "EXIT,"
-	exit 1
-    fi
-    # Save output & debug files in NEMO_VALIDATION tree
-    echo "saving ocean & ice output, solver.stat, tracer.stat files ...." >> ${SETTE_DIR}/output.sette
-    echo "            " >> ${SETTE_DIR}/output.sette
-    [ -f ${EXE_DIR}/ocean.output ] && cp ${EXE_DIR}/*ocean.output ${NEMO_VALID}/.
-    [ -f ${EXE_DIR}/solver.stat ] && cp ${EXE_DIR}/*solver.stat ${NEMO_VALID}/.
-    [ -f ${EXE_DIR}/output.namelist.dyn ] && cp ${EXE_DIR}/*output.nam* ${NEMO_VALID}/.
-    [ -f ${EXE_DIR}/tracer.stat ] && cp ${EXE_DIR}/*tracer.stat ${NEMO_VALID}/.
-
-    if [ -n "$(ls ${NEMO_VALID}/*solver*)" ] ; then
-	echo "moved solver.stat in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
-	echo "moved solver.stat in ${NEMO_VALID} directory"  
-    else
-	echo "problem in looking for solver.stat file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
-	echo "solver.stat IS NOT in ${NEMO_VALID} directory" 
-    fi
-    if [ -n "$(ls ${NEMO_VALID}/*ocean.output*)" ] ; then
-	echo "moved ocean.output in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
-	echo "moved ocean.output in ${NEMO_VALID} directory" 
-    else
-	echo "problem in looking for ocean.output file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
-	echo "ocean.output IS NOT in ${NEMO_VALID} directory" 
-    fi
-    if [ -n "$(ls ${NEMO_VALID}/*tracer.stat*)" ] ; then
-        echo "moved tracer.stat in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
-        echo "moved tracer.stat in ${NEMO_VALID} directory"
-    else
-        echo "problem in looking for tracer.stat file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
-        echo "tracer.stat IS NOT in ${NEMO_VALID} 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
-#
-#############################################################
-
-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"
-
-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.*=.*boolean" ${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: boolean 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
-}
-
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-ALTIX_NAUTILUS_MPT
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-ALTIX_NAUTILUS_MPT	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-ALTIX_NAUTILUS_MPT	(revision 5095)
@@ -0,0 +1,92 @@
+#!/bin/bash 
+#!
+#PBS -N NEMO
+#PBS -l select=NODES:ncpus=8:mpiprocs=4
+#PBS -l place=scatter:excl
+#PBS -l walltime=00:59:00
+#PBS -q nemo
+#PBS -W group_list=nemo
+#PBS -j oe
+#
+  OCEANCORES=NPROCS
+  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 ALTIX ICE 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
+#
+  module load mpt/2.03
+  export MPT_HOME=/opt/sgi/mpt/mpt-2.03
+  export NC4_HOME=/noc/users/jeff/packages/netcdf4/netcdf-4.1.3/xSSE2/intel11.1
+  export HD5_HOME=/noc/users/jeff/packages/hdf5/hdf5-1.8.7/xSSE2/intel11.1
+  export IFT_HOME=/sw/Intel/fce/11.1.072
+  export SVN_HOME=/nerc/packages/subversion/v1.7.2
+#
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo PBS job ID is $PBS_JOBID
+  echo This jobs runs on the following machines:
+  echo `cat $PBS_NODEFILE | uniq`
+# 
+# Create a machine file for MPI
+  cat $PBS_NODEFILE | uniq > host.file.$PBS_JOBID
+#
+  echo export LD_LIBRARY_PATH=${MPT_HOME}/lib:${IFT_HOME}/lib:${NC4_HOME}/lib:${HD5_HOME}/lib:${SVN_HOME}/lib
+  export LD_LIBRARY_PATH=${MPT_HOME}/lib:${IFT_HOME}/lib:${NC4_HOME}/lib:${HD5_HOME}/lib:${SVN_HOME}/lib
+# 
+  echo export PATH=${MPT_HOME}/bin:${SVN_HOME}/bin:$PATH
+  export PATH=${MPT_HOME}/bin:${SVN_HOME}/bin:$PATH
+#
+  export PSM_SHAREDPORTS=1
+  echo export MPI_PPN=4
+  echo export MPI_PPN_CLIST="2-3-6-7-0-1-4-5"
+  echo export OMP_NUM_THREADS=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
+# (half-populated on the NOCS ALTIX system) 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 $PBS_O_WORKDIR
+  cd $EXE_DIR
+  echo Directory is `pwd`
+#
+#
+#  Run the parallel MPI executable 
+#
+  echo "Running time ${MPT_HOME}/bin/mpiexec_mpt -np " $OCEANCORES " ./opa"
+#
+  time ${MPT_HOME}/bin/mpiexec_mpt -np $OCEANCORES ./opa
+#
+  post_test_tidyup
+# END_BODY
+# Don't remove neither change the previous line
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-IBM_EKMAN_INGV
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-IBM_EKMAN_INGV	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-IBM_EKMAN_INGV	(revision 5095)
@@ -0,0 +1,79 @@
+#!/bin/bash 
+#!
+#BSUB -q long
+#BSUB -n 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
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM (EKMAN at INGV)
+#
+
+ export MPIRUN="mpirun -n $OCEANCORES"
+
+#export MPIRUN="mpirun -np"
+
+#
+# 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} " $OCEANCORES " ./opa"
+#
+
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./opa
+  else
+     time ./opa
+  fi
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line 
+
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW6_CALYPSO
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW6_CALYPSO	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW6_CALYPSO	(revision 5095)
@@ -0,0 +1,80 @@
+#!/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 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 " ./opa"
+#
+
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./opa
+  else
+     time ./opa
+  fi
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line 
+
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW6_VARGAS
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW6_VARGAS	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW6_VARGAS	(revision 5095)
@@ -0,0 +1,79 @@
+#!/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 = 1: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 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
+     time ${MPIRUN} ./opa
+  else
+     time ./opa
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW7_METO
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW7_METO	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW7_METO	(revision 5095)
@@ -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
+# @ 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 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 "./opa" > ./alltasks
+     while [ $n -lt $OCEANCORES ]
+     do
+       echo "./opa" >> ./alltasks
+       n=$(( $n + 1 ))
+     done
+     time ${MPIRUN} ./alltasks
+  else
+     time ./opa
+  fi
+
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous comment line
+
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW7_MONSOON
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW7_MONSOON	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-PW7_MONSOON	(revision 5095)
@@ -0,0 +1,89 @@
+#!/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 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 "./opa" > ./alltasks
+     while [ $n -lt $OCEANCORES ]
+     do
+       echo "./opa" >> ./alltasks
+       n=$(( $n + 1 ))
+     done
+     time ${MPIRUN} ./alltasks
+  else
+     time ./opa
+  fi
+
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous comment line
+
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_ADA
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_ADA	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_ADA	(revision 5095)
@@ -0,0 +1,81 @@
+#!/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"
+
+#
+# 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/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_ADA_O0
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_ADA_O0	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_ADA_O0	(revision 5095)
@@ -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/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_CURIE
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_CURIE	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_CURIE	(revision 5095)
@@ -0,0 +1,81 @@
+#!/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
+
+#======   Thin nodes (1 node = 2 * 8 procs) :   
+#MSUB -n NPROCS              # Total number of mpi task to use
+####  #MSUB -N 2                   # number of nodes to use
+#MSUB -A gen0826             # project name
+#MSUB -q standard            # (queue name) only for thin nodes
+##########################################################################
+#
+# 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="mpirun -np $OCEANCORES"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# modules to load
+module unload netcdf
+module unload hdf5
+module load netcdf/4.2_hdf5_parallel
+module load hdf5/1.8.9_parallel
+
+# 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
+     time ${MPIRUN} ./opa
+  else
+     time ./opa
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
+
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_MOBILIS
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_MOBILIS	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_MOBILIS	(revision 5095)
@@ -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/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_TITANE
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_TITANE	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-X64_TITANE	(revision 5095)
@@ -0,0 +1,72 @@
+#!/bin/bash 
+#!
+#MSUB -T 3600                # Limite de temps elapsed du job ici 3600s
+#MSUB -r SETTE_JOB           # Nom du job                
+#MSUB -n NPROCS              # Reservation de NPROCS(number of processus)
+##########################################################################
+#
+# 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="mpirun -np $OCEANCORES"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# modules to load
+module load netcdf
+
+# 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 
+#
+  if [ MPI_FLAG == "yes" ]; then
+  echo "Running time ${MPIRUN} ./opa"
+     time ${MPIRUN} ./opa
+  else
+  echo "Running time ./opa"
+     time ./opa
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
+
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-XC_ARCHER_INTEL
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-XC_ARCHER_INTEL	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-XC_ARCHER_INTEL	(revision 5095)
@@ -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/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-athena-xios
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-athena-xios	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-athena-xios	(revision 5095)
@@ -0,0 +1,80 @@
+#!/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 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 " ./opa"
+#
+
+  if [ MPI_FLAG == "yes" ]; then
+     time ${MPIRUN} ./opa
+  else
+     time ./opa
+  fi
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line 
+
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-gfortran_athena_xios
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-gfortran_athena_xios	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-gfortran_athena_xios	(revision 5095)
@@ -0,0 +1,127 @@
+#!/bin/bash 
+#!
+#BSUB -q poe_short
+#BSUB -n TOTAL_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
+  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"
+
+export MPIRUN="mpirun.lsf"
+export LANG=en_US
+export NLSPATH=/opt/ibmhpc/pecurrent/base/msg/%L/%N:$NLSPATH
+export MP_LABELIO=yes
+export MP_STDOUTMODE=unordered
+export MP_EUILIB=us
+export MP_INFOLEVEL=0
+export MP_EUIDEVELOP=min
+export MP_INSTANCES=1
+export MP_SHARED_MEMORY=yes
+export MP_EAGER_LIMIT_LOCAL=2000000000
+export MP_EUIDEVICE=sn_single
+export MP_BULK_MIN_MSG_SIZE=16384
+export MP_POLLING_INTERVAL=1000000
+export MP_DEVTYPE=ib
+export MP_EAGER_LIMIT=262144
+export MP_TASK_AFFINITY=core
+export MP_BINDPROC=yes
+export MP_DEBUG_CHECK_PARAM=no
+export MP_MSG_API=mpi
+export MP_USE_BULK_XFER=yes
+export MP_WAIT_MODE=poll
+export LDR_CNTRL=TEXTPSIZE=64K@STACKPSIZE=64K@DATAPSIZE=64K
+export LD_LIBRARY_PATH=/users/home/ans040/local/lib:${LD_LIBRARY_PATH}
+
+XIOS_SERVER_PATHNAME="/users/home/ans040/SOFTWARE/XIOS/trunk/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 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 " ./opa"
+#
+
+  if [ MPI_FLAG == "yes" ]; then
+     if [ $XIOS_NUMPROCS -eq 0 ]; then
+       time ${MPIRUN} ./opa
+     else
+
+       export MP_PGMMODEL=mpmd
+       export MP_CMDFILE=xioscmdfile
+       rm xioscmdfile &> /dev/null
+       touch xioscmdfile
+       k=0
+       while (( k < $OCEANCORES )) ; do
+          echo ./opa >> 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 ./opa
+  fi
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line 
+
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-ifort_MERCATOR_CLUSTER
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-ifort_MERCATOR_CLUSTER	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-ifort_MERCATOR_CLUSTER	(revision 5095)
@@ -0,0 +1,74 @@
+#!/bin/bash 
+#!
+#PBS -N sette
+#PBS -e sette.$PBS_JOBID.err
+#PBS -o sette.$PBS_JOBID.out
+#PBS -l nodes=NODES:ppn=NPROC_NODE
+#PBS -q QUEUE
+#PBS -l walltime=03:00:00
+#PBS -l pvmem=5gb
+
+#
+# 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 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
+     mpirun -np $OCEANCORES ./opa
+  else
+     time ./opa
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-macport_osx
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-macport_osx	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-macport_osx	(revision 5095)
@@ -0,0 +1,81 @@
+#!/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 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} ./opa"
+     time ${MPIRUN} ./opa
+  else
+  echo "Running time./opa"
+     time ./opa
+  fi
+
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous comment line
+
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-mpmd-ALTIX_NAUTILUS_MPT
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-mpmd-ALTIX_NAUTILUS_MPT	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/batch-mpmd-ALTIX_NAUTILUS_MPT	(revision 5095)
@@ -0,0 +1,105 @@
+#!/bin/bash 
+#!
+#PBS -N NEMO
+#PBS -l select=NODES:ncpus=8:mpiprocs=4
+#PBS -l place=scatter:excl
+#PBS -l walltime=00:59:00
+#PBS -q nemo
+#PBS -W group_list=nemo
+#PBS -j oe
+#
+  OCEANCORES=NPROCS
+  XIOCORES=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 ALTIX ICE 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
+#
+  module load mpt/2.03
+  export MPT_HOME=/opt/sgi/mpt/mpt-2.03
+  export NC4_HOME=/fibre/omfman/NETCDF_PAR
+  export HD5_HOME=/fibre/omfman/NETCDF_PAR
+  export XIO_HOME=/fibre/omfman/XIOS
+  export SVN_HOME=/nerc/packages/subversion/v1.7.2
+  export FTN_LIB=/sw/Intel/fce/11.1.072/lib/intel64
+  export ICC_LIB=/sw/Intel/cce/11.1.072/lib/intel64
+#
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo PBS job ID is $PBS_JOBID
+  echo This jobs runs on the following machines:
+  echo `cat $PBS_NODEFILE | uniq`
+# 
+# Create a machine file for MPI
+  cat $PBS_NODEFILE | uniq > host.file.$PBS_JOBID
+#
+  echo export LD_LIBRARY_PATH=${MPT_HOME}/lib:${ICC_LIB}:${FTN_LIB}:${NC4_HOME}/lib:${HD5_HOME}/lib:${SVN_HOME}/lib:${LD_LIBRARY_PATH}
+  export LD_LIBRARY_PATH=${MPT_HOME}/lib:${ICC_LIB}:${FTN_LIB}:${NC4_HOME}/lib:${HD5_HOME}/lib:${SVN_HOME}/lib:${LD_LIBRARY_PATH}
+# 
+  echo export PATH=${MPT_HOME}/bin:${SVN_HOME}/bin:$PATH
+  export PATH=${MPT_HOME}/bin:${SVN_HOME}/bin:$PATH
+#
+  export PSM_SHAREDPORTS=1
+  echo export MPI_PPN=4
+  echo export MPI_PPN_CLIST="2-3-6-7-0-1-4-5"
+  echo export OMP_NUM_THREADS=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
+# (half-populated on the NOCS ALTIX system) 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 $PBS_O_WORKDIR
+  cd $EXE_DIR
+  echo Directory is `pwd`
+  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 the parallel MPI executable 
+#
+  echo "Running time ${MPT_HOME}/bin/mpiexec_mpt -np " $XIOCORES " ./xios_server.exe : -np " $OCEANCORES " ./opa"
+#
+  time ${MPT_HOME}/bin/mpiexec_mpt -np $XIOCORES ./xios_server.exe :  -np $OCEANCORES ./opa
+#
+  post_test_tidyup
+# END_BODY
+# Don't remove neither change the previous line
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/sette_batch_template
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/sette_batch_template	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/batch/sette_batch_template	(revision 5095)
@@ -0,0 +1,81 @@
+#!/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 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} ./opa"
+     time ${MPIRUN} ./opa
+  else
+  echo "Running time./opa"
+     time ./opa
+  fi
+
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous comment line
+
+  exit
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_AMM12.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_AMM12.cfg	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_AMM12.cfg	(revision 5095)
@@ -0,0 +1,1 @@
+AMM12_v3.6.tar AMM12_v3.6
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_GYRE.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_GYRE.cfg	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_GYRE.cfg	(revision 5095)
@@ -0,0 +1,1 @@
+
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ISOMIP.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ISOMIP.cfg	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ISOMIP.cfg	(revision 5095)
@@ -0,0 +1,1 @@
+
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM.cfg	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM.cfg	(revision 5095)
@@ -0,0 +1,1 @@
+ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM3.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM3.cfg	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM3.cfg	(revision 5095)
@@ -0,0 +1,1 @@
+ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM_AGRIF.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM_AGRIF.cfg	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM_AGRIF.cfg	(revision 5095)
@@ -0,0 +1,1 @@
+ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM_OBS.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM_OBS.cfg	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM_OBS.cfg	(revision 5095)
@@ -0,0 +1,1 @@
+ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM_PISCES.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM_PISCES.cfg	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_LIM_PISCES.cfg	(revision 5095)
@@ -0,0 +1,1 @@
+ORCA2_LIM_nemo_v3.6.tar  ORCA2_LIM_PISCES_v3.6
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_OFF_PISCES.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_OFF_PISCES.cfg	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_ORCA2_OFF_PISCES.cfg	(revision 5095)
@@ -0,0 +1,1 @@
+INPUTS_DYNA_v3.6.tar ORCA2_OFF_PISCES
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_SAS.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_SAS.cfg	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/input_SAS.cfg	(revision 5095)
@@ -0,0 +1,2 @@
+ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
+INPUTS_SAS_v3.5.tar SAS 
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/param.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/param.cfg	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/cfg/param.cfg	(revision 5095)
@@ -0,0 +1,8 @@
+#- forcing files storing 
+FORCING_DIR=~/FORCING
+#- input files storing 
+INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
+#- only for IBM
+#TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
+#- VALIDATION files storing 
+NEMO_VALIDATION_DIR=~/NEMO_VALIDATION
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/fcm_job.sh
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/fcm_job.sh	(revision 5094)
+++ 	(revision )
@@ -1,103 +1,0 @@
-#####################################################
-# 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: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_AMM12.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_AMM12.cfg	(revision 5094)
+++ 	(revision )
@@ -1,1 +1,0 @@
-AMM12_v3.6.tar AMM12_v3.6
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_GYRE.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_GYRE.cfg	(revision 5094)
+++ 	(revision )
@@ -1,1 +1,0 @@
-
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ISOMIP.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ISOMIP.cfg	(revision 5094)
+++ 	(revision )
@@ -1,1 +1,0 @@
-
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_LIM.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_LIM.cfg	(revision 5094)
+++ 	(revision )
@@ -1,1 +1,0 @@
-ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_LIM3.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_LIM3.cfg	(revision 5094)
+++ 	(revision )
@@ -1,1 +1,0 @@
-ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_LIM_AGRIF.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_LIM_AGRIF.cfg	(revision 5094)
+++ 	(revision )
@@ -1,1 +1,0 @@
-ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_LIM_OBS.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_LIM_OBS.cfg	(revision 5094)
+++ 	(revision )
@@ -1,1 +1,0 @@
-ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_LIM_PISCES.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_LIM_PISCES.cfg	(revision 5094)
+++ 	(revision )
@@ -1,1 +1,0 @@
-ORCA2_LIM_nemo_v3.6.tar  ORCA2_LIM_PISCES_v3.6
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_OFF_PISCES.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_ORCA2_OFF_PISCES.cfg	(revision 5094)
+++ 	(revision )
@@ -1,1 +1,0 @@
-INPUTS_DYNA_v3.6.tar ORCA2_OFF_PISCES
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_SAS.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/input_SAS.cfg	(revision 5094)
+++ 	(revision )
@@ -1,2 +1,0 @@
-ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
-INPUTS_SAS_v3.5.tar SAS 
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/inputs/iodef_sette.xml
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/inputs/iodef_sette.xml	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/inputs/iodef_sette.xml	(revision 5095)
@@ -0,0 +1,165 @@
+<?xml version="1.0"?>
+<simulation> 
+
+ <context id="nemo" time_origin="1950-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.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="-"  />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <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>
+  
+ <context id="1_nemo" time_origin="1950-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.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="-"  />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <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>
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
+-->
+	  <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>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+</simulation>
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/iodef_sette.xml
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/iodef_sette.xml	(revision 5094)
+++ 	(revision )
@@ -1,165 +1,0 @@
-<?xml version="1.0"?>
-<simulation> 
-
- <context id="nemo" time_origin="1950-01-01 00:00:00" >
-    
-    <!-- $id$ -->
-    
-    <!-- 
-============================================================================================================
-=                                  definition of all existing variables                                    =
-=                                            DO NOT CHANGE                                                 =
-============================================================================================================
-    -->
-    <field_definition src="./field_def.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="-"  />
-   </axis_definition> 
-    
-   <domain_definition src="./domain_def.xml"/>
-   
-   <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>
-  
- <context id="1_nemo" time_origin="1950-01-01 00:00:00" >
-    
-    <!-- $id$ -->
-    
-    <!-- 
-============================================================================================================
-=                                  definition of all existing variables                                    =
-=                                            DO NOT CHANGE                                                 =
-============================================================================================================
-    -->
-    <field_definition src="./field_def.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="-"  />
-   </axis_definition> 
-    
-   <domain_definition src="./domain_def.xml"/>
-   
-   <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>
-
-  <context id="xios">
-
-      <variable_definition>
-	
-     <!-- 
-        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
--->
-	  <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>
-	  <variable id="using_server"              type="boolean">false</variable>
-	  <variable id="using_oasis"               type="boolean">false</variable>
-	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
-	
-      </variable_definition>
-               
-  </context>
-</simulation>
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/param.cfg
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/param.cfg	(revision 5094)
+++ 	(revision )
@@ -1,8 +1,0 @@
-#- forcing files storing 
-FORCING_DIR=~/FORCING
-#- input files storing 
-INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
-#- only for IBM
-#TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
-#- VALIDATION files storing 
-NEMO_VALIDATION_DIR=~/NEMO_VALIDATION
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/prepare_exe_dir.sh
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/prepare_exe_dir.sh	(revision 5094)
+++ 	(revision )
@@ -1,74 +1,0 @@
-#!/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}
-
-export EXE_DIR=${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}
-
-cp -r ${CONFIG_DIR}/${NEW_CONF}/EXP00/* ${EXE_DIR}/.
-cp -r ${SETTE_DIR}/iodef_sette.xml ${EXE_DIR}/iodef.xml
-cd ${EXE_DIR}
Index: anches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/prepare_job.sh
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/prepare_job.sh	(revision 5094)
+++ 	(revision )
@@ -1,302 +1,0 @@
-#####################################################
-# 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_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE 0"
-
-
-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
-
-# 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 ${SETTE_DIR}/../CONFIG/${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
-################################################################
-
-##########################################################################
-# COPY RESTART FILES (if needed; i.e. only for SHORT job in RESTART TESTS)
-# get the input tarfile if needed
-# SF : not ok for the moment because at this point is needed cn_exp variable,
-# SF : here it it not known.
-#\cd ${EXE_DIR}
-#if [ "$(echo ${TEST_NAME} | grep -c "SHORT" )" -ne 0 ] ; then
-#    for (( i=1; i<=${NB_PROC}; ${NB_PROC}++)) ; do
-#        L_NPROC=`printf "%04d\n" $i`
-#        ln -sf ../LONG/${NEW_CONF}_00000060_restart_${L_NPROC-1}.nc .
-#    done
-#fi
-## SF : other way
-##      for file in ../LONG/${NEW_CONF}_*restart_0*.nc ; do
-##              ncpu=`echo $file | awk -F '_' '{print $NF}' | cut -f 1 -d '.'`
-##              ln -sf ${file}  .
-##      done
-##fi
-##########################################################################
-
-################################################################
-# RUN OPA
-cd ${EXE_DIR}
-if [ ! -r ${EXE_DIR}/opa ]
-    then
-    echo "executable opa does not exist"
-    echo "executable opa 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
-                                ;;
-                        ifort_MERCATOR_CLUSTER)
-                                echo NB_PROCS ${NB_PROC}
-                                echo NB_NODES ${NB_NODES}
-                                echo  NB_PROC ${NB_PROC}
-                                if [ ${NB_PROC} -eq 1 ] ; then
-                                   NB_NODES=1
-                                   QUEUE=monoproc
-                                   NB_PROC_NODE=${NB_PROC}
-                                else
-                                   if [ ${NB_PROC} -le 8 ] ; then
-                                      NB_NODES=1
-                                      QUEUE=mono
-                                      NB_PROC_NODE=${NB_PROC}
-                                   else
-                                      NB_NODES=$( echo $NB_PROC | awk '{print $1 - $1 % 8}'  | awk '{print $1 / 8 }')
-                                      QUEUE=multi
-                                      NB_PROC_NODE=8
-                                  fi
-                                fi
-                                echo NB_PROCS     ${NB_PROC}
-                                echo NB_NODES     ${NB_NODES}
-                                echo NB_PROC_NODE ${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/${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:MPI_FLAG:${MPI_FLAG}:" \
-             -e"s:DEF_NEMO_VALIDATION:${NEMO_VALIDATION_DIR}:" -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
-              ifort_MERCATOR_CLUSTER)
-                    #cat run_sette_test.job | sed -e"s:QUEUE:${QUEUE}:" > run_sette_test1.job 
-                    #cat run_sette_test.job | sed -e"s/NPROC_NODE/${NB_PROC_NODE}/" > run_sette_test1.job 
-                                                 #-e"s/NPROC_NODE/${NB_PROC_NODE}/" > run_sette_test1.job
-                    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
-                    ;;
-	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: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/all_functions.sh
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/all_functions.sh	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/all_functions.sh	(revision 5095)
@@ -0,0 +1,395 @@
+######################################################
+# 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_lim2 cn_icerst_in  \"00101231_restart_ice\"
+#  $ post_test_tidyup 
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: all_functions.sh 4316 2013-11-26 15:43:56Z clevy $
+#
+#   * 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\" "
+
+# 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
+# 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
+
+        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=$3:"  ${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 () {
+#
+# 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_VALIDATION_DIR}"
+echo "NEW CONFIGURATION is : ${NEW_CONF}"
+echo "COMPILER is : ${CMP_NAM}"
+echo "TEST is : ${TEST_NAME}"
+################################################################
+# SMALL DEBUG
+    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 2
+    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 1
+    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
+    export LANG=en_US 
+    cd ${CONFIG_DIR}
+    cd ../
+    REVISION_NB=`svn info | grep -i "Revision:" | sed -e "s/ //" | cut -d ":" -f 2`
+    if [ ${#REVISION_NB} -eq 0 ]
+    then
+    	echo "some problems with svn info command"
+    	echo "some problems with svn 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
+    cd ${NEMO_VALIDATION_DIR}
+    `mkdir -p ${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME}`
+    NEMO_VALID=${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME}
+    if [ -d ${NEMO_VALID} ] ; then
+	echo "created ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette
+    else 
+	echo "problems in creating ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette
+	echo "EXIT,"
+	exit 1
+    fi
+    # Save output & debug files in NEMO_VALIDATION tree
+    echo "saving ocean & ice output, solver.stat, tracer.stat files ...." >> ${SETTE_DIR}/output.sette
+    echo "            " >> ${SETTE_DIR}/output.sette
+    [ -f ${EXE_DIR}/ocean.output ] && cp ${EXE_DIR}/*ocean.output ${NEMO_VALID}/.
+    [ -f ${EXE_DIR}/solver.stat ] && cp ${EXE_DIR}/*solver.stat ${NEMO_VALID}/.
+    [ -f ${EXE_DIR}/output.namelist.dyn ] && cp ${EXE_DIR}/*output.nam* ${NEMO_VALID}/.
+    [ -f ${EXE_DIR}/tracer.stat ] && cp ${EXE_DIR}/*tracer.stat ${NEMO_VALID}/.
+
+    if [ -n "$(ls ${NEMO_VALID}/*solver*)" ] ; then
+	echo "moved solver.stat in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+	echo "moved solver.stat in ${NEMO_VALID} directory"  
+    else
+	echo "problem in looking for solver.stat file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+	echo "solver.stat IS NOT in ${NEMO_VALID} directory" 
+    fi
+    if [ -n "$(ls ${NEMO_VALID}/*ocean.output*)" ] ; then
+	echo "moved ocean.output in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+	echo "moved ocean.output in ${NEMO_VALID} directory" 
+    else
+	echo "problem in looking for ocean.output file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+	echo "ocean.output IS NOT in ${NEMO_VALID} directory" 
+    fi
+    if [ -n "$(ls ${NEMO_VALID}/*tracer.stat*)" ] ; then
+        echo "moved tracer.stat in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+        echo "moved tracer.stat in ${NEMO_VALID} directory"
+    else
+        echo "problem in looking for tracer.stat file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+        echo "tracer.stat IS NOT in ${NEMO_VALID} 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
+#
+#############################################################
+
+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"
+
+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.*=.*boolean" ${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: boolean 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
+}
+
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/fcm_job.sh
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/fcm_job.sh	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/fcm_job.sh	(revision 5095)
@@ -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: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/prepare_exe_dir.sh
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/prepare_exe_dir.sh	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/prepare_exe_dir.sh	(revision 5095)
@@ -0,0 +1,74 @@
+#!/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}
+
+export EXE_DIR=${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME}
+
+cp -r ${CONFIG_DIR}/${NEW_CONF}/EXP00/* ${EXE_DIR}/.
+cp -r ${SETTE_DIR}/iodef_sette.xml ${EXE_DIR}/iodef.xml
+cd ${EXE_DIR}
Index: /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/prepare_job.sh
===================================================================
--- /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/prepare_job.sh	(revision 5095)
+++ /branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/SETTE/scripts/prepare_job.sh	(revision 5095)
@@ -0,0 +1,302 @@
+#####################################################
+# 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_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE 0"
+
+
+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
+
+# 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 ${SETTE_DIR}/../CONFIG/${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
+################################################################
+
+##########################################################################
+# COPY RESTART FILES (if needed; i.e. only for SHORT job in RESTART TESTS)
+# get the input tarfile if needed
+# SF : not ok for the moment because at this point is needed cn_exp variable,
+# SF : here it it not known.
+#\cd ${EXE_DIR}
+#if [ "$(echo ${TEST_NAME} | grep -c "SHORT" )" -ne 0 ] ; then
+#    for (( i=1; i<=${NB_PROC}; ${NB_PROC}++)) ; do
+#        L_NPROC=`printf "%04d\n" $i`
+#        ln -sf ../LONG/${NEW_CONF}_00000060_restart_${L_NPROC-1}.nc .
+#    done
+#fi
+## SF : other way
+##      for file in ../LONG/${NEW_CONF}_*restart_0*.nc ; do
+##              ncpu=`echo $file | awk -F '_' '{print $NF}' | cut -f 1 -d '.'`
+##              ln -sf ${file}  .
+##      done
+##fi
+##########################################################################
+
+################################################################
+# RUN OPA
+cd ${EXE_DIR}
+if [ ! -r ${EXE_DIR}/opa ]
+    then
+    echo "executable opa does not exist"
+    echo "executable opa 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
+                                ;;
+                        ifort_MERCATOR_CLUSTER)
+                                echo NB_PROCS ${NB_PROC}
+                                echo NB_NODES ${NB_NODES}
+                                echo  NB_PROC ${NB_PROC}
+                                if [ ${NB_PROC} -eq 1 ] ; then
+                                   NB_NODES=1
+                                   QUEUE=monoproc
+                                   NB_PROC_NODE=${NB_PROC}
+                                else
+                                   if [ ${NB_PROC} -le 8 ] ; then
+                                      NB_NODES=1
+                                      QUEUE=mono
+                                      NB_PROC_NODE=${NB_PROC}
+                                   else
+                                      NB_NODES=$( echo $NB_PROC | awk '{print $1 - $1 % 8}'  | awk '{print $1 / 8 }')
+                                      QUEUE=multi
+                                      NB_PROC_NODE=8
+                                  fi
+                                fi
+                                echo NB_PROCS     ${NB_PROC}
+                                echo NB_NODES     ${NB_NODES}
+                                echo NB_PROC_NODE ${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/${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:MPI_FLAG:${MPI_FLAG}:" \
+             -e"s:DEF_NEMO_VALIDATION:${NEMO_VALIDATION_DIR}:" -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
+              ifort_MERCATOR_CLUSTER)
+                    #cat run_sette_test.job | sed -e"s:QUEUE:${QUEUE}:" > run_sette_test1.job 
+                    #cat run_sette_test.job | sed -e"s/NPROC_NODE/${NB_PROC_NODE}/" > run_sette_test1.job 
+                                                 #-e"s/NPROC_NODE/${NB_PROC_NODE}/" > run_sette_test1.job
+                    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
+                    ;;
+	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
