Index: anches/2017/dev_merge_2017/NEMOGCM/SETTE/new_sette.sh
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/SETTE/new_sette.sh	(revision 9223)
+++ 	(revision )
@@ -1,1350 +1,0 @@
-#!/bin/bash
-############################################################
-# Author : Simona Flavoni for NEMO
-# Contact: sflod@locean-ipsl.upmc.fr
-# 2013   : A.C. Coward added options for testing with XIOS in dettached mode
-#
-# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
-# ----------------------------------------------------------------------
-# NEMO/SETTE , NEMO Consortium (2010)
-# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
-# ----------------------------------------------------------------------
-#
-#############################################################
-#set -vx
-set -o posix
-#set -u
-#set -e
-# ===========
-# DESCRIPTION
-# ===========
-#
-# Variables to be checked by user:
-#
-# COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory 
-# BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs
-# BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs  
-# INTERACT_FLAG     : flag to run in interactive mode "yes"
-#                           to run in batch mode "no"
-# MPIRUN_FLAG       : flag to run in parallel (MPI) "yes"
-#                           to run in sequential mode (NB_PROC = 1) "no"
-# USING_XIOS        : flag to control the activation of key_iomput
-#                      "yes" to compile using key_iomput and link to the external XIOS library
-#                      "no"  to compile without key_iomput and link to the old IOIPSL library
-# USING_MPMD        : flag to control the use of stand-alone IO servers
-#                     requires USING_XIOS="yes"
-#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers
-#                      "no"  to run in SPMD (attached) mode without separate IO servers 
-# NUM_XIOSERVERS    : number of stand-alone IO servers to employ
-#                     set to zero if USING_MPMD="no"
-#
-# Principal script is sette.sh, that calls 
-#
-#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe 
-#              and links to 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
-#
-# example use: ./sette.sh 
-#########################################################################################
-#
-# Compiler among those in NEMOGCM/ARCH
-COMPILER=X64_ADA
-
-export BATCH_COMMAND_PAR="llsubmit"
-export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
-export INTERACT_FLAG="no"
-export MPIRUN_FLAG="yes"
-export USING_XIOS="yes"
-#
-export DEL_KEYS="key_iomput"
-if [ ${USING_XIOS} == "yes" ] 
- then 
-   export DEL_KEYS=""
-fi
-#
-# Settings which control the use of stand alone servers (only relevant if using xios)
-#
-export USING_MPMD="no"
-export NUM_XIOSERVERS=4
-export JOB_PREFIX=batch-mpmd
-#
-if [ ${USING_MPMD} == "no" ] 
- then
-   export NUM_XIOSERVERS=0
-   export JOB_PREFIX=batch
-fi
-#
-#
-if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"]
- then
-   echo "Incompatible choices. MPMD mode requires the XIOS server"
-   exit
-fi
-
-# Directory to run the tests
-SETTE_DIR=$(cd $(dirname "$0"); pwd)
-MAIN_DIR=$(dirname $SETTE_DIR)
-CONFIG_DIR0=${MAIN_DIR}/CONFIG
-TOOLS_DIR=${MAIN_DIR}/TOOLS
-COMPIL_DIR=${TOOLS_DIR}/COMPILE
-
-CMP_NAM=${1:-$COMPILER}
-# Copy job_batch_COMPILER file for specific compiler into job_batch_template
-cd ${SETTE_DIR}
-cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
-# Description of configuration tested:
-# GYRE_PISCES       :  1 
-# ORCA2_LIM3_PISCES :  2 
-# ORCA2_OFF_PISCES  :  3 
-# AMM12             :  4 
-# SAS               :  5     fos SAS there is no solver so is useless to test REPRO
-# ISOMIP            :  6
-# ORCA2_LIM3_OBS    :  7
-# ORCA2_AGRIF_LIM3  :  8 
-# ORCA2AGR          :  9 & 10  AGRIF active with no zoom, compared to no AGRIF cpp key
-
-for config in 1 2 3 4 5 6 7 8 9 10
-do
-
-# TESTS FOR GYRE_PISCES CONFIGURATION
-if [ ${config} -eq 1 ] ;  then
-    ## Restartability tests for GYRE_PISCES
-    export TEST_NAME="LONG"
-    cd ${CONFIG_DIR0}
-    . ./makenemo -m ${CMP_NAM} -n GYREPIS_ST -r GYRE_PISCES -j 8 del_key ${DEL_KEYS}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}  
-    set_namelist namelist_cfg cn_exp \"GYREPIS_LONG\"
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 120
-    set_namelist namelist_cfg nn_stock 60
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_linssh .true.
-    set_namelist namelist_cfg ln_read_cfg .false.
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="SHORT"
-    . ./prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"GYREPIS_SHORT\"
-    set_namelist namelist_cfg nn_it000 61
-    set_namelist namelist_cfg nn_itend 120
-    set_namelist namelist_cfg nn_stock 60
-    set_namelist namelist_cfg ln_rstart .true.
-    set_namelist namelist_cfg nn_rstctl 2
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_linssh .true.
-    set_namelist namelist_cfg ln_read_cfg .false.
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_top_cfg ln_rsttr .true.
-    set_namelist namelist_top_cfg nn_rsttr 2
-    set_namelist namelist_cfg cn_ocerst_in \"GYREPIS_LONG_00000060_restart\"
-    set_namelist namelist_top_cfg cn_trcrst_in \"GYREPIS_LONG_00000060_restart_trc\"
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    for (( i=1; i<=$NPROC; i++)) ; do
-        L_NPROC=$(( $i - 1 ))
-        L_NPROC=`printf "%04d\n" ${L_NPROC}`
-        ln -sf ../LONG/GYREPIS_LONG_00000060_restart_${L_NPROC}.nc .
-        ln -sf ../LONG/GYREPIS_LONG_00000060_restart_trc_${L_NPROC}.nc .
-    done
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-    ## Reproducibility tests for GYRE_PISCES
-    export TEST_NAME="REPRO_4_8"
-    cd ${CONFIG_DIR0}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"GYREPIS_48\"
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 60
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_linssh .true.
-    set_namelist namelist_cfg ln_read_cfg .false.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="REPRO_8_4"
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"GYREPIS_84\"
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 60
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_linssh .true.
-    set_namelist namelist_cfg ln_read_cfg .false.
-    set_namelist namelist_cfg jpni 8
-    set_namelist namelist_cfg jpnj 4
-    set_namelist namelist_cfg jpnij 32
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-fi
-
-# TESTS FOR ORCA2_LIM3_PISCES CONFIGURATION
-if [ ${config} -eq 2 ] ;  then
-    ## Restartability tests for ORCA2_LIM3_PISCES
-    export TEST_NAME="LONG"
-    cd ${CONFIG_DIR0}
-    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3PIS_ST -r ORCA2_LIM3_PISCES -j 8 del_key ${DEL_KEYS}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"O2L3P_LONG\"
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 150
-    set_namelist namelist_cfg nn_stock 75
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_top_cfg ln_trcdta .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces_cfg ln_presatm .false.
-    set_namelist namelist_pisces_cfg ln_varpar .false.
-    set_namelist namelist_pisces_cfg ln_dust .false.
-    set_namelist namelist_pisces_cfg ln_solub .false.
-    set_namelist namelist_pisces_cfg ln_river .false.
-    set_namelist namelist_pisces_cfg ln_ndepo .false.
-    set_namelist namelist_pisces_cfg ln_ironsed .false.
-    set_namelist namelist_pisces_cfg ln_ironice .false.
-    set_namelist namelist_pisces_cfg ln_hydrofe .false.
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    
-    cd ${SETTE_DIR}
-    export TEST_NAME="SHORT"
-    . ./prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
-    set_namelist namelist_cfg nn_it000 76
-    set_namelist namelist_cfg nn_itend 150
-    set_namelist namelist_cfg nn_stock 75
-    set_namelist namelist_cfg ln_rstart .true.
-    set_namelist namelist_cfg nn_rstctl 2
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg ln_icebergs .true.
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_top_cfg ln_rsttr .true.
-    set_namelist namelist_top_cfg nn_rsttr 2
-    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000075_restart\"
-    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000075_restart_ice\"
-    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000075_restart_trc\"
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces_cfg ln_presatm .false.
-    set_namelist namelist_pisces_cfg ln_varpar .false.
-    set_namelist namelist_pisces_cfg ln_dust .false.
-    set_namelist namelist_pisces_cfg ln_solub .false.
-    set_namelist namelist_pisces_cfg ln_river .false.
-    set_namelist namelist_pisces_cfg ln_ndepo .false.
-    set_namelist namelist_pisces_cfg ln_ironsed .false.
-    set_namelist namelist_pisces_cfg ln_ironice .false.
-    set_namelist namelist_pisces_cfg ln_hydrofe .false.
-    # put ln_pisdmp to false : no restoring to global mean value
-    set_namelist namelist_pisces_cfg ln_pisdmp .false.
-    for (( i=1; i<=$NPROC; i++)) ; do
-        L_NPROC=$(( $i - 1 ))
-        L_NPROC=`printf "%04d\n" ${L_NPROC}`
-        ln -sf ../LONG/O2L3P_LONG_00000075_restart_${L_NPROC}.nc .
-        ln -sf ../LONG/O2L3P_LONG_00000075_restart_trc_${L_NPROC}.nc .
-        ln -sf ../LONG/O2L3P_LONG_00000075_restart_ice_${L_NPROC}.nc .
-        ln -sf ../LONG/O2L3P_LONG_icebergs_00000075_restart_${L_NPROC}.nc O2L3P_LONG_00000075_restart_icebergs_${L_NPROC}.nc
-    done
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-    ## Reproducibility tests for ORCA2_LIM3_PISCES
-    export TEST_NAME="REPRO_4_8"
-    cd ${CONFIG_DIR0}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 75
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg ln_icebergs .true.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_top_cfg ln_trcdta .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces_cfg ln_presatm .false.
-    set_namelist namelist_pisces_cfg ln_varpar .false.
-    set_namelist namelist_pisces_cfg ln_dust .false.
-    set_namelist namelist_pisces_cfg ln_solub .false.
-    set_namelist namelist_pisces_cfg ln_river .false.
-    set_namelist namelist_pisces_cfg ln_ndepo .false.
-    set_namelist namelist_pisces_cfg ln_ironsed .false.
-    set_namelist namelist_pisces_cfg ln_ironice .false.
-    set_namelist namelist_pisces_cfg ln_hydrofe .false.
-    # put ln_pisdmp to false : no restoring to global mean value
-    set_namelist namelist_pisces_cfg ln_pisdmp .false.
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="REPRO_8_4"
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 75
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg ln_icebergs .true.
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 8
-    set_namelist namelist_cfg jpnj 4
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_top_cfg ln_trcdta .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces_cfg ln_presatm .false.
-    set_namelist namelist_pisces_cfg ln_varpar .false.
-    set_namelist namelist_pisces_cfg ln_dust .false.
-    set_namelist namelist_pisces_cfg ln_solub .false.
-    set_namelist namelist_pisces_cfg ln_river .false.
-    set_namelist namelist_pisces_cfg ln_ndepo .false.
-    set_namelist namelist_pisces_cfg ln_ironsed .false.
-    set_namelist namelist_pisces_cfg ln_ironice .false.
-    set_namelist namelist_pisces_cfg ln_hydrofe .false.
-    # put ln_pisdmp to false : no restoring to global mean value
-    set_namelist namelist_pisces_cfg ln_pisdmp .false.
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-fi
-
-# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
-if [ ${config} -eq 3 ] ;  then
-    ## Restartability tests for ORCA2_OFF_PISCES
-    export TEST_NAME="LONG"
-    cd ${CONFIG_DIR0}
-    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_ST -r ORCA2_OFF_PISCES -j 8 del_key ${DEL_KEYS}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 40
-    set_namelist namelist_cfg nn_stock 20
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .true.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_top_cfg ln_trcdta .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces_cfg ln_presatm .false.
-    set_namelist namelist_pisces_cfg ln_varpar .false.
-    set_namelist namelist_pisces_cfg ln_dust .false.
-    set_namelist namelist_pisces_cfg ln_solub .false.
-    set_namelist namelist_pisces_cfg ln_river .false.
-    set_namelist namelist_pisces_cfg ln_ndepo .false.
-    set_namelist namelist_pisces_cfg ln_ironsed .false.
-    set_namelist namelist_pisces_cfg ln_ironice .false.
-    set_namelist namelist_pisces_cfg ln_hydrofe .false.
-    # put ln_pisdmp to false : no restoring to global mean value
-    set_namelist namelist_pisces_cfg ln_pisdmp .false.
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    
-    cd ${SETTE_DIR}
-    export TEST_NAME="SHORT"
-    . ./prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
-    set_namelist namelist_cfg nn_it000 21
-    set_namelist namelist_cfg nn_itend 40
-    set_namelist namelist_cfg nn_stock 20
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .true.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_top_cfg ln_rsttr .true.
-    set_namelist namelist_top_cfg nn_rsttr 2
-    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
-    for (( i=1; i<=$NPROC; i++)) ; do
-        L_NPROC=$(( $i - 1 ))
-        L_NPROC=`printf "%04d\n" ${L_NPROC}`
-        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc .
-    done
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces_cfg ln_presatm .false.
-    set_namelist namelist_pisces_cfg ln_varpar .false.
-    set_namelist namelist_pisces_cfg ln_dust .false.
-    set_namelist namelist_pisces_cfg ln_solub .false.
-    set_namelist namelist_pisces_cfg ln_river .false.
-    set_namelist namelist_pisces_cfg ln_ndepo .false.
-    set_namelist namelist_pisces_cfg ln_ironsed .false.
-    set_namelist namelist_pisces_cfg ln_ironice .false.
-    set_namelist namelist_pisces_cfg ln_hydrofe .false.
-    # put ln_pisdmp to false : no restoring to global mean value
-    set_namelist namelist_pisces_cfg ln_pisdmp .false.
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-    ## Reproducibility tests for ORCA2_OFF_PISCES
-    export TEST_NAME="REPRO_4_8"
-    cd ${CONFIG_DIR0}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 40
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .true.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_top_cfg ln_trcdta .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces_cfg ln_presatm .false.
-    set_namelist namelist_pisces_cfg ln_varpar .false.
-    set_namelist namelist_pisces_cfg ln_dust .false.
-    set_namelist namelist_pisces_cfg ln_solub .false.
-    set_namelist namelist_pisces_cfg ln_river .false.
-    set_namelist namelist_pisces_cfg ln_ndepo .false.
-    set_namelist namelist_pisces_cfg ln_ironsed .false.
-    set_namelist namelist_pisces_cfg ln_ironice .false.
-    set_namelist namelist_pisces_cfg ln_hydrofe .false.
-    # put ln_pisdmp to false : no restoring to global mean value
-    set_namelist namelist_pisces_cfg ln_pisdmp .false.
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="REPRO_8_4"
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 40
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .true.
-    set_namelist namelist_cfg jpni 8
-    set_namelist namelist_cfg jpnj 4
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_top_cfg ln_trcdta .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces_cfg ln_presatm .false.
-    set_namelist namelist_pisces_cfg ln_varpar .false.
-    set_namelist namelist_pisces_cfg ln_dust .false.
-    set_namelist namelist_pisces_cfg ln_solub .false.
-    set_namelist namelist_pisces_cfg ln_river .false.
-    set_namelist namelist_pisces_cfg ln_ndepo .false.
-    set_namelist namelist_pisces_cfg ln_ironsed .false.
-    set_namelist namelist_pisces_cfg ln_ironice .false.
-    set_namelist namelist_pisces_cfg ln_hydrofe .false.
-    # put ln_pisdmp to false : no restoring to global mean value
-    set_namelist namelist_pisces_cfg ln_pisdmp .false. 
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-fi
-
-# TESTS FOR AMM12 CONFIGURATION
-if [ ${config} -eq 4 ] ;  then
-    ## Restartability tests for AMM12
-    export TEST_NAME="LONG"
-    cd ${CONFIG_DIR0}
-    . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j 8 del_key ${DEL_KEYS}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 576
-    set_namelist namelist_cfg nn_stock 288
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="SHORT"
-    . ./prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 289
-    set_namelist namelist_cfg nn_itend 576
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_cfg ln_rstart .true.
-    set_namelist namelist_cfg nn_rstctl 2
-    set_namelist namelist_cfg cn_ocerst_in \"AMM12_00000288_restart_oce_out\"
-    set_namelist namelist_cfg nn_date0 20120102
-    for (( i=1; i<=$NPROC; i++)) ; do
-        L_NPROC=$(( $i - 1 ))
-        L_NPROC=`printf "%04d\n" ${L_NPROC}`
-        ln -sf ../LONG/AMM12_00000288_restart_oce_out_${L_NPROC}.nc .
-    done
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-## Reproducibility tests for AMM12
-    export TEST_NAME="REPRO_8_4"
-    cd ${CONFIG_DIR0}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 576
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg jpni 8
-    set_namelist namelist_cfg jpnj 4
-    set_namelist namelist_cfg jpnij 32
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="REPRO_4_8"
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 576
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-fi
-
-
-# TESTS FOR ORCA2_SAS_LIM3 CONFIGURATION
-if [ ${config} -eq 5 ] ;  then
-    ## Restartability tests for SAS
-    export TEST_NAME="LONG"
-    cd ${CONFIG_DIR0}
-    . ./makenemo -m ${CMP_NAM} -n SAS_ST -r ORCA2_SAS_LIM3 -j 8 del_key ${DEL_KEYS}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"SAS\"
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 240
-    set_namelist namelist_cfg nn_stock 120
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .true.
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="SHORT"
-    . ./prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"SAS\"
-    set_namelist namelist_cfg nn_it000 121
-    set_namelist namelist_cfg nn_itend 240
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .true.
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_cfg ln_rstart .true.
-    set_namelist namelist_cfg nn_rstctl 2
-    set_namelist namelist_cfg nn_date0 010109
-    set_namelist namelist_cfg cn_ocerst_in \"SAS_00000120_restart\"
-    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000120_restart_ice\"
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    for (( i=1; i<=$NPROC; i++)) ; do
-        L_NPROC=$(( $i - 1 ))
-        L_NPROC=`printf "%04d\n" ${L_NPROC}`
-        ln -sf ../LONG/SAS_00000120_restart_${L_NPROC}.nc .
-        ln -sf ../LONG/SAS_00000120_restart_ice_${L_NPROC}.nc .
-    done
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-fi
-
-# TESTS FOR ISOMIP CONFIGURATION
-if [ ${config} -eq 6 ] ;  then
-    ## Restartability tests for ISOMIP
-    export TEST_NAME="LONG"
-    cd ${CONFIG_DIR0}
-    . ./makenemo -m ${CMP_NAM} -n ISOMIP_ST -r ISOMIP -a TEST_CASES -j 8 del_key ${DEL_KEYS}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"ISOMIP_LONG\"
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 96
-    set_namelist namelist_cfg nn_stock 48
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .false.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="SHORT"
-    . ./prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\"
-    set_namelist namelist_cfg nn_it000 49
-    set_namelist namelist_cfg nn_itend 96
-    set_namelist namelist_cfg nn_stock 48
-    set_namelist namelist_cfg ln_rstart .true.
-    set_namelist namelist_cfg nn_rstctl 2
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .false.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_cfg cn_ocerst_in \"ISOMIP_LONG_00000048_restart\"
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    for (( i=1; i<=$NPROC; i++)) ; do
-        L_NPROC=$(( $i - 1 ))
-        L_NPROC=`printf "%04d\n" ${L_NPROC}`
-        ln -sf ../LONG/ISOMIP_LONG_00000048_restart_${L_NPROC}.nc .
-    done
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-    ## Reproducibility tests for ISOMIP
-    export TEST_NAME="REPRO_4_8"
-    cd ${CONFIG_DIR0}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"ISOMIP_14\"
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 48
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .false.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="REPRO_8_4"
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"ISOMIP_22\"
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 48
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .false.
-    set_namelist namelist_cfg jpni 8
-    set_namelist namelist_cfg jpnj 4
-    set_namelist namelist_cfg jpnij 32
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-fi
-
-## Test assimilation interface code, OBS and ASM for reproducibility
-## Restartability not tested (ASM code not restartable while increments are being applied)
-if [ ${config} -eq 7 ] ; then
-   ## Reproducibility tests for ORCA2_LIM3_OBS
-    export TEST_NAME="REPRO_4_8"
-    cd ${CONFIG_DIR0}
-    . ./makenemo -m ${CMP_NAM} -n ORCA2_LIM3_OBS_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3"  -j 8 add_key "key_asminc" del_key "key_top"
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 75
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg ln_icebergs .false.
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_cfg ln_diaobs .true.
-    set_namelist namelist_cfg ln_t3d .true.
-    set_namelist namelist_cfg ln_s3d .true.
-    set_namelist namelist_cfg ln_sst .true.
-    set_namelist namelist_cfg ln_sla .true.
-    set_namelist namelist_cfg ln_sic .true.
-    set_namelist namelist_cfg ln_vel3d .true.
-    set_namelist namelist_cfg ln_bkgwri .true.
-    set_namelist namelist_cfg ln_trainc .true.
-    set_namelist namelist_cfg ln_dyninc .true.
-    set_namelist namelist_cfg ln_sshinc .true.
-    set_namelist namelist_cfg ln_asmiau .true.
-    #remove all useless options for pisces (due to ORCA2_LIM3_PISCES reference configuration)
-    set_namelist namelist_top_cfg ln_trcdta .false. 
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces_cfg ln_presatm .false.
-    set_namelist namelist_pisces_cfg ln_varpar .false.
-    set_namelist namelist_pisces_cfg ln_dust .false.
-    set_namelist namelist_pisces_cfg ln_solub .false.
-    set_namelist namelist_pisces_cfg ln_river .false.
-    set_namelist namelist_pisces_cfg ln_ndepo .false.
-    set_namelist namelist_pisces_cfg ln_ironsed .false.
-    set_namelist namelist_pisces_cfg ln_ironice .false.
-    set_namelist namelist_pisces_cfg ln_hydrofe .false.
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-   cd ${SETTE_DIR}
-    export TEST_NAME="REPRO_8_4"
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=32
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 75
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg ln_icebergs .false.
-    set_namelist namelist_cfg jpni 8
-    set_namelist namelist_cfg jpnj 4
-    set_namelist namelist_cfg jpnij 32
-    set_namelist namelist_cfg ln_diaobs .true.
-    set_namelist namelist_cfg ln_t3d .true.
-    set_namelist namelist_cfg ln_s3d .true.
-    set_namelist namelist_cfg ln_sst .true.
-    set_namelist namelist_cfg ln_sla .true.
-    set_namelist namelist_cfg ln_sic .true.
-    set_namelist namelist_cfg ln_vel3d .true.
-    set_namelist namelist_cfg ln_bkgwri .true.
-    set_namelist namelist_cfg ln_trainc .true.
-    set_namelist namelist_cfg ln_dyninc .true.
-    set_namelist namelist_cfg ln_sshinc .true.
-    set_namelist namelist_cfg ln_asmiau .true.
-    #remove all useless options for pisces (due to ORCA2_LIM3_PISCES reference configuration)
-    set_namelist namelist_top_cfg ln_trcdta .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces_cfg ln_presatm .false.
-    set_namelist namelist_pisces_cfg ln_varpar .false.
-    set_namelist namelist_pisces_cfg ln_dust .false.
-    set_namelist namelist_pisces_cfg ln_solub .false.
-    set_namelist namelist_pisces_cfg ln_river .false.
-    set_namelist namelist_pisces_cfg ln_ndepo .false.
-    set_namelist namelist_pisces_cfg ln_ironsed .false.
-    set_namelist namelist_pisces_cfg ln_ironice .false.
-    set_namelist namelist_pisces_cfg ln_hydrofe .false.
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-fi
-# TEST FOR ORCA2_LIM3_AGRIF : AGULHAS AGRIF
-if [ ${config} -eq 8 ] ;  then
-## Restartability tests
-    export TEST_NAME="LONG"
-    cd ${CONFIG_DIR0}
-    . ./makenemo -m ${CMP_NAM} -n ORCA2AGR_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif key_zdftmx" del_key "key_zdftmx_new key_top"
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=4
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"O2LP_LONG\"
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 150
-    set_namelist namelist_cfg nn_stock 75
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg ln_hpg_sco .true.
-    set_namelist namelist_cfg ln_hpg_zps .false.
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 2
-    set_namelist namelist_cfg jpnj 2
-    set_namelist namelist_cfg jpnij 4
-    set_namelist 1_namelist_cfg cn_exp \"O2LP_LONG\"
-    set_namelist 1_namelist_cfg nn_it000 1
-    set_namelist 1_namelist_cfg nn_itend 300
-    set_namelist 1_namelist_cfg nn_stock 150
-    set_namelist 1_namelist_cfg nn_fsbc 1
-    set_namelist 1_namelist_cfg ln_ctl .false.
-    set_namelist 1_namelist_cfg ln_clobber .true.
-    set_namelist 1_namelist_cfg ln_read_cfg .true.
-    set_namelist 1_namelist_cfg ln_linssh .false.
-    set_namelist 1_namelist_cfg ln_hpg_sco .true.
-    set_namelist 1_namelist_cfg ln_hpg_zps .false.
-#
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="SHORT"
-    . ./prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg cn_exp \"O2LP_SHORT\"
-    set_namelist namelist_cfg nn_it000 76
-    set_namelist namelist_cfg nn_itend 150
-    set_namelist namelist_cfg nn_stock 75
-    set_namelist namelist_cfg ln_rstart .true.
-    set_namelist namelist_cfg nn_rstctl 2
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg ln_hpg_sco .true.
-    set_namelist namelist_cfg ln_hpg_zps .false.
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 2
-    set_namelist namelist_cfg jpnj 2
-    set_namelist namelist_cfg jpnij 4
-    set_namelist 1_namelist_cfg cn_exp \"O2LP_SHORT\"
-    set_namelist 1_namelist_cfg nn_it000 151
-    set_namelist 1_namelist_cfg nn_itend 300
-    set_namelist 1_namelist_cfg nn_stock 150
-    set_namelist 1_namelist_cfg nn_fsbc 1
-    set_namelist 1_namelist_cfg ln_rstart .true.
-    set_namelist 1_namelist_cfg nn_rstctl 2
-    set_namelist 1_namelist_cfg ln_clobber .true.
-    set_namelist 1_namelist_cfg ln_read_cfg .true.
-    set_namelist 1_namelist_cfg ln_linssh .false.
-    set_namelist 1_namelist_cfg ln_hpg_sco .true.
-    set_namelist 1_namelist_cfg ln_hpg_zps .false.
-    set_namelist namelist_cfg cn_ocerst_in \"O2LP_LONG_00000075_restart\"
-    set_namelist namelist_ice_cfg cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
-    set_namelist 1_namelist_cfg cn_ocerst_in \"O2LP_LONG_00000150_restart\"
-    set_namelist 1_namelist_ice_cfg cn_icerst_in \"O2LP_LONG_00000150_restart_ice\"
-    for (( i=1; i<=$NPROC; i++)) ; do
-        L_NPROC=$(( $i - 1 ))
-        L_NPROC=`printf "%04d\n" ${L_NPROC}`
-        ln -sf ../LONG/O2LP_LONG_00000075_restart_${L_NPROC}.nc .
-        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc .
-        ln -sf ../LONG/1_O2LP_LONG_00000150_restart_${L_NPROC}.nc .
-        ln -sf ../LONG/1_O2LP_LONG_00000150_restart_ice_${L_NPROC}.nc .
-    done
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-
-## Reproducibility tests for ORCA2_LIM3_AGRIF
-    export TEST_NAME="REPRO_4_4"
-    cd ${CONFIG_DIR0}
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=16
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 75
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg ln_hpg_sco .true.
-    set_namelist namelist_cfg ln_hpg_zps .false.
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 4
-    set_namelist namelist_cfg jpnj 4
-    set_namelist namelist_cfg jpnij 16
-    set_namelist 1_namelist_cfg nn_it000 1
-    set_namelist 1_namelist_cfg nn_itend 150
-    set_namelist 1_namelist_cfg nn_fsbc 1
-    set_namelist 1_namelist_cfg ln_ctl .false.
-    set_namelist 1_namelist_cfg ln_clobber .true.
-    set_namelist 1_namelist_cfg ln_read_cfg .true.
-    set_namelist 1_namelist_cfg ln_linssh .false.
-    set_namelist 1_namelist_cfg ln_hpg_sco .true.
-    set_namelist 1_namelist_cfg ln_hpg_zps .false.
-
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="REPRO_2_8"
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=16
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 75
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg ln_hpg_sco .true.
-    set_namelist namelist_cfg ln_hpg_zps .false.
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 2
-    set_namelist namelist_cfg jpnj 8
-    set_namelist namelist_cfg jpnij 16
-    set_namelist 1_namelist_cfg nn_it000 1
-    set_namelist 1_namelist_cfg nn_itend 150
-    set_namelist 1_namelist_cfg nn_fsbc 1
-    set_namelist 1_namelist_cfg ln_ctl .false.
-    set_namelist 1_namelist_cfg ln_clobber .true.
-    set_namelist 1_namelist_cfg ln_read_cfg .true.
-    set_namelist 1_namelist_cfg ln_linssh .false.
-    set_namelist 1_namelist_cfg ln_hpg_sco .true.
-    set_namelist 1_namelist_cfg ln_hpg_zps .false.
-
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-fi
-
-# test code corruption with AGRIF
-if [ ${config} -eq 9 ] ;  then
-
-# Compile with AGRIF but run with no zoom
-    export TEST_NAME="AGRIFNOZ"
-    cd ${CONFIG_DIR0}
-    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_NOZOOM_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif" del_key "key_zdftmx key_top"
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=4
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 75
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg ln_hpg_sco .true.
-    set_namelist namelist_cfg ln_hpg_zps .false. 
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 2
-    set_namelist namelist_cfg jpnj 2
-    set_namelist namelist_cfg jpnij 4
-    set_namelist namelist_cfg ln_icebergs .false.   
-# 
-#   Set the number of fine grids to zero:    
-    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
-
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-fi
-
-if [ ${config} -eq 10 ] ;  then
-# Compile with same option as 9 = ORCA2AGUL_NOZOOM, except ne key_agrif to check AGRIF does not hurt...
-    export TEST_NAME="AGRIFNO"
-    cd ${CONFIG_DIR0}
-    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_NOAGR_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 del_key "key_zdftmx key_top"
-    cd ${SETTE_DIR}
-    . ./param.cfg
-    . ./all_functions.sh
-    . ./prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=4
-    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
-    cd ${EXE_DIR}
-    set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 75
-    set_namelist namelist_cfg ln_ctl .false.
-    set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg ln_read_cfg .true.
-    set_namelist namelist_cfg ln_linssh .false.
-    set_namelist namelist_cfg ln_hpg_sco .true.
-    set_namelist namelist_cfg ln_hpg_zps .false. 
-    set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg jpni 2
-    set_namelist namelist_cfg jpnj 2
-    set_namelist namelist_cfg jpnij 4
-    set_namelist namelist_cfg ln_icebergs .false.       
-#
-    if [ ${USING_MPMD} == "yes" ] ; then
-       set_xio_using_server iodef.xml true
-    else
-       set_xio_using_server iodef.xml false
-    fi
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-
-fi
-
-done
Index: anches/2017/dev_merge_2017/NEMOGCM/SETTE/new_sette_rpt.sh
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/SETTE/new_sette_rpt.sh	(revision 9223)
+++ 	(revision )
@@ -1,440 +1,0 @@
-#!/bin/bash -f
-#set -vx
-#
-# simple SETTE report generator.
-#
-# This version should be run in the SETTE directory. 
-# The machine name will be picked up from the sette.sh script but the location of the
-# validation directory needs to be set here (currently assumed to reside in the ../CONFIG directory)
-#
-#########################################################################################
-######################### Start of function definitions #################################
-##
-
-function restfile() {
-# Rebuild ice restart for SAS CONFIG, and restartability checks. Expects LONG and SHORT run directories.
-# For Stand Alone Surface configuration ocean is not running, just run ice model; so no outputs ocean files.
-# Compares LONG rebuild restart ice file with equivalent entry from the SHORT rebuild restart ice file.
-#
-# check nco module loaded, and load it if not
-if [ ! $( echo $LOADEDMODULES | grep cdo ) ]; then module load cdo >& /dev/null ; fi
-#
-  vdir=$1
-  nam=$2
-  pass=$3
-#
-  if [ -d $vdir/$nam ]; then
-    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l `
-    dorv=`echo $dorv | sed -e 's:.*/::'`
-    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -2l | head -1 `
-    rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -1l`
-    cd ${SAS_RESTART_DIR}/LONG
-#SF add here compilation of rebuild_tools to rebuild restart files, and add comparison of restart files
-    cd ${TOOLS_DIR}
-    ./maketools -n REBUILD_NEMO -m ${mach} > /dev/null 2>&1
-    cd ${TOOLS_DIR}/REBUILD_NEMO
-#SF echo "REBUILD LONG restart SAS files, without standard output"
-    ./rebuild_nemo -t 4 ../../CONFIG/SAS_ST/LONG/SAS_00000240_restart_ice  $NPROC > /dev/null 2>&1
-#SF echo "REBUILD SHORT restart SAS files, without standard output"
-    ./rebuild_nemo -t 4 ../../CONFIG/SAS_ST/SHORT/SAS_00000240_restart_ice $NPROC >&-
-    cd ${SAS_RESTART_DIR}/LONG
-#SF echo "COPY rebuild restart files"
-    cp SAS_00000240_restart_ice.nc $vdir/$nam/$mach/$dorv/LONG/.
-    cp ../SHORT/SAS_00000240_restart_ice.nc $vdir/$nam/$mach/$dorv/SHORT/.
-    f1o=$vdir/$nam/$mach/$dorv/LONG/SAS_00000240_restart_ice.nc
-    f2o=$vdir/$nam/$mach/$dorv/SHORT/SAS_00000240_restart_ice.nc
-    if  [ ! -f $f1o ] &&  [ ! -f $f2o ] ; then
-      printf "%-20s %s\n" $nam " REBUILD SAS restart ice DOES NOT exists; incomplete test";
-      return;
-  fi
-    #
-  done_oce=0
-    #
-  if  [  -f $f1o ] && [  -f $f2o ]; then
-## Compare the two netcdf files
-    cdo diffn $f1o $f2o > cdo_diff.out 2> /dev/null
-## Identical if cdo_diff.out exists but has zero size
-    if [ ! -s cdo_diff.out ]; then
-       difi=0
-    else
-## Identical if first character of $dif ==0
-       dif=$( grep -om1 '[0-9]* of [0-9]* records differ' cdo_diff.out )
-# difi contains the first character of summary of cdo dif. if = 0, then 0 record differ between the 2 files    
-       if [ -n "$dif" ]; then
-           difi=`echo $dif | cut -c -1`
-       fi
-    fi
-    \rm cdo_diff.out 
-
-    if [ $difi == 0 ]; then	
-       if [ $pass == 0 ]; then
-         printf "%-20s %s %s\n" $nam  " ice restarts are IDENTICAL  passed : " $dorv
-       fi
-    else
-       printf "%-20s %s %s\n" $nam  " ice restarts are DIFFERENT  FAILED : " $dorv 
-        #
-	# Offer view of differences on the second pass
-	#
-        if [ $pass == 1 ]; then
-          echo "<return> to view restart_ice.nc differences"
-          read y
-          cdo -diffv $f1o $f2o
-          done_oce=1
-          #echo "<return> to continue"
-          #read y
-        fi
-    fi
-  else
-      printf "%-20s %s\n" $nam " incomplete test";
-      return;
-  fi
-#
-fi
-}
-
-function resttest() { 
-#
-# Restartability checks. Expects LONG and SHORT run directories
-# Compares end of LONG stat files with equivalent entries from the SHORT stat files.
-#
-  vdir=$1
-  nam=$2
-  pass=$3
-#
-  if [ -d $vdir/$nam ]; then
-    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l `
-    dorv=`echo $dorv | sed -e 's:.*/::'`
-    f1o=$vdir/$nam/$mach/$dorv/LONG/ocean.output
-    f1s=$vdir/$nam/$mach/$dorv/LONG/run.stat
-    f1t=$vdir/$nam/$mach/$dorv/LONG/tracer.stat
-    f2o=$vdir/$nam/$mach/$dorv/SHORT/ocean.output
-    f2s=$vdir/$nam/$mach/$dorv/SHORT/run.stat
-    f2t=$vdir/$nam/$mach/$dorv/SHORT/tracer.stat
-
-    if  [ ! -f $f1s ] &&  [ ! -f $f1t ] ; then 
-      printf "%-20s %s\n" $nam " incomplete test";
-      return; 
-    fi
-    if  [ ! -f $f2s ] &&  [ ! -f $f2t ] ; then 
-      printf "%-20s %s\n" $nam " incomplete test";
-      return; 
-    fi
-#
-    done_oce=0
-
-    if  [  -f $f1s ] && [  -f $f2s ]; then 
-      nl=(`wc -l $f2s`)
-      tail -${nl[0]} $f1s > f1.tmp$$
-      cmp -s f1.tmp$$ $f2s
-      if [ $? == 0 ]; then
-        if [ $pass == 0 ]; then 
-          printf "%-20s %s %s\n" $nam  " run.stat restartability  passed : " $dorv
-        fi
-      else
-        printf "%-20s %s %s\n" $nam  " run.stat restartability  FAILED : " $dorv 
-#
-# Offer view of differences on the second pass
-#
-        if [ $pass == 1 ]; then
-          echo "<return> to view run.stat differences"
-          read y
-          sdiff f1.tmp$$ $f2s
-          echo "<return> to view ocean.output differences"
-          read y
-          sdiff $f1o $f2o | grep "|"
-          done_oce=1
-          echo "<return> to continue"
-          read y
-        fi
-      fi
-    fi
-#
-# Check tracer.stat files (if they exist)
-#
-    if  [  -f $f1t ] && [  -f $f2t ]; then
-      nl=(`wc -l $f2t`)
-      tail -${nl[0]} $f1t > f1.tmp$$
-      cmp -s f1.tmp$$ $f2t
-      if [ $? == 0 ]; then
-        if [ $pass == 0 ]; then 
-          printf "%-20s %s %s\n" $nam  " tracer.stat restartability  passed : " $dorv
-        fi
-      else
-        printf "%-20s %s %s\n" $nam  " tracer.stat restartability  FAILED : " $dorv 
-#
-# Offer view of differences on the second pass
-#
-        if [ $pass == 1 ]; then
-          echo "<return> to view tracer.stat differences"
-          read y
-          sdiff f1.tmp$$ $f2t
-#
-# Only offer ocean.output view if it has not been viewed previously
-#
-          if [ $done_oce == 0 ]; then
-            echo "<return> to view ocean.output differences"
-            read y
-            sdiff $f1o $f2o | grep "|"
-          fi
-          echo "<return> to continue"
-          read y
-        fi
-      fi
-    fi
-    rm f1.tmp$$
-  fi
-}
-function reprotest(){
-#
-# Reproducibility checks. Expects REPRO_N_M and REPRO_I_J run directories
-# Compares end of stat files from each
-#
-  vdir=$1
-  nam=$2
-  pass=$3
-#
-  if [ -d $vdir/$nam ]; then
-    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l `
-    dorv=`echo $dorv | sed -e 's:.*/::'`
-    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -2l | head -1 `
-    rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -1l`
-    f1o=$vdir/$nam/$mach/$dorv/$rep1/ocean.output
-    f1s=$vdir/$nam/$mach/$dorv/$rep1/run.stat
-    f1t=$vdir/$nam/$mach/$dorv/$rep1/tracer.stat
-    f2o=$vdir/$nam/$mach/$dorv/$rep2/ocean.output
-    f2s=$vdir/$nam/$mach/$dorv/$rep2/run.stat
-    f2t=$vdir/$nam/$mach/$dorv/$rep2/tracer.stat
-
-    if  [ ! -f $f1s ] && [ ! -f $f1t ] ; then 
-      printf "%-20s %s\n" $nam " incomplete test";
-      return;
-    fi
-    if  [ ! -f $f2s ] && [ ! -f $f2t ] ; then 
-      printf "%-20s %s\n" $nam " incomplete test";
-      return;
-    fi
-#
-    done_oce=0
-
-    if  [ -f $f1s ] && [ -f $f2s ] ; then
-      cmp -s $f1s $f2s
-      if [ $? == 0 ]; then 
-        if [ $pass == 0 ]; then  
-          printf "%-20s %s %s\n" $nam  " run.stat reproducibility passed : " $dorv
-        fi
-      else
-        printf "%-20s %s %s\n" $nam  " run.stat reproducibility FAILED : " $dorv
-#
-# Offer view of differences on the second pass
-#
-        if [ $pass == 1 ]; then
-          echo "<return> to view run.stat differences"
-          read y
-          sdiff f1.tmp$$ $f2s
-          echo "<return> to view ocean.output differences"
-          read y
-          sdiff $f1o $f2o | grep "|"
-          done_oce=1
-          echo "<return> to continue"
-          read y
-        fi
-      fi
-    fi
-#
-# Check tracer.stat files (if they exist)
-#
-    if  [ -f $f1t ] && [ -f $f2t ] ; then
-      cmp -s $f1t $f2t
-      if [ $? == 0 ]; then 
-        if [ $pass == 0 ]; then           printf "%-20s %s %s\n" $nam  " tracer.stat reproducibility passed : " $dorv
-        fi
-      else
-        printf "%-20s %s %s\n" $nam  " tracer.stat reproducibility  FAILED : " $dorv
-#
-# Offer view of differences on the second pass
-#
-        if [ $pass == 1 ]; then
-          echo "<return> to view tracer.stat differences"
-          read y
-          sdiff $f1t $f2t
-#
-# Only offer ocean.output view if it has not been viewed previously
-#
-          if [ $done_oce == 0 ]; then
-            echo "<return> to view ocean.output differences"
-            read y
-            sdiff $f1o $f2o | grep "|"
-          fi
-          echo "<return> to continue"
-          read y
-        fi
-      fi
-    fi
-  fi
-}
-
-function runtest(){
-#
-# Run checks.
-# Check presence of E R R O R in ocean.output from each
-#
-  vdir=$1
-  nam=$2
-  pass=$3
-#
-  if [ -d $vdir/$nam ]; then
-    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l `
-    dorv=`echo $dorv | sed -e 's:.*/::'`
-    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -2l | head -1 `
-    f1o=$vdir/$nam/$mach/$dorv/$rep1/ocean.output
-    if  [ ! -f $f1o ] ; then
-      printf "%-20s %s\n" $nam " ocean.output is MISSING : " $dorv
-      return;
-    else
-      nerr=`grep 'E R R O R' $f1o | wc -l`
-      if [[ $nerr > 0 ]]; then
-        printf "%-20s %s %s\n" $nam " run FAILED : " $dorv
-        if [ $pass == 1 ]; then
-          echo "<return> to view end of ocean.output"
-          read y
-          tail -100 $f1o
-          echo ''
-          echo "full ocean.output available here: $f1o"
-        fi
-      fi
-    fi
-  else
-    printf "%-20s %s %s\n" $nam  " directory is MISSING : " $dorv
-  fi
-}
-
-function identictest(){
-#
-#  checks AGRIF does not corrupe results with no AGRIF zoom. Expects ORCA2AGUL/AGRIFNOZ and ORCA2AGUL_NAGR/AGRIFNO  run directories
-# Compares run.stat files for each
-#
-  vdir=$1
-  dir1=$2
-  dir2=$3
-  pass=$4
-#
-  if [ -d $vdir/$dir1 ] && [ -d $vdir/$dir2 ]; then
-    dorv1=`ls -1rt $vdir/$dir1/$mach/ | tail -1l `
-    dorv1=`echo $dorv1 | sed -e 's:.*/::'`
-    dorv2=`ls -1rt $vdir/$dir2/$mach/ | tail -1l `
-    dorv2=`echo $dorv2 | sed -e 's:.*/::'`
-
-    rep1=`ls -1rt $vdir/$dir1/$mach/$dorv1/ |  tail -2l | head -1 `
-    rep2=`ls -1rt $vdir/$dir2/$mach/$dorv2/ |  tail -1l`
-    f1s=$vdir/$dir1/$mach/$dorv1/$rep1/run.stat
-    f2s=$vdir/$dir2/$mach/$dorv2/$rep2/run.stat
-
-    if  [ ! -f $f1s ] && [ ! -f $f2s ] ; then 
-      printf "%-20s %s\n" $dir1 $dir2 " incomplete test";
-      return; 
-    fi
-#
-    done_oce=0
-
-    if  [ -f $f1s ] && [ -f $f2s ] ; then
-      cmp -s $f1s $f2s
-      if [ $? == 0 ]; then
-        if [ $pass == 0 ]; then 
-          printf "%-20s %s %s %s %s\n" $rep1 $rep2  " AGRIF: run.stat unchanged - test  passed : " $dorv1 $dorv2
-        fi
-      else
-        printf "%-20s %s %s %s %s\n" $rep1 $rep2  " for AGRIF, run.stat test FAILED : " $dorv1 $dorv2
-#
-# Offer view of differences on the second pass
-#
-        if [ $pass == 1 ]; then
-          echo "<return> to view run.stat differences"
-          read y
-          sdiff $f1s $f2s
-          done_oce=1
-          echo "<return> to continue"
-          read y
-        fi
-      fi
-    fi
-  else
-    printf "%-20s %s\n" $dir1 $dir2 " incomplete test";
-  fi
-}
-########################### END of function definitions #################################
-##                                                                                     ##
-##    Main script                                                                      ##
-##                                                                                     ##
-#########################################################################################
-#
-  mach=`grep "COMPILER=" ./new_sette.sh | sed -e 's/COMPILER=//'`
-  NEMO_VALID=`grep "NEMO_VALIDATION_DIR=" ./param.cfg | sed -e 's/NEMO_VALIDATION_DIR=//'`
-# Directory to run the tests
- SETTE_DIR=$(cd $(dirname "$0"); pwd)
- MAIN_DIR=$(dirname $SETTE_DIR)
- CONFIG_DIR0=${MAIN_DIR}/CONFIG
- TOOLS_DIR=${MAIN_DIR}/TOOLS
- COMPIL_DIR=${TOOLS_DIR}/COMPILE
- NPROC=32
-
-  SAS_RESTART_DIR=${CONFIG_DIR0}/SAS_ST
-#
-  if [ ! -d $NEMO_VALID ]; then
-    echo "$NEMO_VALID validation directory not found"
-    exit
-  fi
-#
-# Show current revision tag and branch name
-#
-cmd="svn"
-[ ! -d "$SETTE_DIR/.svn" ] && cmd="git $cmd"
-revision=`$cmd info | grep Revision | cut -d ":" -f 2 | tr -d ' '`
-branchname=`$cmd info | grep URL | rev | cut -d "/" -f 3 | rev`
-echo "SETTE validation report : $branchname @ r$revision"
-#
-# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory
-#  
-for pass in  0 1 
-do
-#
- if [ $pass == 1 ]; then echo "---------------2nd pass------------------";fi
-#
-
-# Rebuild and restartability test for SAS
-#
- for restart_file in WSAS_ST
- do
-   restfile $NEMO_VALID $restart_file $pass
- done
-#
-# Restartability test
-#
- for restart_test in WGYREPIS_ST WORCA2LIM3PIS_ST WORCA2OFFPIS_ST WAMM12_ST WISOMIP_ST WORCA2AGR_ST
- do
-   resttest $NEMO_VALID $restart_test $pass
- done
-#
-# Reproducibility tests
-#
- for repro_test in WGYREPIS_ST WORCA2LIM3PIS_ST WORCA2OFFPIS_ST WAMM12_ST WISOMIP_ST WORCA2_LIM3_OBS_ST WORCA2AGR_ST
- do
-   reprotest $NEMO_VALID $repro_test $pass
-   runtest $NEMO_VALID $repro_test $pass
- done
-
-
-
-# AGRIF special check
- dir1=WORCA2AGUL_NOZOOM_ST
- dir2=WORCA2AGUL_NOAGR_ST
- identictest $NEMO_VALID $dir1 $dir2 $pass 
-
-
-done
-#
-## Additional checks for ORCA2AGUL/FIRST standalone AGRIF test
-## still to be added
-
-
-
-exit
