Index: CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/CREATE_amip/config.card
===================================================================
--- CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/CREATE_amip/config.card	(revision 4896)
+++ CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/CREATE_amip/config.card	(revision 4921)
@@ -27,9 +27,13 @@
 PeriodLength=1Y
 #============================
+#-- Compression level for netcdf output files
+CompressionLevel=2
+#============================
 # Source following file with module settings
 EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
 #============================
-#-- Compression level for netcdf output files
-CompressionLevel=2
+# OptMode indicates the optimization mode choosen during compilation
+# This variable is used in the executable name
+OptMode=prod
 
 #========================================================================
@@ -44,5 +48,5 @@
 [Executable]
 #D- For each component: Real name of executable, Name of executable in the run directory 
-ICO= (icosa_lmdz.exe, icosa_lmdz.exe, 31MPI)
+ICO= (icosa_lmdz_${OptMode}.exe, icosa_lmdz.exe, 31MPI)
 ATM= ("","")
 IOS= ("","")
Index: CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/CREATE_hadisst/config.card
===================================================================
--- CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/CREATE_hadisst/config.card	(revision 4896)
+++ CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/CREATE_hadisst/config.card	(revision 4921)
@@ -27,9 +27,13 @@
 PeriodLength=1Y
 #============================
+#-- Compression level for netcdf output files
+CompressionLevel=2
+#============================
 # Source following file with module settings
 EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
 #============================
-#-- Compression level for netcdf output files
-CompressionLevel=2
+# OptMode indicates the optimization mode choosen during compilation
+# This variable is used in the executable name
+OptMode=prod
 
 #========================================================================
@@ -44,7 +48,7 @@
 [Executable]
 #D- For each component: Real name of executable, Name of executable in the run directory 
-ICO= (icosa_lmdz.exe, icosa_lmdz.exe, 160MPI, 4OMP)
+ICO= (icosa_lmdz_${OptMode}.exe, icosa_lmdz.exe, 160MPI, 4OMP)
 ATM= ("","")
-IOS= (xios_server.exe, xios.x, 10MPI)
+IOS= (xios_server_${OptMode}.exe, xios.x, 10MPI)
 
 #========================================================================
Index: CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/aquaplanet/CREATE_aquaplanet/config.card
===================================================================
--- CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/aquaplanet/CREATE_aquaplanet/config.card	(revision 4896)
+++ CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/aquaplanet/CREATE_aquaplanet/config.card	(revision 4921)
@@ -27,9 +27,13 @@
 PeriodLength=1Y
 #============================
+#-- Compression level for netcdf output files
+CompressionLevel=2
+#============================
 # Source following file with module settings
 EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
 #============================
-#-- Compression level for netcdf output files
-CompressionLevel=2
+# OptMode indicates the optimization mode choosen during compilation
+# This variable is used in the executable name
+OptMode=prod
 
 #========================================================================
@@ -44,5 +48,5 @@
 [Executable]
 #D- For each component: Real name of executable, Name of executable in the run directory 
-ICO= (icosa_lmdz.exe, icosa_lmdz.exe, 31MPI)
+ICO= (icosa_lmdz_${OptMode}.exe, icosa_lmdz.exe, 31MPI)
 ATM= ("","")
 IOS= ("","")
Index: CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/aquaplanet/climAQUA_360d/config.card
===================================================================
--- CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/aquaplanet/climAQUA_360d/config.card	(revision 4896)
+++ CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/aquaplanet/climAQUA_360d/config.card	(revision 4921)
@@ -27,9 +27,13 @@
 PeriodLength=1Y
 #============================
+#-- Compression level for netcdf output files
+CompressionLevel=0
+#============================
 # Source following file with module settings
 EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
 #============================
-#-- Compression level for netcdf output files
-CompressionLevel=0
+# OptMode indicates the optimization mode choosen during compilation
+# This variable is used in the executable name
+OptMode=prod
 
 #========================================================================
@@ -44,7 +48,7 @@
 [Executable]
 #D- For each component: Real name of executable, Name of executable in the run directory 
-ICO= (icosa_lmdz.exe, icosa_lmdz.exe, 40MPI,4OMP)
+ICO= (icosa_lmdz_${OptMode}.exe, icosa_lmdz.exe, 40MPI,4OMP)
 ATM= ("","")
-IOS= (xios_server.exe, xios.x, 1MPI)
+IOS= (xios_server_${OptMode}.exe, xios.x, 1MPI)
 
 #========================================================================
Index: CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/clim_noleap/config.card
===================================================================
--- CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/clim_noleap/config.card	(revision 4896)
+++ CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZ/clim_noleap/config.card	(revision 4921)
@@ -16,6 +16,4 @@
 ExperimentName=test
 SpaceName=TEST
