Index: trunk/libIGCM/AA_SE_Checker
===================================================================
--- trunk/libIGCM/AA_SE_Checker	(revision 395)
+++ trunk/libIGCM/AA_SE_Checker	(revision 396)
@@ -3,12 +3,10 @@
 #**************************************************************
 # Author: Sebastien Denvil
-# Contact: Sebastien.Denvil@ipsl.jussieu.fr
-# $Date$
-# $Author$
-# $Revision$
+# Contact: Sebastien.Denvil__at__ipsl.jussieu.fr
+# $Revision::                                          $ Revision of last commit
+# $Author::                                            $ Author of last commit
+# $Date::                                              $ Date of last commit
 # IPSL (2006)
 #  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
-# History:
-# Modification:
 #
 #**************************************************************
Index: trunk/libIGCM/AA_TimeSeries_Checker
===================================================================
--- trunk/libIGCM/AA_TimeSeries_Checker	(revision 395)
+++ trunk/libIGCM/AA_TimeSeries_Checker	(revision 396)
@@ -56,4 +56,29 @@
 
 #set -vx
+
+echo "Hi I'm here to help you complete the time series production you planned according to your *.card."
+echo "This action can potentially submit numbers of jobs (up to 50)"
+echo "This action can potentially remove unnecessary files but I will ALWAYS ask permission to do so"
+echo "\033[1;31mDo you want me to run in dryrun mode just telling what I would submit?\033[m"
+echo "\033[1;31mOr do you want me to submit job for real? Answer yes in this case.\033[m"
+echo -n " Run for real (y/n) :"
+read ActionAnswer
+
+case ${ActionAnswer} in    
+    oui|OUI|o|y|yes|YES)
+	echo "OK. I will submit jobs but ask permissions before removing files"
+	action=true
+	;;
+    non|NON|n|no|NO)
+	echo "OK. I won't submit jobs and only print out files I could remove"
+	action=false
+	;;
+    *)
+	echo "I did not recognize your answer. I will stop here."
+	echo "Please respond: oui|OUI|o|y|yes|YES"
+	echo "Or please respond: non|NON|n|no|NO"
+	exit
+	;;
+esac
 
 # First of all
@@ -297,5 +322,5 @@
 				    (( countGood = countGood + 1 ))
 				    # Then we do not need the best candidat if any
-				    [ ${FoundCandidat} = true ] && set +A RemoveList ${RemoveList[*]} ${config_UserChoices_JobName}_${ChunckDebut}_${BestCandidat}_${FlagDir}_${var}.nc
+				    [ ${FoundCandidat} = true ] && set +A RemoveList ${RemoveList[*]} ${DIRECTORY}/${config_UserChoices_JobName}_${ChunckDebut}_${BestCandidat}_${FlagDir}_${var}.nc
 				fi
 				(( countTotal = countTotal + 1 ))
@@ -313,5 +338,24 @@
 			    if [ ${RemoveList} ] ; then
 				IGCM_debug_Print 2 "File(s) that will be removed ${RemoveList[*]}"
-				#IGCM_sys_Rm ${RemoveList[*]}
+				if [ ${action} = true ] ; then
+				    echo "\033[1;32mDo you want to remove them?"
+				    echo -n " Your answer (y/n) : \033[m"
+				    read RemoveAnswer
+				    case ${RemoveAnswer} in    
+					oui|OUI|o|y|yes|YES)
+					    echo "OK. I will erase them"
+					    IGCM_sys_Rm ${RemoveList[*]}
+					    ;;
+					non|NON|n|no|NO)
+					    echo "OK. I won't erase them"
+					    ;;
+					*)
+					    echo "I did not recognize your answer."
+					    echo "Please respond: oui|OUI|o|y|yes|YES"
+					    echo "Or please respond: non|NON|n|no|NO"
+					    exit
+					    ;;
+				    esac
+				fi
 			    fi
 			    #[ ${FoundCandidat} = true ] && IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag[*]}"
@@ -347,22 +391,26 @@
 				# TO REWRITE END
 				#
