Index: /CONFIG/UNIFORM/v6/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lmdz.card
===================================================================
--- /CONFIG/UNIFORM/v6/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lmdz.card	(revision 2342)
+++ /CONFIG/UNIFORM/v6/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lmdz.card	(revision 2343)
@@ -75,4 +75,5 @@
 	(${SUBMIT_DIR}/PARAM/output.def_${OutLevel},  output.def),    \
 	(${SUBMIT_DIR}/PARAM/config.def_${ConfType},  config.def),    \
+    (${SUBMIT_DIR}/PARAM/guide.def, .), \
 	(${SUBMIT_DIR}/PARAM/run.def, .), \
 	(${SUBMIT_DIR}/PARAM/traceur.def, .), \
Index: /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/lmdz.driver
===================================================================
--- /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/lmdz.driver	(revision 2342)
+++ /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/lmdz.driver	(revision 2343)
@@ -1,60 +1,4 @@
 #!/bin/ksh
 #-----------------------------------------------------------------
-function LMDZ_sed
-{
-# Usage : LMDZ_sed filedef var_name myvalue
-#         In file filedef modify the line containing var_name=xxx into var_name=myvalue
-    IGCM_debug_PushStack "LMDZ_sed"
-    
-    # Test if the fichier exist
-    if [ ! -f ${1} ] ; then
-	echo "WARNING : ${1} file does not exist. Following will not be done : LMDZ_sed : ${1} ${2} ${3}"
-        IGCM_debug_PopStack "LMDZ_sed"
-	return
-    fi
-
-    sed -e "s/^${2}\ *=.*/${2}= ${3}/" ${1} > ${1}.tmp
-    RET=$?
-    echo "LMDZ_sed : ${1} ${2} ${3}"
-    \mv ${1}.tmp ${1}
-
-    IGCM_debug_PopStack "LMDZ_sed"
-    return $RET
-}
-
-function LMDZ_sed_default
-{
-# Usage : LMDZ_sed_default filedef var_name
-#         In file filedef modify the line  "var_name=xxx DEFAULT= myvalue"
-#         into "var_name=myvalue"
-    IGCM_debug_PushStack "LMDZ_sed_default"
-
-    DefValue=$( grep ${2} ${1}  | awk -F"DEFAULT.=*" '{print $2}')
-
-    LMDZ_sed  ${1} ${2} $DefValue
-    IGCM_debug_PopStack "LMDZ_sed_default"
-    return $RET
-}
-
-function LMDZ_sed_xml
-{
-# Usage : LMDZ_sed_xml xml_file output_file attribute value 
-#         In file xml_file modify at the line containing id="output_file" the attribute "attribute=xxx" into "attribute=value"
-
-    IGCM_debug_PushStack "LMDZ_sed_xml"
-    # Test if the fichier exist
-    if [ ! -f ${1} ] ; then
-      echo "WARNING : ${1} file does not exist. Following will not be done : LMDZ_sed : ${1} ${2} ${3} ${4}"
-      IGCM_debug_PopStack "LMDZ_sed_xml"
-      return
-    fi
-    sed -e "/id=\"${2}\"/s/\(${3}=\"\)[^\"]*\(\"\)/\1${4}\2/" ${1} > ${1}.tmp
-    RET=$?
-    echo "LMDZ_sed : ${1} ${2} ${3} ${4}"
-    \mv ${1}.tmp ${1}
-    IGCM_debug_PopStack "LMDZ_sed_xml"
-    return $RET
-}
-
 function ATM_Initialize
 {
@@ -69,5 +13,4 @@
     RESOL_ATM_Y=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $2}' )
     RESOL_ATM_XY="${RESOL_ATM_X}x${RESOL_ATM_Y}"
-    FreqCoupling=${oasis_UserChoices_FreqCoupling:-86400}
 
     ##-- Calendar type for LMDZ and create_etat0_limit
@@ -281,93 +224,92 @@
     ##   If forcing file exist in run directory, read values for the current year 
     ##   and set in config.def. If not use the default value set in config.def
+
+    # Read value for solaire from file SOLARANDVOLCANOES.txt. If file not existing, take DEFAULT value from file. 
     if [ -f SOLARANDVOLCANOES.txt ] ; then
-	IPCC_SOLAR=`grep Annee_${year} SOLARANDVOLCANOES.txt | awk -F= '{print $2}'`
-	if [ X"${IPCC_SOLAR}" = X ] ; then
+	value=`grep Annee_${year} SOLARANDVOLCANOES.txt | awk -F= '{print $2}'`
+	if [ X"${value}" = X ] ; then
 	    # The grep returned empty variable, stop execution
 	    IGCM_debug_Exit "The file SOLARANDVOLCANOES.txt do not contain the current year."
 	    IGCM_debug_Verif_Exit
-	else
-	    # Set new variable in config.def file
-	    LMDZ_sed config.def solaire     ${IPCC_SOLAR}
-	fi
-    else
-	LMDZ_sed_default config.def solaire
-    fi
-
+	fi
+    else
+	value=DEFAULT
+    fi
+    IGCM_comp_modifyDefFile nonblocker config.def solaire $value
+
+
+    # Read value for co2_ppm from file CO2.txt. If file not existing, take DEFAULT value from file. 
     if [ -f CO2.txt ] ; then
-	IPCC_CO2=`grep Annee_${year} CO2.txt | awk -F= '{print $2}'`
-	if [ X"${IPCC_CO2}" = X ] ; then
+       	value=`grep Annee_${year} CO2.txt | awk -F= '{print $2}'`
+	if [ X"${value}" = X ] ; then
 	    # The grep returned empty variable, stop execution
 	    IGCM_debug_Exit "The file CO2.txt do not contain the current year."
 	    IGCM_debug_Verif_Exit