-# Source following file with module settings
-EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
 #============================
 #D-- leap, noleap, 360d
@@ -33,4 +31,11 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#============================
+# Source following file with module settings
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+#============================
+# OptMode indicates the optimization mode choosen during compilation
+# This variable is used in the executable name
+OptMode=prod
 
 #========================================================================
@@ -45,7 +50,7 @@
 #D-- Executable -
 [Executable]
-ICO= (icosa_lmdz.exe, icosa_lmdz.exe, 40MPI)
+ICO= (icosa_lmdz_${OptMode}.exe, icosa_lmdz.exe, 40MPI)
 ATM= ("","")
-IOS= (xios_server.exe, xios.x, 1MPI)
+IOS= (xios_server_${OptMode}.exe, xios.x, 1MPI)
 
 #========================================================================
@@ -76,6 +81,4 @@
 #D-- ICO -
 [ICO]
-# WriteFrequency is not used any more for LMDZ
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' all params are read
 Restart= n
@@ -89,6 +92,4 @@
 #D-- ATM -
 [ATM]
-#
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' all params are read
 Restart= n
@@ -102,5 +103,4 @@
 #D-- IOS -
 [IOS]
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' next 4 params are read
 Restart= n
Index: CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZOR/clim_noleap/config.card
===================================================================
--- CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZOR/clim_noleap/config.card	(revision 4896)
+++ CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZOR/clim_noleap/config.card	(revision 4921)
@@ -16,6 +16,4 @@
 ExperimentName=test
 SpaceName=TEST
-# Source following file with module settings
-EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
 #============================
 #D-- leap, noleap, 360d
@@ -33,4 +31,11 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#============================
+# Source following file with module settings
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+#============================
+# OptMode indicates the optimization mode choosen during compilation
+# This variable is used in the executable name
+OptMode=prod
 
 #========================================================================
@@ -47,9 +52,9 @@
 #D-- Executable -
 [Executable]
-ICO= (icosa_lmdz.exe, icosa_lmdz.exe, 40MPI)
+ICO= (icosa_lmdz_${OptMode}.exe, icosa_lmdz.exe, 40MPI)
 ATM= ("","")
 SRF= ("", "")
 SBG= ("", "")
-IOS= (xios_server.exe, xios.x, 1MPI)
+IOS= (xios_server_${OptMode}.exe, xios.x, 1MPI)
 
 #========================================================================
@@ -80,6 +85,4 @@
 #D-- ICO -
 [ICO]
-#
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' all params are read
 Restart= n
@@ -93,6 +96,4 @@
 #D-- ATM -
 [ATM]
-# WriteFrequency is not used any more for LMDZ
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' all params are read
 Restart= n
@@ -106,7 +107,4 @@
 #D-- SRF -
 [SRF]
-# WriteFrequency is not used any more for ORCHIDEE 
-# Output files are now managed in orchidee.card 
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' next 4 params are read
 Restart= n
@@ -121,7 +119,4 @@
 #D-- SBG - STOMATE
 [SBG]
-# WriteFrequency is not used any more for ORCHIDEE 
-# Output files are now managed in stomate.card 
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' next 4 params are read
 Restart= n
@@ -136,5 +131,4 @@
 #D-- IOS -
 [IOS]
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' next 4 params are read
 Restart= n
Index: CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZOR/highresmip/config.card
===================================================================
--- CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZOR/highresmip/config.card	(revision 4896)
+++ CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZOR/highresmip/config.card	(revision 4921)
@@ -16,6 +16,4 @@
 ExperimentName=test
 SpaceName=TEST
-# Source following file with module settings
-EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
 #============================
 #D-- leap, noleap, 360d
@@ -34,4 +32,11 @@
 # CompressionLevel=0 when using more that 1 xios server
 CompressionLevel=0
+#============================
+# Source following file with module settings
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+#============================
+# OptMode indicates the optimization mode choosen during compilation
+# This variable is used in the executable name
+OptMode=prod
 
 #========================================================================
@@ -47,8 +52,8 @@
 #D-- Executable -
 [Executable]
-ICO= (icosa_lmdz.exe, icosa_lmdz.exe, 160MPI, 4OMP)
+ICO= (icosa_lmdz_${OptMode}.exe, icosa_lmdz.exe, 160MPI, 4OMP)
 ATM= ("","")
 SRF= ("", "")
-IOS= (xios_server.exe, xios.x, 1MPI)
+IOS= (xios_server_${OptMode}.exe, xios.x, 1MPI)
 
 #========================================================================
@@ -79,6 +84,4 @@
 #D-- ICO -
 [ICO]
-#
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' all params are read
 Restart= n