-				IGCM_debug_Print 2 -e "\033[1;31mSubmit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin} and CompletedFlag=${ChunckCompletedFlag}"
-				listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask,CompToRead,FlagToRead"
-				export libIGCM=${libIGCM}
-				export SUBMIT_DIR=${CARD_DIR}
-				export POST_DIR=${POST_DIR}
-				export DateBegin=${ChunckDebut}
-				export PeriodDateEnd=${ChunckFin}
-				export CompletedFlag=${ChunckCompletedFlag}
-				export TsTask=Chunck${Dimension}
-				export CompToRead=${comp}
-				export FlagToRead=${i}
-				export NameToRead=${flag_post}
-				export listVarEnv=${listVarEnv}
-                                IGCM_sys_MkdirWork ${POST_DIR}
-                                IGCM_debug_Verif_Exit
-				Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}.${CompToRead}.${NameToRead}
-                                IGCM_sys_QsubPost create_ts
-				echo
+				if [ ${action} = true ] ; then
+				    IGCM_debug_Print 2 -e "\033[1;31mSubmit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin} and CompletedFlag=${ChunckCompletedFlag}"
+				    listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask,CompToRead,FlagToRead"
+				    export libIGCM=${libIGCM}
+				    export SUBMIT_DIR=${CARD_DIR}
+				    export POST_DIR=${POST_DIR}
+				    export DateBegin=${ChunckDebut}
+				    export PeriodDateEnd=${ChunckFin}
+				    export CompletedFlag=${ChunckCompletedFlag}
+				    export TsTask=Chunck${Dimension}
+				    export CompToRead=${comp}
+				    export FlagToRead=${i}
+				    export NameToRead=${flag_post}
+				    export listVarEnv=${listVarEnv}
+                                    IGCM_sys_MkdirWork ${POST_DIR}
+                                    IGCM_debug_Verif_Exit
+				    Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}.${CompToRead}.${NameToRead}
+                                    IGCM_sys_QsubPost create_ts
+				    echo
+				else
+				    IGCM_debug_Print 2 "\033[1;31mI should NOW submit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin} and CompletedFlag=${ChunckCompletedFlag}"
+				fi
 			    fi
 
@@ -404,38 +452,46 @@
 
 if [ X${Launch2D} = Xtrue ] ; then
-    #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag2D[*]}"
-    IGCM_debug_Print 2 -e "\033[1;31mSubmit 2D\033[m without chunck period ${DateBegin}-${DateEnd}"
-    listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
-    export libIGCM=${libIGCM}
-    export SUBMIT_DIR=${CARD_DIR}
-    export POST_DIR=${POST_DIR}
-    export DateBegin=${DateBegin}
-    export PeriodDateEnd=${DateEnd}
-    export CompletedFlag=${CompletedFlag}
-    export TsTask=2D
-    export listVarEnv=${listVarEnv}
-    IGCM_sys_MkdirWork ${POST_DIR}
-    IGCM_debug_Verif_Exit
-    Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
-    IGCM_sys_QsubPost create_ts
-    echo
+    if [ ${action} = true ] ; then
+        #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag2D[*]}"
+	IGCM_debug_Print 2 -e "\033[1;31mSubmit 2D\033[m without chunck period ${DateBegin}-${DateEnd}"
+	listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
+	export libIGCM=${libIGCM}
+	export SUBMIT_DIR=${CARD_DIR}
+	export POST_DIR=${POST_DIR}
+	export DateBegin=${DateBegin}
+	export PeriodDateEnd=${DateEnd}
+	export CompletedFlag=${CompletedFlag}
+	export TsTask=2D
+	export listVarEnv=${listVarEnv}
+	IGCM_sys_MkdirWork ${POST_DIR}
+	IGCM_debug_Verif_Exit
+	Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
+	IGCM_sys_QsubPost create_ts
+	echo
+    else
+	IGCM_debug_Print 2 "\033[1;31mI should NOW submit 2D without chunck\033[m period ${DateBegin}-${DateEnd}"
+    fi
 fi
 
 if [ X${Launch3D} = Xtrue ] ; then
