Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/AA_make
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/AA_make	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/AA_make	(revision 6539)
@@ -8,4 +8,8 @@
 MYSRC_DIR = $(shell /bin/pwd)
 
+submitdir=$(shell pwd)
+arch_path=${submitdir}/ARCH
+sources_RH8_path=${submitdir}/SOURCES/REDHAT8
+
 all : 
 	if [ -s ./.resol ] ; then $(M_K) `head -1 .resol` ; else $(M_K) IPSLCM6-LR ; fi
@@ -101,11 +105,11 @@
 
 libioipsl : ../../modeles/IOIPSL/src
-	(cd ../../modeles/IOIPSL/src ; $(M_K) -f Makefile)
+	(ln -sf ${arch_path}/arch-${FCM_ARCH}.env ${arch_path}/arch.env; . ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/IOIPSL/src ; $(M_K) -f Makefile)
 
 oasis3-mct:
-	(cd $(OASIS_DIR)/util/make_dir ; cp $(MYSRC_DIR)/SOURCES/OASIS3-MCT/make_${FCM_ARCH} make.inc ; make -f TopMakefileOasis3 ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd $(OASIS_DIR)/util/make_dir ; cp $(MYSRC_DIR)/SOURCES/OASIS3-MCT/make_${FCM_ARCH} make.inc ; make -f TopMakefileOasis3 ; )
 
 liborchidee : ../../modeles/ORCHIDEE/
-	(cd ../../modeles/ORCHIDEE/ ; ./makeorchidee_fcm -parallel mpi_omp -arch $(FCM_ARCH) -j 8 -xios2)
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/ORCHIDEE/ ; ./makeorchidee_fcm -parallel mpi_omp -arch $(FCM_ARCH) -j 8 -xios2)
 
 lmdz96x95x39:
@@ -129,38 +133,38 @@
 lmdz: ../../modeles/LMDZ
 #	(cd ../../modeles/LMDZ; ./makelmdz_fcm -d $(RESOL_LMDZ) -arch $(FCM_ARCH) -j 8 ce0l ; mv bin/ce0l_$(RESOL_LMDZ)_phylmd_seq.e ../../bin/create_etat0_limit.e ; )
-	(cd ../../modeles/LMDZ ; ./makelmdz_fcm   -d $(RESOL_LMDZ) -mem -cosp true -v orchidee2.0 -parallel mpi_omp -io xios -rrtm true -c OMCT -job 8 -arch $(FCM_ARCH) gcm  ; mv bin/gcm_$(RESOL_LMDZ)_phylmd_para_mem_orch_couple.e ../../bin/gcm.e ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/LMDZ ; ./makelmdz_fcm   -d $(RESOL_LMDZ) -mem -cosp true -v orchidee2.0 -parallel mpi_omp -io xios -rrtm true -c OMCT -job 8 -arch $(FCM_ARCH) gcm  ; mv bin/gcm_$(RESOL_LMDZ)_phylmd_para_mem_orch_couple.e ../../bin/gcm.e ; )
 
 lmdzinca: ../../modeles/LMDZ
 #	(cd ../../modeles/INCA; ./makeinca_fcm -chimie $(CHIMIE) -prod  -resol $(RESOL) -j 8 -arch $(FCM_ARCH); cp SIMULATIONS/$(CHIMIE)/inca.dat ../../bin/inca.dat ; )
-	(cd ../../modeles/INCA; ./makeinca_fcm -chimie $(CHIMIE) -prod -xios -parallel mpi_omp -resol $(RESOL) -j 8 -arch $(FCM_ARCH); cp SIMULATIONS/$(CHIMIE)/inca.dat ../../bin/inca.dat ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/INCA; cp ${sources_RH8_path}/INCA/print_inca.F90 src/INCA_MOD/.; cd ../../modeles/INCA; ./makeinca_fcm -chimie $(CHIMIE) -prod -xios -parallel mpi_omp -resol $(RESOL) -j 8 -arch $(FCM_ARCH); cp SIMULATIONS/$(CHIMIE)/inca.dat ../../bin/inca.dat ; )
 #	(cd ../../modeles/LMDZ; ./makelmdz_fcm -d $(RESOL) -arch $(FCM_ARCH) -j 8 ce0l ; mv bin/ce0l_$(RESOL)_phylmd_seq.e ../../bin/create_etat0_limit.e ; )
