Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/batch/X64_CURIE.sh
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/batch/X64_CURIE.sh	(revision 5644)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/batch/X64_CURIE.sh	(revision 5644)
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+#Config ccc_msub
+#MSUB -A  gen7451
+#MSUB -r  Trust
+#MSUB -o  Trust_%I
+#MSUB -e  Trust_%I
+#MSUB -oe
+#MSUB -q  xlarge
+#MSUB -n  128
+#MSUB -N  1
+#MSUB -T  1800
+##MSUB -@  ntmlod@locean-ipsl.upmc.fr:begin,end
+ccc_mprun ./opa
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/batch/X64_CURIE_cron.sh
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/batch/X64_CURIE_cron.sh	(revision 5644)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/batch/X64_CURIE_cron.sh	(revision 5644)
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+#Config ccc_msub
+#MSUB -A  gen7451
+#MSUB -r  Trust
+#MSUB -o  Trust_%I
+#MSUB -e  Trust_%I
+#MSUB -oe
+#MSUB -q  xlarge
+#MSUB -n  128
+#MSUB -N  1
+#MSUB -T  1800
+##MSUB -@  ntmlod@locean-ipsl.upmc.fr:begin,end
+ccc_mprun ./opa
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/batch/X64_CURIE_trust.sh
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/batch/X64_CURIE_trust.sh	(revision 5642)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#!/bin/bash
-
-#Config ccc_msub
-#MSUB -A  gen7451
-#MSUB -r  Trust
-#MSUB -o  Trust_%I
-#MSUB -e  Trust_%I
-#MSUB -oe
-#MSUB -q  xlarge
-#MSUB -n  128
-#MSUB -N  1
-#MSUB -T  1800
-##MSUB -@  ntmlod@locean-ipsl.upmc.fr:begin,end
-ccc_mprun ./opa
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/X64_ADA.cfg
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/X64_ADA.cfg	(revision 5642)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/X64_ADA.cfg	(revision 5644)
@@ -8,5 +8,5 @@
 
 # Job commands: LoadLeveler
-JOB_SUBM="llsubmit ${NEMO_TRUS}/batch/${CFG_ARCH}.sh | grep -oe '\<[0-9]*\>'"
+JOB_SUBM="llsubmit ${NEMO_TRUS}/batch/${NEMO_HPCC}.sh | grep -oe '\<[0-9]*\>'"
 JOB_LIST=llq
 JOB_INFO='llq -x'
@@ -19,3 +19,3 @@
 
 # Architecture environment (be careful with compliance with XIOS)
-ARCH_ENV=${DIR_XIOS}/arch/arch-${CFG_ARCH}.env
+ARCH_ENV=${DIR_XIOS}/arch/arch-${NEMO_HPCC}.env
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/X64_CURIE.cfg
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/X64_CURIE.cfg	(revision 5642)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/X64_CURIE.cfg	(revision 5644)
@@ -3,10 +3,10 @@
 # Available softwares:
 CDO='cdo'
-COMPILER='intel'
+COMPILER='ifort'
 MPI='bullxmpi'
 NETCDF='netcdf'
 
 # Job commands: ccc_*
-JOB_SUBM="ccc_msub ${NEMO_TRUS}/batch/${CFG_ARCH}.sh | grep -oe '\<[0-9]*\>'"
+JOB_SUBM="ccc_msub ${NEMO_TRUS}/batch/${NEMO_HPCC}.sh | grep -oe '\<[0-9]*\>'"
 JOB_LIST=ccc_mpp
 JOB_INFO=ccc_macct
@@ -19,3 +19,3 @@
 
 # Architecture environment (be careful with compliance with XIOS)
-ARCH_ENV=${DIR_XIOS}/arch/arch-${CFG_ARCH}.env
+ARCH_ENV=${DIR_XIOS}/arch/arch-${NEMO_HPCC}.env
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/X64_CURIE_cron.cfg
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/X64_CURIE_cron.cfg	(revision 5644)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/X64_CURIE_cron.cfg	(revision 5644)
@@ -0,0 +1,21 @@
+# Curie configuration
+
+# Available softwares:
+CDO='netcdf-utils-'
+COMPILER='ifort'
+MPI='bullxmpi\/'
+NETCDF='netcdf-'
+
+# Job commands: ccc_*
+JOB_SUBM="ccc_msub ${NEMO_TRUS}/batch/${NEMO_HPCC}.sh | grep -oe '\<[0-9]*\>'"
+JOB_LIST=ccc_mpp
+JOB_INFO=ccc_macct
+JOB_TIME="ccc_macct \${JOB_ID} | awk '/opa/ {print \$9}'"
+JOB_DELE=ccc_mdel
+
+# Compiling & computing settings
+[ -z "$NPROC"       ] && NPROC=16
+[ -z "${TIME_LIMI}" ] && TIME_LIMI=10800 # 3h
+
+# Architecture environment (be careful with compliance with XIOS)
+ARCH_ENV=${DIR_XIOS}/arch/arch-${NEMO_HPCC}.env
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/arch_template.cfg
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/arch_template.cfg	(revision 5642)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/arch_template.cfg	(revision 5644)
@@ -1,3 +1,3 @@
-# Copy to ./${CFG_ARCH}.cfg, fill in according to your installation
+# Copy to ./${NEMO_HPCC}.cfg, fill in according to your installation
 
 # Super-computer configuration