@@ -92,6 +95,4 @@
 #D-- ATM -
 [ATM]
-# WriteFrequency is not used any more for LMDZ
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' all params are read
 Restart= n
@@ -105,7 +106,4 @@
 #D-- SRF -
 [SRF]
-# WriteFrequency is not used any more for ORCHIDEE 
-# Output files are now managed in orchidee.card 
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' next 4 params are read
 Restart= n
@@ -120,7 +118,4 @@
 #D-- SBG - STOMATE
 [SBG]
-# WriteFrequency is not used any more for ORCHIDEE 
-# Output files are now managed in stomate.card 
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' next 4 params are read
 Restart= n
@@ -135,5 +130,4 @@
 #D-- IOS -
 [IOS]
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' next 4 params are read
 Restart= n
Index: CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZOR/highresmip_CMIP6/config.card
===================================================================
--- CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZOR/highresmip_CMIP6/config.card	(revision 4896)
+++ CONFIG/UNIFORM/v7/ICOLMDZOR_v7/EXPERIMENTS/ICOLMDZOR/highresmip_CMIP6/config.card	(revision 4921)
@@ -18,6 +18,4 @@
 SpaceName=DEVT
 Member=r1i1p1f1
-# Source following file with module settings
-EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
 #============================
 #D-- leap, noleap, 360d
@@ -36,4 +34,11 @@
 # CompressionLevel=0 when using more that 1 xios server
 CompressionLevel=0
+#============================
+# Source following file with module settings
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+#============================
+# OptMode indicates the optimization mode choosen during compilation
+# This variable is used in the executable name
+OptMode=prod
 
 #========================================================================
@@ -49,8 +54,8 @@
 #D-- Executable -
 [Executable]
-ICO= (icosa_lmdz.exe, icosa_lmdz.exe, 160MPI, 4OMP)
+ICO= (icosa_lmdz_${OptMode}.exe, icosa_lmdz.exe, 160MPI, 4OMP)
 ATM= ("","")
 SRF= ("", "")
-IOS= (xios_server.exe, xios.x, 12MPI, 4OMP)
+IOS= (xios_server_${OptMode}.exe, xios.x, 12MPI, 4OMP)
 
 #========================================================================
@@ -81,6 +86,4 @@
 #D-- ICO -
 [ICO]
-#
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' all params are read
 Restart= n
@@ -94,6 +97,4 @@
 #D-- ATM -
 [ATM]
-# WriteFrequency is not used any more for LMDZ
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' all params are read
 Restart= n
@@ -107,7 +108,4 @@
 #D-- SRF -
 [SRF]
-# WriteFrequency is not used any more for ORCHIDEE 
-# Output files are now managed in orchidee.card 
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' next 4 params are read
 Restart= n
@@ -122,7 +120,4 @@
 #D-- SBG - STOMATE
 [SBG]
-# WriteFrequency is not used any more for ORCHIDEE 
-# Output files are now managed in stomate.card 
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' next 4 params are read
 Restart= n
@@ -137,5 +132,4 @@
 #D-- IOS -
 [IOS]
-WriteFrequency=""
 # If config_Restarts_OverRule == 'n' next 4 params are read
 Restart= n
Index: CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER/lmdz.driver
===================================================================
--- CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER/lmdz.driver	(revision 4896)
+++ CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER/lmdz.driver	(revision 4921)
@@ -9,11 +9,23 @@
     if [ X${config_ListOfComponents_ICO} = X ] ; then
 
-	[ -f ${SUBMIT_DIR}/../.resol ] && eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x39
-
+	# Read the resolution from the variables ResolAtm set in config.card UserChoices section or from .resol file
+	if [ X$ResolAtm != X ] ; then
+	    # ResolAtm is set in config.card
+	    RESOL_ATM_3D=${ResolAtm}
+	elif [ -f ${SUBMIT_DIR}/../.resol ] ; then
+	    # ResolAtm was not set in config.card, try to read .resol file
+	    eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x39
+	else
+	    IGCM_debug_Exit "ResolAtm is not set in config.card and the .resol file does not exist."
+	    IGCM_debug_Verif_Exit
+	fi
+	
 	RESOL_ATM_Z=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $3}' )
 	RESOL_ATM_X=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $1}' )
 	RESOL_ATM_Y=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $2}' )
 	RESOL_ATM_XY="${RESOL_ATM_X}x${RESOL_ATM_Y}"
-	
+	RESOL_ATM=LMD${RESOL_ATM_X}${RESOL_ATM_Y}
+
+	IGCM_debug_Print 1 "The atomsopheric resolution is ${RESOL_ATM_3D} " 
     else
 	RESOL_ATM_Z=${dynamico_UserChoices_RESOL_ATM_Z}
