Index: /trunk/NEMOGCM/SETTE/fcm_job.sh
===================================================================
--- /trunk/NEMOGCM/SETTE/fcm_job.sh	(revision 2655)
+++ /trunk/NEMOGCM/SETTE/fcm_job.sh	(revision 2656)
@@ -40,11 +40,11 @@
 # ::
 #
-#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME       NUMBER_PROC
-#
-#  run a job of config GYRE with 1 processor
-#  $ ./fcm_job.sh input_GYRE.cfg                     1
-#
-#  run a job of config ORCA2_LIM_PISCES with 8 processors
-#  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg         8
+#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME       NUMBER_PROC TEST_NAME
+#
+#  run a job of config GYRE with 1 processor 		   test REPRODUCTINILITY
+#  $ ./fcm_job.sh input_GYRE.cfg                     1     REPRO
+#
+#  run a job of config ORCA2_LIM_PISCES with 8 processors test RESTARTABILITY
+#  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg         8	   RESTART
 #
 #
@@ -67,9 +67,9 @@
 #
 
-usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS"
-usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8"
-
-
-minargcount=2
+usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME"
+usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 RUN"
+
+
+minargcount=3
         if [ ${#} -lt ${minargcount} ]
         then
@@ -80,11 +80,6 @@
         fi
         unset minargcount
-	if [  -f ${SETTE_DIR}/output.sette ] ; then
-	        echo "file output already present. Append comments"
- 	        echo "`ls ${SETTE_DIR}/output.sette`"
-	else
-	        echo "file output not present"
+	if [ ! -f ${SETTE_DIR}/output.sette ] ; then
 	        touch ${SETTE_DIR}/output.sette
-	        echo "`ls ${SETTE_DIR}/output.sette`"
 	fi
        
@@ -96,5 +91,5 @@
 echo "`more ../CONFIG/${NEW_CONF}/cpp_${NEW_CONF}.fcm`" >> ${SETTE_DIR}/output.sette
 echo "" >> ${SETTE_DIR}/output.sette
-echo "executing script : fcm_job $@" >> ${SETTE_DIR}/output.sette
+echo "executing script : \"fcm_job $@\" " >> ${SETTE_DIR}/output.sette
 echo "            " >> ${SETTE_DIR}/output.sette
 
@@ -107,5 +102,13 @@
 	echo "            " >> ${SETTE_DIR}/output.sette
 	cp ${FORCING_DIR}/${tar_file} ${INPUT_DIR}/.
-	cd ${INPUT_DIR} ; tar xvof ${INPUT_DIR}/*.tar ; gunzip -f *gz
+	if [ ! -f ${INPUT_DIR}/${tar_file} ] ; then 
+		echo "PROBLEM during copy of tar file" >> ${SETTE_DIR}/output.sette
+		echo "tar file IS NOT present in ${INPUT_DIR} directory " >> ${SETTE_DIR}/output.sette
+		echo "            " >> ${SETTE_DIR}/output.sette
+		echo "PROBLEM during copy of tar file" 
+		exit 1
+	else  
+		cd ${INPUT_DIR} ; tar xvof ${INPUT_DIR}/*.tar ; gunzip -f *gz
+	fi
 fi 
 
@@ -134,4 +137,5 @@
     then
     echo "executable opa does not exist"
+    echo "executable opa does not exist, exit"  >> ${SETTE_DIR}/output.sette
     exit 1
 fi
@@ -165,6 +169,4 @@
 
 ################################################################
-
-################################################################
 # SAVE OUTPUT, DEBUG & RESTART FILES
 echo "saving ocean & ice output, debug & restart files" >> ${SETTE_DIR}/output.sette
@@ -174,9 +176,63 @@
 [ -f *solver.stat ] && mv *solver.stat ${OUTPUT_DIR}/.
 [ -n "$(ls *_grid_*)" ] && mv *_grid_*.nc ${OUTPUT_DIR}/.
-[ -n "$(ls *restart*)" ] && cp *restart*.nc ${OUTPUT_DIR}/.
+[ -n "$(ls *_ptrc_*)" ] && mv *_ptrc_*.nc ${OUTPUT_DIR}/.
+[ -n "$(ls *_diad_*)" ] && mv *_diad_*.nc ${OUTPUT_DIR}/.
+[ -n "`ls *restart*`" ] && cp *restart*.nc ${OUTPUT_DIR}/.
 [ -f ice_evolu ] && mv ice_evolu ${OUTPUT_DIR}/.
-[ -n "$(ls *icemod*)" ] && mv *icemod* ${OUTPUT_DIR}/.
+[ -n "`ls *icemod*`" ] && mv *icemod* ${OUTPUT_DIR}/.
 #- Save ftrace file
 [ -f ftrace.out* ] && cp ftrace.out* ${OUTPUT_DIR}/.
 ################################################################
 
+################################################################
+# SAVE IN NEMO_VALIDATION tree
+export LANG=en_US 
+cd ${CONFIG_DIR}
+cd ../
+REVISION_NB=`svn info | grep -i "Revision:" | sed -e "s/ //" | cut -d ":" -f 2`
+if [ ${#REVISION_NB} -eq 0 ]
+then
+	echo "some problems with svn info command"
+	echo "some problems with svn info command" >> ${SETTE_DIR}/output.sette
+	${REVISION_NB}=`date +%Y%m%d`
+	echo "put in ${REVISION_NB} date"
+	echo "put in ${REVISION_NB} date" >> ${SETTE_DIR}/output.sette
+else
+echo "value of revision number of NEMOGCM: ${REVISION_NB}"
+fi
+cd ${NEMO_VALIDATION_DIR}
+export TEST_NAME=$3
+`mkdir -p ${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME}`
+NEMO_VALID=${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME}
+if [ -d ${NEMO_VALID} ] ; then
+	echo "created ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette
+else 
+	echo "problems in creating ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette
+	echo "EXIT,"
+	exit 1
+fi
+[ -f ${OUTPUT_DIR}/*ocean.output ] && mv ${OUTPUT_DIR}/*ocean.output ${NEMO_VALID}/.
+[ -f ${OUTPUT_DIR}/*solver.stat ] && mv ${OUTPUT_DIR}/*solver.stat ${NEMO_VALID}/.
+[ -n "`ls ${OUTPUT_DIR}/*restart*`" ] && mv ${OUTPUT_DIR}/*restart* ${NEMO_VALID}/.
+if [ -n "$(ls ${NEMO_VALID}/*solver*)" ] ; then
+	echo "moved solver.stat in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+	echo "moved solver.stat in ${NEMO_VALID} directory"  
+else
+	echo "problem in looking for solver.stat file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+	echo "solver.stat IS NOT in ${NEMO_VALID} directory" 
+fi
+if [ -n "$(ls ${NEMO_VALID}/*ocean.output*)" ] ; then
+	echo "moved ocean.output in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+	echo "moved ocean.output in ${NEMO_VALID} directory" 
+else
+	echo "problem in looking for ocean.output file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+	echo "ocean.output IS NOT in ${NEMO_VALID} directory" 
+fi
+if [ -n "`ls ${NEMO_VALID}/*restart*`" ] ; then
+	echo "moved restart files in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+	echo "moved restart files in ${NEMO_VALID} directory" 
+else
+	echo "problem in looking for restart files in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette
+	echo "restart files ARE NOT in ${NEMO_VALID} directory" 
+fi
+################################################################
Index: /trunk/NEMOGCM/SETTE/param.cfg
===================================================================
--- /trunk/NEMOGCM/SETTE/param.cfg	(revision 2655)
+++ /trunk/NEMOGCM/SETTE/param.cfg	(revision 2656)
@@ -5,5 +5,7 @@
 INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
 #- only for IBM
-#- TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
+# TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
 #- output files storing 
-OUTPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00/VALIDATION
+OUTPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00/OUTPUT
+#- VALIDATION files storing 
+NEMO_VALIDATION_DIR=~/NEMO_VALIDATION
Index: /trunk/NEMOGCM/SETTE/sette_beginner.sh
===================================================================
--- /trunk/NEMOGCM/SETTE/sette_beginner.sh	(revision 2656)
+++ /trunk/NEMOGCM/SETTE/sette_beginner.sh	(revision 2656)
@@ -0,0 +1,48 @@
+#!/bin/bash
+#############################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# 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 -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# sette.sh
+# ================
+#
+# ----------------------------------------------
+# Set of tests for NEMO
+# ----------------------------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ ./sette.sh
+#
+# DESCRIPTION
+# ===========
+SETTE_DIR=/Users/sflod/nuovo_sette/prova/NEMOGCM/SETTE
+# Run for GYRE CONFIG
+cd ${SETTE_DIR}
+. ../CONFIG/makenemo -m gfortran_osx -n GYRE_SHORT -r GYRE
+cd ${SETTE_DIR}
+. param.cfg 
+. all_functions.sh
+set_namelist namelist cn_exp \"GYRE_SHORT\"
+set_namelist namelist nn_it000 1
+set_namelist namelist nn_itend 120
+set_namelist namelist nn_stock 60
+cd ${SETTE_DIR}
+. ./fcm_job.sh input_GYRE.cfg 1 SHORT