-	(cd ../../modeles/LMDZ ; ./makelmdz_fcm   -chimie INCA   -d $(RESOL) -mem -cosp true -v orchidee2.0 -parallel mpi_omp -io xios -rrtm true -c OMCT -job 8 -arch $(FCM_ARCH) gcm  ; mv bin/gcm_$(RESOL)_phylmd_para_mem_orch_couple_inca.e ../../bin/gcm.e ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/LMDZ ; ./makelmdz_fcm   -chimie INCA   -d $(RESOL) -mem -cosp true -v orchidee2.0 -parallel mpi_omp -io xios -rrtm true -c OMCT -job 8 -arch $(FCM_ARCH) gcm  ; mv bin/gcm_$(RESOL)_phylmd_para_mem_orch_couple_inca.e ../../bin/gcm.e ; )
 
 lmdzstrataer: ../../modeles/LMDZ
-	(cd ../../modeles/LMDZ ; ./makelmdz_fcm   -d $(RESOL_LMDZ) -mem -cosp true -v orchidee2.0 -parallel mpi_omp -io xios -rrtm true -strataer true -c OMCT -job 8 -arch $(FCM_ARCH) gcm  ; mv bin/gcm_$(RESOL_LMDZ)_phylmd_para_mem_orch_couple.e ../../bin/gcm.e ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/LMDZ ; ./makelmdz_fcm   -d $(RESOL_LMDZ) -mem -cosp true -v orchidee2.0 -parallel mpi_omp -io xios -rrtm true -strataer true -c OMCT -job 8 -arch $(FCM_ARCH) gcm  ; mv bin/gcm_$(RESOL_LMDZ)_phylmd_para_mem_orch_couple.e ../../bin/gcm.e ; )
 
 xios: ../../modeles/XIOS
-	(cd ../../modeles/XIOS; ./make_xios --arch $(FCM_ARCH) --prod --use_oasis oasis3_mct --job 8 ; cp bin/xios_server.exe ../../bin/. ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/XIOS; ./make_xios --arch_path ${arch_path} --arch $(FCM_ARCH) --prod --use_oasis oasis3_mct --job 8 ; cp bin/xios_server.exe ../../bin/. ; )
 
 orca2lim2:  ../../modeles/NEMOGCM/CONFIG