@@ -15,5 +15,5 @@
 # Job commands (works with job ID):
 JOB_SUBM=''   	 			  # Submit a job && get his ID in return
-                                             # ex: "cmd ${NEMO_TRUS}/batch/${CFG_ARCH}.sh | awk '{print \$NF}'"
+                                             # ex: "cmd ${NEMO_TRUS}/batch/${NEMO_HPCC}.sh | awk '{print \$NF}'"
 JOB_LIST=''    	 			  # List all submitted jobs (to determine by `grep` if a job completed or not)
 JOB_INFO=''   	 			  # Get job informations          with job ID as argument (filling a computation log)
@@ -27,3 +27,3 @@
 
 # Architecture environment (be careful with compliance with XIOS)
-ARCH_ENV=''                               # ${DIR_WORK}/XIOS/arch/arch-${CFG_ARCH}.env
+ARCH_ENV=''                               # ${DIR_WORK}/XIOS/arch/arch-${NEMO_HPCC}.env
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/martin.cfg
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/martin.cfg	(revision 5644)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/martin.cfg	(revision 5644)
@@ -0,0 +1,20 @@
+# User configuration
+
+# NEMO overall configuration:
+[ -z "${NEMO_BRAN}" ] && NEMO_BRAN='trunk'
+[ -z "${REFE_CONF}" ] && REFE_CONF='ORCA2_LIM_PISCES'
+[ -z "${NEMO_TARF}" ] && NEMO_TARF='ORCA2_LIM_nemo_v3.6.tar'
+[ -z "${TEST_CONF}" ] && TEST_CONF='O2L3P_trust'
+NEMO_HOME=$CCCWORKDIR/NEMO/${NEMO_BRAN}/NEMOGCM
+NEMO_FORC=$CCCWORKDIR/NEMO/FORC
+
+# Comparatives directories localization:
+REFE_DIR=$CCCSTOREDIR/trusting_sav/${REFE_CONF}/${NEMO_BRAN}
+TEST_DIR=$SCRATCHDIR/trusting/${REFE_CONF}/${NEMO_BRAN}/trusting_${DATE}
+
+# External softs directories:
+DIR_XIOS=$CCCWORKDIR/XIOS/xios-1.0
+#DIR_OASI=$CCCWORKDIR/OASIS
+
+# Mailing list to inform of a failure, -p|--publish option required
+[ -z "$EMAIL" ] && EMAIL='ntmlod@locean-ipsl.upmc.fr'
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/user_template.cfg
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/user_template.cfg	(revision 5642)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/config/user_template.cfg	(revision 5644)
@@ -7,5 +7,5 @@
 [ -z "${CONF_REFE}" ] && REFE_CONF=''        # ex: 'ORCA2_LIM_PISCES', 'GYRE', ...
 [ -z "${CONF_TEST}" ] && TEST_CONF=''        # ex: "${CONF_REFE}_trust", ...
-[ -z "${FORC_TARF}" ] && FORC_TARF=''     # Archive name (ex: 'ORCA2_LIM_nemo_v3.6.tar', ...), let blank if not requested
+[ -z "${NEMO_TARF}" ] && NEMO_TARF=''     # Archive name (ex: 'ORCA2_LIM_nemo_v3.6.tar', ...), let blank if not requested
 NEMO_HOME=''                              # NEMOGCM directory for computation (./ARCH, ./CONFIG, ...)
                                              # ex: ".../NEMO/${NEMO_BRAN}/NEMOGCM", ...
@@ -17,5 +17,5 @@
                                              # ex: ".../${CONF_REFE}/${NEMO_BRAN}"
 TEST_DIR=''			      	  # Test       folder for computation
-                                             # ex: ".../${CONF_REFE}/${NEMO_BRAN}/trusting_${DATE_STR}"
+                                             # ex: ".../${CONF_REFE}/${NEMO_BRAN}/trusting_${DATE}"
 
 # External softs directories:
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/install_dir.sh
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/install_dir.sh	(revision 5642)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/install_dir.sh	(revision 5644)
@@ -3,20 +3,25 @@
 #settings
 /ccc/work/cont003/gen7451/martin/NEMO/
-branches/2015/nemo_v3_6_STABLE
+NEMO_BRAN=branches/2015/nemo_v3_6_STABLE
 
-X64_CURIE_trust
+X64_CURIE_cron
 
 cd /ccc/work/cont003/gen7451/martin/NEMO
 mkdir -p ${}/NEMOGCM
 
-for elmt in ARCH CONFIG NEMO EXTERNAL/IOIPSL EXTERNAL/fcm TOOLS ; do
-    svn co http://forge.ipsl.jussieu.fr/nemo/svn/${}/NEMOGCM/$elmt ${}/NEMOGCM/$elmt
+for elmt in 'ARCH' 'CONFIG' 'NEMO' 'EXTERNAL/IOIPSL' 'EXTERNAL/fcm' 'TOOLS' 'TRUST'; do
+    svn_bran=${NEMO_BRAN}
+    [ "$elmt" == 'TRUST' ] && svn_bran='branches/2015/dev_r5092_CNRS_SETTE'
+    svn co http://forge.ipsl.jussieu.fr/nemo/svn/${svn_bran}/NEMOGCM/$elmt ${}/NEMOGCM/$elmt
+
 done
 
 cd NEMOGCM/TOOLS
