Index: /trunk/libIGCM/AA_job
===================================================================
--- /trunk/libIGCM/AA_job	(revision 618)
+++ /trunk/libIGCM/AA_job	(revision 619)
@@ -10,4 +10,16 @@
 #-Q- cesium #MSUB -E "-j o"
 #-Q- cesium #MSUB -E "-S /bin/ksh"
+#-Q- curie #!/usr/bin/ksh
+#-Q- curie ######################
+#-Q- curie ## CURIE   TGCC/CEA ##
+#-Q- curie ######################
+#-Q- curie #MSUB -r ::Jobname::       # nom de la requete
+#-Q- curie #MSUB -o Script_Output_::Jobname::.000001    # nom du fichier de sortie
+#-Q- curie #MSUB -e Script_Output_::Jobname::.000001    # nom du fichier de sortie
+#-Q- curie #MSUB -eo
+#-Q- curie #MSUB -n ::JobNumProcTot:: # reservation des processeurs pour le job
+#-Q- curie #MSUB -T 86400             # Limite temps (en secondes)
+#-Q- curie ##MSUB -p XXXXXXX
+#-Q- curie BATCH_NUM_PROC_TOT=$BRIDGE_MSUB_NPROC
 #-Q- platine #!/usr/bin/ksh
 #-Q- platine ##################
@@ -443,22 +455,14 @@
 
     echo "========================================================================"
-    if ( [ X${BATCH_NUM_PROC_TOT} != X ] && [ "${BATCH_NUM_PROC_TOT}" -gt 1 ] ) ; then
-	MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND}
-	eval MPIRUN_OPTIONS=${config_UserChoices_JobRunOptions}
-    else
-	MPIRUN_COMMAND=${MPIRUN_COMMAND:="time "}
-	MPIRUN_OPTIONS=${MPIRUN_OPTIONS:=""}
-    fi
-
     if [ ${DRYRUN} -le 1 ] ; then
 	REAL_DATE_INIT=$( date )
-	echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name}   > ${Exe_Output} 2>&1"
 	echo                                                                                   > ${Exe_Output}
 	echo "#######################################"                                        >> ${Exe_Output}
-        echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name}" >> ${Exe_Output}
+        echo "EXECUTION of : ${EXECUTION}"
+        echo "EXECUTION of : ${EXECUTION}"                                                    >> ${Exe_Output}
 	echo                                                                                  >> ${Exe_Output}
 	typeset RET
 	RUN_DATE_BEGIN=$( date '+%Y-%m-%dT%H:%M:%S' )
-	${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} >> ${Exe_Output} 2>&1
+	${EXECUTION}  >> ${Exe_Output} 2>&1
 	RET=$?
 	RUN_DATE_END=$( date '+%Y-%m-%dT%H:%M:%S' )
@@ -476,5 +480,6 @@
 	echo                                            >> ${Exe_Output}
     else
-	echo "EXECUTION of : ${MPIRUN_COMMAND} ${MPIRUN_OPTIONS} ./${config_Executable_Name} simulated for DRYRUN = " $DRYRUN
+        echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN
+        echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN > ${Exe_Output}
 	if ( $DEBUG_debug ) ; then
 	    echo "FOR EXECUTION DRYRUN mode = " $DRYRUN >> stack
Index: /trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_config/libIGCM_config.ksh	(revision 618)
+++ /trunk/libIGCM/libIGCM_config/libIGCM_config.ksh	(revision 619)
@@ -21,5 +21,5 @@
   IGCM_debug_Print 1 "IGCM_config_Initialize"
 
-  if [ ! -r ${SUBMIT_DIR}/run.card ]; then 
+  if [ ! -r ${SUBMIT_DIR}/run.card ]; then
     #================================================#
     #         The file run.card doesn't exist        #
@@ -54,5 +54,5 @@
   # Read libIGCM compatibility version in config.card
   IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Compatibility libIGCM
-  eval CompatibilityTag=${config_Compatibility_libIGCM} > /dev/null 2>&1	
+  eval CompatibilityTag=${config_Compatibility_libIGCM} > /dev/null 2>&1
 
   if [ ! "${CompatibilityTag}" = "${libIGCM_CurrentTag}" ] ; then
@@ -61,5 +61,5 @@
 
   #==================================
-  # Read UserChoices section: 
+  # Read UserChoices section:
   IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card UserChoices
 
@@ -69,5 +69,5 @@
   echo
   IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-  # Name Space of this experience 
+  # Name Space of this experience
   if [ X${config_UserChoices_SpaceName} != X ] ; then
     IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
@@ -89,5 +89,5 @@
 
   #==================================
-  # Read Post section: 
+  # Read Post section:
   IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card Post
   echo
@@ -101,9 +101,9 @@
 
   #==================================
-  # Define default value to keep compatibility with previous card: means before changes due to TGCC 
+  # Define default value to keep compatibility with previous card: means before changes due to TGCC
   [ X${config_Post_PackFrequency} = X ] && config_Post_PackFrequency=${config_Post_RebuildFrequency}
 
   #==================================
-  # Read ListOfComponents section: 
+  # Read ListOfComponents section:
   IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card ListOfComponents
   for comp in ${config_ListOfComponents[*]} ; do
@@ -121,5 +121,5 @@
   IGCM_card_DefineArrayFromSection   ${SUBMIT_DIR}/config.card Executable
   IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Executable Name
-  
+
   #==================================
   # Define Outputs Name
@@ -137,5 +137,5 @@
   # Convert yyyy-mm-dd date to gregorian yyyymmdd
   DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
-  DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
+  DateEnd=$(   IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd}   )
 
   # Period Length In Days between DateBegin and DateEnd
@@ -144,5 +144,5 @@
     IGCM_debug_Print 1 "Problem with dates in config.card : ${DateEnd} < ${DateBegin} ! You must check that."
     IGCM_debug_Exit "IGCM_config_Initialize" " Wrong Dates."
-    IGCM_debug_Verif_Exit 
+    IGCM_debug_Verif_Exit
   fi
 
@@ -205,5 +205,5 @@
   fi
 
-  if ( ${FirstInitialize} ) ; then 
+  if ( ${FirstInitialize} ) ; then
     IGCM_sys_MkdirArchive ${R_SAVE}
     IGCM_sys_Mkdir        ${R_BUFR}
@@ -217,7 +217,7 @@
     #Test state of run in run.card
     IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration PeriodState
-    
+
     if ( [ ${run_Configuration_PeriodState} != "Start" ] && [ ${run_Configuration_PeriodState} != "Running" ] && [ ${run_Configuration_PeriodState} != "OnQueue" ] && [ ${run_Configuration_PeriodState} != "Continue" ] ) ; then
-      echo 
+      echo
       IGCM_debug_Print 1 "!! Error in run.card with PeriodState : " ${run_Configuration_PeriodState} "!!"
       IGCM_debug_Print 1 "Try running ${libIGCM}/clean_month.job to fix this"
@@ -238,5 +238,5 @@
 
   #====================================================
-  # Experience type : DEB(ug), DEV(elopment), RUN 
+  # Experience type : DEB(ug), DEV(elopment), RUN
   if [ X${JobType} != XRUN ] ; then
     echo
@@ -260,9 +260,9 @@
     if ( [ X${config_Post_RebuildFrequency} != XNONE ] && [ ${DRYRUN} -eq 0 ] ) ; then
       if [ X${config_Post_RebuildFrequency} != X${config_UserChoices_PeriodLength} ] ; then
-	echo "------------"
-	echo "WARNING : Job is NOT in RUN mode then we will force REBUILD Frequency"
-	echo "          to PeriodLength : ${config_UserChoices_PeriodLength}"
-	echo "------------"
-	config_Post_RebuildFrequency=${config_UserChoices_PeriodLength}
+        echo "------------"
+        echo "WARNING : Job is NOT in RUN mode then we will force REBUILD Frequency"
+        echo "		to PeriodLength : ${config_UserChoices_PeriodLength}"
+        echo "------------"
+        config_Post_RebuildFrequency=${config_UserChoices_PeriodLength}
       fi
     fi
@@ -296,31 +296,31 @@
   case ${config_UserChoices_PeriodLength} in
   *Y|*y)
-    PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[yY]//' ) 
+    PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[yY]//' )
     IGCM_debug_Print 2 "Number of years for PeriodLength : ${PeriodLengthInYears}"
     PeriodLengthInDays=0
     i=0
-    until [ $i -ge $PeriodLengthInYears ] ; do 
-      (( PeriodLengthInDays = PeriodLengthInDays + $( IGCM_date_DaysInYear $(( year + i )) ) )) 
-      (( i=i+1 )) 
-    done 
+    until [ $i -ge $PeriodLengthInYears ] ; do
+      (( PeriodLengthInDays = PeriodLengthInDays + $( IGCM_date_DaysInYear $(( year + i )) ) ))
+      (( i=i+1 ))
+    done
     ;;
   *M|*m)
-    PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[mM]//' ) 
+    PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[mM]//' )
     IGCM_debug_Print 2 "Number of months for PeriodLength : ${PeriodLengthInMonths}"
     PeriodLengthInDays=0
     i=0
-    until [ $i -ge $PeriodLengthInMonths ] ; do 
-      if [ $(( month + i )) -lt 13 ] ; then 
-	(( PeriodLengthInDays  = PeriodLengthInDays + $( IGCM_date_DaysInMonth $year $(( month + i )) ) ))  
-      else 
- 	(( PeriodLengthInDays  = PeriodLengthInDays + $( IGCM_date_DaysInMonth $year $(( month + i - 12 )) ) ))  
-      fi 
-      (( i=i+1 )) 
-    done 
+    until [ $i -ge $PeriodLengthInMonths ] ; do
+      if [ $(( month + i )) -lt 13 ] ; then
+        (( PeriodLengthInDays  = PeriodLengthInDays + $( IGCM_date_DaysInMonth $year $(( month + i )) ) ))
+      else
+        (( PeriodLengthInDays  = PeriodLengthInDays + $( IGCM_date_DaysInMonth $year $(( month + i - 12 )) ) ))
+      fi
+      (( i=i+1 ))
+    done
     ;;
-  *D|*d)  
+  *D|*d)
     PeriodLengthInMonths=0
     PeriodLengthInDays=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[dD]//' );;
-  *) 
+  *)
     IGCM_debug_Exit "IGCM_config_Analyse_PeriodLength " ${config_UserChoices_PeriodLength} " invalid period length : choose in *Y, *M, *D."
     IGCM_debug_Verif_Exit ;;
@@ -371,5 +371,5 @@
   fi
 
-  # Check PackFrequency against other key frequencies 
+  # Check PackFrequency against other key frequencies
   # Modulo (PackFrequency and TimeSeriesFrequency/SeasonalFrequency and PeriodLenght) must be zero
   if ( [ ! X${config_Post_PackFrequency} = X${NULL_STR} ] && [ ! X${config_Post_PackFrequency} = XNONE ] ) ; then
@@ -393,7 +393,7 @@
     IGCM_debug_Print 1 "Check coherence between All Chunck2D frequency and TimeSeriesFrequency"
     IGCM_post_CheckModuloFrequency value config_Post_TimeSeriesFrequency
-    case ${value} in  
-    *Y|*y) ;; 
-    *)  IGCM_debug_Print 1 "All ChunckJob2D frequency must be expressed in year *Y|*y in comp.card"
+    case ${value} in
+    *Y|*y) ;;
+    *)	IGCM_debug_Print 1 "All ChunckJob2D frequency must be expressed in year *Y|*y in comp.card"
       IGCM_debug_Exit "This will stop the job" ;;
     esac
@@ -408,7 +408,7 @@
     IGCM_debug_Print 1 "Check coherence between All Chunck3D frequency and TimeSeriesFrequency"
     IGCM_post_CheckModuloFrequency value config_Post_TimeSeriesFrequency
-    case ${value} in  
-    *Y|*y) ;; 
-    *)  IGCM_debug_Print 1 "All ChunckJob3D frequency must be expressed in year *Y|*y in comp.card"
+    case ${value} in
+    *Y|*y) ;;
+    *)	IGCM_debug_Print 1 "All ChunckJob3D frequency must be expressed in year *Y|*y in comp.card"
       IGCM_debug_Exit "This will stop the job" ;;
     esac
@@ -453,5 +453,5 @@
 
     IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Running"
-    
+
   else
     #================================================#
@@ -462,5 +462,5 @@
     IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration PeriodState
     if ( [ ${run_Configuration_PeriodState} != "Running" ] && [ ${run_Configuration_PeriodState} != "OnQueue" ] && [ ${run_Configuration_PeriodState} != "Continue" ] ) ; then
-      echo 
+      echo
       IGCM_debug_Print 1 "!! Error in run.card with PeriodState : " ${run_Configuration_PeriodState} "!!"
       IGCM_debug_Print 1 "Try running ${libIGCM}/clean_month.job to fix this"
@@ -471,5 +471,5 @@
 
     #===================================#
-    #        Read updated run.card      #
+    #        Read updated run.card	#
     #===================================#
 
@@ -517,5 +517,5 @@
     IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Running"
 
-  fi    
+  fi
   OldPrefix=${config_UserChoices_JobName}_${PeriodDateEnd}
 
@@ -523,5 +523,5 @@
   # Compute year_m1 and year_p1 (year minus 1Y and year plus 1Y)
   year_m1=$(( year - 1 ))
-  year_p1=$(( year + 1 ))	
+  year_p1=$(( year + 1 ))
   # Compute month_m1 (month minus 1M)
   # Compute yyyymm_m1 (yyyymm minus 1M)
@@ -556,5 +556,5 @@
   #===================================================================#
   # Prepare variables available for ${COMP}.card and ${COMP}.driver   #
-  #             But available to any son functions                    #
+  #		But available to any son functions                    #
   #===================================================================#
 