@@ -190,5 +202,5 @@
 
 
-    ## Modifiy 
+    ## Activate diagnostic output files and set output_level for each file
 
     # histmth
@@ -372,20 +384,32 @@
 	echo "Activate coupling to INCA, set type_trac=inca in run.def"
 	IGCM_comp_modifyDefFile blocker run.def type_trac inca
+	IGCM_comp_modifyDefFile blocker run.def iflag_phytrac 1
     elif [ X${config_ListOfComponents_CHM} = Xreprobus ] ; then
 	echo "Activate coupling to REPROBUS, set type_trac=repr in run.def"
 	IGCM_comp_modifyDefFile blocker run.def type_trac repr
         IGCM_comp_modifyDefFile blocker run.def config_inca none
+	IGCM_comp_modifyDefFile blocker run.def iflag_phytrac 1
+    elif [ X${config_UserChoices_ConfigType} = XESMCO2 ] ; then 
+	echo "ESM config, set type_trac=co2i in run.def"
+	IGCM_comp_modifyDefFile blocker run.def type_trac co2i
+        IGCM_comp_modifyDefFile blocker run.def config_inca none
+	IGCM_comp_modifyDefFile blocker run.def iflag_phytrac 1  
+    elif [ X${lmdz_UserChoices_LMDZ_strataero} = Xy ] ; then
+        echo "No coupling to chemistry model but it is a LMDZ STRATAER configuration, set type_trac=coag in run.def"
+        IGCM_comp_modifyDefFile blocker run.def type_trac coag
+        IGCM_comp_modifyDefFile blocker run.def config_inca none
+	IGCM_comp_modifyDefFile blocker run.def iflag_phytrac 1  
     else
 	echo "No coupling to chemistry model, set type_trac=lmdz in run.def"
 	IGCM_comp_modifyDefFile blocker run.def type_trac lmdz
         IGCM_comp_modifyDefFile blocker run.def config_inca none
-    fi
-
-
-    # run.def : Activate the call to phytrac 
-    if [ ! X${lmdz_UserChoices_iflag_phytrac} = X ]; then 
-	IGCM_comp_modifyDefFile nonblocker run.def iflag_phytrac ${lmdz_UserChoices_iflag_phytrac}
-    else
-	IGCM_comp_modifyDefFile nonblocker run.def iflag_phytrac 0
+	IGCM_comp_modifyDefFile blocker run.def iflag_phytrac 0
+    fi
+
+    # run.def : Activate the new calving 
+    if [ ! X${lmdz_UserChoices_cpl_old_calving} = X ]; then 
+	IGCM_comp_modifyDefFile nonblocker run.def cpl_old_calving ${lmdz_UserChoices_cpl_old_calving}
+    else
+	IGCM_comp_modifyDefFile nonblocker run.def cpl_old_calving y
     fi 
 
@@ -395,4 +419,11 @@
     else
 	IGCM_comp_modifyDefFile nonblocker physiq.def ok_bug_cv_trac  n
+    fi 
+
+    # config.def : Activate aerosol strato 
+    if [ ! X${lmdz_UserChoices_flag_aerosol_strat} = X ]; then 
+	IGCM_comp_modifyDefFile nonblocker config.def flag_aerosol_strat ${lmdz_UserChoices_flag_aerosol_strat}
+    else
+	IGCM_comp_modifyDefFile nonblocker config.def flag_aerosol_strat DEFAULT
     fi 
 
@@ -462,4 +493,28 @@
 	IGCM_comp_modifyDefFile nonblocker config.def pmagic DEFAULT
     fi 
+
+    if [ X${config_UserChoices_ConfigType} = XESMCO2 ] ; then
+	# Set carbon cycle parameters according to parmeters in lmdz.card 
+	IGCM_comp_modifyDefFile blocker config.def level_coupling_esm 2 
+	IGCM_comp_modifyDefFile blocker config.def carbon_cycle_cpl ${lmdz_UserChoices_carbon_cycle_cpl} 
+	IGCM_comp_modifyDefFile blocker config.def carbon_cycle_tr ${lmdz_UserChoices_carbon_cycle_tr}
+	IGCM_comp_modifyDefFile blocker config.def carbon_cycle_rad ${lmdz_UserChoices_carbon_cycle_rad}
+    else
+	# Take default value set in config.def
+	IGCM_comp_modifyDefFile nonblocker config.def level_coupling_esm DEFAULT
+	IGCM_comp_modifyDefFile nonblocker config.def carbon_cycle_cpl DEFAULT 
+	IGCM_comp_modifyDefFile nonblocker config.def carbon_cycle_tr DEFAULT
+	IGCM_comp_modifyDefFile nonblocker config.def carbon_cycle_rad DEFAULT
+    fi
+
+    # config.def : Modify parameter ok_volcan if ok_volcan=y or LMDZ_strataero=y in lmdz.card
+    # Note: ok_volcan is a flag allowing a double-call with/without natural forcing (instead of with/without anthro forcing).
+    if [ ! X${lmdz_UserChoices_ok_volcan} = X ] || [ X${lmdz_UserChoices_LMDZ_strataero} = Xy ] ; then
+	IGCM_comp_modifyDefFile nonblocker config.def ok_volcan ${lmdz_UserChoices_ok_volcan}
+    else
+	# Take default value set in config.def
+	IGCM_comp_modifyDefFile nonblocker config.def ok_volcan DEFAULT
+    fi
+
 
     # physiq.def : Modify parameter tau_gl if it is set in lmdz.card