-	else
-	    # Set new variable in config.def file
-	    LMDZ_sed config.def co2_ppm     ${IPCC_CO2}
-	fi
-    else
-	LMDZ_sed_default config.def co2_ppm
-    fi
-
+	fi
+    else
+	value=DEFAULT
+    fi
+    IGCM_comp_modifyDefFile nonblocker config.def co2_ppm $value
+
+
+    # Read value for CH4_ppb from file CH4.txt. If file not existing, take DEFAULT value from file. 
     if [ -f CH4.txt ] ; then
-	IPCC_CH4=`grep Annee_${year} CH4.txt | awk -F= '{print $2}'`
-	if [ X"${IPCC_CH4}" = X ] ; then
+	value=`grep Annee_${year} CH4.txt | awk -F= '{print $2}'`
+	if [ X"${value}" = X ] ; then
 	    # The grep returned empty variable, stop execution
 	    IGCM_debug_Exit "The file CH4.txt do not contain the current year."
 	    IGCM_debug_Verif_Exit
-	else
-	    # Set new variable in config.def file
-	    LMDZ_sed config.def CH4_ppb     ${IPCC_CH4}
-	fi
-     else
-	LMDZ_sed_default config.def CH4_ppb
-    fi
-
+	fi
+    else
+	value=DEFAULT
+    fi
+    IGCM_comp_modifyDefFile nonblocker config.def CH4_ppb $value
+
+
+    # Read value for N2O_ppb from file N2O.txt. If file not existing, take DEFAULT value from file. 
     if [ -f N2O.txt ] ; then
-	IPCC_N2O=`grep Annee_${year} N2O.txt | awk -F= '{print $2}'`
-	if [ X"${IPCC_N2O}" = X ] ; then
+	value=`grep Annee_${year} N2O.txt | awk -F= '{print $2}'`
+	if [ X"${value}" = X ] ; then
 	    # The grep returned empty variable, stop execution
 	    IGCM_debug_Exit "The file N2O.txt do not contain the current year."
 	    IGCM_debug_Verif_Exit
-	else
-	    # Set new variable in config.def file
-	    LMDZ_sed config.def N2O_ppb     ${IPCC_N2O}
-	fi
-    else
-	LMDZ_sed_default config.def N2O_ppb
-    fi
-
+	fi
+    else
+	value=DEFAULT
+    fi
+    IGCM_comp_modifyDefFile nonblocker config.def N2O_ppb $value
+
+    # Read value for CFC11_ppt from file CFC11.txt. If file not existing, take DEFAULT value from file. 
     if [ -f CFC11.txt ] ; then
-	IPCC_CFC11=`grep Annee_${year} CFC11.txt | awk -F= '{print $2}'`
-	if [ X"${IPCC_CFC11}" = X ] ; then
+	value=`grep Annee_${year} CFC11.txt | awk -F= '{print $2}'`
+	if [ X"${value}" = X ] ; then
 	    # The grep returned empty variable, stop execution
 	    IGCM_debug_Exit "The file CFC11.txt do not contain the current year."
 	    IGCM_debug_Verif_Exit
-	else
-	    # Set new variable in config.def file
-	    LMDZ_sed config.def CFC11_ppt   ${IPCC_CFC11}
-	fi
-    else
-	LMDZ_sed_default config.def CFC11_ppt
-    fi
-
+	fi
+    else
+	value=DEFAULT
+    fi
+    IGCM_comp_modifyDefFile nonblocker config.def CFC11_ppt $value
+
+
+    # Read value for CFC12_ppt from file CFC12.txt. If file not existing, take DEFAULT value from file. 
     if [ -f CFC12.txt ] ; then
-	IPCC_CFC12=`grep Annee_${year} CFC12.txt | awk -F= '{print $2}'`
-	if [ X"${IPCC_CFC12}" = X ] ; then
+	value=`grep Annee_${year} CFC12.txt | awk -F= '{print $2}'`
+	if [ X"${value}" = X ] ; then
 	    # The grep returned empty variable, stop execution
 	    IGCM_debug_Exit "The file CFC12.txt do not contain the current year."
 	    IGCM_debug_Verif_Exit
-	else
-	    # Set new variable in config.def file
-	    LMDZ_sed config.def CFC12_ppt   ${IPCC_CFC12}
-	fi
-    else
-	LMDZ_sed_default config.def CFC12_ppt
-    fi
-
-
-    ## Coupling Time Step
-    LMDZ_t_coupl=${oasis_UserChoices_FreqCoupling:-${lmdz_UserChoices_t_coupl}}
+	fi
+    else
+	value=DEFAULT
+    fi
+    IGCM_comp_modifyDefFile nonblocker config.def CFC12_ppt $value
+
+
+    ## Coupling Time Step : Take value of FreqCoupling set in oasis.card or if it is not set, take default value 86400
+    LMDZ_t_coupl=${oasis_UserChoices_FreqCoupling:-86400}
     IGCM_debug_Print 3 "LMDZ_t_coupl "   ${LMDZ_t_coupl}
-    LMDZ_sed config.def t_coupl   ${LMDZ_t_coupl}
+    IGCM_comp_modifyDefFile nonblocker config.def t_coupl   ${LMDZ_t_coupl} 
 
     ##-- Add special treatement for CARBON CYCLE
@@ -386,104 +328,105 @@
     ## output.def parameters
     #  columns in phys_output_filekeys refer to the filenames given in phys_out_filenames in output.def :  