-    #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag3D[*]}"
-    IGCM_debug_Print 2 -e "\033[1;31mSubmit 3D\033[m without chunck period ${DateBegin}-${DateEnd}"
-    listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
-    export libIGCM=${libIGCM}
-    export SUBMIT_DIR=${CARD_DIR}
-    export POST_DIR=${POST_DIR}
-    export DateBegin=${DateBegin}
-    export PeriodDateEnd=${DateEnd}
-    export CompletedFlag=${CompletedFlag}
-    export TsTask=3D
-    export listVarEnv=${listVarEnv}
-    IGCM_sys_MkdirWork ${POST_DIR}
-    IGCM_debug_Verif_Exit
-    Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
-    IGCM_sys_QsubPost create_ts
-    echo
+    if [ ${action} = true ] ; then
+        #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag3D[*]}"
+	IGCM_debug_Print 2 -e "\033[1;31mSubmit 3D\033[m without chunck period ${DateBegin}-${DateEnd}"
+	listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
+	export libIGCM=${libIGCM}
+	export SUBMIT_DIR=${CARD_DIR}
+	export POST_DIR=${POST_DIR}
+	export DateBegin=${DateBegin}
+	export PeriodDateEnd=${DateEnd}
+	export CompletedFlag=${CompletedFlag}
+	export TsTask=3D
+	export listVarEnv=${listVarEnv}
+	IGCM_sys_MkdirWork ${POST_DIR}
+	IGCM_debug_Verif_Exit
+	Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
+	IGCM_sys_QsubPost create_ts
+	echo
+    else
+	IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit 3D without chunck\033[m  period ${DateBegin}-${DateEnd}"
+    fi
 fi
Index: trunk/libIGCM/AA_create_multi_se
===================================================================
--- trunk/libIGCM/AA_create_multi_se	(revision 395)
+++ trunk/libIGCM/AA_create_multi_se	(revision 396)
@@ -218,6 +218,6 @@
 echo
 IGCM_debug_PrintVariables 3 config_UserChoices_TagName
-IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
-IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
+#IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
+#IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
 IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
 IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
Index: trunk/libIGCM/libIGCM_post/libIGCM_post.ksh
===================================================================
--- trunk/libIGCM/libIGCM_post/libIGCM_post.ksh	(revision 395)
+++ trunk/libIGCM/libIGCM_post/libIGCM_post.ksh	(revision 396)
@@ -454,6 +454,4 @@
     IGCM_debug_PushStack "IGCM_post_CheckModuloFrequency" $*
 
-    set -vx
-
     # Used by IGCM_config_Check
     # from 2 libIGCM compatible frequency (*Y, *M, *D, *y, *m, *d)
@@ -572,6 +570,4 @@
     IGCM_debug_PushStack "IGCM_post_ModuloRuntimeFrequency" $*
 
-    set -vx
-
     # Used by IGCM_post_Configure
     # - from libIGCM (config_UserChoices_PeriodLength frequency * CumulPeriod) and 
Index: trunk/libIGCM/libIGCM_sys/libIGCM_sys_cesium.ksh
===================================================================
--- trunk/libIGCM/libIGCM_sys/libIGCM_sys_cesium.ksh	(revision 395)
+++ trunk/libIGCM/libIGCM_sys/libIGCM_sys_cesium.ksh	(revision 396)
@@ -151,5 +151,14 @@
 function IGCM_sys_RshMaster {
     IGCM_debug_PushStack "IGCM_sys_RshMaster" $@
-    ssh ${MASTER} exec /bin/ksh <<-EOF
+    typeset NB_ESSAI DELAI status i
+    # number of tentative
+    NB_ESSAI=10
+    # time delay between tentative
+    DELAI=30
+    #
+    sleep ${DELAI}
+    (( i = 0 ))
+    while [ $i -lt $NB_ESSAI ] ; do
+	ssh ${MASTER} exec /bin/ksh <<-EOF
     export libIGCM=${libIGCM_SX}
     export DEBUG_debug=${DEBUG_debug}
@@ -158,8 +167,15 @@
     ${@}
 EOF
-    if [ $? -gt 0 ] ; then
-	echo "IGCM_sys_RshMaster : erreur."
-	IGCM_debug_Exit "IGCM_sys_RshMaster"
-    fi
+	status=$?
+	if [ ${status} -gt 0 ]; then
+	    IGCM_debug_Print 2 "IGCM_sys_RshMaster : ssh failed ${i}/${NB_ESSAI}"
+	    IGCM_debug_Print 2 "IGCM_sys_RshMaster : sleep ${DELAI} seconds and try again."
+	    sleep $DELAI
+        else
+	    break
+        fi
+        (( i = i + 1 ))
+    done
+
     IGCM_debug_PopStack "IGCM_sys_RshMaster"
 }
