Index: trunk/libIGCM/ins_job
===================================================================
--- trunk/libIGCM/ins_job	(revision 1360)
+++ trunk/libIGCM/ins_job	(revision 1361)
@@ -409,5 +409,5 @@
   #.. Read input data from ensemble.card ..
   SUBMIT_DIR=${SUBMIT_DIR_ENS}
-  RUN_DIR="${WORKDIR}/ENSEMBLE"
+  RUN_DIR="${WORKDIR}/ENSEMBLE_TMP"
   #
   # Copy initial things around and define variables (hindcast/forecast case)
@@ -445,5 +445,5 @@
     IGCM_ensemble_CastMemberList
     # Done
-    IGCM_sys_Cp ${RUN_DIR}/CreatedDir.txt ${SUBMIT_DIR}
+    #IGCM_sys_Cp ${RUN_DIR}/CreatedDir.txt ${SUBMIT_DIR}
     IGCM_sys_Cd ${SUBMIT_DIR}
     # Clean
Index: trunk/libIGCM/libIGCM_ensemble/libIGCM_ensemble.ksh
===================================================================
--- trunk/libIGCM/libIGCM_ensemble/libIGCM_ensemble.ksh	(revision 1360)
+++ trunk/libIGCM/libIGCM_ensemble/libIGCM_ensemble.ksh	(revision 1361)
@@ -75,5 +75,11 @@
     IGCM_sys_Cp ${SUBMIT_DIR}/Qclean.*      ${RUN_DIR}
   fi
-
+  
+  ## Init some variables
+  CastPeriodicStart=false
+  CastNonPeriodicStart=false
+  CastRestartNonPer=false
+  CastLengthNonPer=false
+  
   # Useful?
   #if [ -f  ${SUBMIT_DIR}/CreatedDir.txt ] ; then
@@ -92,8 +98,9 @@
   IGCM_card_DefineVariableFromOption ${F_CFG_ENS} Ens_PERTURB PERIODICITY
   IGCM_card_DefineArrayFromOption    ${F_CFG_ENS} Ens_PERTURB NONPERIODIC
+  IGCM_card_DefineArrayFromOption    ${F_CFG_ENS} Ens_PERTURB RESTART_NONPERIODIC
   IGCM_card_DefineVariableFromOption ${F_CFG_ENS} Ens_PERTURB LENGTH
   IGCM_card_DefineArrayFromOption    ${F_CFG_ENS} Ens_PERTURB LENGTH_NONPERIODIC
   IGCM_card_DefineVariableFromOption ${F_CFG_ENS} Ens_PERTURB MEMBER
-  IGCM_card_DefineArrayFromOption    ${F_CFG_ENS} Ens_PERTURB MEMBER_LIST
+  IGCM_card_DefineArrayFromOption    ${F_CFG_ENS} Ens_PERTURB PERTU_MAP_LIST
   IGCM_card_DefineArrayFromOption    ${F_CFG_ENS} Ens_PERTURB MEMBER_NAMESLIST
   IGCM_card_DefineVariableFromOption ${F_CFG_ENS} Ens_PERTURB MEMBER_INITFROM
@@ -115,8 +122,9 @@
   IGCM_debug_Print 1 "PERIODICITY       = ${ensemble_Ens_PERTURB_PERIODICITY}"
   IGCM_debug_Print 1 "NONPERIODIC       = ${ensemble_Ens_PERTURB_NONPERIODIC[*]}"
-  IGCM_debug_Print 1 "LENGTH             = ${ensemble_Ens_PERTURB_LENGTH}"
-  IGCM_debug_Print 1 "LENGTH_NONPERIODIC = ${ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[*]}"
+  IGCM_debug_Print 1 "RESTART_NONPERIODIC=${ensemble_Ens_PERTURB_RESTART_NONPERIODIC[*]}"
+  IGCM_debug_Print 1 "LENGTH            = ${ensemble_Ens_PERTURB_LENGTH}"
+  IGCM_debug_Print 1 "LENGTH_NONPERIODIC= ${ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[*]}"
   IGCM_debug_Print 1 "MEMBER            = ${ensemble_Ens_PERTURB_MEMBER}"
