Index: trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
===================================================================
--- trunk/libIGCM/libIGCM_config/libIGCM_config.ksh	(revision 619)
+++ trunk/libIGCM/libIGCM_config/libIGCM_config.ksh	(revision 622)
@@ -810,113 +810,117 @@
   IGCM_sys_PutBuffer_Out ${SUBMIT_DIR}/run.card ${R_BUF_KSH}/run.card rw
 
-  IGCM_debug_Print 1 "Check components binary : size and creation date"
-
-  typeset LS_comp LS_bin ExeDate ExeCpuLog NextExeSize LastCompExeSize
-  typeset comp i
-  typeset ExeNameIn ExeNameOut UpdateExe ExeSecDateMax
-
-      #==================================#
-      #        Get last Exe Size         #
-      #==================================#
-
-  (( i=0 ))
-  if ( ${FirstInitialize} ) ; then
-    run_Log_LastExeSize=""
+  if [ ${DRYRUN} -le 1 ] ; then
+
+    IGCM_debug_Print 1 "Check components binary : size and creation date"
+
+    typeset LS_comp LS_bin ExeDate ExeCpuLog NextExeSize LastCompExeSize
+    typeset comp i
+    typeset ExeNameIn ExeNameOut UpdateExe ExeSecDateMax
+
+    #==================================#
+    #        Get last Exe Size         #
+    #==================================#
+
+    (( i=0 ))
+    if ( ${FirstInitialize} ) ; then
+      run_Log_LastExeSize=""
+      for comp in ${config_ListOfComponents[*]} ; do
+        run_Log_LastExeSize[$i]=0
+        (( i=i+1 ))
+      done
+    else
+      IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/run.card Log LastExeSize
+    fi
+    #==================================#
+    #         And Build ExeDate        #
+    #==================================#
+
+    # ExeDate = ATM_Jun_12_09:34-SRF_Jun_12_09:34-OCE_Jun_12_09:34-ICE_Jun_12_09:34-CPL_Jun_12_09:33
+    # Would be nice to have next line but no way to format ls output (need to ls -l --time-style "+%Y-%m-%dT%H:%M")
+    # ExeDate = ATM_2009-06-12T09:34+SRF_2009-06-12T09:34+OCE_2009-06-12T09:34+ICE_2009-06-12T09:34+CPL_2009-06-12T09:34
+    ExeDate=""
+    NextExeSize="( "
+    (( i=0 ))
+    UpdateExe=false
+    (( ExeSecDateMax = 0 ))
     for comp in ${config_ListOfComponents[*]} ; do