@@ -552,24 +607,26 @@
 
 
-    # Set interpolated output grid depending on resoultion
-    if [ ${RESOL_NBP} == 40  ] ; then
-       valuei=144
-       valuej=143
-    elif [ ${RESOL_NBP} == 80  ] ; then
-       valuei=360
-       valuej=180
-    elif [ ${RESOL_NBP} == 160  ] ; then
-       valuei=720
-       valuej=360
-    else
-      IGCM_debug_Exit "RESOL_NBP=${RESOL_NBP} is not yet implemented in drivers"
-      IGCM_debug_Verif_Exit
-    fi
-
-    IGCM_debug_Print 1 "Modify output grid parameters for current resolution in context_lmdz.xml"
-    cp context_lmdz.xml context_lmdz.xml.init
-    sed -e "s/ni_glo.*=.*\"144\"/ni_glo=\"${valuei}\"/" \
-        -e "s/nj_glo.*=.*\"143\"/nj_glo=\"${valuej}\"/" \
-        context_lmdz.xml.init > context_lmdz.xml
+    # Set interpolated output grid depending on resoultion, only if ICO component is set in config.card
+    if [ ! "X${config_ListOfComponents_ICO}" = "X" ] ; then   
+	if [ ${RESOL_NBP} == 40  ] ; then
+	    valuei=144
+	    valuej=143
+	elif [ ${RESOL_NBP} == 80  ] ; then
+	    valuei=360
+	    valuej=180
+	elif [ ${RESOL_NBP} == 160  ] ; then
+	    valuei=720
+	    valuej=360
+	else
+	    IGCM_debug_Exit "RESOL_NBP=${RESOL_NBP} is not yet implemented in drivers"
+	    IGCM_debug_Verif_Exit
+	fi
+
+	IGCM_debug_Print 1 "Modify output grid parameters for current resolution in context_lmdz.xml"
+	cp context_lmdz.xml context_lmdz.xml.init
+	sed -e "s/ni_glo.*=.*\"144\"/ni_glo=\"${valuei}\"/" \
+            -e "s/nj_glo.*=.*\"143\"/nj_glo=\"${valuej}\"/" \
+            context_lmdz.xml.init > context_lmdz.xml
+    fi
 
 
@@ -582,4 +639,6 @@
     IGCM_debug_PushStack "ATM_Finalize"
 
+    IGCM_debug_Print 1 "FINALIZE ATM !"
+
     IGCM_debug_PopStack "ATM_Finalize"
 }
Index: CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER/orchidee.driver
===================================================================
--- CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER/orchidee.driver	(revision 4896)
+++ CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER/orchidee.driver	(revision 4921)
@@ -182,26 +182,28 @@
 
 
-
-    # Set interpolated output grid depending on resoultion
-    if [ ${RESOL_NBP} == 40  ] ; then
-       valuei=144
-       valuej=143
-    elif [ ${RESOL_NBP} == 80  ] ; then
-       valuei=360
-       valuej=180
-    elif [ ${RESOL_NBP} == 160  ] ; then
-       valuei=720
-       valuej=360
-    else
-      IGCM_debug_Exit "RESOL_NBP=${RESOL_NBP} is not yet implemented in drivers"
-      IGCM_debug_Verif_Exit
-    fi
-
-    IGCM_debug_Print 1 "Modify output grid parameters for current resolution in context_orchidee.xml"
-    cp context_orchidee.xml context_orchidee.xml.init
-    sed -e "s/ni_glo.*=.*\"144\"/ni_glo=\"${valuei}\"/" \
-        -e "s/nj_glo.*=.*\"143\"/nj_glo=\"${valuej}\"/" \
-        context_orchidee.xml.init > context_orchidee.xml
-
+    # Set interpolated output grid depending on resoultion, only if ICO component is set in config.card
+    if [ ! "X${config_ListOfComponents_ICO}" = "X" ] ; then   
+	if [ ${RESOL_NBP} == 40  ] ; then
+	    valuei=144
+	    valuej=143
+	elif [ ${RESOL_NBP} == 80  ] ; then
+	    valuei=360
+	    valuej=180
+	elif [ ${RESOL_NBP} == 160  ] ; then
+	    valuei=720
+	    valuej=360
+	else
+	    IGCM_debug_Exit "RESOL_NBP=${RESOL_NBP} is not yet implemented in drivers"
+	    IGCM_debug_Verif_Exit
+	fi
+	
+	IGCM_debug_Print 1 "Modify output grid parameters for current resolution in context_orchidee.xml"
+	cp context_orchidee.xml context_orchidee.xml.init
+	sed -e "s/ni_glo.*=.*\"144\"/ni_glo=\"${valuei}\"/" \
+            -e "s/nj_glo.*=.*\"143\"/nj_glo=\"${valuej}\"/" \
+            context_orchidee.xml.init > context_orchidee.xml
+	
+    fi
+    
     IGCM_debug_PopStack "SRF_Update"
 }