@@ -589,10 +589,10 @@
     if [ ${DRYRUN} -le 0 ] ; then
       if ( IGCM_sys_TestFileBuffer ${R_BUF_KSH}/${PREFIX}_${Exe_Output} ) ; then
-	IGCM_debug_Exit "IGCM_config_PeriodStart" "You are currently RErunning an old job."
-	IGCM_debug_Print 1 "Because of readonly permissions, you can't RErun a job when saved files"
-	IGCM_debug_Print 1 " are still in the ARCHIVE directory. You must deleted those files, or "
-	IGCM_debug_Print 1 " the whole ${R_SAVE} tree. See clean_month.job in ${libIGCM} directory."
-	IGCM_debug_Print 1 " This exit has been initiated because at least ${R_BUF_KSH}/${PREFIX}_${Exe_Output} exists."
-	IGCM_debug_Verif_Exit
+        IGCM_debug_Exit "IGCM_config_PeriodStart" "You are currently RErunning an old job."
+        IGCM_debug_Print 1 "Because of readonly permissions, you can't RErun a job when saved files"
+        IGCM_debug_Print 1 " are still in the ARCHIVE directory. You must deleted those files, or "
+        IGCM_debug_Print 1 " the whole ${R_SAVE} tree. See clean_month.job in ${libIGCM} directory."
+        IGCM_debug_Print 1 " This exit has been initiated because at least ${R_BUF_KSH}/${PREFIX}_${Exe_Output} exists."
+        IGCM_debug_Verif_Exit
       fi
     fi
@@ -622,5 +622,5 @@
     eval ExeNameIn=\${config_Executable_${comp}[0]}
 
-    # NO order in config.card for parallelized values ! 
+    # NO order in config.card for parallelized values !
     # just use suffix : MPI , OMP and NOD (for number of NODes.)
 
@@ -633,5 +633,5 @@
     # OMP is the number of OpenMP threads per MPI processus
     eval ${comp}_PROC_OMP=0
-	
+
     # Only if we really have an executable for the component :
     if [ X${ExeNameIn} != X\"\" ] ; then
@@ -654,10 +654,10 @@
         (( j = 2 ))
 
-        while [ $j -lt ${NbElts} ] ; do 
+        while [ $j -lt ${NbElts} ] ; do
           eval tempvar=\${config_Executable_${comp}[${j}]}
 
           if [ X${tempvar} = X ] ; then
-            echo "Error reading MPI/OMP parameters !!!" 
-            echo "Check your config.card." 
+            echo "Error reading MPI/OMP parameters !!!"
+            echo "Check your config.card."
             exit 1
           fi
@@ -666,17 +666,17 @@
 
           case ${tempvar} in
-            *[mM][pP][iI]*)
+          *[mM][pP][iI]*)
                # Read MPI parameter for composante
-               eval ${comp}_PROC_MPI=$( echo ${tempvar} | tr '[a-z]' '[A-Z]' | sed -e "s/MPI//" )
-               OK_PARA_MPI=true;;
-            *[oO][mM][pP]*)
+            eval ${comp}_PROC_MPI=$( echo ${tempvar} | tr '[a-z]' '[A-Z]' | sed -e "s/MPI//" )
+            OK_PARA_MPI=true;;
+          *[oO][mM][pP]*)
                # Read OMP parameter for composante
-               eval ${comp}_PROC_OMP=$( echo ${tempvar} | tr '[a-z]' '[A-Z]' | sed -e "s/OMP//" )
-               OK_PARA_OMP=true;;
-            *[nN][oO][dD]*)
+            eval ${comp}_PROC_OMP=$( echo ${tempvar} | tr '[a-z]' '[A-Z]' | sed -e "s/OMP//" )
+            OK_PARA_OMP=true;;
+          *[nN][oO][dD]*)
                # Read NOD (NumBer of Nodes) parameter for composante
-               eval ${comp}_PROC_NOD=$( echo ${tempvar} | tr '[a-z]' '[A-Z]' | sed -e "s/NOD//" )
-               OK_PARA_NOD=true
-               OK_PARA_MPI=true;;
+            eval ${comp}_PROC_NOD=$( echo ${tempvar} | tr '[a-z]' '[A-Z]' | sed -e "s/NOD//" )
+            OK_PARA_NOD=true
+            OK_PARA_MPI=true;;
           esac
 
@@ -731,5 +731,5 @@
           PROCESSUS_NUMBER=${BATCH_NUM_PROC_TOT}
         fi
-      else 
+      else
         PROCESSUS_NUMBER=1
       fi
@@ -807,12 +807,12 @@
   eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}"
 
-      IGCM_card_CheckConflict run.card
-      IGCM_sys_PutBuffer_Out ${SUBMIT_DIR}/run.card ${R_BUF_KSH}/run.card rw
-
-      IGCM_debug_Print 1 "Check components binary : size and creation date"
-
-      typeset LS_comp LS_bin ExeDate ExeCpuLog NextExeSize LastCompExeSize
-      typeset comp i    
-      typeset ExeNameIn ExeNameOut UpdateExe ExeSecDateMax
+  IGCM_card_CheckConflict run.card
+  IGCM_sys_PutBuffer_Out ${SUBMIT_DIR}/run.card ${R_BUF_KSH}/run.card rw
+
+  IGCM_debug_Print 1 "Check components binary : size and creation date"
+
+  typeset LS_comp LS_bin ExeDate ExeCpuLog NextExeSize LastCompExeSize
+  typeset comp i
+  typeset ExeNameIn ExeNameOut UpdateExe ExeSecDateMax
 
       #==================================#
@@ -820,16 +820,16 @@
       #==================================#
 
-      (( i=0 ))
-      if ( ${FirstInitialize} ) ; then
-	run_Log_LastExeSize=""
-	for comp in ${config_ListOfComponents[*]} ; do
-	  run_Log_LastExeSize[$i]=0
-	  (( i=i+1 ))
-	done
-      else
-	IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/run.card Log LastExeSize
-      fi
+  (( i=0 ))
+  if ( ${FirstInitialize} ) ; then
+    run_Log_LastExeSize=""
+    for comp in ${config_ListOfComponents[*]} ; do
+      run_Log_LastExeSize[$i]=0
+      (( i=i+1 ))
+    done
+  else
+    IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/run.card Log LastExeSize
+  fi
       #==================================#
-      #         And Build ExeDate        #
+      #		And Build ExeDate        #
       #==================================#
 
@@ -837,59 +837,59 @@
       # Would be nice to have next line but no way to format ls output (need to ls -l --time-style "+%Y-%m-%dT%H:%M")
       # ExeDate = ATM_2009-06-12T09:34+SRF_2009-06-12T09:34+OCE_2009-06-12T09:34+ICE_2009-06-12T09:34+CPL_2009-06-12T09:34
-      ExeDate=""
-      NextExeSize="( "
-      (( i=0 ))
-      UpdateExe=false
-      (( ExeSecDateMax = 0 ))
-      for comp in ${config_ListOfComponents[*]} ; do
-
-	IGCM_debug_Print 3 ${comp}
-
-	eval ExeNameIn=\${config_Executable_${comp}[0]}
-	eval ExeNameOut=\${config_Executable_${comp}[1]}
-	# Only if we really have an executable for the component :
-	if [ X${ExeNameIn} = X\"\" ] ; then
-	  # If there is no exe file for this component
-	  (( ExeSize=0 ))
-	else
-	  eval LS_bin=${R_EXE}/${ExeNameIn}
-	  IGCM_sys_FileSize ${LS_bin} ExeSize
-
-	  set +A LS_comp -- $( LC_TIME=en_US ls -l ${LS_bin} )
-	  if [ X${ExeDate} = X ] ; then 
-	    # First component exe date
-	    ExeDate=${comp}_${LS_comp[5]}_${LS_comp[6]}
-	  else
-	    ExeDate=${ExeDate}-${comp}_${LS_comp[5]}_${LS_comp[6]}
-	  fi
-	  ExeDate=${ExeDate}_${LS_comp[7]}
-	fi
-
-	if [ ${i} -eq 0 ] ; then
-	  # First component
-	  NextExeSize="( "${ExeSize}
-	else
-	  NextExeSize=${NextExeSize}", "${ExeSize}
-	fi
-	eval LastCompExeSize=${run_Log_LastExeSize[$i]}
-	(( i=i+1 ))
-
-	if [ ${ExeSize} -ne ${LastCompExeSize} ] ; then
-	  if ( ${FirstInitialize} ) ; then
-	    IGCM_debug_Print 1 "Save first ${ExeNameIn} in ${R_OUT_EXE} !"
-	  else
-	    IGCM_debug_Print 1 "${ExeNameIn} has changed in ${R_EXE} !"
-	    IGCM_debug_Print 1 "Save latest ${ExeNameIn} in ${R_OUT_EXE} !"
-	    eval FileToBeDeleted[${#FileToBeDeleted[@]}]=${ExeNameOut}
-	  fi
-	  eval IGCM_sys_Put_Out ${ExeNameOut} ${R_OUT_EXE}/${PREFIX}_${ExeNameIn} rw
-	  UpdateExe=true
-
-	  IGCM_sys_GetDate_FichWork ${LS_bin} ExeSecDate
-	  if [ $ExeSecDateMax -lt $ExeSecDate ] ; then
-	    ExeSecDateMax=$ExeSecDate
-	  fi
-	fi
-      done
+  ExeDate=""
+  NextExeSize="( "
+  (( i=0 ))
+  UpdateExe=false
+  (( ExeSecDateMax = 0 ))
+  for comp in ${config_ListOfComponents[*]} ; do
+
+    IGCM_debug_Print 3 ${comp}
+
+    eval ExeNameIn=\${config_Executable_${comp}[0]}
+    eval ExeNameOut=\${config_Executable_${comp}[1]}
+        # Only if we really have an executable for the component :
+    if [ X${ExeNameIn} = X\"\" ] ; then
+          # If there is no exe file for this component
+      (( ExeSize=0 ))
+    else
+      eval LS_bin=${R_EXE}/${ExeNameIn}
+      IGCM_sys_FileSize ${LS_bin} ExeSize
+
+      set +A LS_comp -- $( LC_TIME=en_US ls -l ${LS_bin} )
+      if [ X${ExeDate} = X ] ; then
+            # First component exe date
+        ExeDate=${comp}_${LS_comp[5]}_${LS_comp[6]}
+      else
+        ExeDate=${ExeDate}-${comp}_${LS_comp[5]}_${LS_comp[6]}
+      fi
+      ExeDate=${ExeDate}_${LS_comp[7]}
+    fi
+
+    if [ ${i} -eq 0 ] ; then
+          # First component
+      NextExeSize="( "${ExeSize}
+    else
+      NextExeSize=${NextExeSize}", "${ExeSize}
+    fi
+    eval LastCompExeSize=${run_Log_LastExeSize[$i]}
+    (( i=i+1 ))
+
+    if [ ${ExeSize} -ne ${LastCompExeSize} ] ; then
+      if ( ${FirstInitialize} ) ; then
+        IGCM_debug_Print 1 "Save first ${ExeNameIn} in ${R_OUT_EXE} !"
+      else
+        IGCM_debug_Print 1 "${ExeNameIn} has changed in ${R_EXE} !"
+        IGCM_debug_Print 1 "Save latest ${ExeNameIn} in ${R_OUT_EXE} !"
+        eval FileToBeDeleted[${#FileToBeDeleted[@]}]=${ExeNameOut}
+      fi
+      eval IGCM_sys_Put_Out ${ExeNameOut} ${R_OUT_EXE}/${PREFIX}_${ExeNameIn} rw
+      UpdateExe=true
+
+      IGCM_sys_GetDate_FichWork ${LS_bin} ExeSecDate
+      if [ $ExeSecDateMax -lt $ExeSecDate ] ; then
+        ExeSecDateMax=$ExeSecDate
+      fi
+    fi
+  done
 
 # SD : switch off for now
@@ -899,97 +899,97 @@
 #      fi
 
-      NextExeSize=${NextExeSize}" )"
-      IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Log LastExeSize "${NextExeSize}"
-
-      if [ ${DRYRUN} -le 1 ] ; then
-	tail -1500 ${Exe_Output} > ${Exe_Output}_tail.txt
-	ExeCpuLog=$( gawk -f ${libIGCM}/libIGCM_sys/IGCM_add_out.awk ${Exe_Output}_tail.txt )
-	RET=$?
-	if [ $RET -eq 0 ] ; then
-	  # ExeCpuLog variable contents 5 fields
-	  echo "${CumulPeriod} ${PeriodDateBegin} ${PeriodDateEnd} ${ExeCpuLog} ${ExeDate}" |   \
-	    gawk '{printf("# %11d | %15s | %15s | %19s | %19s | %15.5f | %15.5f | %15.5f | %s\n", \
+  NextExeSize=${NextExeSize}" )"
+  IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Log LastExeSize "${NextExeSize}"
+
+  if [ ${DRYRUN} -le 1 ] ; then
+    tail -1500 ${Exe_Output} > ${Exe_Output}_tail.txt
+    ExeCpuLog=$( gawk -f ${libIGCM}/libIGCM_sys/IGCM_add_out.awk ${Exe_Output}_tail.txt )
+    RET=$?
+    if [ $RET -eq 0 ] ; then
+          # ExeCpuLog variable contents 5 fields
+      echo "${CumulPeriod} ${PeriodDateBegin} ${PeriodDateEnd} ${ExeCpuLog} ${ExeDate}" |   \
+        gawk '{printf("# %11d | %15s | %15s | %19s | %19s | %15.5f | %15.5f | %15.5f | %s\n", \
             $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/run.card
-	fi
-	eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}_tail.txt"
-      fi
+    fi
+    eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}_tail.txt"
+  fi
 
       # All was right ? no ? then we stop.
-      IGCM_debug_Verif_Exit
+  IGCM_debug_Verif_Exit
 
       # If all was OK, we can delete all files not necessary for next Job
-      echo
-      IGCM_debug_Print 1 "Files that will be deleted before next period-run : "
-
-      if [ ${DRYRUN} -le 2 ] ; then
-	for f in ${FileToBeDeleted[@]} ; do [ -f ${f} ] && ls -la $f ; [ -f ${f} ] && rm -f $f ; done
-      else
-	echo ${FileToBeDeleted[@]}
-      fi
+  echo
+  IGCM_debug_Print 1 "Files that will be deleted before next period-run : "
+
+  if [ ${DRYRUN} -le 2 ] ; then
+    for f in ${FileToBeDeleted[@]} ; do [ -f ${f} ] && ls -la $f ; [ -f ${f} ] && rm -f $f ; done
+  else
+    echo ${FileToBeDeleted[@]}
+  fi
 
       #=================================================#
-      #         Modification of libIGCM behaviour       #
+      #		Modification of libIGCM behaviour	#
       #=================================================#
 
       # To use this function, one must copy libIGCM.card from ${libIGCM} directory
       # and put it in ${SUBMIT_DIR} directory. After modifications of ${SUBMIT_DIR}/libIGCM.card,
-      # variables define inside [UserChanges] will be modified for next Period of libIGCM main loop. 
-      if [ -f ${SUBMIT_DIR}/libIGCM.card ] ; then
-	echo
-	echo "########################################################################"
-	echo "!!!                 Modification of libIGCM behaviour                !!!"
-	echo
-
-	IGCM_debug_Print 1 "DefineArrayFromOption  : libIGCM_UserChanges in libIGCM.card"
-	IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/libIGCM.card UserChanges
-	IGCM_debug_Print 2 "libIGCM_UserChanges" ${libIGCM_UserChanges[*]}
-
-	# Special treatments for libIGCM internals
-	for option in ${libIGCM_UserChanges[*]} ; do
-          IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/libIGCM.card UserChanges ${option}
-
-	  echo "We will change : ${option}."
-	  eval echo "Previous value : " \${${option}}
-	  eval echo "Change to : " \${libIGCM_UserChanges_${option}}
-	  
-	  eval ${option}=\${libIGCM_UserChanges_${option}}
-
-	  case ${option} in
-	  config_UserChoices_DateEnd)
-	  IGCM_debug_PrintVariables 1 config_UserChoices_DateEnd
-	  DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
+      # variables define inside [UserChanges] will be modified for next Period of libIGCM main loop.
+  if [ -f ${SUBMIT_DIR}/libIGCM.card ] ; then
+    echo
+    echo "########################################################################"
+    echo "!!!                 Modification of libIGCM behaviour                !!!"
+    echo
+
+    IGCM_debug_Print 1 "DefineArrayFromOption  : libIGCM_UserChanges in libIGCM.card"
+    IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/libIGCM.card UserChanges
+    IGCM_debug_Print 2 "libIGCM_UserChanges" ${libIGCM_UserChanges[*]}
+
+        # Special treatments for libIGCM internals
+    for option in ${libIGCM_UserChanges[*]} ; do
+      IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/libIGCM.card UserChanges ${option}
+
+      echo "We will change : ${option}."
+      eval echo "Previous value : " \${${option}}
+      eval echo "Change to : " \${libIGCM_UserChanges_${option}}
+
+      eval ${option}=\${libIGCM_UserChanges_${option}}
+
+      case ${option} in
+      config_UserChoices_DateEnd)
+        IGCM_debug_PrintVariables 1 config_UserChoices_DateEnd
+        DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
 
           # Period Length In Days between DateBegin and DateEnd
-	  (( ExperienceLengthInDays=$( IGCM_date_DaysBetweenGregorianDate ${DateEnd} ${DateBegin} )  + 1 ))
-	  if [ ${ExperienceLengthInDays} -lt 0 ] ; then
-	    IGCM_debug_Print 1 "Problem with dates in libIGCM.card : ${DateEnd} < ${DateBegin} ! You must check that."
-	    IGCM_debug_Exit "IGCM_PeriodEnd" " Wrong Dates."
-	    IGCM_debug_Verif_Exit 
-	  fi
-	  ;;
-	  config_UserChoices_PeriodLength)
-	IGCM_debug_Print 1  "Change config_UserChoices_PeriodLength=${config_UserChoices_PeriodLength}"
-	;;
-	PeriodNb)
-	      IGCM_debug_Print 1  "Loop in main Job with ${PeriodNb} period(s)"
-	      ;;
-	      config_Post_RebuildFrequency)
-	    IGCM_debug_Print 1  "Change config_Post_RebuildFrequency=${config_Post_RebuildFrequency} : IGCM_post_Configure"
-	    IGCM_post_Configure
-	    ;;
-	    config_Post_TimeSeriesFrequency)
-    IGCM_debug_Print 1  "Change config_Post_TimeSeriesFrequency = ${config_Post_TimeSeriesFrequency} : IGCM_post_Initialize"
-    IGCM_post_Configure
-    ;;
-    config_Post_SeasonalFrequency)
-  IGCM_debug_Print 1  "Change config_Post_SeasonalFrequency = ${config_Post_SeasonalFrequency} : IGCM_post_Initialize"
-  IGCM_post_Configure
-  ;;
-  esac
-  done
-
-  echo
-  echo "########################################################################"
-  echo
+        (( ExperienceLengthInDays=$( IGCM_date_DaysBetweenGregorianDate ${DateEnd} ${DateBegin} )  + 1 ))
+        if [ ${ExperienceLengthInDays} -lt 0 ] ; then
+          IGCM_debug_Print 1 "Problem with dates in libIGCM.card : ${DateEnd} < ${DateBegin} ! You must check that."
+          IGCM_debug_Exit "IGCM_PeriodEnd" " Wrong Dates."
+          IGCM_debug_Verif_Exit
+        fi
+        ;;
+      config_UserChoices_PeriodLength)
+        IGCM_debug_Print 1  "Change config_UserChoices_PeriodLength=${config_UserChoices_PeriodLength}"
+        ;;
+      PeriodNb)
+        IGCM_debug_Print 1  "Loop in main Job with ${PeriodNb} period(s)"
+        ;;
+      config_Post_RebuildFrequency)
+        IGCM_debug_Print 1  "Change config_Post_RebuildFrequency=${config_Post_RebuildFrequency} : IGCM_post_Configure"
+        IGCM_post_Configure
+        ;;
+      config_Post_TimeSeriesFrequency)
+        IGCM_debug_Print 1  "Change config_Post_TimeSeriesFrequency = ${config_Post_TimeSeriesFrequency} : IGCM_post_Initialize"
+        IGCM_post_Configure
+        ;;
+      config_Post_SeasonalFrequency)
+        IGCM_debug_Print 1  "Change config_Post_SeasonalFrequency = ${config_Post_SeasonalFrequency} : IGCM_post_Initialize"
+        IGCM_post_Configure
+        ;;
+      esac
+    done
+
+    echo
+    echo "########################################################################"
+    echo
   fi
 
