Index: /trunk/libIGCM/AA_TimeSeries_Checker
===================================================================
--- /trunk/libIGCM/AA_TimeSeries_Checker	(revision 474)
+++ /trunk/libIGCM/AA_TimeSeries_Checker	(revision 475)
@@ -177,5 +177,5 @@
 		IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars
 		IGCM_card_DefineArrayFromOption ${card} ${flag_post} Patches
-		if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not found ${flag_post}" ] ; then
+		if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not" ] ; then
 		    # New TimeSeriesVar description, with 2D, 3D and associate ChunckJob.
 		    unset ListDimension
Index: /trunk/libIGCM/AA_job
===================================================================
--- /trunk/libIGCM/AA_job	(revision 474)
+++ /trunk/libIGCM/AA_job	(revision 475)
@@ -166,4 +166,6 @@
 #D- Increased verbosity (1, 2, 3)
 Verbosity=3
+#D- Experience type : DEB(ug), DEV(elopment), RUN (default)
+JobType=RUN
 #D- Number of execution in one job
 PeriodNb=1
@@ -171,7 +173,8 @@
 
 #D-
-# --------------------------------------------------------------------
-#D- ! Optionnal features /!\ Use with care !
-# --------------------------------------------------------------------
+# --------------------------------------------------------------------------------------------------#
+#D-                          ! Optionnal features /!\ Use with care !                               #
+# --------------------------------------------------------------------------------------------------#
+
 
 #D- Low level debug : to bypass lib test checks and stack construction
@@ -183,7 +186,4 @@
 #DEBUG_sys=false
 
-#D- Experience type : DEB(ug), DEV(elopment), RUN (default)
-JobType=RUN
-
 #D- Define running directory
 #D- Default=${TMPDIR} ie temporary batch directory
@@ -198,8 +198,12 @@
 #BIG_DIR=/somewhere/with/lot/of/space/scratchdir/may/be
 
+#D- Define input file root directory
+#D- Default=/IGCMG/common/account/of/this/machine
+#R_IN=/u/rech/por/rpor111/DATA
+
 #D- Turn in dry run mode ? (0,1,2,3)
 #D- Default=0
 #DRYRUN=3
-# YOU MUST COMPILE YOUR EXE FILES FOR DRYRUN MODE !
+# YOU HAVE TO COMPILE YOUR EXE FILES to USE DRYRUN MODE !
 # -------------------------------------------------------------------------------------
 # | DRYRUN=  |  Date computations, | sys_Get    |  Exe    | sys_Put_Out; sys_Put_Rest |
@@ -216,7 +220,8 @@
 # -------------------------------------------------------------------------------------
 
-#D- Define input file root directory
-#D- Default=/IGCMG/common/account/of/this/machine
-#R_IN=/u/rech/por/rpor111/DATA
+#D-
+# --------------------------------------------------------------------------------------------------#
+#D- ! End of optionnal features /!\ Do not modify anything below unless you know what you are doing #
+# --------------------------------------------------------------------------------------------------#
 
 #D-