Index: CONFIG/UNIFORM/v7/ICOLMDZOR_v7/compile_icolmdzor.sh
===================================================================
--- CONFIG/UNIFORM/v7/ICOLMDZOR_v7/compile_icolmdzor.sh	(revision 4896)
+++ CONFIG/UNIFORM/v7/ICOLMDZOR_v7/compile_icolmdzor.sh	(revision 4921)
@@ -18,5 +18,5 @@
 optmode=prod
 # Resolution if compiling LMDZ in regular mode without DYNAMICO
-# Use for example following "./compile_icolmdzor.sh -regular_lonlat 144x142x79"
+# Use for example following "./compile_icolmdzor.sh -regular_latlon 144x142x79"
 regular_latlon=no
 # fcm_arch
@@ -26,4 +26,9 @@
 export fcm_arch parallel xios
 full_flag=""
+full_xios=""
+full_lmdz=""
+full_orch=""
+full_dyna=""
+
 # Default netcdf_lib is used for XIOS but can be change by argument
 netcdf_lib=""
@@ -32,5 +37,5 @@
 datestr=`LC_ALL=C date +"%Y%m%dT%H%M"`
 outfile=$submitdir/out_compile_icolmdzor.$datestr
-rm -f $outfile; echo > $outfile
+echo > $outfile
 echo; echo "Text output from compilation will be stored in file out_compile_icolmdzor.$datestr"; echo 
 
@@ -39,5 +44,5 @@
 while (($# > 0)) ; do
     case $1 in
-	"-h") cat <<fin
+	"-h") cat <<end_help
 
 ########################################################################
@@ -63,46 +68,28 @@
 ./compile_icolmdzor.sh -regular_latlon 144x142x79
 
-fin
+end_help
 	    exit;;
 
-	"-parallel")
-	    parallel=$2 ; shift ; shift ;; 
-	
-	"-arch")
-	    fcm_arch="$2" ; shift ; shift ;;
-	
-	"-xios")
-	    xios="$2" ; shift ; shift ;;
-	
-	"-optmode")
-	    optmode=$2 ; shift ; shift ;;
-
-	"-debug")
-	    optmode=debug ; shift ;;
-
-	"-dev")
-	    optmode=dev ; shift ;;
-
-	"-prod")
-	    optmode=prod ; shift ;;
-
-	"-regular_latlon")
-	    regular_latlon=yes ;
-	    resol_atm_3d=$2 ; shift ; shift ;;
-	
-	"-full")
-	    full_flag="-full"; shift ;;
-	
-        "-netcdf_lib_seq")
-            netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;;
-
-	*)
-	    echo "unknown option "$2" , exiting..."
-	    exit 
+	"-parallel") 	    parallel=$2 ; shift ; shift ;; 
+	"-arch")	    fcm_arch="$2" ; shift ; shift ;;
+	"-xios")	    xios="$2" ; shift ; shift ;;
+	"-debug")	    optmode=debug ; shift ;;
+	"-dev")	            optmode=dev ; shift ;;
+	"-prod")	    optmode=prod ; shift ;;
+	"-regular_latlon")  regular_latlon=yes ; resol_atm=$2 ; shift ; shift ;;
+	"-full")            full_flag="-full"; full_xios="--full" ; full_lmdz="-full" ; full_orch="-full" ; full_dyna="-full" ; shift ;;
+	"-full_xios")       full_xios="--full" ; shift ;;  # Note only full_xios is using double dash: --full
+	"-full_lmdz")       full_lmdz="-full"  ; shift ;;
+	"-full_orch")       full_orch="-full"  ; shift ;;
+	"-full_dyna")       full_dyna="-full"  ; shift ;;
+        "-netcdf_lib_seq")  netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;;
+	*)       	    echo "unknown option "$1" , exiting..." ;  exit 
     esac
 done
 