-    #                                            histmth       histday        histhf    histfh3h   histhf3hm   histstn
-    LMDZ_sed output.def phys_out_filekeys       "${ok_mensuel} ${ok_journe}   ${ok_hf}  ${ok_hf3h} ${ok_hf3hm} ${ok_stn}"
-    LMDZ_sed output.def ecrit_ISCCP ${LMDZ_ecrit_ISCCP}
-    LMDZ_sed output.def ok_cosp     ${LMDZ_COSP_OK}
-    LMDZ_sed output.def ok_mensuelCOSP  ${LMDZ_COSP_monthly}
-    LMDZ_sed output.def ok_journeCOSP   ${LMDZ_COSP_daily}
-    LMDZ_sed output.def ok_hfCOSP   ${LMDZ_COSP_hf}
-    LMDZ_sed output.def ok_histNMC  "${LMDZ_NMC_monthly} ${LMDZ_NMC_daily} ${LMDZ_NMC_hf}"
+    #                                            histmth       histday        histhf    histhf3h   histhf3hm   histstn
+    IGCM_comp_modifyDefFile nonblocker output.def phys_out_filekeys "${ok_mensuel} ${ok_journe}   ${ok_hf}  ${ok_hf3h} ${ok_hf3hm} ${ok_stn}"
+    IGCM_comp_modifyDefFile nonblocker output.def ecrit_ISCCP ${LMDZ_ecrit_ISCCP}
+    IGCM_comp_modifyDefFile nonblocker output.def ok_cosp     ${LMDZ_COSP_OK}
+    IGCM_comp_modifyDefFile nonblocker output.def ok_mensuelCOSP  ${LMDZ_COSP_monthly}
+    IGCM_comp_modifyDefFile nonblocker output.def ok_journeCOSP   ${LMDZ_COSP_daily}
+    IGCM_comp_modifyDefFile nonblocker output.def ok_hfCOSP   ${LMDZ_COSP_hf}
+    IGCM_comp_modifyDefFile nonblocker output.def ok_histNMC  "${LMDZ_NMC_monthly} ${LMDZ_NMC_daily} ${LMDZ_NMC_hf}"
 
     # XIOS XML definition
     # Default init : files are desactivated
-	LMDZ_sed_xml file_def_histmth_lmdz.xml histmth enabled .FALSE. 
-	LMDZ_sed_xml file_def_histday_lmdz.xml histday enabled .FALSE. 
-	LMDZ_sed_xml file_def_histhf_lmdz.xml histhf enabled .FALSE.
-	LMDZ_sed_xml file_def_histfh3h_lmdz.xml histfh3h enabled .FALSE.
-	LMDZ_sed_xml file_def_histhf3hm_lmdz.xml histfh3hm enabled .FALSE.
-	LMDZ_sed_xml file_def_histstn_lmdz.xml histstn enabled .FALSE.
-	LMDZ_sed_xml file_def_histmthNMC_lmdz.xml histmthNMC enabled .FALSE.
-	LMDZ_sed_xml file_def_histdayNMC_lmdz.xml histdayNMC enabled .FALSE.
-	LMDZ_sed_xml file_def_histhfNMC_lmdz.xml histhfNMC enabled .FALSE.
+	IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth enabled .FALSE. 
+	IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday enabled .FALSE. 
+	IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf enabled .FALSE.
+#	IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h enabled .FALSE.
+#	IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm enabled .FALSE.
+	IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn enabled .FALSE.
+	IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC enabled .FALSE.
+	IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC enabled .FALSE.
+	IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC enabled .FALSE.
 	if [ X${lmdz_UserChoices_XIOS}  = Xy ] ; then
     # Default output level : 5
-	    LMDZ_sed_xml file_def_histmth_lmdz.xml histmth output_level 5 
-	    LMDZ_sed_xml file_def_histday_lmdz.xml histday output_level 5 
-	    LMDZ_sed_xml file_def_histhf_lmdz.xml histhf output_level 5
-	    LMDZ_sed_xml file_def_histfh3h_lmdz.xml histfh3h output_level 5
-	    LMDZ_sed_xml file_def_histhf3hm_lmdz.xml histfh3hm output_level 5
-	    LMDZ_sed_xml file_def_histstn_lmdz.xml histstn output_level 5
-	    LMDZ_sed_xml file_def_histmthNMC_lmdz.xml histmthNMC output_level 5
-	    LMDZ_sed_xml file_def_histdayNMC_lmdz.xml histdayNMC output_level 5
-	    LMDZ_sed_xml file_def_histhfNMC_lmdz.xml histhfNMC output_level 5
+	    IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth output_level 5 
+	    IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_level 5 
+	    IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_level 5
+#	    IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h output_level 5
+#	    IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm output_level 5
+	    IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn output_level 5
+	    IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC output_level 5
+	    IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC output_level 5
+	    IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC output_level 5
      # Filling of XML files 
 	if [ X${ok_mensuel} = Xy ] ; then
-	    LMDZ_sed_xml file_def_histmth_lmdz.xml histmth enabled .TRUE. 
-	    LMDZ_sed_xml file_def_histmth_lmdz.xml histmth output_freq 1mo
-	    LMDZ_sed_xml file_def_histmth_lmdz.xml histmth name histmth
+	    IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth enabled .TRUE. 
+	    IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth output_freq 1mo
+	    IGCM_comp_modifyXmlFile force file_def_histmth_lmdz.xml histmth name histmth
 	fi
 	if [ X${ok_journe} = Xy ] ; then	
-	    LMDZ_sed_xml file_def_histday_lmdz.xml histday enabled .TRUE. 
-	    LMDZ_sed_xml file_def_histday_lmdz.xml histday output_freq 1d
-	    LMDZ_sed_xml file_def_histday_lmdz.xml histday name histday
+	    IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday enabled .TRUE. 
+	    IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_freq 1d
+	    IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday name histday
 	    if [ X${OutLevel} = Xlow ] || [ X${OutLevel} = Xmedium ] ; then
-		LMDZ_sed_xml file_def_histday_lmdz.xml histday output_level 2
+		IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_level 2
 	    fi
 	fi
 	if [ X${ok_hf} = Xy ] ; then
-	    LMDZ_sed_xml file_def_histhf_lmdz.xml histhf enabled .TRUE. 
-	    LMDZ_sed_xml file_def_histhf_lmdz.xml histhf output_freq 6h
-	    LMDZ_sed_xml file_def_histhf_lmdz.xml histhf name histhf
+	    IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf enabled .TRUE. 
+	    IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_freq 6h
+	    IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf name histhf
 	    if [ X${OutLevel} = Xlow ] ; then
-		LMDZ_sed_xml file_def_histhf_lmdz.xml histhf output_level 2
+		IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_level 2
 	    fi
 	fi	
