Index: trunk/libIGCM/libIGCM_ensemble/libIGCM_ensemble.ksh
===================================================================
--- trunk/libIGCM/libIGCM_ensemble/libIGCM_ensemble.ksh	(revision 736)
+++ trunk/libIGCM/libIGCM_ensemble/libIGCM_ensemble.ksh	(revision 737)
@@ -49,5 +49,6 @@
   IGCM_card_DefineArrayFromSection   config.card ListOfComponents
 
-  IGCM_debug_Print 1 "ACTIVE            = ${ensemble_Ens_PERTURB_ACTIVE}"
+  echo
+  IGCM_debug_Print 1 "ACTIVE            = ${ensemble_Ens_PERTURB_actif}"
   IGCM_debug_Print 1 "NAME              = ${ensemble_Ens_PERTURB_NAME}"
   IGCM_debug_Print 1 "DEBUT_INIT        = ${ensemble_Ens_PERTURB_DEBUT_INIT}"
@@ -82,5 +83,5 @@
   case ${ensemble_Ens_PERTURB_PERIODICITE} in
   _0_)
-    IGCM_debug_Print 1 "No periodic start"
+    IGCM_debug_Print 1 "periodic start not active"
     CastPeriodicStart=false
     return
@@ -111,5 +112,5 @@
     case ${ensemble_Ens_PERTURB_DUREE_NONPERIODIC[$DateNum]} in
     _0_)
-      IGCM_debug_Print 1 "No non-periodic start"
+      IGCM_debug_Print 1 "non-periodic start not active"
       CastNonPeriodicStart=false
       return
@@ -134,7 +135,8 @@
   IGCM_debug_PushStack "IGCM_ensemble_CastPeriodicStarts"
 
-  echo "Manage periodic starts"
-
   [ ${CastPeriodicStart} = false ] && return
+
+  echo
+  IGCM_debug_Print 1 "Manage periodic starts"
 
 #.. Manage periodic starts ..
@@ -176,5 +178,5 @@
 
   # - Create directory in which to store new restart files
-    RestartDir=$ARCHIVE/IGCM_IN/${config_UserChoices_TagName}/${StartDir}
+    RestartDir=${STORAGE}/IGCM_IN/${config_UserChoices_TagName}/${StartDir}
     IGCM_sys_MkdirArchive ${RestartDir}
 
@@ -183,10 +185,8 @@
     while [ $i -lt ${ensemble_Ens_PERTURB_MEMBER} ] ; do
       MemberDir="${StartDir}${Alpha[$i]}"
+      echo
       IGCM_debug_Print 3 "${MemberDir}"
 
       JobName="Job_${MemberDir}"
-
-      pwd
-      ls
 
     # * Create directory if it doesn't exist and copy/link files
@@ -202,8 +202,10 @@
         IGCM_sys_Cp Job_${ensemble_Ens_PERTURB_NAME} ${SUBMIT_DIR}/${StartDir}/${MemberDir}/${JobName}
 
-        echo "cd ${StartDir}/${MemberDir}/ ; ccc_msub ${JobName} ;" >> Qsub.txt
-
+        # Dump command to be lauched in Qsub.txt
+        echo "cd ${StartDir}/${MemberDir}/ ;"  >> Qsub.txt
         echo "sed -e 's/PeriodNb=.*/PeriodNb=48/' ${JobName} > ${JobName}.tmp ; " >> Qsub.txt
-        echo "mv ${JobName}.tmp ${JobName} ; cd - ;" >> Qsub.txt
+        echo "mv ${JobName}.tmp ${JobName} ; " >> Qsub.txt
+        echo "ccc_msub ${JobName} ; cd -"      >> Qsub.txt
+
       fi
 
@@ -237,7 +239,8 @@
   #   ==========================
 
-  echo "Manage non periodic starts"
-
   [ ${CastNonPeriodicStart} = false ] && return
+
+  echo
+  IGCM_debug_Print 1 "Manage non periodic starts"
 
   DateNum=0
@@ -285,5 +288,5 @@
 
   # - Create directory in which to store new restart files if it does'nt already exist
-    RestartDir=$DMFDIR/IGCM_IN/${config_UserChoices_TagName}/${StartDir}
+    RestartDir=${STORAGE}/IGCM_IN/${config_UserChoices_TagName}/${StartDir}
     IGCM_sys_MkdirArchive ${RestartDir}
 
@@ -308,8 +311,9 @@
         IGCM_sys_Cp Job_${ensemble_Ens_PERTURB_NAME} ${SUBMIT_DIR}/${StartDir}/${MemberDir}/Job_${MemberDir}
 
-        echo "cd ${StartDir}/${MemberDir}/ ; ccc_msub ${JobName} ;" >> Qsub.txt
-
+        # Dump command to be lauched in Qsub.txt
+        echo "cd ${StartDir}/${MemberDir}/ ;"  >> Qsub.txt
         echo "sed -e 's/PeriodNb=.*/PeriodNb=48/' ${JobName} > ${JobName}.tmp ; " >> Qsub.txt
-        echo "mv ${JobName}.tmp ${JobName} ; cd - ;" >> Qsub.txt
+        echo "mv ${JobName}.tmp ${JobName} ; " >> Qsub.txt
+        echo "ccc_msub ${JobName} ; cd -"      >> Qsub.txt
       fi
 
@@ -340,5 +344,4 @@
   echo
   IGCM_debug_Print 1 "IGCM_ensemble_CastFilesUpdate :"
-  echo
 
   HumanDateBegin=$(   IGCM_date_ConvertFormatToHuman ${1} )
@@ -416,5 +419,4 @@
   echo
   IGCM_debug_Print 1 "IGCM_ensemble_CastPerturbFile :"
-  echo
 
   #.. FileIn ? => RestartDate ..
@@ -438,4 +440,5 @@
   RET=$?
   if [ $RET -gt 0 ] ; then
+
 #    ${PerturbExe} ${DirIn}/${FileIn} ${DirOut}/${FileOut} \
 #                  ${PerturbVar} ${PerturbAmp}
@@ -443,8 +446,12 @@
 #    IGCM_sys_Chmod u+w ${DirOut}/${FileOut}
 #    ${PerturbExe} ${DirOut}/${FileOut} ${PerturbVar} ${PerturbAmp}
+
     IGCM_sys_Get ${DirIn}/${FileIn} ${RUN_DIR}/${FileOut}
     IGCM_sys_Chmod 744 ${RUN_DIR}/${FileOut}
 
-    ${PerturbExe} ${RUN_DIR}/${FileOut} ${PerturbVar} ${PerturbAmp}
+    IGCM_debug_Print 1 "${PerturbExe} ${RUN_DIR}/${FileOut} ${PerturbVar} ${PerturbAmp}"
+    echo
+    ${PerturbExe} ${RUN_DIR}/${FileOut} ${PerturbVar} ${PerturbAmp} > /dev/null 2>&1
+
     if [ $? -ne 0 ] ; then
       echo "Abend $( basename ${PerturbExe} )"
