Index: trunk/libIGCM/libIGCM_ensemble/ENSEMBLE_DOC.txt
===================================================================
--- trunk/libIGCM/libIGCM_ensemble/ENSEMBLE_DOC.txt	(revision 1394)
+++ trunk/libIGCM/libIGCM_ensemble/ENSEMBLE_DOC.txt	(revision 1475)
@@ -10,6 +10,6 @@
    Fix minor bug: periodic member names start to 0 as for non-periodic
 
-   Create new files "Qclean.month.ENSNAME.sh" and "Qclean.year.ENSNAME.sh" which allow 
-   user to use clean_month and clean_year scripts for all members.
+   Create new file "Qclean.PeriodLength.ENSNAME.sh" which allow 
+   user to use clean_PeriodLength.job scripts for all members.
    
    New option "INITFROM_NONPERIODIC" is avalaible in ensemble.card to use different 
@@ -17,6 +17,6 @@
    
 2) Updates of Ensemble PERTURB:
-   Create new files "Qclean.month.ENSNAME.sh" and "Qclean.year.ENSNAME.sh" which allow 
-   user to use clean_month and clean_year scripts for all members.
+   Create new file "Qclean.PeriodLength.ENSNAME.sh" which allow 
+   user to use clean_PeriodLength scripts for all members.
    
 3) Updates for ins_job:
@@ -91,5 +91,5 @@
 containing all command to submit all jobs (PeriodNb=60 for all simulations).
 
-The Qclean.month/year.xxx.sh are bash files to use clean_month or clean_year script for
+The Qclean.PeriodLength.xxx.sh is bash file to use clean_PeriodLength script for
 all simulations.
 
Index: trunk/libIGCM/libIGCM_ensemble/libIGCM_ensemble.ksh
===================================================================
--- trunk/libIGCM/libIGCM_ensemble/libIGCM_ensemble.ksh	(revision 1394)
+++ trunk/libIGCM/libIGCM_ensemble/libIGCM_ensemble.ksh	(revision 1475)
@@ -1,3 +1,4 @@
 #!/bin/ksh
+#set -vx
 
 #**************************************************************
@@ -451,9 +452,6 @@
         echo "${SUBMIT} ${JobName} ; cd -"       >> ${RUN_DIR}/Qsub.${StartDir}.sh
 
-        echo "cd ${StartDir}/${MemberDir}/ ;"    >> ${RUN_DIR}/Qclean.month.${StartDir}.sh
-        echo "${libIGCM}/clean_month.job ; cd -" >> ${RUN_DIR}/Qclean.month.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"    >> ${RUN_DIR}/Qclean.year.${StartDir}.sh
-        echo "${libIGCM}/clean_year.job ; cd -"  >> ${RUN_DIR}/Qclean.year.${StartDir}.sh
+        echo "cd ${StartDir}/${MemberDir}/ ;"    >> ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh
+        echo "${libIGCM}/clean_PeriodLength.job ; cd -"  >> ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh
 
         # * Update files : config.card, Job_, COMP/comp.card
@@ -469,6 +467,5 @@
     # Done. Save ${StartDir} submission text file
     IGCM_sys_Cp ${RUN_DIR}/Qsub.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.month.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.year.${StartDir}.sh ${SUBMIT_DIR}
+    IGCM_sys_Cp ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh ${SUBMIT_DIR}
 
   # - Next DateBegin
@@ -573,9 +570,6 @@
         echo "${SUBMIT} ${JobName} ; cd -"       >> Qsub.${StartDir}.sh
 
-        echo "cd ${StartDir}/${MemberDir}/ ;"    >> ${RUN_DIR}/Qclean.month.${StartDir}.sh
-        echo "${libIGCM}/clean_month.job ; cd -" >> ${RUN_DIR}/Qclean.month.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"    >> ${RUN_DIR}/Qclean.year.${StartDir}.sh
-        echo "${libIGCM}/clean_year.job ; cd -"  >> ${RUN_DIR}/Qclean.year.${StartDir}.sh
+        echo "cd ${StartDir}/${MemberDir}/ ;"    >> ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh
+        echo "${libIGCM}/clean_PeriodLength.job ; cd -"  >> ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh
 
         # * Update files : config.card, Job_, COMP/comp.card
@@ -596,6 +590,5 @@
     # Done. Save ${StartDir} submission text file
     IGCM_sys_Cp ${RUN_DIR}/Qsub.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.month.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.year.${StartDir}.sh ${SUBMIT_DIR}
+    IGCM_sys_Cp ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh ${SUBMIT_DIR}
 
     (( DateNum = DateNum + 1 ))
@@ -681,9 +674,6 @@
       echo "${SUBMIT} ${JobName} ; cd -"        >> ${RUN_DIR}/Qsub.${StartDir}.sh
 
-      echo "cd ${StartDir}/${MemberDir}/ ;"     >> ${RUN_DIR}/Qclean.month.${StartDir}.sh
-      echo "${libIGCM}/clean_month.job ; cd -"  >> ${RUN_DIR}/Qclean.month.${StartDir}.sh
-
-      echo "cd ${StartDir}/${MemberDir}/ ;"     >> ${RUN_DIR}/Qclean.year.${StartDir}.sh
-      echo "${libIGCM}/clean_year.job ; cd -"   >> ${RUN_DIR}/Qclean.year.${StartDir}.sh
+      echo "cd ${StartDir}/${MemberDir}/ ;"     >> ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh
+      echo "${libIGCM}/clean_PeriodLength.job ; cd -"   >> ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh
 
       # * Update files : config.card, Job_, COMP/comp.card