-	if [ X${ok_hf3h} = Xy ] ; then
-	    LMDZ_sed_xml file_def_histhf3h_lmdz.xml histhf3h enabled .TRUE. 
-	    LMDZ_sed_xml file_def_histhf3h_lmdz.xml histhf3h output_freq 3h
-	    LMDZ_sed_xml file_def_histhf3h_lmdz.xml histhf3h name histhf3h
-	fi	
-	if [ X${ok_hf3hm} = Xy ] ; then
-	    LMDZ_sed_xml file_def_histhf3hm_lmdz.xml histhf3hm enabled .TRUE. 
-	    LMDZ_sed_xml file_def_histhf3hm_lmdz.xml histhf3hm output_freq 3h
-	    LMDZ_sed_xml file_def_histhf3hm_lmdz.xml histhf3hm name histhf3hm
-	fi
+#	if [ X${ok_hf3h} = Xy ] ; then
+#	    IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h enabled .TRUE. 
+#	    IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h output_freq 3h
+#	    IGCM_comp_modifyXmlFile force file_def_histhf3h_lmdz.xml histhf3h name histhf3h
+#	fi	
+#	if [ X${ok_hf3hm} = Xy ] ; then
+#	    IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm enabled .TRUE. 
+#	    IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm output_freq 3h
+#	    IGCM_comp_modifyXmlFile force file_def_histhf3hm_lmdz.xml histhf3hm name histhf3hm
+#	fi
 	if [ X${ok_stn} = Xy ] ; then
-	    LMDZ_sed_xml file_def_histstn_lmdz.xml histstn enabled .TRUE. 
-	    LMDZ_sed_xml file_def_histstn_lmdz.xml histstn output_freq 1800s
-	    LMDZ_sed_xml file_def_histstn_lmdz.xml histstn name histstn
+	    IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn enabled .TRUE. 
+	    IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn output_freq 1800s
+	    IGCM_comp_modifyXmlFile force file_def_histstn_lmdz.xml histstn name histstn
 	fi
 	if [ X${LMDZ_NMC_monthly} = Xy ] ; then
-	    LMDZ_sed_xml file_def_histmthNMC_lmdz.xml histmthNMC enabled .TRUE. 
-	    LMDZ_sed_xml file_def_histmthNMC_lmdz.xml histmthNMC output_freq 1mo
-	    LMDZ_sed_xml file_def_histmthNMC_lmdz.xml histmthNMC name histmthNMC
+	    IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC enabled .TRUE. 
+	    IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC output_freq 1mo
+	    IGCM_comp_modifyXmlFile force file_def_histmthNMC_lmdz.xml histmthNMC name histmthNMC
 	fi
 	if [ X${LMDZ_NMC_daily} = Xy ] ; then
-	    LMDZ_sed_xml file_def_histdayNMC_lmdz.xml histdayNMC enabled .TRUE. 
-	    LMDZ_sed_xml file_def_histdayNMC_lmdz.xml histdayNMC output_freq 1d
-	    LMDZ_sed_xml file_def_histdayNMC_lmdz.xml histdayNMC name histdayNMC
+	    IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC enabled .TRUE. 
+	    IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC output_freq 1d
+	    IGCM_comp_modifyXmlFile force file_def_histdayNMC_lmdz.xml histdayNMC name histdayNMC
 	fi
 	if [ X${LMDZ_NMC_hf} = Xy ] ; then
-	    LMDZ_sed_xml file_def_histhfNMC_lmdz.xml histhfNMC enabled .TRUE. 
-	    LMDZ_sed_xml file_def_histhfNMC_lmdz.xml histhfNMC output_freq 6h
-	    LMDZ_sed_xml file_def_histhfNMC_lmdz.xml histhfNMC name histhfNMC
+	    IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC enabled .TRUE. 
+	    IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC output_freq 6h
+	    IGCM_comp_modifyXmlFile force file_def_histhfNMC_lmdz.xml histhfNMC name histhfNMC
 	fi
     fi
 
     ## gcm.def parameters : 
-    # Modification only for new physics
+    # Modification of variable iphysiq depending on the physics
     if [ X${LMDZ_Physics} = X"AP" ] ; then
-        LMDZ_sed gcm.def iphysiq     10
-    else
-        LMDZ_sed_default gcm.def iphysiq
-    fi
+        value=10
+    else
+	value=DEFAULT
+    fi
+    IGCM_comp_modifyDefFile nonblocker gcm.def iphysiq $value
 
 
     ## run.def parameters
-    LMDZ_sed run.def dayref   ${InitDay}
-    LMDZ_sed run.def nday     ${PeriodLengthInDays}
-    LMDZ_sed run.def raz_date ${RAZ_DATE}
-    LMDZ_sed run.def periodav ${LMDZ_periodav}
-    LMDZ_sed run.def adjust   ${LMDZ_adjust}
+    IGCM_comp_modifyDefFile blocker run.def dayref   ${InitDay}
+    IGCM_comp_modifyDefFile blocker run.def nday     ${PeriodLengthInDays}
+    IGCM_comp_modifyDefFile blocker run.def raz_date ${RAZ_DATE}
+    IGCM_comp_modifyDefFile blocker run.def periodav ${LMDZ_periodav}
+    IGCM_comp_modifyDefFile nonblocker run.def adjust   ${LMDZ_adjust}
 
     # Set anneeref different for gcm and ce0l
@@ -492,17 +435,17 @@
     if [ -f create_etat0_limit* ] || [ -f ce0l* ] && [ ! -f lmdz.x ] ; then
 	# for case ce0l : always take current year
-	LMDZ_sed run.def anneeref ${year}
-	LMDZ_sed run.def calend   ${CalendarTypeForCreate}
+	IGCM_comp_modifyDefFile blocker run.def anneeref ${year}
+	IGCM_comp_modifyDefFile blocker run.def calend   ${CalendarTypeForCreate}
     else
 	# for case gcm : take first year of simulation