-	(cd ../../modeles/NEMOGCM/CONFIG; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA2_LIM_PISCES -e "$(MYSRC_DIR)/SOURCES/NEMO" -j16 add_key "key_lim2_vp key_diahth key_oasis3" del_key "key_nosignedzero " ; cp ORCA2_LIM_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/NEMOGCM/CONFIG; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA2_LIM_PISCES -e "$(MYSRC_DIR)/SOURCES/NEMO" -j16 add_key "key_lim2_vp key_diahth key_oasis3" del_key "key_nosignedzero " ; cp ORCA2_LIM_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
 
 orca2lim3:  ../../modeles/NEMOGCM/CONFIG
-	(cd ../../modeles/NEMOGCM/CONFIG; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA2_LIM3_PISCES  -e "$(MYSRC_DIR)/SOURCES/NEMO" -j16 add_key "key_lim3 key_oasis3 key_top key_pisces" del_key "key_lim2 key_nosignedzero" ; cp ORCA2_LIM3_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/NEMOGCM/CONFIG; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA2_LIM3_PISCES  -e "$(MYSRC_DIR)/SOURCES/NEMO" -j16 add_key "key_lim3 key_oasis3 key_top key_pisces" del_key "key_lim2 key_nosignedzero" ; cp ORCA2_LIM3_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
 
 orca1lim3: ../../modeles/NEMOGCM/CONFIG
-	(cd ../../modeles/NEMOGCM/CONFIG ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.*90 ORCA1_LIM3_PISCES/MY_SRC/ ; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA1_LIM3_PISCES  -j16 add_key "key_oasis3 key_diahth"  del_key "key_mpp_rep key_nosignedzero                  " ; cp ORCA1_LIM3_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/NEMOGCM/CONFIG ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.*90 ORCA1_LIM3_PISCES/MY_SRC/ ; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA1_LIM3_PISCES  -j16 add_key "key_oasis3 key_diahth"  del_key "key_mpp_rep key_nosignedzero                  " ; cp ORCA1_LIM3_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
 
 orca1lim3nopisces: ../../modeles/NEMOGCM/CONFIG
-	(cd ../../modeles/NEMOGCM/CONFIG ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.*90 ORCA1_LIM3_PISCES/MY_SRC/ ; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA1_LIM3_PISCES  -j16 add_key "key_oasis3                   " del_key "key_mpp_rep key_nosignedzero key_top key_pisces" ; cp ORCA1_LIM3_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; ) 
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/NEMOGCM/CONFIG ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.*90 ORCA1_LIM3_PISCES/MY_SRC/ ; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA1_LIM3_PISCES  -j16 add_key "key_oasis3                   " del_key "key_mpp_rep key_nosignedzero key_top key_pisces" ; cp ORCA1_LIM3_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; ) 
 
 orca1lim2:  ../../modeles/NEMOGCM/CONFIG
-	(cd ../../modeles/NEMOGCM/CONFIG; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA1_LIM2_PISCES -d "OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC" -e "$(MYSRC_DIR)/SOURCES/NEMO" -j16 add_key "key_top key_pisces key_lim2 key_lim2_vp key_oasis3 key_vvl" del_key "key_lim3 key_nosignedzero " ; cp ORCA1_LIM2_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/NEMOGCM/CONFIG; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA1_LIM2_PISCES -d "OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC" -e "$(MYSRC_DIR)/SOURCES/NEMO" -j16 add_key "key_top key_pisces key_lim2 key_lim2_vp key_oasis3 key_vvl" del_key "key_lim3 key_nosignedzero " ; cp ORCA1_LIM2_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
 
 orca025lim3: ../../modeles/NEMOGCM/CONFIG
-	(cd ../../modeles/NEMOGCM/CONFIG ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.*90 ORCA025_LIM3_PISCES/MY_SRC/ ; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA025_LIM3_PISCES  -j16 add_key "key_oasis3 key_diahth"  del_key "key_mpp_rep key_nosignedzero" ; cp ORCA025_LIM3_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/NEMOGCM/CONFIG ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.*90 ORCA025_LIM3_PISCES/MY_SRC/ ; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA025_LIM3_PISCES  -j16 add_key "key_oasis3 key_diahth"  del_key "key_mpp_rep key_nosignedzero" ; cp ORCA025_LIM3_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
 
 orca025lim3nopisces: ../../modeles/NEMOGCM/CONFIG
-	(cd ../../modeles/NEMOGCM/CONFIG ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.*90 ORCA025_LIM3_PISCES/MY_SRC/ ; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA025_LIM3_PISCES  -j16 add_key "key_oasis3 key_diahth"  del_key "key_mpp_rep key_nosignedzero  key_top key_pisces  key_age              " ; cp ORCA025_LIM3_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
+	(. ${arch_path}/arch-${FCM_ARCH}.env; cd ../../modeles/NEMOGCM/CONFIG ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.*90 ORCA025_LIM3_PISCES/MY_SRC/ ; cp ../../../config/IPSLCM6/SOURCES/NEMO/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA025_LIM3_PISCES  -j16 add_key "key_oasis3 key_diahth"  del_key "key_mpp_rep key_nosignedzero  key_top key_pisces  key_age              " ; cp ORCA025_LIM3_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
 
 verif: ../../bin
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/ARCH/arch-X64_IRENE-AMD.env
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/ARCH/arch-X64_IRENE-AMD.env	(revision 6539)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/ARCH/arch-X64_IRENE-AMD.env	(revision 6539)
@@ -0,0 +1,12 @@
+# Compile and running environnemnet at Irene Amd / TGCC on redhat8
+set +e 
+module purge
+module load intel/20.0.0
+module load mpi/openmpi/4.1.4
+module load flavor/hdf5/parallel
+module load hdf5/1.12.2
+module load netcdf-fortran/4.5.3
+module load mkl/20.0.0
+module load feature/bridge/heterogenous_mpmd
+module load c++/gnu/8.3.0
+module load c/gnu/8.3.0
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/ARCH/arch-X64_IRENE.env
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/ARCH/arch-X64_IRENE.env	(revision 6539)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/ARCH/arch-X64_IRENE.env	(revision 6539)
@@ -0,0 +1,12 @@
+# Compile and running environnemnet at Irene SKL / TGCC on redhat8
+set +e 
+module purge
+module load intel/20.0.0
+module load mpi/openmpi/4.1.4
+module load flavor/hdf5/parallel
+module load hdf5/1.12.2
+module load netcdf-fortran/4.5.3
+module load mkl/20.0.0
+module load feature/bridge/heterogenous_mpmd
+module load c++/gnu/8.3.0
+module load c/gnu/8.3.0
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/ARCH/arch-X64_JEANZAY.env
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/ARCH/arch-X64_JEANZAY.env	(revision 6539)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/ARCH/arch-X64_JEANZAY.env	(revision 6539)
@@ -0,0 +1,10 @@
+# Compile and running environnemnet at Jean-Zay 
+module purge
+module load gcc/6.5.0
+module load intel-all/19.0.4 
+module load hdf5/1.10.5-mpi
+module load netcdf/4.7.2-mpi
+module load netcdf-fortran/4.5.2-mpi
+
+# Load svn needed for the compilation script
+module load subversion
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/dcppAhindcast_CMIP6/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/dcppAhindcast_CMIP6/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/dcppAhindcast_CMIP6/config.card	(revision 6539)
@@ -32,4 +32,6 @@
 #-- 1Y, 1M, 5D, 1D Period Length of one trunk of simulation
 PeriodLength=1Y
+#-- Source following file with module settings, only if it exists 
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
 
 #===========================
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/decadal/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/decadal/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/decadal/config.card	(revision 6539)
@@ -34,4 +34,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #===========================
 [Ensemble]
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/historical_CMIP6/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/historical_CMIP6/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/historical_CMIP6/config.card	(revision 6539)
@@ -35,4 +35,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- Restarts -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/historical_STRATAER/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/historical_STRATAER/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/historical_STRATAER/config.card	(revision 6539)
@@ -35,4 +35,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- Restarts -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/pdControl_TEST/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/pdControl_TEST/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/pdControl_TEST/config.card	(revision 6539)
@@ -34,4 +34,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- Restarts -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/piControl-spinup_CMIP6/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/piControl-spinup_CMIP6/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/piControl-spinup_CMIP6/config.card	(revision 6539)
@@ -35,4 +35,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- Restarts -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/piControl_CMIP6/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/piControl_CMIP6/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/piControl_CMIP6/config.card	(revision 6539)
@@ -35,4 +35,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- Restarts -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/piControl_TEST/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/piControl_TEST/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/piControl_TEST/config.card	(revision 6539)
@@ -34,4 +34,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- Restarts -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/scenario_CMIP6/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/scenario_CMIP6/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLCM/scenario_CMIP6/config.card	(revision 6539)
@@ -36,4 +36,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- Restarts -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLESM/AER/piControl_AER_CMIP6/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLESM/AER/piControl_AER_CMIP6/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLESM/AER/piControl_AER_CMIP6/config.card	(revision 6539)
@@ -35,4 +35,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- Restarts -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLESM/AER/piControl_AER_TEST/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLESM/AER/piControl_AER_TEST/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/IPSLESM/AER/piControl_AER_TEST/config.card	(revision 6539)
@@ -34,4 +34,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- Restarts -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZ/CREATE_amip/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZ/CREATE_amip/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZ/CREATE_amip/config.card	(revision 6539)
@@ -27,4 +27,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #============================
 PeriodNb=50
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZ/CREATE_clim_360d/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZ/CREATE_clim_360d/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZ/CREATE_clim_360d/config.card	(revision 6539)
@@ -29,4 +29,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- ListOfComponents -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZ/clim_360d/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZ/clim_360d/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZ/clim_360d/config.card	(revision 6539)
@@ -29,4 +29,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- ListOfComponents -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/amip/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/amip/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/amip/config.card	(revision 6539)
@@ -29,4 +29,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- ListOfComponents -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/amip_CMIP6/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/amip_CMIP6/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/amip_CMIP6/config.card	(revision 6539)
@@ -32,4 +32,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- ListOfComponents -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/amip_nudge/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/amip_nudge/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/amip_nudge/config.card	(revision 6539)
@@ -29,4 +29,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- ListOfComponents -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/clim_360d/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/clim_360d/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/clim_360d/config.card	(revision 6539)
@@ -29,4 +29,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 
 #========================================================================
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/clim_pdControl/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/clim_pdControl/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/clim_pdControl/config.card	(revision 6539)
@@ -29,5 +29,6 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
-
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
 
 #========================================================================
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/highresmip_CMIP6/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/highresmip_CMIP6/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZOR/highresmip_CMIP6/config.card	(revision 6539)
@@ -39,4 +39,6 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
 
 #========================================================================
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZORINCA/piClim-control_CMIP6/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZORINCA/piClim-control_CMIP6/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZORINCA/piClim-control_CMIP6/config.card	(revision 6539)
@@ -33,4 +33,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- Restarts -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZORINCA/piClim-control_TEST/config.card
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZORINCA/piClim-control_TEST/config.card	(revision 6333)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/EXPERIMENTS/LMDZORINCA/piClim-control_TEST/config.card	(revision 6539)
@@ -33,4 +33,7 @@
 #-- Compression level for netcdf output files
 CompressionLevel=2
+#-- Source following file with module settings, only if it exists
+EnvFile=${SUBMIT_DIR}/../ARCH/arch.env
+
 #========================================================================
 #D-- Restarts -
Index: CONFIG/UNIFORM/v6/IPSLCM6_LANDN/SOURCES/REDHAT8/INCA/print_inca.F90
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6_LANDN/SOURCES/REDHAT8/INCA/print_inca.F90	(revision 6539)
+++ CONFIG/UNIFORM/v6/IPSLCM6_LANDN/SOURCES/REDHAT8/INCA/print_inca.F90	(revision 6539)
@@ -0,0 +1,119 @@
+!$Id: chem_mod.F90 104 2008-12-23 10:28:51Z acosce $
+!! =========================================================================
+!! INCA - INteraction with Chemistry and Aerosols
+!! 
+!! Copyright Laboratoire des Sciences du Climat et de l'Environnement (LSCE)
+!! 	     Unite mixte CEA-CNRS-UVSQ
+!! 
+!! Contributors to this INCA subroutine:
+!! 
+!! Anne Cozic, LSCE, anne.cozic@cea.fr
+!!
+!! This software is a computer program whose purpose is to simulate the 
+!! atmospheric gas phase and aerosol composition. The model is designed to be
+!! used within a transport model or a general circulation model. This version 
+!! of INCA was designed to be coupled to the LMDz GCM. LMDz-INCA accounts
+!! for emissions, transport (resolved and sub-grid scale), photochemical 
+!! transformations, and scavenging (dry deposition and washout) of chemical 
+!! species and aerosols interactively in the GCM. Several versions of the INCA
+!! model are currently used depending on the envisaged applications with the 
+!! chemistry-climate model. 
+!! 
+!! This software is governed by the CeCILL  license under French law and
+!! abiding by the rules of distribution of free software.  You can  use, 
+!! modify and/ or redistribute the software under the terms of the CeCILL
+!! license as circulated by CEA, CNRS and INRIA at the following URL
+!! "http://www.cecill.info". 
+!! 
+!! As a counterpart to the access to the source code and  rights to copy,
+!! modify and redistribute granted by the license, users are provided only
+!! with a limited warranty  and the software's author,  the holder of the
+!! economic rights,  and the successive licensors  have only  limited
+!! liability. 
+!! 
+!! In this respect, the user's attention is drawn to the risks associated
+!! with loading,  using,  modifying and/or developing or reproducing the
+!! software by the user in light of its specific status of free software,
+!! that may mean  that it is complicated to manipulate,  and  that  also
+!! therefore means  that it is reserved for developers  and  experienced
+!! professionals having in-depth computer knowledge. Users are therefore
+!! encouraged to load and test the software's suitability as regards their
+!! requirements in conditions enabling the security of their systems and/or 
+!! data to be ensured and,  more generally, to use and operate it in the 
+!! same conditions as regards security. 
+!! 
+!! The fact that you are presently reading this means that you have had
+!! knowledge of the CeCILL license and that you accept its terms.
+!! =========================================================================
+
+#include <inca_define.h>
+
+MODULE PRINT_INCA
+
+  IMPLICIT NONE
+  INTEGER, SAVE :: lunout
+!$OMP THREADPRIVATE(lunout)
+  INTEGER, SAVE :: outxml
+!$OMP THREADPRIVATE(outxml) 
+
+CONTAINS
+
+  SUBROUTINE INIT_PRINT_INCA()
+
+    USE MOD_INCA_MPI_DATA, ONLY : is_ok_mpi, mpi_rank
+    USE MOD_INCA_OMP_DATA, ONLY : is_ok_omp, omp_rank
+    USE mod_inca_mpi_data, ONLY : is_mpi_root
+
+    IMPLICIT NONE
+    CHARACTER(len=8) :: namefile
+    INTEGER :: ierr2
+    CHARACTER(len=255) :: fileout
+    CHARACTER(len=4)  :: num_mpi
+    CHARACTER(len=4)  :: num_omp
+    INTEGER,PARAMETER :: base_lunout=350
+    INTEGER           :: ierr
+
+
+    namefile='inca.out'
+   IF (is_ok_mpi) THEN
+       WRITE(num_mpi,'(I4.4)') mpi_rank
+    ENDIF
+    
+    IF (is_ok_omp) THEN
+       WRITE(num_omp,'(I4.4)') omp_rank
+    ENDIF
+
+    IF (is_ok_mpi .AND. is_ok_omp) THEN
+       fileout=TRIM(namefile)//'_'//num_mpi//'.'//num_omp
+       lunout=base_lunout+omp_rank
+    ELSE IF (is_ok_mpi .AND. (.NOT. is_ok_omp)) THEN
+       fileout=TRIM(namefile)//'_'//num_mpi
+       lunout=base_lunout
+    ELSE IF ((.NOT. is_ok_mpi) .AND. is_ok_omp) THEN
+       fileout=TRIM(namefile)//'_'//num_omp
+       lunout=base_lunout+omp_rank
+    ELSE
+       fileout=TRIM(namefile)
+       lunout=base_lunout
+    ENDIF
+!    open(UNIT=lunout,file=fileout, action='write',status='unknown', form='formatted', iostat=ierr2) 
+!    IF (ierr2 /= 0) THEN
+!       stop 'print_inca'
+!    endif
+    lunout=6
+
+    
+!$OMP MASTER
+    IF (is_mpi_root) THEN
+       outxml=base_lunout*10
+       open(UNIT=outxml,file='inca_IDxml.out', action='write',status='unknown', form='formatted', iostat=ierr2) 
+       IF (ierr2 /= 0) THEN
+          stop 'print_inca xml'
+       endif
+    endif
+    
+!$OMP END MASTER
+
+
+  END SUBROUTINE INIT_PRINT_INCA
+END MODULE PRINT_INCA