@@ -699,6 +689,5 @@
   # Done. Save ${StartDir} submission text file
   IGCM_sys_Cp ${RUN_DIR}/Qsub.${StartDir}.sh ${SUBMIT_DIR}
-  IGCM_sys_Cp ${RUN_DIR}/Qclean.month.${StartDir}.sh ${SUBMIT_DIR}
-  IGCM_sys_Cp ${RUN_DIR}/Qclean.year.${StartDir}.sh ${SUBMIT_DIR}
+  IGCM_sys_Cp ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh ${SUBMIT_DIR}
 
   IGCM_debug_PopStack "IGCM_ensemble_CastMemberList"
@@ -733,9 +722,13 @@
     IGCM_card_WriteOption ${SUBMIT_DIR}/${StartDir}/${MemberDir}/config.card ${comp} RestartPath ${ensemble_Ens_PERTURB_INITPATH}
   done
+  # Adhoc exception for CMIP6 : exclude XIOS from the restart overrule mechanism.
+  if ( [ X${comp} = XIOS ] && [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ) ; then
+      IGCM_card_WriteOption ${SUBMIT_DIR}/${StartDir}/${MemberDir}/config.card ${comp} Restart "n"
+  fi
 
   # ==> Job
   sed -e "s/\(#.*Script_Output_\)${config_UserChoices_JobName}\(\.*\)/\1${MemberDir}\2/" \
       -e "s/\(#.*\)${config_UserChoices_JobName}\(\.*\)/\1${MemberDir} \2/"            \
-      -e "s/^PeriodNb=.*/PeriodNb=60/"                                                   \
+      -e "s/^PeriodNb=.*/PeriodNb=5/"                                                   \
       ${SUBMIT_DIR}/${StartDir}/${MemberDir}/Job_${MemberDir} > Job_${MemberDir}.tmp
   IGCM_sys_Mv Job_${MemberDir}.tmp ${SUBMIT_DIR}/${StartDir}/${MemberDir}/Job_${MemberDir}
@@ -1267,9 +1260,6 @@
         echo "${SUBMIT} ${JobName} ; cd -"       >> ${RUN_DIR}/Qsub.${StartDir}.sh
 
-        echo "cd ${StartDir}/${MemberDir}/ ;"    >> ${RUN_DIR}/Qclean.month.${StartDir}.sh
-        echo "${libIGCM}/clean_month.job ; cd -" >> ${RUN_DIR}/Qclean.month.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"    >> ${RUN_DIR}/Qclean.year.${StartDir}.sh
-        echo "${libIGCM}/clean_year.job ; cd -"  >> ${RUN_DIR}/Qclean.year.${StartDir}.sh
+        echo "cd ${StartDir}/${MemberDir}/ ;"    >> ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh
+        echo "${libIGCM}/clean_PeriodLength.job ; cd -"  >> ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh
 
         # * Update files : config.card, Job_, COMP/comp.card
@@ -1294,6 +1284,5 @@
   # Done. Save ${StartDir} submission text file
   IGCM_sys_Cp ${RUN_DIR}/Qsub.${StartDir}.sh ${SUBMIT_DIR}
-  IGCM_sys_Cp ${RUN_DIR}/Qclean.month.${StartDir}.sh ${SUBMIT_DIR}
-  IGCM_sys_Cp ${RUN_DIR}/Qclean.year.${StartDir}.sh ${SUBMIT_DIR}
+  IGCM_sys_Cp ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh ${SUBMIT_DIR}
 
   IGCM_debug_PopStack "IGCM_ensemble_DatePeriodicStarts"
@@ -1372,9 +1361,6 @@
         echo "${SUBMIT} ${JobName} ; cd -"        >> ${RUN_DIR}/Qsub.${StartDir}.sh
 
-        echo "cd ${StartDir}/${MemberDir}/ ;"     >> ${RUN_DIR}/Qclean.month.${StartDir}.sh
-        echo "${libIGCM}/clean_month.job ; cd -"  >> ${RUN_DIR}/Qclean.month.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"     >> ${RUN_DIR}/Qclean.year.${StartDir}.sh
-        echo "${libIGCM}/clean_year.job ; cd -"   >> ${RUN_DIR}/Qclean.year.${StartDir}.sh
+        echo "cd ${StartDir}/${MemberDir}/ ;"     >> ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh
+        echo "${libIGCM}/clean_PeriodLength.job ; cd -"   >> ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh
 
         # * Update files : config.card, Job_, COMP/comp.card
@@ -1387,6 +1373,5 @@
     # Done. Save ${StartDir} submission text file
     IGCM_sys_Cp ${RUN_DIR}/Qsub.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.month.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.year.${StartDir}.sh ${SUBMIT_DIR}
+    IGCM_sys_Cp ${RUN_DIR}/Qclean.PeriodLength.${StartDir}.sh ${SUBMIT_DIR}
 
     (( DateNum = DateNum + 1 ))
@@ -1451,5 +1436,5 @@
   sed -e "s/\(#.*Script_Output_\)${config_UserChoices_JobName}\(\.*\)/\1${MemberDir}\2/" \
       -e "s/\(#.*\)${config_UserChoices_JobName}\(\.*\)/\1${MemberDir} \2/"            \
-      -e "s/^PeriodNb=.*/PeriodNb=60/"                                                   \
+      -e "s/^PeriodNb=.*/PeriodNb=5/"                                                   \
       ${SUBMIT_DIR}/${StartDir}/${MemberDir}/Job_${MemberDir} > Job_${MemberDir}.tmp
   IGCM_sys_Mv Job_${MemberDir}.tmp ${SUBMIT_DIR}/${StartDir}/${MemberDir}/Job_${MemberDir}