-      run_Log_LastExeSize[$i]=0
+
+      IGCM_debug_Print 3 ${comp}
+
+      eval ExeNameIn=\${config_Executable_${comp}[0]}
+      eval ExeNameOut=\${config_Executable_${comp}[1]}
+      # Only if we really have an executable for the component :
+      if [ X${ExeNameIn} = X\"\" ] ; then
+        # If there is no exe file for this component
+        (( ExeSize=0 ))
+      else
+        eval LS_bin=${R_EXE}/${ExeNameIn}
+        IGCM_sys_FileSize ${LS_bin} ExeSize
+
+        set +A LS_comp -- $( LC_TIME=en_US ls -l ${LS_bin} )
+        if [ X${ExeDate} = X ] ; then
+          # First component exe date
+          ExeDate=${comp}_${LS_comp[5]}_${LS_comp[6]}
+        else
+          ExeDate=${ExeDate}-${comp}_${LS_comp[5]}_${LS_comp[6]}
+        fi
+        ExeDate=${ExeDate}_${LS_comp[7]}
+      fi
+
+      if [ ${i} -eq 0 ] ; then
+        # First component
+        NextExeSize="( "${ExeSize}
+      else
+        NextExeSize=${NextExeSize}", "${ExeSize}
+      fi
+      eval LastCompExeSize=${run_Log_LastExeSize[$i]}
       (( i=i+1 ))
+
+      if [ ${ExeSize} -ne ${LastCompExeSize} ] ; then
+        if ( ${FirstInitialize} ) ; then
+          IGCM_debug_Print 1 "Save first ${ExeNameIn} in ${R_OUT_EXE} !"
+        else
+          IGCM_debug_Print 1 "${ExeNameIn} has changed in ${R_EXE} !"
+          IGCM_debug_Print 1 "Save latest ${ExeNameIn} in ${R_OUT_EXE} !"
+          eval FileToBeDeleted[${#FileToBeDeleted[@]}]=${ExeNameOut}
+        fi
+        eval IGCM_sys_Put_Out ${ExeNameOut} ${R_OUT_EXE}/${PREFIX}_${ExeNameIn} rw
+        UpdateExe=true
+
+        IGCM_sys_GetDate_FichWork ${LS_bin} ExeSecDate
+        if [ $ExeSecDateMax -lt $ExeSecDate ] ; then
+          ExeSecDateMax=$ExeSecDate
+        fi
+      fi
     done
-  else
-    IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/run.card Log LastExeSize
-  fi
-      #==================================#
-      #		And Build ExeDate        #
-      #==================================#
-
-      # ExeDate = ATM_Jun_12_09:34-SRF_Jun_12_09:34-OCE_Jun_12_09:34-ICE_Jun_12_09:34-CPL_Jun_12_09:33
-      # Would be nice to have next line but no way to format ls output (need to ls -l --time-style "+%Y-%m-%dT%H:%M")
-      # ExeDate = ATM_2009-06-12T09:34+SRF_2009-06-12T09:34+OCE_2009-06-12T09:34+ICE_2009-06-12T09:34+CPL_2009-06-12T09:34
-  ExeDate=""
-  NextExeSize="( "
-  (( i=0 ))
-  UpdateExe=false
-  (( ExeSecDateMax = 0 ))
-  for comp in ${config_ListOfComponents[*]} ; do
-
-    IGCM_debug_Print 3 ${comp}
-
-    eval ExeNameIn=\${config_Executable_${comp}[0]}
-    eval ExeNameOut=\${config_Executable_${comp}[1]}
-        # Only if we really have an executable for the component :
-    if [ X${ExeNameIn} = X\"\" ] ; then
-          # If there is no exe file for this component
-      (( ExeSize=0 ))
-    else
-      eval LS_bin=${R_EXE}/${ExeNameIn}
-      IGCM_sys_FileSize ${LS_bin} ExeSize
-
-      set +A LS_comp -- $( LC_TIME=en_US ls -l ${LS_bin} )
-      if [ X${ExeDate} = X ] ; then
-            # First component exe date
-        ExeDate=${comp}_${LS_comp[5]}_${LS_comp[6]}
-      else
-        ExeDate=${ExeDate}-${comp}_${LS_comp[5]}_${LS_comp[6]}
+
+    # SD : switch off for now
+    #if ( ${UpdateExe} ) ; then
+    #  echo "Launch SaveSourceModifications."
+    #  IGCM_config_SaveSourceModifications ${ExeSecDateMax}
+    #fi
+
+    NextExeSize=${NextExeSize}" )"
+    IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Log LastExeSize "${NextExeSize}"
+
+    if [ ${DRYRUN} -le 1 ] ; then
+      tail -1500 ${Exe_Output} > ${Exe_Output}_tail.txt
+      ExeCpuLog=$( gawk -f ${libIGCM}/libIGCM_sys/IGCM_add_out.awk ${Exe_Output}_tail.txt )
+      RET=$?
+      if [ $RET -eq 0 ] ; then
+        # ExeCpuLog variable contents 5 fields
+        echo "${CumulPeriod} ${PeriodDateBegin} ${PeriodDateEnd} ${ExeCpuLog} ${ExeDate}" |   \
+          gawk '{printf("# %11d | %15s | %15s | %19s | %19s | %15.5f | %15.5f | %15.5f | %s\n", \
+            $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/run.card
       fi
-      ExeDate=${ExeDate}_${LS_comp[7]}
-    fi
-
-    if [ ${i} -eq 0 ] ; then
-          # First component
-      NextExeSize="( "${ExeSize}
-    else
-      NextExeSize=${NextExeSize}", "${ExeSize}
-    fi
-    eval LastCompExeSize=${run_Log_LastExeSize[$i]}
-    (( i=i+1 ))
-
-    if [ ${ExeSize} -ne ${LastCompExeSize} ] ; then
-      if ( ${FirstInitialize} ) ; then
-        IGCM_debug_Print 1 "Save first ${ExeNameIn} in ${R_OUT_EXE} !"
-      else
-        IGCM_debug_Print 1 "${ExeNameIn} has changed in ${R_EXE} !"
-        IGCM_debug_Print 1 "Save latest ${ExeNameIn} in ${R_OUT_EXE} !"
-        eval FileToBeDeleted[${#FileToBeDeleted[@]}]=${ExeNameOut}
-      fi
-      eval IGCM_sys_Put_Out ${ExeNameOut} ${R_OUT_EXE}/${PREFIX}_${ExeNameIn} rw
-      UpdateExe=true
-
-      IGCM_sys_GetDate_FichWork ${LS_bin} ExeSecDate
-      if [ $ExeSecDateMax -lt $ExeSecDate ] ; then
-        ExeSecDateMax=$ExeSecDate
-      fi
-    fi
-  done
-
-# SD : switch off for now
-#      if ( ${UpdateExe} ) ; then
-#	echo "Launch SaveSourceModifications."
-#	IGCM_config_SaveSourceModifications ${ExeSecDateMax}
-#      fi
-
-  NextExeSize=${NextExeSize}" )"
-  IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Log LastExeSize "${NextExeSize}"
-
-  if [ ${DRYRUN} -le 1 ] ; then
-    tail -1500 ${Exe_Output} > ${Exe_Output}_tail.txt
-    ExeCpuLog=$( gawk -f ${libIGCM}/libIGCM_sys/IGCM_add_out.awk ${Exe_Output}_tail.txt )
-    RET=$?
-    if [ $RET -eq 0 ] ; then
-          # ExeCpuLog variable contents 5 fields
-      echo "${CumulPeriod} ${PeriodDateBegin} ${PeriodDateEnd} ${ExeCpuLog} ${ExeDate}" |   \
-        gawk '{printf("# %11d | %15s | %15s | %19s | %19s | %15.5f | %15.5f | %15.5f | %s\n", \
-            $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/run.card
-    fi
-    eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}_tail.txt"
-  fi
-
-      # All was right ? no ? then we stop.
+      eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}_tail.txt"
+    fi
+
+  fi
+
+  # All was right ? no ? then we stop.
   IGCM_debug_Verif_Exit
 
-      # If all was OK, we can delete all files not necessary for next Job
+  # If all was OK, we can delete all files not necessary for next Job
   echo
   IGCM_debug_Print 1 "Files that will be deleted before next period-run : "
@@ -928,11 +932,11 @@
   fi
 
-      #=================================================#
-      #		Modification of libIGCM behaviour	#
-      #=================================================#
-
-      # To use this function, one must copy libIGCM.card from ${libIGCM} directory
-      # and put it in ${SUBMIT_DIR} directory. After modifications of ${SUBMIT_DIR}/libIGCM.card,
-      # variables define inside [UserChanges] will be modified for next Period of libIGCM main loop.
+  #=================================================#
+  #         Modification of libIGCM behaviour       #
+  #=================================================#
+
+  # To use this function, one must copy libIGCM.card from ${libIGCM} directory
+  # and put it in ${SUBMIT_DIR} directory. After modifications of ${SUBMIT_DIR}/libIGCM.card,
+  # variables define inside [UserChanges] will be modified for next Period of libIGCM main loop.
   if [ -f ${SUBMIT_DIR}/libIGCM.card ] ; then
     echo
@@ -945,5 +949,5 @@
     IGCM_debug_Print 2 "libIGCM_UserChanges" ${libIGCM_UserChanges[*]}
 
-        # Special treatments for libIGCM internals
+    # Special treatments for libIGCM internals
     for option in ${libIGCM_UserChanges[*]} ; do
       IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/libIGCM.card UserChanges ${option}
@@ -960,5 +964,5 @@
         DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
 
-          # Period Length In Days between DateBegin and DateEnd
+        # Period Length In Days between DateBegin and DateEnd
         (( ExperienceLengthInDays=$( IGCM_date_DaysBetweenGregorianDate ${DateEnd} ${DateBegin} )  + 1 ))
         if [ ${ExperienceLengthInDays} -lt 0 ] ; then
