Index: branches/libIGCM_CESMEP/libIGCM_config/libIGCM_config.ksh
===================================================================
--- branches/libIGCM_CESMEP/libIGCM_config/libIGCM_config.ksh	(revision 1554)
+++ branches/libIGCM_CESMEP/libIGCM_config/libIGCM_config.ksh	(revision 1559)
@@ -183,44 +183,57 @@
   #====================================================
   # Cesmep : apply default value FALSE if not defined, and if TRUE
-  # set it based on an adhoc algorithm
-  if ( [ X${config_Post_Cesmep} = XNONE ] || [ X${config_Post_Cesmep} = X ] ) ; then
+  # or *Y set it based on an adhoc algorithm
+  if ( [ X${config_Post_Cesmep} = X${NULL_STR} ] || [ X${config_Post_Cesmep} = XNONE ] || \
+       [ X${config_Post_Cesmep} = X ] ) ; then
     config_Post_Cesmep=FALSE
-  elif [ X${config_Post_Cesmep} = XTRUE ]; then 
-    if ([ ! X${config_Post_SeasonalFrequency} = XNONE ] && [ ! X${config_Post_SeasonalFrequency} = X ] ) ; then
-      config_Post_Cesmep="SE"
-    elif ([ ! X${config_Post_TimeSeriesFrequency} = XNONE ] && [ ! X${config_Post_TimeSeriesFrequency} = X ] ) ; then
-      config_Post_Cesmep="TS"
-    elif ([ ! X${config_Post_PackFrequency} = XNONE ] && [ ! X${config_Post_PackFrequency} = X ] ) ; then
-      config_Post_Cesmep="Pack"
-    else
-      # This covers case SpaceName=TEST with no SE nor TS (nor Pack)
-      config_Post_Cesmep="AtEnd"
-    fi
-    #
+  elif [ X${config_Post_Cesmep} = XTRUE ] || [[ X${config_Post_Cesmep} =~ X[1-9][0-9]?Y ]] ; then
+      if [[ X${config_Post_Cesmep} =~ X[1-9][0-9]?Y ]] ; then
+	  CesmepPeriod=${config_Post_Cesmep%Y}
+      fi
+      if ([ ! X${config_Post_SeasonalFrequency} = XNONE ] && [ ! X${config_Post_SeasonalFrequency} = X ] ) ; then
+	  config_Post_Cesmep="SE"
+      elif ([ ! X${config_Post_TimeSeriesFrequency} = XNONE ] && [ ! X${config_Post_TimeSeriesFrequency} = X ] ) ; then
+	  config_Post_Cesmep="TS"
+      elif ([ ! X${config_Post_PackFrequency} = XNONE ] && [ ! X${config_Post_PackFrequency} = X ] ) ; then
+	  config_Post_Cesmep="Pack"
+      else
+	  # This covers case SpaceName=TEST with no SE nor TS (nor Pack)
+	  config_Post_Cesmep="AtEnd"
+      fi
+  fi
+  #
+  if ([ X${config_Post_Cesmep} = XSE ]) ; then
+      if ([ X${config_Post_SeasonalFrequency} = XNONE ] || [ X${config_Post_SeasonalFrequency} = X ] ) ; then
+	  IGCM_debug_Exit "Cannot use SE for Cesmep : SE post-processing is not active"
+      else
+	  [ -z $CesmepPeriod ] && CesmepPeriod=X${config_Post_SeasonalFrequency%Y}
+      fi
+  elif ([ X${config_Post_Cesmep} = XTS ]) ; then
+      if ([ X${config_Post_TimeSeriesFrequency} = XNONE ] || [ X${config_Post_TimeSeriesFrequency} = X ] ) ; then
+	  IGCM_debug_Exit "Cannot use TS for Cesmep : TS post-processing is not active"
+      else
+	  [ -z $CesmepPeriod ] && CesmepPeriod=X${config_Post_TimeSeriesFrequency%Y}
+      fi
+  elif ([ X${config_Post_Cesmep} = XPack ]) ; then
+      if ([ X${config_Post_PackFrequency} = XNONE ] || [ X${config_Post_PackFrequency} = X ] ) ; then
+	  IGCM_debug_Exit "Cannot use Packed output for Cesmep : Pack post-processing is not active"
+      else
+	  [ -z $CesmepPeriod ] && CesmepPeriod=X${config_Post_PackFrequency%Y}
+      fi
+  elif ([ X${config_Post_Cesmep} != XAtend ]) ; then
+      IGCM_debug_Exit "config.card Post section value for Cesmep is invalid (use SE, TS, Pack, AtEnd or TRUE) : ${config_Post_Cesmep}"
   else
-      # Check that user-provided value make sense
-      if ([ X${config_Post_Cesmep} = XSE ]) ; then
-	  if ([ X${config_Post_SeasonalFrequency} = XNONE ] || [ X${config_Post_SeasonalFrequency} = X ] ) ; then
-	      IGCM_debug_Exit "Cannot use SE for Cesmep : SE post-processing is not active"
-	  fi
-      elif ([ X${config_Post_Cesmep} = XTS ]) ; then
-	  if ([ X${config_Post_TimeSeriesFrequency} = XNONE ] || [ X${config_Post_TimeSeriesFrequency} = X ] ) ; then
-	      IGCM_debug_Exit "Cannot use TS for Cesmep : TS post-processing is not active"
-	  fi
-      elif ([ X${config_Post_Cesmep} = XPack ]) ; then
-	  if ([ X${config_Post_PackFrequency} = XNONE ] || [ X${config_Post_PackFrequency} = X ] ) ; then
-	      IGCM_debug_Exit "Cannot use Packed output for Cesmep : Pack post-processing is not active"
-	  fi
-      elif ([ X${config_Post_Cesmep} != XAtend ]) ; then
-	  IGCM_debug_Exit "config.card Post section value for Cesmep is invalid (use SE, TS, Pack, AtEnd or TRUE) : ${config_Post_Cesmep}"
-      fi
-  fi
+        CesmepPeriod=NONE
+  fi
+
   if ( [ X${config_Post_CesmepComparison} = XNONE ] || [ X${config_Post_CesmepComparison} = X ] ) ; then
-      config_Post_CesmepComparison=standard_comparison
+      config_Post_CesmepComparison=run_comparison
   fi
   if ( [ X${config_Post_CesmepCode} = XNONE ] || [ X${config_Post_CesmepCode} = X ] ) ; then
       config_Post_CesmepCode=/ccc/work/cont003/gen0826/senesis/cesmep
   fi
-
+  if ( [ X${config_Post_CesmepSlices} = XNONE ] || [ X${config_Post_CesmepSlices} = X ] ) ; then
+      config_Post_CesmepSlices=10
+  fi
   #====================================================
   # IgnoreNonMonotonic : apply default value if not defined