-  IGCM_debug_Print 1 "MEMBER_LIST       = ${ensemble_Ens_PERTURB_MEMBER_LIST[*]}"
+  IGCM_debug_Print 1 "PERTU_MAP_LIST    = ${ensemble_Ens_PERTURB_PERTU_MAP_LIST[*]}"
   IGCM_debug_Print 1 "MEMBER_NAMESLIST  = ${ensemble_Ens_PERTURB_MEMBER_NAMESLIST[*]}"
   IGCM_debug_Print 1 "MEMBER_INITFROM   = ${ensemble_Ens_PERTURB_MEMBER_INITFROM}"
@@ -130,4 +138,57 @@
   IGCM_debug_Print 1 "ListOfComponents  = ${config_ListOfComponents[*]}"
 
+  ### Retro compatibility with former param name ###
+  if [ X"${ensemble_Ens_PERTURB_MEMBER_LIST[0]}" != "XOption" ];
+  then
+      if [ X"${ensemble_Ens_PERTURB_PERTU_MAP_LIST[0]}" = "XOption" ];
+      then
+	  ensemble_Ens_PERTURB_PERTU_MAP_LIST=${ensemble_Ens_PERTURB_MEMBER_LIST}
+	  IGCM_debug_Print 1 "WARNING: PERTU_MAP_LIST is deprecacated, please use PERTURB_PERTU_MAP_LIST instead."
+      else
+	  IGCM_debug_Print 1 "WARNING: both PERTURB_PERTU_MAP_LIST and PERTU_MAP_LIST are specified!"
+	  IGCM_debug_Print 1 "Ignore PERTU_MAP_LIST which is deprecated."
+      fi
+  fi
+  ####### End of retro compatibility code #######
+
+  ### Check unset variables and set them to empty
+  # Following var are set because they could be unset in some 
+  # use case (ex: non periodic if periodic is active...)
+  if [[ X"${ensemble_Ens_PERTURB_RESTART_NONPERIODIC[0]}" = "XOption" || X"${ensemble_Ens_PERTURB_RESTART_NONPERIODIC[0]}" = "X" ]];
+  then 
+      ensemble_Ens_PERTURB_RESTART_NONPERIODIC[0]=_0_
+      CastRestartNonPer=false
+  else
+      CastRestartNonPer=true
+  fi
+  if [[ X"${ensemble_Ens_PERTURB_PERTU_MAP_LIST[0]}" = "XOption" || X"${ensemble_Ens_PERTURB_PERTU_MAP_LIST[0]}" = "X" ]];
+  then 
+      ensemble_Ens_PERTURB_PERTU_MAP_LIST[0]=_0_
+  fi
+  if [[ X"${ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[0]}" = "XOption" || X"${ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[0]}" = "X" ]];
+  then 
+      CastLengthNonPer=false
+      ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[0]=_0_
+  else
+      CastLengthNonPer=true
+  fi
+  if [ X"${ensemble_Ens_PERTURB_NONPERIODIC[0]}" = "XOption" ];
+  then 
+      ensemble_Ens_PERTURB_NONPERIODIC[0]=_0_
+  fi
+  if [[ "${ensemble_Ens_PERTURB_PERIODICITY}" = _0_ || "${ensemble_Ens_PERTURB_PERIODICITY}" = '' ]];
+  then 
+      ensemble_Ens_PERTURB_PERIODICITY=NONE
+  fi
+  if [[ "${ensemble_Ens_PERTURB_MEMBER}" = _0_ || "${ensemble_Ens_PERTURB_MEMBER}" = '' ]];
+  then 
+      ensemble_Ens_PERTURB_MEMBER=NONE
+  fi
+  if [[ "${ensemble_Ens_PERTURB_END_INIT}" = _0_ || "${ensemble_Ens_PERTURB_END_INIT}" = '' ]];
+  then 
+      ensemble_Ens_PERTURB_END_INIT=${ensemble_Ens_PERTURB_BEGIN_INIT}
+  fi
+
+  ### End check unset variables ###
   PerturbExe=${ensemble_Ens_PERTURB_PERTURB_BIN[0]}
 
@@ -152,5 +213,5 @@
 
     IGCM_card_DefineVariableFromOption ${F_CFG_ENS} Ens_PERTURB MASKPATH
-
+    
     IGCM_debug_Print 1 "PerturbExe  = ${PerturbExe}"
     IGCM_debug_Print 1 "PerturbFile = ${PerturbFile}"
@@ -161,5 +222,4 @@
     ;;
   esac
-
   IGCM_ensemble_SetAlpha ${ensemble_Ens_PERTURB_MEMBER}
 
@@ -190,28 +250,82 @@
   esac
 
