Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/cfg/X64_CURIE.cfg
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/cfg/X64_CURIE.cfg	(revision 5383)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/cfg/X64_CURIE.cfg	(revision 5402)
@@ -3,5 +3,5 @@
 # Available softwares:
 CDO=cdo 
-COMPILER=intel
+COMPILER=ifort
 MPI=bullxmpi
 NETCDF=netcdf
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/cfg/user_template.cfg
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/cfg/user_template.cfg	(revision 5383)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/cfg/user_template.cfg	(revision 5402)
@@ -15,5 +15,4 @@
 NEMO_HOME=''                              # NEMOGCM equivalent root directory to find ./ARCH,./CONFIG, ...
                                           # (${DIR_WORK}/NEMO/${NEMO_BRAN}/NEMOGCM, ...)
-NEMO_RBDN=''                              # NEMO rebuild executable
 
 # Comparatives directories localization:
@@ -23,10 +22,11 @@
 # External softs directories:
 DIR_XIOS=''			      	  # ${DIR_WORK}/XIOS/xios-1.0
-DIR_OASI=''			      	  # ${DIR_WORK}/OASIS        
+#DIR_OASI=''			      	  # ${DIR_WORK}/OASIS        
 
 # NEMO inputs (fill in if necessary)
-NEMO_FORC=''                              # Directory synchronized with DODS server
-                                          # (${DIR_WORK}/NEMO/FORC, ...)
+NEMO_FORC=''                              # Directory with forcing archive to extract from ESGF server
+                                          #        or  ""  all inputs files to copy
 FORC_TARF=''                              # Archive name (ORCA2_LIM_nemo_v3.6.tar, ...)
+                                          # Leave blank if not requested
 
 # Mailing list to inform of a failure, -p|--publish option required
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.env
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.env	(revision 5383)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.env	(revision 5402)
@@ -12,12 +12,14 @@
 export NEMO_HOME NEMO_BRAN
 export REFE_CONF TEST_CONF REFE_DIR TEST_DIR
-export DIR_XIOS  DIR_OASI
+export DIR_XIOS  #DIR_OASI
 export NEMO_FORC FORC_TARF
 
 # Only interest for essential NEMO directories
-NEMO_ARCH=${NEMO_HOME}/ARCH           ; NEMO_CONF=${NEMO_HOME}/CONFIG      ; NEMO_ENGI=${NEMO_HOME}/NEMO
-NEMO_EIOI=${NEMO_HOME}/EXTERNAL/IOIPSL; NEMO_EFCM=${NEMO_HOME}/EXTERNAL/fcm; NEMO_TCMP=${NEMO_HOME}/TOOLS/COMPILE
+NEMO_ARCH=${NEMO_HOME}/ARCH              ; NEMO_CONF=${NEMO_HOME}/CONFIG       ; NEMO_ENGI=${NEMO_HOME}/NEMO
+NEMO_EIOI=${NEMO_HOME}/EXTERNAL/IOIPSL   ; NEMO_EFCM=${NEMO_HOME}/EXTERNAL/fcm
+NEMO_TRBD=${NEMO_HOME}/TOOLS/REBUILD_NEMO; NEMO_TCMP=${NEMO_HOME}/TOOLS/COMPILE
 export NEMO_ARCH NEMO_CONF NEMO_ENGI
-export NEMO_EIOI NEMO_EFCM NEMO_TCMP
+export NEMO_EIOI NEMO_EFCM
+export NEMO_TRBD NEMO_TCMP
 
 # Sourcing super-computer configuration
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh	(revision 5383)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh	(revision 5402)
@@ -66,7 +66,7 @@
 . ${ARCH_ENV} > /dev/null    # Sourcing architecture environment
 get_rel
-sed -n 2p model.log | sed 'i\Fortran compiler' > mesg_05_compiler_${CFG_USER}_${CFG_ARCH}.txt
-sed -n 3p model.log | sed 'i\MPI libraries   ' > mesg_06_mpi_${CFG_USER}_${CFG_ARCH}.txt
-sed -n 4p model.log | sed 'i\NetCDF libraries' > mesg_07_netcdf_${CFG_USER}_${CFG_ARCH}.txt
+sed -n 2p model.log | sed 'i\Fortran compiler' | tee mesg_05_compiler_${CFG_USER}_${CFG_ARCH}.txt
+sed -n 3p model.log | sed 'i\MPI libraries   ' | tee mesg_06_mpi_${CFG_USER}_${CFG_ARCH}.txt
+sed -n 4p model.log | sed 'i\NetCDF libraries' | tee mesg_07_netcdf_${CFG_USER}_${CFG_ARCH}.txt
 
 
@@ -89,16 +89,17 @@
 # Get namelists, xml & forced files for running
 #---------------------------------------------------