-	LMDZ_sed run.def anneeref ${InitYear}
-	LMDZ_sed run.def calend   ${CalendarTypeForLmdz}
+	IGCM_comp_modifyDefFile blocker run.def anneeref ${InitYear}
+	IGCM_comp_modifyDefFile blocker run.def calend   ${CalendarTypeForLmdz}
     fi
 
     # Activate creation of file grilles_gcm.nc only at first period
     if [ ${CumulPeriod} -eq 1 ] ; then
-	LMDZ_sed run.def grilles_gcm_netcdf y
-    else
-	LMDZ_sed run.def grilles_gcm_netcdf n
+	IGCM_comp_modifyDefFile nonblocker run.def grilles_gcm_netcdf y
+    else
+	IGCM_comp_modifyDefFile nonblocker run.def grilles_gcm_netcdf n
     fi
 
@@ -513,29 +456,29 @@
     if [ X${config_ListOfComponents_SRF} = Xorchidee ] ; then
 	echo "Activate ORCHIDEE, set VEGET=y in run.def"
-	LMDZ_sed run.def VEGET y
+	IGCM_comp_modifyDefFile blocker run.def VEGET y
     else
 	echo "No ORCHIDEE, set VEGET=n in run.def"
-	LMDZ_sed run.def VEGET n
+	IGCM_comp_modifyDefFile blocker run.def VEGET n
     fi
 
     if [ X${config_ListOfComponents_CPL} = Xoasis ] ; then
 	echo "Activate coupling to ocean, set type_ocean=couple in run.def"
-	LMDZ_sed run.def type_ocean couple
+	IGCM_comp_modifyDefFile blocker run.def type_ocean couple
     else
 	echo "LMDZ is running in forced mode without ocean model, set type_ocean=force in run.def"
-	LMDZ_sed run.def type_ocean force
+	IGCM_comp_modifyDefFile blocker run.def type_ocean force
     fi
 
     if [ X${config_ListOfComponents_CHM} = Xinca ] ; then
 	echo "Activate coupling to INCA, set type_trac=inca in run.def"
-	LMDZ_sed run.def type_trac inca
+	IGCM_comp_modifyDefFile blocker run.def type_trac inca
     elif [ X${config_ListOfComponents_CHM} = Xreprobus ] ; then
 	echo "Activate coupling to REPROBUS, set type_trac=repr in run.def"
-	LMDZ_sed run.def type_trac repr
-        LMDZ_sed run.def config_inca none
+	IGCM_comp_modifyDefFile blocker run.def type_trac repr
+        IGCM_comp_modifyDefFile blocker run.def config_inca none
     else
 	echo "No coupling to chemistry model, set type_trac=lmdz in run.def"
-	LMDZ_sed run.def type_trac lmdz
-        LMDZ_sed run.def config_inca none
+	IGCM_comp_modifyDefFile blocker run.def type_trac lmdz
+        IGCM_comp_modifyDefFile blocker run.def config_inca none
     fi
 
@@ -543,28 +486,28 @@
     # config.def : Activate direct radiative effect if ok_ade=y
     if [ ! X${lmdz_UserChoices_ok_ade} = X ]; then 
-	LMDZ_sed config.def ok_ade ${lmdz_UserChoices_ok_ade}
-    else
-	LMDZ_sed config.def ok_ade n
+	IGCM_comp_modifyDefFile nonblocker config.def ok_ade ${lmdz_UserChoices_ok_ade}
+    else
+	IGCM_comp_modifyDefFile nonblocker config.def ok_ade n
     fi 
 
     # config.def : Activate indirect radiative effect if ok_aie=y
     if [ ! X${lmdz_UserChoices_ok_aie} = X ]; then 
-	LMDZ_sed config.def ok_aie ${lmdz_UserChoices_ok_aie}
-    else
-	LMDZ_sed config.def ok_aie n
+	IGCM_comp_modifyDefFile nonblocker config.def ok_aie ${lmdz_UserChoices_ok_aie}
+    else
+	IGCM_comp_modifyDefFile nonblocker config.def ok_aie n
     fi 
 
     # config.def : Activate online aerosol coupled model if aerosol_couple=y
     if [ ! X${lmdz_UserChoices_aerosol_couple} = X ]; then 
-	LMDZ_sed config.def aerosol_couple ${lmdz_UserChoices_aerosol_couple}
-    else
-	LMDZ_sed config.def aerosol_couple n
+	IGCM_comp_modifyDefFile nonblocker config.def aerosol_couple ${lmdz_UserChoices_aerosol_couple}
+    else
+	IGCM_comp_modifyDefFile nonblocker config.def aerosol_couple n
     fi 
 
     # config.def : Activate reading of ozone in climatology if read_climoz=2
     if [ ! X${lmdz_UserChoices_read_climoz} = X ]; then 
-	LMDZ_sed config.def read_climoz ${lmdz_UserChoices_read_climoz}
-    else
-	LMDZ_sed config.def read_climoz 0	
+	IGCM_comp_modifyDefFile nonblocker config.def read_climoz ${lmdz_UserChoices_read_climoz}
+    else
+	IGCM_comp_modifyDefFile nonblocker config.def read_climoz 0	
     fi 
 
@@ -573,21 +516,21 @@
     # =5 => dust only =6 => all aerosol    
     if [ ! X${lmdz_UserChoices_flag_aerosol} = X ]; then 
-	LMDZ_sed config.def flag_aerosol ${lmdz_UserChoices_flag_aerosol}
-    else
-	LMDZ_sed config.def flag_aerosol 0
+	IGCM_comp_modifyDefFile nonblocker config.def flag_aerosol ${lmdz_UserChoices_flag_aerosol}
+    else
+	IGCM_comp_modifyDefFile nonblocker config.def flag_aerosol 0
     fi 
 
     # config.def : Activate calcul of Cloud droplet number concentration if ok_cdnc=y
     if [ ! X${lmdz_UserChoices_ok_cdnc} = X ]; then 