Index: /trunk/libIGCM/libIGCM_card/IGCM_card_PrintOption.awk
===================================================================
--- /trunk/libIGCM/libIGCM_card/IGCM_card_PrintOption.awk	(revision 474)
+++ /trunk/libIGCM/libIGCM_card/IGCM_card_PrintOption.awk	(revision 475)
@@ -124,7 +124,7 @@
 
 if (section_found == 0) {
-	print "Error: Section not found", section, option
+	print "Error: Section not found"
 } else if (option_found == 0) {
-	print "Error: Option not found", section, option
+	print "Error: Option not found"
 } else {
 	print option_value
Index: /trunk/libIGCM/libIGCM_card/IGCM_card_PrintSection.awk
===================================================================
--- /trunk/libIGCM/libIGCM_card/IGCM_card_PrintSection.awk	(revision 474)
+++ /trunk/libIGCM/libIGCM_card/IGCM_card_PrintSection.awk	(revision 475)
@@ -109,5 +109,5 @@
 	print "Error: Section not found"
 } else if (match(option_list,"null")) {
-	print "Error: Options not found"
+	print "Error: Option not found"
 } else {
 	print option_list
Index: /trunk/libIGCM/libIGCM_card/IGCM_card_WriteOption.awk
===================================================================
--- /trunk/libIGCM/libIGCM_card/IGCM_card_WriteOption.awk	(revision 474)
+++ /trunk/libIGCM/libIGCM_card/IGCM_card_WriteOption.awk	(revision 475)
@@ -106,7 +106,7 @@
 	
 	if (section_found == 0) {
-	    print "Error: Section not found", section, option
+	    print "Error: Section not found"
 	} else if (option_found == 0) {
-	    print "Error: Option not found", section, option
+	    print "Error: Option not found"
 	}	
 	
Index: /trunk/libIGCM/libIGCM_card/libIGCM_card.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_card/libIGCM_card.ksh	(revision 474)
+++ /trunk/libIGCM/libIGCM_card/libIGCM_card.ksh	(revision 475)
@@ -52,13 +52,15 @@
 #D-* Purpose: Print an option from a given file.card and section
 #D-* Usage: IGCM_card_PrintOption file.card section option
+#D-* Only used by IGCM_card_Test.ksh
 #D-
 function IGCM_card_PrintOption
 {
     IGCM_debug_PushStack "IGCM_card_PrintOption" $@
-    if [ -r "$1" ] ; then
+    if ( [ -r "$1" ] && [ -f "$1" ] ) ; then
 	gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintOption.awk "$@"
     else
-        echo "--Error--> IGCM_card_PrintOption $@"
-        echo "           $1 is not readable"
+	echo
+        IGCM_debug_Print 1 "--Error--> IGCM_card_PrintOption $@"
+        IGCM_debug_Print 1 "           $1 is not readable"
 	IGCM_debug_Exit "IGCM_card_PrintOption"
     fi
@@ -70,13 +72,14 @@
 #D-* Purpose: Print all options from a given file.card and section
 #D-* Usage: IGCM_card_PrintSection file.card section
+#D-* Only used by IGCM_card_Test.ksh
 #D-
 function IGCM_card_PrintSection
 {
     IGCM_debug_PushStack "IGCM_card_PrintSection" $@
-    if [ -r "$1" ] ; then
+    if ( [ -r "$1" ] && [ -f "$1" ] ) ; then
 	gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintSection.awk -- "$@"
     else
-        echo "--Error--> IGCM_card_PrintSection $@"
-        echo "           $1 is not readable"
+        IGCM_debug_Print 1 "--Error--> IGCM_card_PrintSection $@"
+        IGCM_debug_Print 1 "           $1 is not readable"
 	IGCM_debug_Exit "IGCM_card_PrintSection"
     fi
@@ -93,5 +96,5 @@
 {
     IGCM_debug_PushStack "IGCM_card_DefineVariableFromOption" $@
-    if [ -r "$1" ] ; then
+    if ( [ -r "$1" ] && [ -f "$1" ] ) ; then
 	# Get basename of card file ($1)
 	typeset name1=${1##*/}
@@ -100,7 +103,10 @@
 	typeset value=$( gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintOption.awk -- "$@" )
 
-	if [ "${value}" = "Error: Option not found" ] ; then
-	    echo "Error with readding of ${name} variable in ${1} ."
-	    echo "Error: Option not found."
+	# Only if a section is missing we exit the job.
+	# We must allow missing option to keep backward compatibilty.
+	if [ "${value}" = "Error: Section not found" ] ; then
+	    echo
+	    IGCM_debug_Print 1 "Error with readding of ${name} variable in ${1}."
+	    IGCM_debug_Print 1 "Error: Section ${2} not found"
 	    IGCM_debug_Exit
 	    IGCM_debug_Verif_Exit
@@ -108,7 +114,9 @@
 	eval ${name}=${value}
     else
-        echo "--Error--> IGCM_card_DefineVariableFromOption $@"
-        echo "           $1 is not readable"
+	echo
+        IGCM_debug_Print 1 "--Error--> IGCM_card_DefineVariableFromOption"
+        IGCM_debug_Print 1 "--Error--> $1 is not readable"
 	IGCM_debug_Exit "IGCM_card_DefineVariableFromOption"
+	IGCM_debug_Verif_Exit
     fi
     IGCM_debug_PopStack "IGCM_card_DefineVariableFromOption"
@@ -124,5 +132,5 @@
 {
     IGCM_debug_PushStack "IGCM_card_DefineArrayFromOption" $@
-    if [ -r "$1" ] ; then
+    if ( [ -r "$1" ] && [ -f "$1" ] ) ; then
 	# Get basename of card file ($1)
 	typeset name1=${1##*/}
@@ -133,6 +141,7 @@
 	set +A ${name} -- $( gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintOption.awk -- "$@" | gawk -- 'BEGIN {FS="[() ,]+"} {for (i=2; i <= NF-1; i++) printf("%s ",$i)}' )
     else
-        echo "--Error--> IGCM_card_DefineArrayFromOption $@"
-        echo "           $1 is not readable"
+	echo
+        IGCM_debug_Print 1 "--Error--> IGCM_card_DefineArrayFromOption $@"
+        IGCM_debug_Print 1 "           $1 is not readable"
 	IGCM_debug_Exit "IGCM_card_DefineArrayFromOption"
     fi
@@ -149,5 +158,5 @@
 {
     IGCM_debug_PushStack "IGCM_card_DefineArrayFromSection" $@
-    if [ -r "$1" ] ; then
+    if ( [ -r "$1" ] && [ -f "$1" ] ) ; then
 	# Get basename of card file ($1)
 	typeset name1=${1##*/}
@@ -157,7 +166,14 @@
 	eval ${name}[0]=${NULL_STR}
 	set +A ${name} -- $( gawk -f ${libIGCM}/libIGCM_card/IGCM_card_PrintSection.awk -- "$@" )
-    else
-        echo "--Error--> IGCM_card_DefineArrayFromSection $@"
-        echo "           $1 is not readable"
+	if [ "$( eval echo \${${name}[@]} )" = "Error: Section not found" ] ; then
+	    echo
+	    IGCM_debug_Print 1 "Error with readding of ${name} variable in ${1}."
+	    IGCM_debug_Print 1 "Error: Section ${2} not found"
+	    IGCM_debug_Exit
+	    IGCM_debug_Verif_Exit
+	fi
+    else
+        IGCM_debug_Print 1 "--Error--> IGCM_card_DefineArrayFromSection $@"
+        IGCM_debug_Print 1 "           $1 is not readable"
 	IGCM_debug_Exit "IGCM_card_DefineArrayFromSection"
     fi
@@ -178,5 +194,5 @@
 {
     IGCM_debug_PushStack "IGCM_card_WriteOption" $@
-    if [ -r "$1" ] && [ -w "$1" ] ; then
+    if ( [ -r "$1" ] && [ -w "$1" ]  && [ -f "$1" ] ) ; then
 	typeset tmpfile=tmpfile_$$
 	( IGCM_card_PrintOption "$1" "$2" "$3" | grep "not found" ) > ${tmpfile}
@@ -185,9 +201,9 @@
 	    echo "!!! Problem with IGCM_card_WriteOption !!!"
 	    echo "Try to write : " $@
-	    echo "You have to correcte some script." 
+	    echo "You have to correct some script." 
 	    echo "We won't do anything else !"
 	    exit 1
 	fi
-	rm ${tmpfile}
+	\rm ${tmpfile}
 
 	# The tmpfile uses now the real path of the card to be modified, 
@@ -204,6 +220,7 @@
 
     else
-        echo "--Error--> IGCM_card_WriteOption $@"
-        echo "           $1 is not readable or not writable"
+	echo
+        IGCM_debug_Print 1 "--Error--> IGCM_card_WriteOption $@"
+        IGCM_debug_Print 1 "           $1 is not readable or not writable"
 	IGCM_debug_Exit "IGCM_card_WriteOption"
     fi
@@ -249,5 +266,5 @@
     IGCM_debug_PushStack "IGCM_card_WriteArrayOption" $@
 
-    if [ -r "$1" ] && [ -w "$1" ] ; then
+    if ( [ -r "$1" ] && [ -w "$1" ]  && [ -f "$1" ] ) ; then
 	typeset tmpfile=tmpfile_$$
 	if [ X"${4}" != X"" ]; then
@@ -258,6 +275,7 @@
 	fi
     else
-        echo "--Error--> IGCM_card_WriteArrayOption $@"
-        echo "           $1 is not readable or not writable"
+	echo
+	IGCM_debug_Print 1 "--Error--> IGCM_card_WriteArrayOption $@"
+	IGCM_debug_Print 1 "           $1 is not readable or not writable"
 	IGCM_debug_Exit "IGCM_card_WriteArrayOption"
     fi
@@ -294,5 +312,5 @@
     if diff IGCM_card_Test.ref.failed ${libIGCM}/libIGCM_card/IGCM_card_Test.ref > /dev/null 2>&1 ; then 
 	echo "Check libIGCM_card ...............................................[ OK ]"
-	rm -f IGCM_card_Test.ref.failed
+	IGCM_sys_Rm IGCM_card_Test.ref.failed
     else 
 	echo "Check libIGCM_card ...........................................[ FAILED ]"
Index: /trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh	(revision 474)
+++ /trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh	(revision 475)
@@ -142,5 +142,5 @@
 		    IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars
 		    IGCM_card_DefineArrayFromOption ${card} ${flag_post} Patches
-		    if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not found ${flag_post}" ] ; then
+		    if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not" ] ; then
 			# New TimeSeriesVar description, with 2D, 3D and associate ChunckJob.
 			ListDimension[0]=2D