-cp -f ../../../trunk/NEMOGCM/ARCH/CNRS/arch-X64_CURIE_trust.fcm ../ARCH
-./maketools -m ${} -n REBUILD_NEMO > /dev/null
 
 for elmt in $( ls * ); do
     [ ! $( echo $elmt | grep "COMPILE\|maketools\|REBUILD_NEMO" ) ] && rm -rf $elmt
 done
+
+if [ find ../ARCH -name  ]
+./maketools -m ${} -n REBUILD_NEMO > /dev/null
+
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.env
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.env	(revision 5642)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.env	(revision 5644)
@@ -2,15 +2,16 @@
 
 
-## Time-stamp
-date_test=$( date )
-export DATESTR=$( date -ud "${date_test}" +%Y%m%d%Z%H%M )
+## Time-stamp & filename pattern
+dat=$( date )
+export DATE=$( date -ud "$dat" +"%Y%m%d%Z%H%M" )
+export PATTERNAME=${NEMO_USER}'_'${NEMO_HPCC}
 
 ## Sourcing user configuration
 ##--------------------------------------
-. ${NEMO_TRUS}/config/${CFG_USER}.cfg
+. ${NEMO_TRUS}/config/${NEMO_USER}.cfg
 export NEMO_HOME NEMO_BRAN
 export REFE_CONF TEST_CONF REFE_DIR TEST_DIR
 export DIR_XIOS  #DIR_OASI
-export NEMO_FORC FORC_TARF
+export NEMO_FORC NEMO_TARF
 export EMAIL
 
@@ -25,5 +26,5 @@
 ## Sourcing super-computer configuration
 ##--------------------------------------
-. ${NEMO_TRUS}/config/${CFG_ARCH}.cfg
+. ${NEMO_TRUS}/config/${NEMO_HPCC}.cfg
 export CDO      COMPILER MPI      NETCDF
 export JOB_SUBM JOB_LIST JOB_INFO JOB_TIME JOB_DELE
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh	(revision 5642)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh	(revision 5644)
@@ -2,7 +2,9 @@
 
 
+cd $( dirname $0 )
+
 ## Set defaults
 ##---------------------------------------------------
-NEMO_TRUS=$( pwd $( dirname $0 ) )
+NEMO_TRUS=$( pwd )
 DEBUG=0; PUBLISH=0
 I_MODULE=0      ## No 'module' command by default
@@ -13,10 +15,10 @@
 while [ $# -ne 0 ]; do
     case $1 in
-	-a|--archive) FORC_TARF=$2         ; shift 2;; -b|--branch ) NEMO_BRAN=$2         ; shift 2;;
+	-a|--archive) NEMO_TARF=$2         ; shift 2;; -b|--branch ) NEMO_BRAN=$2         ; shift 2;;
 	-d|--debug  ) set -vx; DEBUG=1     ; shift  ;; -e|--email  ) EMAIL=$2             ; shift 2;;
 	-j|--job    ) NPROC=$2             ; shift 2;; -h|--help   ) cat trusting_help.txt; exit  1;;
-	-m|--machine) CFG_ARCH=$2          ; shift 2;; -n|--newconf) TEST_CONF=$2         ; shift 2;;
+	-m|--machine) NEMO_HPCC=$2         ; shift 2;; -n|--newconf) TEST_CONF=$2         ; shift 2;;
 	-r|--refconf) REFE_CONF=$2         ; shift 2;; -t|--time   ) TIME_LIMI=$2         ; shift 2;;
-	-p|--publish) PUBLISH=1            ; shift  ;; -u|--user   ) CFG_USER=$2          ; shift 2;;
+	-p|--publish) PUBLISH=1            ; shift  ;; -u|--user   ) NEMO_USER=$2         ; shift 2;;
 	-v|--version) NEMO_VERS=$2         ; shift 2;;            *) cat trusting_help.txt; exit  1;;
     esac
@@ -25,10 +27,10 @@
 ## Initialization (super-computer & user environment)
 ##---------------------------------------------------
-if [[ ! -z "${CFG_ARCH}" && ! -z "${CFG_USER}" ]]; then
+if [[ ! -z "${NEMO_HPCC}" && ! -z "${NEMO_USER}" ]]; then
 
-    if   [ ! $( find ${NEMO_TRUS}/config -name ${CFG_USER}.cfg ) ]; then
-	echo 'No configuration file in '${NEMO_TRUS}'/config for '${CFG_USER}; exit 1
-    elif [ ! $( find ${NEMO_TRUS}/config -name ${CFG_ARCH}.cfg ) ]; then
-	echo 'No configuration file in '${NEMO_TRUS}'/config for '${CFG_ARCH}; exit 1
+    if   [ ! $( find ${NEMO_TRUS}/config -name ${NEMO_USER}'.cfg' ) ]; then
+	echo 'No configuration file (.cfg) in '${NEMO_TRUS}'/config for '${NEMO_USER}; exit 1
+    elif [ ! $( find ${NEMO_TRUS}/config -name ${NEMO_HPCC}'.cfg' ) ]; then
+	echo 'No configuration file (.cfg) in '${NEMO_TRUS}'/config for '${NEMO_HPCC}; exit 1
     else
 	. ${NEMO_TRUS}/trusting.env