-	LMDZ_sed config.def ok_cdnc ${lmdz_UserChoices_ok_cdnc}
-    else
-	LMDZ_sed config.def ok_cdnc n	
+	IGCM_comp_modifyDefFile nonblocker config.def ok_cdnc ${lmdz_UserChoices_ok_cdnc}
+    else
+	IGCM_comp_modifyDefFile nonblocker config.def ok_cdnc n	
     fi 
 
     # guide.def : Activate nudging if ok_guide=y set in lmdz.card
     if [ ! X${lmdz_UserChoices_ok_guide} = X ] ; then
-	LMDZ_sed guide.def ok_guide  ${lmdz_UserChoices_ok_guide}
-    else
-	LMDZ_sed guide.def ok_guide n
+	IGCM_comp_modifyDefFile nonblocker guide.def ok_guide  ${lmdz_UserChoices_ok_guide}
+    else
+	IGCM_comp_modifyDefFile nonblocker guide.def ok_guide n
     fi
 
@@ -741,6 +684,6 @@
     if [ ${lmdz_UserChoices_CARBON_CYCLE} = historical ] ; then
 	    # Modify co2_ppm in config.def only for historical run
-	    # If not historical run, keep co2_ppm value set earlier by LMDZ_sed
-	LMDZ_sed config.def co2_ppm     ${CO2_ppm}
+	    # If not historical run, keep co2_ppm value set earlier by IGCM_comp_modifyDefFile
+	IGCM_comp_modifyDefFile nonblocker config.def co2_ppm     ${CO2_ppm}
     fi
     IGCM_debug_PopStack "ATM_Carbon_Update"
Index: /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/oasis.driver
===================================================================
--- /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/oasis.driver	(revision 2342)
+++ /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/oasis.driver	(revision 2343)
@@ -81,4 +81,6 @@
 	ncrename -v OIceFrac,OIceFrc sstoc.nc > /dev/null 2>&1
     fi
+    # For use of XIOS
+    IGCM_comp_modifyXmlFile force iodef.xml using_oasis NONE true
 
     IGCM_debug_PopStack "CPL_Update"
Index: /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/orchidee.driver
===================================================================
--- /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/orchidee.driver	(revision 2342)
+++ /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/orchidee.driver	(revision 2343)
@@ -1,39 +1,4 @@
 #!/bin/ksh
-
 #D- Driver du script pour ORCHIDEE
-
-function ORCHIDEE_sed
-{
-    IGCM_debug_PushStack "ORCHIDEE_sed"
-    
-    sed -e "s/^${1}\ *=.*/${1}= ${2}/" \
-	orchidee.def > orchidee.def.tmp
-    RET=$?
-    echo "ORCHIDEE_sed : ${1} ${2}"
-    \mv orchidee.def.tmp orchidee.def
-    
-    IGCM_debug_PopStack "ORCHIDEE_sed"
-    return $RET
-}
-
-function ORCHIDEE_sed_xml
-{
-# Usage : ORCHIDEE_sed_xml xml_file output_file attribute value 
-#         In file xml_file modify at the line containing id="output_file" the attribute "attribute=xxx" into "attribute=value"
-    
-    # Test if the fichier exist
-    if [ ! -f ${1} ] ; then
-	echo "WARNING : ${1} file does not exist. Following will not be done : ORCHIDEE_sed : ${1} ${2} ${3} ${4}"
-        IGCM_debug_PopStack "LMDZ_sed"
-	return
-    fi
-    sed -e "/id=\"${2}\"/s/\(${3}=\"\)[^\"]*\(\"\)/\1${4}\2/" ${1} > ${1}.tmp
-    RET=$?
-    echo "ORCHIDEE_sed : ${1} ${2} ${3} ${4}"
-    \mv ${1}.tmp ${1}
-
-    return $RET
-}
-
 #-----------------------------------------------------------------
 function SRF_Initialize
@@ -66,10 +31,19 @@
     IGCM_debug_PushStack "SRF_Update"
 
+    # Activate STOMATE if the compontent SBG=stomate is set in config.card
+    if [ X${config_ListOfComponents_SBG} = Xstomate ] ; then
+	IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE y
+    else
+	IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_OK_STOMATE n
+    fi
+
     typeset SECHIBA_WRITE_STEP
 
     if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-	ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .FALSE. 
-	ORCHIDEE_sed_xml file_def_orchidee.xml sechiba2 enabled .FALSE. 
-	ORCHIDEE_sed XIOS_ORCHIDEE_OK y
+	IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .FALSE. 
+	IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .FALSE. 
+	IGCM_comp_modifyDefFile nonblocker orchidee.def XIOS_ORCHIDEE_OK y
+    else
+	IGCM_comp_modifyDefFile nonblocker orchidee.def XIOS_ORCHIDEE_OK n
     fi    
 
@@ -81,14 +55,14 @@
 	    (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 )) 
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq ${WriteInYears}y
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInYears}y
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
 	    fi
 	    ;;
 	1M)
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq 1mo
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 1mo
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
 	    fi
 	    case ${config_UserChoices_PeriodLength} in
@@ -107,7 +81,7 @@
 	    WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' )
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq ${WriteInMonths}mo
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInMonths}mo
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
 	    fi
 	    case ${config_UserChoices_PeriodLength} in
@@ -123,7 +97,7 @@
 		(( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 ))
 		if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		    ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE. 
-		    ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq ${SECHIBA_WRITE_STEP}s
-		    ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history
+		    IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
+		    IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${SECHIBA_WRITE_STEP}s
+		    IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history
 		fi
 		;;
@@ -132,7 +106,7 @@
 	5D|5d) 
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq 5d
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 5d
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
 	    fi
 	    (( SECHIBA_WRITE_STEP = 5 * 86400 )) 
@@ -140,7 +114,7 @@
 	1D|1d) 
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq 1d
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq 1d
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
 	    fi
 	    (( SECHIBA_WRITE_STEP = 86400 )) 
@@ -149,7 +123,7 @@
 	    WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' )
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
 	    fi
 	    (( SECHIBA_WRITE_STEP = WriteInSeconds )) ;;
