Index: /trunk/libIGCM/libIGCM_post/libIGCM_post.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_post/libIGCM_post.ksh	(revision 638)
+++ /trunk/libIGCM/libIGCM_post/libIGCM_post.ksh	(revision 639)
@@ -80,5 +80,6 @@
     # RebuildFrequency needs additionnal information
     if [ ${post_freq} = RebuildFrequency ] ; then
-      IGCM_post_ModuloRuntimeFrequency config_Post_post_freq config_UserChoices_PeriodLength NbRebuildDir
+      IGCM_post_ModuloRuntimeFrequency config_Post_post_freq config_UserChoices_PeriodLength NbPeriodPerFrequency
+      NbRebuildDir=${NbPeriodPerFrequency}
     else
       IGCM_post_ModuloRuntimeFrequency config_Post_post_freq config_UserChoices_PeriodLength
@@ -677,4 +678,6 @@
 	IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}"
 	IGCM_debug_Exit "Check your frequency"
+      else
+        [ X${3} = XNbPeriodPerFrequency ] && NbPeriodPerFrequency=$(( ${PeriodMasterYear} / ${PeriodSlaveYear} ))
       fi ;;
     *M|*m)
@@ -685,4 +688,6 @@
 	IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}"
 	IGCM_debug_Exit "Check your frequency"
+      else
+        [ X${3} = XNbPeriodPerFrequency ] && NbPeriodPerFrequency=$(( ( 12 * ${PeriodMasterYear} ) / ${PeriodSlaveMonth} ))
       fi ;;
     *D|*d)
@@ -713,4 +718,6 @@
 	IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}"
 	IGCM_debug_Exit "Check your frequency"
+      else
+        [ X${3} = XNbPeriodPerFrequency ] && NbPeriodPerFrequency=$(( ${PeriodMasterMonth} / ( 12 * ${PeriodSlaveYear} ) ))
       fi ;;
     *M|*m)
@@ -721,4 +728,6 @@
 	IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}"
 	IGCM_debug_Exit "Check your frequency"
+      else
+        [ X${3} = XNbPeriodPerFrequency ] && NbPeriodPerFrequency=$(( ${PeriodMasterMonth} / ${PeriodSlaveMonth} ))
       fi ;;
     *D|*d)
@@ -745,4 +754,6 @@
         IGCM_debug_Print 1 "${MasterName} frequency : ${MasterFrequency}"
 	IGCM_debug_Exit "Check your frequency"
+      else
+        [ X${3} = XNbPeriodPerFrequency ] && NbPeriodPerFrequency=$(( ${PeriodMasterDay} / ${PeriodSlaveDay} ))
       fi ;;
     esac ;;
@@ -775,5 +786,4 @@
   MasterName=$1
   SlaveName=$2
-  
   # Get the value the above name points to
   eval MasterFrequency=\${${1}}
@@ -792,5 +802,5 @@
 	if [ $(( ${CumulPeriod} * ${PeriodSlaveYear} - ${PeriodOffset} )) -ne 0 ] ; then
 	  eval ${post_freq}=true ; POST=true
-	  [ X${3} = XNbRebuildDir ] && NbRebuildDir=$(( ${PeriodMasterYear} / ${PeriodSlaveYear} ))
+	  [ X${3} = XNbPeriodPerFrequency ] && NbPeriodPerFrequency=$(( ${PeriodMasterYear} / ${PeriodSlaveYear} ))
 	fi
       fi;;
@@ -800,5 +810,5 @@
 	if [ $(( ${CumulPeriod} * ${PeriodSlaveMonth} - ${PeriodOffset} * 12 )) -ne 0 ] ; then
 	  eval ${post_freq}=true ; POST=true
-	  [ X${3} = XNbRebuildDir ] && NbRebuildDir=$(( ( 12 * ${PeriodMasterYear} ) / ${PeriodSlaveMonth} ))
+	  [ X${3} = XNbPeriodPerFrequency ] && NbPeriodPerFrequency=$(( ( 12 * ${PeriodMasterYear} ) / ${PeriodSlaveMonth} ))
 	fi
       fi;;
@@ -809,5 +819,5 @@
 	if [ $(( ${CumulPeriod} - ( ${PeriodOffset} * ${NbDays} / ${PeriodSlaveDay} ) )) -ne 0 ] ; then
 	  eval ${post_freq}=true ; POST=true
-	  [ X${3} = XNbRebuildDir ] && NbRebuildDir=$(( ( ${NbDays} * ${PeriodMasterYear} ) / ${PeriodSlaveDay} ))
+	  [ X${3} = XNbPeriodPerFrequency ] && NbPeriodPerFrequency=$(( ( ${NbDays} * ${PeriodMasterYear} ) / ${PeriodSlaveDay} ))
 	fi
       fi;;
@@ -821,5 +831,5 @@
 	if [ $(( ${CumulPeriod} * ${PeriodSlaveYear} * 12 - ${PeriodOffset} )) -ne 0 ] ; then
 	  eval ${post_freq}=true ; POST=true
-	  [ X${3} = XNbRebuildDir ] && NbRebuildDir=$(( ${PeriodMasterMonth} / ( 12 * ${PeriodSlaveYear} ) ))
+	  [ X${3} = XNbPeriodPerFrequency ] && NbPeriodPerFrequency=$(( ${PeriodMasterMonth} / ( 12 * ${PeriodSlaveYear} ) ))
 	fi
       fi;;
@@ -829,5 +839,5 @@
 	if [ $(( ${CumulPeriod} * ${PeriodSlaveMonth} -  ${PeriodOffset} )) -ne 0 ] ; then 
 	  eval ${post_freq}=true ; POST=true
-	  [ X${3} = XNbRebuildDir ] && NbRebuildDir=$(( ${PeriodMasterMonth} / ${PeriodSlaveMonth} ))
+	  [ X${3} = XNbPeriodPerFrequency ] && NbPeriodPerFrequency=$(( ${PeriodMasterMonth} / ${PeriodSlaveMonth} ))
 	fi
       fi;;
@@ -850,5 +860,5 @@
         if [ $(( ${CumulPeriod} * ${PeriodSlaveDay} - ${PeriodOffset} )) -ne 0 ] ; then
 	  eval ${post_freq}=true ; POST=true
-	  [ X${3} = XNbRebuildDir ] && NbRebuildDir=$(( ${PeriodMasterDay} / ${PeriodSlaveDay} ))
+	  [ X${3} = XNbPeriodPerFrequency ] && NbPeriodPerFrequency=$(( ${PeriodMasterDay} / ${PeriodSlaveDay} ))
 	fi
       fi;;