+cd ${TEST_DIR}
 printf "Step......................\nPreparing job\n"                             | tee mesg_04_step_${CFG_USER}_${CFG_ARCH}.txt
-cd ${TEST_DIR}
 find ${NEMO_CONF}/${TEST_CONF}/EXP00 -regex '.*\(cfg\|opa\|ref\|xml\)' -exec cp {} . \;
 
-if [ ! -z "${NEMO_FORC}" ]; then
-    cp ${NEMO_FORC}/${FORC_TAR} .
-    tar -tvf ${FORC_TAR} > inputs_list.txt && tar -vxf ${FORC_TAR} > /dev/null
-    [ $? -ne 0 ] && get_out
-    gunzip *.gz
+if [ ! -z "${FORC_TAR}" ]; then
+    cmd_iol="tar -tvf ${NEMO_FORC}/${FORC_TAR}"; cmd_iof="tar -vxf ${NEMO_FORC}/${FORC_TAR}"
 else
-    touch inputs_list.txt
+    cmd_iol="ls ${NEMO_FORC}/*"                ; cmd_iof="\cp ${NEMO_FORC}/* ."
 fi
+
+${cmd_iol} > inputs_list.txt && ${cmd_iof} > /dev/null
+[ $? -ne 0 ] && get_out
+[ $( find . -name '*.gz' -print -quit ) ] && gunzip *.gz
 
 
@@ -111,11 +112,11 @@
 time_elapsed=0; time_increment=30
 sleep ${time_increment}