@@ -41,22 +43,29 @@
 . ./trusting_func.sh
 
-## 
+## Summary of trusting test context
 ##---------------------------------------------------
+printf "\
+NEMO Trusting test:\n\
+-------------------\n\
+Testing ${TEST_CONF} based on ${REFE_CONF} from ${NEMO_BRAN}\n\
+Configuration files: ${NEMO_USER}.cfg & ${NEMO_HPCC}.cfg\n"
+
+## Making timestamped directory with messenger files
+##---------------------------------------------------
+print_step 'Time-stamp generation & testing directory creation'
 mkdir -p ${TEST_DIR} ${REFE_DIR}
 echo ${TEST_DIR} && cd ${TEST_DIR}
-date_str=$( date -ud ${DATESTR} +"%F %R %Z" )
-printf "Date\n${date_str}\n" > mesg_01_date_${CFG_USER}_${CFG_ARCH}.txt
+init_files && get_date
 
 ## SVN action on XIOS & NEMO essentials directories
 ##---------------------------------------------------
-print_step 'SVN actions on NEMO directories'
+print_step 'SVN command on NEMO directories:'
 get_nemo_rev
 
 ## Check softwares versions (source arch environment)
 ##---------------------------------------------------
-print_step 'Get softwares release'
+print_step 'Get softwares releases'
 [ -e ${ARCH_ENV} ] && . ${ARCH_ENV} > /dev/null
-[ $? -eq 0 ] && I_MODULE=1
-export I_MODULE
+(( $? == 0  )) && export I_MODULE=1
 get_soft_rel
 cat model.log
@@ -64,38 +73,38 @@
 ## XIOS compiling
 ##---------------------------------------------------
-print_step 'Compiling XIOS'
+print_step 'Compile XIOS'
 cd ${DIR_XIOS}
 full=''; [ $DEBUG -eq 0 ] && full='--full'
-./make_xios $full --arch ${CFG_ARCH} --job $NPROC >& /dev/null
+./make_xios $full --arch ${NEMO_HPCC} --job $NPROC >& /dev/null
 [ ! -e ${DIR_XIOS}/lib/libxios.a ] && get_out 1
 
 ## NEMO config compiled from scratch
 ##---------------------------------------------------
-print_step "Compiling ${REFE_CONF} configuration"
+print_step "Compile ${REFE_CONF} configuration"
 cd ${NEMO_CONF}
 [[ -d ${TEST_CONF} && $DEBUG -eq 0 ]] && ./makenemo -n ${TEST_CONF} clean >  /dev/null
-./makenemo -n ${TEST_CONF} -r ${REFE_CONF} -m ${CFG_ARCH} -j $NPROC       >& /dev/null
+./makenemo -n ${TEST_CONF} -r ${REFE_CONF} -m ${NEMO_HPCC} -j $NPROC      >& /dev/null
 [ ! -e ${TEST_CONF}/BLD/bin/nemo.exe ] && get_out 2
 
 ## Get namelists, xml & forcing files for running
 ##---------------------------------------------------
-print_step "Preparing job by copying ${REFE_CONF} input files"
+print_step 'Set job (copying & extracting input files)'
 cd ${TEST_DIR}
 find ${NEMO_CONF}/${TEST_CONF}/EXP00 -regex '.*\(cfg\|opa\|ref\|xml\)' -exec cp {} . \;
 get_inputs
-[ $? -ne 0 ] && get_out 3
+(( $? != 0 )) && get_out 3
 [ $( find . -name '*.gz' -print -quit ) ] && gunzip *.gz
 
 ## Check input files in all cases
 ##---------------------------------------------------
-print_step 'Difference with standard input files list'
+print_step 'Compare with standard input files list'
 diff_inputs
 
 ## Job submission & computing
 ##---------------------------------------------------
-print_step 'Submitting job'
+print_step 'Submit job'
 JOB_ID=$( eval ${JOB_SUBM} )
-[ $? -ne 0 ] && get_out 4
-print_step 'Holding/Running job'
+(( $? != 0 )) && get_out 4
+print_step 'Pending job'
 job_pending
 print_step 'Job finished'