@@ -1024,5 +1024,5 @@
 
   #=================================================#
-  #             Write updated run.card              #
+  #		Write updated run.card              #
   #=================================================#
 
@@ -1094,5 +1094,5 @@
     ls -la
   fi
-  
+
   # Clean ${RUN_DIR}=${RUN_DIR_PATH}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
   # Only for production run (No clean up in DEV or DEB mode)
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh	(revision 618)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh	(revision 619)
@@ -1,3 +1,3 @@
-#!/bin/ksh 
+#!/bin/ksh
 
 #**************************************************************
@@ -14,5 +14,5 @@
 #=========================================================
 # The documentation of this file can be automatically generated
-# if you use the prefix #D- for comments to be extracted. 
+# if you use the prefix #D- for comments to be extracted.
 # Extract with command: cat lib* | grep "^#D-" | cut -c "4-"
 #=========================================================
@@ -22,5 +22,5 @@
 #D-#==================================================
 #D-
-#D- This ksh library if a layer under some usefull 
+#D- This ksh library if a layer under some usefull
 #D-environment variables and shell commands.
 #D-All those definitions depend on host particularities.
@@ -62,5 +62,5 @@
 
 #=====================================================
-# Host and user names 
+# Host and user names
 # $hostname ou hostname
 typeset  HOST=${HOST:=$( hostname )}
@@ -101,9 +101,9 @@
 #====================================================
 #- ARCHIVE
-# modified 17/10/2011 /u to be used for file stored on gaya 
-if (tty -s ) then  
-    typeset -r ARCHIVE=${HOMEGAYA} 
-else 
-    typeset -r ARCHIVE=$(echo ${HOMEGAYA}|sed 's,/homegaya/,/u/',) 
+# modified 17/10/2011 /u to be used for file stored on gaya
+if (tty -s ) then
+  typeset -r ARCHIVE=${HOMEGAYA}
+else
+  typeset -r ARCHIVE=$(echo ${HOMEGAYA}|sed 's,/homegaya/,/u/',)
 fi
 
@@ -118,4 +118,8 @@
 
 #====================================================
+#- R_BUF  Buffer to pack files stored on Master
+typeset -r R_BUF=${WORKDIR}/IGCM_OUT
+
+#====================================================
 #- OUT_POST
 typeset -r R_OUT_POST=${WORKDIR}/IGCM_OUT
@@ -136,6 +140,6 @@
 function IGCM_sys_RshMaster {
     #set -vx
-    IGCM_debug_PushStack "IGCM_sys_RshMaster" $@
-    rsh ${MASTER} exec /bin/ksh <<-EOF
+  IGCM_debug_PushStack "IGCM_sys_RshMaster" $@
+  rsh ${MASTER} exec /bin/ksh <<-EOF
     export libIGCM=${libIGCM_SX}
     export DEBUG_debug=${DEBUG_debug}
@@ -144,9 +148,9 @@
     ${@}
 EOF
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_RshMaster : erreur."
-	IGCM_debug_Exit "IGCM_sys_RshMaster"
-    fi
-    IGCM_debug_PopStack "IGCM_sys_RshMaster"
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_RshMaster : erreur."
+    IGCM_debug_Exit "IGCM_sys_RshMaster"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_RshMaster"
 }
 
@@ -157,13 +161,13 @@
 #D-
 function IGCM_sys_RshArchive {
-    IGCM_debug_PushStack "IGCM_sys_RshArchive" $@
-    /bin/ksh <<-EOF
+  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"
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_RshArchive : erreur."
+    IGCM_debug_Exit "IGCM_sys_RshArchive"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_RshArchive"
 }
 
@@ -174,14 +178,14 @@
 #D-
 function IGCM_sys_RshPost {
-    IGCM_debug_PushStack "IGCM_sys_RshPost" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_RshPost :" $@
-    fi
-    /bin/ksh ${@}
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_RshPost : erreur."
-	IGCM_debug_Exit "IGCM_sys_RshPost"
-    fi
-    IGCM_debug_PopStack "IGCM_sys_RshPost"
+  IGCM_debug_PushStack "IGCM_sys_RshPost" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_RshPost :" $@
+  fi
+  /bin/ksh ${@}
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_RshPost : erreur."
+    IGCM_debug_Exit "IGCM_sys_RshPost"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_RshPost"
 }
 
@@ -192,15 +196,15 @@
 #D-
 function IGCM_sys_SendMail {
-    IGCM_debug_PushStack "IGCM_sys_SendMailPost" $@
-    if ( $DEBUG_sys ) ; then
-       echo "IGCM_sys_SendMail :" $@
-    fi
-
-    if ( ${ExitFlag} ) ; then
-	status=failed
-    else
-	status=completed
-    fi
-    cat  << END_MAIL > job_end.mail
+  IGCM_debug_PushStack "IGCM_sys_SendMailPost" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_SendMail :" $@
+  fi
+
+  if ( ${ExitFlag} ) ; then
+    status=failed
+  else
+    status=completed
+  fi
+  cat  << END_MAIL > job_end.mail
 Dear ${LOGIN},
 
@@ -212,15 +216,15 @@
 END_MAIL
 
-    if [ ! -z ${config_UserChoices_MailName} ] ; then
-	mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < job_end.mail
-    elif [ -f ~/.forward ] ; then
-	mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail
-    fi
-
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_SendMail : erreur."
-	IGCM_debug_Exit "IGCM_sys_SendMail"
-    fi
-    IGCM_debug_PopStack "IGCM_sys_SendMail"
+  if [ ! -z ${config_UserChoices_MailName} ] ; then
+    mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < job_end.mail
+  elif [ -f ~/.forward ] ; then
+    mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail
+  fi
+
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_SendMail : erreur."
+    IGCM_debug_Exit "IGCM_sys_SendMail"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_SendMail"
 }
 
@@ -231,21 +235,21 @@
 #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
+  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"
+  if [ ! -d ${1} ] ; then
+    echo "IGCM_sys_Mkdir : erreur."
+    IGCM_debug_Exit "IGCM_sys_Mkdir"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Mkdir"
 }
 
@@ -256,17 +260,17 @@
 #D-
 function IGCM_sys_MkdirArchive {
-    IGCM_debug_PushStack "IGCM_sys_MkdirArchive" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_MkdirArchive :" $@
-    fi
+  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"
+  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"
 }
 
@@ -277,17 +281,17 @@
 #D-
 function IGCM_sys_MkdirWork {
-    IGCM_debug_PushStack "IGCM_sys_MkdirWork" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_MkdirWork :" $@
-    fi
+  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"
+  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"
 }
 
@@ -298,14 +302,14 @@
 #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"
+  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"
 }
 
@@ -316,18 +320,18 @@
 #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"
+  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"
 }
 
@@ -338,14 +342,14 @@
 #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"
+  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"
 }
 
@@ -356,13 +360,13 @@
 #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}
+  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}
 }
 