-while [[ $( ${JOB_LIST} | grep $job_num ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do
+while [[ $( ${JOB_LIST} | grep ${job_num} ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do
     printf "\n####################################################" >> computation.log
-    ${JOB_VIEW} $job_num                                            >> computation.log
+    ${JOB_VIEW} ${job_num}                                          >> computation.log
     sleep ${time_increment}
     let time_elapsed+=${time_increment}
 done
-
+sleep ${time_increment}
 
 # Eventual crash during computing
@@ -124,9 +125,11 @@
 if   [ ! -f ocean.output                  ]; then
     printf "Step......................\nOpa crashed at initialization\n"         | tee mesg_04_step_${CFG_USER}_${CFG_ARCH}.txt
+    ${JOB_DELE} ${job_num} >/dev/null 2>&1
     status='FAILED'
 elif [ $( grep 'E R R O R' ocean.output ) ]; then
     printf "Step......................\nOpa crashed\n"                           | tee mesg_04_step_${CFG_USER}_${CFG_ARCH}.txt
-    grep 'E R R O R'       ocean.output >> mesg_12_comments_${CFG_USER}_${CFG_ARCH}.txt
-    sed 's/^/Time step :/' time.step    >> mesg_12_comments_${CFG_USER}_${CFG_ARCH}.txt
+    grep 'E R R O R'       ocean.output | tee    mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt
+    sed 's/^/Time step :/' time.step    | tee -a mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt
+    ${JOB_DELE} ${job_num} >/dev/null 2>&1
     status='FAILED'
 fi
@@ -149,26 +152,20 @@
 
 
-# Comments
-#---------------------------------------------------
-echo 'Comments'                    >  mesg_12_comments_${CFG_USER}_${CFG_ARCH}.txt
-grep 'W A R N I N G:' ocean.output >> mesg_12_comments_${CFG_USER}_${CFG_ARCH}.txt
-
-
 # Finals tests
 #---------------------------------------------------
 if [ $status != 'FAILED' ]; then
+
+    # Comments
+    #---------------------------------------------------
+    echo 'Comments'                    | tee    mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt
+    grep 'W A R N I N G:' ocean.output | tee -a mesg_10_comments_${CFG_USER}_${CFG_ARCH}.txt
+
+    # Portability !
     printf "Step......................\nGet real CPU time\n"                     | tee mesg_04_step_${CFG_USER}_${CFG_ARCH}.txt
-    real_cpu_time=$( ${JOB_VIEW} $job_num | awk 'END{print $9}' )
-    printf "Real CPU time\n%s\n" ${real_cpu_time} > mesg_09_realcputime_${CFG_USER}_${CFG_ARCH}.txt
+    real_cpu_time=$( ${JOB_VIEW} ${job_num} | awk 'END{print $9}' )
+    printf "Real CPU time\n%s\n" ${real_cpu_time} | tee mesg_08_realcputime_${CFG_USER}_${CFG_ARCH}.txt
 else
     printf "Step......................\nTest input files difference\n"           | tee mesg_04_step_${CFG_USER}_${CFG_ARCH}.txt
-    diff inputs_list.txt ${REFE_DIR}/inputs_list.txt
-
-    if [ $? -ne 0 ]; then
-	printf "Input files\nDifferent" > mesg_10_inputfiles_${CFG_USER}_${CFG_ARCH}.txt
-    else
-	printf "Input files\nSame"      > mesg_10_inputfiles_${CFG_USER}_${CFG_ARCH}.txt
-    fi
-
+    diff_inputs
     get_out
 fi
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh	(revision 5383)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh	(revision 5402)
@@ -1,4 +1,18 @@
 #!/bin/bash
 
+
+diff_inputs() {
+    for file in inputs_list.txt $( ls namelist_* ) iodef.xml; do
+	diff $file ${REFE_DIR}/$file
+
+	if [ $? -ne 0 ]; then
+	    printf "Input files\nDifferent" | tee mesg_09_inputfiles_${CFG_USER}_${CFG_ARCH}.txt
+	    get_out
+	fi
+
+    done
+
+    printf "Input files\nSame"              | tee mesg_09_inputfiles_${CFG_USER}_${CFG_ARCH}.txt
+}
 
 diff_nc() {
@@ -13,5 +27,5 @@
 
 diff_restart() {
-    last_time_step=$( cat ${REFE_DIR}/time.step )
+    last_time_step=$( cat ${REFE_DIR}/time.step | tr -d [:space:] )
     result_final=0
 
@@ -19,11 +33,13 @@
 
     for file in restart restart_ice restart_trc; do
-	printf ${TEST_DIR}'/*'${last_time_step}'_'${file}'.nc: '
-
-	if [ $( find ${TEST_DIR} -name *${last_time_step}_$file.nc ) ]; then
-	    ${NEMO_RBDN} -t $NPROC ${TEST_CONF} $(( ${last_time_step} + 1 ))
+	printf "${TEST_DIR}/*${last_time_step}_${file}*.nc: "
+	find ${TEST_DIR} -name *${last_time_step}_$file*.nc && exit 0
+	if [ $( find ${TEST_DIR} -regex .*${last_time_step}_$file[_0-9]*.nc ) ]; then
+	    filebase=$( ls *${last_time_step}_$file*.nc | sed "s/^\(.*_\)0*$last_time_step.*/\1/" )
+	    ${NEMO_TRBD}/rebuild_nemo -t $NPROC ${filebase}_${last_time_step}_$file $(( ${last_time_step} + 1 )) #>/dev/null
 	    result=$( diff_nc ${TEST_DIR}/*${last_time_step}_$file.nc ${REFE_DIR}/*${last_time_step}_$file.nc )
 	    printf "cdo diffv $result\n"
 	    (( result_final = result_final + result ))
+#	    \rm *${last_time_step}_${file}_[0-9]*.nc
 	else
 	    printf "no restart files found for comparison\n"
@@ -39,5 +55,5 @@
                                 arch_rel=$( echo $LOADEDMODULES | sed "s#.*$rel/\([^:]*\).*#\1#" )
 	[ -z "${arch_rel}" ] && arch_rel=$( echo $PATH          | sed "s#.*$rel/\([^/]*\).*#\1#" )
-#    [ $( echo $rel | grep $COMPILER ) ] && arch_rel=$( $rel --version | grep -m1 -o ' [0-9.]* ' >/dev/null )
+	[ $( echo $rel | grep $COMPILER ) ] && arch_rel=$( $rel --version | grep -m1 -o ' [0-9.]* ' )
 	echo $rel ${arch_rel} >> model.log
     done
@@ -47,8 +63,9 @@
     rev=0
 
-    for dir in ${DIR_XIOS}  ${NEMO_ARCH} ${NEMO_CONF} ${NEMO_ENGI} ${NEMO_EIOI} \
+#    for dir in ${DIR_XIOS}  ${NEMO_ARCH} ${NEMO_CONF} ${NEMO_ENGI} ${NEMO_EIOI} \
+    for dir in ${NEMO_ARCH} ${NEMO_CONF} ${NEMO_ENGI} ${NEMO_EIOI} \
 	       ${NEMO_EFCM} ${NEMO_TRUS} ${NEMO_TCMP} ${NEMO_TRBD}               ; do
 	# For time being, just get revision number from XIOS
-	[ $dir == ${DIR_XIOS} ] && echo 'XIOS '$( svn info $dir | awk '(NR == 9) {print $NF}' ) >> model.log && continue
+#	[ $dir == ${DIR_XIOS} ] && echo 'XIOS '$( svn info $dir | awk '(NR == 9) {print $NF}' ) >> model.log && continue
 	${SVN_CMD} $dir
 	rev_loc=$( svn info $dir | awk '(NR == 9) {print $NF}' )
