Index: /trunk/libIGCM/AA_additionnal
===================================================================
--- /trunk/libIGCM/AA_additionnal	(revision 221)
+++ /trunk/libIGCM/AA_additionnal	(revision 222)
@@ -63,4 +63,17 @@
 #-Q- sx9mercure ##MSUB -e nco.out        # Sortie standard
 #-Q- sx9mercure ##MSUB -o nco.out        # Sortie standard
+#-Q- titane #!/bin/ksh
+#-Q- titane ######################
+#-Q- titane ## TITANE   CEA ##
+#-Q- titane ######################
+#-Q- titane #MSUB -r ATL_ADD        # Nom du job                
+#-Q- titane #MSUB -N 1              # Reservation du noeud
+#-Q- titane #MSUB -n 2              # Reservation du processus
+#-Q- titane #MSUB -c 4              # Reservation du core
+#-Q- titane #MSUB -T 86400          # Limite de temps elapsed du job
+#-Q- titane #MSUB -E "-j o"
+#-Q- titane #MSUB -E "-S /bin/ksh"
+#-Q- titane ##MSUB -e nco.out        # Sortie standard
+#-Q- titane ##MSUB -o nco.out        # Sortie standard
 #-Q- default #!/bin/ksh
 #-Q- default ##################
Index: /trunk/libIGCM/AA_atlas_LMDZ
===================================================================
--- /trunk/libIGCM/AA_atlas_LMDZ	(revision 221)
+++ /trunk/libIGCM/AA_atlas_LMDZ	(revision 222)
@@ -62,4 +62,16 @@
 #-Q- sx9mercure ##MSUB -e nco.out        # Sortie standard
 #-Q- sx9mercure ##MSUB -o nco.out        # Sortie standard
+#-Q- titane #!/bin/ksh
+#-Q- titane ######################
+#-Q- titane ## TITANE   CEA ##
+#-Q- titane ######################
+#-Q- titane #MSUB -r ATL_LMDZ       # Nom du job                
+#-Q- titane #MSUB -N 1              # Reservation du noeud
+#-Q- titane #MSUB -n 1              # Reservation du processus
+#-Q- titane #MSUB -T 86400          # Limite de temps elapsed du job
+#-Q- titane #MSUB -E "-j o"
+#-Q- titane #MSUB -E "-S /bin/ksh"
+#-Q- titane ##MSUB -e nco.out        # Sortie standard
+#-Q- titane ##MSUB -o nco.out        # Sortie standard
 #-Q- default #!/bin/ksh
 #-Q- default ##################
Index: /trunk/libIGCM/AA_atlas_ORCA_LIM
===================================================================
--- /trunk/libIGCM/AA_atlas_ORCA_LIM	(revision 221)
+++ /trunk/libIGCM/AA_atlas_ORCA_LIM	(revision 222)
@@ -62,4 +62,16 @@
 #-Q- sx9mercure ##MSUB -e nco.out        # Sortie standard
 #-Q- sx9mercure ##MSUB -o nco.out        # Sortie standard
+#-Q- titane #!/bin/ksh
+#-Q- titane ######################
+#-Q- titane ## TITANE   CEA ##
+#-Q- titane ######################
+#-Q- titane #MSUB -r ATL_OPA        # Nom du job                
+#-Q- titane #MSUB -N 1              # Reservation du noeud
+#-Q- titane #MSUB -n 1              # Reservation du processus
+#-Q- titane #MSUB -T 86400          # Limite de temps elapsed du job
+#-Q- titane #MSUB -E "-j o"
+#-Q- titane #MSUB -E "-S /bin/ksh"
+#-Q- titane ##MSUB -e nco.out        # Sortie standard
+#-Q- titane ##MSUB -o nco.out        # Sortie standard
 #-Q- default #!/bin/ksh
 #-Q- default ##################
Index: /trunk/libIGCM/AA_atlas_ORCHIDEE
===================================================================
--- /trunk/libIGCM/AA_atlas_ORCHIDEE	(revision 221)
+++ /trunk/libIGCM/AA_atlas_ORCHIDEE	(revision 222)
@@ -62,4 +62,16 @@
 #-Q- sx9mercure ##MSUB -e nco.out        # Sortie standard
 #-Q- sx9mercure ##MSUB -o nco.out        # Sortie standard
+#-Q- titane #!/bin/ksh
+#-Q- titane ######################
+#-Q- titane ## TITANE   CEA ##
+#-Q- titane ######################
+#-Q- titane #MSUB -r ATL_ORCH       # Nom du job                
+#-Q- titane #MSUB -N 1              # Reservation du noeud
+#-Q- titane #MSUB -n 1              # Reservation du processus
+#-Q- titane #MSUB -T 86400          # Limite de temps elapsed du job
+#-Q- titane #MSUB -E "-j o"
+#-Q- titane #MSUB -E "-S /bin/ksh"
+#-Q- titane ##MSUB -e nco.out        # Sortie standard
+#-Q- titane ##MSUB -o nco.out        # Sortie standard
 #-Q- default #!/bin/ksh
 #-Q- default ##################
Index: /trunk/libIGCM/AA_create_se
===================================================================
--- /trunk/libIGCM/AA_create_se	(revision 221)
+++ /trunk/libIGCM/AA_create_se	(revision 222)
@@ -62,4 +62,16 @@
 #-Q- sx9mercure ##MSUB -e nco.out        # Sortie standard
 #-Q- sx9mercure ##MSUB -o nco.out        # Sortie standard
+#-Q- titane #!/bin/ksh
+#-Q- titane ######################
+#-Q- titane ## TITANE   CEA ##
+#-Q- titane ######################
+#-Q- titane #MSUB -r SE             # Nom du job                
+#-Q- titane #MSUB -N 1              # Reservation du noeud
+#-Q- titane #MSUB -n 1              # Reservation du processus
+#-Q- titane #MSUB -T 86400          # Limite de temps elapsed du job
+#-Q- titane #MSUB -E "-j o"
+#-Q- titane #MSUB -E "-S /bin/ksh"
+#-Q- titane ##MSUB -e nco.out        # Sortie standard
+#-Q- titane ##MSUB -o nco.out        # Sortie standard
 #-Q- default #!/bin/ksh
 #-Q- default ##################
Index: /trunk/libIGCM/AA_create_ts
===================================================================
--- /trunk/libIGCM/AA_create_ts	(revision 221)
+++ /trunk/libIGCM/AA_create_ts	(revision 222)
@@ -62,4 +62,16 @@
 #-Q- sx9mercure ##MSUB -e nco.out        # Sortie standard
 #-Q- sx9mercure ##MSUB -o nco.out        # Sortie standard
