Index: /trunk/libIGCM/AA_SE_Checker
===================================================================
--- /trunk/libIGCM/AA_SE_Checker	(revision 726)
+++ /trunk/libIGCM/AA_SE_Checker	(revision 727)
@@ -66,46 +66,21 @@
 # First of all
 #
-typeset option
-
-#==================================
-# Read UserChoices section: 
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-for option in ${config_UserChoices[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-    eval auxprint=\${config_UserChoices_${option}}
-    IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
-
-#==================================
-# Read Ensemble section: 
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card Ensemble
-echo
-
-for option in ${config_Ensemble[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-    eval auxprint=\${config_Ensemble_${option}}
-    IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
-
-#==================================
-# Read Post section: 
-IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card Post
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption : config_Post"
-
-for option in ${config_Post[*]} ; do
-  IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Post ${option}
-  eval auxprint=\${config_Post_${option}}
-  IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
-
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
+#==================================
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
+
+#==================================
+# Read ListOfComponents section:
+IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
+
+#==================================
+# Read SeasonalFrequency:
+IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Post SeasonalFrequency
+
+#
 DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
 DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
@@ -117,34 +92,4 @@
 IGCM_debug_Print 1 "DateEnd   for SE_Checker : "${DateEnd}
 echo
-
-#====================================================
-#R_SAVE : Job output directory
-#R_BUFR : Job output buffered directory
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
-
-IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
-
-IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Post SeasonalFrequency
 #
 [ X${config_Post_SeasonalFrequency} = X"NONE" ] && exit
Index: /trunk/libIGCM/AA_TimeSeries_Checker
===================================================================
--- /trunk/libIGCM/AA_TimeSeries_Checker	(revision 726)
+++ /trunk/libIGCM/AA_TimeSeries_Checker	(revision 727)
@@ -91,45 +91,15 @@
 # First of all
 #
-typeset option
-
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
 #==================================
-# Read UserChoices section: 
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-for option in ${config_UserChoices[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-    eval auxprint=\${config_UserChoices_${option}}
-    IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
 
 #==================================
-# Read Ensemble section: 
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card Ensemble
-echo
-
-for option in ${config_Ensemble[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-    eval auxprint=\${config_Ensemble_${option}}
-    IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
-
-#==================================
-# Read Post section: 
-IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card Post
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption : config_Post"
-
-for option in ${config_Post[*]} ; do
-  IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Post ${option}
-  eval auxprint=\${config_Post_${option}}
-  IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
+# Read ListOfComponents section:
+IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
 
 if [ -f ${CARD_DIR}/run.card ] ; then
@@ -163,32 +133,4 @@
 IGCM_debug_Print 1 "CompletedFlag = "${CompletedFlag}
 echo
-
-#====================================================
-#R_SAVE : Job output directory
-#R_BUFR : Job output buffered directory
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
-
-IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
 
 for comp in ${config_ListOfComponents[*]} ; do
Index: /trunk/libIGCM/AA_atlas_LMDZ
===================================================================
--- /trunk/libIGCM/AA_atlas_LMDZ	(revision 726)
+++ /trunk/libIGCM/AA_atlas_LMDZ	(revision 727)
@@ -170,63 +170,15 @@
     IGCM_sys_Get_Master ${SUBMIT_DIR}/POST        ${RUN_DIR_PATH}
 fi
-#
+
+#==================================
 # First of all
 #
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
-typeset option
-for option in ${config_UserChoices[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-done
-
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card Ensemble
-typeset option
-for option in ${config_Ensemble[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-done
-#
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-IGCM_debug_PrintVariables 3 config_UserChoices_JobName
-IGCM_debug_PrintVariables 3 config_UserChoices_LongName
-IGCM_debug_PrintVariables 3 config_UserChoices_TagName
-IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
-IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
-IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
-IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
-IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
-IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleName
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleDate
-echo
-
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
 #==================================
-#R_SAVE : Job output directory
-#R_BUFR : Job output buffered directory
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
 #
 IGCM_sys_MkdirArchive ${R_FIGR}
Index: /trunk/libIGCM/AA_atlas_ORCA_LIM
===================================================================
--- /trunk/libIGCM/AA_atlas_ORCA_LIM	(revision 726)
+++ /trunk/libIGCM/AA_atlas_ORCA_LIM	(revision 727)
@@ -171,63 +171,16 @@
 
 fi
-#
+
+#==================================
 # First of all
 #
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
-typeset option
-for option in ${config_UserChoices[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-done
-
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card Ensemble
-typeset option
-for option in ${config_Ensemble[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-done
-#
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-IGCM_debug_PrintVariables 3 config_UserChoices_JobName
-IGCM_debug_PrintVariables 3 config_UserChoices_LongName
-IGCM_debug_PrintVariables 3 config_UserChoices_TagName
-IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
-IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
-IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
-IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
-IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
-IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleName
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleDate
-echo
-
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
 #==================================
-#R_SAVE : Job output directory
-#R_BUFR : Job output buffered directory
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
+
 #
 IGCM_sys_MkdirArchive ${R_FIGR}
Index: /trunk/libIGCM/AA_atlas_ORCHIDEE
===================================================================
--- /trunk/libIGCM/AA_atlas_ORCHIDEE	(revision 726)
+++ /trunk/libIGCM/AA_atlas_ORCHIDEE	(revision 727)
@@ -179,63 +179,16 @@
     IGCM_sys_Get_Master ${SUBMIT_DIR}/POST        ${RUN_DIR_PATH}
 fi
-#
+
+#==================================
 # First of all
 #
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
-typeset option
-for option in ${config_UserChoices[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-done
-
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card Ensemble
-typeset option
-for option in ${config_Ensemble[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-done
-#
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-IGCM_debug_PrintVariables 3 config_UserChoices_JobName
-IGCM_debug_PrintVariables 3 config_UserChoices_LongName
-IGCM_debug_PrintVariables 3 config_UserChoices_TagName
-IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
-IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
-IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
-IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
-IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
-IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleName
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleDate
-echo
-
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
 #==================================
-#R_SAVE : Job output directory
-#R_BUFR : Job output buffered directory
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
+
 #
 IGCM_sys_MkdirArchive ${R_FIGR}
Index: /trunk/libIGCM/AA_atlas_PISCES
===================================================================
--- /trunk/libIGCM/AA_atlas_PISCES	(revision 726)
+++ /trunk/libIGCM/AA_atlas_PISCES	(revision 727)
@@ -170,64 +170,16 @@
     IGCM_sys_Get_Master ${SUBMIT_DIR}/POST        ${RUN_DIR_PATH}
 fi
-#
+
+#==================================
 # First of all
 #
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
-typeset option
-for option in ${config_UserChoices[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-done
-
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card Ensemble
-typeset option
-for option in ${config_Ensemble[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-done
-#
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-IGCM_debug_PrintVariables 3 config_UserChoices_JobName
-IGCM_debug_PrintVariables 3 config_UserChoices_LongName
-IGCM_debug_PrintVariables 3 config_UserChoices_TagName
-IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
-IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
-IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
-IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
-IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
-IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleName
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleDate
-echo
-
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
 #==================================
-#R_SAVE : Job output directory
-#R_BUFR : Job output buffered directory
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
-#
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
+
 IGCM_sys_MkdirArchive ${R_FIGR}
 
Index: /trunk/libIGCM/AA_clean_month
===================================================================
--- /trunk/libIGCM/AA_clean_month	(revision 726)
+++ /trunk/libIGCM/AA_clean_month	(revision 727)
@@ -52,37 +52,14 @@
 . ${libIGCM}/libIGCM_config/libIGCM_config.ksh
 
-
-#==================================
-IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card UserChoices
-
-for option in ${config_UserChoices[*]} ; do
-    IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card UserChoices ${option}
-done
-
-IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card Post
-
-for option in ${config_Post[*]} ; do
-    IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Post ${option}
-done
-
-IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card Ensemble
-
-for option in ${config_Ensemble[*]} ; do
-    IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Ensemble ${option}
-done
-
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-IGCM_debug_PrintVariables 3 config_UserChoices_JobName
-if [ 3 -le ${Verbosity} ] ; then
-	echo "--------------Debug3-->" "config_UserChoices_LongName="
-	echo "--------------Debug3-->" \"${config_UserChoices_LongName}\"
-fi
-IGCM_debug_PrintVariables 3 config_UserChoices_TagName
-IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
-IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
-IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
-IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleName
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleDate
+#==================================
+# First of all
+#
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
+#==================================
+IGCM_config_CommonConfiguration ${SUBMIT_DIR}/config.card
 
 #==================================
@@ -100,25 +77,4 @@
 fi
 
-#====================================================
-#R_SAVE : Job output directory
-#R_BUFR : Job output buffered directory
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
 IGCM_sys_TestDirArchive ${R_SAVE}
 [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive"
Index: /trunk/libIGCM/AA_create_multi_se
===================================================================
--- /trunk/libIGCM/AA_create_multi_se	(revision 726)
+++ /trunk/libIGCM/AA_create_multi_se	(revision 727)
@@ -230,59 +230,21 @@
 fi
 
-#
+#==================================
 # First of all
 #
-IGCM_card_DefineArrayFromSection   ${CARD_DIR}/config.card UserChoices
-typeset option
-for option in ${config_UserChoices[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-done
-
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card Ensemble
-typeset option
-for option in ${config_Ensemble[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-done
-#
-echo
-IGCM_debug_PrintVariables 3 config_UserChoices_TagName
-#IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
-#IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
-IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
-IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
-IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
-IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleName
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleDate
-echo
-
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
 #==================================
-#R_SAVE : Job output directory
-#R_BUFR : Job output buffered directory
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
-#
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
+
+#==================================
+# Read ListOfComponents section:
 IGCM_card_DefineArrayFromSection   ${CARD_DIR}/config.card ListOfComponents
 
+#==================================
+# Read SeasonalFrequency:
 IGCM_card_DefineArrayFromSection   ${CARD_DIR}/config.card Post
 
Index: /trunk/libIGCM/AA_create_se
===================================================================
--- /trunk/libIGCM/AA_create_se	(revision 726)
+++ /trunk/libIGCM/AA_create_se	(revision 727)
@@ -240,44 +240,11 @@
 # First of all
 #
-typeset option
-
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
 #==================================
-# Read UserChoices section: 
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-for option in ${config_UserChoices[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-    eval auxprint=\${config_UserChoices_${option}}
-    IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
-
-#==================================
-# Read Ensemble section: 
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card Ensemble
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_Ensemble"
-for option in ${config_Ensemble[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-    eval auxprint=\${config_Ensemble_${option}}
-    IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
-
-#==================================
-# Read Post section: 
-IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card Post
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption : config_Post"
-for option in ${config_Post[*]} ; do
-  IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Post ${option}
-  eval auxprint=\${config_Post_${option}}
-  IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
 
 #==================================
@@ -296,32 +263,11 @@
 
 #==================================
-#R_SAVE : Job output directory
-#R_BUFR : Job output buffered directory
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
-#
+# Read ListOfComponents section:
 IGCM_card_DefineArrayFromSection   ${CARD_DIR}/config.card ListOfComponents
-#
+
+#==================================
+# Read SeasonalFrequency:
 IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Post SeasonalFrequency
+
 #
 # Determine period for seasonnal average. Default : value from AA_job if any
Index: /trunk/libIGCM/AA_create_ts
===================================================================
--- /trunk/libIGCM/AA_create_ts	(revision 726)
+++ /trunk/libIGCM/AA_create_ts	(revision 727)
@@ -260,44 +260,11 @@
 # First of all
 #
-typeset option
-
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
 #==================================
-# Read UserChoices section: 
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-for option in ${config_UserChoices[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-    eval auxprint=\${config_UserChoices_${option}}
-    IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
-
-#==================================
-# Read Ensemble section: 
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card Ensemble
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_Ensemble"
-for option in ${config_Ensemble[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-    eval auxprint=\${config_Ensemble_${option}}
-    IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
-
-#==================================
-# Read Post section: 
-IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card Post
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption : config_Post"
-for option in ${config_Post[*]} ; do
-  IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Post ${option}
-  eval auxprint=\${config_Post_${option}}
-  IGCM_debug_Print 3 "${option} : ${auxprint}"
-done
-#
-echo
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
 
 #==================================
@@ -315,29 +282,4 @@
 fi
 
-#==================================
-#R_SAVE : Job output directory
-#R_BUFR : Job output buffered directory
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
 #
 # Determine component to take care of depending on kind of task create_ts will perform
Index: /trunk/libIGCM/AA_monitoring
===================================================================
--- /trunk/libIGCM/AA_monitoring	(revision 726)
+++ /trunk/libIGCM/AA_monitoring	(revision 727)
@@ -228,50 +228,20 @@
 fi
 
-#
+#==================================
 # First of all
 #
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
-typeset option
-for option in ${config_UserChoices[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-done
-
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card Ensemble
-typeset option
-for option in ${config_Ensemble[*]} ; do
-    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-done
-IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card ListOfComponents
-
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
 #==================================
-#R_SAVE : Job output directory
-#R_BUFR : Job output buffered directory
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_FIGR=${R_FIG}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
-
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
+
+#==================================
+# Read ListOfComponents section:
+IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
+
+# Create R_FIGR that has been defined by IGCM_config_CommonConfiguration
 IGCM_sys_MkdirArchive ${R_FIGR}
 #
Index: /trunk/libIGCM/AA_pack_debug
===================================================================
--- /trunk/libIGCM/AA_pack_debug	(revision 726)
+++ /trunk/libIGCM/AA_pack_debug	(revision 727)
@@ -243,60 +243,15 @@
 fi
 
-#====================================================
+#==================================
 # First of all
 #
-# Read config.card
-
-IGCM_card_DefineArrayFromSection     ${CARD_DIR}/config.card UserChoices
-typeset option
-for option in ${config_UserChoices[*]} ; do
-  IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-done
-#
-IGCM_card_DefineArrayFromSection     ${CARD_DIR}/config.card Ensemble
-typeset option
-for option in ${config_Ensemble[*]} ; do
-  IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-done
-#
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-IGCM_debug_PrintVariables 3 config_UserChoices_JobName
-IGCM_debug_PrintVariables 3 config_UserChoices_LongName
-IGCM_debug_PrintVariables 3 config_UserChoices_TagName
-IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
-IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
-IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
-IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
-IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
-IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleName
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleDate
-echo
-
-#====================================================
-# Prepare environment
-#R_SAVE      : Job output storage directory
-#R_BUFR      : Job output buffered directory
-#STORE_DEBUG : Where we store tar files
-
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
+#==================================
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
+
 IGCM_sys_TestDirArchive ${R_SAVE}
 [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive"
Index: /trunk/libIGCM/AA_pack_output
===================================================================
--- /trunk/libIGCM/AA_pack_output	(revision 726)
+++ /trunk/libIGCM/AA_pack_output	(revision 727)
@@ -220,61 +220,20 @@
 fi
 
-#====================================================
+#==================================
 # First of all
 #
-# Read config.card
-
-IGCM_card_DefineArrayFromSection     ${CARD_DIR}/config.card UserChoices
-typeset option
-for option in ${config_UserChoices[*]} ; do
-  IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-done
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
+#==================================
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
+
+#==================================
+# Read ListOfComponents section
+# to drive the loop over find
+IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
 #
-IGCM_card_DefineArrayFromSection     ${CARD_DIR}/config.card Ensemble
-typeset option
-for option in ${config_Ensemble[*]} ; do
-  IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-done
-#
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-IGCM_debug_PrintVariables 3 config_UserChoices_JobName
-IGCM_debug_PrintVariables 3 config_UserChoices_LongName
-IGCM_debug_PrintVariables 3 config_UserChoices_TagName
-IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
-IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
-IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
-IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
-IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
-IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleName
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleDate
-echo
-
-# Get ListOfComponents to drive the loop over find
-IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
-
-#====================================================
-#R_SAVE : Job output storage directory
-#R_BUFR : Job output buffered directory
-
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
 IGCM_sys_TestDirArchive ${R_SAVE}
 [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive"
Index: /trunk/libIGCM/AA_pack_restart
===================================================================
--- /trunk/libIGCM/AA_pack_restart	(revision 726)
+++ /trunk/libIGCM/AA_pack_restart	(revision 727)
@@ -243,60 +243,15 @@
 fi
 
-#====================================================
+#==================================
 # First of all
 #
-# Read config.card
-
-IGCM_card_DefineArrayFromSection     ${CARD_DIR}/config.card UserChoices
-typeset option
-for option in ${config_UserChoices[*]} ; do
-  IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
-done
-#
-IGCM_card_DefineArrayFromSection     ${CARD_DIR}/config.card Ensemble
-typeset option
-for option in ${config_Ensemble[*]} ; do
-  IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Ensemble ${option}
-done
-#
-echo
-IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
-IGCM_debug_PrintVariables 3 config_UserChoices_JobName
-IGCM_debug_PrintVariables 3 config_UserChoices_LongName
-IGCM_debug_PrintVariables 3 config_UserChoices_TagName
-IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
-IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
-IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
-IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
-IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
-IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleName
-IGCM_debug_PrintVariables 3 config_Ensemble_EnsembleDate
-echo
-
-#====================================================
-# Prepare environment
-#R_SAVE        : Job output storage directory
-#R_BUFR        : Job output buffered directory
-#STORE_RESTART : Where we store tar files
-
-if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
-  FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${FreeName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
-  fi
-else
-  if ( [ ! X${config_Ensemble_EnsembleName} = X ] && [ ! X${config_Ensemble_EnsembleDate} = X ] ) ; then
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_Ensemble_EnsembleName}/${config_Ensemble_EnsembleDate}/${config_UserChoices_JobName}
-  else
-    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
-  fi
-fi
+# Read libIGCM compatibility version in config.card
+# Read UserChoices section
+# Read Ensemble section
+# Read Post section
+# Define all netcdf output directories
+#==================================
+IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
+#
 IGCM_sys_TestDirArchive ${R_SAVE}
 [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive"