@@ -373,15 +377,15 @@
 #D-
 function IGCM_sys_TestDirArchive {
-    IGCM_debug_PushStack "IGCM_sys_TestDirArchive" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_TestDirArchive :" $@
-    fi
-    typeset ExistFlag DirNameToTest 
-    # modified 17/10/2011 /u is not known on ulam, use /homegaya instead to test dir locally on ulam 
-    DirNameToTest=$(echo $1 | sed 's,/u/,/homegaya/,') 
-    ExistFlag=$( [ -d ${DirNameToTest} ] && echo 0 || echo 1 )
-    IGCM_debug_PopStack "IGCM_sys_TestDirArchive"
-
-    return ${ExistFlag}
+  IGCM_debug_PushStack "IGCM_sys_TestDirArchive" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_TestDirArchive :" $@
+  fi
+  typeset ExistFlag DirNameToTest
+    # modified 17/10/2011 /u is not known on ulam, use /homegaya instead to test dir locally on ulam
+  DirNameToTest=$(echo $1 | sed 's,/u/,/homegaya/,')
+  ExistFlag=$( [ -d ${DirNameToTest} ] && echo 0 || echo 1 )
+  IGCM_debug_PopStack "IGCM_sys_TestDirArchive"
+
+  return ${ExistFlag}
 }
 
@@ -392,15 +396,15 @@
 #D-
 function IGCM_sys_TestFileArchive {
-    IGCM_debug_PushStack "IGCM_sys_TestFileArchive" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_TestFileArchive :" $@
-    fi
-    typeset ExistFlag FileNameToTest 
-    # modified 17/10/2011 /u is not known on ulam, use /homegaya instead to test dir locally on ulam 
-    FileNameToTest=$(echo $1 | sed 's,/u/,/homegaya/,') 
-    ExistFlag=$( IGCM_sys_RshArchive "[ -f ${FileNameToTest} ] && echo 0 || echo 1" ) 
-    IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
-
-    return ${ExistFlag}
+  IGCM_debug_PushStack "IGCM_sys_TestFileArchive" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_TestFileArchive :" $@
+  fi
+  typeset ExistFlag FileNameToTest
+    # modified 17/10/2011 /u is not known on ulam, use /homegaya instead to test dir locally on ulam
+  FileNameToTest=$(echo $1 | sed 's,/u/,/homegaya/,')
+  ExistFlag=$( IGCM_sys_RshArchive "[ -f ${FileNameToTest} ] && echo 0 || echo 1" )
+  IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
+
+  return ${ExistFlag}
 }
 
@@ -411,10 +415,10 @@
 #D-
 function IGCM_sys_CountFileArchive {
-    IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@
-    IGCM_sys_RshArchive "ls ${@} 2>/dev/null | wc -l"
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_CountFileArchive : erreur."
-    fi
-    IGCM_debug_PopStack "IGCM_sys_CountFileArchive"
+  IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@
+  IGCM_sys_RshArchive "ls ${@} 2>/dev/null | wc -l"
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_CountFileArchive : erreur."
+  fi
+  IGCM_debug_PopStack "IGCM_sys_CountFileArchive"
 }
 
@@ -425,12 +429,12 @@
 #D-
 function IGCM_sys_Tree {
-    IGCM_debug_PushStack "IGCM_sys_Tree" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_Tree :" $@
-    fi
-
-    \mfls -r $@
-
-    IGCM_debug_PopStack "IGCM_sys_Tree"
+  IGCM_debug_PushStack "IGCM_sys_Tree" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_Tree :" $@
+  fi
+
+  \mfls -r $@
+
+  IGCM_debug_PopStack "IGCM_sys_Tree"
 }
 
@@ -441,16 +445,16 @@
 #D-
 function IGCM_sys_Tar {
-    IGCM_debug_PushStack "IGCM_sys_Tar" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_Tar :" $@
-    fi
-    \tar cvf $@
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_Tar : erreur."
-	IGCM_debug_Exit "IGCM_sys_Tar"
-    fi
-    \tar tvf $1
-
-    IGCM_debug_PopStack "IGCM_sys_Tar"
+  IGCM_debug_PushStack "IGCM_sys_Tar" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_Tar :" $@
+  fi
+  \tar cvf $@
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_Tar : erreur."
+    IGCM_debug_Exit "IGCM_sys_Tar"
+  fi
+  \tar tvf $1
+
+  IGCM_debug_PopStack "IGCM_sys_Tar"
 }
 
@@ -461,14 +465,14 @@
 #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"
+  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"
 }
 
@@ -479,20 +483,20 @@
 #D-
 function IGCM_sys_QsubPost {
-    IGCM_debug_PushStack "IGCM_sys_QsubPost" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_QsubPost :" $@
-    fi
-    cd ${POST_DIR}
-    /opt/ibmll/LoadL/full/bin/llsubmit ${libIGCM}/$1.job
-    cd -
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_QsubPost : erreur " $@
-	IGCM_debug_Exit "IGCM_sys_QsubPost"
-    fi
-    IGCM_debug_PopStack "IGCM_sys_QsubPost"
+  IGCM_debug_PushStack "IGCM_sys_QsubPost" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_QsubPost :" $@
+  fi
+  cd ${POST_DIR}
+  /opt/ibmll/LoadL/full/bin/llsubmit ${libIGCM}/$1.job
+  cd -
+  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- File transfer functions
 #D-*************************
 #D-
@@ -504,108 +508,108 @@
 #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
-}
-    
+  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_Cp
@@ -614,21 +618,21 @@
 #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"
+  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"
 }
 
@@ -639,21 +643,21 @@
 #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"
+  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"
 }
 
@@ -665,10 +669,10 @@
 #D-
 function IGCM_sys_RmRunDir {
-    IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_RmRunDir :" $@
-	echo "Dummy call, let the scheduler do that."
-    fi
-    IGCM_debug_PopStack "IGCM_sys_RmRunDir"
+  IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_RmRunDir :" $@
+    echo "Dummy call, let the scheduler do that."
+  fi
+  IGCM_debug_PopStack "IGCM_sys_RmRunDir"
 }
 
@@ -679,27 +683,27 @@
 #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"
+  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"
 }
 
@@ -710,37 +714,37 @@
 #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
-	rcp -r $1 gaya:$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
-
-	# due to rcommand latency
-	sleep 10
-
-    else
-	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-    fi
-    IGCM_debug_PopStack "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
+    rcp -r $1 gaya:$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
+
+        # due to rcommand latency
+    sleep 10
+
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Put_Dir"
 }
 
@@ -751,30 +755,30 @@
 #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
+  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
+#           echo "WARNING : IGCM_sys_Get_Dir ${1} DOES NOT EXIST ."
+#           IGCM_debug_PopStack "IGCM_sys_Get_Dir"
+#           return
 #	fi
 
-	typeset RET
-
-	#USUAL WAY
-	rcp -rp gaya:$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"
+    typeset RET
+
+        #USUAL WAY
+    rcp -rp gaya:$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"
 }
 
@@ -785,31 +789,31 @@
 #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
-	TEST=$( IGCM_sys_RshMaster [ -d $1 ] && echo 1 || echo 0 )
-	if [ ${TEST} -ne 1 ] ; then
-	    echo "WARNING : IGCM_sys_Get_Master ${1} DOES NOT EXIST ON ${MASTER}."
-	    IGCM_debug_PopStack "IGCM_sys_Get_Master"
-	    return
-	fi
-
-	typeset RET
-
-	#USUAL WAY
-	rcp -r ${MASTER}:$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"
+  IGCM_debug_PushStack "IGCM_sys_Get_Master" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_Get_Master :" $@
+  fi
+  if [ $DRYRUN = 0 ]; then
+    TEST=$( IGCM_sys_RshMaster [ -d $1 ] && echo 1 || echo 0 )
+    if [ ${TEST} -ne 1 ] ; then
+      echo "WARNING : IGCM_sys_Get_Master ${1} DOES NOT EXIST ON ${MASTER}."
+      IGCM_debug_PopStack "IGCM_sys_Get_Master"
+      return
+    fi
+
+    typeset RET
+
+        #USUAL WAY
+    rcp -r ${MASTER}:$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"
 }
 
@@ -820,62 +824,62 @@
 #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
-
-	typeset RET
-	#
-	if [ X${JobType} = XRUN ] ; then
-	    if [ X${3} = X ] ; then
-		IGCM_sys_Chmod 444 ${1}
-	    fi
-	fi
-	#
-	#
-	# USUAL WAY
-	mfput $1 $2 > out_rsync 2>&1
-	RET=$?
-
-# 	#RSYNC WITH NETWORK RSH CALL
-# 	echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${RHOST}:${2} > out_rsync 2>&1
-# 	${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${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_Print 1 "mfput failed. Make a second try :"
-	    #
-	    mfput $1 $2 > out_rsync 2>&1
-	    RET=$?
-	    #
-	    if [ ${RET} -gt 0 ] ; then
-		echo "IGCM_sys_Put_Out : error."
-		IGCM_debug_Print 1 "mfput failed twice. You have a problem"
-		cat out_rsync
-		IGCM_debug_Exit "IGCM_sys_Put_Out"
-	    fi
-	fi
-    else
-	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-    fi
-    IGCM_debug_PopStack "IGCM_sys_Put_Out"
-    return 0
+  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
+
+    typeset RET
+        #
+    if [ X${JobType} = XRUN ] ; then
+      if [ X${3} = X ] ; then
+        IGCM_sys_Chmod 444 ${1}
+      fi
+    fi
+        #
+        #
+        # USUAL WAY
+    mfput $1 $2 > out_rsync 2>&1
+    RET=$?
+
+#       #RSYNC WITH NETWORK RSH CALL
+#       echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${RHOST}:${2} > out_rsync 2>&1
+#       ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${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_Print 1 "mfput failed. Make a second try :"
+            #
+      mfput $1 $2 > out_rsync 2>&1
+      RET=$?
+            #
+      if [ ${RET} -gt 0 ] ; then
+        echo "IGCM_sys_Put_Out : error."
+        IGCM_debug_Print 1 "mfput failed twice. You have a problem"
+        cat out_rsync
+        IGCM_debug_Exit "IGCM_sys_Put_Out"
+      fi
+    fi
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Put_Out"
+  return 0
 }
 
@@ -886,65 +890,65 @@
 #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
-
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_Get :" $@
-    fi
-    if [ $DRYRUN -le 2 ]; then
-	if [ X${1} = X'/l' ] ; then
+  IGCM_debug_PushStack "IGCM_sys_Get" $@
+
+  typeset DEST RET dm_liste ifile target
+
+  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
-	    dm_liste=${1}
-	fi
-	eval DEST=\${${#}}
-
-	# test if the (first) file is present in the old computation :
-	IGCM_sys_TestFileArchive ${dm_liste[0]}
-	RET=$?
+      eval set +A dm_liste \${${2}}
+    else
+      dm_liste=${1}
+    fi
+    eval DEST=\${${#}}
+
+        # 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
-
-	# SD : dm_liste is not suited for computing job
-	#      because we change filename during transfert
-	#      dm_liste is better suited for post-treatment
-	# SD : dm_liste necessary only with RSYNC
-
-	#dm_liste=" "
-  	#(( ifile=1 ))
-	#while [ $ifile -lt $# ] ; do
-	#    dm_liste=$( eval echo ${dm_liste[*]} " "\${${ifile}} )
-	#    (( ifile = ifile + 1 ))
-	#done
-	#DEST=$( eval echo \${${#}} )
-
-	#USUAL WAY
-	mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1
-
-# 	#RSYNC WITH NETWORK RSH CALL
-# 	echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RHOST}:"${dm_liste}" ${RHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
-# 	${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${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+$? ))
-
-    else
-	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-    fi
-    IGCM_debug_PopStack "IGCM_sys_Get"
-}
+          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
+
+        # SD : dm_liste is not suited for computing job
+        #      because we change filename during transfert
+        #      dm_liste is better suited for post-treatment
+        # SD : dm_liste necessary only with RSYNC
+
+        #dm_liste=" "
+        #(( ifile=1 ))
+        #while [ $ifile -lt $# ] ; do
+        #    dm_liste=$( eval echo ${dm_liste[*]} " "\${${ifile}} )
+        #    (( ifile = ifile + 1 ))
+        #done
+        #DEST=$( eval echo \${${#}} )
+
+        #USUAL WAY
+        mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1
+
+#       #RSYNC WITH NETWORK RSH CALL
+#       echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RHOST}:"${dm_liste}" ${RHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
+#       ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${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+$? ))
+
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Get"
+      }
 
 #D-#==================================================
@@ -953,40 +957,40 @@
 #D-* Examples:
 #D-
-function IGCM_sys_Put_Dods {
-    IGCM_debug_PushStack "IGCM_sys_Put_Dods" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_Put_Dods :" $@
-    fi
-    if [ $DRYRUN = 0 ]; then
-	# We take our time on that
-	sleep 10
-	IGCM_sys_TestDirArchive ${R_SAVE}/${1} 
-	if [ $? != 0 ] ; then
-	    echo "WARNING : IGCM_sys_Put_Dods ${R_SAVE}/${1} DOES NOT EXIST ."
-	    IGCM_debug_PopStack "IGCM_sys_Put_Dods"
-	    return
-	fi
-
-	typeset RET
-	#
-	rsh gaya exec /bin/ksh <<EOF
-        cd ${R_SAVE}
-        /usr/local/bin/dods_rm DODS/pub/${LOGIN}/${R_DODS}/${1} > /dev/null 2>&1
-        /bin/chmod -R u+w ${R_SAVE}/${1}
-        /usr/local/bin/dods_cp ${1} DODS/pub/${LOGIN}/${R_DODS} > /dev/null 2>&1
-        /bin/chmod -R +rX ${R_SAVE}/${1}
-	/bin/chmod -R u+w ${R_SAVE}/${1}
-EOF
-        RET=$?
-
-	if [ ${RET} -gt 0 ] ; then
-	    echo "IGCM_sys_Put_Dods : error."
-	    IGCM_debug_Exit "IGCM_sys_Put_Dods"
-	fi
-    else
-	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-    fi
-    IGCM_debug_PopStack "IGCM_sys_Put_Dods"
-}
+      function IGCM_sys_Put_Dods {
+        IGCM_debug_PushStack "IGCM_sys_Put_Dods" $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_Put_Dods :" $@
+        fi
+        if [ $DRYRUN = 0 ]; then
+        # We take our time on that
+          sleep 10
+          IGCM_sys_TestDirArchive ${R_SAVE}/${1}
+          if [ $? != 0 ] ; then
+            echo "WARNING : IGCM_sys_Put_Dods ${R_SAVE}/${1} DOES NOT EXIST ."
+            IGCM_debug_PopStack "IGCM_sys_Put_Dods"
+            return
+          fi
+
+          typeset RET
+        #
+          rsh gaya exec /bin/ksh <<EOF
+          cd ${R_SAVE}
+          /usr/local/bin/dods_rm DODS/pub/${LOGIN}/${R_DODS}/${1} > /dev/null 2>&1
+          /bin/chmod -R u+w ${R_SAVE}/${1}
+          /usr/local/bin/dods_cp ${1} DODS/pub/${LOGIN}/${R_DODS} > /dev/null 2>&1
+          /bin/chmod -R +rX ${R_SAVE}/${1}
+          /bin/chmod -R u+w ${R_SAVE}/${1}
+          EOF
+          RET=$?
+
+          if [ ${RET} -gt 0 ] ; then
+            echo "IGCM_sys_Put_Dods : error."
+            IGCM_debug_Exit "IGCM_sys_Put_Dods"
+          fi
+        else
+          ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+        fi
+        IGCM_debug_PopStack "IGCM_sys_Put_Dods"
+      }
 
 ############################################################## A FINIR !!
@@ -997,276 +1001,276 @@
 #D-* Examples:
 #D-
-function IGCM_sys_GetDate_FichWork {
-    IGCM_debug_PushStack "IGCM_sys_FichWork" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_GetDate_FichWork :" $@
-    fi
+      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"
-}
+        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"
-}
+#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/rech/psl/rpsl035/bin/rebuild -f -o $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_rebuild : erreur ${@}."
-       IGCM_debug_Exit "rebuild"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_rebuild"
-}
+      function IGCM_sys_rebuild {
+        IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_rebuild :" $@
+        fi
+        /home/rech/psl/rpsl035/bin/rebuild -f -o $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_rebuild : erreur ${@}."
+          IGCM_debug_Exit "rebuild"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_rebuild"
+      }
 ##############################################################
 # NCO OPERATOR
 
