Index: branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_mercurex9.ksh
===================================================================
--- branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_mercurex9.ksh	(revision 571)
+++ branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_mercurex9.ksh	(revision 592)
@@ -89,4 +89,34 @@
 #====================================================
 
+# ============ CESIUM START ============ #
+
+#====================================================
+#- Mirror libIGCM from mercure to cesium if needed
+#ROOTSYS=$( echo ${libIGCM} | gawk -F"/" '{print $3}' )
+#if [ ! ${ROOTSYS} = "home" ] ; then
+#  typeset -r MirrorlibIGCM=${MirrorlibIGCM:=true}
+#else
+#  typeset -r MirrorlibIGCM=${MirrorlibIGCM:=false}
+#fi
+
+#====================================================
+#- libIGCM_POST
+#if ( ${MirrorlibIGCM} ) ; then
+#  PATHlibIGCM=$( echo ${libIGCM} | gawk -F"${LOGIN}/" '{print $2}' | sed -e "s&/libIGCM&&" )
+#  typeset -r libIGCM_POST=${HOME}/MIRROR/${PATHlibIGCM}/libIGCM
+#else
+#  typeset -r libIGCM_POST=${libIGCM}
+#fi
+
+# ============ CESIUM  END  ============ #
+
+#====================================================
+#- MirrorlibIGCM uncomment for frontend
+typeset -r MirrorlibIGCM=${MirrorlibIGCM:=false}
+
+#====================================================
+#- libIGCM_POST uncomment for frontend
+typeset -r libIGCM_POST=${libIGCM}
+
 #====================================================
 #- R_EXE   (==> BIN_DIR = ${MODIPSL}/bin )
@@ -98,36 +128,9 @@
 
 #====================================================
-#- ARCHIVE
-typeset -r ARCHIVE=${DMFDIR}
-
-# ============ CESIUM START ============ #
-
-#====================================================
-#- Mirror libIGCM from mercure to cesium if needed
-ROOTSYS=$( echo ${libIGCM} | gawk -F"/" '{print $3}' )
-if [ ! ${ROOTSYS} = "home" ] ; then
-  typeset -r MirrorlibIGCM=${MirrorlibIGCM:=true}
-else
-  typeset -r MirrorlibIGCM=${MirrorlibIGCM:=false}
-fi
-
-#====================================================
-#- libIGCM_POST
-if ( ${MirrorlibIGCM} ) ; then
-  PATHlibIGCM=$( echo ${libIGCM} | gawk -F"${LOGIN}/" '{print $2}' | sed -e "s&/libIGCM&&" )
-  typeset -r libIGCM_POST=${HOME}/MIRROR/${PATHlibIGCM}/libIGCM
-else
-  typeset -r libIGCM_POST=${libIGCM}
-fi
-
-# ============ CESIUM  END  ============ #
-
-#====================================================
-#- MirrorlibIGCM uncomment for frontend
-#typeset -r MirrorlibIGCM=${MirrorlibIGCM:=false}
-
-#====================================================
-#- libIGCM_POST uncomment for frontend
-#typeset -r libIGCM_POST=${libIGCM}
+#- ARCHIVE (dedicated to large files)
+typeset -r ARCHIVE=${CCCSTOREDIR}
+
+#- ARCHIVE (dedicated to small/medium files)
+typeset -r STORAGE=${CCCWORKDIR}
 
 #====================================================
@@ -139,4 +142,8 @@
 #- R_OUT
 typeset -r R_OUT=${ARCHIVE}/IGCM_OUT
+
+#====================================================
+#- R_FIG (hosting figures : monitoring and atlas, and/or small files)
+typeset -r R_FIG=${STORAGE}/IGCM_OUT
 
 #====================================================
@@ -229,34 +236,34 @@
 # ============ FRONTEND START ============ #
 
-#  /bin/ksh <tmp_IGCM_sys_RshPost_$$
-#  if [ $? -gt 0 ] ; then
-#    echo "IGCM_sys_RshPost : erreur."
-#    IGCM_debug_Exit "IGCM_sys_RshPost"
-#  fi
-#  \rm tmp_IGCM_sys_RshPost_$$
+  /bin/ksh <tmp_IGCM_sys_RshPost_$$
+  if [ $? -gt 0 ] ; then
+    echo "IGCM_sys_RshPost : erreur."
+    IGCM_debug_Exit "IGCM_sys_RshPost"
+  fi
+  \rm tmp_IGCM_sys_RshPost_$$
 
 # ============ FRONTEND  END  ============ #
 
 # ============ CESIUM START ============ #