-echo "Following arguments are set in current compiling:" >> $outfile 
-echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch, full_flag=$full_flag regular_latlon=$regular_latlon" >> $outfile 
+echo "Following options are set in current compiling:" >> $outfile 
+echo "   regular_latlon=$regular_latlon (if yes, then resol_atm=${resol_atm})" >> $outfile 
+echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile 
+echo "   full_flag=$full_flag, full_xios=$full_xios, full_lmdz=$full_lmdz, full_orch=$full_orch, full_dyna=$full_dyna" >> $outfile 
 echo >> $outfile
 
@@ -115,6 +102,6 @@
     # Find out current host and source specific paths and commands for the host
     case $( hostname -s ) in
-	ada*)
-	    fcm_arch=X64_ADA;;
+	jean-zay*)
+	    fcm_arch=X64_JEANZAY;;
 	irene*)
 	    fcm_arch=X64_IRENE;;
@@ -130,16 +117,19 @@
 fi
 
-# Set a link to arch.env and source the file if arch-${fcm_arch}.env file exist for current fcm_arch.
+# Set a link to arch.env if arch-${fcm_arch}.env file exist for current fcm_arch.
 # The link arch.env is also set in config.card and will be used by libIGCM to ensure the same running environnement.
 if [ -f ARCH/arch-${fcm_arch}.env ] ; then
     echo >> $outfile
-    echo "The file ARCH/arch-${fcm_arch}.env will now be sourced with modules needed for compilation."
-    echo "Note that this new environement will be kept after compilation."
-    echo "You might want to source again your personal environment after compilation. This must be done manually or by reconnection."
+    echo "The file ARCH/arch-${fcm_arch}.env will now be sourced with modules needed for compilation for all components."
+    echo "Note that this new environement might be kept after compilation."
+    echo "If this is the case, source again your personal environment after compilation."
     echo " Personal module list before sourcing of ARCH/arch.env file:"    >> $outfile 
     module list   >> $outfile 2>&1
 
+    # Make a link to this file, to be used also in config.card
     rm -f ARCH/arch.env
     ln -s arch-${fcm_arch}.env ARCH/arch.env
+
+    # Source the file
     source ARCH/arch.env   >> $outfile 2>&1
 
@@ -167,6 +157,6 @@
 echo; echo "NOW COMPILE XIOS"
 echo >> $outfile ; echo " NOW COMPILE XIOS"   >> $outfile 
-echo ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_flag   >> $outfile 
-     ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_flag   >> $outfile 2>&1
+echo ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios   >> $outfile 
+     ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios   >> $outfile 2>&1
 # Test if compiling succeded 
 if [[ $? != 0 ]] ; then 
@@ -175,6 +165,6 @@
 fi
 # Move executables to modipsl/bin
-if [ $modipsl/modeles/XIOS/bin/xios_server.exe ] ; then 
-    mv $modipsl/modeles/XIOS/bin/xios_server.exe $modipsl/bin/.
+if [ -f $modipsl/modeles/XIOS/bin/xios_server.exe ] ; then 
+    mv $modipsl/modeles/XIOS/bin/xios_server.exe $modipsl/bin/xios_server_${optmode}.exe
 else
     echo "THERE IS A PROBLEM IN XIOS COMPILATION EXECUTABLE MISSING - STOP"
@@ -188,6 +178,6 @@
 echo >> $outfile ; echo " NOW COMPILE ORCHIDEE"   >> $outfile 
 
-echo 	./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} $full_flag    >> $outfile 
-        ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} $full_flag    >> $outfile 2>&1
+echo 	./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch    >> $outfile 
+        ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch    >> $outfile 2>&1
 # Test if compiling finished
 if [[ $? != 0 ]] ; then
@@ -195,4 +185,9 @@
     exit
 fi
+
+# If orchide driver executables have been compiled (option -driver), then rename executables to contain $optmode
+if [ -f $modipsl/bin/orchidee_ol ] ; then mv $modipsl/bin/orchidee_ol  $modipsl/bin/orchidee_ol_${optmode} ; fi
+if [ -f $modipsl/bin/orchideedriver ] ; then mv $modipsl/bin/orchideedriver  $modipsl/bin/orchideedriver_${optmode} ; fi
+
 
 ## 2.4 Compile lmdz
@@ -215,6 +210,6 @@
 fi
 