+#-Q- titane #!/bin/ksh
+#-Q- titane ######################
+#-Q- titane ## TITANE   CEA ##
+#-Q- titane ######################
+#-Q- titane #MSUB -r TS             # Nom du job                
+#-Q- titane #MSUB -N 1              # Reservation du noeud
+#-Q- titane #MSUB -n 1              # Reservation du processus
+#-Q- titane #MSUB -T 86400          # Limite de temps elapsed du job
+#-Q- titane #MSUB -E "-j o"
+#-Q- titane #MSUB -E "-S /bin/ksh"
+#-Q- titane ##MSUB -e nco.out        # Sortie standard
+#-Q- titane ##MSUB -o nco.out        # Sortie standard
 #-Q- default #!/bin/ksh
 #-Q- default ##################
Index: /trunk/libIGCM/AA_job
===================================================================
--- /trunk/libIGCM/AA_job	(revision 221)
+++ /trunk/libIGCM/AA_job	(revision 222)
@@ -8,5 +8,15 @@
 #-Q- platine #BSUB -n ::JobNumProcTot::             # reservation des processeurs pour le job
 #-Q- platine #BSUB -W 1:00           # Limite temps
-#-Q- platine BATCH_NUM_PROC_TOT=$SLURM_NPROCS 
+#-Q- platine BATCH_NUM_PROC_TOT=$SLURM_NPROCS
+#-Q- titane #!/usr/bin/ksh
+#-Q- titane ##################
+#-Q- titane ## TITANE   CEA ##
+#-Q- titane ##################
+#-Q- titane #MSUB -r ::Jobname::       # nom de la requete
+#-Q- titane #MSUB -o Script_Output_::Jobname::.000001    # nom du fichier de sortie
+#-Q- titane #MSUB -n ::JobNumProcTot::             # reservation des processeurs pour le job
+#-Q- titane #MSUB -T 86400           # Limite temps (en secondes)
+#-Q- titane #MSUB -p gen2211
+#-Q- titane BATCH_NUM_PROC_TOT=$BRIDGE_MSUB_NPROC
 #-Q- sx8brodie #######################
 #-Q- sx8brodie ## SX8BRODIE   IDRIS ##
Index: /trunk/libIGCM/AA_monitoring
===================================================================
--- /trunk/libIGCM/AA_monitoring	(revision 221)
+++ /trunk/libIGCM/AA_monitoring	(revision 222)
@@ -62,4 +62,16 @@
 #-Q- sx9mercure ##MSUB -e nco.out        # Sortie standard
 #-Q- sx9mercure ##MSUB -o nco.out        # Sortie standard
+#-Q- titane #!/bin/ksh
+#-Q- titane ######################
+#-Q- titane ## TITANE   CEA ##
+#-Q- titane ######################
+#-Q- titane #MSUB -r MONITORING     # Nom du job                
+#-Q- titane #MSUB -N 1              # Reservation du noeud
+#-Q- titane #MSUB -n 1              # Reservation du processus
+#-Q- titane #MSUB -T 86400          # Limite de temps elapsed du job
+#-Q- titane #MSUB -E "-j o"
+#-Q- titane #MSUB -E "-S /bin/ksh"
+#-Q- titane ##MSUB -e nco.out        # Sortie standard
+#-Q- titane ##MSUB -o nco.out        # Sortie standard
 #-Q- default #!/bin/ksh
 #-Q- default ##################
Index: /trunk/libIGCM/AA_rebuild_fromArchive
===================================================================
--- /trunk/libIGCM/AA_rebuild_fromArchive	(revision 221)
+++ /trunk/libIGCM/AA_rebuild_fromArchive	(revision 222)
@@ -62,4 +62,16 @@
 #-Q- sx9mercure ##MSUB -e nco.out        # Sortie standard
 #-Q- sx9mercure ##MSUB -o nco.out        # Sortie standard
+#-Q- titane #!/bin/ksh
+#-Q- titane ######################
+#-Q- titane ## TITANE   CEA ##
+#-Q- titane ######################
+#-Q- titane #MSUB -r REBUILDARCH    # Nom du job                
+#-Q- titane #MSUB -N 1              # Reservation du noeud
+#-Q- titane #MSUB -n 1              # Reservation du processus
+#-Q- titane #MSUB -T 86400          # Limite de temps elapsed du job
+#-Q- titane #MSUB -E "-j o"
+#-Q- titane #MSUB -E "-S /bin/ksh"
+#-Q- titane ##MSUB -e nco.out        # Sortie standard
+#-Q- titane ##MSUB -o nco.out        # Sortie standard
 #-Q- default #!/bin/ksh
 #-Q- default ##################
Index: /trunk/libIGCM/AA_rebuild_fromWorkdir
===================================================================
--- /trunk/libIGCM/AA_rebuild_fromWorkdir	(revision 221)
+++ /trunk/libIGCM/AA_rebuild_fromWorkdir	(revision 222)
@@ -63,4 +63,16 @@
 #-Q- sx9mercure ##MSUB -e nco.out        # Sortie standard
 #-Q- sx9mercure ##MSUB -o nco.out        # Sortie standard
+#-Q- titane #!/bin/ksh
+#-Q- titane ######################
+#-Q- titane ## TITANE   CEA ##
+#-Q- titane ######################
+#-Q- titane #MSUB -r REBUILDWRK     # Nom du job                
+#-Q- titane #MSUB -N 1              # Reservation du noeud
+#-Q- titane #MSUB -n 1              # Reservation du processus
+#-Q- titane #MSUB -T 86400          # Limite de temps elapsed du job
+#-Q- titane #MSUB -E "-j o"
+#-Q- titane #MSUB -E "-S /bin/ksh"
+#-Q- titane ##MSUB -e nco.out        # Sortie standard
+#-Q- titane ##MSUB -o nco.out        # Sortie standard
 #-Q- default #!/bin/ksh
 #-Q- default ##################
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys.ksh	(revision 221)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys.ksh	(revision 222)
@@ -63,4 +63,8 @@
 	. ${libIGCM}/libIGCM_sys/libIGCM_sys_platine.ksh;;
 
+    titane*)
+	echo "sys source platine Intel X-64 lib."
+	. ${libIGCM}/libIGCM_sys/libIGCM_sys_titane.ksh;;
+
     mercure)
 	echo "sys source mercure TX IA-64 lib."
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_platine.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_platine.ksh	(revision 221)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_platine.ksh	(revision 222)
@@ -1001,13 +1001,13 @@
 	fi
 