-function IGCM_sys_ncap2 {
-    IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncap2 :" $@
-    fi
-    ncap2 "$@"
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncap2 : erreur ${@}."
-       IGCM_debug_Exit "ncap2"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncap2"
-}
-
-function IGCM_sys_ncatted {
-    IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncatted :" $@
-    fi
-    ncatted "$@"
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncatted : erreur ${@}."
-       IGCM_debug_Exit "ncatted"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncatted"
-}
-
-function IGCM_sys_ncbo {
-    IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncbo :" $@
-    fi
-    ncbo $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncbo : erreur ${@}."
-       IGCM_debug_Exit "ncbo"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncbo"
-}
-
-function IGCM_sys_ncdiff {
-    IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncdiff :" $@
-    fi
-    ncdiff $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncdiff : erreur ${@}."
-       IGCM_debug_Exit "ncdiff"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncdiff"
-}
-
-function IGCM_sys_ncea {
-    IGCM_debug_PushStack "IGCM_sys_ncea" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncea :" $@
-    fi
-    ncea $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncea : erreur ${@}."
-       IGCM_debug_Exit "ncea"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncea"
-}
-
-function IGCM_sys_ncecat {
-    IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncecat :" $@
-    fi
-    ncecat $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncecat : erreur ${@}."
-       IGCM_debug_Exit "ncecat"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncecat"
-}
-
-function IGCM_sys_ncflint {
-    IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncflint :" $@
-    fi
-    ncflint $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncflint : erreur ${@}."
-       IGCM_debug_Exit "ncflint"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncflint"
-}
-
-function IGCM_sys_ncks {
-    IGCM_debug_PushStack "IGCM_sys_ncks" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncks :" $@
-    fi
-    ncks $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncks : erreur ${@}."
-       IGCM_debug_Exit "ncks"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncks"
-}
-
-function IGCM_sys_ncpdq {
-    IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncpdq :" $@
-    fi
-    ncpdq $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncpdq : erreur ${@}."
-       IGCM_debug_Exit "ncpdq"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncpdq"
-}
-
-function IGCM_sys_ncra {
-    IGCM_debug_PushStack "IGCM_sys_ncra" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncra :" $@
-    fi
-    ncra $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncra : erreur ${@}."
-       IGCM_debug_Exit "ncra"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncra"
-}
-
-function IGCM_sys_ncrcat {
-    IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncrcat :" $@
-    fi
-    ncrcat $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncrcat : erreur ${@}."
+      function IGCM_sys_ncap2 {
+        IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncap2 :" $@
+        fi
+        ncap2 "$@"
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncap2 : erreur ${@}."
+          IGCM_debug_Exit "ncap2"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncap2"
+      }
+
+      function IGCM_sys_ncatted {
+        IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncatted :" $@
+        fi
+        ncatted "$@"
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncatted : erreur ${@}."
+          IGCM_debug_Exit "ncatted"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncatted"
+      }
+
+      function IGCM_sys_ncbo {
+        IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncbo :" $@
+        fi
+        ncbo $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncbo : erreur ${@}."
+          IGCM_debug_Exit "ncbo"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncbo"
+      }
+
+      function IGCM_sys_ncdiff {
+        IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncdiff :" $@
+        fi
+        ncdiff $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncdiff : erreur ${@}."
+          IGCM_debug_Exit "ncdiff"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncdiff"
+      }
+
+      function IGCM_sys_ncea {
+        IGCM_debug_PushStack "IGCM_sys_ncea" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncea :" $@
+        fi
+        ncea $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncea : erreur ${@}."
+          IGCM_debug_Exit "ncea"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncea"
+      }
+
+      function IGCM_sys_ncecat {
+        IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncecat :" $@
+        fi
+        ncecat $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncecat : erreur ${@}."
+          IGCM_debug_Exit "ncecat"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncecat"
+      }
+
+      function IGCM_sys_ncflint {
+        IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncflint :" $@
+        fi
+        ncflint $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncflint : erreur ${@}."
+          IGCM_debug_Exit "ncflint"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncflint"
+      }
+
+      function IGCM_sys_ncks {
+        IGCM_debug_PushStack "IGCM_sys_ncks" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncks :" $@
+        fi
+        ncks $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncks : erreur ${@}."
+          IGCM_debug_Exit "ncks"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncks"
+      }
+
+      function IGCM_sys_ncpdq {
+        IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncpdq :" $@
+        fi
+        ncpdq $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncpdq : erreur ${@}."
+          IGCM_debug_Exit "ncpdq"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncpdq"
+      }
+
+      function IGCM_sys_ncra {
+        IGCM_debug_PushStack "IGCM_sys_ncra" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncra :" $@
+        fi
+        ncra $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncra : erreur ${@}."
+          IGCM_debug_Exit "ncra"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncra"
+      }
+
+      function IGCM_sys_ncrcat {
+        IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncrcat :" $@
+        fi
+        ncrcat $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncrcat : erreur ${@}."
 #       IGCM_debug_Exit "ncrcat"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncrcat"
-}
-
-function IGCM_sys_ncrename {
-    IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncrename :" $@
-    fi
-    ncrename $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncrename : erreur ${@}."
-       IGCM_debug_Exit "ncrename"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncrename"
-}
-
-function IGCM_sys_ncwa {
-    IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_ncwa :" $@
-    fi
-    ncwa $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_ncwa : erreur ${@}."
-       IGCM_debug_Exit "ncwa"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_ncwa"
-}
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncrcat"
+      }
+
+      function IGCM_sys_ncrename {
+        IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncrename :" $@
+        fi
+        ncrename $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncrename : erreur ${@}."
+          IGCM_debug_Exit "ncrename"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncrename"
+      }
+
+      function IGCM_sys_ncwa {
+        IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_ncwa :" $@
+        fi
+        ncwa $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_ncwa : erreur ${@}."
+          IGCM_debug_Exit "ncwa"
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_ncwa"
+      }
 
 ##############################################################
 # CDO OPERATOR
 
-function IGCM_sys_cdo {
-    IGCM_debug_PushStack "IGCM_sys_cdo" -- $@
-
-    \cdo $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_cdo : erreur ${@}."
-       IGCM_debug_PopStack "IGCM_sys_cdo"
-       return 1
-    else
-	IGCM_debug_PopStack "IGCM_sys_cdo"
-	return 0
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_cdo"
-}
+      function IGCM_sys_cdo {
+        IGCM_debug_PushStack "IGCM_sys_cdo" -- $@
+
+        \cdo $@
+        if [ $? -gt 0 ] ; then
+          echo "IGCM_sys_cdo : erreur ${@}."
+          IGCM_debug_PopStack "IGCM_sys_cdo"
+          return 1
+        else
+          IGCM_debug_PopStack "IGCM_sys_cdo"
+          return 0
+        fi
+
+        IGCM_debug_PopStack "IGCM_sys_cdo"
+      }
 
 ############################################################
 # 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
-    IGCM_debug_PopStack "IGCM_sys_activ_variables"
-}
+      function IGCM_sys_activ_variables {
+        IGCM_debug_PushStack "IGCM_sys_activ_variables"
+        if ( $DEBUG_sys ) ; then
+          echo "IGCM_sys_activ_variables"
+        fi
+        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"
-}
+      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
-    IGCM_debug_PopStack "IGCM_sys_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
+        IGCM_debug_PopStack "IGCM_sys_build_run_file"
+      }
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_vargas.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_vargas.ksh	(revision 618)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_vargas.ksh	(revision 619)
@@ -14,5 +14,5 @@
 #=========================================================
 # The documentation of this file can be automatically generated
-# if you use the prefix #D- for comments to be extracted. 
+# if you use the prefix #D- for comments to be extracted.
 # Extract with command: cat lib* | grep "^#D-" | cut -c "4-"
 #=========================================================
@@ -22,5 +22,5 @@
 #D-#==================================================
 #D-
-#D- This ksh library if a layer under some usefull 
+#D- This ksh library if a layer under some usefull
 #D-environment variables and shell commands.
 #D-All those definitions depend on host particularities.
@@ -62,5 +62,5 @@
 
 #=====================================================
-# Host and user names 
+# Host and user names
 # $hostname ou hostname
 typeset  HOST=${HOST:=$( hostname )}
@@ -100,5 +100,5 @@
 
 #====================================================
-#- Mirror libIGCM from vargas to ulam 
+#- Mirror libIGCM from vargas to ulam
 typeset -r MirrorlibIGCM=${MirrorlibIGCM:=true}
 
@@ -119,5 +119,9 @@
 
 #====================================================
-#- OUT_POST 
+#- R_BUF  Buffer to pack files
+typeset -r R_BUF=${WORKDIR}/IGCM_OUT
+
+#====================================================
+#- OUT_POST
 typeset -r R_OUT_POST=$( echo ${HOME} | sed -e "s/homegpfs/workdir/" )/IGCM_OUT
 
@@ -136,5 +140,14 @@
 #====================================================
 #- Max number of arguments passed to nco operator or demigration command
-UNIX_MAX_LIMIT=360
+UNIX_MAX_LIMIT=120
+
+#====================================================
+#- Default number of MPI task for IPSL coupled model
+#- required for backward compatibility
+#-
+DEFAULT_NUM_PROC_OCE=5
+DEFAULT_NUM_PROC_CPL=1
+DEFAULT_NUM_PROC_ATM=26
+DEFAULT_NUM_PROC_TOTAL=32
 
 #D-#==================================================
@@ -145,34 +158,34 @@
 (( RshMNum = 0 ))
 function IGCM_sys_RshMaster {
-    IGCM_debug_PushStack "IGCM_sys_RshMaster" $@
-
-    typeset THEFILE OUTFILE ERR
-
-    RshDIR=${WORKDIR}/RUN_DIR/${config_UserChoices_TagName}/${config_UserChoices_JobName}.${$}
-    if [ ! -d ${RshDIR} ] ; then
-	IGCM_sys_Mkdir ${RshDIR}
-    fi
-    THEFILE=${RshDIR}/file_sys_RshMaster_$$_${RshMNum}
-    echo '#!/bin/ksh' > ${THEFILE}
-    echo "export libIGCM=${libIGCM} > /dev/null 2>&1" >> ${THEFILE}
-    echo "export DEBUG_debug=${DEBUG_debug} > /dev/null 2>&1" >> ${THEFILE}
-    echo ". ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh > /dev/null 2>&1" >> ${THEFILE}
-    echo ". ${libIGCM}/libIGCM_card/libIGCM_card.ksh > /dev/null 2>&1" >> ${THEFILE}
-    echo "${@} " >> ${THEFILE}
+  IGCM_debug_PushStack "IGCM_sys_RshMaster" $@
+
+  typeset THEFILE OUTFILE ERR
+
+  RshDIR=${WORKDIR}/RUN_DIR/${config_UserChoices_TagName}/${config_UserChoices_JobName}.${$}
+  if [ ! -d ${RshDIR} ] ; then
+    IGCM_sys_Mkdir ${RshDIR}
+  fi
+  THEFILE=${RshDIR}/file_sys_RshMaster_$$_${RshMNum}
+  echo '#!/bin/ksh' > ${THEFILE}
+  echo "export libIGCM=${libIGCM} > /dev/null 2>&1" >> ${THEFILE}
+  echo "export DEBUG_debug=${DEBUG_debug} > /dev/null 2>&1" >> ${THEFILE}
+  echo ". ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh > /dev/null 2>&1" >> ${THEFILE}
+  echo ". ${libIGCM}/libIGCM_card/libIGCM_card.ksh > /dev/null 2>&1" >> ${THEFILE}
+  echo "${@} " >> ${THEFILE}
 
     # No frontend queue on brodie : just rsh the job on the frontend with submission.
-    sed -e "s@IGCM_sys_Qsub\(.*\)@\1@" ${THEFILE} > ${THEFILE}_
-
-    chmod u+x  ${THEFILE}_
-
-    OUTFILE=${RshDIR}/out_RshMaster.$$.${RshMNum}
-    (( RshMNum = RshMNum + 1 ))
-
-    rsh ${MASTER} 'bash -c "nohup '${THEFILE}'_ > '${OUTFILE}' 2>&1 &"'
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_RshMaster : erreur."
-	IGCM_debug_Exit "IGCM_sys_RshMaster"
-    fi
-    IGCM_debug_PopStack "IGCM_sys_RshMaster"
+  sed -e "s@IGCM_sys_Qsub\(.*\)@\1@" ${THEFILE} > ${THEFILE}_
+
+  chmod u+x  ${THEFILE}_
+
+  OUTFILE=${RshDIR}/out_RshMaster.$$.${RshMNum}
+  (( RshMNum = RshMNum + 1 ))
+
+  rsh ${MASTER} 'bash -c "nohup '${THEFILE}'_ > '${OUTFILE}' 2>&1 &"'
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_RshMaster : erreur."
+    IGCM_debug_Exit "IGCM_sys_RshMaster"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_RshMaster"
 }
 