-echo ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_flag    >> $outfile 
-     ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_flag    >> $outfile 2>&1
+echo ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile 
+     ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile 2>&1
 # Test if compiling finished
 if [[ $? != 0 ]] ; then
@@ -229,6 +224,6 @@
 echo >> $outfile ; echo " NOW COMPILE DYNAMICO"   >> $outfile 
 
-echo ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_flag    >> $outfile 
-     ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_flag    >> $outfile 2>&1
+echo ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 
+     ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 2>&1
 # Test if compiling finished
 if [[ $? != 0 ]] ; then
@@ -242,6 +237,6 @@
 echo >> $outfile ; echo " NOW COMPILE ICOSA_LMDZ"   >> $outfile 
 
-echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_flag    >> $outfile 
-     ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_flag    >> $outfile 2>&1
+echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 
+     ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 2>&1
 # Test if compiling finished
 if [[ $? != 0 ]] ; then
@@ -251,5 +246,5 @@
 # Move executables to modipsl/bin
 if [ $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe ] ; then 
-    mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/. 
+    mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${optmode}.exe
 else
     echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION EXECUTABLE MISSING - STOP"
@@ -264,6 +259,6 @@
     cd $modipsl/modeles/LMDZ
     # Compile LMDZ regular lat-lon exectuable
-    echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm_3d}"
-    echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm_3d}"   >> $outfile 
+    echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"
+    echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"   >> $outfile 
 
     # Check if the compilation of LMDZ was previsouly interupted prematured. 
@@ -279,6 +274,6 @@
 	rm -f .lock
     fi
-    echo ./makelmdz_fcm -d ${resol_atm_3d} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_flag gcm    >> $outfile 
-         ./makelmdz_fcm -d ${resol_atm_3d} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_flag gcm    >> $outfile 2>&1
+    echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile 
+         ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile 2>&1
     # Test if compiling finished
     if [[ $? != 0 ]] ; then
@@ -288,9 +283,9 @@
 
     # Compile ce0l initialization program for LMDZ regular lat-lon exectuable
-    echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm_3d}"
-    echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm_3d}"   >> $outfile 
-
-    echo ./makelmdz_fcm -d ${resol_atm_3d} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_flag ce0l    >> $outfile 
-         ./makelmdz_fcm -d ${resol_atm_3d} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_flag ce0l    >> $outfile 2>&1
+    echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"
+    echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"   >> $outfile 
+
+    echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_lmdz ce0l    >> $outfile 
+         ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_lmdz ce0l    >> $outfile 2>&1
     # Test if compiling finished
     if [[ $? != 0 ]] ; then
@@ -301,20 +296,27 @@
     # Find executable suffix
     if [ $parallel == seq ] || [ $parallel == none ] ; then
-	suffix=_${resol_atm_3d}_phylmd_seq_orch
+	suffix=_${resol_atm}_phylmd_seq_orch.e
     else
-	suffix=_${resol_atm_3d}_phylmd_para_mem_orch
-    fi
-    echo suffix = $suffix
+	suffix=_${resol_atm}_phylmd_para_mem_orch.e
+    fi
+    echo gcm suffix = $suffix
     
     # Move executables to modipsl/bin folder
     echo "Move gcm.e and ce0l executable to modipsl/bin"
-    if [ $modipsl/modeles/LMDZ/bin/gcm${suffix}.e ] ;  then mv $modipsl/modeles/LMDZ/bin/gcm${suffix}.e $modipsl/bin/gcm_${resol_atm_3d}.e ; fi
-    if [ $modipsl/modeles/LMDZ/bin/ce0l${suffix}.e ] ;  then mv $modipsl/modeles/LMDZ/bin/ce0l${suffix}.e $modipsl/bin/ce0l_${resol_atm_3d}.e ; fi
-
-    # Write .resol file
-    cd $submitdir   
-    resol2D=$( echo ${resol_atm_3d} | awk '-Fx' '{print $1}' )$( echo ${resol_atm_3d} | awk '-Fx' '{print $2}' )
-    echo "noORCAxLMD$resol2D" >.resol
-    echo "RESOL_ATM_3D=${resol_atm_3d}" >>.resol
+    if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ;  then
+	mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}.e
+    else
+	echo "ERROR gcm${suffix} executable does not exist." 
+	echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP"
+	exit
+    fi
+
+    if [ -f $modipsl/modeles/LMDZ/bin/ce0l${suffix} ] ;  then
+	mv $modipsl/modeles/LMDZ/bin/ce0l${suffix} $modipsl/bin/ce0l_${resol_atm}_${optmode}.e
+    else
+	echo "ERROR ce0l${suffix} executable does not exist." 
+	echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP"
+	exit
+    fi
 fi
 