Index: branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh
===================================================================
--- branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh	(revision 5642)
+++ branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh	(revision 5644)
@@ -2,119 +2,35 @@
 
 
-comments() {
-    state=$1; LAST_TIME_STEP=0
-
-    if [ "$state" == 'E R R O R' ]; then
-	[ -e time.step ] && LAST_TIME_STEP=$( cat time.step | tr -d ' ' )
-	export LAST_TIME_STEP
-	[ -e ocean.output ] && line=$( grep -m1 -A4 "$state"   ocean.output | tr -d '\n' )
-    else
-	[ -e ocean.output ] && line=$( grep -m1 -A2 "^ $state" ocean.output | tr -d '\n' )
-    fi
-
-#    if [[ -e ${REFE_DIR}/model.log && $( diff -q model.log ${REFE_DIR}/model.log ) ]]; then
-#	line=$( diff model.log ${REFE_DIR}/model.log  | grep '>' | sed '{N;s/\n/<BR>/}' )
-#    fi
-
-    printf "Comments\n$line\n" | tee mesg_11_comments_${CFG_USER}_${CFG_ARCH}.txt
-}
-
-
-diff_inputs() {
-    mesg='Same'
-    for file in inputs_list.txt $( ls namelist_* ) $( ls *.xml ); do
-	diff -q $file ${REFE_DIR}/$file > /dev/null
-	[ $? -ne 0 ] && mesg='Different'
-    done
-
-    printf "Input files\n$mesg\n" | tee mesg_09_inputs_${CFG_USER}_${CFG_ARCH}.txt
-}
-
-diff_results() {
-    for file in ocean.output $( ls *.stat ); do
-	[ ! -e ${REFE_DIR}/$file ] && export ST='FAILED' && get_out 7
-	diff -q $file ${REFE_DIR}/$file
-	[ $? -ne 0 ] && export ST='FAILED'
-    done
-}
-
-diff_restart() {
-    [ ! -e  ${REFE_DIR}/time.step ] && export ST='FAILED' && get_out 9
-
-    export LAST_TIME_STEP=$( cat ${REFE_DIR}/time.step | tr -d [:space:] )
-    echo 'Last time step of standard run: '${LAST_TIME_STEP}
-
-    if [ $( find -regex ".*_0+${LAST_TIME_STEP}_restart.*\.nc" -print -quit ) ]; then
-	base_name=$( find -regex ".*_0+${LAST_TIME_STEP}_restart.*\.nc" -print -quit | awk -F/ '{print $NF}' \
-	             | sed "s/^\(.*\)$LAST_TIME_STEP\_restart.*/\1$LAST_TIME_STEP\_/"                         )
-
-	for comp in restart restart_ice restart_trc; do
-	    file=${base_name}${comp} && printf "$file.nc: "
-
-	    nb_dom=$( find -name "${file}_[0-9]*.nc" | wc -l | awk '{print $1}' )
-	    if   [ ${nb_dom} -gt 1 ]; then
-		${NEMO_TRBD}/rebuild_nemo -t $NPROC $file ${nb_dom} > /dev/null
-		[ $? -eq 0 ] && rm -f ${base_name}${comp}_[0-9]*.nc > /dev/null
-	    elif [ ${nb_dom} -eq 0 ]; then
-		export ST='FAILED' && get_out 10
-	    fi
-
-	    if [ -e ${REFE_DIR}/$file.nc ]; then
-	    ## UNIX `cmp` not suitable (filename & timestamp in .nc file)
-		nc_diff=$( $CDO diffn $file.nc ${REFE_DIR}/$file.nc 2> /dev/null \
-		           | awk '/records/ {print $1}'                           )
-
-		if [[ ! -z ${nc_diff} && ${nc_diff} -ne 0 ]]; then
-		    export ST='FAILED'
-		    printf "$CDO ${nc_diff}\n"
-		else
-		    printf "identical\n"
-		fi
-
-	    else
-		export ST='FAILED' && get_out 9
-	    fi
-
-	done
-
-    else
-	export ST='FAILED'
-    fi
-
-}
-
-get_cpu_time() {
-    real_cpu_time=$( eval ${JOB_TIME} )
-    printf "Real CPU time\n${real_cpu_time}\n" | tee mesg_10_cputime_${CFG_USER}_${CFG_ARCH}.txt
-}
-
-get_inputs() {
-    if [ ! -z "${FORC_TARF}" ]; then
-	cmd_iol="tar -tvf ${NEMO_FORC}/${FORC_TARF}"; cmd_iof="tar -vxf ${NEMO_FORC}/${FORC_TARF}"
-    else
-	cmd_iol="ls ${NEMO_FORC}/*"                 ; cmd_iof="\cp ${NEMO_FORC}/* ."
-    fi
-
-    ${cmd_iol} > inputs_list.txt && ${cmd_iof} > /dev/null
-}
-
-get_soft_rel() {
-    for soft in $CDO $COMPILER $MPI $NETCDF; do
-	soft_rel=''
-        ((   ${I_MODULE} == 1   )) && soft_rel=$( echo $LOADEDMODULES | sed "s/.*$soft\([0-9.a-z_]*\).*/\1/i" )
-	[    -z "${soft_rel}"    ] && soft_rel=$( echo $PATH          | sed "s/.*$soft\([0-9.a-z_]*\).*/\1/i" )
-	[ "$soft" == "$COMPILER" ] && soft_rel=$( $soft --version     | grep -m1 -oe '\<[0-9. ]*\>'           )
-	# Cleaning characters string to display proper soft name
-	soft=$( echo $soft | sed 's#\\##; s#[/-]$##' )
-	echo $soft ${soft_rel} >> model.log
-    done
-
-    sed -n 4p model.log | sed 'i\Fortran compiler' > mesg_06_compiler_${CFG_USER}_${CFG_ARCH}.txt
-    sed -n 5p model.log | sed 'i\MPI libs'         > mesg_07_mpi_${CFG_USER}_${CFG_ARCH}.txt
-    sed -n 6p model.log | sed 'i\NetCDF libs'      > mesg_08_netcdf_${CFG_USER}_${CFG_ARCH}.txt
+## Messenger filenames
+FILE_DATE=mesg_01_date_$PATTERNAME.txt    ; FILE_STAT=mesg_02_status_$PATTERNAME.txt
+FILE_RESU=mesg_03_result_$PATTERNAME.txt  ; FILE_NEMO=mesg_04_nemogcm_$PATTERNAME.txt
+FILE_XIOS=mesg_05_xios_$PATTERNAME.txt    ; FILE_COMP=mesg_06_compiler_$PATTERNAME.txt
+FILE_MPIN=mesg_07_mpi_$PATTERNAME.txt     ; FILE_NCDF=mesg_08_netcdf_$PATTERNAME.txt
+FILE_INPT=mesg_09_inputs_$PATTERNAME.txt  ; FILE_CPUT=mesg_10_cputime_$PATTERNAME.txt
+FILE_COMM=mesg_11_comments_$PATTERNAME.txt;
+
+## 
+FILE_TRUS=trusting_${DATE}_$PATTERNAME.txt; FILE_ARCH=trusting_${DATE}_$PATTERNAME.tar.gz
+
+print_step() { printf "\nStep.....\n$1\n"; }
+
+init_files() {
+    echo 'Date'        > ${FILE_DATE}; echo 'Status'           > ${FILE_STAT}
+    echo 'Result'      > ${FILE_RESU}; echo 'NEMOGCM rev.'     > ${FILE_NEMO}
+    echo 'XIOS rev.'   > ${FILE_XIOS}; echo 'Fortran compiler' > ${FILE_COMP}
+    echo 'MPI libs'    > ${FILE_MPIN}; echo 'NetCDF libs'      > ${FILE_NCDF}
+    echo 'Input files' > ${FILE_INPT}; echo 'Real CPU time'    > ${FILE_CPUT}
+    echo 'Comments'    > ${FILE_COMM}
+}
+
+get_date() {
+    local dat=$( date -ud ${DATE} +"%F %R %Z" )
+
+    echo $dat >> ${FILE_DATE}
 }
 
 get_nemo_rev() {
-    svn_opt='status'
+    local rev_loc svn_cmd
+    local rev=0 svn_opt='status'
 
     ## If -v|--version option has been set, modify svn command
@@ -129,5 +45,4 @@
     fi
 
-    rev=0
     for dir in ${NEMO_ARCH} ${NEMO_CONF} ${NEMO_ENGI} \
                ${NEMO_EIOI} ${NEMO_EFCM}              \
@@ -138,38 +53,178 @@
 	if [ "$dir" == "${DIR_XIOS}" ]; then
 	    rev_loc=$( svn info $dir | awk '(NR == 9) {print $NF}' )
-	    echo   'XIOS '${rev_loc} >> model.log
-	    printf "XIOS rev.\n"     >  mesg_05_xios_${CFG_USER}_${CFG_ARCH}.txt
-	    printf "<a href=\"https://forge.ipsl.jussieu.fr/ioserver/changeset/${rev_loc}\" target=\"_blank\">${rev_loc}</a>" \
-	                             >> mesg_05_xios_${CFG_USER}_${CFG_ARCH}.txt
+	    echo 'XIOS '${rev_loc} >> model.log
+	    echo "<a href=\"https://forge.ipsl.jussieu.fr/ioserver/changeset/${rev_loc}\" target=\"_blank\">${rev_loc}</a>" \
+		>> ${FILE_XIOS}
 	    continue
 	fi
 
-	echo ${svn_cmd} $dir': '$( ${svn_cmd} $dir )
+	echo $dir
+	${svn_cmd} $dir
 	rev_loc=$( svn info $dir | awk '(NR == 9) {print $NF}' )
 	(( ${rev_loc} >= $rev )) && rev=${rev_loc}
     done
 
-    echo   'NEMOGCM '$rev   >> model.log
-    printf "NEMOGCM rev.\n" >  mesg_04_nemogcm_${CFG_USER}_${CFG_ARCH}.txt
-    printf "<a href=\"https://forge.ipsl.jussieu.fr/nemo/changeset/$rev\" target=\"_blank\">$rev</a>" \
-	                    >> mesg_04_nemogcm_${CFG_USER}_${CFG_ARCH}.txt
+    echo 'NEMOGCM '$rev   >> model.log
+    echo "<a href=\"https://forge.ipsl.jussieu.fr/nemo/changeset/$rev\" target=\"_blank\">$rev</a>" \
+	>> ${FILE_NEMO}
+}
+
+get_soft_rel() {
+    local soft_rel
+
+    for soft in $CDO $COMPILER $MPI $NETCDF; do
+	soft_rel=''
+        ((   ${I_MODULE} == 1   )) && soft_rel=$( echo $LOADEDMODULES | sed "s/.*$soft\/\([0-9.a-z_]*\).*/\1/i" )
+	[    -z "${soft_rel}"    ] && soft_rel=$( echo $PATH          | sed "s/.*$soft\([0-9.a-z_]*\).*/\1/i"   )
+	[ "$soft" == "$COMPILER" ] && soft_rel=$( $soft --version     | grep -m1 -oe '\<[0-9. ]*\>'             )
+	## Cleaning characters string to display proper soft name
+	soft=$( echo $soft | sed 's#\\##g; s#[/-]$##' )
+	echo $soft ${soft_rel} >> model.log
+    done
+
+    sed -n 4p model.log > ${FILE_COMP}; sed -n 5p model.log > ${FILE_MPIN}; sed -n 6p model.log > ${FILE_NCDF}
+}
+
+get_inputs() {
+    local cmd_iol="tar -tvf ${NEMO_FORC}/${NEMO_TARF}"; cmd_iof="tar -vxf ${NEMO_FORC}/${NEMO_TARF}"
+
+    [ -z "${NEMO_TARF}" ] && cmd_iol="ls ${NEMO_FORC}/*" && cmd_iof="\cp ${NEMO_FORC}/* ."
+    ${cmd_iol} > inputs_list.txt && ${cmd_iof} > /dev/null
+}
+
+diff_inputs() {
+    local dif
+    local mesg='Same'
+
+    for file in inputs_list.txt $( ls namelist_* ) $( ls *.xml ); do
+	dif=''
+	if [ -e ${REFE_DIR}/$file ]; then dif=$( diff -q $file ${REFE_DIR}/$file ); else dif=0; fi
+	if [ -n "$dif" ]; then mesg='Different'; [ "$dif" != '0' ] && echo $dif | tee -a ${FILE_COMM}; fi
+    done
+
+    echo $mesg | tee -a ${FILE_INPT}
+}
+
+job_pending() {
+    local time_elapsed=0; time_increment=30
+
+    sleep ${time_increment}
+
+    while [[ $( ${JOB_LIST} | grep ${JOB_ID} ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do
+	printf "\n####################################################\n" >> computation.log
+	${JOB_INFO} ${JOB_ID}                                             >> computation.log
+	sleep ${time_increment}
+	time_elapsed=$(( ${time_elapsed} + ${time_increment} ))
+    done
+
+    sleep ${time_increment}
+
+    if [ ${time_elapsed} -eq ${TIME_LIMI} ]; then
+	${JOB_DELE} ${JOB_ID} &> /dev/null
+	TIME_LIMIT=$(( ${TIME_LIMI} / 3600 ))
+#	export TIME_LIMIT
+	get_out 6
+    fi
+}
+
+diff_results() {
+    for file in ocean.output $( ls *.stat ); do
+	[ ! -e ${REFE_DIR}/$file ] && export ST='FAILED' && get_out 7
+	diff -q $file ${REFE_DIR}/$file | tee -a ${FILE_COMM}
+	(( $? != 0 )) && export ST='FAILED'
+    done
+}
+
+diff_restart() {
+    local base_name file nb_dom diff_rcd
+
+    [ ! -e  ${REFE_DIR}/time.step ] && export ST='FAILED' && get_out 9
+
+#    export LAST_TIME_STEP=$( cat ${REFE_DIR}/time.step | tr -d [:space:] )
+    LAST_TIME_STEP=$( cat ${REFE_DIR}/time.step | tr -d [:space:] )
+    echo 'Last time step of standard run: '${LAST_TIME_STEP}
+
+    if [ $( find -regex ".*_0+${LAST_TIME_STEP}_restart.*\.nc" -print -quit ) ]; then
+	base_name=$( find -regex ".*_0+${LAST_TIME_STEP}_restart.*\.nc" -print -quit | awk -F/ '{print $NF}' \
+	             | sed "s/^\(.*\)$LAST_TIME_STEP\_restart.*/\1$LAST_TIME_STEP\_/"                         )
+
+	for comp in restart restart_ice restart_trc; do
+	    file=${base_name}${comp} && printf "$file.nc: "
+
+	    nb_dom=$( find -name "${file}_[0-9]*.nc" | wc -l | awk '{print $1}' )
+	    if   [ ${nb_dom} -gt 1 ]; then
+		${NEMO_TRBD}/rebuild_nemo -t $NPROC $file ${nb_dom} > /dev/null
+		[ $? -eq 0 ] && rm -f ${base_name}${comp}_[0-9]*.nc > /dev/null
+	    elif [ ${nb_dom} -eq 0 ]; then
+		export ST='FAILED' && get_out 10
+	    fi
+
+	    if [ -e ${REFE_DIR}/$file.nc ]; then
+	    ## UNIX `cmp` not suitable (filename & timestamp in .nc file)
+#		diff_rcd=$( $CDO diffn $file.nc ${REFE_DIR}/$file.nc 2> /dev/null \
+#		           | awk '/records/ {print $1}'                           )
+		diff_rcd=$( $CDO diffn $file.nc ${REFE_DIR}/$file.nc 2> /dev/null \
+		           | awk '/records/ {print $0}'                           )
+
+#		if [[ ! -z ${diff_rcd} && ${diff_rcd} -ne 0 ]]; then
+		if [[ ! -z ${diff_rcd} && $( echo ${diff_rcd} | awk '{print $1}') -ne 0 ]]; then
+		    export ST='FAILED'
+		    echo $CDO $( echo ${diff_rcd} | sed 's/differ$/differ,/' | tr -d '\n' )
+#		    printf "$CDO ${diff_rcd}\n"
+		else
+		    echo 'identical'
+#		    printf "identical\n"
+		fi
+
+	    else
+		export ST='FAILED' && get_out 9
+	    fi
+
+	done
+
+    else
+	export ST='FAILED'
+    fi
+
+}
+
+get_cpu_time() {
+    local real_cpu_time=$( eval ${JOB_TIME} )
+
+    echo ${real_cpu_time} | tee -a ${FILE_CPUT}
+}
+
+comments() {
+    local state=$1
+
+    if [ "$state" == 'E R R O R' ]; then
+	[ -e time.step ] && LAST_TIME_STEP=$( cat time.step | tr -d ' ' )
+#	export LAST_TIME_STEP
+	[ -e ocean.output ] && line=$( grep -m1 -A4 "$state"   ocean.output | tr -d '\n' )
+	echo $line >> ${FILE_COMM}
+    else
+	[ -e ocean.output ] && line=$( grep -m1 -A2 "^ $state" ocean.output | tr -d '\n' )
+    fi
+
+    echo $line
 }
 
 mesg_make() {
-    paste -d ';' mesg_*_${CFG_USER}_${CFG_ARCH}.txt > trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.txt
-    cat                                               trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.txt
+    paste -d ';' mesg_*.txt > ${FILE_TRUS}
+    cat                       ${FILE_TRUS}
 }
 
 mesg_publish() {
-  
-if [ $PUBLISH -eq 1 ]; then
-
-  if [ -f ${REFE_DIR}/trusting_${CFG_USER}_${CFG_ARCH}.txt ]; then cmd='tail -1'; else cmd='cat'; fi
-
-  $cmd trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.txt >> ${REFE_DIR}/trusting_${CFG_USER}_${CFG_ARCH}.txt
+    local cmd
+
+    if [ $PUBLISH -eq 1 ]; then
+
+	if [ -f ${REFE_DIR}/trusting_$PATTERNAME.txt ]; then cmd='tail -1'; else cmd='cat'; fi
+
+	$cmd ${FILE_TRUS} >> ${REFE_DIR}/trusting_$PATTERNAME.txt
 
   ## Send mail only when FAILED
-  if [[ ! -z $EMAIL && "$ST" == 'FAILED' ]]; then
-      cat << END_MAIL > trusting.mail
+	if [[ ! -z $EMAIL && "$ST" == 'FAILED' ]]; then
+	    cat << END_MAIL > trusting.mail
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
@@ -178,20 +233,15 @@
 The trusting sequence for ${REFE_CONF} has failed.
 Directory: ${TEST_DIR}
-Archive created: trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.tar.gz
+Archive created: ${FILE_ARCH} in ${REFE_DIR}
 
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
 END_MAIL
-
-      if [ -e ${TEST_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.txt ]; then
-	  cat ${TEST_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.txt  >> trusting.mail
-      fi
-      mail -s "[trusting ${REFE_CONF} $BRANCH] $ST $ERR" $EMAIL  <  trusting.mail
-  fi
-
-fi
-}
-
-print_step() { printf "Step.....\n$1\n"; }
+	    [ -e ${TEST_DIR}/${FILE_TRUS} ] && cat ${TEST_DIR}/${FILE_TRUS} >> trusting.mail
+	    mail -s "[trusting ${REFE_CONF} $BRANCH] $ST $ERR" $EMAIL       <  trusting.mail
+	fi
+
+    fi
+}
 
 get_out() {
@@ -199,13 +249,7 @@
 
     cd ${TEST_DIR}
-    printf "Status\n$ST\n"  > mesg_02_status_${CFG_USER}_${CFG_ARCH}.txt
+    echo $ST >> ${FILE_STAT}
 
     if [ "$ST" == 'FAILED' ]; then
-	file=mesg_09_inputs_${CFG_USER}_${CFG_ARCH}.txt
-	[ ! -e $file ] && printf "Input files\n\n"   > $file
-	file=mesg_10_cputime_${CFG_USER}_${CFG_ARCH}.txt
-	[ ! -e $file ] && printf "Real CPU time\n\n" > $file
-	file=mesg_11_comments_${CFG_USER}_${CFG_ARCH}.txt
-	[ ! -e $file ] && printf "Comments\n\n"      > $file
 
         ## Error identification
@@ -227,10 +271,10 @@
     fi
 
-    printf "Result\n$ERR\n" > mesg_03_result_${CFG_USER}_${CFG_ARCH}.txt
+    echo $ERR >> ${FILE_RESU}
 
     ## Save tested configuration if trusting failed
     if [[ "$ST" == 'FAILED' && $DEBUG -eq 0 ]]; then
-	echo 'Creating archive 'trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.tar.gz' under '${REFE_DIR}
-	tar -czf ${REFE_DIR}/trusting_${DATESTR}_${CFG_USER}_${CFG_ARCH}.tar.gz *
+	echo 'Creating archive '${FILE_ARCH}' under '${REFE_DIR}
+	tar -czf ${REFE_DIR}/${FILE_ARCH} ../*
     fi
 
@@ -240,22 +284,2 @@
     exit 0
 }
-
-job_pending() {
-    time_elapsed=0; time_increment=30
-
-    sleep ${time_increment}
-    while [[ $( ${JOB_LIST} | grep ${JOB_ID} ) && ${time_elapsed} -lt ${TIME_LIMI} ]]; do
-	printf "\n####################################################\n" >> computation.log
-	${JOB_INFO} ${JOB_ID}                                             >> computation.log
-	sleep ${time_increment}
-	time_elapsed=$(( ${time_elapsed} + ${time_increment} ))
-    done
-    sleep ${time_increment}
-
-    if [ ${time_elapsed} -eq ${TIME_LIMI} ]; then
-	${JOB_DELE} ${JOB_ID} &> /dev/null
-	TIME_LIMIT=$(( ${TIME_LIMI} / 3600 ))
-	export ${TIME_LIMIT}
-	get_out $ST ERR=6
-    fi
-}