+################################
+  if [[ ${#ensemble_Ens_PERTURB_NONPERIODIC[*]} != ${#ensemble_Ens_PERTURB_RESTART_NONPERIODIC[*]} && CastRestartNonPer = "true" ]] ; then
+    IGCM_debug_Exit "IGCM_ensemble_CastInit: NONPERIODIC and RESTART_NONPERIODIC lists have different sizes"
+    IGCM_debug_Verif_Exit
+  fi
+  if [[ ${#ensemble_Ens_PERTURB_NONPERIODIC[*]} > 0 ]] && [[ ${ensemble_Ens_PERTURB_NONPERIODIC[0]} != _0_ ]]; then
+    DateNonPeriodicStart=true
+    
+    # Use LENGTH if no NONPERIODIC_LENGTH given
+    if [[ ${#ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[*]} < ${#ensemble_Ens_PERTURB_NONPERIODIC[*]} || ${ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[0]} = _0_ ]] ; then
+      IGCM_debug_Print 1 "WARNING: LENGTH_NONPERIODIC is not fill (or not correctly). Use LENGTH value '${ensemble_Ens_PERTURB_LENGTH}' for all NONPERIODIC runs"
+      echo "WARNING: LENGTH_NONPERIODIC is not fill (or not correctly). Use LENGTH value '${ensemble_Ens_PERTURB_LENGTH}' for all NONPERIODIC runs"
+      DateNum=0
+      while [ ${DateNum} -lt ${#ensemble_Ens_PERTURB_NONPERIODIC[*]} ] ; do
+        ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[${DateNum}]=${ensemble_Ens_PERTURB_LENGTH}
+        (( DateNum = DateNum + 1 ))
+      done
+    fi
+    # Check lengths
+    DateNum=0
+    while [ ${DateNum} -lt ${#ensemble_Ens_PERTURB_NONPERIODIC[*]} ] ; do
+	# - Check LENGTH_NONPERIODIC
+	case ${ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[${DateNum}]} in
+	    _0_)
+		IGCM_debug_Print 1 "non-periodic start not active"
+		CastNonPeriodicStart=false
+		break
+		;;
+	    *[Yy]|*[Mm])
+		IGCM_debug_Print 1 "Non-periodic duration : ${ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[${DateNum}]}"
+		CastNonPeriodicStart=true
+		;;
+	    *)
+		IGCM_debug_Exit "IGCM_ensemble_CastInit ${ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[${DateNum}]} : invalid LENGTH"
+		IGCM_debug_Exit "choose in *Y or *M"
+		IGCM_debug_Verif_Exit ;;
+	esac
+	(( DateNum = DateNum + 1 ))
+	
+	# - Check RESTART_NONPERIODIC
+	if [[ DateNonPeriodicStart ]]; then
+	    case ${ensemble_Ens_PERTURB_RESTART_NONPERIODIC[${DateNum}]} in
+		_0_)
+		    IGCM_debug_Exit "IGCM_ensemble_CastInit ${ensemble_Ens_PERTURB_RESTART_NONPERIODIC[${DateNum}]} : invalid NON PERIODIC RESTART"
+		    IGCM_debug_Verif_Exit ;;
+	    esac
+	fi
+    done
+    
+    # Use INITFROM if no INITFROM_NONPERIODIC given
+    if [ ${#ensemble_Ens_PERTURB_INITFROM_NONPERIODIC[*]} -lt ${#ensemble_Ens_PERTURB_NONPERIODIC[*]} ] ; then
+      IGCM_debug_Print 1 "WARNING: INITFROM_NONPERIODIC is not fill (or not correctly). Use INITFROM value '${ensemble_Ens_PERTURB_INITFROM}' for all NONPERIODIC runs"
+      DateNum=0
+      while [ ${DateNum} -lt ${#ensemble_Ens_PERTURB_NONPERIODIC[*]} ] ; do
+        ensemble_Ens_PERTURB_INITFROM_NONPERIODIC[${DateNum}]=${ensemble_Ens_PERTURB_INITFROM}
+        (( DateNum = DateNum + 1 ))
+      done
+    fi
+    
+    # Use INITPATH if no INITPATH_NONPERIODIC given
+    if [ ${#ensemble_Ens_PERTURB_INITPATH_NONPERIODIC[*]} -lt ${#ensemble_Ens_PERTURB_NONPERIODIC[*]} ] ; then
+      IGCM_debug_Print 1 "WARNING: INITPATH_NONPERIODIC is not fill (or not correctly). Use INITPATH value '${ensemble_Ens_PERTURB_INITPATH}' for all NONPERIODIC runs"
+      DateNum=0
+      while [ ${DateNum} -lt ${#ensemble_Ens_PERTURB_NONPERIODIC[*]} ] ; do
+        ensemble_Ens_PERTURB_INITPATH_NONPERIODIC[${DateNum}]=${ensemble_Ens_PERTURB_INITPATH}
+        (( DateNum = DateNum + 1 ))
+      done
+    fi
+  else
+    IGCM_debug_Print 1 "Non-Periodic start NOT ACTIVE"
+    DateNonPeriodicStart=false
+  fi
+################################
+
   # A few checks for the Non-Periodic case:
-  DateNum=0
-  while [ ${DateNum} -lt ${#ensemble_Ens_PERTURB_NONPERIODIC[*]} ] ; do
-
-    # - Check LENGTH_NONPERIODIC
-    case ${ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[${DateNum}]} in
-    _0_)
-      IGCM_debug_Print 1 "non-periodic start not active"
-      CastNonPeriodicStart=false
-      ;;
-    *[Yy]|*[Mm])
-      IGCM_debug_Print 1 "Non-periodic duration : ${ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[${DateNum}]}"
-      CastNonPeriodicStart=true
-      ;;
-    *)
-      IGCM_debug_Exit "IGCM_ensemble_CastInit ${ensemble_Ens_PERTURB_LENGTH_NONPERIODIC[${DateNum}]} : invalid LENGTH"
-      IGCM_debug_Exit "choose in *Y or *M"
-      IGCM_debug_Verif_Exit ;;
-    esac
-    (( DateNum = DateNum + 1 ))
-  done
-
-  # A few checks for the MEMBER_LIST case:
-  case ${ensemble_Ens_PERTURB_MEMBER_LIST[0]} in
+  
+  # A few checks for the PERTU_MAP_LIST case:
+  case ${ensemble_Ens_PERTURB_PERTU_MAP_LIST[0]} in
   _0_)
     IGCM_debug_Print 1 "list of perturbation maps not active"
@@ -227,12 +341,12 @@
     fi
 
-    # test that MEMBER_NAMESLIST and MEMBER_LIST have the same size
-
-    if [ ${#ensemble_Ens_PERTURB_MEMBER_LIST[*]} -ne ${#ensemble_Ens_PERTURB_MEMBER_NAMESLIST[*]} ] ; then
-      IGCM_debug_Exit "number of elements in MEMBER_LIST and MEMBER_NAMESLIST differ"
+    # test that MEMBER_NAMESLIST and PERTU_MAP_LIST have the same size
+
+    if [ ${#ensemble_Ens_PERTURB_PERTU_MAP_LIST[*]} -ne ${#ensemble_Ens_PERTURB_MEMBER_NAMESLIST[*]} ] ; then
+      IGCM_debug_Exit "number of elements in PERTU_MAP_LIST and MEMBER_NAMESLIST differ"
       IGCM_debug_Verif_Exit
     fi
 
-    IGCM_debug_Print 1 "list of perturbation maps : ${ensemble_Ens_PERTURB_MEMBER_LIST[*]}"
+    IGCM_debug_Print 1 "list of perturbation maps : ${ensemble_Ens_PERTURB_PERTU_MAP_LIST[*]}"
     IGCM_debug_Print 1 "list of members names : ${ensemble_Ens_PERTURB_MEMBER_NAMESLIST[*]}"
     CastMemberList=true
@@ -240,5 +354,5 @@
   esac
 
-#  IGCM_debug_Exit "fin du test MEMBER_LIST"
+#  IGCM_debug_Exit "fin du test PERTU_MAP_LIST"
 #  IGCM_debug_Verif_Exit
 
@@ -334,12 +448,12 @@
 
         # Dump command to be lauched
-        echo "cd ${StartDir}/${MemberDir}/ ;"               >> ${RUN_DIR}/Qsub.${StartDir}.sh
-        echo "${SUBMIT} ${JobName} ; cd -"                  >> ${RUN_DIR}/Qsub.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"               >> ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh
-        echo "${libIGCM}/clean_PeriodLenght.job ; cd -"     >> ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"               >> ${RUN_DIR}/Qclean.latestPackPeriod.${StartDir}.sh
-        echo "${libIGCM}/clean_latestPackPeriod.job ; cd -" >> ${RUN_DIR}/Qclean.latestPackPeriod.${StartDir}.sh
+        echo "cd ${StartDir}/${MemberDir}/ ;"    >> ${RUN_DIR}/Qsub.${StartDir}.sh
+        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
 
         # * Update files : config.card, Job_, COMP/comp.card
@@ -355,6 +469,6 @@
     # Done. Save ${StartDir} submission text file
     IGCM_sys_Cp ${RUN_DIR}/Qsub.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.latestPackPeriod.${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}
 
   # - Next DateBegin
@@ -408,7 +522,11 @@
 
   # - Determine RestartDate
-    (( Offset = -1 ))
-    (( RestartDate = $( IGCM_date_AddDaysToGregorianDate ${DateBegin} ${Offset} ) ))
-
+    if [[ ${CastRestartNonPer} == "true" ]]; then
+        RestartDate=${ensemble_Ens_PERTURB_RESTART_NONPERIODIC[${DateNum}]}
+    else
+        (( Offset = -1 ))
+        (( RestartDate = $( IGCM_date_AddDaysToGregorianDate ${DateBegin} ${Offset} ) ))
+    fi
+    
     IGCM_debug_Print 2 "${DateBegin} => ${DateEnd} : ${StartDir}"
 
@@ -452,12 +570,12 @@
 
         # Dump command to be lauched
-        echo "cd ${StartDir}/${MemberDir}/ ;"              >> Qsub.${StartDir}.sh
-        echo "${SUBMIT} ${JobName} ; cd -"                 >> Qsub.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"              >> ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh
-        echo "${libIGCM}/clean_PeriodLenght.job ; cd -"    >> ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"               >> ${RUN_DIR}/Qclean.latestPackPeriod.${StartDir}.sh
-        echo "${libIGCM}/clean_latestPackPeriod.job ; cd -" >> ${RUN_DIR}/Qclean.latestPackPeriod.${StartDir}.sh
+        echo "cd ${StartDir}/${MemberDir}/ ;"    >> Qsub.${StartDir}.sh
+        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
 
         # * Update files : config.card, Job_, COMP/comp.card
@@ -466,4 +584,5 @@
           DateEnd=${PeriodDateEnd}
         fi
+	
         IGCM_ensemble_CastFilesUpdate ${DateBegin} ${DateEnd} ${RestartDate}
 
@@ -477,6 +596,6 @@
     # Done. Save ${StartDir} submission text file
     IGCM_sys_Cp ${RUN_DIR}/Qsub.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.latestPackPeriod.${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}
 
     (( DateNum = DateNum + 1 ))
@@ -537,8 +656,8 @@
   # - Loop over members
   i=0
-  nbmember=${#ensemble_Ens_PERTURB_MEMBER_LIST[*]}
+  nbmember=${#ensemble_Ens_PERTURB_PERTU_MAP_LIST[*]}
   while [ $i -lt $nbmember ] ; do
     MemberDir=${ensemble_Ens_PERTURB_MEMBER_NAMESLIST[${i}]}
-    MemberVec=${ensemble_Ens_PERTURB_MEMBER_LIST[${i}]}
+    MemberVec=${ensemble_Ens_PERTURB_PERTU_MAP_LIST[${i}]}
 
     JobName="Job_${MemberDir}"
@@ -559,12 +678,12 @@
 
       # Dump command to be lauched
-      echo "cd ${StartDir}/${MemberDir}/ ;"                >> ${RUN_DIR}/Qsub.${StartDir}.sh
-      echo "${SUBMIT} ${JobName} ; cd -"                   >> ${RUN_DIR}/Qsub.${StartDir}.sh
-
-      echo "cd ${StartDir}/${MemberDir}/ ;"                >> ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh
-      echo "${libIGCM}/clean_PeriodLenght.job ; cd -"      >> ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh
-
-      echo "cd ${StartDir}/${MemberDir}/ ;"                >> ${RUN_DIR}/Qclean.latestPackPeriod.${StartDir}.sh
-      echo "${libIGCM}/clean_latestPackPeriod.job ; cd -"  >> ${RUN_DIR}/Qclean.latestPackPeriod.${StartDir}.sh
+      echo "cd ${StartDir}/${MemberDir}/ ;"     >> ${RUN_DIR}/Qsub.${StartDir}.sh
+      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
 
       # * Update files : config.card, Job_, COMP/comp.card
@@ -580,6 +699,6 @@
   # Done. Save ${StartDir} submission text file
   IGCM_sys_Cp ${RUN_DIR}/Qsub.${StartDir}.sh ${SUBMIT_DIR}
-  IGCM_sys_Cp ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh ${SUBMIT_DIR}
-  IGCM_sys_Cp ${RUN_DIR}/Qclean.latestPackPeriod.${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_debug_PopStack "IGCM_ensemble_CastMemberList"
@@ -601,4 +720,5 @@
   IGCM_card_WriteOption ${SUBMIT_DIR}/${StartDir}/${MemberDir}/config.card Ensemble EnsembleName ${ensemble_Ens_PERTURB_NAME}
   IGCM_card_WriteOption ${SUBMIT_DIR}/${StartDir}/${MemberDir}/config.card Ensemble EnsembleDate ${StartDir}
+  IGCM_card_WriteOption ${SUBMIT_DIR}/${StartDir}/${MemberDir}/config.card Ensemble EnsembleType "Ens_PERTURB"
 
   IGCM_card_WriteOption ${SUBMIT_DIR}/${StartDir}/${MemberDir}/config.card UserChoices JobName   ${MemberDir}
@@ -1144,12 +1264,12 @@
 
         # Dump command to be lauched
-        echo "cd ${StartDir}/${MemberDir}/ ;"               >> ${RUN_DIR}/Qsub.${StartDir}.sh
-        echo "${SUBMIT} ${JobName} ; cd -"                  >> ${RUN_DIR}/Qsub.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"               >> ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh
-        echo "${libIGCM}/clean_PeriodLenght.job ; cd -"     >> ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"               >> ${RUN_DIR}/Qclean.latestPackPeriod.${StartDir}.sh
-        echo "${libIGCM}/clean_latestPackPeriod.job ; cd -" >> ${RUN_DIR}/Qclean.latestPackPeriod.${StartDir}.sh
+        echo "cd ${StartDir}/${MemberDir}/ ;"    >> ${RUN_DIR}/Qsub.${StartDir}.sh
+        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
 
         # * Update files : config.card, Job_, COMP/comp.card
@@ -1174,6 +1294,6 @@
   # Done. Save ${StartDir} submission text file
   IGCM_sys_Cp ${RUN_DIR}/Qsub.${StartDir}.sh ${SUBMIT_DIR}
-  IGCM_sys_Cp ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh ${SUBMIT_DIR}
-  IGCM_sys_Cp ${RUN_DIR}/Qclean.latestPackPeriod.${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_debug_PopStack "IGCM_ensemble_DatePeriodicStarts"
@@ -1249,12 +1369,12 @@
 
         # Dump command to be lauched
-        echo "cd ${StartDir}/${MemberDir}/ ;"                >> ${RUN_DIR}/Qsub.${StartDir}.sh
-        echo "${SUBMIT} ${JobName} ; cd -"                   >> ${RUN_DIR}/Qsub.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"                >> ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh
-        echo "${libIGCM}/clean_PeriodLenght.job ; cd -"      >> ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh
-
-        echo "cd ${StartDir}/${MemberDir}/ ;"                >> ${RUN_DIR}/Qclean.latestPackPeriod.${StartDir}.sh
-        echo "${libIGCM}/clean_latestPackPeriod.job ; cd -"  >> ${RUN_DIR}/Qclean.latestPackPeriod.${StartDir}.sh
+        echo "cd ${StartDir}/${MemberDir}/ ;"     >> ${RUN_DIR}/Qsub.${StartDir}.sh
+        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
 
         # * Update files : config.card, Job_, COMP/comp.card
@@ -1267,6 +1387,6 @@
     # Done. Save ${StartDir} submission text file
     IGCM_sys_Cp ${RUN_DIR}/Qsub.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh ${SUBMIT_DIR}
-    IGCM_sys_Cp ${RUN_DIR}/Qclean.latestPackPeriod.${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}
 
     (( DateNum = DateNum + 1 ))
@@ -1275,6 +1395,6 @@
   # Done. Save ${StartDir} submission text file
   IGCM_sys_Cp ${RUN_DIR}/Qsub.${StartDir}.sh ${SUBMIT_DIR}
-  IGCM_sys_Cp ${RUN_DIR}/Qclean.PeriodLenght.${StartDir}.sh ${SUBMIT_DIR}
-  IGCM_sys_Cp ${RUN_DIR}/Qclean.latestPackPeriod.${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_debug_PopStack "IGCM_ensemble_DateNonPeriodicStarts"