-	dmget ${dm_liste[*]} > out_rsync 2>&1
-  	RET=$?
-  	if [ ${RET} -gt 0 ] ; then
-  	    echo "IGCM_sys_Get : demigration error."
-  	    cat out_rsync
-  	    IGCM_debug_Exit "IGCM_sys_Get"
-	    IGCM_debug_PopStack "IGCM_sys_Get"
-	    return
-  	fi
+#	dmget ${dm_liste[*]} > out_rsync 2>&1
+#  	RET=$?
+#  	if [ ${RET} -gt 0 ] ; then
+#  	    echo "IGCM_sys_Get : demigration error."
+#  	    cat out_rsync
+#  	    IGCM_debug_Exit "IGCM_sys_Get"
+#	    IGCM_debug_PopStack "IGCM_sys_Get"
+#	    return
+#  	fi
 
         #USUAL WAY
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh	(revision 222)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh	(revision 222)
@@ -0,0 +1,1206 @@
+#!/bin/ksh
+
+#**************************************************************
+# Author: Sebastien Denvil, Martial Mancip
+# Contact: Martial.Mancip_ipsl.jussieu.fr
+# $Date: 2009-11-25 17:19:33 +0100 (Wed, 25 Nov 2009) $
+# $Author: sdipsl $
+# $Revision: 203 $
+# IPSL (2006)
+#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
+# History:
+# Modification:
+#
+#**************************************************************
+
+#=========================================================
+# The documentation of this file can be automatically generated
+# if you use the prefix #D- for comments to be extracted. 
+# Extract with command: cat lib* | grep "^#D-" | cut -c "4-"
+#=========================================================
+
+#D-#==================================================
+#D-LibIGCM_sys for Titane
+#D-#==================================================
+#D-
+#D- This ksh library if a layer under some usefull 
+#D-environment variables and shell commands.
+#D-All those definitions depend on host particularities.
+#D-It manages a stack mechanism and test validity of operations.
+#D-All function described bellow must be prefixed by IGCM_sys.
+
+#====================================================
+# libIGCM_sys PARAMETERS
+#====================================================
+
+#====================================================
+# set DEBUG_sys to true to output calls of function
+typeset -r DEBUG_sys=${DEBUG_sys:=true}
+
+#====================================================
+# Turn in dry run mode ? (sys_Put_Rest, sys_Put_Out, sys_Get)
+typeset -r DRYRUN=${DRYRUN:=0}
+
+# YOU MUST COMPILE YOUR EXE FILES FOR DRYRUN MODE !
+# -------------------------------------------------------------------------------------
+# | DRYRUN=  |  Date computations, | sys_Get    |  Exe    | sys_Put_Out; sys_Put_Rest |
+# |          |  Cp/Exe param files |            |  Chmod  |                           |
+# |          |      Qsub           |            |         |                           |
+# -------------------------------------------------------------------------------------
+# |    0     |       yes           |    yes     |  yes    |      yes                  |
+# -------------------------------------------------------------------------------------
+# |    1     |       yes           |    yes     |  yes    |      no                   |
+# -------------------------------------------------------------------------------------
+# |    2     |       yes           |    yes     |  no     |      no                   |
+# -------------------------------------------------------------------------------------
+# |    3     |       yes           |    no      |  no     |      no                   |
+# -------------------------------------------------------------------------------------
+
+#=====================================================
+# Global Variables :
+#=====================================================
+# Language : "fr" or "en"
+typeset -r MYLANG="fr"
+
+#=====================================================
+# Host and user names 
+# $hostname ou hostname 
+typeset -r HOST=$( hostname )
+# $username ou whoami
+typeset -r LOGIN=$( whoami )
+# $hostname of the MASTER job
+typeset MASTER=titane
+
+#D-
+#D-#==================================================
+#D-Program used in libIGCM
+#D-#==================================================
+
+# rsync with path
+typeset -r RSYNC=/usr/bin/rsync
+# RSYNC_opt args to rsync
+typeset -r RSYNC_opt="-va"
+# ie storage filesystem
+typeset -r RHOST=titane
+
+#====================================================
+# Source Ferret
+#. /home/cont003/p86ipsl/.atlas_env_titane_ksh
+
+#====================================================
+# Specific for ocean additionnal diagnostic
+#export FER_GO="$FER_GO /home/cont003/p86denv/IGCM_POST_UTIL/JNL /home/cont003/p86denv/GRAF /home/cont003/p86denv/GRAF/GO"
+#export FER_PALETTE="$FER_PALETTE /home/cont003/p86denv/GRAF/PALET"
+
+#====================================================
+# Host specific DIRECTORIES
+#====================================================
+
+#====================================================
+#- R_EXE   (==> BIN_DIR = ${MODIPSL}/bin )
+typeset -r R_EXE="${MODIPSL}/bin"
+
+#====================================================
+#- SUBMIT_DIR : submission dir
+typeset SUBMIT_DIR=${SUBMIT_DIR:=${PWD}}
+
+#====================================================
+#- ARCHIVE
+typeset -r ARCHIVE=${DMFDIR}
+
+#====================================================
+#- Mirror libIGCM from titane to cesium if needed
+ROOTSYS=$( echo ${libIGCM} | gawk -F"/" '{print $2}' )
+if [ ! ${ROOTSYS} = "home" ] ; then
+    typeset -r MirrorlibIGCM=${MirrorlibIGCM:=true}
+else
+    typeset -r MirrorlibIGCM=${MirrorlibIGCM:=false}
+fi
+
+#====================================================
+#- libIGCM_POST
+if ( ${MirrorlibIGCM} ) ; then
+    PATHlibIGCM=$( echo ${libIGCM} | gawk -F"${LOGIN}/" '{print $2}' | sed -e "s&/libIGCM&&" )
+    typeset -r libIGCM_POST=${HOME}/MIRROR/${PATHlibIGCM}/libIGCM
+else
+    typeset -r libIGCM_POST=${libIGCM}
+fi
+
+#====================================================
+#- IN
+typeset -r R_IN=${R_IN:=/dmnfs/cont003/p86ipsl/IGCM}
+
+#====================================================
+#- OUT
+typeset -r R_OUT=${ARCHIVE}/IGCM_OUT
+
+#====================================================
+#- OUT_SCR (ONLY FOR double copy an scratch)
+typeset -r R_OUT_SCR=${SCRATCHDIR}/IGCM_OUT
+
+#====================================================
+#- OUT_POST
+typeset -r R_OUT_POST=${SCRATCHDIR}/IGCM_OUT
+
+#====================================================
+#- RUN_DIR_PATH : Temporary working directory (=> TMP)
+typeset RUN_DIR_PATH=${RUN_DIR_PATH:=${SCRATCHDIR}}
+
+#====================================================
+#- BIG_DIR : BIG_DIR to store files waiting for rebuild
+typeset -r BIG_DIR=${BIG_DIR:=${SCRATCHDIR}/REBUILD}
+
+#====================================================
+#- HOST_MPIRUN_COMMAND
+typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="time mpirun"}
+
+#====================================================
+#- Max number of arguments passed to nco operator or demigration command
+UNIX_MAX_LIMIT=360
+
+#D-#==================================================
+#D-function IGCM_sys_RshMaster
+#D-* Purpose: Just a fake command to wrapp
+#D-           IGCM_card call in post-treatment
+#D-           Ulam do not see brodie filesystem
+#D-           Cesium do not see all mercure filesystem
+#D-           That's why we need this hack.
+#D-* Examples:
+#D-
+function IGCM_sys_RshMaster {
+    #set -vx
+    IGCM_debug_PushStack "IGCM_sys_RshMaster" $@
+    /bin/ksh <<-EOF
+    export libIGCM=${libIGCM}
+    export DEBUG_debug=${DEBUG_debug}
+    . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
+    . ${libIGCM}/libIGCM_card/libIGCM_card.ksh
+    ${@}
+EOF
+    if [ $? -gt 0 ] ; then
+	echo "IGCM_sys_RshMaster : erreur."
+	IGCM_debug_Exit "IGCM_sys_RshMaster"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_RshMaster"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_RshArchive
+#D-* Purpose: Archive rsh command
+#D-* Examples:
+#D-
+function IGCM_sys_RshArchive {
+    IGCM_debug_PushStack "IGCM_sys_RshArchive" $@
+    /bin/ksh <<-EOF
+    ${@}
+EOF
+    if [ $? -gt 0 ] ; then
+	echo "IGCM_sys_RshArchive : erreur."
+	IGCM_debug_Exit "IGCM_sys_RshArchive"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_RshArchive"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_RshPost
+#D-* Purpose: Post-process rsh command
+#D-* Examples:
+#D-
+function IGCM_sys_RshPost {
+    IGCM_debug_PushStack "IGCM_sys_RshPost" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_RshPost :" $@
+    fi
+    typeset NB_ESSAI DELAI status
+    #nombre d'essai avant abandon
+    NB_ESSAI=5
+    #temps entre chaque essai
+    DELAI=10
+
+    i=0
+    while [ $i -ne $NB_ESSAI ] ; do
+        ssh -t titane996 ssh cesium /bin/ksh ${@} 2>/dev/null
+        status=$?
+        if [ ${status} -ne 0 ];
+        then
+            sleep $DELAI
+        else
+            break
+        fi
+        let i=$i+1
+    done 
+
+    if [ ${status} -gt 0 ] ; then
+	echo "IGCM_sys_RshPost : erreur."
+	IGCM_debug_Exit "IGCM_sys_RshPost"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_RshPost"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_SendMail
+#D-* Purpose: Send mail when simulation is over
+#D-* Examples:
+#D-
+function IGCM_sys_SendMail {
+    IGCM_debug_PushStack "IGCM_sys_SendMailPost" $@
+    if ( $DEBUG_sys ) ; then
+       echo "IGCM_sys_SendMail :" $@
+    fi
+
+    IGCM_sys_RshPost <<-EOF
+    export LOGIN=${LOGIN}
+    export config_UserChoices_JobName=${config_UserChoices_JobName}
+    export config_UserChoices_MailName=${config_UserChoices_MailName}
+    export DateBegin=${DateBegin}
+    export DateEnd=${DateEnd}
+    export R_SAVE=${R_SAVE}
+
+    cat  << END_MAIL > job_end.mail
+Dear ${LOGIN},
+
+  Simulation ${config_UserChoices_JobName} is finished on supercomputer `hostname`.
+  Job started : ${DateBegin}
+  Job ended   : ${DateEnd}
+  Ouput files are available in ${R_SAVE}
+END_MAIL
+
+    if [ ! -z ${config_UserChoices_MailName} ] ; then
+	mailx -s "${config_UserChoices_JobName} completed" ${config_UserChoices_MailName} < job_end.mail
+    elif [ -f ~/.forward ] ; then
+	mailx -s "${config_UserChoices_JobName} completed" $( cat ~/.forward ) < job_end.mail
+    fi
+
+    sleep 10
+    rm -f job_end.mail
+EOF
+
+    if [ $? -gt 0 ] ; then
+	echo "IGCM_sys_SendMail : erreur."
+	IGCM_debug_Exit "IGCM_sys_SendMail"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_SendMail"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Mkdir
+#D-* Purpose: Master locale mkdir command
+#D-* Examples:
+#D-
+function IGCM_sys_Mkdir {
+    IGCM_debug_PushStack "IGCM_sys_Mkdir" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Mkdir :" $@
+    fi
+    if [ ! -d ${1} ]; then
+	\mkdir -p $1
+	if [ $? -gt 0 ] ; then
+	    echo "IGCM_sys_Mkdir : erreur."
+	    IGCM_debug_Exit "IGCM_sys_Mkdir"
+	fi
+    fi
+    # vérification :
+    if [ ! -d ${1} ] ; then
+	echo "IGCM_sys_Mkdir : erreur."
+	IGCM_debug_Exit "IGCM_sys_Mkdir"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Mkdir"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_MkdirArchive
+#D-* Purpose: Mkdir on Archive
+#D-* Examples:
+#D-
+function IGCM_sys_MkdirArchive {
+    IGCM_debug_PushStack "IGCM_sys_MkdirArchive" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_MkdirArchive :" $@
+    fi
+    #- creation de repertoire sur le serveur fichier
+    if [ ! -d ${1} ]; then 
+	\mkdir -p $1
+	if [ $? -gt 0 ] ; then
+	    echo "IGCM_sys_MkdirArchive : erreur."
+	    IGCM_debug_Exit "IGCM_sys_MkdirArchive"
+	fi
+    fi
+    IGCM_debug_PopStack "IGCM_sys_MkdirArchive"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_MkdirWork
+#D-* Purpose: Mkdir on Work
+#D-* Examples:
+#D-
+function IGCM_sys_MkdirWork {
+    IGCM_debug_PushStack "IGCM_sys_MkdirWork" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_MkdirWork :" $@
+    fi
+    #- creation de repertoire sur le serveur fichier
+    if [ ! -d ${1} ]; then 
+	\mkdir -p $1
+	if [ $? -gt 0 ] ; then
+	    echo "IGCM_sys_MkdirWork : erreur."
+	    IGCM_debug_Exit "IGCM_sys_MkdirWork"
+	fi
+    fi
+    IGCM_debug_PopStack "IGCM_sys_MkdirWork"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Cd
+#D-* Purpose: master cd command
+#D-* Examples:
+#D-
+function IGCM_sys_Cd {
+    IGCM_debug_PushStack "IGCM_sys_Cd" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Cd :" $@
+    fi
+    \cd $1
+    if [ $? -gt 0 ] ; then
+	echo "IGCM_sys_Cd : erreur."
+	IGCM_debug_Exit "IGCM_sys_Cd"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Cd"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Chmod
+#D-* Purpose: Chmod
+#D-* Examples:
+#D-
+function IGCM_sys_Chmod {
+    IGCM_debug_PushStack "IGCM_sys_Chmod" -- $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Chmod :" $@
+    fi
+    if [ $DRYRUN -le 1 ]; then
+	\chmod $@
+	if [ $? -gt 0 ] ; then
+	    echo "IGCM_sys_Chmod : erreur."
+	    IGCM_debug_Exit "IGCM_sys_Chmod"
+	fi
+    else
+	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Chmod"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_FileSize
+#D-* Purpose: Filesize
+#D-* Examples:
+#D-
+function IGCM_sys_FileSize {
+    IGCM_debug_PushStack "IGCM_sys_FileSize" $@
+
+    typeset sizeF
+    set +A sizeF -- $( ls -la ${1} )
+    if [ $? -gt 0 ] ; then
+	IGCM_debug_Exit "IGCM_sys_FileSize"
+    fi
+    eval ${2}=${sizeF[4]}
+
+    IGCM_debug_PopStack "IGCM_sys_FileSize"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_TestDir
+#D-* Purpose: Test Directory that must exists
+#D-* Examples:
+#D-
+function IGCM_sys_TestDir {
+    IGCM_debug_PushStack "IGCM_sys_TestDir" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_TestDir :" $@
+    fi
+    typeset ExistFlag
+    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 )
+    IGCM_debug_PopStack "IGCM_sys_TestDir"
+
+    return ${ExistFlag}
+}
+
+#D-#==================================================
+#D-function IGCM_sys_TestDirArchive
+#D-* Purpose: Test Directory that must exists on Archive
+#D-* Examples:
+#D-
+function IGCM_sys_TestDirArchive {
+    IGCM_debug_PushStack "IGCM_sys_TestDirArchive" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_TestDirArchive :" $@
+    fi
+    typeset ExistFlag
+    ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 )
+    IGCM_debug_PopStack "IGCM_sys_TestDirArchive"
+
+    return ${ExistFlag}
+}
+
+#D-#==================================================
+#D-function IGCM_sys_TestFileArchive
+#D-* Purpose: Test file that must NOT EXISTS on Archive
+#D-* Examples:
+#D-
+function IGCM_sys_TestFileArchive {
+    IGCM_debug_PushStack "IGCM_sys_TestFileArchive" $@
+    typeset ExistFlag
+    ExistFlag=$( [ -f $1 ] && echo 0 || echo 1 )
+    IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
+
+    return ${ExistFlag}
+}
+
+#D-#==================================================
+#D-function IGCM_sys_CountFileArchive
+#D-* Purpose: Count files on Archive filesystem
+#D-* Examples:
+#D-
+function IGCM_sys_CountFileArchive {
+    IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@
+    ls ${@} 2>/dev/null | wc -l
+    if [ $? -gt 0 ] ; then
+	echo "IGCM_sys_CountFileArchive : erreur."
+    fi
+    IGCM_debug_PopStack "IGCM_sys_CountFileArchive"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Tree
+#D-* Purpose: Tree directories with files on ${ARCHIVE}
+#D-* Examples: IGCM_sys_Tree ${R_IN} ${R_OUT}
+#D-
+function IGCM_sys_Tree {
+    IGCM_debug_PushStack "IGCM_sys_Tree" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Tree :" $@
+    fi
+
+    \ls -lR ${@}
+
+    IGCM_debug_PopStack "IGCM_sys_Tree"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Tar
+#D-* Purpose: master un-tar command
+#D-* Examples:
+#D-
+function IGCM_sys_Tar {
+    IGCM_debug_PushStack "IGCM_sys_Tar" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Tar :" $@
+    fi
+    \tar xvf $1
+    if [ $? -gt 0 ] ; then
+	echo "IGCM_sys_Tar : erreur."
+	IGCM_debug_Exit "IGCM_sys_Tar"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Tar"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_UnTar
+#D-* Purpose: master un-tar command
+#D-* Examples:
+#D-
+function IGCM_sys_UnTar {
+    IGCM_debug_PushStack "IGCM_sys_UnTar" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_UnTar :" $@
+    fi
+    \tar xvf $1
+    if [ $? -gt 0 ] ; then
+	echo "IGCM_sys_UnTar : erreur."
+	IGCM_debug_Exit "IGCM_sys_UnTar"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_UnTar"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Qsub
+#D-* Purpose: Qsub new job
+#D-* Examples:
+#D-
+function IGCM_sys_Qsub {
+    IGCM_debug_PushStack "IGCM_sys_Qsub" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Qsub :" $@
+    fi
+    /usr/local/bin/ccc_msub -o ${Script_Output} -r ${config_UserChoices_JobName}.${CumulPeriod} < $1
+    if [ $? -gt 0 ] ; then
+	echo "IGCM_sys_Qsub : erreur " $@
+	IGCM_debug_Exit "IGCM_sys_Qsub"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Qsub"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_QsubPost
+#D-* Purpose: Qsub new job on scalaire
+#D-* Examples:
+#D-
+function IGCM_sys_QsubPost {
+    IGCM_debug_PushStack "IGCM_sys_QsubPost" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_QsubPost :" $@
+    fi
+    /usr/local/bin/ccc_msub -o ${POST_DIR}/$1.${PeriodDateEnd}.out -e ${POST_DIR}/$1.${PeriodDateEnd}.e.out -E "-v ${listVarEnv}" ${libIGCM_POST}/$1.job
+    if [ $? -gt 0 ] ; then
+	echo "IGCM_sys_QsubPost : erreur " $@
+	IGCM_debug_Exit "IGCM_sys_QsubPost"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_QsubPost"
+}
+
+#D-*************************
+#D- File transfer functions 
+#D-*************************
+#D-
+
+#D-#==================================================
+#D-function IGCM_sys_Rsync_out
+#D-* Purpose: treat return val of rsync
+#D-* Examples: IGCM_sys_Rsync_out out_RET_rsync
+#D-  Error values and explanations can depend on your system version.
+function IGCM_sys_Rsync_out {
+    RET=$1
+    if [ ! $RET ] ; then
+	echo "rsync error !"
+    fi
+
+    if [ $MYLANG = "fr" ]; then
+	case $RET in
+	    0)  return ;;
+	    1)  echo "Erreur de rsync ; RERR_SYNTAX : "
+		echo "Erreur de syntaxe ou d'utilisation."
+		return;;
+	    2)  echo "Erreur de rsync ; RERR_PROTOCOL : "
+		echo "Incompatibilité de protocole."
+		return;;
+	    3)  echo "Erreur de rsync ; RERR_FILESELECT 3"
+		echo "Erreurs  lors  de  la  sélection des fichiers d'entrée sortie et"
+		echo "répertoires"
+		return;;
+	    4)  echo "Erreur de rsync ; RERR_UNSUPPORTED"
+		echo "Action demandée non supportée : une tentative de manipulation de"
+		echo "fichiers  64-bits  sur une plate-forme qui ne les supporte pas a"
+		echo "été faite ; ou une option qui est supportée par le  client  mais"
+		echo "pas par le serveur a été spécifiée."
+		return;;
+	    10) echo "Erreur de rsync ; RERR_SOCKETIO"
+		echo "Erreur dans le socket d'entrée sortie"
+		return;;
+	    11) echo "Erreur de rsync ; RERR_FILEIO"
+		echo "Erreur d'entrée sortie fichier"
+		return;;
+	    12) echo "Erreur de rsync ; RERR_STREAMIO"
+		echo "Erreur dans flux de donnée du protocole rsync"
+		return;;
+	    13) echo "Erreur de rsync ; RERR_MESSAGEIO"
+		echo "Erreur avec les diagnostics du programme"
+		return;;
+	    14) echo "Erreur de rsync ; RERR_IPC"
+		echo "Erreur dans le code IPC"
+		return;;
+	    20) echo "Erreur de rsync ; RERR_SIGNAL"
+		echo "SIGUSR1 ou SIGINT reçu"
+		return;;
+	    21) echo "Erreur de rsync ; RERR_WAITCHILD"
+		echo "Une erreur retournée par waitpid()"
+		return;;
+	    22) echo "Erreur de rsync ; RERR_MALLOC"
+		echo "Erreur lors de l'allocation des tampons de mémoire de coeur"
+		return;;
+	    23) echo ""
+                echo "Erreur fichier inexistant"
+		return;;
+	    30) echo "Erreur de rsync ; RERR_TIMEOUT"
+		echo "Temps d'attente écoulé dans l'envoi/réception de données"
+		return;;
+	    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $RET
+		return;;
+	esac
+    elif [ $MYLANG = "en" ] ; then
+	case $RET in
+	    0)  return;;		
+	    1)  echo "rsync error : Syntax or usage error "
+		return;;
+	    2)  echo "rsync error : Protocol incompatibility "
+		return;;
+	    3)  echo "rsync error : Errors selecting input/output files, dirs"
+		return;;
+	    4)  echo "rsync error : Requested action not supported: an attempt"
+		echo "was made to manipulate 64-bit files on a platform that cannot support"
+		echo "them; or an option was specified that is supported by the client and"
+		echo "not by the server."
+		return;;
+	    5)  echo "rsync error : Error starting client-server protocol"
+		return;;
+	    10) echo "rsync error : Error in socket I/O "
+		return;;
+	    11) echo "rsync error : Error in file I/O "
+		return;;
+	    12) echo "rsync error : Error in rsync protocol data stream "
+		return;;
+	    13) echo "rsync error : Errors with program diagnostics "
+		return;;
+	    14) echo "rsync error : Error in IPC code "
+		return;;
+	    20) echo "rsync error : Received SIGUSR1 or SIGINT "
+		return;;
+	    21) echo "rsync error : Some error returned by waitpid() "
+		return;;
+	    22) echo "rsync error : Error allocating core memory buffers "
+		return;;
+	    23) echo "rsync error : Partial transfer due to error"
+		return;;
+	    24) echo "rsync error : Partial transfer due to vanished source files"
+		return;;
+	    30) echo "rsync error : Timeout in data send/receive "
+		return;;
+	    *)  echo "rsync error : return code of rsync unknown :" $RET
+		return;;
+	esac
+    else
+	echo "unknown language $MYLANG."
+	return
+    fi
+}
+    
+
+#D-#==================================================
+#D-function IGCM_sys_Miror_libIGCM
+#D-* Purpose: Mirror libIGCM PATH and lib to cesium
+#D-* Examples:
+#D-
+function IGCM_sys_Mirror_libIGCM {
+    IGCM_debug_PushStack "IGCM_sys_Mirror_libIGCM"
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Mirror_libIGCM"
+    fi
+
+    typeset RET DEST
+
+    mkdir -p ${HOME}/MIRROR/${PATHlibIGCM}
+
+    echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > out_rsync 2>&1
+    ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> out_rsync 2>&1
+    RET=$?
+
+    if [ ${RET} -gt 0 ] ; then
+	echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on cesium."
+	cat out_rsync
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Mirror_libIGCM"
+}
+
+#====================================================
+#- Call IGCM_sys_Mirror_libIGCM now !
+if ( $MirrorlibIGCM ) ; then
+    IGCM_sys_Mirror_libIGCM
+fi
+
+#D-#==================================================
+#D-function IGCM_sys_Cp
+#D-* Purpose: generic cp
+#D-* Examples:
+#D-
+function IGCM_sys_Cp {
+    IGCM_debug_PushStack "IGCM_sys_Cp" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Cp :" $@
+    fi
+
+    typeset RET
+
+    echo cp $@ > out_rsync 2>&1
+    \cp $@ >> out_rsync 2>&1
+    RET=$?
+
+    if [ ${RET} -gt 0 ] ; then
+	echo "IGCM_sys_Cp : error."
+	cat out_rsync
+	IGCM_debug_Exit "IGCM_sys_Cp"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Cp"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Rm
+#D-* Purpose: generic rm
+#D-* Examples:
+#D-
+function IGCM_sys_Rm {
+    IGCM_debug_PushStack "IGCM_sys_Rm" -- $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Rm :" $@
+    fi
+
+    typeset RET
+
+    echo rm $@ > out_rsync 2>&1
+    \rm $@ >> out_rsync 2>&1
+    RET=$?
+
+    if [ ${RET} -gt 0 ] ; then
+	echo "IGCM_sys_Rm : error."
+	cat out_rsync
+	IGCM_debug_Exit "IGCM_sys_Rm"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Rm"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Mv
+#D-* Purpose: generic move
+#D-* Examples:
+#D-
+function IGCM_sys_Mv {
+    IGCM_debug_PushStack "IGCM_sys_Mv" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Mv :" $@
+    fi
+
+    if [ $DRYRUN = 0 ]; then
+
+        typeset RET
+            
+        echo mv $@ > out_rsync 2>&1
+        \mv $@ >> out_rsync 2>&1
+        RET=$?
+    
+        if [ ${RET} -gt 0 ] ; then
+            echo "IGCM_sys_Mv : error in mv."
+            cat out_rsync
+            IGCM_debug_Exit "IGCM_sys_Mv"
+        fi
+    else
+        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+    fi
+
+    IGCM_debug_PopStack "IGCM_sys_Mv"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Put_Dir
+#D-* Purpose: Copy a complete directory on $(ARCHIVE)
+#D-* Examples:
+#D-
+function IGCM_sys_Put_Dir {
+    IGCM_debug_PushStack "IGCM_sys_Put_Dir" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Put_Dir :" $@
+    fi
+    if [ $DRYRUN = 0 ]; then
+	if [ ! -d ${1} ] ; then
+	    echo "WARNING : IGCM_sys_Put_Dir ${1} DOES NOT EXIST ."
+	    IGCM_debug_PopStack "IGCM_sys_Put_Dir"
+	    return
+	fi
+
+	typeset RET
+
+	# Only if we use rsync
+	#IGCM_sys_TestDirArchive $( dirname $2 )
+	#
+	#USUAL WAY
+	\cp -r $1 $2 > out_rsync 2>&1
+  	RET=$?
+
+	if [ ${RET} -gt 0 ] ; then
+	    echo "IGCM_sys_Put_Dir : error."
+	    cat out_rsync
+	    IGCM_debug_Exit "IGCM_sys_Put_Dir"
+	fi
+    else
+	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Put_Dir"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Get_Dir
+#D-* Purpose: Copy a complete directory from $(ARCHIVE)
+#D-* Examples:
+#D-
+function IGCM_sys_Get_Dir {
+    IGCM_debug_PushStack "IGCM_sys_Get_Dir" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Get_Dir :" $@
+    fi
+    if [ $DRYRUN = 0 ]; then
+	if [ ! -d ${1} ] ; then
+	    echo "WARNING : IGCM_sys_Get_Dir ${1} DOES NOT EXIST ."
+	    IGCM_debug_PopStack "IGCM_sys_Get_Dir"
+	    return
+	fi
+
+	typeset RET
+
+	# Only if we use rsync
+	#IGCM_sys_TestDirArchive $( dirname $2 )
+	#
+	#USUAL WAY
+	\cp -r $1 $2 > out_rsync 2>&1
+  	RET=$?
+
+	if [ ${RET} -gt 0 ] ; then
+	    echo "IGCM_sys_Get_Dir : error."
+	    cat out_rsync
+	    IGCM_debug_Exit "IGCM_sys_Get_Dir"
+	fi
+    else
+	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Get_Dir"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Get_Master
+#D-* Purpose: Copy a complete directory from MASTER filesystem
+#D-* Examples:
+#D-
+function IGCM_sys_Get_Master {
+    IGCM_debug_PushStack "IGCM_sys_Get_Master" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Get_Master :" $@
+    fi
+    if [ $DRYRUN = 0 ]; then
+	if [ ! -d ${1} ] ; then
+	    echo "WARNING : IGCM_sys_Get_Master ${1} DOES NOT EXIST ."
+	    IGCM_debug_PopStack "IGCM_sys_Get_Master"
+	    return
+	fi
+
+	typeset RET
+	sleep 60
+
+	#USUAL WAY
+	\cp -r $1 $2 > out_rsync 2>&1
+  	RET=$?
+
+	if [ ${RET} -gt 0 ] ; then
+	    echo "IGCM_sys_Get_Master : error."
+	    cat out_rsync
+	    IGCM_debug_Exit "IGCM_sys_Get_Master"
+	fi
+    else
+	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Get_Master"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Put_Rest
+#D-* Purpose: Put computied restarts on $(ARCHIVE).
+#D-           File and target directory must exist.
+#D-* Examples:
+#D-
+function IGCM_sys_Put_Rest {
+    IGCM_debug_PushStack "IGCM_sys_Put_Rest" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Put_Rest :" $@
+    fi
+    if [ $DRYRUN = 0 ]; then
+	if [ ! -f ${1} ] ; then
+	    echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ."
+	    IGCM_debug_Exit "IGCM_sys_Put_Rest"
+	fi
+
+	typeset RET
+	#
+	if [ X${JobType} = XRUN ] ; then
+	    IGCM_sys_Chmod 444 ${1}
+	fi
+	#
+	IGCM_sys_TestDirArchive $( dirname $2 )
+	#
+	# USUAL WAY
+	\cp $1 $2 > out_rsync 2>&1
+        RET=$?
+
+# 	#RSYNC WITH NETWORK RSH CALL
+# 	echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${RHOST}:${2} > out_rsync 2>&1
+# 	${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${RHOST}:${2} >> out_rsync 2>&1
+
+#  	#RSYNC WITH NFS USE
+#  	echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1
+#  	${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
+
+#  	RET=$?
+#  	IGCM_sys_Rsync_out $RET
+
+#  	${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
+#  	(( RET=RET+$? ))
+
+	if [ ${RET} -gt 0 ] ; then
+	    echo "IGCM_sys_Put_Rest : error."
+	    cat out_rsync
+	    IGCM_debug_Exit "IGCM_sys_Put_Rest"
+	fi
+    else
+	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Put_Rest"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Put_Out
+#D-* Purpose: Copy a file on $(ARCHIVE) after have chmod it in readonly
+#D-* Examples:
+#D-
+function IGCM_sys_Put_Out {
+    IGCM_debug_PushStack "IGCM_sys_Put_Out" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Put_Out :" $@
+    fi
+    if [ $DRYRUN = 0 ]; then
+	if [ ! -f ${1} ] ; then
+	    echo "WARNING : IGCM_sys_Put_Out ${1} DOES NOT EXIST ."
+	    IGCM_debug_PopStack "IGCM_sys_Put_Out"
+	    return 1
+	fi
+	#
+	IGCM_sys_MkdirArchive $( dirname $2 )
+        #
+	typeset RET
+
+	#=====================================================
+        #         COMMENT OUT DOUBLE COPY ON SCRATCHDIR
+        #=====================================================
+
+	#echo ${2} | grep "${R_OUT}" > /dev/null 2>&1
+	#if [ $? -eq 0 ] ; then
+	#    typeset WORKPATH FILEPATH
+	#    WORKPATH=$( dirname $2 | sed -e "s|${R_OUT}|${R_OUT_SCR}|" )
+	#    IGCM_sys_MkdirWork ${WORKPATH} 
+	#    FILEPATH=${WORKPATH}/$( basename $2 )
+        #    #
+	#    IGCM_sys_Cp ${1} ${FILEPATH}
+	#fi
+
+	if [ X${JobType} = XRUN ] ; then
+	    IGCM_sys_Chmod 444 ${1}
+	fi
+	#
+        # USUAL WAY
+	\cp $1 $2 > out_rsync 2>&1
+	RET=$?
+
+# 	#RSYNC WITH NETWORK RSH CALL
+# 	echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${RHOST}:${2} > out_rsync 2>&1
+# 	${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${RHOST}:${2} >> out_rsync 2>&1
+
+#  	#RSYNC WITH NFS USE
+#  	echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1
+#  	${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
+
+#  	RET=$?
+#  	IGCM_sys_Rsync_out $RET
+
+#  	${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
+#  	(( RET=RET+$? ))
+
+	if [ ${RET} -gt 0 ] ; then
+	    echo "IGCM_sys_Put_Out : error."
+	    cat out_rsync
+	    IGCM_debug_Exit "IGCM_sys_Put_Out"
+	fi
+    else
+	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Put_Out"
+    return 0
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Get
+#D-* Purpose: Get a file from ${ARCHIVE}
+#D-* Examples: IGCM_sys_Get myfile /destpath/myfile_with_PREFIX
+#D-            IGCM_sys_Get /l Array_contain_myfiles /destpath/
+function IGCM_sys_Get {
+    IGCM_debug_PushStack "IGCM_sys_Get" $@
+
+    typeset DEST RET dm_liste ifile target file_work 
+
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_Get :" $@
+    fi
+    if [ $DRYRUN -le 2 ]; then
+	if [ X${1} = X'/l' ] ; then
+            # test if the first file is present in the old computation :
+	    eval set +A dm_liste \${${2}}
+	else
+	    eval set +A dm_liste ${1}
+	fi
+	eval DEST=\${${#}}
+
+	#=====================================================
+        #         COMMENT OUT DOUBLE COPY ON SCRATCHDIR
+        #=====================================================
+
+	# Is it an R_OUT file (not R_IN) ?
+	#echo ${dm_liste[0]} | grep "${R_OUT}" > /dev/null 2>&1
+	#if [ $? -eq 0 ] ; then
+	#    # Yes  ? then we try to get it in SCRATCHDIR
+	#    set +A file_work $( echo ${dm_liste[*]} | sed -e "s|${R_OUT}|${R_OUT_SCR}|g" )
+	#    if [ -f ${file_work[0]} ] ; then
+	#	IGCM_sys_Cp ${file_work[*]} ${DEST}
+	#	IGCM_debug_PopStack "IGCM_sys_Get"
+	#	return
+	#    fi
+	#fi
+
+	# test if the (first) file is present in the old computation :
+	IGCM_sys_TestFileArchive ${dm_liste[0]}
+	RET=$?
+        if [ ${RET} -gt 0 ] ; then
+	    echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."
+	    IGCM_debug_Exit "IGCM_sys_Get"
+	    IGCM_debug_PopStack "IGCM_sys_Get"
+	    return
+	fi
+
+#	dmget ${dm_liste[*]} > out_rsync 2>&1
+#  	RET=$?
+#  	if [ ${RET} -gt 0 ] ; then
+#  	    echo "IGCM_sys_Get : demigration error."
+#  	    cat out_rsync
+#  	    IGCM_debug_Exit "IGCM_sys_Get"
+#  	fi
+
+        #USUAL WAY
+	if [ X${1} = X'/l' ] ; then
+	    (( RET=0 ))
+	    for target in ${dm_liste[*]} ; do
+		local_file=$( basename ${target} )
+		\cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
+		(( RET = RET + $? ))
+	    done
+	else
+	    \cp ${dm_liste} ${DEST} >> out_rsync 2>&1
+	    RET=$?
+	fi
+
+# 	#RSYNC WITH NETWORK RSH CALL
+# 	echo ${RSYNC} ${RSYNC_opt} -e ssh ${RHOST}:"${dm_liste}" ${RHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
+# 	${RSYNC} ${RSYNC_opt} -e ssh ${RHOST}:"${dm_liste}" ${RHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1
+
+#  	#RSYNC WITH NFS USE
+#  	echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1
+#  	${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1
+
+# 	RET=$?
+#  	IGCM_sys_Rsync_out $RET
+
+#  	${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
+#  	(( RET=RET+$? ))
+
+	if [ ${RET} -gt 0 ] ; then
+	    echo "IGCM_sys_Get : copy error."
+	    cat out_rsync
+	    IGCM_debug_Exit "IGCM_sys_Get"
+	fi
+    else
+	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+    fi
+    IGCM_debug_PopStack "IGCM_sys_Get"
+}
+
+############################################################## A FINIR !!
+
+#D-#==================================================
+#D-function IGCM_sys_GetDate_FichWork
+#D-* Purpose: donne la date filesys d'un fichier sur le filesystem WORK
+#D-* Examples:
+#D-
+function IGCM_sys_GetDate_FichWork {
+    IGCM_debug_PushStack "IGCM_sys_FichWork" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_GetDate_FichWork :" $@
+    fi
+    # donne la date filesys d'un fichier sur la machine work
+    IGCM_debug_PopStack "IGCM_sys_FichWork"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_GetDate_FichArchive
+#D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE 
+#D-* Examples:
+#D-
+function IGCM_sys_GetDate_FichArchive {
+    IGCM_debug_PushStack "IGCM_sys_FichArchive" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_GetDate_FichArchive :" $@
+    fi
+    IGCM_debug_PopStack "IGCM_sys_FichArchive"
+}
+
+##############################################################
+# REBUILD OPERATOR
+
+function IGCM_sys_rebuild {
+    IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_rebuild :" $@
+    fi
+    /home/cont003/p86ipsl/X64/bin/rebuild -f -o $@
+    if [ $? -gt 0 ] ; then
+       echo "IGCM_sys_rebuild : erreur ${@}."
+       IGCM_debug_Exit "rebuild"
+    fi
+
+    IGCM_debug_PopStack "IGCM_sys_rebuild"
+}
+
+############################################################
+# Activate Running Environnment Variables
+
+function IGCM_sys_activ_variables {
+    IGCM_debug_PushStack "IGCM_sys_activ_variables"
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_activ_variables"
+    fi
+    ulimit -s 2097152
+    IGCM_debug_PopStack "IGCM_sys_activ_variables"
+}
+
+############################################################
+# Desactivate Running Environnment Variables
+
+function IGCM_sys_desactiv_variables {
+    IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_desactiv_variables"
+    fi
+    IGCM_debug_PopStack "IGCM_sys_desactiv_variables"
+}
+
+############################################################
+# Build run file
+
+function IGCM_sys_build_run_file {
+    IGCM_debug_PushStack "IGCM_sys_build_run_file" $@
+    if ( $DEBUG_sys ) ; then
+	echo "IGCM_sys_build_run_file " $@
+    fi
+    NUM_PROC_OCE=1
+    (( NUM_PROC_ATM = $BATCH_NUM_PROC_TOT - NUM_PROC_OCE - 1))
+    (( nb_tot_m1    = $BATCH_NUM_PROC_TOT - NUM_PROC_OCE ))
+    if [ $1 = MPI1 ]; then
+	cat <<EOF > run_file
+-np 1 ./oasis
+-np ${NUM_PROC_ATM} ./lmdz.x
+-np ${NUM_PROC_OCE} ./opa.xx
+EOF
+	config_UserChoices_JobRunOptions='"--app"'
+	IGCM_sys_Chmod u+x run_file
+    fi
+    IGCM_debug_PopStack "IGCM_sys_build_run_file"
+  
+}