@@ -164,38 +138,37 @@
 	(( SECHIBA_WRITE_STEP = 0 ))
     fi
-
-    ORCHIDEE_sed WRITE_STEP ${SECHIBA_WRITE_STEP}
-    ORCHIDEE_sed SECHIBA_HISTLEVEL ${orchidee_UserChoices_sechiba_LEVEL}
+    IGCM_comp_modifyDefFile nonblocker orchidee.def WRITE_STEP ${SECHIBA_WRITE_STEP}
+    IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTLEVEL ${orchidee_UserChoices_sechiba_LEVEL}
 
     # Outputs HF in HISTFILE2 if required
     if [ X${SRF_ok_hf} = Xy ] ; then
-	ORCHIDEE_sed SECHIBA_HISTFILE2 y
+	IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTFILE2 y
 	if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-	    ORCHIDEE_sed_xml file_def_orchidee.xml sechiba2 enabled .TRUE. 
-	    ORCHIDEE_sed_xml file_def_orchidee.xml sechiba2 output_freq 10800s
-	    ORCHIDEE_sed_xml file_def_orchidee.xml sechiba2 name sechiba_out_2
+	    IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 enabled .TRUE. 
+	    IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 output_freq 10800s
+	    IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba2 name sechiba_out_2
 	fi
     else
-	ORCHIDEE_sed SECHIBA_HISTFILE2 n
-    fi
-    ORCHIDEE_sed SECHIBA_HISTLEVEL2 1
-    ORCHIDEE_sed WRITE_STEP2 10800.0
+	IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTFILE2 n
+    fi
+    IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTLEVEL2 1
+    IGCM_comp_modifyDefFile nonblocker orchidee.def WRITE_STEP2 10800.0
 
     if ( [ ${CumulPeriod} -ne 1 ] || [ "${config_SRF_Restart}" != "n" ] ) ; then
-	ORCHIDEE_sed SECHIBA_restart_in sechiba_rest_in.nc
-    else
-	ORCHIDEE_sed SECHIBA_restart_in NONE
+	IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in sechiba_rest_in.nc
+    else
+	IGCM_comp_modifyDefFile blocker orchidee.def SECHIBA_restart_in NONE
     fi
 
 # Modify in orchidee.def VEGET_UPDATE and LAND_COVER_CHANGE if they are set in orchidee.card section UserChoices
     if [ ! X${orchidee_UserChoices_VEGET_UPDATE} = X ] ; then
-	ORCHIDEE_sed VEGET_UPDATE   ${orchidee_UserChoices_VEGET_UPDATE}
-    else
-	ORCHIDEE_sed VEGET_UPDATE 0Y
+	IGCM_comp_modifyDefFile blocker orchidee.def VEGET_UPDATE   ${orchidee_UserChoices_VEGET_UPDATE}
+    else
+	IGCM_comp_modifyDefFile blocker orchidee.def VEGET_UPDATE 0Y
     fi
     if [ ! X${orchidee_UserChoices_LAND_COVER_CHANGE} = X ] ; then
-	ORCHIDEE_sed LAND_COVER_CHANGE ${orchidee_UserChoices_LAND_COVER_CHANGE}
-    else
-	ORCHIDEE_sed LAND_COVER_CHANGE n
+	IGCM_comp_modifyDefFile blocker orchidee.def LAND_COVER_CHANGE ${orchidee_UserChoices_LAND_COVER_CHANGE}
+    else
+	IGCM_comp_modifyDefFile blocker orchidee.def LAND_COVER_CHANGE n
     fi
 
Index: /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/stomate.driver
===================================================================
--- /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/stomate.driver	(revision 2342)
+++ /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/stomate.driver	(revision 2343)
@@ -21,6 +21,6 @@
 
     if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-	ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .FALSE. 
-	ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .FALSE. 
+	IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .FALSE. 
+	IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .FALSE. 
     fi   
     case ${config_SBG_WriteFrequency} in
@@ -30,10 +30,10 @@
 	    (( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears )) 
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq ${WriteInYears}y
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq ${WriteInYears}y
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${WriteInYears}y
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInYears}y
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
 
 	    fi
@@ -41,10 +41,10 @@
 	1M|1m) 
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq 1mo
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq 1mo
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 1mo
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 1mo
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
 	    fi
 	    case ${config_UserChoices_PeriodLength} in
@@ -62,10 +62,10 @@
 	    WriteInMonths=$( echo ${config_SBG_WriteFrequency} | awk -F '[mM]' '{print $1}' )
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq ${WriteInMonths}mo
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq ${WriteInMonths}mo
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${WriteInMonths}mo
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInMonths}mo
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
 	    fi
 	    case ${config_UserChoices_PeriodLength} in
@@ -81,10 +81,10 @@
 		(( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) 
 		if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		    ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE. 
-		    ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq ${STOMATE_WRITE_STEP}s
-		    ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history
-		    ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE. 
-		    ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq ${STOMATE_WRITE_STEP}s
-		    ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history
+		    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 
+		    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq ${STOMATE_WRITE_STEP}s
+		    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history
+		    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
+		    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${STOMATE_WRITE_STEP}s
+		    IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history
 		fi
 		;;
@@ -94,10 +94,10 @@
 	    (( STOMATE_WRITE_STEP = 5 ))
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq 5d
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq 5d
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 5d
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 5d
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
 	    fi
 	    ;;
@@ -105,10 +105,10 @@
 	    (( STOMATE_WRITE_STEP = 1 )) 
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 output_freq 1d
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate1 name stomate_history 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq 1d
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 output_freq 1d
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate1 name stomate_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq 1d
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
 	    fi
 	    ;;
@@ -116,10 +116,10 @@
 	    WriteInSeconds=$( echo ${config_SBG_WriteFrequency} | awk -F '[s]' '{print $1}' )
 	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s
-		ORCHIDEE_sed_xml file_def_orchidee.xml sechiba1 name sechiba_history 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 enabled .TRUE. 
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 output_freq ${WriteInSeconds}s
-		ORCHIDEE_sed_xml file_def_orchidee.xml stomate2 name stomate_ipcc_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 output_freq ${WriteInSeconds}s
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml sechiba1 name sechiba_history 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 enabled .TRUE. 
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 output_freq ${WriteInSeconds}s
+		IGCM_comp_modifyXmlFile force file_def_orchidee.xml stomate2 name stomate_ipcc_history 
 	    fi
 	    (( STOMATE_WRITE_STEP = 1 )) ;;
@@ -129,5 +129,4 @@
     esac
 
-    ORCHIDEE_sed STOMATE_OK_STOMATE y
 
 #Use of XIOS library only
@@ -137,12 +136,12 @@
     fi
 
-    ORCHIDEE_sed STOMATE_HIST_DT ${STOMATE_WRITE_STEP}
-    ORCHIDEE_sed STOMATE_HISTLEVEL ${stomate_UserChoices_stomate_LEVEL}
+    IGCM_comp_modifyDefFile nonblocker orchidee.def STOMATE_HIST_DT ${STOMATE_WRITE_STEP}
+    IGCM_comp_modifyDefFile nonblocker orchidee.def STOMATE_HISTLEVEL ${stomate_UserChoices_stomate_LEVEL}
 
     if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SBG_Restart}" = "n" ] ) ; then
 	echo "STOMATE : without restart"