-  typeset NB_ESSAI DELAI status i
-  # number of tentative
-  NB_ESSAI=10
-  # time delay between tentative
-  DELAI=10
-  (( i = 0 ))
-  while [ $i -lt $NB_ESSAI ] ; do
-    ssh -t mercure01 ssh cesium /bin/ksh <tmp_IGCM_sys_RshPost_$$
-    status=$?
-    if [ ${status} -gt 0 ]; then
-      IGCM_debug_Print 2 "IGCM_sys_RshPost : ssh failed ${i}/${NB_ESSAI}"
-      IGCM_debug_Print 2 "IGCM_sys_RshPost : sleep ${DELAI} seconds and try again."
-      sleep $DELAI
-    else
-      break
-    fi
-    (( i = i + 1 ))
-  done 
-  # delete temporary file
-  /bin/rm tmp_IGCM_sys_RshPost_$$
+#  typeset NB_ESSAI DELAI status i
+#  # number of tentative
+#  NB_ESSAI=10
+#  # time delay between tentative
+#  DELAI=10
+#  (( i = 0 ))
+#  while [ $i -lt $NB_ESSAI ] ; do
+#    ssh -t mercure01 ssh cesium /bin/ksh <tmp_IGCM_sys_RshPost_$$
+#    status=$?
+#    if [ ${status} -gt 0 ]; then
+#      IGCM_debug_Print 2 "IGCM_sys_RshPost : ssh failed ${i}/${NB_ESSAI}"
+#      IGCM_debug_Print 2 "IGCM_sys_RshPost : sleep ${DELAI} seconds and try again."
+#      sleep $DELAI
+#    else
+#      break
+#    fi
+#    (( i = i + 1 ))
+#  done 
+#  # delete temporary file
+#  /bin/rm tmp_IGCM_sys_RshPost_$$
 # ============ CESIUM  END  ============ #
 
@@ -623,25 +630,25 @@
 # ============ FRONTEND START ============ #
 
-#  /usr/bin/nqsII/qsub -o ${POST_DIR}/${Script_Post_Output}.out ${libIGCM}/$1.job -v ${listVarEnv}
+  /usr/bin/nqsII/qsub -q scalaire -o ${POST_DIR}/${Script_Post_Output}.out ${libIGCM}/$1.job -v ${listVarEnv}
 
 # ============ FRONTEND  END  ============ #
 
 # ============ CESIUM START ============ #
-  typeset NB_ESSAI DELAI status i
-  # number of tentative
-  NB_ESSAI=10
-  # time delay between tentative
-  DELAI=10
-  (( i = 0 ))
-  while [ $i -lt $NB_ESSAI ] ; do
-    /usr/local/bin/ccc_msub -o ${POST_DIR}/${Script_Post_Output}.out -e ${POST_DIR}/${Script_Post_Output}.e.out -E "-v ${listVarEnv}" ${libIGCM_POST}/$1.job
-    status=$?
-    if [ ${status} -gt 0 ]; then
-      sleep $DELAI
-    else
-      break
-    fi
-    (( i = i + 1 ))
-  done 
+#  typeset NB_ESSAI DELAI status i
+#  # number of tentative
+#  NB_ESSAI=10
+#  # time delay between tentative
+#  DELAI=10
+#  (( i = 0 ))
+#  while [ $i -lt $NB_ESSAI ] ; do
+#    /usr/local/bin/ccc_msub -o ${POST_DIR}/${Script_Post_Output}.out -e ${POST_DIR}/${Script_Post_Output}.e.out -E "-v ${listVarEnv}" ${libIGCM_POST}/$1.job
+#    status=$?
+#    if [ ${status} -gt 0 ]; then
+#      sleep $DELAI
+#    else
+#      break
+#    fi
+#    (( i = i + 1 ))
+#  done 
 # ============ CESIUM  END  ============ #
 
@@ -950,5 +957,5 @@
     # USUAL WAY
     # add dmfind/dmget (to demigrate all offline files) :
-    dmfind $1 -state MIG -o -state OFL -o -state PAR | dmget
+    #dmfind $1 -state MIG -o -state OFL -o -state PAR | dmget
     \cp -r $1 $2 > out_rsync 2>&1
     RET=$?
@@ -1227,5 +1234,6 @@
     fi
 
-    dmget ${dm_liste[*]} > out_rsync 2>&1
+    #dmget ${dm_liste[*]} > out_rsync 2>&1
+    ccc_hsm get ${dm_liste[*]} > out_rsync 2>&1
     RET=$?
     if [ ${RET} -gt 0 ] ; then
@@ -1241,5 +1249,6 @@
     #	sleep 30
     #	echo "We try another time"
-    #	dmget ${dm_liste[*]} > out_rsync 2>&1
+    ##	dmget ${dm_liste[*]} > out_rsync 2>&1
+    #   ccc_hsm get ${dm_liste[*]} > out_rsync 2>&1
     #	RET=$?
     #	if [ ${RET} -gt 0 ] ; then
