Index: /trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_config/libIGCM_config.ksh	(revision 932)
+++ /trunk/libIGCM/libIGCM_config/libIGCM_config.ksh	(revision 933)
@@ -545,4 +545,10 @@
   IGCM_sys_check_quota
 
+  # check to be sure that RUN_DIR_PATH, that will be removed is not pointing to an important directory
+  echo
+  IGCM_debug_Print 1 "Check where RUN_DIR_PATH variable is pointing to"
+  IGCM_sys_check_path
+
+
   IGCM_debug_PopStack "IGCM_config_Check"
 }
@@ -1316,5 +1322,5 @@
   # and command sent from .. directory.
   IGCM_sys_Cd ..
-  [ X${JobType} = XRUN ] && IGCM_sys_Rm -rf ${RUN_DIR}
+  [ X${JobType} = XRUN ] && IGCM_sys_Rm -rf ${RUN_DIR_PATH}
 
   IGCM_debug_PopStack "IGCM_config_Finalize"
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh	(revision 932)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh	(revision 933)
@@ -1942,6 +1942,23 @@
 }
 
-############################################################
-# Check of space available on temporary filesytems.
+#D-#==================================================
+#D-function IGCM_sys_check_path
+#D-* Purpose: check that RUN_DIR_PATH that will be removed on some machine
+#D-* do not point to an important use directory. Stop immediately in that case.
+#D-* Examples:
+#D-
+function IGCM_sys_check_path {
+  IGCM_debug_PushStack "IGCM_sys_check_path"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_check_path"
+  fi
+
+  if ( [ X${RUN_DIR_PATH} = X${HOME} ] || [ X${RUN_DIR_PATH} = X${WORKDIR} ] || [ X${RUN_DIR_PATH} = X${HOMEGAYA} ] ) ; then
+    IGCM_debug_Print 1 "Variable RUN_DIR_PATH is pointing to an important directory : ${RUN_DIR_PATH}"
+    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}"
+    IGCM_debug_Exit "This will stop the job" ;;
+  fi
+  IGCM_debug_PopStack "IGCM_sys_check_path"
+}
 
 #D-#==================================================
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh	(revision 932)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh	(revision 933)
@@ -2154,6 +2154,23 @@
 }
 
-############################################################
-# Check of space available on temporary filesytems.
+#D-#==================================================
+#D-function IGCM_sys_check_path
+#D-* Purpose: check that RUN_DIR_PATH that will be removed on some machine
+#D-* do not point to an important use directory. Stop immediately in that case.
+#D-* Examples:
+#D-
+function IGCM_sys_check_path {
+  IGCM_debug_PushStack "IGCM_sys_check_path"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_check_path"
+  fi
+
+  if ( [ X${RUN_DIR_PATH} = X${HOME} ] || [ X${RUN_DIR_PATH} = X${WORKDIR} ] || [ X${RUN_DIR_PATH} = X${SCRATCHDIR} ] || [ X${RUN_DIR_PATH} = X${CCCWORKDIR} ] || [ X${RUN_DIR_PATH} = X${CCCSTOREDIR} ] ) ; then
+    IGCM_debug_Print 1 "Variable RUN_DIR_PATH is pointing to an important directory : ${RUN_DIR_PATH}"
+    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}"
+    IGCM_debug_Exit "This will stop the job" ;;
+  fi
+  IGCM_debug_PopStack "IGCM_sys_check_path"
+}
 
 #D-#==================================================
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh	(revision 932)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh	(revision 933)
@@ -1871,6 +1871,23 @@
 }
 
-############################################################
-# Check of space available on temporary filesytems. Dummy function here
+#D-#==================================================
+#D-function IGCM_sys_check_path
+#D-* Purpose: check that RUN_DIR_PATH that will be removed on some machine
+#D-* do not point to an important use directory. Stop immediately in that case.
+#D-* Examples:
+#D-
+function IGCM_sys_check_path {
+  IGCM_debug_PushStack "IGCM_sys_check_path"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_check_path"
+  fi
+
+  if ( [ X${RUN_DIR_PATH} = X${HOME} ] || [ X${RUN_DIR_PATH} = X${ARCHIVE} ] ) ; then
+    IGCM_debug_Print 1 "Variable RUN_DIR_PATH is pointing to an important directory : ${RUN_DIR_PATH}"
+    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}"
+    IGCM_debug_Exit "This will stop the job" ;;
+  fi
+  IGCM_debug_PopStack "IGCM_sys_check_path"
+}
 
 #D-#==================================================
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh	(revision 932)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh	(revision 933)
@@ -1808,6 +1808,23 @@
 }
 
-############################################################
-# Check of space available on temporary filesytems. Dummy function here
+#D-#==================================================
+#D-function IGCM_sys_check_path
+#D-* Purpose: check that RUN_DIR_PATH that will be removed on some machine
+#D-* do not point to an important use directory. Stop immediately in that case.
+#D-* Examples:
+#D-
+function IGCM_sys_check_path {
+  IGCM_debug_PushStack "IGCM_sys_check_path"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_check_path"
+  fi
+
+  if ( [ X${RUN_DIR_PATH} = X${HOME} ] || [ X${RUN_DIR_PATH} = X${WORKDIR} ] || [ X${RUN_DIR_PATH} = X${ARCHIVE} ] ) ; then
+    IGCM_debug_Print 1 "Variable RUN_DIR_PATH is pointing to an important directory : ${RUN_DIR_PATH}"
+    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}"
+    IGCM_debug_Exit "This will stop the job" ;;
+  fi
+  IGCM_debug_PopStack "IGCM_sys_check_path"
+}
 
 #D-#==================================================
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh	(revision 932)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh	(revision 933)
@@ -1900,6 +1900,23 @@
 }
 
-############################################################
-# Check of space available on temporary filesytems. Dummy function here
+#D-#==================================================
+#D-function IGCM_sys_check_path
+#D-* Purpose: check that RUN_DIR_PATH that will be removed on some machine
+#D-* do not point to an important use directory. Stop immediately in that case.
+#D-* Examples:
+#D-
+function IGCM_sys_check_path {
+  IGCM_debug_PushStack "IGCM_sys_check_path"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_check_path"
+  fi
+
+  if ( [ X${RUN_DIR_PATH} = X${HOME} ] || [ X${RUN_DIR_PATH} = X${ARCHIVE} ] ) ; then
+    IGCM_debug_Print 1 "Variable RUN_DIR_PATH is pointing to an important directory : ${RUN_DIR_PATH}"
+    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}"
+    IGCM_debug_Exit "This will stop the job" ;;
+  fi
+  IGCM_debug_PopStack "IGCM_sys_check_path"
+}
 
 #D-#==================================================