-	ORCHIDEE_sed STOMATE_RESTART_FILEIN NONE
+	IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN NONE
     else
-	ORCHIDEE_sed STOMATE_RESTART_FILEIN stomate_rest_in.nc
+	IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN stomate_rest_in.nc
     fi
 
Index: /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/xios.driver
===================================================================
--- /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/xios.driver	(revision 2342)
+++ /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/xios.driver	(revision 2343)
@@ -1,23 +1,3 @@
 #!/bin/ksh
-
-function XIOS_sed_xml
-{
-# Usage : XIOS_sed_xml xml_file attribute value 
-#         In file xml_file modify at the line containing id="attribute" the attribute value ">value<" 
-    IGCM_debug_PushStack "XIOS_sed_xml"
-    # Test if the fichier exist
-    if [ ! -f ${1} ] ; then
-	echo "WARNING : ${1} file does not exist. Following will not be done : XIOS_sed_xml : ${1} ${2} ${3}"
-        IGCM_debug_PopStack "XIOS_sed_xml"
-	return
-    fi
-    sed -e "s/\(<[^\"]*\"${2}\".*>\)\([^<]*\)\(<[^>]*\)/\1${3}\3/" ${1} > ${1}.tmp
-    RET=$?
-    echo "XIOS_sed_xml" : ${1} ${2} ${3}
-    \mv ${1}.tmp ${1}
-    IGCM_debug_PopStack "XIOS_sed_xml"
-    return $RET
-}
-
 #-----------------------------------
 function IOS_Initialize
@@ -37,8 +17,8 @@
     echo UPDATE IOS !!!
 # Activate server mode
-    XIOS_sed_xml iodef.xml using_server true
+    IGCM_comp_modifyXmlfile force iodef.xml using_server NONE true
 # If lmdz_UserChoices_XIOS=y add LMDZ as component id :
     if [ X${lmdz_UserChoices_XIOS}  = Xy ] ; then
-	XIOS_sed_xml iodef.xml oasis_codes_id LMDZ,oceanx
+	IGCM_comp_modifyXmlFile force iodef.xml oasis_codes_id NONE LMDZ,oceanx
     fi 
     if [ -f namcouple ] ; then
Index: /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/PARAM/iodef.xml
===================================================================
--- /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/PARAM/iodef.xml	(revision 2342)
+++ /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/PARAM/iodef.xml	(revision 2343)
@@ -20,5 +20,5 @@
 	  <variable id="info_level"                type="integer">1</variable>
 	  <variable id="using_server"              type="boolean">false</variable>
-	  <variable id="using_oasis"               type="boolean">true</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
 	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
 	
Index: /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/PARAM/orchidee.def_CWRR
===================================================================
--- /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/PARAM/orchidee.def_CWRR	(revision 2342)
+++ /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/PARAM/orchidee.def_CWRR	(revision 2343)
@@ -318,6 +318,6 @@
 # Activate STOMATE?
 # set to TRUE if STOMATE is to be activated
-# STOMATE_OK_STOMATE=_AUTO_ : will be set to y if stomate component SBG is activated in config.card
-STOMATE_OK_STOMATE = n
+# STOMATE_OK_STOMATE will be set to y or n by orchidee.driver depending on activation of stomate component SBG in config.card
+STOMATE_OK_STOMATE = _AUTO_ 
 # default = n
 
@@ -891,6 +891,6 @@
 # default = n
 
-# Flag to activate XIOS as output library
-XIOS_ORCHIDEE_OK = n
-
-#**************************************************************************
+# Use XIOS for writing diagnostics file
+# defulat = n
+XIOS_ORCHIDEE_OK = _AUTO_
+#**************************************************************************
Index: /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/PARAM/orchidee.def_Choi
===================================================================
--- /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/PARAM/orchidee.def_Choi	(revision 2342)
+++ /CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/PARAM/orchidee.def_Choi	(revision 2343)
@@ -318,6 +318,6 @@
 # Activate STOMATE?
 # set to TRUE if STOMATE is to be activated
-# STOMATE_OK_STOMATE=_AUTO_ : will be set to y if stomate component SBG is activated in config.card
-STOMATE_OK_STOMATE = n
+# STOMATE_OK_STOMATE will be set to y or n by orchidee.driver depending on activation of stomate component SBG in config.card
+STOMATE_OK_STOMATE = _AUTO_ 
 # default = n
 
@@ -891,6 +891,6 @@
 # default = n
 
-# Flag to activate XIOS as output library
-XIOS_ORCHIDEE_OK = n
-
-#**************************************************************************
+# Use XIOS for writing diagnostics file
+# defulat = n
+XIOS_ORCHIDEE_OK = _AUTO_
+#**************************************************************************