@@ -183,13 +196,13 @@
 #D-
 function IGCM_sys_RshArchive {
-    IGCM_debug_PushStack "IGCM_sys_RshArchive" $@
-    rsh ${STOREHOST} exec /bin/ksh <<-EOF
+  IGCM_debug_PushStack "IGCM_sys_RshArchive" $@
+  rsh ${STOREHOST} exec /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"
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_RshArchive : erreur."
+    IGCM_debug_Exit "IGCM_sys_RshArchive"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_RshArchive"
 }
 
@@ -200,46 +213,46 @@
 #D-
 function IGCM_sys_RshPost {
-    IGCM_debug_PushStack "IGCM_sys_RshPost" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_RshPost :" $@
-    fi
-
-    # keep standard input to keep it for postpone if ulam don't answer
-    cat >/tmp/tmp_IGCM_sys_RshPost_$$_${LOGIN}
-
-    ## Add submission for old postponed files only if command is a Qsub
-    ##
-    ISITQSUB=0
-    grep Qsub /tmp/tmp_IGCM_sys_RshPost_$$_${LOGIN} >/dev/null 2>&1 && ISITQSUB=1
-    if  ( [ ${ISITQSUB} -gt 0 ] ) ; then 
-      if [ -d ${SUBMIT_DIR}/POSTPONE ] ; then
-            for postponed_file in ${SUBMIT_DIR}/POSTPONE/* ; do 
-              if [ -f ${postponed_file} ] ; then
-                IGCM_debug_Print 2 " submit postponed file : " ${postponed_file}
-                rsh ulam exec /bin/ksh <${postponed_file}
-                if [ $? -eq 0 ] ; then
-                     IGCM_sys_Rm ${postponed_file}
-                else
-                     IGCM_debug_Print 2 "keep postponed file for an other submission :" ${postponed_file}
-                fi
-              fi
-          done
-      fi
-    fi
-
-    RETURN=0
-    # rsh ulam command
-    rsh ulam exec /bin/ksh </tmp/tmp_IGCM_sys_RshPost_$$_${LOGIN}
-    RETURN=$?
-
-    # keep standard input for postpone if ulam don't answer
-    if ( [ ${RETURN} -gt 0 ] ) ; then
-        IGCM_debug_Print 2 "Postpone tmp_IGCM_sys_RshPost_$$_${LOGIN}"
-        [ -d ${SUBMIT_DIR}/POSTPONE ] || mkdir ${SUBMIT_DIR}/POSTPONE
-        mv /tmp/tmp_IGCM_sys_RshPost_$$_${LOGIN} ${SUBMIT_DIR}/POSTPONE
-    else
-	\rm /tmp/tmp_IGCM_sys_RshPost_$$_${LOGIN}
-    fi
-    IGCM_debug_PopStack "IGCM_sys_RshPost"
+  IGCM_debug_PushStack "IGCM_sys_RshPost" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_RshPost :" $@
+  fi
+
+  # keep standard input to keep it for postpone if ulam don't answer
+  cat >/tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME}
+
+  ## Add submission for old postponed files only if command is a Qsub
+  ##
+  ISITQSUB=0
+  grep Qsub /tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME} >/dev/null 2>&1 && ISITQSUB=1
+  if  ( [ ${ISITQSUB} -gt 0 ] ) ; then
+    if [ -d ${SUBMIT_DIR}/POSTPONE ] ; then
+      for postponed_file in ${SUBMIT_DIR}/POSTPONE/* ; do
+        if [ -f ${postponed_file} ] ; then
+          IGCM_debug_Print 2 " submit postponed file : " ${postponed_file}
+          rsh ulam exec /bin/ksh <${postponed_file}
+          if [ $? -eq 0 ] ; then
+            IGCM_sys_Rm ${postponed_file}
+          else
+            IGCM_debug_Print 2 "keep postponed file for an other submission :" ${postponed_file}
+          fi
+        fi
+      done
+    fi
+  fi
+
+  RETURN=0
+  # rsh ulam command
+  rsh ulam exec /bin/ksh </tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME}
+  RETURN=$?
+
+  # keep standard input for postpone if ulam don't answer
+  if ( [ ${RETURN} -gt 0 ] ) ; then
+    IGCM_debug_Print 2 "Postpone tmp_IGCM_sys_RshPost_$$_${LOGNAME}"
+    [ -d ${SUBMIT_DIR}/POSTPONE ] || mkdir ${SUBMIT_DIR}/POSTPONE
+    mv /tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME} ${SUBMIT_DIR}/POSTPONE
+  else
+    IGCM_sys_Rm /tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME}
+  fi
+  IGCM_debug_PopStack "IGCM_sys_RshPost"
 }
 
@@ -250,15 +263,15 @@
 #D-
 function IGCM_sys_SendMail {
-    IGCM_debug_PushStack "IGCM_sys_SendMail" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_SendMail :" $@
-    fi
-
-    if ( ${ExitFlag} ) ; then
-	status=failed
-    else
-	status=completed
-    fi
-    cat  << END_MAIL > job_end.mail
+  IGCM_debug_PushStack "IGCM_sys_SendMail" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_SendMail :" $@
+  fi
+
+  if ( ${ExitFlag} ) ; then
+    status=failed
+  else
+    status=completed
+  fi
+  cat  << END_MAIL > job_end.mail
 Dear ${LOGIN},
 
@@ -270,17 +283,17 @@
 END_MAIL
 
-    if [ ! -z ${config_UserChoices_MailName} ] ; then
-	mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} <  job_end.mail
-    elif [ -f ~/.forward ] ; then
-	mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail
-    else
-	mailx -s "${config_UserChoices_JobName} ${status}" ${USER} < job_end.mail
-    fi
-
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_SendMail : erreur."
-	IGCM_debug_Exit "IGCM_sys_SendMail"
-    fi
-    IGCM_debug_PopStack "IGCM_sys_SendMail"
+  if [ ! -z ${config_UserChoices_MailName} ] ; then
+    mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} <  job_end.mail
+  elif [ -f ~/.forward ] ; then
+    mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail
+  else
+    mailx -s "${config_UserChoices_JobName} ${status}" ${USER} < job_end.mail
+  fi
+
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_SendMail : erreur."
+    IGCM_debug_Exit "IGCM_sys_SendMail"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_SendMail"
 }
 
@@ -291,21 +304,21 @@
 #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
+  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"
+  if [ ! -d ${1} ] ; then
+    echo "IGCM_sys_Mkdir : erreur."
+    IGCM_debug_Exit "IGCM_sys_Mkdir"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Mkdir"
 }
 
@@ -316,16 +329,16 @@
 #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
-    rsh ${STOREHOST} -n mkdir -p $1
-
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_MkdirArchive : erreur."
-	IGCM_debug_Exit "IGCM_sys_MkdirArchive"
-    fi
-    IGCM_debug_PopStack "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
+  rsh ${STOREHOST} -n mkdir -p $1
+
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_MkdirArchive : erreur."
+    IGCM_debug_Exit "IGCM_sys_MkdirArchive"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_MkdirArchive"
 }
 
@@ -336,17 +349,17 @@
 #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"
+  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"
 }
 
@@ -357,14 +370,14 @@
 #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"
+  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"
 }
 
@@ -375,18 +388,18 @@
 #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"
+  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"
 }
 
@@ -397,14 +410,14 @@
 #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"
+  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"
 }
 
@@ -415,13 +428,13 @@
 #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}
+  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}
 }
 
@@ -432,13 +445,31 @@
 #D-
 function IGCM_sys_TestDirArchive {
-    IGCM_debug_PushStack "IGCM_sys_TestDirArchive" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_TestDirArchive :" $@
-    fi
-    typeset ExistFlag
-    ExistFlag=$( IGCM_sys_RshArchive "[ -d $1 ] && echo 0 || echo 1" )
-    IGCM_debug_PopStack "IGCM_sys_TestDirArchive"
-
-    return ${ExistFlag}
+  IGCM_debug_PushStack "IGCM_sys_TestDirArchive" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_TestDirArchive :" $@
+  fi
+  typeset ExistFlag
+  ExistFlag=$( IGCM_sys_RshArchive "[ -d $1 ] && echo 0 || echo 1" )
+  IGCM_debug_PopStack "IGCM_sys_TestDirArchive"
+
+  return ${ExistFlag}
+}
+
+#D-#==================================================
+#D-function IGCM_sys_IsFileArchived
+#D-* Purpose: Test file that must NOT EXISTS on Archive
+#D-* always true on vargas.
+#D-* Examples:
+#D-
+function IGCM_sys_IsFileArchived {
+  IGCM_debug_PushStack "IGCM_sys_IsFileArchived" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_IsFileArchived :" $@
+  fi
+  typeset IsArchivedFlag
+  IsArchivedFlag=$( echo 0 )
+  IGCM_debug_PopStack "IGCM_sys_IsFileArchived"
+
+  return ${IsArchivedFlag}
 }
 
@@ -449,10 +480,24 @@
 #D-
 function IGCM_sys_TestFileArchive {
-    IGCM_debug_PushStack "IGCM_sys_TestFileArchive" $@
-    typeset ExistFlag
-    ExistFlag=$( IGCM_sys_RshArchive "[ -f $1 ] && echo 0 || echo 1" )
-    IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
-
-    return ${ExistFlag}
+  IGCM_debug_PushStack "IGCM_sys_TestFileArchive" $@
+  typeset ExistFlag
+  ExistFlag=$( IGCM_sys_RshArchive "[ -f $1 ] && echo 0 || echo 1" )
+  IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
+
+  return ${ExistFlag}
+}
+
+#D-#==================================================
+#D-function IGCM_sys_TestFileBuffer
+#D-* Purpose: Test file that must NOT EXISTS on Buffer
+#D-* Examples:
+#D-
+function IGCM_sys_TestFileBuffer {
+  IGCM_debug_PushStack "IGCM_sys_TestFileBuffer" $@
+  typeset ExistFlag
+  ExistFlag=$( [ -f $1 ] && echo 0 || echo 1 )
+  IGCM_debug_PopStack "IGCM_sys_TestFileBuffer"
+
+  return ${ExistFlag}
 }
 
@@ -463,10 +508,24 @@
 #D-
 function IGCM_sys_CountFileArchive {
-    IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@
-    IGCM_sys_RshArchive "ls ${@} 2>/dev/null | wc -l"
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_CountFileArchive : erreur."
-    fi
-    IGCM_debug_PopStack "IGCM_sys_CountFileArchive"
+  IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@
+  IGCM_sys_RshArchive "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_CountFileBuffer
+#D-* Purpose: Count files on Scratch filesystem
+#D-* Examples:
+#D-
+function IGCM_sys_CountFileBuffer {
+  IGCM_debug_PushStack "IGCM_sys_CountFileBuffer" $@
+  ls ${@} 2>/dev/null | wc -l
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_CountFileBuffer : erreur."
+  fi
+  IGCM_debug_PopStack "IGCM_sys_CountFileBuffer"
 }
 
@@ -477,12 +536,12 @@
 #D-
 function IGCM_sys_Tree {
-    IGCM_debug_PushStack "IGCM_sys_Tree" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_Tree :" $@
-    fi
-
-    \mfls -r $@
-
-    IGCM_debug_PopStack "IGCM_sys_Tree"
+  IGCM_debug_PushStack "IGCM_sys_Tree" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_Tree :" $@
+  fi
+
+  \mfls -r $@
+
+  IGCM_debug_PopStack "IGCM_sys_Tree"
 }
 
@@ -493,14 +552,14 @@
 #D-
 function IGCM_sys_Tar {
-    IGCM_debug_PushStack "IGCM_sys_Tar" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_Tar :" $@
-    fi
-    \tar cf $@
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_Tar : erreur."
-	IGCM_debug_Exit "IGCM_sys_Tar"
-    fi
-    IGCM_debug_PopStack "IGCM_sys_Tar"
+  IGCM_debug_PushStack "IGCM_sys_Tar" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_Tar :" $@
+  fi
+  \tar cf $@
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_Tar : erreur."
+    IGCM_debug_Exit "IGCM_sys_Tar"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Tar"
 }
 
@@ -511,14 +570,14 @@
 #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"
+  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"
 }
 
@@ -529,22 +588,26 @@
 #D-
 function IGCM_sys_Qsub {
-    IGCM_debug_PushStack "IGCM_sys_Qsub" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_Qsub :" $@
-    fi
-    # We have to change output/error file
-    [ ${#@} = 1 ] &&  REP_FOR_JOB=$LOADL_STEP_INITDIR
-    [ ${#@} = 2 ] &&  REP_FOR_JOB=$2
-    sed -e "s/\# \@ output *= .*/\# \@ output = ${Script_Output}/" -e "s/\# \@ error *= .*/\# \@ error = ${Script_Output}/" <$1 >${REP_FOR_JOB}/JOB_FOR_IGCM
-    {
-       [ ${#@} = 1 ] &&  ( cd $LOADL_STEP_INITDIR ; /usr/local/bin/llsubmit JOB_FOR_IGCM ; ERROR=$? ; cd - ; )
-       [ ${#@} = 2 ] &&  ( cd $2 ; /usr/local/bin/llsubmit JOB_FOR_IGCM ; ERROR=$? ; cd - ; )
-    }
-    if [ ${ERROR} -gt 0 ] ; then
-       echo "IGCM_sys_Qsub : erreur $@."
-       IGCM_debug_Exit "IGCM_sys_Qsub"
-    fi
-    IGCM_sys_Rm ${REP_FOR_JOB}/JOB_FOR_IGCM
-    IGCM_debug_PopStack "IGCM_sys_Qsub"
+  IGCM_debug_PushStack "IGCM_sys_Qsub" $@
+
+  typeset ERROR
+  ERROR=0
+
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_Qsub :" $@
+  fi
+  # We have to change output/error file
+  [ ${#@} = 1 ] &&  REP_FOR_JOB=$LOADL_STEP_INITDIR
+  [ ${#@} = 2 ] &&  REP_FOR_JOB=$2
+  sed -e "s/\# \@ output *= .*/\# \@ output = ${Script_Output}/" -e "s/\# \@ error *= .*/\# \@ error = ${Script_Output}/" <$1 >${REP_FOR_JOB}/JOB_FOR_IGCM
+  {
+    [ ${#@} = 1 ] &&  ( cd $LOADL_STEP_INITDIR ; /usr/local/bin/llsubmit JOB_FOR_IGCM ; ERROR=$? ; cd - ; )
+    [ ${#@} = 2 ] &&  ( cd $2 ; /usr/local/bin/llsubmit JOB_FOR_IGCM ; ERROR=$? ; cd - ; )
+  }
+  if [ ${ERROR} -gt 0 ] ; then
+    echo "IGCM_sys_Qsub : erreur $@."
+    IGCM_debug_Exit "IGCM_sys_Qsub"
+  fi
+  IGCM_sys_Rm ${REP_FOR_JOB}/JOB_FOR_IGCM
+  IGCM_debug_PopStack "IGCM_sys_Qsub"
 
 }
@@ -556,20 +619,20 @@
 #D-
 function IGCM_sys_QsubPost {
-    IGCM_debug_PushStack "IGCM_sys_QsubPost" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_QsubPost :" $@
-    fi
-    cd ${POST_DIR}
-    /opt/ibmll/LoadL/full/bin/llsubmit ${libIGCM_POST}/$1.job
-    cd -
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_QsubPost : erreur " $@
-	IGCM_debug_Exit "IGCM_sys_QsubPost"
-    fi
-    IGCM_debug_PopStack "IGCM_sys_QsubPost"
+  IGCM_debug_PushStack "IGCM_sys_QsubPost" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_QsubPost :" $@
+  fi
+  cd ${POST_DIR}
+  /opt/ibmll/LoadL/full/bin/llsubmit ${libIGCM_POST}/$1.job
+  cd -
+  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- File transfer functions
 #D-*************************
 #D-
@@ -581,108 +644,107 @@
 #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
-}
-    
+  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-#==================================================
@@ -692,29 +754,30 @@
 #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
-
-    IGCM_sys_RshPost <<-EOF
+  IGCM_debug_PushStack "IGCM_sys_Mirror_libIGCM"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_Mirror_libIGCM"
+  fi
+
+  typeset RET
+
+  IGCM_sys_RshPost <<-EOF
     mkdir -p ${HOME_POST}/MIRROR/${PATHlibIGCM}
 EOF
-    rsh ulam -n hostname > /dev/null 2>&1
+  rsh ulam -n hostname > /dev/null 2>&1
+  RET=$?
+  if [ $RET -eq 0 ] ; then
+    echo ${RSYNC} ${RSYNC_opt} -e "rsh " ${libIGCM} ulam:${HOME_POST}/MIRROR/${PATHlibIGCM} > out_rsync 2>&1
+    ${RSYNC} ${RSYNC_opt} -e "rsh " ${libIGCM} ulam:${HOME_POST}/MIRROR/${PATHlibIGCM} >> out_rsync 2>&1
     RET=$?
-    if [ $RET -eq 0 ] ; then
-	echo ${RSYNC} ${RSYNC_opt} -e "rsh " ${libIGCM} ulam:${HOME_POST}/MIRROR/${PATHlibIGCM} > out_rsync 2>&1
-	${RSYNC} ${RSYNC_opt} -e "rsh " ${libIGCM} ulam:${HOME_POST}/MIRROR/${PATHlibIGCM} >> out_rsync 2>&1
-	RET=$?
-
-	if [ ${RET} -gt 0 ] ; then
-	    echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on ulam."
-	    cat out_rsync
-	fi
-    else
-	echo "No POST-TREATMENT avaible because ulam is down."
-    fi
-    IGCM_debug_PopStack "IGCM_sys_Mirror_libIGCM"
+
+    if [ ${RET} -gt 0 ] ; then
+      echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on ulam."
+      cat out_rsync
+    fi
+    IGCM_sys_Rm out_rsync
+  else
+    echo "No POST-TREATMENT avaible because ulam is down."
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Mirror_libIGCM"
 }
 
@@ -722,5 +785,5 @@
 #- Call IGCM_sys_Mirror_libIGCM now !
 if ( $MirrorlibIGCM ) ; then
-    IGCM_sys_Mirror_libIGCM
+  IGCM_sys_Mirror_libIGCM
 fi
 
@@ -731,23 +794,23 @@
 #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"
-     else
-	 \rm out_rsync
-    fi
-    IGCM_debug_PopStack "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"
+  else
+    \rm out_rsync
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Cp"
 }
 
@@ -758,23 +821,23 @@
 #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"
-    else
-	\rm out_rsync
-    fi
-    IGCM_debug_PopStack "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"
+  else
+    \rm out_rsync
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Rm"
 }
 
@@ -786,10 +849,10 @@
 #D-
 function IGCM_sys_RmRunDir {
-    IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_RmRunDir :" $@
-	echo "Dummy call, let the scheduler do that."
-    fi
-    IGCM_debug_PopStack "IGCM_sys_RmRunDir"
+  IGCM_debug_PushStack "IGCM_sys_RmRunDir" -- $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_RmRunDir :" $@
+    echo "Dummy call, let the scheduler do that."
+  fi
+  IGCM_debug_PopStack "IGCM_sys_RmRunDir"
 }
 
@@ -800,29 +863,29 @@
 #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"
-	else
-	    \rm out_rsync
-        fi
+  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"
     else
-        ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_Mv"
+      \rm out_rsync
+    fi
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+
+  IGCM_debug_PopStack "IGCM_sys_Mv"
 }
 
@@ -833,35 +896,35 @@
 #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
-	rcp -r $1 ${STOREHOST}:$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"
-	else
-	    \rm out_rsync
-	fi
+  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
+    rcp -r $1 ${STOREHOST}:$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"
     else
-	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-    fi
-    IGCM_debug_PopStack "IGCM_sys_Put_Dir"
+      \rm out_rsync
+    fi
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Put_Dir"
 }
 
@@ -872,30 +935,30 @@
 #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
-
-	#USUAL WAY
-	rcp -rp ${STOREHOST}:$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"
+  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
+
+        #USUAL WAY
+    rcp -rp ${STOREHOST}:$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"
 }
 
@@ -907,52 +970,93 @@
 #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
-	#
-	# Only if we use rsync
-	#IGCM_sys_MkdirArchive $( dirname $2 )
-	#
-	#USUAL WAY
-	mfput $1 $2 > out_rsync 2>&1
-  	RET=$?
-
-# 	#RSYNC WITH NETWORK RSH CALL
-# 	echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1
-# 	${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${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"
-	else
-	    \rm out_rsync
-	fi
+  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
+    #
+    # Only if we use rsync
+    #IGCM_sys_MkdirArchive $( dirname $2 )
+    #
+    #USUAL WAY
+    mfput $1 $2 > out_rsync 2>&1
+    RET=$?
+
+#       #RSYNC WITH NETWORK RSH CALL
+#       echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1
+#       ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${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"
     else
-	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-    fi
-    IGCM_debug_PopStack "IGCM_sys_Put_Rest"
+      \rm out_rsync
+    fi
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Put_Rest"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_PutBuffer_Rest
+#D-* Purpose: Put computied restarts on ${SCRATCHDIR}.
+#D-           File and target directory must exist.
+#D-* Examples:
+#D-
+function IGCM_sys_PutBuffer_Rest {
+  IGCM_debug_PushStack "IGCM_sys_PutBuffer_Rest" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_PutBuffer_Rest :" $@
+  fi
+  if [ $DRYRUN = 0 ]; then
+    if [ ! -f ${1} ] ; then
+      echo "ERROR : IGCM_sys_PutBuffer_Rest ${1} DOES NOT EXIST ."
+      IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest"
+    fi
+
+    typeset RET
+    #
+    if [ X${JobType} = XRUN ] ; then
+      IGCM_sys_Chmod 444 ${1}
+    fi
+
+    #
+    # USUAL WAY
+    \cp $1 $2 > out_rsync 2>&1
+    RET=$?
+
+    if [ ${RET} -gt 0 ] ; then
+      echo "IGCM_sys_PutBuffer_Rest : error."
+      cat out_rsync
+      IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest"
+    else
+      \rm out_rsync
+    fi
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_PutBuffer_Rest"
 }
 
@@ -963,56 +1067,102 @@
 #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
-
-	typeset RET
-	#
-	if [ X${JobType} = XRUN ] ; then
-	    if [ X${3} = X ] ; then
-		IGCM_sys_Chmod 444 ${1}
-	    fi
-	fi
-	#
-	# Only if we use rsync
-	#IGCM_sys_MkdirArchive $( dirname $2 )
-	#
-	#USUAL WAY
-	mfput $1 $2 > out_rsync 2>&1
-	RET=$?
-
-# 	#RSYNC WITH NETWORK RSH CALL
-# 	echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1
-# 	${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${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"
-	else
-	    \rm out_rsync
-	fi
+  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
+
+    typeset RET
+        #
+    if [ X${JobType} = XRUN ] ; then
+      if [ X${3} = X ] ; then
+        IGCM_sys_Chmod 444 ${1}
+      fi
+    fi
+    #
+    # Only if we use rsync
+    #IGCM_sys_MkdirArchive $( dirname $2 )
+    #
+    #USUAL WAY
+    mfput $1 $2 > out_rsync 2>&1
+    RET=$?
+
+#       #RSYNC WITH NETWORK RSH CALL
+#       echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1
+#       ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${RUN_DIR}/$1 ${STOREHOST}:${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"
     else
-	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-    fi
-    IGCM_debug_PopStack "IGCM_sys_Put_Out"
-    return 0
+      \rm out_rsync
+    fi
+    IGCM_sys_Rm out_rsync
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Put_Out"
+  return 0
+}
+
+#D-#==================================================
+#D-function IGCM_sys_PutBuffer_Out
+#D-* Purpose: Copy a file on ${SCRATCHDIR} after having chmod it in readonly
+#D-* Examples:
+#D-
+function IGCM_sys_PutBuffer_Out {
+  IGCM_debug_PushStack "IGCM_sys_PutBuffer_Out" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_PutBuffer_Out :" $@
+  fi
+  if [ $DRYRUN = 0 ]; then
+    if [ ! -f ${1} ] ; then
+      echo "WARNING : IGCM_sys_PutBuffer_Out ${1} DOES NOT EXIST ."
+      IGCM_debug_PopStack "IGCM_sys_PutBuffer_Out"
+      return 1
+    fi
+    #
+    IGCM_sys_Mkdir $( dirname $2 )
+    #
+    typeset RET
+
+    if [ X${JobType} = XRUN ] ; then
+      if [ X${3} = X ] ; then
+        IGCM_sys_Chmod 444 ${1}
+      fi
+    fi
+    #
+    # USUAL WAY
+    \cp $1 $2 > out_rsync 2>&1
+    RET=$?
+
+    if [ ${RET} -gt 0 ] ; then
+      echo "IGCM_sys_PutBuffer_Out : error."
+      cat out_rsync
+      IGCM_debug_Exit "IGCM_sys_PutBuffer_Out"
+    else
+      \rm out_rsync
+    fi
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_PutBuffer_Out"
+  return 0
 }
 
@@ -1023,70 +1173,117 @@
 #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
-
-    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
-	    dm_liste=${1}
-	fi
-	eval DEST=\${${#}}
-
-        # 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"
-	    return
-        fi
-
-	# SD : dm_liste is not suited for computing job
-	#      because we change filename during transfert
-	#      dm_liste is better suited for post-treatment
-	#dm_liste=" "
-  	#(( ifile=1 ))
-	#while [ $ifile -lt $# ] ; do
-	#    dm_liste=$( eval echo ${dm_liste} " "\${${ifile}} )
-	#    (( ifile = ifile + 1 ))
-	#done
-	#DEST=$( eval echo \${${#}} )
-
-	#USUAL WAY
-	mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1
-	#mfget $1 $2 > out_rsync 2>&1
-  	RET=$?
-
-# 	#RSYNC WITH NETWORK RSH CALL
-# 	echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
-# 	${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${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"
-	else
-	    \rm out_rsync
-	fi
+  IGCM_debug_PushStack "IGCM_sys_Get" $@
+
+  typeset DEST RET dm_liste ifile target
+
+  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
-	( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-    fi
-    IGCM_debug_PopStack "IGCM_sys_Get"
+      dm_liste=${1}
+    fi
+    eval DEST=\${${#}}
+
+    # 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"
+      return
+    fi
+
+    # SD : dm_liste is not suited for computing job
+    #      because we change filename during transfert
+    #      dm_liste is better suited for post-treatment
+    #dm_liste=" "
+    #(( ifile=1 ))
+    #while [ $ifile -lt $# ] ; do
+    #    dm_liste=$( eval echo ${dm_liste} " "\${${ifile}} )
+    #    (( ifile = ifile + 1 ))
+    #done
+    #DEST=$( eval echo \${${#}} )
+
+    #USUAL WAY
+    mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1
+    RET=$?
+
+#       #RSYNC WITH NETWORK RSH CALL
+#       echo ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1
+#       ${RSYNC} ${RSYNC_opt} --rsync-path=${REMOTE_RSYNC} -e rsh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${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"
+    else
+      \rm out_rsync
+    fi
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Get"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_GetBuffer
+#D-* Purpose: Get a file from ${SCRATCHDIR}
+#D-* Examples: IGCM_sys_GetBuffer myfile /destpath/myfile_with_PREFIX
+#D-            IGCM_sys_GetBuffer /l Array_contain_myfiles /destpath/
+function IGCM_sys_GetBuffer {
+  IGCM_debug_PushStack "IGCM_sys_GetBuffer" $@
+
+  typeset DEST RET buf_liste ifile target file_work
+
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_GetBuffer :" $@
+  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 buf_liste \${${2}}
+    else
+      eval set +A buf_liste ${1}
+    fi
+    eval DEST=\${${#}}
+
+    #USUAL WAY
+    if [ X${1} = X'/l' ] ; then
+      (( RET=0 ))
+      for target in ${buf_liste[*]} ; do
+        local_file=$( basename ${target} )
+        \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
+        (( RET = RET + $? ))
+      done
+    else
+      \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
+      RET=$?
+    fi
+
+    if [ ${RET} -gt 0 ] ; then
+      echo "IGCM_sys_GetBuffer : copy error."
+      cat out_rsync
+      IGCM_debug_Exit "IGCM_sys_GetBuffer"
+    else
+      \rm out_rsync
+    fi
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_GetBuffer"
 }
 
@@ -1099,31 +1296,31 @@
 #D-
 function IGCM_sys_GetDate_FichWork {
-    IGCM_debug_PushStack "IGCM_sys_FichWork" $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_GetDate_FichWork :" $@
-    fi
-    typeset dateF
-    set +A dateF -- $( rsh ${MASTER} -n /opt/freeware/bin/ls -l --full-time --time-style='+%Y%m%d%H%M%S' ${1} )
-    eval ${2}=${dateF[5]}
-
-    # donne la date filesys d'un fichier sur la machine work
-    IGCM_debug_PopStack "IGCM_sys_FichWork"
+  IGCM_debug_PushStack "IGCM_sys_FichWork" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_GetDate_FichWork :" $@
+  fi
+  typeset dateF
+  set +A dateF -- $( rsh ${MASTER} -n /opt/freeware/bin/ls -l --full-time --time-style='+%Y%m%d%H%M%S' ${1} )
+  eval ${2}=${dateF[5]}
+
+  # 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-* 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
-    typeset dateF
-    set +A dateF -- $( rsh ${STOREHOST} -n ls -l --full-time --time-style='+%Y%m%d%H%M%S' ${1} )
-    eval ${2}=${dateF[5]}
-
-    IGCM_debug_PopStack "IGCM_sys_FichArchive"
+  IGCM_debug_PushStack "IGCM_sys_FichArchive" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_GetDate_FichArchive :" $@
+  fi
+  typeset dateF
+  set +A dateF -- $( rsh ${STOREHOST} -n ls -l --full-time --time-style='+%Y%m%d%H%M%S' ${1} )
+  eval ${2}=${dateF[5]}
+
+  IGCM_debug_PopStack "IGCM_sys_FichArchive"
 }
 
@@ -1132,15 +1329,15 @@
 
 function IGCM_sys_rebuild {
-    IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_rebuild :" $@
-    fi
-    /homegpfs/rech/psl/rpsl035/bin/rebuild -f -o $@
-    if [ $? -gt 0 ] ; then
-       echo "IGCM_sys_rebuild : erreur ${@}."
-       IGCM_debug_Exit "rebuild"
-    fi
-
-    IGCM_debug_PopStack "IGCM_sys_rebuild"
+  IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_rebuild :" $@
+  fi
+  /homegpfs/rech/psl/rpsl035/bin/rebuild -f -o $@
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_rebuild : erreur ${@}."
+    IGCM_debug_Exit "rebuild"
+  fi
+
+  IGCM_debug_PopStack "IGCM_sys_rebuild"
 }
 
@@ -1149,8 +1346,8 @@
 
 function IGCM_sys_activ_variables {
-    IGCM_debug_PushStack "IGCM_sys_activ_variables"
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_activ_variables "
-    fi
+  IGCM_debug_PushStack "IGCM_sys_activ_variables"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_activ_variables "
+  fi
 
 # --------------------------------------------------------------------
@@ -1162,5 +1359,5 @@
 # --------------------------------------------------------------------
 
-    IGCM_debug_PopStack "IGCM_sys_activ_variables"
+  IGCM_debug_PopStack "IGCM_sys_activ_variables"
 
 }
@@ -1170,8 +1367,8 @@
 
 function IGCM_sys_desactiv_variables {
-    IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_desactiv_variables "
-    fi
+  IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_desactiv_variables "
+  fi
 # --------------------------------------------------------------------
 #D- MPI specifications
@@ -1182,53 +1379,170 @@
 # --------------------------------------------------------------------
 
-    IGCM_debug_PopStack "IGCM_sys_desactiv_variables"
-  
+  IGCM_debug_PopStack "IGCM_sys_desactiv_variables"
+
 }
 
 ############################################################
-# Build run file
+# Build MPI/OMP scripts
+function IGCM_sys_build_execution_scripts
+{
+  IGCM_debug_PushStack "IGCM_sys_build_execution_scripts" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_build_execution_scripts " $@
+  fi
+
+  typeset NbNodes_Job NbProc_Job comp_proc_mpi_loc comp_proc_omp_loc mpi_count
+
+  if [ ! -f ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} ]  ; then
+    IGCM_debug_Exit "IGCM_sys_vargas build_execution_scripts : Job_${config_UserChoices_JobName} don't exist in SUBMIT_DIR : ${SUBMIT_DIR} "
+  fi
+
+  if ( ${OK_PARA_MPMD} ) ; then
+
+    if [ -f run_file ] ; then
+      IGCM_sys_Rm -f run_file
+    fi
+    touch run_file
+
+    if ( ${OK_PARA_OMP} ) ; then
+# NEW : 2 Noeuds
+# @ task_geometry={(0)(1,2,3)}
+# Nombre de processus demandes
+      echo "Job_${config_UserChoices_JobName} includes task_geometry = \c"
+      cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep "task_geometry" | sed -e "s/[^(]*([^(]*/(/g"
+      echo "Job_${config_UserChoices_JobName} includes task_geometry  with NbNodes = \c"
+      cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep "task_geometry" | sed -e "s/[^(]*([^(]*/(/g" | wc -c
+      NbNodes_Job=$(( $( cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep "task_geometry" | sed -e "s/[^(]*([^(]*/(/g" | wc -c ) - 1 ))
+
+      if [ ${NbNodes_Job} -eq 0 ] ; then
+        IGCM_debug_Print 2 "Error in Job_${config_UserChoices_JobName} ressources : no task_geometry defined with OpenMP run."
+        exit 1
+      fi
+    else
+
+# OLD :
+# @ total_tasks = 3
+# @ environment = "BATCH_NUM_PROC_TOT=3"
+# Pas d OpenMP
+# @ resources = ConsumableCpus(1)
+
+      echo "Job_${config_UserChoices_JobName} includes total_tasks = \c"
+      cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep "total_tasks" | sed -e "s/.*total_tasks = //"
+      NbProc_Job=$( cat ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} | grep "total_tasks" | sed -e "s/.*total_tasks = //" )
+      NbProc_Job=${NbProc_Job:=0}
+      if [ ${NbProc_Job} -eq 0 ] ; then
+        IGCM_debug_Print 2 "Error in Job_${config_UserChoices_JobName} ressources : no total_tasks defined with MPI only run."
+        exit 1
+      fi
+      if ( $( egrep '^# *@ *resources *= *ConsumableCpus\(1\)' ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} >/dev/null 2>&1 ) ) ; then
+        IGCM_debug_Print 2 "ressources =  ConsumableCpus(1) line found into Job_${config_UserChoices_JobName}"
+      else
+        IGCM_debug_Print 2 "Error in Job_${config_UserChoices_JobName} ressources = line not found. Job should include resources = ConsumableCpus(1) "
+        exit 1
+      fi
+    fi
+
+# run_file construction
+
+# Then first loop on the components for the coupler ie oasis
+
+### the coupler ie oasis must be the first one
+    for comp in ${config_ListOfComponents[*]} ; do
+
+      eval ExeNameIn=\${config_Executable_${comp}[0]}
+      eval ExeNameOut=\${config_Executable_${comp}[1]}
+
+      # for CPL component only
+      if [ "X${comp}" = "XCPL" ] ; then
+
+        eval comp_proc_mpi_loc=\${${comp}_PROC_MPI}
+        eval comp_proc_omp_loc=\${${comp}_PROC_OMP}
+
+        if ( ${OK_PARA_MPI} ) ; then
+
+          (( mpi_count = 1 ))
+          until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do
+            if ( ${OK_PARA_OMP} ) ; then
+              echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file
+            else
+              echo "./${ExeNameOut}" >> run_file
+            fi
+            (( mpi_count = mpi_count + 1 ))
+          done
+        else
+          if ( ${OK_PARA_OMP} ) ; then
+            echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file
+          else
+            echo "./${ExeNameOut} " >> run_file
+          fi
+        fi
+      fi
+    done
+
+# Then second loop on the components
+
+    for comp in ${config_ListOfComponents[*]} ; do
+
+      eval ExeNameIn=\${config_Executable_${comp}[0]}
+      eval ExeNameOut=\${config_Executable_${comp}[1]}
+
+      # Only if we really have an executable for the component and not the coupler ie oasis:
+      if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${comp}" != "XCPL" ] ) ; then
+
+        eval comp_proc_mpi_loc=\${${comp}_PROC_MPI}
+        eval comp_proc_omp_loc=\${${comp}_PROC_OMP}
+
+        if ( ${OK_PARA_MPI} ) ; then
+
+          (( mpi_count = 1 ))
+          until [ ${mpi_count} -gt ${comp_proc_mpi_loc} ] ; do
+            if ( ${OK_PARA_OMP} ) ; then
+              echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file
+            else
+              echo "./${ExeNameOut}" >> run_file
+            fi
+            (( mpi_count = mpi_count + 1 ))
+          done
+        else
+          if ( ${OK_PARA_OMP} ) ; then
+            echo "env OMP_NUM_THREADS=${comp_proc_omp_loc} ./${ExeNameOut} " >> run_file
+          else
+                    # to be tested : no MPI only OpenMP into MPMD mode
+            echo "./${ExeNameOut} " >> run_file
+          fi
+        fi
+      fi
+    done
+
+    EXECUTION="${HOST_MPIRUN_COMMAND} -pgmmodel mpmd -cmdfile ./run_file"
+
+    IGCM_sys_Chmod u+x run_file
+    if ( $DEBUG_sys ) ; then
+      echo "run_file contains : "
+      cat run_file
+    fi
+
+  else # Only one executable. launch it.
+
+    for comp in ${config_ListOfComponents[*]} ; do
+
+      eval ExeNameIn=\${config_Executable_${comp}[0]}
+      eval ExeNameOut=\${config_Executable_${comp}[1]}
+
+      [ "X${ExeNameOut}" != X\"\" ] &&  EXECUTION="time ./${ExeNameOut}"
+
+    done
+
+  fi
+
+  IGCM_debug_Print 1 "sys vargas : execution command is "
+  IGCM_debug_Print 1 "$EXECUTION"
+
+  IGCM_debug_PopStack "IGCM_sys_build_execution_scripts"
+}
 
 function IGCM_sys_build_run_file {
-    IGCM_debug_PushStack "IGCM_sys_build_run_file" $@
-set -x
-    if ( $DEBUG_sys ) ; then
-	echo "IGCM_sys_build_run_file " $@
-    fi
-
-    NUM_PROC_OASIS=1
-
-    # Set the number of processors for OCE here
-    NUM_PROC_OCE=5
-
-    (( NUM_PROC_ATM = BATCH_NUM_PROC_TOT - NUM_PROC_OASIS - NUM_PROC_OCE ))
-    
-    if [ $1 = MPI2 ]; then
-       echo "IGCM_sys_build_run_file : error - MPI2 not available on vargas. "
-       IGCM_debug_Exit "IGCM_sys_build_run_file"
-    elif [ $1 = MPI1 ]; then
-	cat <<EOF > run_file
-./oasis
-EOF
-
-	typeset i
-	(( i = 0 ))
-	while [ ${i} -lt ${NUM_PROC_ATM} ] ; do
-	    (( i = i + 1 ))
-	    cat <<EOF >> run_file
-./lmdz.x
-EOF
-	done
-
-        (( i = 0 ))
-        while [ ${i} -lt ${NUM_PROC_OCE} ] ; do
-            (( i = i + 1 ))
-	    cat <<EOF >> run_file
-./opa.xx
-EOF
-        done
-
-	wc -l run_file
-    fi
-set +x
-    IGCM_debug_PopStack "IGCM_sys_build_run_file"
-}
+
+  IGCM_debug_Print 3 " dummy function : IGCM_sys_build_run_file "
+
+}
