Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/AA_make
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/AA_make	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/AA_make	(revision 2504)
@@ -0,0 +1,165 @@
+#- $Id$
+#-
+#- AA_make for IPSLCM5_v4 configuration
+#- 
+
+OASIS_DIR = ../../oasis3-mct
+
+MYSRC_DIR = $(shell /bin/pwd)
+
+all : 
+	if [ -s ./.resol ] ; then $(M_K) `head -1 .resol` ; else $(M_K) ORCA2LIM2xLMD9695-L39 ; fi
+
+ORCA2LIM2xLMD9695-L39 : libioipsl oasis3-mct xios liborchidee orca2lim2 lmdz96x95x39 verif
+	echo "ORCA2LIM2xLMD9695-L39" >.resol
+	echo "RESOL_ATM_3D=96x95x39" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA2LIM3xLMD9695-L39 : libioipsl oasis3-mct xios liborchidee orca2lim3 lmdz96x95x39 verif
+	echo "ORCA2LIM3xLMD9695-L39" >.resol
+	echo "RESOL_ATM_3D=96x95x39" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA2LIM2xLMD9695-L39-NOPISCES : libioipsl oasis3-mct xios liborchidee orca2lim2nopisces lmdz96x95x39 verif
+	echo "ORCA2LIM2xLMD9695-L39" >.resol
+	echo "RESOL_ATM_3D=96x95x39" >>.resol
+	echo "NOPISCES" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA2LIM2xLMD144142-L39 : libioipsl oasis3-mct xios liborchidee orca2lim2 lmdz144x142x39 verif
+	echo "ORCA2LIM2xLMD144142-L39" >.resol
+	echo "RESOL_ATM_3D=144x142x39" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA2LIM2xLMD144142-L59 : libioipsl oasis3-mct xios liborchidee orca2lim2 lmdz144x142x59 verif
+	echo "ORCA2LIM2xLMD144142-L59" >.resol
+	echo "RESOL_ATM_3D=144x142x59" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA2LIM2xLMD144142-L79 : libioipsl oasis3-mct xios liborchidee orca2lim2 lmdz144x142x79 verif
+	echo "ORCA2LIM2xLMD144142-L79" >.resol
+	echo "RESOL_ATM_3D=144x142x79" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA2LIM3xLMD144142-L39 : libioipsl oasis3-mct xios liborchidee orca2lim3 lmdz144x142x39 verif
+	echo "ORCA2LIM3xLMD144142-L39" >.resol
+	echo "RESOL_ATM_3D=144x142x39" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA2LIM3xLMD144142-L59 : libioipsl oasis3-mct xios liborchidee orca2lim3 lmdz144x142x59 verif
+	echo "ORCA2LIM3xLMD144142-L59" >.resol
+	echo "RESOL_ATM_3D=144x142x59" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA1LIM2xLMD9695-L39 : libioipsl oasis3-mct xios liborchidee orca1lim2 lmdz96x95x39 verif
+	echo "ORCA1LIM2xLMD9695-L39" >.resol
+	echo "RESOL_ATM_3D=96x95x39" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA1LIM2xLMD144142-L39 : libioipsl oasis3-mct xios liborchidee orca1lim2 lmdz144x142x39 verif
+	echo "ORCA1LIM2xLMD144142-L39" >.resol
+	echo "RESOL_ATM_3D=144x142x39" >>.resol
+	echo "$(LIB_MPI)" >.libmpii
+
+ORCA1LIM2xLMD144142-L59 : libioipsl oasis3-mct xios liborchidee orca1lim2 lmdz144x142x59 verif
+	echo "ORCA1LIM2xLMD144142-L59" >.resol
+	echo "RESOL_ATM_3D=144x142x59" >>.resol
+	echo "$(LIB_MPI)" >.libmpii
+
+ORCA1LIM2xLMD144142-L79 : libioipsl oasis3-mct xios liborchidee orca1lim2 lmdz144x142x79 verif
+	echo "ORCA1LIM2xLMD144142-L79" >.resol
+	echo "RESOL_ATM_3D=144x142x79" >>.resol
+	echo "$(LIB_MPI)" >.libmpii
+
+ORCA1LIM3xLMD9695-L39 : libioipsl oasis3-mct xios liborchidee orca1lim3 lmdz96x95x39 verif
+	echo "ORCA1LIM3xLMD9695-L39" >.resol
+	echo "RESOL_ATM_3D=96x95x39" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA1LIM3xLMD144142-L39 : libioipsl oasis3-mct xios liborchidee orca1lim3 lmdz144x142x39 verif
+	echo "ORCA1LIM3xLMD144142-L39" >.resol
+	echo "RESOL_ATM_3D=144x142x39" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA1LIM3xLMD144142-L59 : libioipsl oasis3-mct xios liborchidee orca1lim3 lmdz144x142x59 verif
+	echo "ORCA1LIM3xLMD144142-L59" >.resol
+	echo "RESOL_ATM_3D=144x142x59" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+ORCA1LIM3xLMD144142-L79 : libioipsl oasis3-mct xios liborchidee orca1lim3 lmdz144x142x79 verif
+	echo "ORCA1LIM3xLMD144142-L79" >.resol
+	echo "RESOL_ATM_3D=144x142x79" >>.resol
+	echo "$(LIB_MPI)" >.libmpi
+
+libioipsl : ../../modeles/IOIPSL/src
+	(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 ; )
+
+liborchidee : ../../modeles/ORCHIDEE/
+	(cd ../../modeles/ORCHIDEE/ ; ./makeorchidee_fcm -parallel mpi_omp -arch $(FCM_ARCH) -j 8 -xios)
+
+lmdz96x95x39:
+	$(M_K) lmdz RESOL_LMDZ=96x95x39
+
+lmdz144x142x39:
+	$(M_K) lmdz RESOL_LMDZ=144x142x39
+
+lmdz144x142x59:
+	$(M_K) lmdz RESOL_LMDZ=144x142x59
+
+lmdz144x142x79:
+	$(M_K) lmdz RESOL_LMDZ=144x142x79
+
+lmdz: ../../modeles/LMDZ
+#	(cd ../../modeles/LMDZ; ./makelmdz_fcm -d $(RESOL_LMDZ) -cosp true -v true -parallel mpi_omp -c OMCT -job 8 -arch $(FCM_ARCH) ce0l ; cp bin/ce0l_$(RESOL_LMDZ)_phylmd_para_orch_couple.e ../../bin/create_etat0_limit.e ; )
+	(cd ../../modeles/LMDZ ; ./makelmdz_fcm -d $(RESOL_LMDZ) -mem -cosp false -v true -parallel mpi_omp -io xios -c OMCT -job 8 -arch $(FCM_ARCH) gcm  ; cp 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/. ; )
+
+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_coupled key_oasis3 key_oasis_mct key_diahth key_diaar5" del_key "key_nosignedzero " ; cp ORCA2_LIM_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
+
+orca2lim2nopisces:  ../../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 -e "$(MYSRC_DIR)/SOURCES/NEMO" -j16 add_key "key_lim2_vp key_coupled key_oasis3 key_oasis_mct key_diahth key_diaar5" del_key "key_nosignedzero" ; cp ORCA2_LIM/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 -d "OPA_SRC LIM_SRC_3 NST_SRC TOP_SRC" -e "$(MYSRC_DIR)/SOURCES/NEMO" -j16 add_key "key_lim3 key_coupled key_oasis3 key_oasis_mct key_top key_pisces key_diahth key_diaar5" 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/arch-${FCM_ARCH}.fcm ../ARCH/. ; cp ../../../config/IPSLCM6/SOURCES/NEMO/*.cfg ../TOOLS/COMPILE/. ; ./makenemo -m ${FCM_ARCH} -n ORCA1_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC TOP_SRC" -e "$(MYSRC_DIR)/SOURCES/NEMO" -j16 add_key "key_lim3 key_oasis3 key_coupled key_oasis_mct  key_top key_pisces key_diahth key_diaar5 key_vvl" del_key "key_lim2 key_lim2_vp key_nosignedzero" ; 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_coupled key_oasis3 key_oasis_mct key_diahth key_diaar5 key_vvl" del_key "key_lim3 key_nosignedzero " ; cp ORCA1_LIM2_PISCES/BLD/bin/nemo.exe ../../../bin/opa ; )
+
+verif: ../../bin
+	ls -l ../../bin
+
+clean : cleannemo cleanlmdz cleanorchidee cleanxios cleanioipsl cleanoasis
+	rm -rf $(LIBDIR)/* ; rm -f $(BINDIR)/*
+
+cleannemo : 
+	../../modeles/NEMOGCM/CONFIG/makenemo clean
+	rm -f $(BINDIR)/opa
+
+cleanlmdz : 
+	rm -rf ../../modeles/LMDZ/libo/* ../../modeles/LMDZ/bin/* ../../modeles/LMDZ/.lock
+	rm -f $(BINDIR)/gcm.e $(BINDIR)/create_etat0_limit.e
+
+cleanorchidee :
+	( cd ../../modeles/ORCHIDEE ; ./makeorchidee_fcm -clean )
+	rm -f $(BINDIR)/gcm.e 	
+
+cleanoasis : 
+	rm -rf $(OASIS_DIR)/BLD
+	rm -f $(BINDIR)/oasis
+
+cleanxios :
+	rm -rf ../../modeles/XIOS/bin/ ../../modeles/XIOS/inc ../../modeles/XIOS/obj ../../modeles/XIOS/lib
+
+cleanioipsl :
+	( cd ../../modeles/IOIPSL ; make clean )
+	( cd $(BINDIR) ; rm -f calendar.mod  defprec.mod  errioipsl.mod  flincom.mod  fliocom.mod  getincom.mod  histcom.mod  ioipsl.mod  libioipsl.a	mathelp.mod  restcom.mod  stringop.mod )	
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/AA_make.ldef
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/AA_make.ldef	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/AA_make.ldef	(revision 2504)
@@ -0,0 +1,11 @@
+#- $Id$
+#---------------------------------------------------------------------
+#- Initialisations for IPSLCM5 configuration
+#---------------------------------------------------------------------
+SHELL = /bin/sh
+#---------------------------------------------------------------------
+LIBDIR = ../../lib
+BINDIR = ../../bin
+MODDIR = $(LIBDIR)
+#---------------------------------------------------------------------
+#-
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lim2.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lim2.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lim2.card	(revision 2504)
@@ -0,0 +1,49 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+
+[InitialStateFiles]
+List=	()
+
+[BoundaryFiles]
+List=	()
+ListNonDel= ()
+
+[SmoothFiles]
+List=	()
+
+[ParametersFiles]
+List=	(${SUBMIT_DIR}/PARAM/namelist_lim2_${RESOL_OCE}_ref, namelist_ice_ref), \
+        (${SUBMIT_DIR}/PARAM/namelist_lim2_${RESOL_OCE}_cfg, namelist_ice_cfg)
+
+[RestartFiles]
+List=	(${config_UserChoices_JobName}_${NEMO_END}_restart_ice.nc, restart_icemod.nc, restart_ice_in.nc)
+
+[OutputText]
+List=   (namelist_ice)
+
+[OutputFiles]
+List=   (${config_UserChoices_JobName}_1m_icemod.nc, ${R_OUT_ICE_O_M}/${PREFIX}_1M_icemod.nc, Post_1M_icemod ), \
+        (${config_UserChoices_JobName}_1d_icemod.nc, ${R_OUT_ICE_O_D}/${PREFIX}_1D_icemod.nc, NONE )
+
+[Post_1M_icemod]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (ice_pres, iicetemp, iicethic, iicevelu, iicevelv, isnowthi)
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=ON
+
+[Post_1D_icemod]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (iicethic, iicevelu, iicevelv, ileadfra)
+ChunckJob2D = 200Y
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lim3.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lim3.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lim3.card	(revision 2504)
@@ -0,0 +1,47 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+
+[InitialStateFiles]
+List=	()
+
+[BoundaryFiles]
+List=	()
+ListNonDel= ()
+
+[SmoothFiles]
+List=	()
+
+[ParametersFiles]
+List=	(${SUBMIT_DIR}/PARAM/namelist_lim3_${RESOL_OCE}_ref, namelist_ice_ref), \
+        (${SUBMIT_DIR}/PARAM/namelist_lim3_${RESOL_OCE}_cfg, namelist_ice_cfg)
+
+[RestartFiles]
+List=	(${config_UserChoices_JobName}_${NEMO_END}_restart_ice.nc, restart_icemod.nc, restart_ice_in.nc)
+
+[OutputText]
+List=   (namelist_ice)
+
+[OutputFiles]
+List=   (${config_UserChoices_JobName}_1m_icemod.nc, ${R_OUT_ICE_O_M}/${PREFIX}_1M_icemod.nc, Post_1M_icemod ), \
+        (${config_UserChoices_JobName}_1d_icemod.nc, ${R_OUT_ICE_O_D}/${PREFIX}_1D_icemod.nc, Post_1D_icemod )
+
+[Post_1M_icemod]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, time_counter)
+TimeSeriesVars2D = (bmelt, evap, grLateral, ialb, ice_pres, iicetemp, iicethic, iicevelu, iicevelv, ileadfra, isnowthi, prsn, rsdssi, sblsi, sim, snoToIce, snomelt, soicecov, strairx, strairy, tmelt, transifs, transix, transiy, tsice)
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=ON
+
+[Post_1D_icemod]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, time_counter)
+TimeSeriesVars2D = (iicethic, iicevelu, iicevelv, ileadfra)
+ChunckJob2D = 200Y
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lmdz.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lmdz.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/lmdz.card	(revision 2504)
@@ -0,0 +1,224 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+# Physics package to use : 
+# LMDZ_Physics=AP for standard/old physics(defalut), can be used with LMDZ4_AR5 or LMDZ5/trunk sources 
+# LMDZ_Physics=NPv3.1 for new physics, to be used with LMDZ5/trunk revision 1554 or later
+LMDZ_Physics=AP
+#LMDZ_Physics=NPv4.12
+
+# Set ConfType to choose parameters for aerosols, solar and green house gazes. 
+# The parameter file PARAM/config.def_$ConfType will be used.
+# ConfType=preind/actuel/annuel
+ConfType=preind
+
+# manage radiative aerosol effect and ozone 
+flag_aerosol=6
+ok_ade=y
+ok_aie=y
+aerosol_couple=n
+read_climoz=2
+ok_cdnc=y
+
+# ByPass_hgardfou_teta=y : modify teta_ parameters for following CumulPeriod only
+ByPass_hgardfou_teta=n
+
+# ByPass_hgardfou_mats=y : set parameter purmats=y for following CumulPeriod only
+ByPass_hgardfou_mats=n
+
+# Number of periods where to set parameter adjust=y before switching to adjust=n
+# For adjust=n, set LMDZ_NbPeriod_ajust=0. 
+LMDZ_NbPeriod_adjust=0
+
+# To force usage of specific Bands file, set LMDZ_NbPeriod_adjust=0 and replace XXXXXXX by Restart experiment
+# LMDZ_Bands_file_name=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/pdControl/XXXXXX/ATM/Debug/pdControl_XXXXXXX_Bands_96x95x19_3prc.dat_3
+
+# Set OutLevel to choose the level of output files from LMDZ. The file PARAM/output.def_$OutLevel will be used.
+# OutLevel=low/medium/high
+OutLevel=medium
+
+# Set COSP activation and Outputs frequency (monthly, daily, HF) = y/n
+LMDZ_COSP_OK=n
+LMDZ_COSP_monthly=y
+LMDZ_COSP_daily=y
+LMDZ_COSP_hf=n
+
+# Set NMC Outputs frequency (monthly, daily, HF) = y/n
+LMDZ_NMC_monthly=y
+LMDZ_NMC_daily=y
+LMDZ_NMC_hf=n
+
+# Use XIOS as output library
+XIOS=y
+
+[InitialStateFiles]
+List=  (${R_INIT}/ATM/LMDZ/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}xLMD${RESOL_ATM_3D}/start.nc    , . ), \
+       (${R_INIT}/ATM/LMDZ/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}xLMD${RESOL_ATM_3D}/startphy.nc , . )
+
+[BoundaryFiles]
+List=   ()
+# With AR5 aerosols (including ASSO4M(=SO4), CSSO4M, AIBCM, ASBCM, AIPOMM, ASPOMM, ASSSM, CSSSM, SSSSM, CIDUSTM)
+# With AR5 ozone(tropo + strato from LMDZOR-INCA-REPROBUS simulations)
+ListNonDel= (${R_BC}/ATM/${config_UserChoices_TagName}/${RESOL_ATM}/AR5/HISTORIQUE/aerosols_11YearsClim_1855_v5.nc, aerosols.nat.nc),\
+	    (${R_BC}/ATM/${config_UserChoices_TagName}/${RESOL_ATM}/AR5/HISTORIQUE/climoz_LMDZ_1855_v2.nc, climoz_LMDZ.nc)
+
+[SmoothFiles]
+List=	()
+
+[ParametersFiles]
+List=	(${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}_${LMDZ_Physics}, physiq.def), \
+	(${SUBMIT_DIR}/PARAM/gcm.def_${RESOL_ATM_3D},    gcm.def),    \
+	(${SUBMIT_DIR}/PARAM/cosp_input_nl.txt,                .),    \
+	(${SUBMIT_DIR}/PARAM/cosp_output_nl.txt,               .),    \
+	(${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, .), \
+	(${SUBMIT_DIR}/PARAM/iodef.xml, . ),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/context_lmdz.xml, . )            ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/field_def_lmdz.xml, . )          ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histday_lmdz.xml, . )   ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histhf_lmdz.xml, . )    ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histins_lmdz.xml, . )   ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histLES_lmdz.xml, . )   ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histmth_lmdz.xml, . )   ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histstn_lmdz.xml, . )   ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histmthNMC_lmdz.xml, . ),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histdayNMC_lmdz.xml, . ),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histhfNMC_lmdz.xml, . ),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histmthCOSP_lmdz.xml, .),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histdayCOSP_lmdz.xml, .),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histhfCOSP_lmdz.xml, .)    
+
+[RestartFiles]
+List=	(restart.nc, restart.nc, start.nc), \
+	(restartphy.nc, restartphy.nc,  startphy.nc)
+
+[OutputText]
+List=   (physiq.def, gcm.def, run.def, traceur.def, guide.def, config.def, used_run.def, iodef.xml, context_lmdz.xml,field_def_lmdz.xml,debug.01)
+#List=   (lmdz.x.prt)
+
+[OutputFiles]
+List=	(histmth.nc,       ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmth.nc,       Post_1M_histmth),       \
+	(histmthCOSP.nc,   ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmthCOSP.nc,   NONE),   \
+	(histmthNMC.nc,    ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmthNMC.nc,    Post_1M_histmthNMC),    \
+	(dynzon.nc,        ${R_OUT_ATM_O_M}/${PREFIX}_1M_dynzon.nc,        NONE),        \
+        (paramLMDZ_phy.nc, ${R_OUT_ATM_O_M}/${PREFIX}_1M_paramLMDZ_phy.nc, Post_1M_paramLMDZ_phy), \
+	(histday.nc,       ${R_OUT_ATM_O_D}/${PREFIX}_1D_histday.nc,       Post_1D_histday),       \
+	(histdayCOSP.nc,   ${R_OUT_ATM_O_D}/${PREFIX}_1D_histdayCOSP.nc,   NONE),   \
+	(histdayNMC.nc,    ${R_OUT_ATM_O_D}/${PREFIX}_1D_histdayNMC.nc,    Post_1D_histdayNMC),    \
+	(histhf.nc,        ${R_OUT_ATM_O_H}/${PREFIX}_HF_histhf.nc,        NONE),        \
+	(histhfCOSP.nc,    ${R_OUT_ATM_O_H}/${PREFIX}_HF_histhfCOSP.nc,    NONE),    \
+	(histhfNMC.nc,     ${R_OUT_ATM_O_H}/${PREFIX}_HF_histhfNMC.nc,     NONE),     \
+	(histhf3h.nc,      ${R_OUT_ATM_O_H}/${PREFIX}_3H_histhf3h.nc,      NONE) 
+
+[Post_1M_histmth]
+Patches= ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bounds, aire)
+TimeSeriesVars2D = (bils, cldh, cldl, cldm, cldq, cldt, evap, flat, ftime_con, iwp, lwp, LWdnSFC, LWdnSFCclr, LWupSFCclr, LWdn200, LWdn200clr, LWup200, LWup200clr, precip, prw, pluc, psol, q2m, rh2m, sens, sicf, slp, snow, soll0, soll, sols0, sols, SWdnSFC, SWupSFC, SWup200, SWdnTOA, SWupTOA, SWdn200, SWdnSFCclr, SWupSFCclr, SWupTOAclr, t2m, t2m_max, t2m_min, taux, taux_ter, taux_sic, taux_lic, taux_oce, tauy, tauy_ter, tauy_sic, tauy_lic, tauy_oce, lat_ter, lat_sic, lat_lic, lat_oce, nettop, pbase, ptop, topl0, topl, tops0, tops, topswad, topswai, tsol, tsol_ter, tsol_lic, tsol_oce, tsol_sic , u10m, u500, v10m, v500, w500, pourc_ter, pourc_oce, pourc_sic, pourc_lic, wind10m, od550aer, od550lt1aer, absvisaer, loadoa, loadbc, loadso4, loaddust, loadss, sconcoa, sconcbc, sconcso4, sconcdust, sconcss, reffclwtop, cldncl, swtoaas_ant, swtoacs_ant, swtoacf_ant, swsrfas_ant, swsrfcs_ant, swsrfcf_ant, swtoaas_nat, swtoacs_nat, swtoacf_nat, swsrfas_nat, swsrfcs_nat, swsrfcf_nat, solswai, solswad, swtoacf_zero, swsrfcf_zero)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (upwd, lwcon, iwcon, lcc3dcon, lcc3dstra, temp, theta, ovap, ovapinit, geop, vitu, vitv, vitw, pres, rneb, rnebcon, rhum, mc, paprs, scdnc, ec550aer, concoa, concbc, concso4, concss, concdust, reffclws, reffclwc, tnt, dtdyn, dtphy, dtlschr, tntr, tntscpbl, tnhus, dqdyn, dqvdf, tnhusscpbl, dqphy, evu, mcd)
+ChunckJob3D = 100Y
+Seasonal=ON
+
+[Post_1M_histmthCOSP]
+Patches = ()
+GatherWithInternal = (lon, lat, pressure2, height, sza, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (cllcalipso, clmcalipso, clhcalipso, cltcalipso, tclisccp, albisccp, ctpisccp)
+ChunckJob2D = OFF 
+TimeSeriesVars3D = (clcalipso, clisccp2_c01, clisccp2_c02, clisccp2_c03, clisccp2_c04, clisccp2_c05, clisccp2_c06, clisccp2_c07, parasol_refl)
+ChunckJob3D = OFF
+Seasonal=OFF
+
+[Post_1M_histmthNMC]
+Patches = ()
+GatherWithInternal = (lon, lat, plev, time_counter, time_counter_bounds)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = (ta, zg, hus, hur, ua, va, wap)
+ChunckJob3D = 100Y
+Seasonal=ON
+
+[Post_1M_dynzon]
+Patches = ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bounds)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+[Post_1M_paramLMDZ_phy]
+Patches=()
+GatherWithInternal = (lon, lat, time_counter, time_counter_bnds)
+TimeSeriesVars2D =(R_ecc,  R_peri, R_incl, solaire, co2_ppm, CH4_ppb, N2O_ppb, CFC11_ppt, CFC12_ppt)
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+[Post_1D_histday]
+Patches= ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (bils, cldh, cldl, cldm, cldq, cldt, evap, flat, precip, pluc, plul, prw, psol, q2m, sens, sicf, slp, soll, sols, snow, SWdnSFC, t2m, t2m_max, t2m_min, topl, tops, tsol, u10m, v10m, wind10m, wind10max)
+ChunckJob2D = 50Y
+TimeSeriesVars3D = (lwcon, iwcon, mc, rhum, rneb, temp, theta, ovap, geop, vitu, vitv, vitw, pres, paprs)
+ChunckJob3D = OFF
+Seasonal=OFF
+
+[Post_1D_histdayCOSP]
+Patches = ()
+GatherWithInternal = (lon, lat, pressure2, height, sza, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (cllcalipso, clmcalipso, clhcalipso, cltcalipso, tclisccp, albisccp, ctpisccp)
+ChunckJob2D = OFF
+TimeSeriesVars3D = (clcalipso, clisccp2_c01, clisccp2_c02, clisccp2_c03, clisccp2_c04, clisccp2_c05, clisccp2_c06, clisccp2_c07, parasol_refl)
+ChunckJob3D = OFF
+Seasonal=OFF
+
+[Post_1D_histdayNMC]
+Patches = ()
+GatherWithInternal = (lon, lat, plev, time_counter, time_counter_bounds)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = (ta, zg, hus, hur, ua, va, wap)
+ChunckJob3D = 10Y
+Seasonal=OFF
+
+[Post_HF_histhf]
+Patches= ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (cldt, psol, q2m, slp, precip, pluc, plul, t2m, tsol, u10m, v10m)
+ChunckJob2D = 50Y
+TimeSeriesVars3D = (temp, theta, ovap, vitu, vitv)
+ChunckJob3D = OFF
+Seasonal=OFF
+
+[Post_HF_histhfCOSP]
+Patches = ()
+GatherWithInternal = (lon, lat, height, sza, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (cllcalipso, clmcalipso, clhcalipso, cltcalipso)
+ChunckJob2D = OFF
+TimeSeriesVars3D = (clcalipso, parasol_refl, cfad_lidarsr532_c01, cfad_lidarsr532_c02, cfad_lidarsr532_c03, cfad_lidarsr532_c04, cfad_lidarsr532_c05, cfad_lidarsr532_c06, cfad_lidarsr532_c07, cfad_lidarsr532_c08, cfad_lidarsr532_c09, cfad_lidarsr532_c10, cfad_lidarsr532_c11, cfad_lidarsr532_c12, cfad_lidarsr532_c13, cfad_lidarsr532_c14, cfad_lidarsr532_c15)
+ChunckJob3D = OFF
+Seasonal=OFF
+
+[Post_HF_histhfNMC]
+Patches = ()
+GatherWithInternal = (lon, lat, plev, time_counter, time_counter_bounds)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = (ta, zg, hus, hur, ua, va, wap)
+ChunckJob3D = 10Y
+Seasonal=OFF
+
+[Post_3H_histhf3h]
+Patches= ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (phis, tsol, t2m, q2m, u10m, v10m, psol, topl, bils)
+ChunckJob2D = OFF
+TimeSeriesVars3D = ()
+ChunckJob3D = OFF
+Seasonal=OFF
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/oasis.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/oasis.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/oasis.card	(revision 2504)
@@ -0,0 +1,136 @@
+[Compatibility] 
+libIGCM=1.0 
+ 	 
+[UserChoices]
+OutputMode=n
+FreqCoupling=86400
+Lucia=n
+
+[InitialStateFiles]
+List=	(${R_INIT}/CPL/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}x${RESOL_ATM}/flxat.nc, flxat.nc), \
+	(${R_INIT}/CPL/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}x${RESOL_ATM}/sstoc.nc, sstoc.nc)
+
+[BoundaryFiles]
+List=	()
+ListNonDel= (${R_BC}/CPL/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}x${RESOL_ATM}/grids.nc, grids.nc),\
+	    (${R_BC}/CPL/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}x${RESOL_ATM}/masks.nc, masks.nc),\
+	    (${R_BC}/CPL/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}x${RESOL_ATM}/areas.nc, areas.nc),\
+	    (${R_BC}/CPL/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}x${RESOL_ATM}/rmp_torc_to_tlmd_MOSAIC.nc, rmp_torc_to_tlmd_MOSAIC.nc),\
+	    (${R_BC}/CPL/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}x${RESOL_ATM}/rmp_tlmd_to_torc_MOSAIC.nc, rmp_tlmd_to_torc_MOSAIC.nc),\
+	    (${R_BC}/CPL/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}x${RESOL_ATM}/rmp_tlmd_to_torc_MOSAIC_calvin.nc, rmp_tlmd_to_torc_MOSAIC_calvin.nc),\
+	    (${R_BC}/CPL/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}x${RESOL_ATM}/rmp_tlmd_to_torc_MOSAIC_rivflu.nc, rmp_tlmd_to_torc_MOSAIC_rivflu.nc)
+
+[SmoothFiles]
+List=	()
+
+[ParametersFiles]
+List=	(${SUBMIT_DIR}/PARAM/namcouple_${RESOL_CPL}, namcouple)
+
+[RestartFiles]
+List=	(flxat.nc, flxat.nc, flxat.nc),\
+	(sstoc.nc, sstoc.nc, sstoc.nc)
+
+[OutputText]
+List=   (namcouple, nout.000000, lucia, oasis_balance.eps)
+
+[OutputFiles]
+List=   (SISUTESW_LMDZ_01.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_SISUTESW.nc,    Post_ncks_cdo),\
+    (SIICECOV_LMDZ_02.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_SIICECOV.nc,    Post_ncks_cdo),\
+    (SIICTEMW_LMDZ_03.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_SIICTEMW.nc,    Post_ncks_cdo),\
+    (SIICEALW_LMDZ_04.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_SIICEALW.nc,    Post_ncks_cdo),\
+    (CURRENTX_LMDZ_05.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_CURRENTX.nc,    Post_ncks_cdo),\
+    (CURRENTY_LMDZ_06.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_CURRENTY.nc,    Post_ncks_cdo),\
+    (CURRENTZ_LMDZ_07.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_CURRENTZ.nc,    Post_ncks_cdo),\
+    (COTAUXXU_LMDZ_08.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COTAUXXU.nc,    Post_ncks_cdo),\
+    (COTAUYYU_LMDZ_09.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COTAUYYU.nc,    Post_ncks_cdo),\
+    (COTAUZZU_LMDZ_10.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COTAUZZU.nc,    Post_ncks_cdo),\
+    (COTAUXXV_LMDZ_11.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COTAUXXV.nc,    Post_ncks_cdo),\
+    (COTAUYYV_LMDZ_12.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COTAUYYV.nc,    Post_ncks_cdo),\
+    (COTAUZZV_LMDZ_13.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COTAUZZV.nc,    Post_ncks_cdo),\
+    (COWINDSP_LMDZ_14.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COWINDSP.nc,    Post_ncks_cdo),\
+    (COTOTRAI_LMDZ_15.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COTOTRAI.nc,    Post_ncks_cdo),\
+    (COTOTSNO_LMDZ_16.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COTOTSNO.nc,    Post_ncks_cdo),\
+    (COTOTEVA_LMDZ_17.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COTOTEVA.nc,    Post_ncks_cdo),\
+    (COICEVAP_LMDZ_18.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COICEVAP.nc,    Post_ncks_cdo),\
+    (COQSRMIX_LMDZ_19.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COQSRMIX.nc,    Post_ncks_cdo),\
+    (COQNSMIX_LMDZ_20.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COQNSMIX.nc,    Post_ncks_cdo),\
+    (COSHFICE_LMDZ_21.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COSHFICE.nc,    Post_ncks_cdo),\
+    (CONSFICE_LMDZ_22.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_CONSFICE.nc,    Post_ncks_cdo),\
+    (CODFLXDT_LMDZ_23.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_CODFLXDT.nc,    Post_ncks_cdo),\
+    (COCALVIN_LMDZ_24.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COCALVIN.nc,    Post_ncks_cdo),\
+    (COLIQRUN_LMDZ_25.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_COLIQRUN.nc,    Post_ncks_cdo),\
+    (O_SSTSST_oceanx_01.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_SSTSST.nc,    Post_ncks_cdo),\
+    (OIceFrc_oceanx_02.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_OIceFrac.nc,    Post_ncks_cdo),\
+    (O_TepIce_oceanx_03.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_TepIce.nc,    Post_ncks_cdo),\
+    (O_AlbIce_oceanx_04.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_AlbIce.nc,    Post_ncks_cdo),\
+    (O_OCurx1_oceanx_05.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_OCurx1.nc,    Post_ncks_cdo),\
+    (O_OCury1_oceanx_06.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_OCury1.nc,    Post_ncks_cdo),\
+    (O_OCurz1_oceanx_07.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_OCurz1.nc,    Post_ncks_cdo),\
+    (O_OTaux1_oceanx_08.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_OTaux1.nc,    Post_ncks_cdo),\
+    (O_OTauy1_oceanx_09.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_OTauy1.nc,    Post_ncks_cdo),\
+    (O_OTauz1_oceanx_10.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_OTauz1.nc,    Post_ncks_cdo),\
+    (O_OTaux2_oceanx_11.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_OTaux2.nc,    Post_ncks_cdo),\
+    (O_OTauy2_oceanx_12.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_OTauy2.nc,    Post_ncks_cdo),\
+    (O_OTauz2_oceanx_13.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_OTauz2.nc,    Post_ncks_cdo),\
+    (O_Wind10_oceanx_14.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_Wind10.nc,    Post_ncks_cdo),\
+    (OTotRain_oceanx_15.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_OTotRain.nc,    Post_ncks_cdo),\
+    (OTotSnow_oceanx_16.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_OTotSnow.nc,    Post_ncks_cdo),\
+    (OTotEvap_oceanx_17.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_OTotEvap.nc,    Post_ncks_cdo),\
+    (OIceEvap_oceanx_18.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_OIceEvap.nc,    Post_ncks_cdo),\
+    (O_QsrMix_oceanx_19.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_QsrMix.nc,    Post_ncks_cdo),\
+    (O_QnsMix_oceanx_20.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_QsrIce.nc,    Post_ncks_cdo),\
+    (O_QsrIce_oceanx_21.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_QnsMix.nc,    Post_ncks_cdo),\
+    (O_QnsIce_oceanx_22.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_QnsIce.nc,    Post_ncks_cdo),\
+    (O_dQnsdT_oceanx_23.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_dQnsdT.nc,    Post_ncks_cdo),\
+    (OCalving_oceanx_24.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_OCalving.nc,    Post_ncks_cdo),\
+    (O_Runoff_oceanx_25.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_O_Runoff.nc,    Post_ncks_cdo),\
+    (TEMPO_1D_cpl_atm.nc,    ${R_OUT_CPL_O_D}/${PREFIX}_1D_cpl_atm.nc , Post_1D_cpl_atm), \
+    (TEMPO_1D_cpl_oce.nc,    ${R_OUT_CPL_O_D}/${PREFIX}_1D_cpl_oce.nc , Post_1D_cpl_oce), \
+    (TEMPO_1M_cpl_atm.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_1M_cpl_atm.nc , Post_1M_cpl_atm), \
+    (TEMPO_1M_cpl_oce.nc,    ${R_OUT_CPL_O_M}/${PREFIX}_1M_cpl_oce.nc , Post_1M_cpl_oce)
+
+[Post_ncks_cdo]
+Patches = (Patch_20140801_ncks_cdo)
+GatherWithInternal = ()
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+[Post_1D_cpl_atm]
+Patches = (Patch_20091119_put_out)
+GatherWithInternal = ()
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+[Post_1D_cpl_oce]
+Patches = (Patch_20091119_put_out)
+GatherWithInternal = ()
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+[Post_1M_cpl_atm]
+Patches = (Patch_20091119_put_out)
+GatherWithInternal = (lon, lat, time)
+TimeSeriesVars2D = (SIICEALW, SIICECOV, SISUTESW, COCALVIN, COICEVAP, COLIQRUN, CONSFICE, COQNSMIX, COQSRMIX, COSHFICE, COTOTEVA, COTOTRAI, COTOTSNO)
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=ON
+
+[Post_1M_cpl_oce]
+Patches = (Patch_20091119_put_out)
+GatherWithInternal = (lon, lat, time)
+TimeSeriesVars2D = (OCalving, OIceEvap, OIceFrac, OTotEvap, OTotRain, OTotSnow, O_AlbIce, O_QnsIce, O_QnsMix, O_QsrIce, O_QsrMix, O_Runoff)
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=ON
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/opa9.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/opa9.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/opa9.card	(revision 2504)
@@ -0,0 +1,205 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+ORCA_version=ORCA2.3
+mesh_mask=n
+iceflx="linear"
+# OUTPUT_LEVEL=2 for standard daily outputs
+# OUTPUT_LEVEL=3 for more daily outputs
+OUTPUT_LEVEL=2
+
+[InitialStateFiles]
+List=	()
+
+[BoundaryFiles]
+List=	()
+ListNonDel= (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/ahmcoef,        .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/bathy_meter.nc, .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/coordinates.nc, .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/data_1m_potential_temperature_nomask.nc, .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/data_1m_salinity_nomask.nc, .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/geothermal_heating.nc, .),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/subbasins.nc, .),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/chlorophyll_surface.nc, chlorophyll.nc),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/Tides_K1_drg_ORCA.nc, K1rowdrg.nc),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/Tides_M2_drg_ORCA.nc, M2rowdrg.nc),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/tmaskitf_ORCA_bis.nc, mask_itf.nc),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/kRGB61.txt, .)
+
+[SmoothFiles]
+List=	()
+
+[ParametersFiles]
+List=	(${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE}_ref, namelist_ref),      \
+        (${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE}_cfg, namelist_cfg),      \
+        (${SUBMIT_DIR}/PARAM/context_nemo.xml,   context_nemo.xml),         \
+        (${SUBMIT_DIR}/PARAM/field_def_nemo.xml,   field_def_nemo.xml),     \
+        (${SUBMIT_DIR}/PARAM/domain_def_nemo.xml,  domain_def_nemo.xml)
+
+[RestartFiles]
+List=	(${config_UserChoices_JobName}_${NEMO_END}_restart.nc,  restart.nc, restartopa.nc)
+
+[OutputText]
+List=   (ocean.output, solver.stat, namelist, context_nemo.xml, field_def_nemo.xml, domain_def_nemo.xml, debug.02, out_opa.xx.out, out_opa.xx.err)
+
+[OutputFiles]
+List=   (mesh_mask.nc      , ${R_OUT_OCE_O}/${config_UserChoices_JobName}_mesh_mask.nc, NONE),\
+        (${config_UserChoices_JobName}_1y_scalar.nc, ${R_OUT_OCE_O_Y}/${PREFIX}_1Y_scalar.nc, NONE),\
+        (${config_UserChoices_JobName}_1y_grid_T.nc, ${R_OUT_OCE_O_Y}/${PREFIX}_1Y_grid_T.nc, NONE),\
+        (${config_UserChoices_JobName}_1y_grid_U.nc, ${R_OUT_OCE_O_Y}/${PREFIX}_1Y_grid_U.nc, NONE),\
+        (${config_UserChoices_JobName}_1y_grid_V.nc, ${R_OUT_OCE_O_Y}/${PREFIX}_1Y_grid_V.nc, NONE),\
+        (${config_UserChoices_JobName}_1y_grid_W.nc, ${R_OUT_OCE_O_Y}/${PREFIX}_1Y_grid_W.nc, NONE),\
+        (${config_UserChoices_JobName}_1m_scalar.nc, ${R_OUT_OCE_O_M}/${PREFIX}_1M_scalar.nc, NONE),\
+        (${config_UserChoices_JobName}_1m_grid_T.nc, ${R_OUT_OCE_O_M}/${PREFIX}_1M_grid_T.nc, Post_1M_grid_T),\
+        (${config_UserChoices_JobName}_1m_grid_U.nc, ${R_OUT_OCE_O_M}/${PREFIX}_1M_grid_U.nc, Post_1M_grid_U),\
+        (${config_UserChoices_JobName}_1m_grid_V.nc, ${R_OUT_OCE_O_M}/${PREFIX}_1M_grid_V.nc, Post_1M_grid_V),\
+        (${config_UserChoices_JobName}_1m_grid_W.nc, ${R_OUT_OCE_O_M}/${PREFIX}_1M_grid_W.nc, NONE),\
+        (${config_UserChoices_JobName}_1m_diaptr.nc, ${R_OUT_OCE_O_M}/${PREFIX}_1M_diaptr.nc, Post_1M_diaptr),\
+        (${config_UserChoices_JobName}_1d_grid_T.nc, ${R_OUT_OCE_O_D}/${PREFIX}_1D_grid_T.nc, Post_1D_grid_T),\
+        (${config_UserChoices_JobName}_1d_grid_U.nc, ${R_OUT_OCE_O_D}/${PREFIX}_1D_grid_U.nc, Post_1D_grid_U),\
+        (${config_UserChoices_JobName}_1d_grid_V.nc, ${R_OUT_OCE_O_D}/${PREFIX}_1D_grid_V.nc, Post_1D_grid_V),\
+        (damping.coeff.nc , ${R_OUT_OCE_O_D}/${PREFIX}_damping.coeff.nc, NONE),\
+        (output.abort.nc  , ${R_OUT_OCE_D}/${PREFIX}_output.abort.nc, NONE),\
+        (output.init.nc   , ${R_OUT_OCE_O_I}/${config_UserChoices_JobName}_${PeriodDateBegin}_output.init.nc, NONE)
+
+# Monthly analysis
+
+[Post_1M_scalar]
+Patches = ()
+GatherWithInternal = (time_counter, time_counter_bounds)
+TimeSeriesVars2D = (masso, volo, zosga, zossga, zostoga, thetaoga, soga)
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+[Post_1M_grid_T]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, deptht, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (sohefldo, soicecov, somixhgt, somxl010, sosaline, soshfldo, sossheig, sosstsst, sowaflup, sowindsp)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (vosaline,votemper)
+ChunckJob3D = 50Y
+Seasonal=ON
+
+[Post_1M_grid_U]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, depthu, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (sozotaux)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (vozocrtx,vozoeivu)
+ChunckJob3D = 50Y
+Seasonal=ON
+
+[Post_1M_grid_V]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, depthv, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (sometauy)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (vomecrty, vomeeivv)
+ChunckJob3D = 50Y
+Seasonal=ON
+
+[Post_1M_grid_W]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, depthw, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (soleaeiw, soleahtw)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (difvmo, difvmto, difvtrto, voddmavs, voveeivw, votkeavt, vovecrtz, wmo, wmosq)
+ChunckJob3D = 50Y
+Seasonal=OFF
+
+[Post_1M_diaptr]
+Patches = ()
+GatherWithInternal = (nav_lat, time_counter, deptht, time_counter_bounds)
+TimeSeriesVars2D = (zotemglo, zosalglo, zomsfglo, zotematl, zosalatl, zomsfatl, zotempac, zosalpac, zomsfpac, zotemind, zosalind, zomsfind, zotemipc, zosalipc, zomsfipc, sophtadv, sophtldf, sopstadv)
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=ON
+
+# Daily analysis
+
+[Post_1D_grid_T]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, deptht, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (sosstsst)
+ChunckJob2D = 200Y
+TimeSeriesVars3D = (vosaline,votemper)
+ChunckJob3D = OFF
+Seasonal=OFF
+
+[Post_1D_grid_U]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, depthu, time_counter, time_counter_bounds)
+TimeSeriesVars2D = ()
+ChunckJob2D = 200Y
+TimeSeriesVars3D = (vozocrtx)
+ChunckJob3D = OFF
+Seasonal=OFF
+
+[Post_1D_grid_V]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, depthv, time_counter, time_counter_bounds)
+TimeSeriesVars2D = ()
+ChunckJob2D = 200Y
+TimeSeriesVars3D = (vomecrty)
+ChunckJob3D = OFF
+Seasonal=OFF
+
+## Yearly analysis
+
+[Post_1Y_scalar]
+Patches = ()
+GatherWithInternal = (time_counter, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (masso, volo, zosga, zossga, zostoga, thetaoga, soga)
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+[Post_1Y_grid_T]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, deptht, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (evs, ficeberg, friver, fsitherm, hfcorr, hfevapds, hfibthermds, hfrainds, hfrunoffds, hfsithermds, hfsnthermds, nshfls, omlmax, pbo, pr, prsn, sfdsi, so20chgt, so28chgt, sohefldo, sohtc300, soicecov, somixhgt, somxl010, sosaline, soshfldo, sossheig, sosstsst, sotaumod, sowaflcd, sowaflup, sowindsp, tossq, vsfsit, wfcorr, zossq)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (rhopoto, rsds, thkcello, vosaline,votemper)
+ChunckJob3D = 50Y
+Seasonal=OFF
+
+[Post_1Y_grid_U]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, depthu, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (hfx, hfxba, hfxdiff, sozotaux)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (umo, vozocrtx,vozoeivu)
+ChunckJob3D = 50Y
+Seasonal=OFF
+
+[Post_1Y_grid_V]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, depthv, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (hfy, hfyba, hfydiff, sometauy)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (vmo, vomecrty, vomeeivv)
+ChunckJob3D = 50Y
+Seasonal=OFF
+
+[Post_1Y_grid_W]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, depthw, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (soleaeiw, soleahtw)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (difvmo, difvmto, difvtrto, voddmavs, voveeivw, votkeavt, vovecrtz, wmo, wmosq)
+ChunckJob3D = 50Y
+Seasonal=OFF
+
+[Post_1Y_diaptr]
+Patches = ()
+GatherWithInternal = (nav_lat, time_counter, deptht, time_counter_bounds)
+TimeSeriesVars2D = (zotemglo, zosalglo, zomsfglo, zotematl, zosalatl, zomsfatl, zotempac, zosalpac, zomsfpac, zotemind, zosalind, zomsfind, zotemipc, zosalipc, zomsfipc, sophtadv, sophtldf, sopstadv)
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/orchidee.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/orchidee.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/orchidee.card	(revision 2504)
@@ -0,0 +1,61 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+# The variable DefSuffix gives the suffix of the orchidee.def file to be used.
+# By default the file orchidee.def_Choi will be selected.
+# Sef DefSuffix=Choi (default) to activate default 2-layer Choisnel hydrology
+# Set DefSuffix=CWRR to activate 11-layer CWRR hydrology
+DefSuffix=Choi
+
+sechiba_LEVEL=11
+
+# Use XIOS as output library
+XIOS=y
+
+[InitialStateFiles]
+List=	(${R_INIT}/SRF/${config_UserChoices_TagName}/routing.nc,          . ), \
+	(${R_INIT}/SRF/${config_UserChoices_TagName}/PFTmap_IPCC_1850.nc, PFTmap.nc)
+
+[BoundaryFiles]
+List=   (${R_INIT}/SRF/${config_UserChoices_TagName}/soils_param.nc,      . )
+ListNonDel= ()
+
+[SmoothFiles]
+List=()
+
+[ParametersFiles]
+List=	(${SUBMIT_DIR}/PARAM/orchidee.def_${DefSuffix}, orchidee.def)   ,\
+	(${MODIPSL}/modeles/ORCHIDEE/src_xml/context_orchidee.xml, .)   ,\
+	(${MODIPSL}/modeles/ORCHIDEE/src_xml/field_def_orchidee.xml, .) ,\
+	(${MODIPSL}/modeles/ORCHIDEE/src_xml/file_def_orchidee.xml, .)
+
+[RestartFiles]
+# List restart that have to be saved/restored each loop (file out, saved, and in) :
+List=	(sechiba_rest_out.nc, sechiba_rest.nc, sechiba_rest_in.nc)
+
+[OutputText]
+List=   (out_orchidee, orchidee.def, context_orchidee.xml, field_def_orchidee.xml, file_def_orchidee.xml)
+
+[OutputFiles]
+List=	(sechiba_history.nc, ${R_OUT_SRF_O_M}/${PREFIX}_1M_sechiba_history.nc, Post_1M_sechiba_history), \
+        (sechiba_out_2.nc, ${R_OUT_SRF_O_H}/${PREFIX}_HF_sechiba_out_2.nc, NONE), \
+        (orchidee_watchout.nc, ${R_OUT_SRF_O_M}/${PREFIX}_1M_watchout.nc, NONE)
+
+[Post_1M_sechiba_history]
+Patches = ()
+GatherWithInternal = (lon, lat, time_counter, Areas, Contfrac, time_counter_bounds)
+TimeSeriesVars2D = (nobiofrac, alb_nir, alb_vis, bqsb, evap, fluxlat, fluxsens, gqsb, netrad, qair, rain, runoff, snow, snownobio, snowf, subli, tair, temp_sol, tsol_max, tsol_min, drainage,mrsos, mrso, mrros, mrro, prveg, evspsblveg, evspsblsoi, tran, treeFrac, grassFrac, cropFrac, baresoilFrac, residualFrac)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (lai, maxvegetfrac, vegetfrac, ptn, nee)
+ChunckJob3D = NONE
+Seasonal=ON
+
+[Post_HF_sechiba_out_2]
+Patches= ()
+GatherWithInternal= (lon, lat, time_counter, Areas, Contfrac, time_counter_bounds)
+TimeSeriesVars2D= (mrsos, mrro)
+ChunckJob2D= 50Y
+TimeSeriesVars3D= (ptn)
+ChunckJob3D= 10Y
+Seasonal= OFF
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/pisces.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/pisces.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/pisces.card	(revision 2504)
@@ -0,0 +1,72 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+DBIO_ENABLE=y
+
+[InitialStateFiles]
+List= ()
+
+[BoundaryFiles]
+List=	()
+ListNonDel= (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/par.orca.nc,                               .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/solubility.orca.nc,                        .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/data_DIC_nomask.nc,                        .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/data_Alkalini_nomask.nc,                   .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/data_O2_nomask.nc,                         .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/data_NO3_nomask.nc,                        .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/data_PO4_nomask.nc,                        .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/data_Si_nomask.nc,                         .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/data_DOC_nomask.nc,                        .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/data_Fer_nomask.nc,                        .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/DUST_INCA_MONTHLY_2000_2006.nc, dust.orca.nc), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/river_global_news.nc,          river.orca.nc), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/bathy.orca.nc,                             .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_ORCA_version}/ndeposition.orca.nc,                       .)
+
+[SmoothFiles]
+List=  ()
+
+[ParametersFiles]
+List=	(${SUBMIT_DIR}/PARAM/namelist_top_${RESOL_OCE}_ref, namelist_top_ref), \
+	(${SUBMIT_DIR}/PARAM/namelist_top_${RESOL_OCE}_cfg, namelist_top_cfg), \
+        (${SUBMIT_DIR}/PARAM/namelist_pisces_${RESOL_OCE}_ref, namelist_pisces_ref) ,\
+        (${SUBMIT_DIR}/PARAM/namelist_pisces_${RESOL_OCE}_cfg, namelist_pisces_cfg)
+
+[RestartFiles]
+List=	(${config_UserChoices_JobName}_${NEMO_END}_restart_trc.nc,  restart_trc.nc, restart_trc.nc)
+
+[OutputText]
+List=   (namelist_top_ref, namelist_cfg, namelist_pisces_ref, namelist_pisces_cfg)
+
+[OutputFiles]
+List=   (${config_UserChoices_JobName}_1m_ptrc_T.nc, ${R_OUT_MBG_O_M}/${PREFIX}_1M_ptrc_T.nc, Post_1M_ptrc_T), \
+        (${config_UserChoices_JobName}_1m_diad_T.nc, ${R_OUT_MBG_O_M}/${PREFIX}_1M_diad_T.nc, Post_1M_diad_T), \
+        (${config_UserChoices_JobName}_1m_dbio_T.nc, ${R_OUT_MBG_O_M}/${PREFIX}_1M_dbio_T.nc, NONE)
+
+[Post_1M_ptrc_T]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, deptht, time_counter, time_counter_bounds)
+TimeSeriesVars2D = ()
+ChunckJob2D = OFF
+TimeSeriesVars3D = (Alkalini, BFe, CaCO3, DCHL, DFe, DIC, DOC, DSi, Fer, GOC, GSi, NCHL, NFe, NH4, NO3, O2, PHY, PHY2, PO4, POC, SFe, Si, ZOO, ZOO2)
+ChunckJob3D = 50Y
+Seasonal=ON
+
+[Post_1M_diad_T]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, deptht, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (Cflx, Dpco2, Dpo2, EPC100, EPCAL100, EPFE100, EPSI100, Heup, Irondep, Kg, Nfix, Oflx)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (PPPHY, PPPHY2, PPNEWN, PPNEWD, PAR, PH)
+ChunckJob3D = 50Y
+Seasonal=ON
+
+[Post_1M_dbio_T]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, deptht, time_counter, time_counter_bounds)
+TimeSeriesVars2D = (INTDIC, INTNFIX, INTPBFE, INTPBSI, INTPCAL, INTPNEW, INTPP, INTPPPHY, INTPPPHY2, O2MIN, ZO2MIN )
+ChunckJob2D = NONE
+TimeSeriesVars3D = (CHLT, EXPC, EXPCAL, EXPFE, EXPSI, PFET, PHYT, POCT, TPBFE, TPNEW, TPP, ZOOT)
+ChunckJob3D = 50Y
+Seasonal=ON
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/stomate.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/stomate.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/stomate.card	(revision 2504)
@@ -0,0 +1,47 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+stomate_LEVEL=10
+
+[InitialStateFiles]
+List=   ()
+
+[BoundaryFiles]
+List=	()
+ListNonDel= (${R_BC}/SRF/${config_UserChoices_TagName}/reftemp.nc, .)
+
+[SmoothFiles]
+List=	()
+
+[ParametersFiles]
+List=   ()
+
+[RestartFiles]
+# List restart that have to be saved/restored each loop (file out, saved, and in) :
+List=	(stomate_rest_out.nc, stomate_rest.nc, stomate_rest_in.nc)
+
+[OutputText]
+List=   ()
+
+[OutputFiles]
+List=	(stomate_history.nc, ${R_OUT_SBG_O_M}/${PREFIX}_1M_stomate_history.nc, Post_1M_stomate_history) \
+    (stomate_ipcc_history.nc, ${R_OUT_SBG_O_M}/${PREFIX}_1M_stomate_ipcc_history.nc, Post_1M_stomate_ipcc_history)
+
+[Post_1M_stomate_history]
+Patches= ()
+GatherWithInternal= (lon, lat, PFT, time_counter, Areas, time_counter_bounds)
+TimeSeriesVars2D= (T2M_MONTH,CONTFRAC,RESOLUTION_X,RESOLUTION_Y,CONVFLUX,CFLUX_PROD10,CFLUX_PROD100,HARVEST_ABOVE)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (LAI,VEGET_MAX,NPP,GPP,HET_RESP,MAINT_RESP,GROWTH_RESP,AGE,HEIGHT,TOTAL_M,TOTAL_BM_LITTER,TOTAL_SOIL_CARB,CO2_FIRE,TOTAL_TURN)
+ChunckJob3D = NONE
+Seasonal=ON
+
+[Post_1M_stomate_ipcc_history]
+Patches= ()
+GatherWithInternal= (lon, lat, PFT, time_counter, Areas, CONTFRAC, time_counter_bounds)
+TimeSeriesVars2D=(cVeg, cLitter, cSoil, cProduct, lai, gpp, ra, npp, rh, fFire, fHarvest, fLuc, nbp, fVegLitter, fLitterSoil, cLeaf, cWood, cRoot, cMisc, cLitterAbove, cLitterBelow, cSoilFast, cSoilMedium, cSoilSlow, landCoverFrac, treeFracPrimDec, treeFracPrimEver, c3PftFrac, c4PftFrac, rGrowth, rMaint, nppLeaf, nppWood, nppRoot, nep)
+ChunckJob2D = NONE
+TimeSeriesVars3D=()
+ChunckJob3D = NONE
+Seasonal=ON
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/xios.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/xios.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/COMP/xios.card	(revision 2504)
@@ -0,0 +1,29 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+
+[InitialStateFiles]
+List=	()
+
+[BoundaryFiles]
+List=	()
+ListNonDel= ()
+
+[SmoothFiles]
+List=	()
+
+[ParametersFiles]
+List=	()
+
+[RestartFiles]
+List=	(NONE)
+
+[OutputText]
+List=   ()
+
+[OutputFiles]
+List=   ()
+
+
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/config.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/config.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/IPSLCM/piControl/config.card	(revision 2504)
@@ -0,0 +1,215 @@
+#
+# This is config.card file for IPSLCM5A configuration
+#
+#========================================================================
+#D-- Compatibility -
+[Compatibility]
+libIGCM=1.0
+#D-- UserChoices -
+[UserChoices]
+#===========================
+JobName=CPL01
+#----- Short Name of Experiment
+ExperimentName=piControl
+#----- DEVT TEST PROD
+SpaceName=TEST
+LongName="IPSLCM6_rc0"
+TagName=IPSLCM6
+#D- Choice of experiment in EXPERIEMENTS directory
+ExpType=IPSLCM/piControl
+#============================
+#-- leap, noleap, 360d
+CalendarType=noleap
+#-- Experiment dates : Beginning and ending
+#-- "YYYY-MM-DD"
+DateBegin=1850-01-01
+DateEnd=1859-12-31
+#============================
+#-- 1Y, 1M, 5D, 1D Period Length of one trunk of simulation
+PeriodLength=1Y
+#============================
+#-- Total Number of Processors (minimum is 2 for a coupled configuration)
+#JobNumProcTot=4
+JobNumProcTot=32
+#============================
+# config.card configuration options :
+#R_INIT=/u/rech/psl/rpsl035/IGCM/INIT
+#R_INIT=/ccc/work/cont003/dsm/p86ipsl/IGCM/INIT
+#R_BC=/u/rech/psl/rpsl035/IGCM/BC
+#R_BC=/dmnfs/cont003/p86ipsl/IGCM/BC
+#============================
+
+#========================================================================
+#D-- Restarts -
+[Restarts]
+#D- by default: config.card describes no restart for all components 
+#D-             ie start from Levitus or limit files
+#D- If you want to restart all components from the same simulation,
+#D-      put OveRule flag to 'y' and set the next 3 parameters
+OverRule=y
+#D- Last day of the experience used as restart for all components
+RestartDate=2499-12-31
+#D- Define restart simulation name for all components
+RestartJobName=piControl2
+#D- Path Server Group Login
+RestartPath=${R_IN}/RESTART/IPSLCM5A/PROD/piControl
+
+#========================================================================
+#D-- ATM -
+[ATM]
+#
+WriteFrequency="1M 1D"
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart= n
+# Last day of the experience used as restart for this component if Restart=y
+RestartDate=1899-12-31
+# Define restart simulation name for this component
+RestartJobName=EXP00
+RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/piControl
+# Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- OCE -
+[OCE]
+WriteFrequency="1M 1D"
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart= n
+##-- Last day of the experience used as restart for this component if Restart=y
+RestartDate=1899-12-31
+# Define restart simulation name for this component
+RestartJobName=EXP00
+RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/piControl
+# Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- ICE -
+[ICE]
+WriteFrequency="1M 1D"
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart= n
+##-- Last day of the experience used as restart for this component if Restart=y
+RestartDate=1899-12-31
+# Define restart simulation name for this component
+RestartJobName=EXP00           
+RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/piControl
+# Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- MBG -
+[MBG]
+WriteFrequency="1M"
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart= n
+##-- Last day of the experience used as restart for this component if Restart=y
+RestartDate=1990-12-31
+# Define restart simulation name
+RestartJobName=EXP00
+RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/piControl
+# Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- SRF -
+[SRF]
+WriteFrequency="1M"
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart=n
+##-- Last day of the experience used as restart for this component if Restart=y
+RestartDate=1899-12-31
+# Define restart simulation name for this component
+RestartJobName=EXP00
+RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/piControl
+#-- Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- SBG - STOMATE
+[SBG]
+WriteFrequency="1M"
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart=n
+#-- Last day of the experience used as restart for this component if Restart=y
+RestartDate=1899-12-31
+# Define restart simulation name for this component
+RestartJobName=EXP00
+RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/piControl
+#-- Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- CPL -
+[CPL]
+WriteFrequency="1M 1D"
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart= n
+##-- Last day of the experience used as restart for this component if Restart=y
+RestartDate=1899-12-31
+# Define restart simulation name for this component
+RestartJobName=EXP00
+RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/piControl
+# Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- IOS -
+[IOS]
+WriteFrequency=""
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart= n
+##-- Last day of the experience used as restart for this component if Restart=y
+RestartDate=
+# Define restart simulation name for this component
+RestartJobName=
+RestartPath=
+# Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- ListOfComponents -
+[ListOfComponents]
+#D- For each component, Name of component, Tag of component
+ATM= (lmdz, LMDZ4-dev)
+SRF= (orchidee, ORCHIDEE_1_9_5)
+SBG= (stomate, ORCHIDEE_1_9_5)
+OCE= (opa9, CMIP5_IPSL)
+ICE= (lim2, CMIP5_IPSL)
+MBG= (pisces, CMIP5_IPSL)
+CPL= (oasis, OASIS3-MCT)
+IOS= (xios, XIOS)
+
+#========================================================================
+#D-- Executable -
+[Executable]
+#D- For each component, Real name of executable, Name of executable for oasis
+ATM= (gcm.e, lmdz.x, 27MPI, 4OMP)
+SRF= ("" ,"" )
+SBG= ("" ,"" )
+OCE= (opa, opa.xx, 19MPI)
+ICE= ("" ,"" )
+MBG= ("" ,"" )
+CPL= ("", "" )
+IOS= (xios_server.exe, xios.x, 1MPI)
+
+#========================================================================
+#D-- Post -
+[Post]
+#D- Do we rebuild parallel output, this flag determines
+#D- frequency of rebuild submission (use NONE for DRYRUN=3)
+RebuildFrequency=1Y
+PackFrequency=10Y
+#D- Do we rebuild parallel output from archive (use true on vargas)
+RebuildFromArchive=NONE
+#D- If you want to produce time series, this flag determines
+#D- frequency of post-processing submission (NONE if you don't want)
+TimeSeriesFrequency=10Y
+#D- If you want to produce seasonal average, this flag determines
+#D- the period of this average (NONE if you don't want)
+SeasonalFrequency=10Y
+#D- Offset for seasonal average first start dates ; same unit as SeasonalFrequency
+#D- Usefull if you do not want to consider the first X simulation's years
+SeasonalFrequencyOffset=0
+
+#========================================================================
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/lmdz.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/lmdz.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/lmdz.card	(revision 2504)
@@ -0,0 +1,239 @@
+# $Id$
+
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+# Physics package to use : 
+# AP for standard/old physics(defalut), can be used with LMDZ4_AR5 or LMDZ5/trunk sources 
+# NPv3.1 for new physics, to be used with LMDZ5/trunk revision 1554 or later
+LMDZ_Physics=AP
+
+# Use XIOS as output library
+XIOS=y
+
+# Set the variable CREATE needed further below to find the initial and boundary condition files.
+CREATE=ELC-${RESOL_ATM_3D}
+
+# ByPass_hgardfou_teta=y : modify teta_ parameters for following CumulPeriod only
+ByPass_hgardfou_teta=n
+
+# ByPass_hgardfou_mats=y : set parameter purmats=y for following CumulPeriod only
+ByPass_hgardfou_mats=n
+
+# Number of periods where to set parameter adjust=y before switching to adjust=n
+# For adjust=n, set LMDZ_NbPeriod_ajust=0. 
+LMDZ_NbPeriod_adjust=3
+
+# To force usage of specific Bands file, set LMDZ_NbPeriod_adjust=0 and replace XXXXXXX by Restart Job Name
+# LMDZ_Bands_file_name=${ARCHIVE}/IGCM_OUT/IPSLCM5/XXXXXXX/ATM/Debug/XXXXXXX_Bands_96x95x19_3prc.dat_3
+
+# Set ConfType to choose parameters for aerosols, solar and green house gazes. 
+# The parameter file PARAM/config.def_$ConfType will be used.
+# ConfType=preind/actuel/annuel
+ConfType=actuel
+
+# manage radiative aerosol effect and ozone 
+flag_aerosol=6
+ok_ade=y
+ok_aie=y
+aerosol_couple=n
+read_climoz=2
+ok_cdnc=y
+
+# Set OutLevel to choose the level of output files from LMDZ. The file PARAM/output.def_$OutLevel will be used.
+# OutLevel=low/medium/high
+OutLevel=low
+
+# Set COSP activation and Outputs frequency (monthly, daily, HF) = y/n
+LMDZ_COSP_OK=n
+LMDZ_COSP_monthly=y
+LMDZ_COSP_daily=y
+LMDZ_COSP_hf=n
+
+# Set NMC Outputs frequency (monthly, daily, HF) = y/n
+LMDZ_NMC_monthly=n
+LMDZ_NMC_daily=n
+LMDZ_NMC_hf=n
+
+# Nugding : ok_guide=y/n
+# If ok_guide=y, add nudging files(u.nc, v.nc, hur.nc,...) in BoundaryFiles section below.
+ok_guide=n
+
+
+[InitialStateFiles]
+List=	(${ARCHIVE}/IGCM_OUT/LMDZ/${CREATE}/ATM/Output/Restart/${CREATE}_clim_start.nc,    start.nc),\
+        (${ARCHIVE}/IGCM_OUT/LMDZ/${CREATE}/ATM/Output/Restart/${CREATE}_clim_startphy.nc, startphy.nc) 
+
+[BoundaryFiles]
+List=()
+#List=
+#      (/dmnfs/cont003/p86ghatt/IGCM_OUT/LMDZOR/NUDGING-CORDEX-AFR/${year}${month}/u.nc, u.nc),\
+#      (/dmnfs/cont003/p86ghatt/IGCM_OUT/LMDZOR/NUDGING-CORDEX-AFR/${year}${month}/v.nc, v.nc)
+
+# With AR5 aerosols (including ASSO4M(=SO4), CSSO4M, AIBCM, ASBCM, AIPOMM, ASPOMM, ASSSM, CSSSM, SSSSM, CIDUSTM)
+# With AR5 ozone(tropo + strato from LMDZOR-INCA-REPROBUS simulations)
+ListNonDel= (${ARCHIVE}/IGCM_OUT/LMDZ/${CREATE}/ATM/Output/Boundary/${CREATE}_clim_limit.nc, limit.nc),\
+            (${ARCHIVE}/IGCM_OUT/LMDZ/${CREATE}/ATM/Output/Boundary/${CREATE}_climoz_LMDZ.nc, climoz_LMDZ.nc),\
+            (${R_BC}/ATM/${config_UserChoices_TagName}/${RESOL_ATM}/AR5/HISTORIQUE/aerosols_11YearsClim_1995_v5.nc, aerosols1980.nc),\
+            (${R_BC}/ATM/${config_UserChoices_TagName}/${RESOL_ATM}/AR5/HISTORIQUE/aerosols_11YearsClim_1860_v5.nc, aerosols.nat.nc)
+
+[SmoothFiles]
+# With AR5 aerosols (including ASSO4M(=SO4), CSSO4M, AIBCM, ASBCM, AIPOMM, ASPOMM, ASSSM, CSSSM, SSSSM, CIDUSTM)
+# With AR5 ozone(tropo + strato from LMDZOR-INCA-REPROBUS simulations)
+List=()
+
+[ParametersFiles]
+List=	(${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}_${LMDZ_Physics}, physiq.def), \
+	(${SUBMIT_DIR}/PARAM/gcm.def_${RESOL_ATM_3D},    gcm.def),    \
+	(${SUBMIT_DIR}/PARAM/cosp_input_nl.txt,                .),    \
+	(${SUBMIT_DIR}/PARAM/cosp_output_nl.txt,               .),    \
+	(${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, .), \
+	(${SUBMIT_DIR}/PARAM/iodef.xml, . ),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/context_lmdz.xml, . )            ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/field_def_lmdz.xml, . )          ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histday_lmdz.xml, . )   ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histhf_lmdz.xml, . )    ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histins_lmdz.xml, . )   ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histLES_lmdz.xml, . )   ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histmth_lmdz.xml, . )   ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histstn_lmdz.xml, . )   ,\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histmthNMC_lmdz.xml, . ),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histdayNMC_lmdz.xml, . ),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histhfNMC_lmdz.xml, . ),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histmthCOSP_lmdz.xml, . ),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histdayCOSP_lmdz.xml, . ),\
+	(${MODIPSL}/modeles/LMDZ/DefLists/file_def_histhfCOSP_lmdz.xml, . )
+
+[RestartFiles]
+List=	(restart.nc, restart.nc, start.nc), \
+	(restartphy.nc, restartphy.nc,  startphy.nc)
+
+[OutputText]
+List=   (physiq.def, gcm.def, run.def, traceur.def, guide.def, config.def, output.def, used_*, iodef.xml, context_lmdz.xml,field_def_lmdz.xml)
+
+[OutputFiles]
+List=	(histmth.nc,      ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmth.nc,      Post_1M_histmth),     \
+	(histmthCOSP.nc,  ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmthCOSP.nc,  Post_1M_histmthCOSP), \
+	(histmthNMC.nc,   ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmthNMC.nc,   Post_1M_histmthNMC),  \
+	(dynzon.nc,       ${R_OUT_ATM_O_M}/${PREFIX}_1M_dynzon.nc,       Post_1M_dynzon),      \
+	(histday.nc,      ${R_OUT_ATM_O_D}/${PREFIX}_1D_histday.nc,      Post_1D_histday),     \
+	(histdayCOSP.nc,  ${R_OUT_ATM_O_D}/${PREFIX}_1D_histdayCOSP.nc,  Post_1D_histdayCOSP), \
+	(histdayNMC.nc,   ${R_OUT_ATM_O_D}/${PREFIX}_1D_histdayNMC.nc,   Post_1D_histdayNMC),  \
+	(histhf.nc,       ${R_OUT_ATM_O_H}/${PREFIX}_HF_histhf.nc,       Post_HF_histhf),      \
+	(histhfCOSP.nc,   ${R_OUT_ATM_O_H}/${PREFIX}_HF_histhfCOSP.nc,   Post_HF_histhfCOSP),  \
+	(histhfNMC.nc,    ${R_OUT_ATM_O_H}/${PREFIX}_HF_histhfNMC.nc,    Post_HF_histhfNMC),   \
+	(histhf3h.nc,     ${R_OUT_ATM_O_H}/${PREFIX}_3H_histhf3h.nc,     Post_3H_histhf3h),    \
+        (histhf3hm.nc,    ${R_OUT_ATM_O_H}/${PREFIX}_3H_histhf3hm.nc,    Post_3H_histhf3hm)
+
+[Post_1M_histmth]
+Patches= ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds, aire)
+TimeSeriesVars2D = (bils, cldh, cldl, cldm, cldq, cldt, evap, flat, ftime_con, ftime_th, iwp, lwp, LWdnSFC, LWdnSFCclr, LWupSFCclr, LWdn200, LWdn200clr, LWup200, LWup200clr, LWupTOA, LWupTOAclr, precip, prw, pluc, psol, q2m, rh2m, sens, sicf, slp, snow, soll0, soll, sols0, sols, SWdnSFC, SWupSFC, SWup200, SWdnTOA, SWupTOA, SWdn200, SWdnSFCclr, SWupSFCclr, SWupTOAclr, t2m, t2m_max, t2m_min, taux, taux_ter, taux_sic, taux_lic, taux_oce, tauy, tauy_ter, tauy_sic, tauy_lic, tauy_oce, lat_ter, lat_sic, lat_lic, lat_oce, mc, nettop, paprs, pbase, ptop, topl0, topl, tops0, tops, topswad, topswai, tsol, tsol_ter, tsol_lic, tsol_oce, tsol_sic , u10m, u500, v10m, v500, w500, pourc_ter, pourc_oce, pourc_sic, pourc_lic, wind10m, od550aer, od550lt1aer, absvisaer, loadoa, loadbc, loadso4, loaddust, loadss, sconcoa, sconcbc, sconcso4, sconcdust, sconcss, reffclwtop, cldncl)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (upwd, lwcon, iwcon, temp, theta, ovap, ovapinit, geop, vitu, vitv, vitw, pres, rneb, rnebcon, rhum, ec550aer, concoa, concbc, concso4, concss, concdust, reffclws, reffclwc)
+ChunckJob3D = 100Y
+Seasonal=ON
+
+[Post_1M_histmthCOSP]
+Patches = ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds, aire)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE 
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+[Post_1M_histmthNMC]
+Patches = ()
+GatherWithInternal = (lon, lat, plev, time_counter, time_counter_bnds)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = (ta, zg, hus, hur, ua, va, wap, psbg, uv, vq, vT, wq, vphi, wT, uxu, vxv, TxT, ozone, ozone_daylight)
+ChunckJob3D = 100Y
+Seasonal=OFF
+
+[Post_1M_dynzon]
+Patches = ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+[Post_1D_histday]
+Patches= ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds)
+TimeSeriesVars2D = (bils, cldh, cldl, cldm, cldq, cldt, evap, flat, iwp, lwp, phi500, precip, pluc, plul, prw, psol, rh2m, rh2m_min, rh2m_max, q2m, sens, sicf, slp, soll, sols, LWdnSFC, SWdnSFC, LWupSFCclr,SWupSFC, t2m, t2m_max, t2m_min, topl, tops, tsol, u10m, v10m, wind10m, wind10max, u850, v850, w850, phi850, q850, t850, u700, v700, w700, phi700, q700, t700, u500, v500, w500, phi500, q500, t500, u200, v200, w200, phi200, q200, t200)
+ChunckJob2D = 200Y
+TimeSeriesVars3D = (rhum, temp, theta, ovap, ovapinit, geop, vitu, vitv, vitw, pres)
+ChunckJob3D = 10Y
+Seasonal=OFF
+
+[Post_1D_histdayCOSP]
+Patches = ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds, aire)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE 
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+[Post_1D_histdayNMC]
+Patches = ()
+GatherWithInternal = (lon, lat, plev, time_counter, time_counter_bnds)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = (ta, zg, hus, hur, ua, va, wap)
+ChunckJob3D = 10Y
+Seasonal=OFF
+
+[Post_HF_histhf]
+Patches= ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds)
+TimeSeriesVars2D = (cldt, psol, q2m, slp, SWnetOR, SWdownOR, LWdownOR, precip, pluc, plul, t2m, tsol, u10m, v10m, t850, t700, t500, t200, t50, t10, u850, u700, u500, u200, u50, u10, v850, v700, v500, v200, v50, v10, phi850, phi700, phi200, phi50, phi10, w850, w700, w500, w200, w50, w10, q850, q700, q500, q200, q50, q10)
+ChunckJob2D = 50Y
+TimeSeriesVars3D = (temp, theta, ovap, vitu, vitv)
+ChunckJob3D = 10Y
+Seasonal=OFF
+
+[Post_HF_histhfCOSP]
+Patches = ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds, aire)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE 
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
+[Post_HF_histhfNMC]
+Patches = ()
+GatherWithInternal = (lon, lat, plev, time_counter, time_counter_bnds)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = (ta, zg, hus, hur, ua, va, wap, psbg, uv, vq, vT, wq, vphi, wT, uxu, vxv, TxT)
+ChunckJob3D = 100Y
+Seasonal=OFF
+
+[Post_3H_histhf3h]
+Patches= ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds)
+TimeSeriesVars2D = (phis, tsol, t2m, q2m, u10m, v10m, psol, topl, bils, cdrh)
+ChunckJob2D = 50Y
+TimeSeriesVars3D = ()
+ChunckJob3D = OFF
+Seasonal=OFF
+
+[Post_3H_histhf3hm]
+Patches= ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds)
+TimeSeriesVars2D = (precip, flat, sens, LWdnSFC, LWupSFC, SWdnSFC, SWupSFC, pluc, snow, LWdnSFCclr, SWdnSFCclr, LWupSFCclr, cldt)
+ChunckJob2D = 50Y
+TimeSeriesVars3D = ()
+ChunckJob3D = OFF
+Seasonal=OFF
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/orchidee.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/orchidee.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/orchidee.card	(revision 2504)
@@ -0,0 +1,65 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+# The variable DefSuffix gives the suffix of the orchidee.def file to be used.
+# By default the file orchidee.def_Choi will be selected.
+# Sef DefSuffix=Choi (default) to activate default 2-layer Choisnel hydrology
+# Set DefSuffix=CWRR to activate 11-layer CWRR hydrology
+DefSuffix=Choi
+
+sechiba_LEVEL=11
+VEGET_UPDATE=0Y
+LAND_COVER_CHANGE=n
+
+# Use XIOS as output library
+XIOS=y
+
+[InitialStateFiles]
+List=	(${R_INIT}/SRF/${config_UserChoices_TagName}/soils_param.nc,      . ), \
+	(${R_INIT}/SRF/${config_UserChoices_TagName}/routing.nc,          . ), \
+	(${R_BC}/SRF/${config_UserChoices_TagName}/PFTmap_1850to2005_AR5_LUHa.rc2/PFTmap_IPCC_2000.nc, PFTmap.nc), \
+        (${R_INIT}/SRF/${config_UserChoices_TagName}/cartepente2d_15min.nc, .)
+
+[BoundaryFiles]
+List= ()
+ListNonDel= ()
+
+[SmoothFiles]
+List= ()
+
+[ParametersFiles]
+List=	(${SUBMIT_DIR}/PARAM/orchidee.def_${DefSuffix}, orchidee.def)   ,\
+	(${MODIPSL}/modeles/ORCHIDEE/src_xml/context_orchidee.xml, .)   ,\
+	(${MODIPSL}/modeles/ORCHIDEE/src_xml/field_def_orchidee.xml, .) ,\
+	(${MODIPSL}/modeles/ORCHIDEE/src_xml/file_def_orchidee.xml, .)
+
+[RestartFiles]
+# List restart that have to be saved/restored each loop (file out, saved, and in) :
+List=	(sechiba_rest_out.nc, sechiba_rest.nc, sechiba_rest_in.nc)
+
+[OutputText]
+List=   (out_orchidee, orchidee.def, used_orchidee.def, iodef.xml, context_orchidee.xml, field_def_orchidee.xml, file_def_orchidee.xml)
+
+[OutputFiles]
+List=	(sechiba_history.nc, ${R_OUT_SRF_O_M}/${PREFIX}_1M_sechiba_history.nc, Post_1M_sechiba_history), \
+        (sechiba_out_2.nc, ${R_OUT_SRF_O_H}/${PREFIX}_HF_sechiba_out_2.nc, Post_HF_sechiba_out_2), \
+        (orchidee_watchout.nc, ${R_OUT_SRF_O_M}/${PREFIX}_1M_watchout.nc, NONE)
+
+[Post_1M_sechiba_history]
+Patches= ()
+GatherWithInternal= (lon, lat, veget, time_counter, time_counter_bnds, Areas, Contfrac)
+TimeSeriesVars2D= (nobiofrac, alb_nir, alb_vis, bqsb, evap, fluxlat, fluxsens, gqsb, netrad, qair, rain, runoff, snow, snownobio, snowf, subli, tair, temp_sol, tsol_max, tsol_min, drainage,mrsos, mrso, mrros, mrro, prveg, evspsblveg, evspsblsoi, tran, treeFrac, grassFrac, cropFrac, baresoilFrac, residualFrac)
+ChunckJob2D= NONE
+TimeSeriesVars3D= (lai, maxvegetfrac, vegetfrac, CO2FLUX, ptn, nee)
+ChunckJob3D= NONE
+Seasonal= ON
+
+[Post_HF_sechiba_out_2]
+Patches= ()
+GatherWithInternal= (lon, lat, veget, time_counter, time_counter_bnds, Areas, Contfrac)
+TimeSeriesVars2D= (mrsos, mrro)
+ChunckJob2D= 50Y
+TimeSeriesVars3D= (ptn)
+ChunckJob3D= 10Y
+Seasonal= OFF
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/stomate.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/stomate.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/stomate.card	(revision 2504)
@@ -0,0 +1,47 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+stomate_LEVEL=10
+
+[InitialStateFiles]
+List=   ()
+
+[BoundaryFiles]
+List=	()
+ListNonDel= (${R_BC}/SRF/${config_UserChoices_TagName}/reftemp.nc, .)
+
+[SmoothFiles]
+List=	()
+
+[ParametersFiles]
+List=   ()
+
+[RestartFiles]
+# List restart that have to be saved/restored each loop (file out, saved, and in) :
+List=	(stomate_rest_out.nc, stomate_rest.nc, stomate_rest_in.nc)
+
+[OutputText]
+List=   ()
+
+[OutputFiles]
+List=	(stomate_history.nc, ${R_OUT_SBG_O_M}/${PREFIX}_1M_stomate_history.nc, Post_1M_stomate_history) \
+    (stomate_ipcc_history.nc, ${R_OUT_SBG_O_M}/${PREFIX}_1M_stomate_ipcc_history.nc, Post_1M_stomate_ipcc_history)
+
+[Post_1M_stomate_history]
+Patches= ()
+GatherWithInternal= (lon, lat, PFT, time_counter, time_counter_bnds, Areas)
+TimeSeriesVars2D= (T2M_MONTH,CONTFRAC,RESOLUTION_X,RESOLUTION_Y,CONVFLUX,CFLUX_PROD10,CFLUX_PROD100,HARVEST_ABOVE)
+ChunckJob2D = NONE
+TimeSeriesVars3D = (CO2FLUX_MONTHLY,LAI,VEGET,VEGET_MAX,NPP,GPP,HET_RESP,MAINT_RESP,GROWTH_RESP,AGE,HEIGHT,TOTAL_M,TOTAL_BM_LITTER,TOTAL_SOIL_CARB,CO2_FIRE)
+ChunckJob3D = NONE
+Seasonal=ON
+
+[Post_1M_stomate_ipcc_history]
+Patches= ()
+GatherWithInternal= (lon, lat, PFT, time_counter, time_counter_bnds, Areas, CONTFRAC)
+TimeSeriesVars2D=(cVeg, cLitter, cSoil, cProduct, lai, gpp, ra, npp, rh, fFire, fHarvest, fLuc, nbp, fVegLitter, fLitterSoil, cLeaf, cWood, cRoot, cMisc, cLitterAbove, cLitterBelow, cSoilFast, cSoilMedium, cSoilSlow, landCoverFrac, treeFracPrimDec, treeFracPrimEver, c3PftFrac, c4PftFrac, rGrowth, rMaint, nppLeaf, nppWood, nppRoot, nep)
+ChunckJob2D = NONE
+TimeSeriesVars3D=()
+ChunckJob3D = NONE
+Seasonal=ON
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/xios.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/xios.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/COMP/xios.card	(revision 2504)
@@ -0,0 +1,29 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+
+[InitialStateFiles]
+List=	()
+
+[BoundaryFiles]
+List=	()
+ListNonDel= ()
+
+[SmoothFiles]
+List=	()
+
+[ParametersFiles]
+List=	()
+
+[RestartFiles]
+List=	(NONE)
+
+[OutputText]
+List=   (xios_client_*)
+
+[OutputFiles]
+List=   ()
+
+
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/config.card
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/config.card	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/EXPERIMENTS/LMDZOR/clim/config.card	(revision 2504)
@@ -0,0 +1,143 @@
+# $Id$
+# This is config.card file for restart with an NEW libIGCM simulation tree.
+#
+#========================================================================
+#D-- Compatibility -
+[Compatibility]
+libIGCM=1.0
+#D-- UserChoices -
+[UserChoices]
+#============================
+#-- (<8 chars MAX for JobName)
+JobName=LMDZOR01
+#----- Short Name of Experiment
+ExperimentName=clim
+#----- DEVT TEST PROD
+SpaceName=TEST
+LongName="LMDZOR configuration"
+TagName=LMDZOR
+#D- Choice of experiment in EXPERIEMENTS directory
+ExpType=LMDZOR/clim
+#============================
+#-- leap, noleap, 360d
+CalendarType=360d
+#-- Begin and end of job 
+#-- "YYYY-MM-DD"
+DateBegin=1980-01-01
+DateEnd=1980-01-30
+#============================
+#-- 1Y, 1M, 5D, 1D Period Length of one trunk of simulation
+PeriodLength=1M
+#============================
+#-- Total Number of Processors
+JobNumProcTot=32
+
+#========================================================================
+#D-- ListOfComponents -
+[ListOfComponents]
+#D- For each component, Name of component, Tag of component
+ATM= (lmdz, LMDZ4_AR5)
+SRF= (orchidee, ORCHIDEE_1_9_5)
+SBG= (stomate, ORCHIDEE_1_9_5)
+IOS= (xios, XIOS)
+
+#========================================================================
+#D-- Executable -
+[Executable]
+#D- For each component, Real name of executable, Name of executable for oasis
+ATM= (gcm.e, lmdz.x, 31MPI, 1OMP)
+SRF= ("", "")
+SBG= ("", "")
+IOS= (xios_server.exe, xios.x, 1MPI)
+
+#========================================================================
+#D-- Restarts -
+[Restarts]
+#D- by default: config.card describes no restart for all components 
+#D-             ie start from Levitus or limit files
+#D- If you want to restart all components from the same simulation,
+#D-      put OveRule flag to 'y' and set the next 3 parameters
+OverRule=n
+#D- Last day of the experience used as restart for all components
+RestartDate=2000-01-31
+#D- Define restart simulation name for all components
+RestartJobName=EXP00
+#D- Path Server Group Login
+RestartPath=${ARCHIVE}/IGCM_OUT/LMDZOR/DEVT/amip
+
+#========================================================================
+#D-- ATM -
+[ATM]
+#
+WriteFrequency="1M 1D HF"
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart=n
+# Last day of the experience used as restart for this component if Restart=y
+RestartDate=2000-01-31
+# Define restart simulation name for this component
+RestartJobName=LMDZOR01
+RestartPath=${ARCHIVE}/IGCM_OUT/LMDZOR/DEVT/amip
+# Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- SRF -
+[SRF]
+WriteFrequency="1M HF"
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart=n
+##-- Last day of the experience used as restart for this component if Restart=y
+RestartDate=2000-01-31
+# Define restart simulation name for this component
+RestartJobName=EXP00
+RestartPath=${ARCHIVE}/IGCM_OUT/LMDZOR/DEVT/amip
+#-- Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- SBG - STOMATE
+[SBG]
+WriteFrequency="1M"
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart=n
+#-- Last day of the experience used as restart for this component if Restart=y
+RestartDate=2000-01-31
+# Define restart simulation name for this component
+RestartJobName=EXP00
+RestartPath=${ARCHIVE}/IGCM_OUT/LMDZOR/DEVT/amip
+#-- Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- IOS -
+[IOS]
+WriteFrequency=""
+# If config_Restarts_OverRule == 'n' next 4 params are read
+Restart= n
+##-- Last day of the experience used as restart for this component if Restart=y
+RestartDate=
+# Define restart simulation name for this component
+RestartJobName=
+RestartPath=
+# Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- Post -
+[Post]
+#D- Do we rebuild parallel output, this flag determines
+#D- frequency of rebuild submission (use NONE for DRYRUN=3)
+RebuildFrequency=1Y
+#D- Do we rebuild parallel output from archive (use NONE to use SCRATCHDIR as buffer)
+RebuildFromArchive=NONE
+#D- If you want to produce time series, this flag determines
+#D- frequency of post-processing submission (NONE if you don't want)
+TimeSeriesFrequency=10Y
+#D- If you want to produce seasonal average, this flag determines
+#D- the period of this average (NONE if you don't want)
+SeasonalFrequency=10Y
+#D- Offset for seasonal average first start dates ; same unit as SeasonalFrequency
+#D- Usefull if you do not want to consider the first X simulation's years
+SeasonalFrequencyOffset=0
+
+#========================================================================
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/lim2.driver
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/lim2.driver	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/lim2.driver	(revision 2504)
@@ -0,0 +1,31 @@
+#!/bin/ksh
+
+#-----------------------------------
+function ICE_Initialize
+{ 
+    IGCM_debug_PushStack "ICE_Initialize"
+
+    echo INITIALIZE ICE !!!
+
+    IGCM_debug_PopStack "ICE_Initialize"
+}
+
+#-----------------------------------
+function ICE_Update
+{
+    IGCM_debug_PushStack "ICE_Update"
+
+    echo UPDATE ICE !!!
+
+    IGCM_debug_PopStack "ICE_Update"
+}
+
+#-----------------------------------
+function ICE_Finalize
+{
+    IGCM_debug_PushStack "ICE_Finalize"
+
+    echo FINALIZE ICE !!!
+
+    IGCM_debug_PopStack "ICE_Finalize"
+}
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/lim3.driver
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/lim3.driver	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/lim3.driver	(revision 2504)
@@ -0,0 +1,31 @@
+#!/bin/ksh
+
+#-----------------------------------
+function ICE_Initialize
+{ 
+    IGCM_debug_PushStack "ICE_Initialize"
+
+    echo INITIALIZE ICE !!!
+
+    IGCM_debug_PopStack "ICE_Initialize"
+}
+
+#-----------------------------------
+function ICE_Update
+{
+    IGCM_debug_PushStack "ICE_Update"
+
+    echo UPDATE ICE !!!
+
+    IGCM_debug_PopStack "ICE_Update"
+}
+
+#-----------------------------------
+function ICE_Finalize
+{
+    IGCM_debug_PushStack "ICE_Finalize"
+
+    echo FINALIZE ICE !!!
+
+    IGCM_debug_PopStack "ICE_Finalize"
+}
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/lmdz.driver
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/lmdz.driver	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/lmdz.driver	(revision 2504)
@@ -0,0 +1,740 @@
+#!/bin/ksh
+#-----------------------------------------------------------------
+function ATM_Initialize
+{
+    IGCM_debug_PushStack "ATM_Initialize"
+
+    RESOL_ATM=$( echo $RESOL | awk "-Fx" '{print $2}' | awk "-F-" '{print $1}')
+
+    [ -f ${SUBMIT_DIR}/../.resol ] && eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x39
+
+    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}"
+
+    ##-- Calendar type for LMDZ and create_etat0_limit
+    case ${config_UserChoices_CalendarType} in
+        leap|gregorian)
+            CalendarTypeForLmdz=earth_366d
+	    CalendarTypeForCreate=gregorian;;
+        noleap)
+            CalendarTypeForLmdz=earth_365d
+            CalendarTypeForCreate=${CalendarTypeForLmdz};;
+        360d)
+            CalendarTypeForLmdz=earth_360d
+            CalendarTypeForCreate=${CalendarTypeForLmdz};;
+        *)
+            CalendarTypeForLmdz=earth_360d
+            CalendarTypeForCreate=${CalendarTypeForLmdz}
+    esac
+
+    ##- LMDZ physics version
+    ##  Read LMDZ_Physics option in lmdz.card, if not present take default value AP (old physics) 
+    if [ ! X${lmdz_UserChoices_LMDZ_Physics} = X ] ; then
+	LMDZ_Physics=${lmdz_UserChoices_LMDZ_Physics}
+    else
+	LMDZ_Physics=AP
+    fi
+    echo LMDZ physics version : ${LMDZ_Physics}
+
+    ##- Create_etat0_limit version
+    ##  Define variable CREATE only if it is set in lmdz.card section UserChoices.
+    ##  This variable is only used in lmdz.card to choose input files.
+    if [ ! X${lmdz_UserChoices_CREATE} = X ] ; then
+	IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices CREATE
+	CREATE=${lmdz_UserChoices_CREATE}
+	echo create_etat0_limit version : ${CREATE}
+    fi
+
+
+    ## - LMDZ choice of config.def file
+    ##   ConfType must be set in lmdz.card
+    ConfType=${lmdz_UserChoices_ConfType}
+
+    ##- LMDZ output level, to be set in lmdz.card
+    if [ X${lmdz_UserChoices_OutLevel} = X ] ; then
+	# OutLevel is not set. Take default value low.
+	OutLevel=low
+    else
+	OutLevel=${lmdz_UserChoices_OutLevel}
+    fi
+
+    ##-- Output frequency purpose ....
+    ##--  Initialisation  ....
+    ok_mensuel=n
+    ok_journe=n
+    ok_hf=n
+    ok_hf3h=n
+    ok_hf3hm=n
+    ok_stn=n
+
+    case ${config_UserChoices_PeriodLength} in
+	1Y|1y|1M|1m) ok_mensuel=y ;;
+	5D|5d|1D|1d) ok_journe=y ;;
+    esac
+
+    for frequency in ${config_ATM_WriteFrequency} ; do
+	case ${frequency} in
+	    1M|1m) ok_mensuel=y ;;
+	esac
+	case ${frequency} in
+	    5D|5d|1D|1d) ok_journe=y ;;
+	esac
+	case ${frequency} in
+	    HF|hf) ok_hf=y ;;
+	esac
+	case ${frequency} in 
+	    HF3h|hf3h) ok_hf3h=y ;;
+	esac
+	case ${frequency} in 
+	    HF3hm|hf3hm) ok_hf3hm=y ;;
+	esac
+	case ${frequency} in
+	    STN|stn) ok_stn=y ;;
+	esac
+    done
+
+    ## Read LMDZ_NbPeriod_adjust option in lmdz.card 
+    if [ X"${lmdz_UserChoices_LMDZ_NbPeriod_adjust}" = X"" ] ; then
+	# The variable is not in lmdz.card, set default value
+	LMDZ_NbPeriod_adjust=0
+    else	
+	LMDZ_NbPeriod_adjust=${lmdz_UserChoices_LMDZ_NbPeriod_adjust}
+    fi
+
+    if [ ${LMDZ_NbPeriod_adjust} -eq 0 ] ; then
+	LMDZ_Bands_file_name=${lmdz_UserChoices_LMDZ_Bands_file_name}
+    fi
+
+
+    ##  Read LMDZ_COSP_OK in lmdz.card
+    if [ ! X${lmdz_UserChoices_LMDZ_COSP_OK} = X ] ; then
+	LMDZ_COSP_OK=${lmdz_UserChoices_LMDZ_COSP_OK}
+    else
+	LMDZ_COSP_OK=n
+    fi
+    ##  Read LMDZ_COSP_monthly in lmdz.card
+    if [ ! X${lmdz_UserChoices_LMDZ_COSP_monthly} = X ] ; then
+	LMDZ_COSP_monthly=${lmdz_UserChoices_LMDZ_COSP_monthly}
+    else
+	LMDZ_COSP_monthly=n
+    fi
+    ##  Read LMDZ_COSP_daily in lmdz.card
+    if [ ! X${lmdz_UserChoices_LMDZ_COSP_daily} = X ] ; then
+	LMDZ_COSP_daily=${lmdz_UserChoices_LMDZ_COSP_daily}
+    else
+	LMDZ_COSP_daily=n
+    fi
+    ##  Read LMDZ_COSP_hf in lmdz.card
+    if [ ! X${lmdz_UserChoices_LMDZ_COSP_hf} = X ] ; then
+	LMDZ_COSP_hf=${lmdz_UserChoices_LMDZ_COSP_hf}
+    else
+	LMDZ_COSP_hf=n
+    fi
+
+    ##  Read LMDZ_NMC_monthly in lmdz.card
+    if [ ! X${lmdz_UserChoices_LMDZ_NMC_monthly} = X ] ; then
+	LMDZ_NMC_monthly=${lmdz_UserChoices_LMDZ_NMC_monthly}
+    else
+	LMDZ_NMC_monthly=n
+    fi
+
+    ## Read LMDZ_NMC_daily in lmdz.card
+    if [ ! X${lmdz_UserChoices_LMDZ_NMC_daily} = X ] ; then
+	LMDZ_NMC_daily=${lmdz_UserChoices_LMDZ_NMC_daily}
+    else
+	LMDZ_NMC_daily=n
+    fi
+    
+    ## Read LMDZ_NMC_hf in lmdz.card
+    if [ ! X${lmdz_UserChoices_LMDZ_NMC_hf} = X ] ; then
+	LMDZ_NMC_hf=${lmdz_UserChoices_LMDZ_NMC_hf}
+    else
+	LMDZ_NMC_hf=n
+    fi
+
+
+    IGCM_debug_PopStack "ATM_Initialize"
+}
+
+#-----------------------------------------------------------------
+function ATM_Update
+{
+    IGCM_debug_PushStack "ATM_Update"
+
+
+    case ${config_UserChoices_PeriodLength} in
+        *Y|*y) 
+               LMDZ_ecrit_ISCCP=30.
+               LMDZ_periodav=30.
+               if [ "${config_UserChoices_CalendarType}" != "360d" ] ; then
+                  echo Do not consider following warning if your running create_etat0_limit :
+                  echo WARNING !!! For lmdz : calendartype in config.card. PeriodLength=1Y allowed only for CalendarType=360d 
+	       fi
+               ;;
+        *)
+               LMDZ_ecrit_ISCCP=${PeriodLengthInDays}.
+               LMDZ_periodav=${PeriodLengthInDays}.
+               ;;
+    esac
+  
+    ##-- Remise ou non a zero de la date initiale de LMDZ pour le fichier run.def
+    if [ ${CumulPeriod} -eq 1 ] ; then
+	RAZ_DATE=1
+    else
+	RAZ_DATE=0
+    fi
+
+    ## Algorithme for special treatment for Bands_xxx file
+    ## For CumulPeriod=1 ; 
+    ##        IF NbPeriod_Adjust = 0 ; set LMDZ_adjust=n
+    ##                                IF LMDZ_Bands_file_name was given in lmdz.card THEN Get Bands file directly from server. Store it later with _0 suffix.
+    ##                                IF no LMDZ_Bands_file_name was given, start without Bands file. Store it later with _0 suffix.
+    ##        ELSE set LMDZ_adjust=y ; start without Bands file ; Store it later in PARAM/ directory in submit directory with suffix _1 ;
+    ##
+    ## For CumulPeriod=2 to LMDZ_NbPeriod_adjust ; 
+    ##       Get Bands file from PARAM/ in submit directory (CumulPeriod-1) ; set LMDZ_adjust=y ; Store Bands file in PARAM/ ;
+    ##
+    ## For CumulPeriod > LMDZ_NbPeriod_adjust ; LMDZ_adjust=n ; Get Bands file from PARAM/ ; Do not store ;
+
+    if [ ${CumulPeriod} -eq 1 ] ; then
+        if [ ${LMDZ_NbPeriod_adjust} -eq 0 ] ; then
+	    if [ ! X${LMDZ_Bands_file_name} = X ] ; then
+		IGCM_sys_Get ${LMDZ_Bands_file_name} Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat 
+		IGCM_sys_Chmod u+w Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat
+		IGCM_debug_Print 1 "Bands file forced to ${LMDZ_Bands_file_name} and stored in ${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_0"
+	    fi
+        fi
+    fi
+
+    LMDZ_adjust=n
+    [ ${CumulPeriod} -le ${LMDZ_NbPeriod_adjust} ] && LMDZ_adjust=y
+
+    RefPeriod=${LMDZ_NbPeriod_adjust} #0 to use a Bands file from Restart
+    [ ${CumulPeriod} -le ${LMDZ_NbPeriod_adjust} ] && (( RefPeriod = ${CumulPeriod} - 1 )) 
+
+    # Get Bands file from PARAM directory if file exist
+    if ( [ ${CumulPeriod} -gt 1 ] && [ -f ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${RefPeriod} ] ) ; then
+        IGCM_sys_Cp ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${RefPeriod} Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat
+        IGCM_sys_Chmod u+w Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat
+    fi
+
+    ##-- GHG forcing :
+    ##   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
+	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
+	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
+       	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
+	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
+	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
+	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
+	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
+	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
+	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
+	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
+	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
+	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}
+    IGCM_comp_modifyDefFile nonblocker config.def t_coupl   ${LMDZ_t_coupl} 
+
+    ##-- Add special treatement for CARBON CYCLE
+    if [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"control" ] || [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"historical" ] ; then
+	ATM_Carbon_Update
+    fi
+
+
+    ##-- Set LMDZ_COSP_daily1979=y in section UserChoices in lmdz.card to activate 
+    ##   COSP daily output for years 1979 and later (mandatory for historical CMIP5 run).
+    if ([ X"${lmdz_UserChoices_LMDZ_COSP_daily1979}" = X"y" ] &&  [ ${year} -ge 1979 ]) ; then
+	LMDZ_COSP_daily=y
+    fi
+
+
+    ## output.def parameters
+    #  columns in phys_output_filekeys refer to the filenames given in phys_out_filenames in output.def :  
+    #                                            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
+	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
+	    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
+	    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	
+	    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
+		IGCM_comp_modifyXmlFile force file_def_histday_lmdz.xml histday output_level 2
+	    fi
+	fi
+	if [ X${ok_hf} = Xy ] ; then
+	    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
+		IGCM_comp_modifyXmlFile force file_def_histhf_lmdz.xml histhf output_level 2
+	    fi
+	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
+	    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
+	    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
+	    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
+	    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 of variable iphysiq depending on the physics
+    if [ X${LMDZ_Physics} = X"AP" ] ; then
+        value=10
+    else
+	value=DEFAULT
+    fi
+    IGCM_comp_modifyDefFile nonblocker gcm.def iphysiq $value
+
+
+    ## run.def parameters
+    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
+    # Variable calend is different for a run with create_etat0_limit and the gcm
+    # Test if executable create_etat0_limit is present and lmdz.x is not present
+    if [ -f create_etat0_limit* ] || [ -f ce0l* ] && [ ! -f lmdz.x ] ; then
+	# for case ce0l : always take current year
+	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
+	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
+	IGCM_comp_modifyDefFile nonblocker run.def grilles_gcm_netcdf y
+    else
+	IGCM_comp_modifyDefFile nonblocker run.def grilles_gcm_netcdf n
+    fi
+
+    ## Determine from the variable ListOfComponents in config.card coupling to external models 
+    ## and set corresponding parameters in run.def
+    echo ListOfComponents now running : ${config_ListOfComponents[*]}
+
+    if [ X${config_ListOfComponents_SRF} = Xorchidee ] ; then
+	echo "Activate ORCHIDEE, set VEGET=y in run.def"
+	IGCM_comp_modifyDefFile blocker run.def VEGET y
+    else
+	echo "No ORCHIDEE, set VEGET=n in run.def"
+	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"
+	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"
+	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"
+	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"
+	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"
+	IGCM_comp_modifyDefFile blocker run.def type_trac lmdz
+        IGCM_comp_modifyDefFile blocker run.def config_inca none
+    fi
+
+
+    # config.def : Activate direct radiative effect if ok_ade=y
+    if [ ! X${lmdz_UserChoices_ok_ade} = X ]; then 
+	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 
+	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 
+	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 
+	IGCM_comp_modifyDefFile nonblocker config.def read_climoz ${lmdz_UserChoices_read_climoz}
+    else
+	IGCM_comp_modifyDefFile nonblocker config.def read_climoz 0	
+    fi 
+
+    # config.def : Choose aerosol use in radiative effect 
+    #  type of coupled aerosol =1 (default) =2 => bc  only =3 => pom only =4 => seasalt only 
+    # =5 => dust only =6 => all aerosol    
+    if [ ! X${lmdz_UserChoices_flag_aerosol} = X ]; then 
+	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 
+	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
+	IGCM_comp_modifyDefFile nonblocker guide.def ok_guide  ${lmdz_UserChoices_ok_guide}
+    else
+	IGCM_comp_modifyDefFile nonblocker guide.def ok_guide n
+    fi
+
+    ## Read ByPass_hgardfou_teta option in lmdz.card --> divide teta* by 2 if [ $ByPass_hgardfou_teta = 1 ]
+    ByPass_hgardfou_teta=${lmdz_UserChoices_ByPass_hgardfou_teta}
+    if [ X"${ByPass_hgardfou_teta}" = X"y" ] ; then
+	awk '{ if ($0 ~ /^teta.*=/) {split($0,a,"=") ; print a[1]"="a[2]/2"."} else print $0}' gcm.def > gcm.def.tmp
+	IGCM_sys_Mv gcm.def.tmp gcm.def
+	echo
+	IGCM_debug_Print 1 "ByPass_hgardfou_teta : ^teta*/2 in gcm.def"
+	echo
+	cat gcm.def
+	ByPass_hgardfou_teta=n
+	IGCM_card_WriteOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices ByPass_hgardfou_teta "${ByPass_hgardfou_teta}"
+    fi
+
+    ## Read ByPass_hgardfou_mats option in lmdz.card --> purmats=y 2 if [ $ByPass_hgardfou_mats = 1 ]
+    ByPass_hgardfou_mats=${lmdz_UserChoices_ByPass_hgardfou_mats}
+    if [ X"${ByPass_hgardfou_mats}" = X"y" ] ; then
+	sed -e "s/^purmats=.*/purmats=y/" gcm.def > gcm.def.tmp
+        IGCM_sys_Mv gcm.def.tmp gcm.def
+        echo
+        IGCM_debug_Print 1 "ByPass_hgardfou_mats : purmats=y in gcm.def"
+        echo
+        cat gcm.def
+        ByPass_hgardfou_mats=n
+        IGCM_card_WriteOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices ByPass_hgardfou_mats "${ByPass_hgardfou_mats}"
+    fi
+
+    if [ X${lmdz_UserChoices_XIOS}  = Xy ] ; then
+    # Add include of LMDZ context in iodef.xml
+    # In iodef.xml add on next line after "COMPONENT CONTEXT"
+    #  <context id="LMDZ" src="./context_lmdz.xml"/>
+	echo '<context id="LMDZ" src="./context_lmdz.xml"/>' > add.tmp
+	cp iodef.xml iodef.xml.tmp
+	sed -e "/COMPONENT CONTEXT/r add.tmp" \
+	    iodef.xml.tmp > iodef.xml
+	rm iodef.xml.tmp add.tmp
+    fi
+    
+    IGCM_debug_PopStack "ATM_Update"
+}
+
+#-----------------------------------
+function ATM_Finalize
+{
+    IGCM_debug_PushStack "ATM_Finalize"
+
+    # If the file exist, copy Bands_ file to PARAM/ in submit directory. This file will be used for the simulation.
+    # Copy also the same file into ATM/Restart at ARCHIVE directory for backup.
+    if [ -f Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ] ; then 
+      if [ ${CumulPeriod} -le ${LMDZ_NbPeriod_adjust} ] ; then
+        IGCM_sys_Cp Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${CumulPeriod}
+        IGCM_sys_Put_Out Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${R_OUT_ATM_R}/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${CumulPeriod}
+      elif [ ${CumulPeriod} -eq 1 ] && [ ${LMDZ_NbPeriod_adjust} -eq 0 ] ; then
+        # Special case : first period and no adjust => Save bands file with suffix _0
+        IGCM_sys_Cp Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${SUBMIT_DIR}/PARAM/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_0
+        IGCM_sys_Put_Out Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${R_OUT_ATM_R}/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_0
+      fi
+    fi
+
+    # Add special treatement for CARBON CYCLE
+    if [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"control" ] || [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"historical" ] ; then
+	ATM_Carbon_Finalize
+    fi
+
+    echo FINALIZE ATM !
+
+    IGCM_debug_PopStack "ATM_Finalize"
+}
+
+
+
+function ATM_Carbon_Update
+{
+    # This fuction will be called only if CARBON_CYCLE is set to control or historical in lmdz.card
+
+    IGCM_debug_PushStack "ATM_Carbon_Update"
+
+    typeset InitPeriodCo2 InitDateBeginCo2 InitDateEndCo2
+    typeset CO2SBG CO2MBG CO2LU CO2_ppm CO2_ppm_prec fCO2_ff
+    typeset PathCO2log 
+    typeset PreviousLinelog LastPeriodDateBegin LastPeriodDateEnd LastDatesPeriod LastPREFIX
+    
+    if ( ${FirstInitialize} && [ X"${config_ATM_Restart}" = X"n" ] ) ; then
+        ##--Initialization of fluxes to an undefined value at the first run
+	UndefinedValueCo2=-9999
+	InitPeriodCo2=0
+	InitDateBeginCo2=${UndefinedValueCo2}
+	InitYearCo2=$(( ${year} - 1 )) 
+	InitDateEndCo2=${InitYearCo2}1231
+	fCO2_ff=${UndefinedValueCo2} 
+	CO2SBG=${UndefinedValueCo2}
+	CO2LU=${UndefinedValueCo2}
+	CO2MBG=${UndefinedValueCo2}
+	CO2_ppm_prec=${UndefinedValueCo2}
+        # Get the initial value of atmosp. pco2 
+	CO2_ppm=${lmdz_UserChoices_co2_init}
+	
+	IGCM_sys_Cp ${SUBMIT_DIR}/co2.log.init ${SUBMIT_DIR}/co2.log
+	IGCM_sys_Chmod u+w ${SUBMIT_DIR}/co2.log
+	
+        # Save CO2 values in ExeCpuLog variable contents 5 fields
+	echo "${InitPeriodCo2} ${InitDateBeginCo2} ${InitDateEndCo2} ${CO2_ppm} ${CO2_ppm_prec} ${fCO2_ff} ${CO2MBG} ${CO2SBG} ${CO2LU}" |   \
+	    gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \
+                              $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log
+	
+        # Get the path where the log file co2.log is
+	PathCO2log=${SUBMIT_DIR} 
+        # Get Previous line in co2.log
+	PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log )
+	
+    else
+	
+	# NEW parameter in config.card (even for Overule all restarts, you must modify the line after this comment ):
+        # !! NEW for Carbone cycle !! Path where to find old co2.log file for restart CO2.
+	#SubmitRestartPath=
+	if ( ${FirstInitialize} && [ X"${config_ATM_Restart}" = X"y" ] ) ; then
+	    IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card ATM SubmitRestartPath
+	    PathCO2log=${config_ATM_SubmitRestartPath}
+	    Date_r=$( IGCM_date_ConvertFormatToGregorian ${config_ATM_RestartDate} )
+	    PreviousLinelog=$( grep ${Date_r} ${PathCO2log}/co2.log )
+	    
+	    IGCM_sys_Cp ${SUBMIT_DIR}/co2.log.init ${SUBMIT_DIR}/co2.log
+	    IGCM_sys_Chmod u+w ${SUBMIT_DIR}/co2.log
+	    
+            # Save Last Line of control in new co2.log file
+	    InitPeriodCo2=0   
+	    InitDateBeginCo2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $2}' )
+	    InitDateEndCo2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $3}' )
+	    fCO2_ff=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $6}' )
+	    CO2SBG=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $8}' )
+	    CO2LU=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $9}' )
+	    CO2MBG=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $7}' )
+	    CO2_ppm_prec=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $5}' )
+	    CO2_ppm=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' )
+	    
+	    echo "${InitPeriodCo2} ${InitDateBeginCo2} ${InitDateEndCo2} ${CO2_ppm} ${CO2_ppm_prec} ${fCO2_ff} ${CO2MBG} ${CO2SBG} ${CO2LU}" |   \
+		gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \
+                              $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log
+	else
+           # Get restart line in co2.log
+	    PathCO2log=${SUBMIT_DIR}
+	    PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log )
+           # Get the value of atmosp. pco2 in co2.log
+	    CO2_ppm=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' )
+	fi
+	
+    fi
+    
+    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 IGCM_comp_modifyDefFile
+	IGCM_comp_modifyDefFile nonblocker config.def co2_ppm     ${CO2_ppm}
+    fi
+    IGCM_debug_PopStack "ATM_Carbon_Update"
+}
+
+
+function ATM_Carbon_Finalize
+{
+    # This fuction will be called only if CARBON_CYCLE is set to control or historical in lmdz.card
+
+    IGCM_debug_PushStack "ATM_Carbon_Finalize"
+
+    typeset CO2SBG_3V CO2SBG CO2MBG CO2SRF CO2LU CO2_ppm CO2_ppm_prec fCO2_ff
+    
+	# Fossil fuel emission
+    if [ ${lmdz_UserChoices_CARBON_CYCLE} = control ] ; then
+            # For Control, no fossil fuel emission :
+	fCO2_ff=0
+	echo "Fossil Fuel for control run  :" ${fCO2_ff}
+    else
+            # For historical, get the fossile fuel file :
+	fCO2_ff=$( gawk "{if (match(\$0,\"${year}\ *${month}\")) {print \$3}}" ${SUBMIT_DIR}/PARAM/CMIP5_gridcar_CO2_emissions_fossil_fuel_Andres_1751-2007_monthly_SC.txt )
+	echo "Fossil Fuel for historical run  :" ${fCO2_ff}
+    fi
+    
+        # Get the value of ocean carbon flux
+    CO2MBG=$( ${SUBMIT_DIR}/COMP/lmdz_analyse_pisces_out.awk ocean.output )
+    CO2MBG=$( echo ${CO2MBG} | sed -e "s/ *//" )
+    echo "Ocean carbon flux  :" ${CO2MBG}
+    
+        # Get the value of land fluxes
+    set +A CO2SBG_3V -- $( ${SUBMIT_DIR}/COMP/lmdz_analyse_stomate_out.awk out_orchidee_0000 )
+    CO2SRF=$( echo ${CO2SBG_3V[0]} | sed -e "s/ *//" )
+    CO2LU=$( echo ${CO2SBG_3V[1]} | sed -e "s/ *//" )
+    CO2SBG=$( echo ${CO2SBG_3V[2]} | sed -e "s/ *//" )
+    echo "Land carbon flux (NEP)         :" ${CO2SRF}
+    echo "LU flux          (FLUC)        :" ${CO2LU}
+    echo "Total Land carbon flux (NBP)   :" ${CO2SBG}
+    
+        # Previous CO2
+    CO2_ppm_prec=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' )
+    echo "Previous CO2  :" ${CO2_ppm_prec}
+    
+        # Formula
+    CO2_ppm=$( echo "${CO2_ppm_prec} + (${fCO2_ff} + ${CO2MBG} + ${CO2SBG}) / 2.12" | bc -l )
+    echo "New CO2  :" ${CO2_ppm}
+    
+        # Save CO2 values in ExeCpuLog variable contents 5 fields
+    echo "${CumulPeriod} ${PeriodDateBegin} ${PeriodDateEnd} ${CO2_ppm} ${CO2_ppm_prec} ${fCO2_ff} ${CO2MBG} ${CO2SBG} ${CO2LU}" |   \
+	gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \
+                           $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log
+    
+    IGCM_debug_PopStack "ATM_Carbon_Finalize"
+}
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/oasis.driver
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/oasis.driver	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/oasis.driver	(revision 2504)
@@ -0,0 +1,123 @@
+#!/bin/ksh
+#-----------------------------------
+CPL_Initialize ()
+{
+    IGCM_debug_PushStack "CPL_Initialize"
+ 
+    echo INITIALIZE CPL !!!
+
+# Local function to find parameters in LMDZ .def files
+    lmdzgrep () {
+        grep $1 $2 |grep -v "#" | awk "-F=" '{print $2}' | awk "-F " '{print $1}'
+    }
+
+    #RESOL_CPL=$( echo $RESOL | awk "-F-" '{print $1}' )
+    RESOL_CPL=${RESOL_OCE}x${RESOL_ATM}
+    IGCM_debug_Print 1 "RESOL_CPL      : ${RESOL_CPL}"
+
+    CPL_OkDay="n"
+    CPL_OkMonth="n"
+
+    for CPL_Frequency in ${config_CPL_WriteFrequency} ; do
+	case ${CPL_Frequency} in
+	    *D|*d) CPL_OkDay="y"   ;;
+	    *M)    CPL_OkMonth="y" ;;
+	esac
+    done
+
+    IGCM_debug_PopStack "CPL_Initialize"
+
+}
+
+#-----------------------------------
+CPL_Update ()
+{
+    IGCM_debug_PushStack "CPL_Update"
+
+    ############ Update Time and Counters ##############
+    ##-- Calcul de la duree du job (en secondes)
+    (( D_JOB_SEC = 3600 * 24 * PeriodLengthInDays ))
+
+    ############ Update Other Parameters  ##############
+    ## Read Output_mode option in oasis.card --> Put "y" to have coupling variables in ouptut files
+    CPL_OutputMode="n"
+    IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/oasis.card UserChoices OutputMode 
+    eval CPL_OutputMode=\${oasis_UserChoices_OutputMode} > /dev/null 2>&1
+    echo CPL_OutputMode = ${CPL_OutputMode}
+    CPL_OutputVar='EXPORTED'
+    if [ ${CPL_OutputMode} = y ] ; then
+	CPL_OutputVar='EXPOUT'
+    fi
+
+    FreqCoupling=${oasis_UserChoices_FreqCoupling:-86400}
+
+    ## Calculate lag for transfer of fields from atmosphere -> ocean.
+    ## LagAtm="1day in sec"/day_step * iphysiq/nsplit_phys
+    ## First get day_step, iphyisq and nsplit_phys from LMDZ parameter files
+    day_step=$(    lmdzgrep day_step gcm.def )
+    iphysiq=$(     lmdzgrep iphysiq gcm.def )
+    nsplit_phys=$( lmdzgrep nsplit_phys physiq.def )
+
+    IGCM_debug_Print 3 "Parametre de calcul Lag LMDZ recuperes " ${day_step} ${iphysiq} ${nsplit_phys}
+
+    [[ ${nsplit_phys} -eq 0 || "X${nsplit_phys}" = "X" ]] && nsplit_phys=1
+
+    IGCM_debug_Print 3 "Parametre de calcul Lag LMDZ mis a jour " ${day_step} ${iphysiq} ${nsplit_phys}
+                                                              
+    (( LagAtm = 86400 / day_step * iphysiq / nsplit_phys ))
+
+    (( LagOce = 86400 / ORCA_NPDT_JOUR ))
+
+    ## Use of Lucia ##
+    lucia_ok=""
+    if [ ${oasis_UserChoices_Lucia} = y ] ; then
+	lucia_ok="-1"
+    fi
+    
+    ############ Update Parameter Files   ##############
+    sed -e "s/<total_time>/${D_JOB_SEC}/" \
+	-e "s/<lucia_ok>/${lucia_ok}/" \
+	-e "s/<output_mode>/${CPL_OutputVar}/g" \
+	-e "s/<freq_coupling>/${FreqCoupling}/g" \
+	-e "s/<lag_atm>/${LagAtm}/g" \
+	-e "s/<lag_oce>/${LagOce}/g" \
+	namcouple > namcouple.tmp
+    IGCM_sys_Mv namcouple.tmp namcouple
+    # For IPSLCM6 and use of OASIS-MCT
+    if [ ${CumulPeriod} -eq 1 ]; then
+	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"
+}
+
+#-----------------------------------
+CPL_Finalize ()
+{
+    IGCM_debug_PushStack "CPL_Finalize"
+
+    if [ "${CPL_OutputMode}" = "y" ] ; then
+
+        [[ ${CPL_OkDay}   = "y" ]] && date >TEMPO_1D_cpl_atm.nc
+        [[ ${CPL_OkMonth} = "y" ]] && date >TEMPO_1M_cpl_atm.nc
+        [[ ${CPL_OkDay}   = "y" ]] && date >TEMPO_1D_cpl_oce.nc
+        [[ ${CPL_OkMonth} = "y" ]] && date >TEMPO_1M_cpl_oce.nc
+
+    fi
+
+    ## Use of Lucia ##
+    if [ ${oasis_UserChoices_Lucia} = y ] ; then
+	echo "Use of LUCIA"
+    #   To be changed 
+    #   On Curie
+    #   /ccc/scratch/cont003/dsm/p86caub/LUCIA/lucia
+    #   On Ada
+    #   /linkhome/rech/psl/rpsl035/LUCIA/lucia
+    fi
+
+    echo FINALIZE CPL !!!
+
+    IGCM_debug_PopStack "CPL_Finalize"
+}
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/opa9.driver
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/opa9.driver	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/opa9.driver	(revision 2504)
@@ -0,0 +1,336 @@
+#!/bin/ksh
+#-----------------------------------------------------------------
+function OCE_Initialize
+{
+    IGCM_debug_PushStack "OCE_Initialize"
+
+    JOB_NAME=${config_UserChoices_JobName}
+
+    RESOL_OCE_ICE=$( echo ${RESOL} | awk "-Fx" '{print $1}' )
+    case ${RESOL_OCE_ICE} in
+	( *LIM2* )
+	SEAICE_MODEL=LIM2 
+	LIM_VERSION=2
+	;;
+
+	( *LIM3* )
+	SEAICE_MODEL=LIM3
+	LIM_VERSION=3
+	;;
+	( *CICE*) SEAICE_MODEL=CICE ;;
+	( *     ) SEAICE_MODEL=UNKNOWN ;;
+    esac
+    RESOL_OCE=$( echo ${RESOL_OCE_ICE} | sed "s/${SEAICE_MODEL}//" )
+
+    IGCM_debug_Print 1 "RESOL          : ${RESOL}"
+    IGCM_debug_Print 1 "RESOL_OCE_ICE  : ${RESOL_OCE_ICE}"
+    IGCM_debug_Print 1 "SEAICE_MODEL   : ${SEAICE_MODEL}"
+    IGCM_debug_Print 1 "LIM_VERSION    : ${LIM_VERSION}"
+    IGCM_debug_Print 1 "RESOL_OCE      : ${RESOL_OCE}"
+
+    # Local function to find namelists parameters
+    supergrep () {
+ 	grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%"
+    }
+
+    ##--Variables used by OPA --
+
+    # cn_exp    experience name
+    # nn_it000  number of the first time step
+    # nn_itend  number of the last time step
+    # nn_date0  initial calendar date yymmdd (used if  nn_rstctl=1)
+    # nn_leapy  Leap year calendar (1) or not (0), or 360 days calendar (30)
+    # nn_stock  frequency of creation of a restart file (modulo referenced to 1)
+    # nn_write  frequency of write in the output file   (modulo referenced to nn_it000)
+    # ln_rstart start from rest (F) or from a restart file (T)
+    # nn_rstctl restart control = 0 nn_it000 is not compared to the restart file value
+    #                           = 1 use nn_date0 in namelist_cfg (not the value in the restart file)
+    #                           = 2 calendar parameters read in the restart file
+    # nn_msh    =1 create a mesh file (coordinates, scale factors, masks)
+    # rn_rdt    time step in seconds for the dynamics (and tracer if nacc=0)   ==> 5760 (coming from namelist)
+    # nn_prg    time-step frequency of gap print in model output
+    # nn_fwri   frequency of zonal means and transport output
+
+    NAMELIST_OPA_CFG=${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE}_cfg
+    NAMELIST_OPA_REF=${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE}_ref
+    IGCM_debug_Print 1 "namelist_ref : ${NAMELIST_OPA_REF}"
+    if [ ! -r ${NAMELIST_OPA_REF} ] ; then
+	echo "${NAMELIST_OPA_REF} non trouve"
+    fi
+    IGCM_debug_Print 1 "namelist_cfg : ${NAMELIST_OPA_CFG}"
+    if [ ! -r ${NAMELIST_OPA_CFG} ] ; then
+	echo "${NAMELIST_OPA_CFG} non trouve"
+    fi
+
+    PAT_CEXPER=$(   supergrep cn_exp      ${NAMELIST_OPA_CFG} )
+    PAT_NIT000=$(   supergrep nn_it000    ${NAMELIST_OPA_CFG} )
+    PAT_NITEND=$(   supergrep nn_itend    ${NAMELIST_OPA_CFG} )
+    PAT_NDATE0=$(   supergrep nn_date0    ${NAMELIST_OPA_CFG} )
+    PAT_NLEAPY=$(   supergrep nn_leapy    ${NAMELIST_OPA_CFG} )
+    PAT_NSTOCK=$(   supergrep nn_stock    ${NAMELIST_OPA_CFG} )
+    PAT_NWRITE=$(   supergrep nn_write    ${NAMELIST_OPA_CFG} )
+    PAT_RESTAR=$(   supergrep ln_rstart   ${NAMELIST_OPA_CFG} )
+    PAT_NRSTAR=$(   supergrep nn_rstctl   ${NAMELIST_OPA_CFG} )
+    PAT_NMSH=$(     supergrep nn_msh      ${NAMELIST_OPA_CFG} )
+    PAT_NN_WRITE=$( supergrep nn_write    ${NAMELIST_OPA_CFG} )
+    PAT_NN_FWRI=$(  supergrep nn_fwri     ${NAMELIST_OPA_CFG} )
+    PAT_ICE_EMBD=$( supergrep nn_ice_embd ${NAMELIST_OPA_CFG} )
+    PAT_ICEFLX=$(   supergrep cn_iceflx   ${NAMELIST_OPA_CFG} )
+    PAT_JPNI=$(     supergrep jpni        ${NAMELIST_OPA_CFG} )
+    PAT_JPNJ=$(     supergrep jpnj        ${NAMELIST_OPA_CFG} )
+    PAT_JPNIJ=$(    supergrep jpnij       ${NAMELIST_OPA_CFG} )
+    PAT_NN_FSBC=$(  supergrep nn_fsbc     ${NAMELIST_OPA_CFG} ) 
+
+    ORCA_RDT=$(       supergrep rn_rdt        ${NAMELIST_OPA_CFG} | sed 's/ *rn_rdt *=//'  | sed 's/\. *//' )
+    ORCA_NN_FSBC=$(   supergrep nn_fsbc       ${NAMELIST_OPA_CFG} | sed 's/ *nn_fsbc *=//' | sed 's/\. *//' )
+    (( ORCA_NPDT_JOUR  = 86400 / ORCA_RDT     ))
+    #(( ORCA_NPDT_SBC   = ORCA_NPDT_JOUR / ORCA_NN_FSBC ))
+    (( ORCA_RDT_SBC =  ORCA_RDT * ORCA_NN_FSBC ))
+ 
+
+    # Period Length In Days between DateBegin and first day of calendar 0001 01 01
+    # /!\ Needed by OPA namelist to compute file names /!\
+    (( DaysSinceJC = $( IGCM_date_DaysSinceJC ${DateBegin} ) + 1 ))
+
+    IGCM_debug_Print 1 "PAT_CEXPER   $PAT_CEXPER "
+    IGCM_debug_Print 1 "PAT_NIT000   $PAT_NIT000"
+    IGCM_debug_Print 1 "PAT_NITEND   $PAT_NITEND"
+    IGCM_debug_Print 1 "PAT_NDATE0   $PAT_NDATE0"
+    IGCM_debug_Print 1 "PAT_NLEAPY   $PAT_NLEAPY"
+    IGCM_debug_Print 1 "PAT_NSTOCK   $PAT_NSTOCK"
+    IGCM_debug_Print 1 "PAT_NWRITE   $PAT_NWRITE"
+    IGCM_debug_Print 1 "PAT_RESTAR   $PAT_RESTAR"
+    IGCM_debug_Print 1 "PAT_NRSTAR   $PAT_NRSTAR"
+    IGCM_debug_Print 1 "PAT_NMSH     $PAT_NMSH"
+    IGCM_debug_Print 1 "PAT_NN_WRITE $PAT_NN_WRITE"
+    IGCM_debug_Print 1 "PAT_NN_FWRI  $PAT_NN_FWRI"
+    IGCM_debug_Print 1 "PAT_ICE_EMBD $PAT_ICE_EMBD"
+    IGCM_debug_Print 1 "PAT_ICEFLX   $PAT_ICEFLX"
+    IGCM_debug_Print 1 "PAT_JPNI     $PAT_JPNI"
+    IGCM_debug_Print 1 "PAT_JPNJ     $PAT_JPNJ"
+    IGCM_debug_Print 1 "PAT_JPNIJ    $PAT_JPNIJ"
+    IGCM_debug_Print 1 "PAT_NN_FSBC  $PAT_NN_FSBC"
+    IGCM_debug_Print 1 " "
+    IGCM_debug_Print 1 "ORCA_RDT        $ORCA_RDT"
+    IGCM_debug_Print 1 "ORCA_NN_FSBC    $ORCA_NN_FSBC"
+    IGCM_debug_Print 1 "ORCA_RDT_SBC    $ORCA_RDT_SBC"
+    IGCM_debug_Print 1 "ORCA_NPDT_JOUR  $ORCA_NPDT_JOUR"
+    IGCM_debug_Print 1 "DaysSinceJC     $DaysSinceJC"
+    
+    IGCM_debug_PopStack "OCE_Initialize"
+   
+}
+
+#-----------------------------------------------------------------
+function OCE_Update
+{
+    IGCM_debug_PushStack "OCE_Update"
+
+    ## Check that nn_fsbc is correct compare to coupling frequency
+
+    FreqCoupling=${oasis_UserChoices_FreqCoupling:-86400}
+
+    ## This informations are used for diaptr, trends and diagap files
+    ## only the first frequency is used for this files
+   
+    IGCM_debug_Print 1 "FreqCoupling    $FreqCoupling"
+    IGCM_debug_Print 1 "ORCA_NN_FSBC    $ORCA_NN_FSBC"
+    IGCM_debug_Print 1 "ORCA_RDT        $ORCA_RDT"
+    IGCM_debug_Print 1 "ORCA_RDT_SBC    $ORCA_RDT_SBC"
+
+    if [[ ${ORCA_RDT_SBC} -gt ${FreqCoupling} ]] ; then
+	IGCM_debug_Exit "ORCA_RDT_SBC=${ORCA_RDT_SBC} is greater than FreqCoupling=${FreqCoupling}"
+     	IGCM_debug_Verif_Exit
+    fi
+    
+    ##--Write Frequency Purpose ....
+    frequency=$( echo ${config_OCE_WriteFrequency} | awk "-F " '{print $1}' )
+    factor=$( echo ${frequency} | sed -e "s/[yYmMdD]//" )
+    case ${frequency} in
+	1Y|1y)
+	    (( ORCA_NWRITE = ORCA_NPDT_JOUR * factor * $( IGCM_date_DaysInYear  ${year} ) ))          ;
+	    PREFIX_NWRITE=${config_UserChoices_JobName}_${factor}y ;
+	    R_OUT_OCE_NWRITE=${R_OUT_OCE_O_Y} ;
+	    WF1=${factor}Y ;;
+	1M|1m)
+	    (( ORCA_NWRITE = ORCA_NPDT_JOUR * factor * $( IGCM_date_DaysInMonth ${year} ${month} ) )) ;
+	    PREFIX_NWRITE=${config_UserChoices_JobName}_${factor}m ;
+	    R_OUT_OCE_NWRITE=${R_OUT_OCE_O_M} ;
+	    WF1=${factor}M ;;
+	*D|*d)
+	    (( ORCA_NWRITE = ORCA_NPDT_JOUR * factor  ))  ;
+	    PREFIX_NWRITE=${config_UserChoices_JobName}_${factor}d ;
+	    R_OUT_OCE_NWRITE=${R_OUT_OCE_O_D} ;
+	    WF1=${factor}D ;;
+	*)
+	    (( ORCA_NWRITE = 0 ))                                                            ;;
+    esac
+
+    ##--Write Frequency for iomput
+    ## Differents frequencies are allowed for grid_[TUVW] and icemod files
+
+    V1D_ENABLE=".FALSE."
+    V1M_ENABLE=".FALSE."
+    V1Y_ENABLE=".FALSE."
+
+    for frequency in ${config_OCE_WriteFrequency} ; do
+        case ${frequency} in
+            1D|1d) V1D_ENABLE=".TRUE." ;;
+        esac
+        case ${frequency} in
+            1M|1m) V1M_ENABLE=".TRUE." ;;
+        esac
+        case ${frequency} in
+            *[yY]) V1Y_ENABLE=".TRUE." ;;
+        esac
+    done
+
+
+    ##-- Output level : 3 for more 1D variables
+    eval opa9_OUTPUT_LEVEL=\${opa9_UserChoices_OUTPUT_LEVEL} > /dev/null 2>&1
+    OUTPUT_LEVEL=${opa9_OUTPUT_LEVEL}
+
+
+    # Period Length In Days between DateBegin and first day of calendar 0001 01 01
+    # Needed by OPA namelist to compute correct file names 
+    (( PeriodDaysSinceJC =  $( IGCM_date_DaysSinceJC ${PeriodDateBegin} ) + 1  ))
+
+    ##-- Number of time steps updated : the first, the last and the number of time steps
+    (( ORCA_NIT000 = ( PeriodDaysSinceJC - DaysSinceJC ) * ORCA_NPDT_JOUR + 1 ))
+    (( ORCA_NPDT   = PeriodLengthInDays * ORCA_NPDT_JOUR ))
+    (( ORCA_NITEND = ORCA_NIT000 + ORCA_NPDT - 1))
+
+    ##-- We force one restart file at the end of the trunk
+    ORCA_NSTOCK="${ORCA_NITEND}"
+
+    ##-- Restart configuration
+    if ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "n" ] ) ; then
+	ORCA_LRSTAR=.FALSE.
+	ORCA_NRSTDT=0
+        # Put ORCA_NMSH=0 when OPA running in parallel mode
+	ORCA_NMSH=1
+	#echo "NO OPA RESTART"
+    elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "y" ] ) ; then
+	ORCA_LRSTAR=.TRUE.
+	ORCA_NRSTDT=0
+	ORCA_NMSH=1
+	#echo "OPA RESTART"
+    else
+	ORCA_LRSTAR=.TRUE.
+	ORCA_NRSTDT=2
+	ORCA_NMSH=0
+	#echo "OPA RESTART"
+    fi
+
+    ##-- Meshmask option
+    IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/opa9.card UserChoices mesh_mask
+
+    if [ "${opa9_UserChoices_mesh_mask}" = "y" ]; then
+        ORCA_NMSH=1
+        IGCM_card_WriteOption ${SUBMIT_DIR}/COMP/opa9.card UserChoices mesh_mask "n"
+    fi
+
+    # nleapy configuration
+    case ${config_UserChoices_CalendarType} in
+        leap|gregorian)
+            ORCA_NLEAPY=1;;
+        noleap)
+            ORCA_NLEAPY=0;;
+        360d)
+            ORCA_NLEAPY=30;;
+        *)
+            ORCA_NLEAPY=30
+    esac
+
+    typeset -r PRECIS=8
+    NEMO_END=$( echo $( awk "BEGIN { printf \"%0${PRECIS}d\",${ORCA_NITEND} }" ) ) 
+
+
+    case ${SEAICE_MODEL} in
+	( LIM2 ) 
+	NN_ICE_EMBD=0
+	ICEFLX=none
+	;;
+	( LIM3 ) 
+	NN_ICE_EMBD=2
+	ICEFLX=${opa9_UserChoices_iceflx:-linear}
+	;;
+    esac
+
+    IGCM_debug_Print 1 "NUM_PROC_OCE : " ${NUM_PROC_OCE}
+
+    sed -e "s/${PAT_CEXPER}/       cn_exp=\"${config_UserChoices_JobName}\"/"   \
+	-e "s/${PAT_NIT000}/       nn_it000=${ORCA_NIT000}/"                    \
+	-e "s/${PAT_NITEND}/       nn_itend=${ORCA_NITEND}/"                    \
+	-e "s/${PAT_NDATE0}/       nn_date0=${PeriodDateBegin}/"                \
+        -e "s%${PAT_NLEAPY}%       nn_leapy=${ORCA_NLEAPY}%"                    \
+	-e "s/${PAT_NSTOCK}/       nn_stock=${ORCA_NSTOCK}/"                    \
+	-e "s/${PAT_NWRITE}/       nn_write=${ORCA_NWRITE}/"                    \
+	-e "s/${PAT_RESTAR}/       ln_rstart=${ORCA_LRSTAR}/"                   \
+	-e "s/${PAT_NRSTAR}/       nn_rstctl=${ORCA_NRSTDT}/"                   \
+	-e "s/${PAT_NMSH}/         nn_msh=${ORCA_NMSH}/"                        \
+	-e "s/${PAT_NN_WRITE}/     nn_prg=${ORCA_NWRITE}/"                      \
+	-e "s/${PAT_NN_FWRI}/      nn_fwri=${ORCA_NWRITE}/"                     \
+	-e "s/${PAT_NN_FSBC}/      nn_fsbc=${ORCA_NN_FSBC}/"                    \
+	-e "s/${PAT_ICE_EMBD}/     nn_ice_embd=${NN_ICE_EMBD}/"                 \
+	-e "s/${PAT_ICEFLX}/       cn_iceflx=\'${ICEFLX}'/"                     \
+	-e "s/${PAT_JPNI}/         jpni=1/"                                     \
+	-e "s/${PAT_JPNJ}/         jpnj=${NUM_PROC_OCE}/"                       \
+	-e "s/${PAT_JPNIJ}/        jpnij=${NUM_PROC_OCE}/"                      \
+	namelist_cfg > namelist_cfg.tmp
+
+    IGCM_sys_Mv namelist_cfg.tmp namelist_cfg
+
+    IGCM_debug_Print 1 'Variables automatically updated in ORCA namelist_cfg'
+    grep AUTO namelist_cfg
+
+    # update iodef.xml
+
+    IGCM_debug_Print 1 'Informations into iodef.xml : V1D_ENABLE V1M_ENABLE V1Y_ENABLE OUTPUT_LEVEL'
+    IGCM_debug_Print 1 ${V1D_ENABLE} ${V1M_ENABLE} ${V1Y_ENABLE} ${OUTPUT_LEVEL}
+
+    sed -e "s/_1D_ENABLE_/${V1D_ENABLE}/" \
+        -e "s/_1M_ENABLE_/${V1M_ENABLE}/" \
+        -e "s/_1Y_ENABLE_/${V1Y_ENABLE}/" \
+        -e "s/_OUTPUT_LEVEL_/${OUTPUT_LEVEL}/" \
+        context_nemo.xml > context_nemo.xml.tmp
+
+    IGCM_sys_Mv context_nemo.xml.tmp context_nemo.xml
+
+    # vargas/titane/MPP and switch from 1 proc to 5 procs. We need to suppres restartopa the second month, if restartopa_0000 exist
+    # same thing for restart_trc and restart_ice_in
+
+    for restartfilenemo in restartopa restart_trc restart_ice_in ; do
+      [ -f ${restartfilenemo}.nc ] && [ -f ${restartfilenemo}_0000.nc ] && IGCM_sys_Rm -f ${restartfilenemo}.nc
+    done
+
+    # Add include of nemo context in iodef.xml
+    # In iodef.xml add on next line after "COMPONENT CONTEXT"
+    #  <context id="nemo" src="./context_nemo.xml"/>
+    echo '<context id="nemo" src="./context_nemo.xml"/>' > add.tmp
+    cp iodef.xml iodef.xml.tmp
+    sed -e "/COMPONENT CONTEXT/r add.tmp" \
+        iodef.xml.tmp > iodef.xml
+    rm iodef.xml.tmp add.tmp
+
+
+    IGCM_debug_PopStack "OCE_Update"
+}
+
+#-----------------------------------
+function OCE_Finalize
+{
+    IGCM_debug_PushStack "OCE_Finalize"
+
+    if [ -f date.file ] ; then
+        # Prefix use in opa9.card AND in lim2.card :
+	DATE_OPA=$( cat date.file | \
+	    sed "s/\ ${config_UserChoices_JobName}_[0-9]*[a-z]_\([0-9]*_[0-9]*\)_\ */\1/g" )
+	MainPrefix=${config_UserChoices_JobName}_1d_${DATE_OPA}
+	SecondPrefix=${config_UserChoices_JobName}_1m_${DATE_OPA}
+    fi
+
+    IGCM_debug_Print 1 FINALIZE OCE !!!
+
+    IGCM_debug_PopStack "OCE_Finalize"
+}
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/orchidee.driver
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/orchidee.driver	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/orchidee.driver	(revision 2504)
@@ -0,0 +1,205 @@
+#!/bin/ksh
+#D- Driver du script pour ORCHIDEE
+#-----------------------------------------------------------------
+function SRF_Initialize
+{
+    IGCM_debug_PushStack "SRF_Initialize"
+
+    RESOL_SRF=ALL
+
+    for frequency in ${config_SRF_WriteFrequency} ; do
+        case ${frequency} in
+            HF|hf) SRF_ok_hf=y ;;
+        esac
+    done
+
+    ##- Define variable DefSuffix set in orchidee.card
+    ##  This variable is used in orchidee.card to choose 
+    ##  parameter file(orchidee.def_DefSuffix). 
+    if [ ! X${orchidee_UserChoices_DefSuffix} = X ] ; then
+	DefSuffix=${orchidee_UserChoices_DefSuffix}
+    else
+	DefSuffix=Choi
+    fi
+
+    IGCM_debug_PopStack "SRF_Initialize"
+}
+
+#-----------------------------------------------------------------
+function SRF_Update
+{
+    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
+	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    
+
+    SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' ) 
+    case ${SRF_WriteFrequency} in
+	*Y|*y) 
+	    WriteInYears=$( echo ${SRF_WriteFrequency} | awk -F '[yY]' '{print $1}' )
+	    PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
+	    (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 )) 
+	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		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
+		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
+	    *Y|*y)
+		SECHIBA_WRITE_STEP=-1.
+		;;
+	    *M|*m)
+		SECHIBA_WRITE_STEP=-1.
+		;;
+	    *)
+		(( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 ))
+		;;
+	    esac
+	    ;;
+	*M|*m) 
+	    WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' )
+	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		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
+	    *Y|*y)
+		PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
+		(( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / PeriodLengthInYears / 12  ))
+		;;
+	    *M|*m)
+		PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )
+		(( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInMonths  * 86400 / PeriodLengthInMonths  ))
+		;;
+	    *)
+		(( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 ))
+		if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		    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
+		;;
+	    esac
+	    ;;
+	5D|5d) 
+	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		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 )) 
+	    ;;
+	1D|1d) 
+	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		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 )) 
+	    ;;
+	*s)
+	    WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' )
+	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		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 )) ;;
+	*) 
+	    IGCM_debug_Exit "SRF_Update " ${SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 
+	    IGCM_debug_Verif_Exit ;;
+    esac
+
+#Use of XIOS ouputs only
+
+    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+	(( SECHIBA_WRITE_STEP = 0 ))
+    fi
+    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
+	IGCM_comp_modifyDefFile nonblocker orchidee.def SECHIBA_HISTFILE2 y
+	if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+	    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
+	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
+	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
+	IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE   ${orchidee_UserChoices_VEGET_UPDATE}
+    else
+	IGCM_comp_modifyDefFile nonblocker orchidee.def VEGET_UPDATE 0Y
+    fi
+    if [ ! X${orchidee_UserChoices_LAND_COVER_CHANGE} = X ] ; then
+	IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE ${orchidee_UserChoices_LAND_COVER_CHANGE}
+    else
+	IGCM_comp_modifyDefFile nonblocker orchidee.def LAND_COVER_CHANGE n
+    fi
+
+    #IGCM_sys_Cp ${RUN_DIR}/orchidee.def ${RUN_DIR}/run.def
+    #IGCM_sys_Put_Out ${RUN_DIR}/run.def ${R_SAVE}/${PREFIX}_run.def
+
+#Temporary way to fix bug on cimean variable
+    IGCM_comp_modifyXmlFile force field_def_orchidee.xml cimean enabled .FALSE. 
+
+    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+    # Add include of orchidee context in iodef.xml
+    # In iodef.xml add on next line after "COMPONENT CONTEXT"
+    #  <context id="orchidee" src="./context_orchidee.xml"/>
+	echo '<context id="orchidee" src="./context_orchidee.xml"/>' > add.tmp
+	cp iodef.xml iodef.xml.tmp
+	sed -e "/COMPONENT CONTEXT/r add.tmp" \
+	    iodef.xml.tmp > iodef.xml
+	rm iodef.xml.tmp add.tmp
+    fi
+
+    IGCM_debug_PopStack "SRF_Update"
+}
+
+#-----------------------------------------------------------------
+function SRF_Finalize
+{
+    IGCM_debug_PushStack "SRF_Finalize"
+
+    #IGCM_sys_Put_Out ${RUN_DIR}/used_run.def ${R_SAVE}/${PREFIX}_used_run.def
+
+    echo FINALIZE SRF !!!
+
+    IGCM_debug_PopStack "SRF_Finalize"
+}
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/pisces.driver
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/pisces.driver	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/pisces.driver	(revision 2504)
@@ -0,0 +1,138 @@
+#!/bin/ksh
+
+#-----------------------------------
+function MBG_Initialize
+{ 
+    IGCM_debug_PushStack "MBG_Initialize"
+
+# Local function to find namelists parameters
+supergrep () {
+    grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%"
+}
+
+# Local function to find parameters in LMDZ .def files
+
+lmdzgrep () {
+    grep $1 $2 |grep -v "#" | awk "-F=" '{print $2}'
+}
+
+    ##--Variables used by MBG --
+
+    # ln_rsttr  boolean term for tracer model restart (true or false)
+    # nrsttr    control of the time step (0, 1 or 2)
+    
+    ##--Variables used by PISCES --
+ 
+    NAMELIST_TOP_CFG=${SUBMIT_DIR}/PARAM/namelist_top_${RESOL_OCE}_cfg
+    NAMELIST_PISCES_CFG=${SUBMIT_DIR}/PARAM/namelist_pisces_${RESOL_OCE}_cfg
+
+    PAT_TOP_LRSTTR=$( supergrep ln_rsttr          ${NAMELIST_TOP_CFG} )
+    PAT_TOP_NRSTTR=$( supergrep nn_rsttr          ${NAMELIST_TOP_CFG} )
+    PAT_PIS_ATCCO2=$( supergrep atcco2            ${NAMELIST_PISCES_CFG} )
+    PAT_PIS_LRIVER=$( supergrep ln_river          ${NAMELIST_PISCES_CFG} )
+
+    IGCM_debug_PopStack "MBG_Initialize"
+}
+
+#-----------------------------------
+function MBG_Update
+{
+    IGCM_debug_PushStack "MBG_Update"
+
+    ##-- Restart configuration
+    if ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_MBG_Restart}" = "n" ] ) ; then
+
+        #echo "NO RESTART FOR TOP"
+        TOP_LRSTTR=.FALSE.
+        TOP_NRSTTR=0
+
+        PISCES_LRIVER=.FALSE.
+
+    elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_MBG_Restart}" = "y" ] ) ; then
+
+        #echo "RESTART TOP"
+        TOP_LRSTTR=.TRUE.
+        TOP_NRSTTR=0
+
+        PISCES_LRIVER=.TRUE.
+
+        # If we start from IPSLCM5* restart files.
+	for file in restart_trc*.nc ; do
+            ncrename -v TRBDSi,TRBGSi -v TRNDSi,TRNGSi -v TRNBSi,TRNDSi -v TRBBSi,TRBDSi ${file} > /dev/null 2>&1
+	done
+
+    else
+
+        #echo "RESTART TOP"
+        TOP_LRSTTR=.TRUE.
+        TOP_NRSTTR=2
+
+        PISCES_LRIVER=.FALSE.
+
+    fi
+
+    ##-- Enable dbio output file
+    DBIO_ENABLE=".FALSE." 
+    eval pisces_DBIO_ENABLE=\${pisces_UserChoices_DBIO_ENABLE} > /dev/null 2>&1
+    if [ "${pisces_DBIO_ENABLE}" = "y" ]; then
+        DBIO_ENABLE=".TRUE."
+    fi
+
+    # update iodef.xml
+
+    echo 'Informations into iodef.xml : DBIO_ENABLE'
+    echo ${DBIO_ENABLE}
+
+    sed -e "s/<DBIO_ENABLE>/${DBIO_ENABLE}/" \
+        iodef.xml > iodef.xml.tmp
+
+    IGCM_sys_Mv iodef.xml.tmp iodef.xml
+
+    ##-- CO2 forcing : update atcco2 value in namelist_pisces_cfg
+    if [ "${pisces_UserChoices_CARBON_CYCLE}" = "y" ]; then
+       	# Special case for carbon cycle
+	# Activate this case by putting CARBON_CYCLE=y in pisces.card section UserChoices
+	echo 'Update atcco2 in namelist_pisces_cfg with value from file co2.log'
+	PathCO2log=${SUBMIT_DIR}
+	PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log )
+	IPCC_PIS_CO2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' )
+	sed -e "s%${PAT_PIS_ATCCO2}%          atcco2=${IPCC_PIS_CO2}%"             \
+	    namelist_pisces_cfg > namelist_pisces_cfg.tmp
+	IGCM_sys_Mv namelist_pisces_cfg.tmp namelist_pisces_cfg
+    else
+	# Take same CO2 as for LMDZ, in parameter file config.def.
+	# ATM_Update is done before MBG_Update and therefor config.def file contains the correct value for CO2.
+	echo 'Update atcco2 in namelist_pisces_cfg with same value as for LMDZ'
+	LMDZ_CO2=$( lmdzgrep co2_ppm config.def )
+	sed -e "s%${PAT_PIS_ATCCO2}%          atcco2=${LMDZ_CO2}%"             \
+	    namelist_pisces_cfg > namelist_pisces_cfg.tmp
+	IGCM_sys_Mv namelist_pisces_cfg.tmp namelist_pisces_cfg
+    fi
+
+    ##-- Update namelist_top_cfg and namelist_pisces_cfg
+
+    sed -e "s%${PAT_TOP_LRSTTR}%          ln_rsttr=${TOP_LRSTTR}%"                   \
+        -e "s%${PAT_TOP_NRSTTR}%          nn_rsttr=${TOP_NRSTTR}%"                   \
+        namelist_top_cfg > namelist_top_cfg.tmp
+
+    IGCM_sys_Mv namelist_top_cfg.tmp namelist_top_cfg
+
+    sed -e "s%${PAT_PIS_LRIVER}%          ln_river=${PISCES_LRIVER}%"                \
+        namelist_pisces_cfg > namelist_pisces_cfg.tmp
+
+    IGCM_sys_Mv namelist_pisces_cfg.tmp namelist_pisces_cfg
+
+
+    IGCM_debug_PopStack "MBG_Update"
+}
+
+#-----------------------------------
+function MBG_Finalize
+{
+    IGCM_debug_PushStack "MBG_Finalize"
+
+    echo FINALIZE MBG !!!
+
+    IGCM_debug_PopStack "MBG_Finalize"
+}
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/stomate.driver
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/stomate.driver	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/stomate.driver	(revision 2504)
@@ -0,0 +1,165 @@
+#!/bin/ksh
+
+#D- Driver du script pour ORCHIDEE
+
+#-----------------------------------------------------------------
+function SBG_Initialize
+{
+    IGCM_debug_PushStack "SBG_Initialize"
+
+    RESOL_SBG=ALL
+    
+    IGCM_debug_PopStack "SBG_Initialize"
+}
+
+#-----------------------------------------------------------------
+function SBG_Update
+{
+    IGCM_debug_PushStack "SBG_Update"
+
+    typeset STOMATE_WRITE_STEP
+
+    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+	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
+	*Y|*y) 
+	    WriteInYears=$( echo ${config_SBG_WriteFrequency} | awk -F '[yY]' '{print $1}' )
+	    PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
+	    (( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears )) 
+	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		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
+	    ;;
+	1M|1m) 
+	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		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
+	    *Y|*y)
+		STOMATE_WRITE_STEP=-1.
+		;;
+	    *M|*m)
+		STOMATE_WRITE_STEP=-1.
+		;;
+	    *)
+		(( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) ;;
+	    esac
+	    ;;
+	*M|*m) 
+	    WriteInMonths=$( echo ${config_SBG_WriteFrequency} | awk -F '[mM]' '{print $1}' )
+	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		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
+	    *Y|*y)
+		PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
+		(( STOMATE_WRITE_STEP = 30 ))
+		;;
+	    *M|*m)
+		PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )
+		(( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInMonths / PeriodLengthInMonths ))
+		;;
+	    *)
+		(( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) 
+		if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		    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
+		;;
+	    esac
+	    ;;
+	5D|5d) 
+	    (( STOMATE_WRITE_STEP = 5 ))
+	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		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
+	    ;;
+	1D|1d) 
+	    (( STOMATE_WRITE_STEP = 1 )) 
+	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		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
+	    ;;
+	*s)
+	    WriteInSeconds=$( echo ${config_SBG_WriteFrequency} | awk -F '[s]' '{print $1}' )
+	    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+		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 )) ;;
+	*) 
+	    IGCM_debug_Exit "SBG_Update " ${config_SBG_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 
+	    IGCM_debug_Verif_Exit ;;
+    esac
+
+
+#Use of XIOS library only
+
+    if [ X${orchidee_UserChoices_XIOS} = Xy ] ; then
+	(( STOMATE_WRITE_STEP = 0 ))
+    fi
+
+    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"
+	IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN NONE
+    else
+	IGCM_comp_modifyDefFile blocker orchidee.def STOMATE_RESTART_FILEIN stomate_rest_in.nc
+    fi
+
+    IGCM_debug_PopStack "SBG_Update"
+}
+
+#-----------------------------------------------------------------
+function SBG_Finalize
+{
+#set -vx
+    IGCM_debug_PushStack "SBG_Finalize"
+
+    if [ $( IGCM_date_DaysBetweenGregorianDate ${PeriodDateEnd} ${year}1230 ) -ge 0 ] ; then
+	IGCM_sys_Put_Out stomate_Cforcing.nc ${R_OUT_SBG_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_stomate_Cforcing.nc
+	IGCM_sys_Put_Out stomate_forcing.nc  ${R_OUT_SBG_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_stomate_forcing.nc
+# 	rm -f stomate_Cforcing.nc
+# 	rm -f stomate_forcing.nc
+    fi
+
+    IGCM_debug_PopStack "SBG_Finalize"
+}
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/xios.driver
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/xios.driver	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/DRIVER/xios.driver	(revision 2504)
@@ -0,0 +1,40 @@
+#!/bin/ksh
+#-----------------------------------
+function IOS_Initialize
+{ 
+    IGCM_debug_PushStack "IOS_Initialize"
+
+    echo INITIALIZE IOS !!!
+
+    IGCM_debug_PopStack "IOS_Initialize"
+}
+
+#-----------------------------------
+function IOS_Update
+{
+    IGCM_debug_PushStack "IOS_Update"
+
+    echo UPDATE IOS !!!
+# Activate server mode
+    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
+	IGCM_comp_modifyXmlFile force iodef.xml oasis_codes_id NONE LMDZ,oceanx
+    fi 
+    if [ -f namcouple ] ; then
+	sed -e "s/2  LMDZ oceanx/3 LMDZ oceanx ${config_Executable_IOS[1]}/" namcouple > namcouple.tmp 
+	IGCM_sys_Mv namcouple.tmp namcouple
+    fi
+
+    IGCM_debug_PopStack "IOS_Update"
+}
+
+#-----------------------------------
+function IOS_Finalize
+{
+    IGCM_debug_PushStack "IOS_Finalize"
+
+    echo FINALIZE IOS !!!
+
+    IGCM_debug_PopStack "IOS_Finalize"
+}
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/CMIP5_gridcar_CO2_emissions_fossil_fuel_Andres_1751-2007_monthly_SC.txt
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/CMIP5_gridcar_CO2_emissions_fossil_fuel_Andres_1751-2007_monthly_SC.txt	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/CMIP5_gridcar_CO2_emissions_fossil_fuel_Andres_1751-2007_monthly_SC.txt	(revision 2504)
@@ -0,0 +1,3085 @@
+year    month  gridsum (PgC/mth)
+1751    01     0.00021
+1751    02     0.00021
+1751    03     0.00021
+1751    04     0.00021
+1751    05     0.00021
+1751    06     0.00021
+1751    07     0.00021
+1751    08     0.00021
+1751    09     0.00021
+1751    10     0.00021
+1751    11     0.00021
+1751    12     0.00021
+1752    01     0.00021
+1752    02     0.00021
+1752    03     0.00021
+1752    04     0.00021
+1752    05     0.00021
+1752    06     0.00021
+1752    07     0.00021
+1752    08     0.00021
+1752    09     0.00021
+1752    10     0.00021
+1752    11     0.00021
+1752    12     0.00021
+1753    01     0.00021
+1753    02     0.00021
+1753    03     0.00021
+1753    04     0.00021
+1753    05     0.00021
+1753    06     0.00021
+1753    07     0.00021
+1753    08     0.00021
+1753    09     0.00021
+1753    10     0.00021
+1753    11     0.00021
+1753    12     0.00021
+1754    01     0.00021
+1754    02     0.00021
+1754    03     0.00021
+1754    04     0.00021
+1754    05     0.00021
+1754    06     0.00021
+1754    07     0.00021
+1754    08     0.00021
+1754    09     0.00021
+1754    10     0.00021
+1754    11     0.00021
+1754    12     0.00021
+1755    01     0.00021
+1755    02     0.00021
+1755    03     0.00021
+1755    04     0.00021
+1755    05     0.00021
+1755    06     0.00021
+1755    07     0.00021
+1755    08     0.00021
+1755    09     0.00021
+1755    10     0.00021
+1755    11     0.00021
+1755    12     0.00021
+1756    01     0.00023
+1756    02     0.00023
+1756    03     0.00023
+1756    04     0.00023
+1756    05     0.00023
+1756    06     0.00023
+1756    07     0.00023
+1756    08     0.00023
+1756    09     0.00023
+1756    10     0.00023
+1756    11     0.00023
+1756    12     0.00023
+1757    01     0.00023
+1757    02     0.00023
+1757    03     0.00023
+1757    04     0.00023
+1757    05     0.00023
+1757    06     0.00023
+1757    07     0.00023
+1757    08     0.00023
+1757    09     0.00023
+1757    10     0.00023
+1757    11     0.00023
+1757    12     0.00023
+1758    01     0.00023
+1758    02     0.00023
+1758    03     0.00023
+1758    04     0.00023
+1758    05     0.00023
+1758    06     0.00023
+1758    07     0.00023
+1758    08     0.00023
+1758    09     0.00023
+1758    10     0.00023
+1758    11     0.00023
+1758    12     0.00023
+1759    01     0.00023
+1759    02     0.00023
+1759    03     0.00023
+1759    04     0.00023
+1759    05     0.00023
+1759    06     0.00023
+1759    07     0.00023
+1759    08     0.00023
+1759    09     0.00023
+1759    10     0.00023
+1759    11     0.00023
+1759    12     0.00023
+1760    01     0.00023
+1760    02     0.00023
+1760    03     0.00023
+1760    04     0.00023
+1760    05     0.00023
+1760    06     0.00023
+1760    07     0.00023
+1760    08     0.00023
+1760    09     0.00023
+1760    10     0.00023
+1760    11     0.00023
+1760    12     0.00023
+1761    01     0.00025
+1761    02     0.00025
+1761    03     0.00025
+1761    04     0.00025
+1761    05     0.00025
+1761    06     0.00025
+1761    07     0.00025
+1761    08     0.00025
+1761    09     0.00025
+1761    10     0.00025
+1761    11     0.00025
+1761    12     0.00025
+1762    01     0.00025
+1762    02     0.00025
+1762    03     0.00025
+1762    04     0.00025
+1762    05     0.00025
+1762    06     0.00025
+1762    07     0.00025
+1762    08     0.00025
+1762    09     0.00025
+1762    10     0.00025
+1762    11     0.00025
+1762    12     0.00025
+1763    01     0.00025
+1763    02     0.00025
+1763    03     0.00025
+1763    04     0.00025
+1763    05     0.00025
+1763    06     0.00025
+1763    07     0.00025
+1763    08     0.00025
+1763    09     0.00025
+1763    10     0.00025
+1763    11     0.00025
+1763    12     0.00025
+1764    01     0.00025
+1764    02     0.00025
+1764    03     0.00025
+1764    04     0.00025
+1764    05     0.00025
+1764    06     0.00025
+1764    07     0.00025
+1764    08     0.00025
+1764    09     0.00025
+1764    10     0.00025
+1764    11     0.00025
+1764    12     0.00025
+1765    01     0.00025
+1765    02     0.00025
+1765    03     0.00025
+1765    04     0.00025
+1765    05     0.00025
+1765    06     0.00025
+1765    07     0.00025
+1765    08     0.00025
+1765    09     0.00025
+1765    10     0.00025
+1765    11     0.00025
+1765    12     0.00025
+1766    01     0.00028
+1766    02     0.00028
+1766    03     0.00028
+1766    04     0.00028
+1766    05     0.00028
+1766    06     0.00028
+1766    07     0.00028
+1766    08     0.00028
+1766    09     0.00028
+1766    10     0.00028
+1766    11     0.00028
+1766    12     0.00028
+1767    01     0.00028
+1767    02     0.00028
+1767    03     0.00028
+1767    04     0.00028
+1767    05     0.00028
+1767    06     0.00028
+1767    07     0.00028
+1767    08     0.00028
+1767    09     0.00028
+1767    10     0.00028
+1767    11     0.00028
+1767    12     0.00028
+1768    01     0.00028
+1768    02     0.00028
+1768    03     0.00028
+1768    04     0.00028
+1768    05     0.00028
+1768    06     0.00028
+1768    07     0.00028
+1768    08     0.00028
+1768    09     0.00028
+1768    10     0.00028
+1768    11     0.00028
+1768    12     0.00028
+1769    01     0.00028
+1769    02     0.00028
+1769    03     0.00028
+1769    04     0.00028
+1769    05     0.00028
+1769    06     0.00028
+1769    07     0.00028
+1769    08     0.00028
+1769    09     0.00028
+1769    10     0.00028
+1769    11     0.00028
+1769    12     0.00028
+1770    01     0.00028
+1770    02     0.00028
+1770    03     0.00028
+1770    04     0.00028
+1770    05     0.00028
+1770    06     0.00028
+1770    07     0.00028
+1770    08     0.00028
+1770    09     0.00028
+1770    10     0.00028
+1770    11     0.00028
+1770    12     0.00028
+1771    01     0.00031
+1771    02     0.00031
+1771    03     0.00031
+1771    04     0.00031
+1771    05     0.00031
+1771    06     0.00031
+1771    07     0.00031
+1771    08     0.00031
+1771    09     0.00031
+1771    10     0.00031
+1771    11     0.00031
+1771    12     0.00031
+1772    01     0.00031
+1772    02     0.00031
+1772    03     0.00031
+1772    04     0.00031
+1772    05     0.00031
+1772    06     0.00031
+1772    07     0.00031
+1772    08     0.00031
+1772    09     0.00031
+1772    10     0.00031
+1772    11     0.00031
+1772    12     0.00031
+1773    01     0.00031
+1773    02     0.00031
+1773    03     0.00031
+1773    04     0.00031
+1773    05     0.00031
+1773    06     0.00031
+1773    07     0.00031
+1773    08     0.00031
+1773    09     0.00031
+1773    10     0.00031
+1773    11     0.00031
+1773    12     0.00031
+1774    01     0.00031
+1774    02     0.00031
+1774    03     0.00031
+1774    04     0.00031
+1774    05     0.00031
+1774    06     0.00031
+1774    07     0.00031
+1774    08     0.00031
+1774    09     0.00031
+1774    10     0.00031
+1774    11     0.00031
+1774    12     0.00031
+1775    01     0.00031
+1775    02     0.00031
+1775    03     0.00031
+1775    04     0.00031
+1775    05     0.00031
+1775    06     0.00031
+1775    07     0.00031
+1775    08     0.00031
+1775    09     0.00031
+1775    10     0.00031
+1775    11     0.00031
+1775    12     0.00031
+1776    01     0.00034
+1776    02     0.00034
+1776    03     0.00034
+1776    04     0.00034
+1776    05     0.00034
+1776    06     0.00034
+1776    07     0.00034
+1776    08     0.00034
+1776    09     0.00034
+1776    10     0.00034
+1776    11     0.00034
+1776    12     0.00034
+1777    01     0.00034
+1777    02     0.00034
+1777    03     0.00034
+1777    04     0.00034
+1777    05     0.00034
+1777    06     0.00034
+1777    07     0.00034
+1777    08     0.00034
+1777    09     0.00034
+1777    10     0.00034
+1777    11     0.00034
+1777    12     0.00034
+1778    01     0.00034
+1778    02     0.00034
+1778    03     0.00034
+1778    04     0.00034
+1778    05     0.00034
+1778    06     0.00034
+1778    07     0.00034
+1778    08     0.00034
+1778    09     0.00034
+1778    10     0.00034
+1778    11     0.00034
+1778    12     0.00034
+1779    01     0.00034
+1779    02     0.00034
+1779    03     0.00034
+1779    04     0.00034
+1779    05     0.00034
+1779    06     0.00034
+1779    07     0.00034
+1779    08     0.00034
+1779    09     0.00034
+1779    10     0.00034
+1779    11     0.00034
+1779    12     0.00034
+1780    01     0.00034
+1780    02     0.00034
+1780    03     0.00034
+1780    04     0.00034
+1780    05     0.00034
+1780    06     0.00034
+1780    07     0.00034
+1780    08     0.00034
+1780    09     0.00034
+1780    10     0.00034
+1780    11     0.00034
+1780    12     0.00034
+1781    01     0.00038
+1781    02     0.00038
+1781    03     0.00038
+1781    04     0.00038
+1781    05     0.00038
+1781    06     0.00038
+1781    07     0.00038
+1781    08     0.00038
+1781    09     0.00038
+1781    10     0.00038
+1781    11     0.00038
+1781    12     0.00038
+1782    01     0.00038
+1782    02     0.00038
+1782    03     0.00038
+1782    04     0.00038
+1782    05     0.00038
+1782    06     0.00038
+1782    07     0.00038
+1782    08     0.00038
+1782    09     0.00038
+1782    10     0.00038
+1782    11     0.00038
+1782    12     0.00038
+1783    01     0.00038
+1783    02     0.00038
+1783    03     0.00038
+1783    04     0.00038
+1783    05     0.00038
+1783    06     0.00038
+1783    07     0.00038
+1783    08     0.00038
+1783    09     0.00038
+1783    10     0.00038
+1783    11     0.00038
+1783    12     0.00038
+1784    01     0.00038
+1784    02     0.00038
+1784    03     0.00038
+1784    04     0.00038
+1784    05     0.00038
+1784    06     0.00038
+1784    07     0.00038
+1784    08     0.00038
+1784    09     0.00038
+1784    10     0.00038
+1784    11     0.00038
+1784    12     0.00038
+1785    01     0.00038
+1785    02     0.00038
+1785    03     0.00038
+1785    04     0.00038
+1785    05     0.00038
+1785    06     0.00038
+1785    07     0.00038
+1785    08     0.00038
+1785    09     0.00038
+1785    10     0.00038
+1785    11     0.00038
+1785    12     0.00038
+1786    01     0.00044
+1786    02     0.00044
+1786    03     0.00044
+1786    04     0.00044
+1786    05     0.00044
+1786    06     0.00044
+1786    07     0.00044
+1786    08     0.00044
+1786    09     0.00044
+1786    10     0.00044
+1786    11     0.00044
+1786    12     0.00044
+1787    01     0.00044
+1787    02     0.00044
+1787    03     0.00044
+1787    04     0.00044
+1787    05     0.00044
+1787    06     0.00044
+1787    07     0.00044
+1787    08     0.00044
+1787    09     0.00044
+1787    10     0.00044
+1787    11     0.00044
+1787    12     0.00044
+1788    01     0.00044
+1788    02     0.00044
+1788    03     0.00044
+1788    04     0.00044
+1788    05     0.00044
+1788    06     0.00044
+1788    07     0.00044
+1788    08     0.00044
+1788    09     0.00044
+1788    10     0.00044
+1788    11     0.00044
+1788    12     0.00044
+1789    01     0.00044
+1789    02     0.00044
+1789    03     0.00044
+1789    04     0.00044
+1789    05     0.00044
+1789    06     0.00044
+1789    07     0.00044
+1789    08     0.00044
+1789    09     0.00044
+1789    10     0.00044
+1789    11     0.00044
+1789    12     0.00044
+1790    01     0.00044
+1790    02     0.00044
+1790    03     0.00044
+1790    04     0.00044
+1790    05     0.00044
+1790    06     0.00044
+1790    07     0.00044
+1790    08     0.00044
+1790    09     0.00044
+1790    10     0.00044
+1790    11     0.00044
+1790    12     0.00044
+1791    01     0.00049
+1791    02     0.00049
+1791    03     0.00049
+1791    04     0.00049
+1791    05     0.00049
+1791    06     0.00049
+1791    07     0.00049
+1791    08     0.00049
+1791    09     0.00049
+1791    10     0.00049
+1791    11     0.00049
+1791    12     0.00049
+1792    01     0.00050
+1792    02     0.00050
+1792    03     0.00050
+1792    04     0.00050
+1792    05     0.00050
+1792    06     0.00050
+1792    07     0.00050
+1792    08     0.00050
+1792    09     0.00050
+1792    10     0.00050
+1792    11     0.00050
+1792    12     0.00050
+1793    01     0.00050
+1793    02     0.00050
+1793    03     0.00050
+1793    04     0.00050
+1793    05     0.00050
+1793    06     0.00050
+1793    07     0.00050
+1793    08     0.00050
+1793    09     0.00050
+1793    10     0.00050
+1793    11     0.00050
+1793    12     0.00050
+1794    01     0.00050
+1794    02     0.00050
+1794    03     0.00050
+1794    04     0.00050
+1794    05     0.00050
+1794    06     0.00050
+1794    07     0.00050
+1794    08     0.00050
+1794    09     0.00050
+1794    10     0.00050
+1794    11     0.00050
+1794    12     0.00050
+1795    01     0.00050
+1795    02     0.00050
+1795    03     0.00050
+1795    04     0.00050
+1795    05     0.00050
+1795    06     0.00050
+1795    07     0.00050
+1795    08     0.00050
+1795    09     0.00050
+1795    10     0.00050
+1795    11     0.00050
+1795    12     0.00050
+1796    01     0.00052
+1796    02     0.00052
+1796    03     0.00052
+1796    04     0.00052
+1796    05     0.00052
+1796    06     0.00052
+1796    07     0.00052
+1796    08     0.00052
+1796    09     0.00052
+1796    10     0.00052
+1796    11     0.00052
+1796    12     0.00052
+1797    01     0.00055
+1797    02     0.00055
+1797    03     0.00055
+1797    04     0.00055
+1797    05     0.00055
+1797    06     0.00055
+1797    07     0.00055
+1797    08     0.00055
+1797    09     0.00055
+1797    10     0.00055
+1797    11     0.00055
+1797    12     0.00055
+1798    01     0.00057
+1798    02     0.00057
+1798    03     0.00057
+1798    04     0.00057
+1798    05     0.00057
+1798    06     0.00057
+1798    07     0.00057
+1798    08     0.00057
+1798    09     0.00057
+1798    10     0.00057
+1798    11     0.00057
+1798    12     0.00057
+1799    01     0.00060
+1799    02     0.00060
+1799    03     0.00060
+1799    04     0.00060
+1799    05     0.00060
+1799    06     0.00060
+1799    07     0.00060
+1799    08     0.00060
+1799    09     0.00060
+1799    10     0.00060
+1799    11     0.00060
+1799    12     0.00060
+1800    01     0.00064
+1800    02     0.00064
+1800    03     0.00064
+1800    04     0.00064
+1800    05     0.00064
+1800    06     0.00064
+1800    07     0.00064
+1800    08     0.00064
+1800    09     0.00064
+1800    10     0.00064
+1800    11     0.00064
+1800    12     0.00064
+1801    01     0.00064
+1801    02     0.00064
+1801    03     0.00064
+1801    04     0.00064
+1801    05     0.00064
+1801    06     0.00064
+1801    07     0.00064
+1801    08     0.00064
+1801    09     0.00064
+1801    10     0.00064
+1801    11     0.00064
+1801    12     0.00064
+1802    01     0.00084
+1802    02     0.00084
+1802    03     0.00084
+1802    04     0.00084
+1802    05     0.00084
+1802    06     0.00084
+1802    07     0.00084
+1802    08     0.00084
+1802    09     0.00084
+1802    10     0.00084
+1802    11     0.00084
+1802    12     0.00084
+1803    01     0.00072
+1803    02     0.00072
+1803    03     0.00072
+1803    04     0.00072
+1803    05     0.00072
+1803    06     0.00072
+1803    07     0.00072
+1803    08     0.00072
+1803    09     0.00072
+1803    10     0.00072
+1803    11     0.00072
+1803    12     0.00072
+1804    01     0.00078
+1804    02     0.00078
+1804    03     0.00078
+1804    04     0.00078
+1804    05     0.00078
+1804    06     0.00078
+1804    07     0.00078
+1804    08     0.00078
+1804    09     0.00078
+1804    10     0.00078
+1804    11     0.00078
+1804    12     0.00078
+1805    01     0.00076
+1805    02     0.00076
+1805    03     0.00076
+1805    04     0.00076
+1805    05     0.00076
+1805    06     0.00076
+1805    07     0.00076
+1805    08     0.00076
+1805    09     0.00076
+1805    10     0.00076
+1805    11     0.00076
+1805    12     0.00076
+1806    01     0.00080
+1806    02     0.00080
+1806    03     0.00080
+1806    04     0.00080
+1806    05     0.00080
+1806    06     0.00080
+1806    07     0.00080
+1806    08     0.00080
+1806    09     0.00080
+1806    10     0.00080
+1806    11     0.00080
+1806    12     0.00080
+1807    01     0.00084
+1807    02     0.00084
+1807    03     0.00084
+1807    04     0.00084
+1807    05     0.00084
+1807    06     0.00084
+1807    07     0.00084
+1807    08     0.00084
+1807    09     0.00084
+1807    10     0.00084
+1807    11     0.00084
+1807    12     0.00084
+1808    01     0.00080
+1808    02     0.00080
+1808    03     0.00080
+1808    04     0.00080
+1808    05     0.00080
+1808    06     0.00080
+1808    07     0.00080
+1808    08     0.00080
+1808    09     0.00080
+1808    10     0.00080
+1808    11     0.00080
+1808    12     0.00080
+1809    01     0.00080
+1809    02     0.00080
+1809    03     0.00080
+1809    04     0.00080
+1809    05     0.00080
+1809    06     0.00080
+1809    07     0.00080
+1809    08     0.00080
+1809    09     0.00080
+1809    10     0.00080
+1809    11     0.00080
+1809    12     0.00080
+1810    01     0.00085
+1810    02     0.00085
+1810    03     0.00085
+1810    04     0.00085
+1810    05     0.00085
+1810    06     0.00085
+1810    07     0.00085
+1810    08     0.00085
+1810    09     0.00085
+1810    10     0.00085
+1810    11     0.00085
+1810    12     0.00085
+1811    01     0.00090
+1811    02     0.00090
+1811    03     0.00090
+1811    04     0.00090
+1811    05     0.00090
+1811    06     0.00090
+1811    07     0.00090
+1811    08     0.00090
+1811    09     0.00090
+1811    10     0.00090
+1811    11     0.00090
+1811    12     0.00090
+1812    01     0.00093
+1812    02     0.00093
+1812    03     0.00093
+1812    04     0.00093
+1812    05     0.00093
+1812    06     0.00093
+1812    07     0.00093
+1812    08     0.00093
+1812    09     0.00093
+1812    10     0.00093
+1812    11     0.00093
+1812    12     0.00093
+1813    01     0.00094
+1813    02     0.00094
+1813    03     0.00094
+1813    04     0.00094
+1813    05     0.00094
+1813    06     0.00094
+1813    07     0.00094
+1813    08     0.00094
+1813    09     0.00094
+1813    10     0.00094
+1813    11     0.00094
+1813    12     0.00094
+1814    01     0.00096
+1814    02     0.00096
+1814    03     0.00096
+1814    04     0.00096
+1814    05     0.00096
+1814    06     0.00096
+1814    07     0.00096
+1814    08     0.00096
+1814    09     0.00096
+1814    10     0.00096
+1814    11     0.00096
+1814    12     0.00096
+1815    01     0.00099
+1815    02     0.00099
+1815    03     0.00099
+1815    04     0.00099
+1815    05     0.00099
+1815    06     0.00099
+1815    07     0.00099
+1815    08     0.00099
+1815    09     0.00099
+1815    10     0.00099
+1815    11     0.00099
+1815    12     0.00099
+1816    01     0.00108
+1816    02     0.00108
+1816    03     0.00108
+1816    04     0.00108
+1816    05     0.00108
+1816    06     0.00108
+1816    07     0.00108
+1816    08     0.00108
+1816    09     0.00108
+1816    10     0.00108
+1816    11     0.00108
+1816    12     0.00108
+1817    01     0.00112
+1817    02     0.00112
+1817    03     0.00112
+1817    04     0.00112
+1817    05     0.00112
+1817    06     0.00112
+1817    07     0.00112
+1817    08     0.00112
+1817    09     0.00112
+1817    10     0.00112
+1817    11     0.00112
+1817    12     0.00112
+1818    01     0.00113
+1818    02     0.00113
+1818    03     0.00113
+1818    04     0.00113
+1818    05     0.00113
+1818    06     0.00113
+1818    07     0.00113
+1818    08     0.00113
+1818    09     0.00113
+1818    10     0.00113
+1818    11     0.00113
+1818    12     0.00113
+1819    01     0.00114
+1819    02     0.00114
+1819    03     0.00114
+1819    04     0.00114
+1819    05     0.00114
+1819    06     0.00114
+1819    07     0.00114
+1819    08     0.00114
+1819    09     0.00114
+1819    10     0.00114
+1819    11     0.00114
+1819    12     0.00114
+1820    01     0.00115
+1820    02     0.00115
+1820    03     0.00115
+1820    04     0.00115
+1820    05     0.00115
+1820    06     0.00115
+1820    07     0.00115
+1820    08     0.00115
+1820    09     0.00115
+1820    10     0.00115
+1820    11     0.00115
+1820    12     0.00115
+1821    01     0.00117
+1821    02     0.00117
+1821    03     0.00117
+1821    04     0.00117
+1821    05     0.00117
+1821    06     0.00117
+1821    07     0.00117
+1821    08     0.00117
+1821    09     0.00117
+1821    10     0.00117
+1821    11     0.00117
+1821    12     0.00117
+1822    01     0.00122
+1822    02     0.00122
+1822    03     0.00122
+1822    04     0.00122
+1822    05     0.00122
+1822    06     0.00122
+1822    07     0.00122
+1822    08     0.00122
+1822    09     0.00122
+1822    10     0.00122
+1822    11     0.00122
+1822    12     0.00122
+1823    01     0.00129
+1823    02     0.00129
+1823    03     0.00129
+1823    04     0.00129
+1823    05     0.00129
+1823    06     0.00129
+1823    07     0.00129
+1823    08     0.00129
+1823    09     0.00129
+1823    10     0.00129
+1823    11     0.00129
+1823    12     0.00129
+1824    01     0.00133
+1824    02     0.00133
+1824    03     0.00133
+1824    04     0.00133
+1824    05     0.00133
+1824    06     0.00133
+1824    07     0.00133
+1824    08     0.00133
+1824    09     0.00133
+1824    10     0.00133
+1824    11     0.00133
+1824    12     0.00133
+1825    01     0.00138
+1825    02     0.00138
+1825    03     0.00138
+1825    04     0.00138
+1825    05     0.00138
+1825    06     0.00138
+1825    07     0.00138
+1825    08     0.00138
+1825    09     0.00138
+1825    10     0.00138
+1825    11     0.00138
+1825    12     0.00138
+1826    01     0.00140
+1826    02     0.00140
+1826    03     0.00140
+1826    04     0.00140
+1826    05     0.00140
+1826    06     0.00140
+1826    07     0.00140
+1826    08     0.00140
+1826    09     0.00140
+1826    10     0.00140
+1826    11     0.00140
+1826    12     0.00140
+1827    01     0.00150
+1827    02     0.00150
+1827    03     0.00150
+1827    04     0.00150
+1827    05     0.00150
+1827    06     0.00150
+1827    07     0.00150
+1827    08     0.00150
+1827    09     0.00150
+1827    10     0.00150
+1827    11     0.00150
+1827    12     0.00150
+1828    01     0.00152
+1828    02     0.00152
+1828    03     0.00152
+1828    04     0.00152
+1828    05     0.00152
+1828    06     0.00152
+1828    07     0.00152
+1828    08     0.00152
+1828    09     0.00152
+1828    10     0.00152
+1828    11     0.00152
+1828    12     0.00152
+1829    01     0.00151
+1829    02     0.00151
+1829    03     0.00151
+1829    04     0.00151
+1829    05     0.00151
+1829    06     0.00151
+1829    07     0.00151
+1829    08     0.00151
+1829    09     0.00151
+1829    10     0.00151
+1829    11     0.00151
+1829    12     0.00151
+1830    01     0.00203
+1830    02     0.00203
+1830    03     0.00203
+1830    04     0.00203
+1830    05     0.00203
+1830    06     0.00203
+1830    07     0.00203
+1830    08     0.00203
+1830    09     0.00203
+1830    10     0.00203
+1830    11     0.00203
+1830    12     0.00203
+1831    01     0.00192
+1831    02     0.00192
+1831    03     0.00192
+1831    04     0.00192
+1831    05     0.00192
+1831    06     0.00192
+1831    07     0.00192
+1831    08     0.00192
+1831    09     0.00192
+1831    10     0.00192
+1831    11     0.00192
+1831    12     0.00192
+1832    01     0.00194
+1832    02     0.00194
+1832    03     0.00194
+1832    04     0.00194
+1832    05     0.00194
+1832    06     0.00194
+1832    07     0.00194
+1832    08     0.00194
+1832    09     0.00194
+1832    10     0.00194
+1832    11     0.00194
+1832    12     0.00194
+1833    01     0.00197
+1833    02     0.00197
+1833    03     0.00197
+1833    04     0.00197
+1833    05     0.00197
+1833    06     0.00197
+1833    07     0.00197
+1833    08     0.00197
+1833    09     0.00197
+1833    10     0.00197
+1833    11     0.00197
+1833    12     0.00197
+1834    01     0.00201
+1834    02     0.00201
+1834    03     0.00201
+1834    04     0.00201
+1834    05     0.00201
+1834    06     0.00201
+1834    07     0.00201
+1834    08     0.00201
+1834    09     0.00201
+1834    10     0.00201
+1834    11     0.00201
+1834    12     0.00201
+1835    01     0.00206
+1835    02     0.00206
+1835    03     0.00206
+1835    04     0.00206
+1835    05     0.00206
+1835    06     0.00206
+1835    07     0.00206
+1835    08     0.00206
+1835    09     0.00206
+1835    10     0.00206
+1835    11     0.00206
+1835    12     0.00206
+1836    01     0.00238
+1836    02     0.00238
+1836    03     0.00238
+1836    04     0.00238
+1836    05     0.00238
+1836    06     0.00238
+1836    07     0.00238
+1836    08     0.00238
+1836    09     0.00238
+1836    10     0.00238
+1836    11     0.00238
+1836    12     0.00238
+1837    01     0.00238
+1837    02     0.00238
+1837    03     0.00238
+1837    04     0.00238
+1837    05     0.00238
+1837    06     0.00238
+1837    07     0.00238
+1837    08     0.00238
+1837    09     0.00238
+1837    10     0.00238
+1837    11     0.00238
+1837    12     0.00238
+1838    01     0.00246
+1838    02     0.00246
+1838    03     0.00246
+1838    04     0.00246
+1838    05     0.00246
+1838    06     0.00246
+1838    07     0.00246
+1838    08     0.00246
+1838    09     0.00246
+1838    10     0.00246
+1838    11     0.00246
+1838    12     0.00246
+1839    01     0.00254
+1839    02     0.00254
+1839    03     0.00254
+1839    04     0.00254
+1839    05     0.00254
+1839    06     0.00254
+1839    07     0.00254
+1839    08     0.00254
+1839    09     0.00254
+1839    10     0.00254
+1839    11     0.00254
+1839    12     0.00254
+1840    01     0.00271
+1840    02     0.00271
+1840    03     0.00271
+1840    04     0.00271
+1840    05     0.00271
+1840    06     0.00271
+1840    07     0.00271
+1840    08     0.00271
+1840    09     0.00271
+1840    10     0.00271
+1840    11     0.00271
+1840    12     0.00271
+1841    01     0.00279
+1841    02     0.00279
+1841    03     0.00279
+1841    04     0.00279
+1841    05     0.00279
+1841    06     0.00279
+1841    07     0.00279
+1841    08     0.00279
+1841    09     0.00279
+1841    10     0.00279
+1841    11     0.00279
+1841    12     0.00279
+1842    01     0.00295
+1842    02     0.00295
+1842    03     0.00295
+1842    04     0.00295
+1842    05     0.00295
+1842    06     0.00295
+1842    07     0.00295
+1842    08     0.00295
+1842    09     0.00295
+1842    10     0.00295
+1842    11     0.00295
+1842    12     0.00295
+1843    01     0.00302
+1843    02     0.00302
+1843    03     0.00302
+1843    04     0.00302
+1843    05     0.00302
+1843    06     0.00302
+1843    07     0.00302
+1843    08     0.00302
+1843    09     0.00302
+1843    10     0.00302
+1843    11     0.00302
+1843    12     0.00302
+1844    01     0.00322
+1844    02     0.00322
+1844    03     0.00322
+1844    04     0.00322
+1844    05     0.00322
+1844    06     0.00322
+1844    07     0.00322
+1844    08     0.00322
+1844    09     0.00322
+1844    10     0.00322
+1844    11     0.00322
+1844    12     0.00322
+1845    01     0.00353
+1845    02     0.00353
+1845    03     0.00353
+1845    04     0.00353
+1845    05     0.00353
+1845    06     0.00353
+1845    07     0.00353
+1845    08     0.00353
+1845    09     0.00353
+1845    10     0.00353
+1845    11     0.00353
+1845    12     0.00353
+1846    01     0.00359
+1846    02     0.00359
+1846    03     0.00359
+1846    04     0.00359
+1846    05     0.00359
+1846    06     0.00359
+1846    07     0.00359
+1846    08     0.00359
+1846    09     0.00359
+1846    10     0.00359
+1846    11     0.00359
+1846    12     0.00359
+1847    01     0.00392
+1847    02     0.00392
+1847    03     0.00392
+1847    04     0.00392
+1847    05     0.00392
+1847    06     0.00392
+1847    07     0.00392
+1847    08     0.00392
+1847    09     0.00392
+1847    10     0.00392
+1847    11     0.00392
+1847    12     0.00392
+1848    01     0.00395
+1848    02     0.00395
+1848    03     0.00395
+1848    04     0.00395
+1848    05     0.00395
+1848    06     0.00395
+1848    07     0.00395
+1848    08     0.00395
+1848    09     0.00395
+1848    10     0.00395
+1848    11     0.00395
+1848    12     0.00395
+1849    01     0.00417
+1849    02     0.00417
+1849    03     0.00417
+1849    04     0.00417
+1849    05     0.00417
+1849    06     0.00417
+1849    07     0.00417
+1849    08     0.00417
+1849    09     0.00417
+1849    10     0.00417
+1849    11     0.00417
+1849    12     0.00417
+1850    01     0.00448
+1850    02     0.00448
+1850    03     0.00448
+1850    04     0.00448
+1850    05     0.00448
+1850    06     0.00448
+1850    07     0.00448
+1850    08     0.00448
+1850    09     0.00448
+1850    10     0.00448
+1850    11     0.00448
+1850    12     0.00448
+1851    01     0.00452
+1851    02     0.00452
+1851    03     0.00452
+1851    04     0.00452
+1851    05     0.00452
+1851    06     0.00452
+1851    07     0.00452
+1851    08     0.00452
+1851    09     0.00452
+1851    10     0.00452
+1851    11     0.00452
+1851    12     0.00452
+1852    01     0.00472
+1852    02     0.00472
+1852    03     0.00472
+1852    04     0.00472
+1852    05     0.00472
+1852    06     0.00472
+1852    07     0.00472
+1852    08     0.00472
+1852    09     0.00472
+1852    10     0.00472
+1852    11     0.00472
+1852    12     0.00472
+1853    01     0.00494
+1853    02     0.00494
+1853    03     0.00494
+1853    04     0.00494
+1853    05     0.00494
+1853    06     0.00494
+1853    07     0.00494
+1853    08     0.00494
+1853    09     0.00494
+1853    10     0.00494
+1853    11     0.00494
+1853    12     0.00494
+1854    01     0.00580
+1854    02     0.00580
+1854    03     0.00580
+1854    04     0.00580
+1854    05     0.00580
+1854    06     0.00580
+1854    07     0.00580
+1854    08     0.00580
+1854    09     0.00580
+1854    10     0.00580
+1854    11     0.00580
+1854    12     0.00580
+1855    01     0.00592
+1855    02     0.00592
+1855    03     0.00592
+1855    04     0.00592
+1855    05     0.00592
+1855    06     0.00592
+1855    07     0.00592
+1855    08     0.00592
+1855    09     0.00592
+1855    10     0.00592
+1855    11     0.00592
+1855    12     0.00592
+1856    01     0.00631
+1856    02     0.00631
+1856    03     0.00631
+1856    04     0.00631
+1856    05     0.00631
+1856    06     0.00631
+1856    07     0.00631
+1856    08     0.00631
+1856    09     0.00631
+1856    10     0.00631
+1856    11     0.00631
+1856    12     0.00631
+1857    01     0.00637
+1857    02     0.00637
+1857    03     0.00637
+1857    04     0.00637
+1857    05     0.00637
+1857    06     0.00637
+1857    07     0.00637
+1857    08     0.00637
+1857    09     0.00637
+1857    10     0.00637
+1857    11     0.00637
+1857    12     0.00637
+1858    01     0.00646
+1858    02     0.00646
+1858    03     0.00646
+1858    04     0.00646
+1858    05     0.00646
+1858    06     0.00646
+1858    07     0.00646
+1858    08     0.00646
+1858    09     0.00646
+1858    10     0.00646
+1858    11     0.00646
+1858    12     0.00646
+1859    01     0.00685
+1859    02     0.00685
+1859    03     0.00685
+1859    04     0.00685
+1859    05     0.00685
+1859    06     0.00685
+1859    07     0.00685
+1859    08     0.00685
+1859    09     0.00685
+1859    10     0.00685
+1859    11     0.00685
+1859    12     0.00685
+1860    01     0.00752
+1860    02     0.00752
+1860    03     0.00752
+1860    04     0.00752
+1860    05     0.00752
+1860    06     0.00752
+1860    07     0.00752
+1860    08     0.00752
+1860    09     0.00752
+1860    10     0.00752
+1860    11     0.00752
+1860    12     0.00752
+1861    01     0.00791
+1861    02     0.00791
+1861    03     0.00791
+1861    04     0.00791
+1861    05     0.00791
+1861    06     0.00791
+1861    07     0.00791
+1861    08     0.00791
+1861    09     0.00791
+1861    10     0.00791
+1861    11     0.00791
+1861    12     0.00791
+1862    01     0.00805
+1862    02     0.00805
+1862    03     0.00805
+1862    04     0.00805
+1862    05     0.00805
+1862    06     0.00805
+1862    07     0.00805
+1862    08     0.00805
+1862    09     0.00805
+1862    10     0.00805
+1862    11     0.00805
+1862    12     0.00805
+1863    01     0.00860
+1863    02     0.00860
+1863    03     0.00860
+1863    04     0.00860
+1863    05     0.00860
+1863    06     0.00860
+1863    07     0.00860
+1863    08     0.00860
+1863    09     0.00860
+1863    10     0.00860
+1863    11     0.00860
+1863    12     0.00860
+1864    01     0.00926
+1864    02     0.00926
+1864    03     0.00926
+1864    04     0.00926
+1864    05     0.00926
+1864    06     0.00926
+1864    07     0.00926
+1864    08     0.00926
+1864    09     0.00926
+1864    10     0.00926
+1864    11     0.00926
+1864    12     0.00926
+1865    01     0.00983
+1865    02     0.00983
+1865    03     0.00983
+1865    04     0.00983
+1865    05     0.00983
+1865    06     0.00983
+1865    07     0.00983
+1865    08     0.00983
+1865    09     0.00983
+1865    10     0.00983
+1865    11     0.00983
+1865    12     0.00983
+1866    01     0.01014
+1866    02     0.01014
+1866    03     0.01014
+1866    04     0.01014
+1866    05     0.01014
+1866    06     0.01014
+1866    07     0.01014
+1866    08     0.01014
+1866    09     0.01014
+1866    10     0.01014
+1866    11     0.01014
+1866    12     0.01014
+1867    01     0.01087
+1867    02     0.01087
+1867    03     0.01087
+1867    04     0.01087
+1867    05     0.01087
+1867    06     0.01087
+1867    07     0.01087
+1867    08     0.01087
+1867    09     0.01087
+1867    10     0.01087
+1867    11     0.01087
+1867    12     0.01087
+1868    01     0.01116
+1868    02     0.01116
+1868    03     0.01116
+1868    04     0.01116
+1868    05     0.01116
+1868    06     0.01116
+1868    07     0.01116
+1868    08     0.01116
+1868    09     0.01116
+1868    10     0.01116
+1868    11     0.01116
+1868    12     0.01116
+1869    01     0.01185
+1869    02     0.01185
+1869    03     0.01185
+1869    04     0.01185
+1869    05     0.01185
+1869    06     0.01185
+1869    07     0.01185
+1869    08     0.01185
+1869    09     0.01185
+1869    10     0.01185
+1869    11     0.01185
+1869    12     0.01185
+1870    01     0.01211
+1870    02     0.01211
+1870    03     0.01211
+1870    04     0.01211
+1870    05     0.01211
+1870    06     0.01211
+1870    07     0.01211
+1870    08     0.01211
+1870    09     0.01211
+1870    10     0.01211
+1870    11     0.01211
+1870    12     0.01211
+1871    01     0.01288
+1871    02     0.01288
+1871    03     0.01288
+1871    04     0.01288
+1871    05     0.01288
+1871    06     0.01288
+1871    07     0.01288
+1871    08     0.01288
+1871    09     0.01288
+1871    10     0.01288
+1871    11     0.01288
+1871    12     0.01288
+1872    01     0.01425
+1872    02     0.01425
+1872    03     0.01425
+1872    04     0.01425
+1872    05     0.01425
+1872    06     0.01425
+1872    07     0.01425
+1872    08     0.01425
+1872    09     0.01425
+1872    10     0.01425
+1872    11     0.01425
+1872    12     0.01425
+1873    01     0.01513
+1873    02     0.01513
+1873    03     0.01513
+1873    04     0.01513
+1873    05     0.01513
+1873    06     0.01513
+1873    07     0.01513
+1873    08     0.01513
+1873    09     0.01513
+1873    10     0.01513
+1873    11     0.01513
+1873    12     0.01513
+1874    01     0.01417
+1874    02     0.01417
+1874    03     0.01417
+1874    04     0.01417
+1874    05     0.01417
+1874    06     0.01417
+1874    07     0.01417
+1874    08     0.01417
+1874    09     0.01417
+1874    10     0.01417
+1874    11     0.01417
+1874    12     0.01417
+1875    01     0.01537
+1875    02     0.01537
+1875    03     0.01537
+1875    04     0.01537
+1875    05     0.01537
+1875    06     0.01537
+1875    07     0.01537
+1875    08     0.01537
+1875    09     0.01537
+1875    10     0.01537
+1875    11     0.01537
+1875    12     0.01537
+1876    01     0.01559
+1876    02     0.01559
+1876    03     0.01559
+1876    04     0.01559
+1876    05     0.01559
+1876    06     0.01559
+1876    07     0.01559
+1876    08     0.01559
+1876    09     0.01559
+1876    10     0.01559
+1876    11     0.01559
+1876    12     0.01559
+1877    01     0.01590
+1877    02     0.01590
+1877    03     0.01590
+1877    04     0.01590
+1877    05     0.01590
+1877    06     0.01590
+1877    07     0.01590
+1877    08     0.01590
+1877    09     0.01590
+1877    10     0.01590
+1877    11     0.01590
+1877    12     0.01590
+1878    01     0.01602
+1878    02     0.01602
+1878    03     0.01602
+1878    04     0.01602
+1878    05     0.01602
+1878    06     0.01602
+1878    07     0.01602
+1878    08     0.01602
+1878    09     0.01602
+1878    10     0.01602
+1878    11     0.01602
+1878    12     0.01602
+1879    01     0.01717
+1879    02     0.01717
+1879    03     0.01717
+1879    04     0.01717
+1879    05     0.01717
+1879    06     0.01717
+1879    07     0.01717
+1879    08     0.01717
+1879    09     0.01717
+1879    10     0.01717
+1879    11     0.01717
+1879    12     0.01717
+1880    01     0.01942
+1880    02     0.01942
+1880    03     0.01942
+1880    04     0.01942
+1880    05     0.01942
+1880    06     0.01942
+1880    07     0.01942
+1880    08     0.01942
+1880    09     0.01942
+1880    10     0.01942
+1880    11     0.01942
+1880    12     0.01942
+1881    01     0.02007
+1881    02     0.02007
+1881    03     0.02007
+1881    04     0.02007
+1881    05     0.02007
+1881    06     0.02007
+1881    07     0.02007
+1881    08     0.02007
+1881    09     0.02007
+1881    10     0.02007
+1881    11     0.02007
+1881    12     0.02007
+1882    01     0.02120
+1882    02     0.02120
+1882    03     0.02120
+1882    04     0.02120
+1882    05     0.02120
+1882    06     0.02120
+1882    07     0.02120
+1882    08     0.02120
+1882    09     0.02120
+1882    10     0.02120
+1882    11     0.02120
+1882    12     0.02120
+1883    01     0.02255
+1883    02     0.02255
+1883    03     0.02255
+1883    04     0.02255
+1883    05     0.02255
+1883    06     0.02255
+1883    07     0.02255
+1883    08     0.02255
+1883    09     0.02255
+1883    10     0.02255
+1883    11     0.02255
+1883    12     0.02255
+1884    01     0.02280
+1884    02     0.02280
+1884    03     0.02280
+1884    04     0.02280
+1884    05     0.02280
+1884    06     0.02280
+1884    07     0.02280
+1884    08     0.02280
+1884    09     0.02280
+1884    10     0.02280
+1884    11     0.02280
+1884    12     0.02280
+1885    01     0.02297
+1885    02     0.02297
+1885    03     0.02297
+1885    04     0.02297
+1885    05     0.02297
+1885    06     0.02297
+1885    07     0.02297
+1885    08     0.02297
+1885    09     0.02297
+1885    10     0.02297
+1885    11     0.02297
+1885    12     0.02297
+1886    01     0.02333
+1886    02     0.02333
+1886    03     0.02333
+1886    04     0.02333
+1886    05     0.02333
+1886    06     0.02333
+1886    07     0.02333
+1886    08     0.02333
+1886    09     0.02333
+1886    10     0.02333
+1886    11     0.02333
+1886    12     0.02333
+1887    01     0.02450
+1887    02     0.02450
+1887    03     0.02450
+1887    04     0.02450
+1887    05     0.02450
+1887    06     0.02450
+1887    07     0.02450
+1887    08     0.02450
+1887    09     0.02450
+1887    10     0.02450
+1887    11     0.02450
+1887    12     0.02450
+1888    01     0.02712
+1888    02     0.02712
+1888    03     0.02712
+1888    04     0.02712
+1888    05     0.02712
+1888    06     0.02712
+1888    07     0.02712
+1888    08     0.02712
+1888    09     0.02712
+1888    10     0.02712
+1888    11     0.02712
+1888    12     0.02712
+1889    01     0.02711
+1889    02     0.02711
+1889    03     0.02711
+1889    04     0.02711
+1889    05     0.02711
+1889    06     0.02711
+1889    07     0.02711
+1889    08     0.02711
+1889    09     0.02711
+1889    10     0.02711
+1889    11     0.02711
+1889    12     0.02711
+1890    01     0.02954
+1890    02     0.02954
+1890    03     0.02954
+1890    04     0.02954
+1890    05     0.02954
+1890    06     0.02954
+1890    07     0.02954
+1890    08     0.02954
+1890    09     0.02954
+1890    10     0.02954
+1890    11     0.02954
+1890    12     0.02954
+1891    01     0.03092
+1891    02     0.03092
+1891    03     0.03092
+1891    04     0.03092
+1891    05     0.03092
+1891    06     0.03092
+1891    07     0.03092
+1891    08     0.03092
+1891    09     0.03092
+1891    10     0.03092
+1891    11     0.03092
+1891    12     0.03092
+1892    01     0.03117
+1892    02     0.03117
+1892    03     0.03117
+1892    04     0.03117
+1892    05     0.03117
+1892    06     0.03117
+1892    07     0.03117
+1892    08     0.03117
+1892    09     0.03117
+1892    10     0.03117
+1892    11     0.03117
+1892    12     0.03117
+1893    01     0.03080
+1893    02     0.03080
+1893    03     0.03080
+1893    04     0.03080
+1893    05     0.03080
+1893    06     0.03080
+1893    07     0.03080
+1893    08     0.03080
+1893    09     0.03080
+1893    10     0.03080
+1893    11     0.03080
+1893    12     0.03080
+1894    01     0.03187
+1894    02     0.03187
+1894    03     0.03187
+1894    04     0.03187
+1894    05     0.03187
+1894    06     0.03187
+1894    07     0.03187
+1894    08     0.03187
+1894    09     0.03187
+1894    10     0.03187
+1894    11     0.03187
+1894    12     0.03187
+1895    01     0.03380
+1895    02     0.03380
+1895    03     0.03380
+1895    04     0.03380
+1895    05     0.03380
+1895    06     0.03380
+1895    07     0.03380
+1895    08     0.03380
+1895    09     0.03380
+1895    10     0.03380
+1895    11     0.03380
+1895    12     0.03380
+1896    01     0.03490
+1896    02     0.03490
+1896    03     0.03490
+1896    04     0.03490
+1896    05     0.03490
+1896    06     0.03490
+1896    07     0.03490
+1896    08     0.03490
+1896    09     0.03490
+1896    10     0.03490
+1896    11     0.03490
+1896    12     0.03490
+1897    01     0.03655
+1897    02     0.03655
+1897    03     0.03655
+1897    04     0.03655
+1897    05     0.03655
+1897    06     0.03655
+1897    07     0.03655
+1897    08     0.03655
+1897    09     0.03655
+1897    10     0.03655
+1897    11     0.03655
+1897    12     0.03655
+1898    01     0.03855
+1898    02     0.03855
+1898    03     0.03855
+1898    04     0.03855
+1898    05     0.03855
+1898    06     0.03855
+1898    07     0.03855
+1898    08     0.03855
+1898    09     0.03855
+1898    10     0.03855
+1898    11     0.03855
+1898    12     0.03855
+1899    01     0.04212
+1899    02     0.04212
+1899    03     0.04212
+1899    04     0.04212
+1899    05     0.04212
+1899    06     0.04212
+1899    07     0.04212
+1899    08     0.04212
+1899    09     0.04212
+1899    10     0.04212
+1899    11     0.04212
+1899    12     0.04212
+1900    01     0.04443
+1900    02     0.04443
+1900    03     0.04443
+1900    04     0.04443
+1900    05     0.04443
+1900    06     0.04443
+1900    07     0.04443
+1900    08     0.04443
+1900    09     0.04443
+1900    10     0.04443
+1900    11     0.04443
+1900    12     0.04443
+1901    01     0.04590
+1901    02     0.04590
+1901    03     0.04590
+1901    04     0.04590
+1901    05     0.04590
+1901    06     0.04590
+1901    07     0.04590
+1901    08     0.04590
+1901    09     0.04590
+1901    10     0.04590
+1901    11     0.04590
+1901    12     0.04590
+1902    01     0.04706
+1902    02     0.04706
+1902    03     0.04706
+1902    04     0.04706
+1902    05     0.04706
+1902    06     0.04706
+1902    07     0.04706
+1902    08     0.04706
+1902    09     0.04706
+1902    10     0.04706
+1902    11     0.04706
+1902    12     0.04706
+1903    01     0.05134
+1903    02     0.05134
+1903    03     0.05134
+1903    04     0.05134
+1903    05     0.05134
+1903    06     0.05134
+1903    07     0.05134
+1903    08     0.05134
+1903    09     0.05134
+1903    10     0.05134
+1903    11     0.05134
+1903    12     0.05134
+1904    01     0.05188
+1904    02     0.05188
+1904    03     0.05188
+1904    04     0.05188
+1904    05     0.05188
+1904    06     0.05188
+1904    07     0.05188
+1904    08     0.05188
+1904    09     0.05188
+1904    10     0.05188
+1904    11     0.05188
+1904    12     0.05188
+1905    01     0.05524
+1905    02     0.05524
+1905    03     0.05524
+1905    04     0.05524
+1905    05     0.05524
+1905    06     0.05524
+1905    07     0.05524
+1905    08     0.05524
+1905    09     0.05524
+1905    10     0.05524
+1905    11     0.05524
+1905    12     0.05524
+1906    01     0.05802
+1906    02     0.05802
+1906    03     0.05802
+1906    04     0.05802
+1906    05     0.05802
+1906    06     0.05802
+1906    07     0.05802
+1906    08     0.05802
+1906    09     0.05802
+1906    10     0.05802
+1906    11     0.05802
+1906    12     0.05802
+1907    01     0.06561
+1907    02     0.06561
+1907    03     0.06561
+1907    04     0.06561
+1907    05     0.06561
+1907    06     0.06561
+1907    07     0.06561
+1907    08     0.06561
+1907    09     0.06561
+1907    10     0.06561
+1907    11     0.06561
+1907    12     0.06561
+1908    01     0.06313
+1908    02     0.06313
+1908    03     0.06313
+1908    04     0.06313
+1908    05     0.06313
+1908    06     0.06313
+1908    07     0.06313
+1908    08     0.06313
+1908    09     0.06313
+1908    10     0.06313
+1908    11     0.06313
+1908    12     0.06313
+1909    01     0.06562
+1909    02     0.06562
+1909    03     0.06562
+1909    04     0.06562
+1909    05     0.06562
+1909    06     0.06562
+1909    07     0.06562
+1909    08     0.06562
+1909    09     0.06562
+1909    10     0.06562
+1909    11     0.06562
+1909    12     0.06562
+1910    01     0.06882
+1910    02     0.06882
+1910    03     0.06882
+1910    04     0.06882
+1910    05     0.06882
+1910    06     0.06882
+1910    07     0.06882
+1910    08     0.06882
+1910    09     0.06882
+1910    10     0.06882
+1910    11     0.06882
+1910    12     0.06882
+1911    01     0.07008
+1911    02     0.07008
+1911    03     0.07008
+1911    04     0.07008
+1911    05     0.07008
+1911    06     0.07008
+1911    07     0.07008
+1911    08     0.07008
+1911    09     0.07008
+1911    10     0.07008
+1911    11     0.07008
+1911    12     0.07008
+1912    01     0.07339
+1912    02     0.07339
+1912    03     0.07339
+1912    04     0.07339
+1912    05     0.07339
+1912    06     0.07339
+1912    07     0.07339
+1912    08     0.07339
+1912    09     0.07339
+1912    10     0.07339
+1912    11     0.07339
+1912    12     0.07339
+1913    01     0.07941
+1913    02     0.07941
+1913    03     0.07941
+1913    04     0.07941
+1913    05     0.07941
+1913    06     0.07941
+1913    07     0.07941
+1913    08     0.07941
+1913    09     0.07941
+1913    10     0.07941
+1913    11     0.07941
+1913    12     0.07941
+1914    01     0.07205
+1914    02     0.07205
+1914    03     0.07205
+1914    04     0.07205
+1914    05     0.07205
+1914    06     0.07205
+1914    07     0.07205
+1914    08     0.07205
+1914    09     0.07205
+1914    10     0.07205
+1914    11     0.07205
+1914    12     0.07205
+1915    01     0.07108
+1915    02     0.07108
+1915    03     0.07108
+1915    04     0.07108
+1915    05     0.07108
+1915    06     0.07108
+1915    07     0.07108
+1915    08     0.07108
+1915    09     0.07108
+1915    10     0.07108
+1915    11     0.07108
+1915    12     0.07108
+1916    01     0.07670
+1916    02     0.07670
+1916    03     0.07670
+1916    04     0.07670
+1916    05     0.07670
+1916    06     0.07670
+1916    07     0.07670
+1916    08     0.07670
+1916    09     0.07670
+1916    10     0.07670
+1916    11     0.07670
+1916    12     0.07670
+1917    01     0.08025
+1917    02     0.08025
+1917    03     0.08025
+1917    04     0.08025
+1917    05     0.08025
+1917    06     0.08025
+1917    07     0.08025
+1917    08     0.08025
+1917    09     0.08025
+1917    10     0.08025
+1917    11     0.08025
+1917    12     0.08025
+1918    01     0.07916
+1918    02     0.07916
+1918    03     0.07916
+1918    04     0.07916
+1918    05     0.07916
+1918    06     0.07916
+1918    07     0.07916
+1918    08     0.07916
+1918    09     0.07916
+1918    10     0.07916
+1918    11     0.07916
+1918    12     0.07916
+1919    01     0.06861
+1919    02     0.06861
+1919    03     0.06861
+1919    04     0.06861
+1919    05     0.06861
+1919    06     0.06861
+1919    07     0.06861
+1919    08     0.06861
+1919    09     0.06861
+1919    10     0.06861
+1919    11     0.06861
+1919    12     0.06861
+1920    01     0.07978
+1920    02     0.07978
+1920    03     0.07978
+1920    04     0.07978
+1920    05     0.07978
+1920    06     0.07978
+1920    07     0.07978
+1920    08     0.07978
+1920    09     0.07978
+1920    10     0.07978
+1920    11     0.07978
+1920    12     0.07978
+1921    01     0.07000
+1921    02     0.07000
+1921    03     0.07000
+1921    04     0.07000
+1921    05     0.07000
+1921    06     0.07000
+1921    07     0.07000
+1921    08     0.07000
+1921    09     0.07000
+1921    10     0.07000
+1921    11     0.07000
+1921    12     0.07000
+1922    01     0.07340
+1922    02     0.07340
+1922    03     0.07340
+1922    04     0.07340
+1922    05     0.07340
+1922    06     0.07340
+1922    07     0.07340
+1922    08     0.07340
+1922    09     0.07340
+1922    10     0.07340
+1922    11     0.07340
+1922    12     0.07340
+1923    01     0.08328
+1923    02     0.08328
+1923    03     0.08328
+1923    04     0.08328
+1923    05     0.08328
+1923    06     0.08328
+1923    07     0.08328
+1923    08     0.08328
+1923    09     0.08328
+1923    10     0.08328
+1923    11     0.08328
+1923    12     0.08328
+1924    01     0.08355
+1924    02     0.08355
+1924    03     0.08355
+1924    04     0.08355
+1924    05     0.08355
+1924    06     0.08355
+1924    07     0.08355
+1924    08     0.08355
+1924    09     0.08355
+1924    10     0.08355
+1924    11     0.08355
+1924    12     0.08355
+1925    01     0.08413
+1925    02     0.08413
+1925    03     0.08413
+1925    04     0.08413
+1925    05     0.08413
+1925    06     0.08413
+1925    07     0.08413
+1925    08     0.08413
+1925    09     0.08413
+1925    10     0.08413
+1925    11     0.08413
+1925    12     0.08413
+1926    01     0.08283
+1926    02     0.08283
+1926    03     0.08283
+1926    04     0.08283
+1926    05     0.08283
+1926    06     0.08283
+1926    07     0.08283
+1926    08     0.08283
+1926    09     0.08283
+1926    10     0.08283
+1926    11     0.08283
+1926    12     0.08283
+1927    01     0.09046
+1927    02     0.09046
+1927    03     0.09046
+1927    04     0.09046
+1927    05     0.09046
+1927    06     0.09046
+1927    07     0.09046
+1927    08     0.09046
+1927    09     0.09046
+1927    10     0.09046
+1927    11     0.09046
+1927    12     0.09046
+1928    01     0.09077
+1928    02     0.09077
+1928    03     0.09077
+1928    04     0.09077
+1928    05     0.09077
+1928    06     0.09077
+1928    07     0.09077
+1928    08     0.09077
+1928    09     0.09077
+1928    10     0.09077
+1928    11     0.09077
+1928    12     0.09077
+1929    01     0.09759
+1929    02     0.09759
+1929    03     0.09759
+1929    04     0.09759
+1929    05     0.09759
+1929    06     0.09759
+1929    07     0.09759
+1929    08     0.09759
+1929    09     0.09759
+1929    10     0.09759
+1929    11     0.09759
+1929    12     0.09759
+1930    01     0.09022
+1930    02     0.09022
+1930    03     0.09022
+1930    04     0.09022
+1930    05     0.09022
+1930    06     0.09022
+1930    07     0.09022
+1930    08     0.09022
+1930    09     0.09022
+1930    10     0.09022
+1930    11     0.09022
+1930    12     0.09022
+1931    01     0.08058
+1931    02     0.08058
+1931    03     0.08058
+1931    04     0.08058
+1931    05     0.08058
+1931    06     0.08058
+1931    07     0.08058
+1931    08     0.08058
+1931    09     0.08058
+1931    10     0.08058
+1931    11     0.08058
+1931    12     0.08058
+1932    01     0.07270
+1932    02     0.07270
+1932    03     0.07270
+1932    04     0.07270
+1932    05     0.07270
+1932    06     0.07270
+1932    07     0.07270
+1932    08     0.07270
+1932    09     0.07270
+1932    10     0.07270
+1932    11     0.07270
+1932    12     0.07270
+1933    01     0.07655
+1933    02     0.07655
+1933    03     0.07655
+1933    04     0.07655
+1933    05     0.07655
+1933    06     0.07655
+1933    07     0.07655
+1933    08     0.07655
+1933    09     0.07655
+1933    10     0.07655
+1933    11     0.07655
+1933    12     0.07655
+1934    01     0.08328
+1934    02     0.08328
+1934    03     0.08328
+1934    04     0.08328
+1934    05     0.08328
+1934    06     0.08328
+1934    07     0.08328
+1934    08     0.08328
+1934    09     0.08328
+1934    10     0.08328
+1934    11     0.08328
+1934    12     0.08328
+1935    01     0.08748
+1935    02     0.08748
+1935    03     0.08748
+1935    04     0.08748
+1935    05     0.08748
+1935    06     0.08748
+1935    07     0.08748
+1935    08     0.08748
+1935    09     0.08748
+1935    10     0.08748
+1935    11     0.08748
+1935    12     0.08748
+1936    01     0.09606
+1936    02     0.09606
+1936    03     0.09606
+1936    04     0.09606
+1936    05     0.09606
+1936    06     0.09606
+1936    07     0.09606
+1936    08     0.09606
+1936    09     0.09606
+1936    10     0.09606
+1936    11     0.09606
+1936    12     0.09606
+1937    01     0.10287
+1937    02     0.10287
+1937    03     0.10287
+1937    04     0.10287
+1937    05     0.10287
+1937    06     0.10287
+1937    07     0.10287
+1937    08     0.10287
+1937    09     0.10287
+1937    10     0.10287
+1937    11     0.10287
+1937    12     0.10287
+1938    01     0.09700
+1938    02     0.09700
+1938    03     0.09700
+1938    04     0.09700
+1938    05     0.09700
+1938    06     0.09700
+1938    07     0.09700
+1938    08     0.09700
+1938    09     0.09700
+1938    10     0.09700
+1938    11     0.09700
+1938    12     0.09700
+1939    01     0.10242
+1939    02     0.10242
+1939    03     0.10242
+1939    04     0.10242
+1939    05     0.10242
+1939    06     0.10242
+1939    07     0.10242
+1939    08     0.10242
+1939    09     0.10242
+1939    10     0.10242
+1939    11     0.10242
+1939    12     0.10242
+1940    01     0.11154
+1940    02     0.11154
+1940    03     0.11154
+1940    04     0.11154
+1940    05     0.11154
+1940    06     0.11154
+1940    07     0.11154
+1940    08     0.11154
+1940    09     0.11154
+1940    10     0.11154
+1940    11     0.11154
+1940    12     0.11154
+1941    01     0.11428
+1941    02     0.11428
+1941    03     0.11428
+1941    04     0.11428
+1941    05     0.11428
+1941    06     0.11428
+1941    07     0.11428
+1941    08     0.11428
+1941    09     0.11428
+1941    10     0.11428
+1941    11     0.11428
+1941    12     0.11428
+1942    01     0.11463
+1942    02     0.11463
+1942    03     0.11463
+1942    04     0.11463
+1942    05     0.11463
+1942    06     0.11463
+1942    07     0.11463
+1942    08     0.11463
+1942    09     0.11463
+1942    10     0.11463
+1942    11     0.11463
+1942    12     0.11463
+1943    01     0.11864
+1943    02     0.11864
+1943    03     0.11864
+1943    04     0.11864
+1943    05     0.11864
+1943    06     0.11864
+1943    07     0.11864
+1943    08     0.11864
+1943    09     0.11864
+1943    10     0.11864
+1943    11     0.11864
+1943    12     0.11864
+1944    01     0.11784
+1944    02     0.11784
+1944    03     0.11784
+1944    04     0.11784
+1944    05     0.11784
+1944    06     0.11784
+1944    07     0.11784
+1944    08     0.11784
+1944    09     0.11784
+1944    10     0.11784
+1944    11     0.11784
+1944    12     0.11784
+1945    01     0.09856
+1945    02     0.09856
+1945    03     0.09856
+1945    04     0.09856
+1945    05     0.09856
+1945    06     0.09856
+1945    07     0.09856
+1945    08     0.09856
+1945    09     0.09856
+1945    10     0.09856
+1945    11     0.09856
+1945    12     0.09856
+1946    01     0.10759
+1946    02     0.10759
+1946    03     0.10759
+1946    04     0.10759
+1946    05     0.10759
+1946    06     0.10759
+1946    07     0.10759
+1946    08     0.10759
+1946    09     0.10759
+1946    10     0.10759
+1946    11     0.10759
+1946    12     0.10759
+1947    01     0.11910
+1947    02     0.11910
+1947    03     0.11910
+1947    04     0.11910
+1947    05     0.11910
+1947    06     0.11910
+1947    07     0.11910
+1947    08     0.11910
+1947    09     0.11910
+1947    10     0.11910
+1947    11     0.11910
+1947    12     0.11910
+1948    01     0.12530
+1948    02     0.12530
+1948    03     0.12530
+1948    04     0.12530
+1948    05     0.12530
+1948    06     0.12530
+1948    07     0.12530
+1948    08     0.12530
+1948    09     0.12530
+1948    10     0.12530
+1948    11     0.12530
+1948    12     0.12530
+1949    01     0.11929
+1949    02     0.11929
+1949    03     0.11929
+1949    04     0.11929
+1949    05     0.11929
+1949    06     0.11929
+1949    07     0.11929
+1949    08     0.11929
+1949    09     0.11929
+1949    10     0.11929
+1949    11     0.11929
+1949    12     0.11929
+1950    01     0.14254
+1950    02     0.13288
+1950    03     0.13844
+1950    04     0.12547
+1950    05     0.12480
+1950    06     0.12823
+1950    07     0.12979
+1950    08     0.12872
+1950    09     0.12622
+1950    10     0.13000
+1950    11     0.13141
+1950    12     0.14217
+1951    01     0.15935
+1951    02     0.14657
+1951    03     0.14810
+1951    04     0.13441
+1951    05     0.13222
+1951    06     0.13027
+1951    07     0.13662
+1951    08     0.13652
+1951    09     0.13530
+1951    10     0.14132
+1951    11     0.14085
+1951    12     0.15794
+1952    01     0.15159
+1952    02     0.14263
+1952    03     0.14879
+1952    04     0.13765
+1952    05     0.13726
+1952    06     0.13673
+1952    07     0.14019
+1952    08     0.14205
+1952    09     0.13916
+1952    10     0.14501
+1952    11     0.14389
+1952    12     0.15748
+1953    01     0.16150
+1953    02     0.15130
+1953    03     0.15798
+1953    04     0.14264
+1953    05     0.13798
+1953    06     0.13900
+1953    07     0.14448
+1953    08     0.14201
+1953    09     0.13874
+1953    10     0.14631
+1953    11     0.14672
+1953    12     0.16165
+1954    01     0.16274
+1954    02     0.14824
+1954    03     0.15601
+1954    04     0.14747
+1954    05     0.14321
+1954    06     0.14364
+1954    07     0.14835
+1954    08     0.14551
+1954    09     0.14580
+1954    10     0.14966
+1954    11     0.15296
+1954    12     0.16570
+1955    01     0.17489
+1955    02     0.16066
+1955    03     0.17040
+1955    04     0.15916
+1955    05     0.15753
+1955    06     0.15754
+1955    07     0.16206
+1955    08     0.16271
+1955    09     0.15875
+1955    10     0.16526
+1955    11     0.16975
+1955    12     0.18225
+1956    01     0.19891
+1956    02     0.17797
+1956    03     0.18326
+1956    04     0.16506
+1956    05     0.16554
+1956    06     0.16120
+1956    07     0.16987
+1956    08     0.16807
+1956    09     0.16650
+1956    10     0.17674
+1956    11     0.18014
+1956    12     0.19515
+1957    01     0.19233
+1957    02     0.17574
+1957    03     0.18620
+1957    04     0.17130
+1957    05     0.17455
+1957    06     0.17333
+1957    07     0.17941
+1957    08     0.17922
+1957    09     0.17465
+1957    10     0.18372
+1957    11     0.18318
+1957    12     0.20018
+1958    01     0.20399
+1958    02     0.18578
+1958    03     0.19684
+1958    04     0.18037
+1958    05     0.17910
+1958    06     0.17435
+1958    07     0.17993
+1958    08     0.18173
+1958    09     0.17834
+1958    10     0.18602
+1958    11     0.18856
+1958    12     0.20723
+1959    01     0.21650
+1959    02     0.19742
+1959    03     0.20628
+1959    04     0.19101
+1959    05     0.18853
+1959    06     0.18435
+1959    07     0.19125
+1959    08     0.19295
+1959    09     0.18788
+1959    10     0.19829
+1959    11     0.19904
+1959    12     0.21414
+1960    01     0.22003
+1960    02     0.20343
+1960    03     0.21871
+1960    04     0.20098
+1960    05     0.19659
+1960    06     0.19821
+1960    07     0.20283
+1960    08     0.20263
+1960    09     0.19895
+1960    10     0.20842
+1960    11     0.21132
+1960    12     0.23226
+1961    01     0.22145
+1961    02     0.20501
+1961    03     0.21897
+1961    04     0.20044
+1961    05     0.19788
+1961    06     0.19739
+1961    07     0.20320
+1961    08     0.20298
+1961    09     0.19990
+1961    10     0.20913
+1961    11     0.20972
+1961    12     0.23262
+1962    01     0.23263
+1962    02     0.21447
+1962    03     0.23114
+1962    04     0.20856
+1962    05     0.20389
+1962    06     0.20513
+1962    07     0.20702
+1962    08     0.21062
+1962    09     0.20466
+1962    10     0.21275
+1962    11     0.21745
+1962    12     0.23897
+1963    01     0.25173
+1963    02     0.22890
+1963    03     0.23960
+1963    04     0.21975
+1963    05     0.21415
+1963    06     0.21508
+1963    07     0.21858
+1963    08     0.21936
+1963    09     0.21833
+1963    10     0.22966
+1963    11     0.22872
+1963    12     0.25001
+1964    01     0.26367
+1964    02     0.23907
+1964    03     0.24564
+1964    04     0.23033
+1964    05     0.22285
+1964    06     0.22690
+1964    07     0.23369
+1964    08     0.23105
+1964    09     0.23182
+1964    10     0.24116
+1964    11     0.24041
+1964    12     0.26380
+1965    01     0.26961
+1965    02     0.24919
+1965    03     0.26443
+1965    04     0.24103
+1965    05     0.23849
+1965    06     0.23922
+1965    07     0.24427
+1965    08     0.24589
+1965    09     0.24054
+1965    10     0.25083
+1965    11     0.25314
+1965    12     0.26931
+1966    01     0.27757
+1966    02     0.26156
+1966    03     0.27639
+1966    04     0.25299
+1966    05     0.24907
+1966    06     0.25045
+1966    07     0.25721
+1966    08     0.25819
+1966    09     0.25031
+1966    10     0.25803
+1966    11     0.26634
+1966    12     0.28588
+1967    01     0.29057
+1967    02     0.26854
+1967    03     0.28371
+1967    04     0.26214
+1967    05     0.25662
+1967    06     0.25731
+1967    07     0.26185
+1967    08     0.26429
+1967    09     0.26004
+1967    10     0.27074
+1967    11     0.27184
+1967    12     0.29417
+1968    01     0.30937
+1968    02     0.28586
+1968    03     0.29983
+1968    04     0.27441
+1968    05     0.27032
+1968    06     0.27244
+1968    07     0.27511
+1968    08     0.27604
+1968    09     0.27467
+1968    10     0.28513
+1968    11     0.28733
+1968    12     0.31106
+1969    01     0.32687
+1969    02     0.30360
+1969    03     0.31995
+1969    04     0.29428
+1969    05     0.28947
+1969    06     0.29128
+1969    07     0.29507
+1969    08     0.29676
+1969    09     0.29160
+1969    10     0.30338
+1969    11     0.30576
+1969    12     0.33040
+1970    01     0.35044
+1970    02     0.32520
+1970    03     0.34326
+1970    04     0.32017
+1970    05     0.31528
+1970    06     0.31787
+1970    07     0.32351
+1970    08     0.32331
+1970    09     0.31418
+1970    10     0.32918
+1970    11     0.33251
+1970    12     0.35981
+1971    01     0.36660
+1971    02     0.33850
+1971    03     0.35976
+1971    04     0.33200
+1971    05     0.32836
+1971    06     0.32665
+1971    07     0.33442
+1971    08     0.33709
+1971    09     0.32410
+1971    10     0.34196
+1971    11     0.34696
+1971    12     0.37605
+1972    01     0.37912
+1972    02     0.35696
+1972    03     0.37960
+1972    04     0.34507
+1972    05     0.34246
+1972    06     0.34484
+1972    07     0.35058
+1972    08     0.35603
+1972    09     0.34233
+1972    10     0.35530
+1972    11     0.35720
+1972    12     0.39016
+1973    01     0.39642
+1973    02     0.37592
+1973    03     0.40179
+1973    04     0.36549
+1973    05     0.36229
+1973    06     0.36406
+1973    07     0.36994
+1973    08     0.37289
+1973    09     0.36206
+1973    10     0.37974
+1973    11     0.38227
+1973    12     0.41065
+1974    01     0.40205
+1974    02     0.37961
+1974    03     0.39627
+1974    04     0.36430
+1974    05     0.35815
+1974    06     0.35885
+1974    07     0.36762
+1974    08     0.36800
+1974    09     0.36202
+1974    10     0.37656
+1974    11     0.38110
+1974    12     0.41320
+1975    01     0.40312
+1975    02     0.37405
+1975    03     0.39671
+1975    04     0.36505
+1975    05     0.35863
+1975    06     0.35880
+1975    07     0.36848
+1975    08     0.37240
+1975    09     0.35946
+1975    10     0.37848
+1975    11     0.38342
+1975    12     0.41149
+1976    01     0.42405
+1976    02     0.39429
+1976    03     0.41667
+1976    04     0.38470
+1976    05     0.38014
+1976    06     0.37740
+1976    07     0.38619
+1976    08     0.39273
+1976    09     0.37698
+1976    10     0.40133
+1976    11     0.40265
+1976    12     0.44093
+1977    01     0.43427
+1977    02     0.40397
+1977    03     0.42718
+1977    04     0.39226
+1977    05     0.38731
+1977    06     0.39141
+1977    07     0.39709
+1977    08     0.39983
+1977    09     0.39052
+1977    10     0.41031
+1977    11     0.41519
+1977    12     0.45146
+1978    01     0.45106
+1978    02     0.41714
+1978    03     0.44740
+1978    04     0.41410
+1978    05     0.40291
+1978    06     0.40450
+1978    07     0.41344
+1978    08     0.41321
+1978    09     0.40805
+1978    10     0.42730
+1978    11     0.42823
+1978    12     0.46653
+1979    01     0.46495
+1979    02     0.42913
+1979    03     0.45497
+1979    04     0.42205
+1979    05     0.41534
+1979    06     0.41431
+1979    07     0.42716
+1979    08     0.42901
+1979    09     0.42001
+1979    10     0.43717
+1979    11     0.43900
+1979    12     0.47400
+1980    01     0.46589
+1980    02     0.42724
+1980    03     0.45960
+1980    04     0.42578
+1980    05     0.41192
+1980    06     0.41260
+1980    07     0.41933
+1980    08     0.42124
+1980    09     0.41393
+1980    10     0.43051
+1980    11     0.43968
+1980    12     0.47852
+1981    01     0.45338
+1981    02     0.41805
+1981    03     0.44170
+1981    04     0.40981
+1981    05     0.40115
+1981    06     0.40423
+1981    07     0.41149
+1981    08     0.41173
+1981    09     0.40181
+1981    10     0.42606
+1981    11     0.42592
+1981    12     0.46301
+1982    01     0.45253
+1982    02     0.41620
+1982    03     0.44602
+1982    04     0.40994
+1982    05     0.40217
+1982    06     0.40362
+1982    07     0.40991
+1982    08     0.41227
+1982    09     0.40062
+1982    10     0.41919
+1982    11     0.42760
+1982    12     0.45191
+1983    01     0.44717
+1983    02     0.41003
+1983    03     0.44927
+1983    04     0.41086
+1983    05     0.40281
+1983    06     0.40599
+1983    07     0.41005
+1983    08     0.42237
+1983    09     0.40992
+1983    10     0.42786
+1983    11     0.43369
+1983    12     0.47775
+1984    01     0.46924
+1984    02     0.43782
+1984    03     0.46739
+1984    04     0.42628
+1984    05     0.42004
+1984    06     0.41940
+1984    07     0.42130
+1984    08     0.43029
+1984    09     0.41423
+1984    10     0.43852
+1984    11     0.44366
+1984    12     0.46897
+1985    01     0.49039
+1985    02     0.45125
+1985    03     0.47511
+1985    04     0.43721
+1985    05     0.42990
+1985    06     0.42791
+1985    07     0.43784
+1985    08     0.44033
+1985    09     0.43260
+1985    10     0.45930
+1985    11     0.45762
+1985    12     0.50171
+1986    01     0.49250
+1986    02     0.45605
+1986    03     0.48126
+1986    04     0.44691
+1986    05     0.43774
+1986    06     0.43678
+1986    07     0.45002
+1986    08     0.44552
+1986    09     0.43707
+1986    10     0.46278
+1986    11     0.46216
+1986    12     0.50839
+1987    01     0.50518
+1987    02     0.46531
+1987    03     0.49902
+1987    04     0.45700
+1987    05     0.44995
+1987    06     0.45930
+1987    07     0.46630
+1987    08     0.46879
+1987    09     0.45651
+1987    10     0.48036
+1987    11     0.47931
+1987    12     0.52508
+1988    01     0.52287
+1988    02     0.49020
+1988    03     0.52344
+1988    04     0.47681
+1988    05     0.46679
+1988    06     0.47468
+1988    07     0.47848
+1988    08     0.48788
+1988    09     0.46872
+1988    10     0.49329
+1988    11     0.50313
+1988    12     0.54784
+1989    01     0.52160
+1989    02     0.48900
+1989    03     0.52893
+1989    04     0.48100
+1989    05     0.47522
+1989    06     0.47870
+1989    07     0.48225
+1989    08     0.49235
+1989    09     0.47963
+1989    10     0.50682
+1989    11     0.51321
+1989    12     0.56321
+1990    01     0.52825
+1990    02     0.48003
+1990    03     0.52435
+1990    04     0.48222
+1990    05     0.47486
+1990    06     0.47687
+1990    07     0.48079
+1990    08     0.49310
+1990    09     0.47797
+1990    10     0.50034
+1990    11     0.50422
+1990    12     0.54897
+1991    01     0.54627
+1991    02     0.50384
+1991    03     0.54382
+1991    04     0.50221
+1991    05     0.49971
+1991    06     0.49047
+1991    07     0.49777
+1991    08     0.49794
+1991    09     0.48224
+1991    10     0.51357
+1991    11     0.51524
+1991    12     0.55837
+1992    01     0.53393
+1992    02     0.49643
+1992    03     0.52687
+1992    04     0.48699
+1992    05     0.47703
+1992    06     0.47369
+1992    07     0.48599
+1992    08     0.48282
+1992    09     0.47853
+1992    10     0.50745
+1992    11     0.51389
+1992    12     0.55485
+1993    01     0.52888
+1993    02     0.50462
+1993    03     0.54321
+1993    04     0.49169
+1993    05     0.47737
+1993    06     0.48059
+1993    07     0.49303
+1993    08     0.49487
+1993    09     0.48453
+1993    10     0.51108
+1993    11     0.52403
+1993    12     0.56392
+1994    01     0.54106
+1994    02     0.50750
+1994    03     0.53564
+1994    04     0.49246
+1994    05     0.48723
+1994    06     0.48884
+1994    07     0.49166
+1994    08     0.50242
+1994    09     0.48732
+1994    10     0.51256
+1994    11     0.51646
+1994    12     0.55960
+1995    01     0.54184
+1995    02     0.51069
+1995    03     0.54924
+1995    04     0.49775
+1995    05     0.50171
+1995    06     0.49361
+1995    07     0.50327
+1995    08     0.51184
+1995    09     0.49449
+1995    10     0.51557
+1995    11     0.53151
+1995    12     0.58021
+1996    01     0.56457
+1996    02     0.53318
+1996    03     0.56069
+1996    04     0.51202
+1996    05     0.51159
+1996    06     0.50331
+1996    07     0.51931
+1996    08     0.52037
+1996    09     0.50864
+1996    10     0.53560
+1996    11     0.54387
+1996    12     0.58743
+1997    01     0.56862
+1997    02     0.51754
+1997    03     0.55221
+1997    04     0.51650
+1997    05     0.51358
+1997    06     0.50622
+1997    07     0.52732
+1997    08     0.52530
+1997    09     0.51648
+1997    10     0.54894
+1997    11     0.54996
+1997    12     0.59650
+1998    01     0.55336
+1998    02     0.51716
+1998    03     0.55550
+1998    04     0.50978
+1998    05     0.50603
+1998    06     0.50691
+1998    07     0.51977
+1998    08     0.51804
+1998    09     0.50830
+1998    10     0.52917
+1998    11     0.53637
+1998    12     0.58201
+1999    01     0.55720
+1999    02     0.51202
+1999    03     0.55864
+1999    04     0.51028
+1999    05     0.50580
+1999    06     0.50608
+1999    07     0.51848
+1999    08     0.52092
+1999    09     0.50601
+1999    10     0.52726
+1999    11     0.53895
+1999    12     0.58005
+2000    01     0.57314
+2000    02     0.55079
+2000    03     0.57086
+2000    04     0.51994
+2000    05     0.52341
+2000    06     0.52229
+2000    07     0.52676
+2000    08     0.54093
+2000    09     0.52664
+2000    10     0.54410
+2000    11     0.55450
+2000    12     0.60297
+2001    01     0.58647
+2001    02     0.54321
+2001    03     0.58069
+2001    04     0.53177
+2001    05     0.53513
+2001    06     0.52555
+2001    07     0.53887
+2001    08     0.54453
+2001    09     0.52289
+2001    10     0.54891
+2001    11     0.55360
+2001    12     0.59173
+2002    01     0.59298
+2002    02     0.54028
+2002    03     0.57896
+2002    04     0.53894
+2002    05     0.53658
+2002    06     0.53557
+2002    07     0.55276
+2002    08     0.55043
+2002    09     0.53663
+2002    10     0.57000
+2002    11     0.57302
+2002    12     0.61363
+2003    01     0.62731
+2003    02     0.58055
+2003    03     0.60857
+2003    04     0.56092
+2003    05     0.55414
+2003    06     0.55420
+2003    07     0.56987
+2003    08     0.57205
+2003    09     0.55958
+2003    10     0.59610
+2003    11     0.60060
+2003    12     0.65321
+2004    01     0.64882
+2004    02     0.61456
+2004    03     0.64419
+2004    04     0.59265
+2004    05     0.58759
+2004    06     0.58463
+2004    07     0.59878
+2004    08     0.59835
+2004    09     0.59342
+2004    10     0.61716
+2004    11     0.62511
+2004    12     0.68284
+2005    01     0.67566
+2005    02     0.61536
+2005    03     0.66544
+2005    04     0.61158
+2005    05     0.60571
+2005    06     0.61097
+2005    07     0.61800
+2005    08     0.62523
+2005    09     0.61036
+2005    10     0.62953
+2005    11     0.64066
+2005    12     0.70520
+2006    01     0.67556
+2006    02     0.63269
+2006    03     0.68363
+2006    04     0.62148
+2006    05     0.62526
+2006    06     0.62507
+2006    07     0.64087
+2006    08     0.64627
+2006    09     0.63042
+2006    10     0.65911
+2006    11     0.66051
+2006    12     0.71582
+2007    01     0.69849
+2007    02     0.65680
+2007    03     0.69762
+2007    04     0.64523
+2007    05     0.64697
+2007    06     0.65051
+2007    07     0.65709
+2007    08     0.67078
+2007    09     0.64786
+2007    10     0.67711
+2007    11     0.68544
+2007    12     0.73625
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_L19
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_L19	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_L19	(revision 2504)
@@ -0,0 +1,64 @@
+##  Cycle diurne  ou non                 
+cycle_diurne=y
+##  Soil Model  ou non               
+soil_model=y
+## Pas de temps de couplage (s).
+t_coupl=_AUTO_
+## Nombre  d'appels des routines de rayonnements ( par jour)                 
+nbapp_rad=12
+
+##  Facteur additif pour l'albedo
+pmagic=0.008
+
+#
+# Parametres "orbitaux/ ere geologique"
+#
+### R_ecc =      Excentricite
+R_ecc = 0.016715
+### R_peri =     Equinoxe
+R_peri = 102.7
+### R_incl =     Inclinaison
+R_incl = 23.441
+### solaire =    Constante solaire
+solaire = _AUTO_: DEFAULT = 1361.
+#
+# Taux gaz a effet de serre
+#
+### co2_ppm =    taux CO2 en ppm
+co2_ppm = _AUTO_: DEFAULT = 367.
+### CH4_ppb =    taux CH4 en ppb
+CH4_ppb = _AUTO_: DEFAULT = 1760.
+### N2O_ppb =    taux N2O en ppb
+N2O_ppb = _AUTO_: DEFAULT = 316.
+### CFC11_ppt =  taux CFC11 en ppt
+CFC11_ppt = _AUTO_: DEFAULT = 741.2
+### CFC12_ppt =  taux CFC12 en ppt
+CFC12_ppt = _AUTO_: DEFAULT = 535.
+#
+# Parametres effets directs/indirects des "aerosols"
+#
+### ok_ade=y/n   flag Aerosol direct effect
+ok_ade=_AUTO_
+### ok_aie=y/n   flag Aerosol indirect effect
+ok_aie=_AUTO_
+### aer_type =   Aerosol variation type : actuel / preind / scenario / annuel
+aer_type=actuel
+### aerosol coupling = online (y) or offline (n)
+aerosol_couple=_AUTO_
+###  flag_aerosol = type of coupled aerosol, if aerosol offline 
+###  0 => no aerosol, 1 => sulfate only, 2 => bc only, 3 => pom only, 4 => seasalt only, 5 => dust only, 6 => all aerosol
+flag_aerosol=_AUTO_
+### ok_cdnc=y/n   Cloud droplet number concentration
+ok_cdnc=_AUTO_
+### bl95_b0 =    Parameter in CDNC-maer link (Boucher&Lohmann 1995)
+bl95_b0=1.7
+### bl95_b1 =    Parameter in CDNC-maer link (Boucher&Lohmann 1995)
+bl95_b1=0.2
+#
+# Parametre de lecture de l'ozone
+#
+# Allowed values are 0, 1 and 2
+# 0: do not read an ozone climatology
+# 1: read a single ozone climatology that will be used day and night
+# 2: read two ozone climatologies, the average day and night climatology and the daylight climatology
+read_climoz=_AUTO_
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_actuel
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_actuel	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_actuel	(revision 2504)
@@ -0,0 +1,65 @@
+##  Cycle diurne  ou non                 
+cycle_diurne=y
+##  Soil Model  ou non               
+soil_model=y
+## Pas de temps de couplage (s).
+t_coupl=_AUTO_
+
+## Nombre  d'appels des routines de rayonnements ( par jour)                 
+nbapp_rad=24
+
+##  Facteur additif pour l'albedo
+pmagic=0.008
+
+#
+# Parametres "orbitaux/ ere geologique"
+#
+### R_ecc =      Excentricite
+R_ecc = 0.016715
+### R_peri =     Equinoxe
+R_peri = 102.7
+### R_incl =     Inclinaison
+R_incl = 23.441
+### solaire =    Constante solaire
+solaire = _AUTO_ : DEFAULT = 1366.0896
+#
+# Taux gaz a effet de serre
+#
+### co2_ppm =    taux CO2 en ppm
+co2_ppm = _AUTO_: DEFAULT = 0.36886500E+03
+### CH4_ppb =    taux CH4 en ppb
+CH4_ppb = _AUTO_ : DEFAULT = 0.17510225E+04
+### N2O_ppb =    taux N2O en ppb
+N2O_ppb = _AUTO_ : DEFAULT = 0.31585000E+03
+### CFC11_ppt =  taux CFC11 en ppt
+CFC11_ppt = _AUTO_ : DEFAULT = 5.18015181E+01
+### CFC12_ppt =  taux CFC12 en ppt
+CFC12_ppt = _AUTO_ : DEFAULT = 0.99862742E+03
+#
+# Parametres effets directs/indirects des "aerosols"
+#
+### ok_ade=y/n   flag Aerosol direct effect
+ok_ade=_AUTO_
+### ok_aie=y/n   flag Aerosol indirect effect
+ok_aie=_AUTO_
+### aer_type =   Aerosol variation type : actuel / preind / scenario / annuel
+aer_type=actuel
+### aerosol coupling = online (y) or offline (n)
+aerosol_couple=_AUTO_
+###  flag_aerosol = type of coupled aerosol, if aerosol offline 
+###  0 => no aerosol, 1 => sulfate only, 2 => bc only, 3 => pom only, 4 => seasalt only, 5 => dust only, 6 => all aerosol
+flag_aerosol=_AUTO_ 
+### ok_cdnc=y/n   Cloud droplet number concentration
+ok_cdnc=_AUTO_
+### bl95_b0 =    Parameter in CDNC-maer link (Boucher&Lohmann 1995)
+bl95_b0=1.7
+### bl95_b1 =    Parameter in CDNC-maer link (Boucher&Lohmann 1995)
+bl95_b1=0.2
+#
+# Parametre de lecture de l'ozone
+#
+# Allowed values are 0, 1 and 2
+# 0: do not read an ozone climatology
+# 1: read a single ozone climatology that will be used day and night
+# 2: read two ozone climatologies, the average day and night climatology and the daylight climatology
+read_climoz=_AUTO_
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_annuel
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_annuel	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_annuel	(revision 2504)
@@ -0,0 +1,65 @@
+##  Cycle diurne  ou non                 
+cycle_diurne=y
+##  Soil Model  ou non               
+soil_model=y
+## Pas de temps de couplage (s).
+t_coupl=_AUTO_
+
+## Nombre  d'appels des routines de rayonnements ( par jour)                 
+nbapp_rad=24
+
+##  Facteur additif pour l'albedo
+pmagic=0.0
+
+#
+# Parametres "orbitaux/ ere geologique"
+#
+### R_ecc =      Excentricite
+R_ecc = 0.016715
+### R_peri =     Equinoxe
+R_peri = 102.7
+### R_incl =     Inclinaison
+R_incl = 23.441
+### solaire =    Constante solaire
+solaire = _AUTO_ 
+#
+# Taux gaz a effet de serre
+#
+### co2_ppm =    taux CO2 en ppm
+co2_ppm = _AUTO_
+### CH4_ppb =    taux CH4 en ppb
+CH4_ppb = _AUTO_
+### N2O_ppb =    taux N2O en ppb
+N2O_ppb = _AUTO_
+### CFC11_ppt =  taux CFC11 en ppt
+CFC11_ppt = _AUTO_
+### CFC12_ppt =  taux CFC12 en ppt
+CFC12_ppt = _AUTO_
+#
+# Parametres effets directs/indirects des "aerosols"
+#
+### ok_ade=y/n   flag Aerosol direct effect
+ok_ade=_AUTO_
+### ok_aie=y/n   flag Aerosol indirect effect
+ok_aie=_AUTO_
+### aer_type =   Aerosol variation type : actuel / preind / scenario / annuel
+aer_type=annuel
+### aerosol coupling = online (y) or offline (n)
+aerosol_couple=_AUTO_
+###  flag_aerosol = type of coupled aerosol, if aerosol offline 
+###  0 => no aerosol, 1 => sulfate only, 2 => bc only, 3 => pom only, 4 => seasalt only, 5 => dust only, 6 => all aerosol
+flag_aerosol=_AUTO_ 
+### ok_cdnc=y/n   Cloud droplet number concentration
+ok_cdnc=_AUTO_
+### bl95_b0 =    Parameter in CDNC-maer link (Boucher&Lohmann 1995)
+bl95_b0=1.7
+### bl95_b1 =    Parameter in CDNC-maer link (Boucher&Lohmann 1995)
+bl95_b1=0.2
+#
+# Parametre de lecture de l'ozone
+#
+# Allowed values are 0, 1 and 2
+# 0: do not read an ozone climatology
+# 1: read a single ozone climatology that will be used day and night
+# 2: read two ozone climatologies, the average day and night climatology and the daylight climatology
+read_climoz=_AUTO_
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_preind
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_preind	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/config.def_preind	(revision 2504)
@@ -0,0 +1,67 @@
+##  Cycle diurne  ou non                 
+cycle_diurne=y
+
+## Pas de temps de couplage (s). 
+t_coupl=_AUTO_
+
+##  Soil Model  ou non               
+soil_model=y
+
+## Nombre  d'appels des routines de rayonnements ( par jour)                 
+nbapp_rad=24
+
+##  Facteur additif pour l'albedo
+pmagic=0.0
+
+#
+# Parametres "orbitaux/ ere geologique"
+#
+### R_ecc =      Excentricite
+R_ecc = 0.016715
+### R_peri =     Equinoxe
+R_peri = 102.7
+### R_incl =     Inclinaison
+R_incl = 23.441
+### solaire =    Constante solaire
+solaire = _AUTO_: DEFAULT = 1365.6537
+#
+# Taux gaz a effet de serre
+#
+### co2_ppm =    taux CO2 en ppm
+co2_ppm = _AUTO_: DEFAULT = 0.28472500E+03
+### CH4_ppb =    taux CH4 en ppb
+CH4_ppb = _AUTO_: DEFAULT = 0.79097924E+03
+### N2O_ppb =    taux N2O en ppb
+N2O_ppb = _AUTO_: DEFAULT = 0.27542506E+03
+### CFC11_ppt =  taux CFC11 en ppt
+CFC11_ppt = _AUTO_: DEFAULT = 0.
+### CFC12_ppt =  taux CFC12 en ppt
+CFC12_ppt = _AUTO_: DEFAULT = 0.
+#
+# Parametres effets directs/indirects des "aerosols"
+#
+### ok_ade=y/n   flag Aerosol direct effect
+ok_ade=_AUTO_
+### ok_aie=y/n   flag Aerosol indirect effect
+ok_aie=_AUTO_
+### aer_type =   Aerosol variation type : actuel / preind / scenario / annuel
+aer_type=preind
+### aerosol coupling = online (y) or offline (n)
+aerosol_couple=_AUTO_
+###  flag_aerosol = type of coupled aerosol, if aerosol offline 
+###  0 => no aerosol, 1 => sulfate only, 2 => bc only, 3 => pom only, 4 => seasalt only, 5 => dust only, 6 => all aerosol
+flag_aerosol=_AUTO_
+### ok_cdnc=y/n   Cloud droplet number concentration
+ok_cdnc=_AUTO_
+### bl95_b0 =    Parameter in CDNC-maer link (Boucher&Lohmann 1995)
+bl95_b0=1.7
+### bl95_b1 =    Parameter in CDNC-maer link (Boucher&Lohmann 1995)
+bl95_b1=0.2
+#
+# Parametre de lecture de l'ozone
+#
+# Allowed values are 0, 1 and 2
+# 0: do not read an ozone climatology
+# 1: read a single ozone climatology that will be used day and night
+# 2: read two ozone climatologies, the average day and night climatology and the daylight climatology
+read_climoz=_AUTO_
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/context_nemo.xml
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/context_nemo.xml	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/context_nemo.xml	(revision 2504)
@@ -0,0 +1,333 @@
+  <!-- =========================================================================================================== -->
+  <!-- NEMO context                                                                                                -->
+  <!-- =========================================================================================================== -->
+ <context id="nemo" time_origin="1900-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def_nemo.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition type="one_file" name="@expname@_@freq@" sync_freq="1d" min_digits="4">
+    
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".FALSE."/> <!-- 1h files -->
+     
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled="_1D_ENABLE_"> <!-- 1d files -->
+
+	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="sst"          name="sosstsst"  />
+	  <field field_ref="sss"          name="sosaline"  />
+	  <field field_ref="ssh"          name="sossheig"  />
+	  <field field_ref="empmr"        name="sowaflup"  />
+	  <field field_ref="qsr"          name="soshfldo"  />
+          <field field_ref="saltflx"      name="sosfldow"  />
+	  <field field_ref="qt"           name="sohefldo"  />
+	  <field field_ref="mldr10_1"     name="somxl010"  />
+	  <field field_ref="mldkz5"       name="somixhgt"  />
+	  <field field_ref="ice_cover"    name="soicecov"  />
+	  <field field_ref="wspd"         name="sowindsp"  />
+	  <field field_ref="erp"          name="sowafldp"  />
+	  <field field_ref="ist_ipa"      name="soicetem"  />
+	  <field field_ref="icealb_cea"   name="soicealb"  />   
+	</file>
+
+	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="uoce"         name="vozocrtx"  />
+	  <field field_ref="uoce_eiv"     name="vozoeivu"  />
+	  <field field_ref="utau"         name="sozotaux"  />
+	</file>
+	
+	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="voce"         name="vomecrty"  />
+	  <field field_ref="voce_eiv"     name="vomeeivv"  />
+	  <field field_ref="vtau"         name="sometauy"  />
+	</file>
+	
+      </file_group>
+
+      <file_group id="1m" output_freq="1mo" output_level="10" enabled="_1M_ENABLE_"> <!-- real monthly files -->
+
+	<file id="file4" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="sst"          name="sosstsst"  />
+	  <field field_ref="sss"          name="sosaline"  />
+	  <field field_ref="ssh"          name="sossheig"  />
+	  <field field_ref="toce"         name="votemper"  />
+	  <field field_ref="soce"         name="vosaline"  />
+	  <field field_ref="empmr"        name="sowaflup"  />
+	  <field field_ref="qsr"          name="soshfldo"  />
+          <field field_ref="saltflx"      name="sosfldow"  />
+	  <field field_ref="qt"           name="sohefldo"  />
+	  <field field_ref="mldr10_1"     name="somxl010"  />
+	  <field field_ref="mldkz5"       name="somixhgt"  />
+	  <field field_ref="ice_cover"    name="soicecov"  />
+	  <field field_ref="wspd"         name="sowindsp"  />
+	  <field field_ref="erp"          name="sowafldp"  />
+	  <field field_ref="ist_ipa"      name="soicetem"  />
+	  <field field_ref="icealb_cea"   name="soicealb"  />   
+	</file>
+
+	<file id="file5" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="uoce"         name="vozocrtx"  />
+	  <field field_ref="uoce_eiv"     name="vozoeivu"  />
+	  <field field_ref="utau"         name="sozotaux"  />
+	</file>
+	
+	<file id="file6" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="voce"         name="vomecrty"  />
+	  <field field_ref="voce_eiv"     name="vomeeivv"  />
+	  <field field_ref="vtau"         name="sometauy"  />
+	</file>
+
+	<file id="file7" name_suffix="_icemod" description="ice variables" >
+	  <field field_ref="ice_pres"                     />
+	  <field field_ref="snowthic_cea" name="isnowthi" />
+	  <field field_ref="icethic_cea"  name="iicethic" />
+	  <field field_ref="iceprod_cea"  name="iiceprod" />
+	  <field field_ref="ist_ipa"      name="iicetemp" />
+	  <field field_ref="uice_ipa"     name="iicevelu" />
+	  <field field_ref="vice_ipa"     name="iicevelv" />
+	  <field field_ref="utau_ice"     name="iicestru" />
+	  <field field_ref="vtau_ice"     name="iicestrv" />
+	  <field field_ref="qsr_io_cea"   name="iicesflx" />
+	  <field field_ref="qns_io_cea"   name="iicenflx" />
+	  <field field_ref="snowpre"      name="isnowpre" />
+	</file>
+
+    <file id="file8" name_suffix="_diaptr" description="diaptr variables" >
+       <field field_ref="zotemglo"   />
+       <field field_ref="zosalglo"     />
+       <field field_ref="zosrfglo"    />
+       <field field_ref="zomsfglo"    />
+       <field field_ref="zomsfeiv"    />
+       <field field_ref="zotematl"   />
+       <field field_ref="zosalatl"     />
+       <field field_ref="zosrfatl"    />
+       <field field_ref="zomsfatl"    />
+       <field field_ref="zotempac"   />
+       <field field_ref="zosalpac"     />
+       <field field_ref="zosrfpac"    />
+       <field field_ref="zomsfpac"    />
+       <field field_ref="zotemind"   />
+       <field field_ref="zosalind"     />
+       <field field_ref="zosrfind"    />
+       <field field_ref="zomsfind"    />
+       <field field_ref="zotemipc"   />
+       <field field_ref="zosalipc"     />
+       <field field_ref="zosrfipc"    />
+       <field field_ref="zomsfipc"     />
+       <field field_ref="sophtadv"      />
+       <field field_ref="sophteiv"      />
+       <field field_ref="sophtldf"      />
+       <field field_ref="sophtove"      />
+       <field field_ref="sohtatl"       />
+       <field field_ref="sohtpac"       />
+       <field field_ref="sohtind"       />
+       <field field_ref="sohtipc"       />
+       <field field_ref="sopstadv"      />
+       <field field_ref="sopsteiv"      />
+       <field field_ref="sopstldf"      />
+       <field field_ref="sopstove"      />
+       <field field_ref="sostatl"       />
+       <field field_ref="sostpac"       />
+       <field field_ref="sostind"       />
+       <field field_ref="sostipc"       />
+    </file>
+
+	<file id="file9" name_suffix="_ptrc_T" description="pisces sms variables" >
+       <field field_ref="DIC"      />
+       <field field_ref="Alkalini" />
+       <field field_ref="O2"       />
+       <field field_ref="CaCO3"    />
+       <field field_ref="PO4"      />
+       <field field_ref="POC"      />
+       <field field_ref="Si"       />
+       <field field_ref="PHY"      />
+       <field field_ref="ZOO"      />
+       <field field_ref="DOC"      />
+       <field field_ref="PHY2"     />
+       <field field_ref="ZOO2"     />
+       <field field_ref="DSi"      />
+       <field field_ref="Fer"      />
+       <field field_ref="BFe"      />
+       <field field_ref="GOC"      />
+       <field field_ref="SFe"      />
+       <field field_ref="DFe"      />
+       <field field_ref="GSi"      />
+       <field field_ref="NFe"      />
+       <field field_ref="NCHL"     />
+       <field field_ref="DCHL"     />
+       <field field_ref="NO3"      />
+       <field field_ref="NH4"      />
+	</file>
+	
+	<file id="file10" name_suffix="_diad_T" description="additional pisces diagnostics" >
+       <field field_ref="PH"       />
+       <field field_ref="CO3"      />
+       <field field_ref="CO3sat"   />
+       <field field_ref="PAR"      />
+       <field field_ref="PPPHY"    />
+       <field field_ref="PPPHY2"   />
+       <field field_ref="PPNEWN"   />
+       <field field_ref="PPNEWD"   />
+       <field field_ref="PBSi"     />
+       <field field_ref="PFeN"     />
+       <field field_ref="PFeD"     />
+       <field field_ref="xfracal"  />
+       <field field_ref="PCAL"     />
+       <field field_ref="DCAL"     />
+       <field field_ref="GRAZ1"    />
+       <field field_ref="GRAZ2"    />
+       <field field_ref="EPC100"   />
+       <field field_ref="EPFE100"  />
+       <field field_ref="EPSI100"  />
+       <field field_ref="EPCAL100" />
+       <field field_ref="Cflx"     />
+       <field field_ref="Oflx"     />
+       <field field_ref="Kg"       />
+       <field field_ref="Dpco2"    />
+       <field field_ref="Dpo2"     />
+       <field field_ref="Heup"     />
+       <field field_ref="Irondep"  />
+       <field field_ref="Ironsed"  />
+       <field field_ref="Ironice"  />
+       <field field_ref="Nfix"     />
+       <field field_ref="MuN"      />
+       <field field_ref="MuD"      />
+       <field field_ref="LNnut"    />
+       <field field_ref="LDnut"    />
+       <field field_ref="LNFe"     />
+       <field field_ref="LDFe"     />
+       <field field_ref="LNlight"  />
+       <field field_ref="LDlight"  />
+       <field field_ref="pdust"    />
+       <field field_ref="Fe3"     />
+       <field field_ref="FeL1"     />
+       <field field_ref="TL1"      />
+       <field field_ref="Sdenit"   />
+       <field field_ref="Totlig"   />
+	</file>
+
+    </file_group>
+
+      <file_group id="1y"  output_freq="1y" output_level="10" enabled="_1Y_ENABLE_"> <!-- real yearly files -->
+
+	<file id="file11" name_suffix="_ptrc_T" description="pisces sms variables" >
+       <field field_ref="DIC"      />
+       <field field_ref="Alkalini" />
+       <field field_ref="O2"       />
+       <field field_ref="CaCO3"    />
+       <field field_ref="PO4"      />
+       <field field_ref="POC"      />
+       <field field_ref="Si"       />
+       <field field_ref="PHY"      />
+       <field field_ref="ZOO"      />
+       <field field_ref="DOC"      />
+       <field field_ref="PHY2"     />
+       <field field_ref="ZOO2"     />
+       <field field_ref="DSi"      />
+       <field field_ref="Fer"      />
+       <field field_ref="BFe"      />
+       <field field_ref="GOC"      />
+       <field field_ref="SFe"      />
+       <field field_ref="DFe"      />
+       <field field_ref="GSi"      />
+       <field field_ref="NFe"      />
+       <field field_ref="NCHL"     />
+       <field field_ref="DCHL"     />
+       <field field_ref="NO3"      />
+       <field field_ref="NH4"      />
+	</file>
+
+	<file id="file12" name_suffix="_diad_T" description="additional pisces diagnostics" >
+       <field field_ref="PH"       />
+       <field field_ref="CO3"      />
+       <field field_ref="CO3sat"   />
+       <field field_ref="PAR"      />
+       <field field_ref="PPPHY"    />
+       <field field_ref="PPPHY2"   />
+       <field field_ref="PPNEWN"   />
+       <field field_ref="PPNEWD"   />
+       <field field_ref="PBSi"     />
+       <field field_ref="PFeN"     />
+       <field field_ref="PFeD"     />
+       <field field_ref="xfracal"  />
+       <field field_ref="PCAL"     />
+       <field field_ref="DCAL"     />
+       <field field_ref="GRAZ1"    />
+       <field field_ref="GRAZ2"    />
+       <field field_ref="EPC100"   />
+       <field field_ref="EPFE100"  />
+       <field field_ref="EPSI100"  />
+       <field field_ref="EPCAL100" />
+       <field field_ref="Cflx"     />
+       <field field_ref="Oflx"     />
+       <field field_ref="Kg"       />
+       <field field_ref="Dpco2"    />
+       <field field_ref="Dpo2"     />
+       <field field_ref="Heup"     />
+       <field field_ref="Irondep"  />
+       <field field_ref="Ironsed"  />
+       <field field_ref="Ironice"  />
+       <field field_ref="Nfix"     />
+       <field field_ref="MuN"      />
+       <field field_ref="MuD"      />
+       <field field_ref="LNnut"    />
+       <field field_ref="LDnut"    />
+       <field field_ref="LNFe"     />
+       <field field_ref="LDFe"     />
+       <field field_ref="LNlight"  />
+       <field field_ref="LDlight"  />
+       <field field_ref="pdust"    />
+       <field field_ref="Fe3"     />
+       <field field_ref="FeL1"     />
+       <field field_ref="TL1"      />
+       <field field_ref="Sdenit"   />
+       <field field_ref="Totlig"   />
+	</file>
+
+      </file_group>
+
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".FALSE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+   <axis_definition>  
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"  />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def_nemo.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>  
+  
+  </context>
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/cosp_input_nl.txt
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/cosp_input_nl.txt	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/cosp_input_nl.txt	(revision 2504)
@@ -0,0 +1,103 @@
+! (c) British Crown Copyright 2008, the Met Office.
+! All rights reserved.
+! 
+! Redistribution and use in source and binary forms, with or without modification, are permitted 
+! provided that the following conditions are met:
+! 
+!     * Redistributions of source code must retain the above copyright notice, this list 
+!       of conditions and the following disclaimer.
+!     * Redistributions in binary form must reproduce the above copyright notice, this list
+!       of conditions and the following disclaimer in the documentation and/or other materials 
+!       provided with the distribution.
+!     * Neither the name of the Met Office nor the names of its contributors may be used 
+!       to endorse or promote products derived from this software without specific prior written 
+!       permission.
+! 
+! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
+! IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+! FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+! CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 
+! IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 
+! OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+! Namelist that sets up the main COSP options
+&COSP_INPUT
+  CMOR_NL='./cmor/cosp_cmor_nl.txt', ! CMOR namelist
+  NPOINTS_IT=10000,! Max number of gridpoints to be processed in one iteration
+  NCOLUMNS=20,  ! Number of subcolumns
+  NLEVELS=39,   ! Number of model levels 
+  USE_VGRID=.true., ! Use fixed vertical grid for outputs? (if .true. then you need to define number of levels with Nlr)
+  NLR=40,       ! Number of levels in statistical outputs (only used if USE_VGRID=.true.)
+  CSAT_VGRID=.true., ! CloudSat vertical grid? (if .true. then the CloudSat standard grid is used for the outputs.
+                     !  USE_VGRID needs also be .true.)
+  FINPUT='histday.nc', ! NetCDF file with 1D inputs
+!  FINPUT='cosp_input_um_2d.nc', ! NetCDF file with 2D inputs
+  !----------------------------------------------------------------------------------
+  !--------------- Inputs related to radar simulations
+  !----------------------------------------------------------------------------------
+  RADAR_FREQ=94.0, ! CloudSat radar frequency (GHz)
+  SURFACE_RADAR=0, ! surface=1, spaceborne=0
+  use_mie_tables=0,! use a precomputed lookup table? yes=1,no=0
+  use_gas_abs=1,   ! include gaseous absorption? yes=1,no=0
+  do_ray=0,        ! calculate/output Rayleigh refl=1, not=0
+  melt_lay=0,      ! melting layer model off=0, on=1
+  k2=-1,           ! |K|^2, -1=use frequency dependent default
+  use_reff=.true., ! True if you want effective radius to be used by radar simulator (always used by lidar)
+  use_precipitation_fluxes=.true.,  ! True if precipitation fluxes are input to the algorithm 
+  !----------------------------------------------------------------------------------
+  !---------------- Inputs related to lidar simulations
+  !----------------------------------------------------------------------------------
+  Nprmts_max_hydro=12, ! Max number of parameters for hydrometeor size distributions
+  Naero=1,             ! Number of aerosol species (Not used)
+  Nprmts_max_aero=1,   ! Max number of parameters for aerosol size distributions (Not used)
+  lidar_ice_type=0,    ! Ice particle shape in lidar calculations (0=ice-spheres ; 1=ice-non-spherical)
+  OVERLAP=3,   !  overlap type: 1=max, 2=rand, 3=max/rand
+  !----------------------------------------------------------------------------------
+  !---------------- Inputs related to ISCCP simulator
+  !----------------------------------------------------------------------------------
+  ISCCP_TOPHEIGHT=1,  !  1 = adjust top height using both a computed
+                       !  infrared brightness temperature and the visible
+                       !  optical depth to adjust cloud top pressure. Note
+                       !  that this calculation is most appropriate to compare
+                       !  to ISCCP data during sunlit hours.
+                      !  2 = do not adjust top height, that is cloud top
+                       !  pressure is the actual cloud top pressure
+                       !  in the model
+                      !  3 = adjust top height using only the computed
+                       !  infrared brightness temperature. Note that this
+                       !  calculation is most appropriate to compare to ISCCP
+                       !  IR only algortihm (i.e. you can compare to nighttime
+                       !  ISCCP data with this option)
+  ISCCP_TOPHEIGHT_DIRECTION=2,   ! direction for finding atmosphere pressure level
+                                 ! with interpolated temperature equal to the radiance
+                                 ! determined cloud-top temperature
+                                 ! 1 = find the *lowest* altitude (highest pressure) level
+                                 ! with interpolated temperature equal to the radiance
+                                 ! determined cloud-top temperature
+                                 ! 2 = find the *highest* altitude (lowest pressure) level
+                                 ! with interpolated temperature equal to the radiance 
+                                 ! determined cloud-top temperature
+                                 ! ONLY APPLICABLE IF top_height EQUALS 1 or 3
+                                 ! 1 = default setting, and matches all versions of 
+                                 ! ISCCP simulator with versions numbers 3.5.1 and lower
+                                 ! 2 = experimental setting  
+  !----------------------------------------------------------------------------------
+  !-------------- RTTOV inputs
+  !----------------------------------------------------------------------------------
+  Platform=1,    ! satellite platform
+  Satellite=15,  ! satellite
+  Instrument=0,  ! instrument
+  Nchannels=8,   ! Number of channels to be computed
+  Channels=1,3,5,6,8,10,11,13,        ! Channel numbers (please be sure that you supply Nchannels)
+  Surfem=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,  ! Surface emissivity (please be sure that you supply Nchannels)
+  ZenAng=50.0, ! Satellite Zenith Angle
+  CO2=5.241e-04, ! Mixing ratios of trace gases
+  CH4=9.139e-07,
+  N2O=4.665e-07,
+  CO=2.098e-07
+/
+
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/cosp_output_nl.txt
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/cosp_output_nl.txt	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/cosp_output_nl.txt	(revision 2504)
@@ -0,0 +1,63 @@
+! (c) British Crown Copyright 2008, the Met Office.
+! All rights reserved.
+! 
+! Redistribution and use in source and binary forms, with or without modification, are permitted 
+! provided that the following conditions are met:
+! 
+!     * Redistributions of source code must retain the above copyright notice, this list 
+!       of conditions and the following disclaimer.
+!     * Redistributions in binary form must reproduce the above copyright notice, this list
+!       of conditions and the following disclaimer in the documentation and/or other materials 
+!       provided with the distribution.
+!     * Neither the name of the Met Office nor the names of its contributors may be used 
+!       to endorse or promote products derived from this software without specific prior written 
+!       permission.
+! 
+! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
+! IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+! FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+! CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 
+! IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 
+! OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+! Namelist that sets up output-related variables. It controls 
+! the instrument simulators to run and the list of variables 
+! to be written to file
+&COSP_OUTPUT
+  ! Simulator flags
+  Lradar_sim=.false.,
+  Llidar_sim=.true.,
+  Lisccp_sim=.true.,
+  Lmisr_sim=.false.,
+  ! Output variables
+  Lalbisccp=.true.,
+  Latb532=.false.,
+  Lboxptopisccp=.true.,
+  Lboxtauisccp=.true.,
+  Lcfad_dbze94=.false.,
+  Lcfad_lidarsr532=.true.,
+  Lclcalipso=.true.,
+  Lclhcalipso=.true.,
+  Lclisccp2=.true.,
+  Lcllcalipso=.true.,
+  Lclmcalipso=.true.,
+  Lcltcalipso=.true.,
+  Lctpisccp=.true.,
+  Ldbze94=.false.,
+  Ltauisccp=.true.,
+  Ltclisccp=.true.,
+  Llongitude=.false.,
+  Llatitude=.false.,
+  Lparasol_refl=.true.,
+  LclMISR=.false.,
+  Lmeantbisccp=.true.,
+  Lmeantbclrisccp=.true.,
+  ! Use lidar and radar
+  Lclcalipso2=.false.,
+  Lcltlidarradar=.false.,
+  ! These are provided for debugging or special purposes
+  Lfrac_out=.false.,
+  Lbeta_mol532=.false.,  
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/domain_def_nemo.xml
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/domain_def_nemo.xml	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/domain_def_nemo.xml	(revision 2504)
@@ -0,0 +1,180 @@
+
+   <domain_definition>
+      <domain_group id="grid_T">
+         <domain id="grid_T" long_name="grid T"/>
+	 <!--   My zoom: example of hand defined zoom   -->
+         <domain id="myzoom" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="5" zoom_nj="5" />
+         <domain id="1point" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="1" zoom_nj="1" />
+         <domain id="ptr" zoom_ibegin="0000"  zoom_jbegin="1" zoom_ni="1" zoom_nj="0000" />
+         <!--   Eq section   -->
+         <domain id="EqT" zoom_ibegin="1" zoom_jbegin="0000" zoom_ni="0000" zoom_nj="1" />
+         <!--   TAO   -->
+         <!--   137e   -->
+         <domain id="2n137eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5n137eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n137eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   147e   -->
+         <domain id="0n147eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2n147eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5n147eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   156e   -->
+         <domain id="5s156eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2s156eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n156eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2n156eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5n156eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n156eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   165e   -->
+         <domain id="8s165eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5s165eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2s165eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n165eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2n165eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5n165eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n165eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   180w   -->
+         <domain id="8s180wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5s180wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2s180wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n180wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2n180wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5n180wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n180wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   170w   -->
+         <domain id="8s170wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5s170wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2s170wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n170wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2n170wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5n170wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n170wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   155w   -->
+         <domain id="8s155wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5s155wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2s155wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n155wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2n155wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5n155wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n155wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   140w   -->
+         <domain id="8s140wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5s140wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2s140wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n140wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2n140wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5n140wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n140wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   125w   -->
+         <domain id="8s125wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5s125wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2s125wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n125wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2n125wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5n125wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n125wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   110w   -->
+         <domain id="8s110wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5s110wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2s110wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n110wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2n110wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5n110wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n110wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   95w   -->
+         <domain id="8s95wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5s95wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2s95wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n95wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="2n95wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5n95wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n95wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   RAMA   -->
+         <!--   55e   -->
+         <domain id="16s55eT"    zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="12s55eT"    zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8s55eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="4s55eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="1.5s55eT"   zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n55eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="1.5n55eT"   zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="4n55eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+            <!--   65e   -->
+         <domain id="15n65eT"    zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+            <!--   67e   -->
+         <domain id="16s67eT"    zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="12s67eT"    zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8s67eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="4s67eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="1.5s67eT"   zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n67eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="1.5n67eT"   zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="4n67eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n67eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   80.5e   -->
+         <domain id="16s80.5eT"  zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="12s80.5eT"  zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8s80.5eT"   zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="4s80.5eT"   zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="1.5s80.5eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n80.5eT"   zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="1.5n80.5eT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="4n80.5eT"   zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   90e   -->
+         <domain id="1.5s90eT"   zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n90eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="1.5n90eT"   zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="4n90eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n90eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="12n90eT"    zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="15n90eT"    zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   95e   -->
+         <domain id="16s95eT"    zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="12s95eT"    zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8s95eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="5s95eT"     zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   PIRATA   -->
+         <!--   38w-30w   -->
+         <domain id="19s34wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="14s32wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8s30wT"  zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n35wT"  zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="4n38wT"  zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="8n38wT"  zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="12n38wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="15n38wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="20n38wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   23w   -->
+         <domain id="0n23wT"  zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="4n23wT"  zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="12n23wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="21n23wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   10w   -->
+         <domain id="10s10wT" zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="6s10wT"  zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <domain id="0n10wT"  zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+         <!--   0e   -->
+         <domain id="0n0eT"   zoom_ibegin="0000" zoom_jbegin="0000" zoom_ni="1" zoom_nj="1" />
+      </domain_group>
+
+      <domain_group id="grid_U">
+         <domain id="grid_U" long_name="grid U"/>
+         <!--   Eq section   -->
+         <domain id="EqU" zoom_ibegin="1" zoom_jbegin="0000" zoom_ni="0000" zoom_nj="1" />
+      </domain_group>
+
+      <domain id="grid_V" long_name="grid V"/>
+      <domain_group id="grid_W">
+         <domain id="grid_W" long_name="grid W"/>
+         <!--   Eq section   -->
+         <domain id="EqW" zoom_ibegin="1" zoom_jbegin="0000" zoom_ni="0000" zoom_nj="1" />
+      </domain_group>
+
+      <domain_group id="scalarpoint">
+         <domain id="scalarpoint" long_name="scalar"/>
+         <!--
+         <domain id="1point" zoom_ibegin="1" zoom_jbegin="1" zoom_ni="1" zoom_nj="1" />
+         -->
+      </domain_group>
+
+   </domain_definition>    
+ 
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/field_def_nemo.xml
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/field_def_nemo.xml	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/field_def_nemo.xml	(revision 2504)
@@ -0,0 +1,750 @@
+<!--
+<?xml version="1.0"?>
+       -->
+ 
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+   <field_definition level="1" prec="4" operation="average" enabled=".TRUE." default_value="1.e20" > <!-- time step automaticaly defined -->
+
+      <!-- T grid -->
+      
+     <field_group id="grid_T" grid_ref="grid_T_2D" >
+         <field id="toce"         long_name="temperature"                               unit="degC" grid_ref="grid_T_3D"/>
+         <field id="soce"         long_name="salinity"                                  unit="psu"  grid_ref="grid_T_3D"/>
+         <field id="sst"          long_name="sea surface temperature"                   unit="degC"                     />
+         <field id="sst2"         long_name="square of sea surface temperature"         unit="degC2"                    />
+         <field id="sstgrad"      long_name="module of sst gradient"                    unit="degC/m"                   />
+         <field id="sstgrad2"     long_name="square of module of sst gradient"          unit="degC2/m2"                 />
+         <field id="sss"          long_name="sea surface salinity"                      unit="psu"                      />
+         <field id="sss2"         long_name="square of sea surface salinity"            unit="psu2"                     />
+         <field id="ssh"          long_name="sea surface height"                        unit="m"                        />
+         <field id="ssh2"         long_name="square of sea surface height"              unit="m2"                       />
+         <field id="mldkz5"       long_name="mixing layer depth (Turbocline)"           unit="m"                        />
+         <field id="mldr10_1"     long_name="Mixed Layer Depth 0.01 ref.10m"            unit="m"                        />
+         <field id="rhop"         long_name="potential density (sigma0)"                unit="kg/m3" grid_ref="grid_T_3D"/>
+         <field id="heatc"        long_name="Heat content vertically integrated"        unit="J/m2"                      />
+         <field id="saltc"        long_name="Salt content vertically integrated"        unit="PSU*kg/m2"                />
+	 <field id="eken"         long_name="kinetic energy"                            unit="m2/s2" grid_ref="grid_T_3D"/>
+	 <field id="hdiv"         long_name="horizontal divergence"                     unit="s-1"   grid_ref="grid_T_3D"/>
+         <!-- variables available with MLE -->
+         <field id="Lf_NHpf"      long_name="MLE: Lf = N H / f"                         unit="m"                        />
+         <!-- next variables available with key_diahth -->
+         <field id="mlddzt"       long_name="Thermocline Depth (max dT/dz)"             unit="m"                        />
+         <field id="mldr10_3"     long_name="Mixed Layer Depth dr=0.03 (ref.10m)"       unit="m"                        />
+         <field id="mldr0_1"      long_name="Mixed Layer Depth dr=0.01 (ref.surf)"      unit="m"                        />
+         <field id="mldr0_3"      long_name="Mixed Layer Depth dr=0.03 (ref.surf)"      unit="m"                        />
+         <field id="mld_dt02"     long_name="Mixed Layer Depth |dt|=0.2 (ref.10m)"      unit="m"                        />
+         <field id="topthdep"     long_name="Top of the thermocline dt=-0.2 (ref.10m)"  unit="m"                        />
+         <field id="pycndep"      long_name="Pycnocline depth dr~dt=-0.2 (ref.10m)"     unit="m"                        />
+         <field id="BLT"          long_name="Barrier Layer Thickness"                   unit="m"                        />
+         <field id="tinv"         long_name="Max of vertical invertion of temperature"  unit="degC"                     />
+         <field id="depti"        long_name="Depth of max. vert. inv. of temperature"   unit="m"                        />
+         <field id="20d"          long_name="Depth of 20C isotherm"                     unit="m"                        />
+         <field id="28d"          long_name="Depth of 28C isotherm"                     unit="m"                        />
+         <field id="hc300"        long_name="Heat content 300 m"                        unit="W"                        />
+         <!-- variables available with key_diaar5 -->
+         <field id="botpres"      long_name="Pressure at sea floor"                     unit="dbar"                     />
+         <!-- variables available with key_diaar5/key_vvl -->
+         <field id="cellthc"      long_name="Cell thickness"                            unit="m"    grid_ref="grid_T_3D"/>
+         <!-- variables available with key_vvl -->
+         <field id="tpt_dep"      long_name="T-point depth"                             unit="m"    grid_ref="grid_T_3D"/>
+         <field id="e3tdef"       long_name="T-cell thickness deformation"              unit="%"    grid_ref="grid_T_3D"/>
+     </field_group>
+
+     <field_group id="Tides_T" grid_ref="grid_T_2D" operation="once" >
+	 <!-- tidal composante -->
+	 <field id="M2x"          long_name="M2 Elevation harmonic real part "                             unit="m"        />
+	 <field id="M2y"          long_name="M2 Elevation harmonic imaginary part"                         unit="m"        />
+	 <field id="S2x"          long_name="S2 Elevation harmonic real part "                             unit="m"        />
+	 <field id="S2y"          long_name="S2 Elevation harmonic imaginary part"                         unit="m"        />
+	 <field id="N2x"          long_name="N2 Elevation harmonic real part "                             unit="m"        />
+	 <field id="N2y"          long_name="N2 Elevation harmonic imaginary part"                         unit="m"        />
+	 <field id="K1x"          long_name="K1 Elevation harmonic real part "                             unit="m"        />
+	 <field id="K1y"          long_name="K1 Elevation harmonic imaginary part"                         unit="m"        />
+	 <field id="O1x"          long_name="O1 Elevation harmonic real part "                             unit="m"        />
+	 <field id="O1y"          long_name="O1 Elevation harmonic imaginary part"                         unit="m"        />
+	 <field id="Q1x"          long_name="Q1 Elevation harmonic real part "                             unit="m"        />
+	 <field id="Q1y"          long_name="Q1 Elevation harmonic imaginary part"                         unit="m"        />
+	 <field id="M4x"          long_name="M4 Elevation harmonic real part "                             unit="m"        />
+	 <field id="M4y"          long_name="M4 Elevation harmonic imaginary part"                         unit="m"        />
+	 <field id="K2x"          long_name="K2 Elevation harmonic real part "                             unit="m"        />
+	 <field id="K2y"          long_name="K2 Elevation harmonic imaginary part"                         unit="m"        />
+	 <field id="P1x"          long_name="P1 Elevation harmonic real part "                             unit="m"        />
+	 <field id="P1y"          long_name="P1 Elevation harmonic imaginary part"                         unit="m"        />
+	 <field id="Mfx"          long_name="Mf Elevation harmonic real part "                             unit="m"        />
+	 <field id="Mfy"          long_name="Mf Elevation harmonic imaginary part"                         unit="m"        />
+	 <field id="Mmx"          long_name="Mm Elevation harmonic real part "                             unit="m"        />
+	 <field id="Mmy"          long_name="Mm Elevation harmonic imaginary part"                         unit="m"        />
+     </field_group>
+	 
+     <field_group id="Tides_U" grid_ref="grid_U_2D" operation="once" >
+	 <field id="M2x_u"          long_name="M2 current barotrope along i-axis harmonic real part "      unit="m/s"        />
+	 <field id="M2y_u"          long_name="M2 current barotrope along i-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="S2x_u"          long_name="S2 current barotrope along i-axis harmonic real part "      unit="m/s"        />
+	 <field id="S2y_u"          long_name="S2 current barotrope along i-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="N2x_u"          long_name="N2 current barotrope along i-axis harmonic real part "      unit="m/s"        />
+	 <field id="N2y_u"          long_name="N2 current barotrope along i-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="K1x_u"          long_name="K1 current barotrope along i-axis harmonic real part "      unit="m/s"        />
+	 <field id="K1y_u"          long_name="K1 current barotrope along i-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="O1x_u"          long_name="O1 current barotrope along i-axis harmonic real part "      unit="m/s"        />
+	 <field id="O1y_u"          long_name="O1 current barotrope along i-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="Q1x_u"          long_name="Q1 current barotrope along i-axis harmonic real part "      unit="m/s"        />
+	 <field id="Q1y_u"          long_name="Q1 current barotrope along i-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="M4x_u"          long_name="M4 current barotrope along i-axis harmonic real part "      unit="m/s"        />
+	 <field id="M4y_u"          long_name="M4 current barotrope along i-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="K2x_u"          long_name="K2 current barotrope along i-axis harmonic real part "      unit="m/s"        />
+	 <field id="K2y_u"          long_name="K2 current barotrope along i-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="P1x_u"          long_name="P1 current barotrope along i-axis harmonic real part "      unit="m/s"        />
+	 <field id="P1y_u"          long_name="P1 current barotrope along i-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="Mfx_u"          long_name="Mf current barotrope along i-axis harmonic real part "      unit="m/s"        />
+	 <field id="Mfy_u"          long_name="Mf current barotrope along i-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="Mmx_u"          long_name="Mm current barotrope along i-axis harmonic real part "      unit="m/s"        />
+	 <field id="Mmy_u"          long_name="Mm current barotrope along i-axis harmonic imaginary part " unit="m/s"        />
+     </field_group>
+	 
+     <field_group id="Tides_V" grid_ref="grid_V_2D" operation="once" >
+	 <field id="M2x_v"          long_name="M2 current barotrope along j-axis harmonic real part "      unit="m/s"        />
+	 <field id="M2y_v"          long_name="M2 current barotrope along j-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="S2x_v"          long_name="S2 current barotrope along j-axis harmonic real part "      unit="m/s"        />
+	 <field id="S2y_v"          long_name="S2 current barotrope along j-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="N2x_v"          long_name="N2 current barotrope along j-axis harmonic real part "      unit="m/s"        />
+	 <field id="N2y_v"          long_name="N2 current barotrope along j-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="K1x_v"          long_name="K1 current barotrope along j-axis harmonic real part "      unit="m/s"        />
+	 <field id="K1y_v"          long_name="K1 current barotrope along j-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="O1x_v"          long_name="O1 current barotrope along j-axis harmonic real part "      unit="m/s"        />
+	 <field id="O1y_v"          long_name="O1 current barotrope along j-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="Q1x_v"          long_name="Q1 current barotrope along j-axis harmonic real part "      unit="m/s"        />
+	 <field id="Q1y_v"          long_name="Q1 current barotrope along j-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="M4x_v"          long_name="M4 current barotrope along j-axis harmonic real part "      unit="m/s"        />
+	 <field id="M4y_v"          long_name="M4 current barotrope along j-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="K2x_v"          long_name="K2 current barotrope along j-axis harmonic real part "      unit="m/s"        />
+	 <field id="K2y_v"          long_name="K2 current barotrope along j-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="P1x_v"          long_name="P1 current barotrope along j-axis harmonic real part "      unit="m/s"        />
+	 <field id="P1y_v"          long_name="P1 current barotrope along j-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="Mfx_v"          long_name="Mf current barotrope along j-axis harmonic real part "      unit="m/s"        />
+	 <field id="Mfy_v"          long_name="Mf current barotrope along j-axis harmonic imaginary part " unit="m/s"        />
+	 <field id="Mmx_v"          long_name="Mm current barotrope along j-axis harmonic real part "      unit="m/s"        />
+	 <field id="Mmy_v"          long_name="Mm current barotrope along j-axis harmonic imaginary part " unit="m/s"        />	 
+     </field_group>
+
+
+      <!-- SBC -->
+      
+      <field_group id="SBC" grid_ref="grid_T_2D" > <!-- time step automaticaly defined based on nn_fsbc -->
+
+         <field id="empmr"        long_name="Net Upward Water Flux"                                        unit="kg/m2/s"  />
+         <field id="saltflx"      long_name="Downward salt flux"                                           unit="PSU/m2/s"  />
+         <field id="fmmflx"       long_name="Water flux due to freezing/melting"                           unit="kg/m2/s"  />
+         <field id="snowpre"      long_name="Snow precipitation"                                           unit="kg/m2/s"  />
+         <field id="runoffs"      long_name="River Runoffs"                                                unit="Kg/m2/s"  />
+         <field id="precip"       long_name="Total precipitation"                                           unit="kg/m2/s"  />
+
+
+         <field id="qt"           long_name="Net Downward Heat Flux"                                       unit="W/m2"     />
+         <field id="qns"          long_name="non solar Downward Heat Flux"                                 unit="W/m2"     />
+         <field id="qsr"          long_name="Shortwave Radiation"                                          unit="W/m2"     />
+         <field id="qsr3d"        long_name="Shortwave Radiation 3D distribution"  grid_ref="grid_T_3D"    unit="W/m2"     />
+         <field id="qrp"          long_name="Surface Heat Flux: Damping"                                   unit="W/m2"     />
+         <field id="erp"          long_name="Surface Water Flux: Damping"                                  unit="Kg/m2/s"  />
+         <field id="taum"         long_name="wind stress module"                                           unit="N/m2"     />
+         <field id="wspd"         long_name="Wind speed module at 10 m"                                    unit="m/s"      />
+         
+	 <!-- * variable relative to atmospheric pressure forcing : available with ln_apr_dyn -->
+	 <field id="ssh_ib"       long_name="Inverse barometer sea surface height"                         unit="m"        />
+	
+         <!-- *_oce variables available with ln_blk_clio or ln_blk_core -->
+         <field id="qlw_oce"      long_name="Longwave Downward Heat Flux over open ocean"                  unit="W/m2"     />
+         <field id="qsb_oce"      long_name="Sensible Downward Heat Flux over open ocean"                  unit="W/m2"     />
+         <field id="qla_oce"      long_name="Latent Downward Heat Flux over open ocean"                    unit="W/m2"     />
+         <field id="qhc_oce"      long_name="Downward Heat Content of E-P over open ocean"                 unit="W/m2"     />
+         <field id="taum_oce"     long_name="wind stress module over open ocean"                           unit="N/m2"     />
+
+         <!-- available key_coupled -->
+         <field id="snow_ao_cea"   long_name="Snow over ice-free ocean (cell average)"                     unit="kg/m2/s"  />
+         <field id="snow_ai_cea"   long_name="Snow over sea-ice (cell average)"                            unit="kg/m2/s"  />
+         <field id="subl_ai_cea"   long_name="Sublimation over sea-ice (cell average)"                     unit="kg/m2/s"  />
+         <field id="icealb_cea"    long_name="Ice albedo (cell average)"                                   unit="1"        />
+         <field id="calving"       long_name="Calving"                                                     unit="kg/m2/s"  />
+         <!-- available if key_coupled + conservative method -->
+         <field id="rain"          long_name="Liquid precipitation"                                        unit="Kg/m2/s"  />
+         <field id="evap_ao_cea"   long_name="Evaporation over ice-free ocean (cell average)"              unit="kg/m2/s"  />
+         <!-- variables available with key_diaar5 -->
+         <field id="isnwmlt_cea"   long_name="Snow over Ice melting (cell average)"                        unit="kg/m2/s"  />
+         <field id="fsal_virt_cea" long_name="Virtual salt flux due to ice formation (cell average)"       unit="kg/m2/s"  />
+         <field id="fsal_real_cea" long_name="Real salt flux due to ice formation (cell average)"          unit="kg/m2/s"  />
+         <field id="hflx_rain_cea" long_name="heat flux due to rainfall"                                   unit="W/m2"     />
+         <field id="hflx_evap_cea" long_name="heat flux due to evaporation"                                unit="W/m2"     />
+         <field id="hflx_snow_cea" long_name="heat flux due to snow falling over ice-free ocean"           unit="W/m2"     />
+         <field id="hflx_ice_cea"  long_name="heat flux due to ice thermodynamics"                         unit="W/m2"     />
+         <field id="hflx_rnf_cea"  long_name="heat flux due to runoffs"                                    unit="W/m2"     />
+         <field id="hflx_cal_cea"  long_name="heat flux due to calving"                                    unit="W/m2"     />
+         <field id="bicemel_cea"   long_name="Rate of Melt at Sea Ice Base (cell average)"                 unit="kg/m2/s"  />
+         <field id="licepro_cea"   long_name="Lateral Sea Ice Growth Rate (cell average)"                  unit="kg/m2/s"  />
+         <field id="snowmel_cea"   long_name="Snow Melt Rate (cell average)"                               unit="kg/m2/s"  />
+         <field id="sntoice_cea"   long_name="Snow-Ice Formation Rate (cell average)"                      unit="kg/m2/s"  />
+         <field id="ticemel_cea"      long_name="Rate of Melt at Upper Surface of Sea Ice (cell average)"     unit="kg/m2/s"  />
+
+	 <!-- ice fields -->
+
+         <field id="ice_cover"    long_name="Ice fraction"                                                 unit="1"        />
+
+         <field id="qsr_ai_cea"   long_name="Air-Ice downward solar heat flux (cell average)"              unit="W/m2"     />
+         <field id="qns_ai_cea"   long_name="Air-Ice downward non-solar heat flux (cell average)"          unit="W/m2"     />
+         <field id="qla_ai_cea"   long_name="Air-Ice downward Latent heat flux (cell average)"             unit="W/m2"     />
+         
+         <field id="qsr_io_cea"   long_name="Ice-Oce downward solar heat flux (cell average)"              unit="W/m2"     />
+         <field id="qns_io_cea"   long_name="Ice-Oce downward non-solar heat flux (cell average)"          unit="W/m2"     />
+         
+         <field id="snowthic_cea" long_name="Snow thickness (cell average)"                                unit="m"        />
+         <field id="icethic_cea"  long_name="Ice thickness (cell average)"                                 unit="m"        />
+         <field id="iceprod_cea"  long_name="Ice production (cell average)"                                unit="m/s"      />
+         
+         <field id="ice_pres"     long_name="Ice presence"                                                 unit="-"        />
+         <field id="ist_cea"      long_name="Ice surface temperature (cell average)"                       unit="degC"     />
+         <field id="ist_ipa"      long_name="Ice surface temperature (ice presence average)"               unit="degC"     />      
+         <field id="uice_ipa"     long_name="Ice velocity along i-axis at I-point (ice presence average)"  unit="m/s"      />      
+         <field id="vice_ipa"     long_name="Ice velocity along j-axis at I-point (ice presence average)"  unit="m/s"      />      
+         
+         <field id="utau_ice"     long_name="Wind stress along i-axis over the ice at i-point"             unit="N/m2"     />
+         <field id="vtau_ice"     long_name="Wind stress along j-axis over the ice at i-point"             unit="N/m2"     />
+         
+         <field id="u_imasstr"    long_name="Sea-ice mass transport along i-axis"                          unit="kg/s"     />
+         <field id="v_imasstr"    long_name="Sea-ice mass transport along j-axis"                          unit="kg/s"     />
+         <field id="emp_x_sst"    long_name="Concentration/Dilution term on SST"                           unit="kgC/m2/s" />
+         <field id="emp_x_sss"    long_name="Concentration/Dilution term on SSS"                         unit="kgPSU/m2/s" />        
+         
+         
+         <field id="iceconc"      long_name="ice concentration"                                            unit="%"        />
+         <field id="uice_ipa"     long_name="Ice velocity along i-axis at I-point (ice presence average)"  unit="m/s"      />
+         <field id="vice_ipa"     long_name="Ice velocity along j-axis at I-point (ice presence average)"  unit="m/s"      />
+       	 <field id="isst"         long_name="sea surface temperature"                                      unit="degC"     />
+         <field id="isss"         long_name="sea surface salinity"                                         unit="psu"      /> 
+         <field id="qt_oce"       long_name="total flux at ocean surface"                                  unit="W/m2"     />
+         <field id="qsr_oce"      long_name="solar heat flux at ocean surface"                             unit="W/m2"     />
+         <field id="qns_oce"      long_name="non-solar heat flux at ocean surface"                         unit="W/m2"     />
+         <field id="qt_ice"       long_name="total flux at ice surface"                                    unit="W/m2"     />
+         <field id="qsr_ice"      long_name="solar heat flux at ice surface"                               unit="W/m2"     />
+         <field id="qns_ice"      long_name="non-solar heat flux at ice surface"                           unit="W/m2"     />
+         <field id="qtr_ice"      long_name="solar heat flux transmitted thru the ice"                     unit="W/m2"     />
+         <field id="utau_ice"     long_name="Wind stress along i-axis over the ice at i-point"             unit="N/m2"     />
+         <field id="vtau_ice"     long_name="Wind stress along j-axis over the ice at i-point"             unit="N/m2"     />
+         <field id="micesalt"     long_name="Mean ice salinity"                                            unit="psu"      />
+         <field id="miceage"      long_name="Mean ice age"                                                 unit="years"    />
+
+         <field id="iceage_cat"   long_name="Ice age for categories"                                       unit="days"   axis_ref="ncatice" />
+         <field id="iceconc_cat"  long_name="Ice concentration for categories"                             unit="%"      axis_ref="ncatice" />
+         <field id="icethic_cat"  long_name="Ice thickness for categories"                                 unit="m"      axis_ref="ncatice" />
+         <field id="snowthic_cat" long_name="Snow thicknessi for categories"                               unit="m"      axis_ref="ncatice" />
+         <field id="salinity_cat" long_name="Sea-Ice Bulk salinity for categories"                         unit="ppt"    axis_ref="ncatice" />
+         <field id="brinevol_cat" long_name="Brine volume for categories"                                  unit="%"      axis_ref="ncatice" />
+
+         <field id="micet"        long_name="Mean ice temperature"                                         unit="degC"     />
+         <field id="icehc"        long_name="ice total heat content"                                       unit="10^9J"   /> 
+         <field id="isnowhc"      long_name="snow total heat content"                                      unit="10^9J"    />
+         <field id="icest"        long_name="ice surface temperature"                                      unit="degC"     />
+         <field id="ibrinv"       long_name="brine volume"                                                 unit="%"        />
+         <field id="icecolf"      long_name="frazil ice collection thickness"                              unit="m"        />
+         <field id="icestr"       long_name="ice strength"                                                 unit="N/m"      />
+         <field id="icevel"       long_name="ice velocity"                                                 unit="m/s"      />
+         <field id="idive"        long_name="divergence"                                                   unit="10-8s-1"  />
+         <field id="ishear"       long_name="shear"                                                        unit="10-8s-1"  />
+         <field id="icevolu"      long_name="ice volume"                                                   unit="m"      />
+         <field id="snowvol"      long_name="snow volume"                                                  unit="m"      />
+
+         <field id="icetrp"       long_name="ice volume transport"                                         unit="m/day"   />
+         <field id="snwtrp"       long_name="snw volume transport"                                         unit="m/day"   />
+         <field id="deitrp"       long_name="advected ice enhalpy"                                         unit="W/m2"   />
+         <field id="destrp"       long_name="advected snw enhalpy"                                         unit="W/m2"   />
+
+         <field id="sfxbri"       long_name="brine salt flux"                                              unit="psu*kg/m2/day" />
+         <field id="sfxdyn"       long_name="salt flux from ridging rafting"                               unit="psu*kg/m2/day" />
+         <field id="sfxres"       long_name="salt flux from lipupdate (resultant)"                         unit="psu*kg/m2/day" />
+         <field id="sfxbog"       long_name="salt flux from bot growth"                                    unit="psu*kg/m2/day" />
+         <field id="sfxbom"       long_name="salt flux from bot melt"                                      unit="psu*kg/m2/day" />
+         <field id="sfxsum"       long_name="salt flux from surf melt"                                     unit="psu*kg/m2/day" />
+         <field id="sfxsni"       long_name="salt flux from snow-ice formation"                            unit="psu*kg/m2/day" />
+         <field id="sfxopw"       long_name="salt flux from open water ice formation"                      unit="psu*kg/m2/day" />
+         <field id="sfx"          long_name="salt flux total"                                              unit="psu*kg/m2/day" />
+
+         <field id="vfxbog"       long_name="daily bottom thermo ice prod."                                unit="m/day"   />
+         <field id="vfxdyn"       long_name="daily  dynamic ice prod."                                     unit="m/day"   />
+         <field id="vfxopw"       long_name="daily lateral thermo ice prod."                               unit="m/day"   />
+         <field id="vfxsni"       long_name="daily snowice ice prod."                                      unit="m/day"   />
+         <field id="vfxsum"       long_name="surface melt"                                                 unit="m/day"   />
+         <field id="vfxbom"       long_name="bottom melt"                                                  unit="m/day"   />
+         <field id="vfxres"       long_name="daily resultant ice prod./melting from limupdate"             unit="m/day"   />
+         <field id="vfxice"       long_name="ice melt/growth"                                              unit="m/day"   />
+         <field id="vfxsnw"       long_name="snw melt/growth"                                              unit="m/day"   />
+         <field id="vfxsub"       long_name="snw sublimation"                                              unit="m/day"   />
+         <field id="vfxspr"       long_name="snw precipitation on ice"                                     unit="m/day"   />
+
+         <field id="hfxsum"   long_name="heat fluxes causing surface ice melt"            unit="W/m2"  />
+         <field id="hfxbom"   long_name="heat fluxes causing bottom ice melt"             unit="W/m2"  />
+         <field id="hfxbog"   long_name="heat fluxes causing bottom ice growth"           unit="W/m2"  />
+         <field id="hfxdif"   long_name="heat fluxes causing ice temperature change"      unit="W/m2"  />
+         <field id="hfxopw"   long_name="heat fluxes causing open water ice formation"    unit="W/m2"  />
+         <field id="hfxsnw"   long_name="heat fluxes causing snow melt"                   unit="W/m2"  />
+         <field id="hfxerr"   long_name="heat fluxes error after heat diffusion"          unit="W/m2"  />
+         <field id="hfxerr_rem" long_name="heat fluxes error after remapping"             unit="W/m2"  />
+         <field id="hfxout"   long_name="total heat fluxes received by the ocean"         unit="W/m2"  />
+         <field id="hfxin"    long_name="total heat fluxes at the ice/ocean surface"      unit="W/m2"  />
+
+	 <!-- heat flux associated with mass exchange -->
+         <field id="hfxthd"   long_name="heat fluxes from ice-ocean mass exchange during thermo"              unit="W/m2"  />
+         <field id="hfxdyn"   long_name="heat fluxes from ice-ocean mass exchange during dynamic"             unit="W/m2"  />
+         <field id="hfxres"   long_name="heat fluxes from ice-ocean mass exchange during resultant"           unit="W/m2"  />
+         <field id="hfxsub"   long_name="heat fluxes from ice-atm. mass exchange during sublimation"          unit="W/m2"  />
+         <field id="hfxspr"   long_name="heat fluxes from ice-atm. mass exchange during snow precip"          unit="W/m2" />
+
+	 <!-- diags -->
+         <field id="hfxdhc"    long_name="Heat content variation in snow and ice"   unit="W/m2" />
+         <field id="hfxtur"    long_name="turbulent heat flux at the ice base"      unit="W/m2"  />
+
+      </field_group>
+
+      <!-- U grid -->
+      
+      <field_group id="grid_U"   grid_ref="grid_U_2D">
+         <field id="utau"         long_name="Wind Stress along i-axis"                    unit="N/m2" />
+         <field id="suoce"        long_name="ocean surface current along i-axis"          unit="m/s"  />
+         <field id="uoce"         long_name="ocean current along i-axis"                  unit="m/s"  grid_ref="grid_U_3D" />
+         <field id="uocetr_eff"   long_name="Effective ocean transport along i-axis"      unit="m3/s" grid_ref="grid_U_3D" />
+         <field id="uocet"        long_name="ocean transport along i-axis times temperature" unit="degC.m/s" grid_ref="grid_U_3D" />
+         <field id="uoces"        long_name="ocean transport along i-axis times salinity"    unit="psu.m/s"  grid_ref="grid_U_3D" />
+         <!-- variables available with MLE -->
+         <field id="psiu_mle"     long_name="MLE streamfunction along i-axis"             unit="m3/s"  grid_ref="grid_U_3D"  />
+         <!-- uoce_eiv: available with key_traldf_eiv and key_diaeiv -->
+         <field id="uoce_eiv"     long_name="EIV ocean current along i-axis"              unit="m/s"  grid_ref="grid_U_3D" />
+         <!-- uoce_eiv: available with key_trabbl -->
+         <field id="uoce_bbl"     long_name="BBL ocean current along i-axis"              unit="m/s"  grid_ref="grid_U_3D" />
+	 <field id="ahu_bbl"      long_name="BBL diffusive flux along i-axis"             unit="m3/s" />
+         <!-- variables available with key_diaar5 -->
+         <field id="u_masstr"     long_name="ocean eulerian mass transport along i-axis"  unit="kg/s" grid_ref="grid_U_3D" />
+         <field id="u_heattr"     long_name="ocean eulerian heat transport along i-axis"  unit="W"    />
+         <field id="u_salttr"     long_name="ocean eulerian salt transport along i-axis"  unit="PSU*kg/s"    />
+         <field id="ueiv_heattr"  long_name="ocean bolus heat transport along i-axis"     unit="W"    />
+         <field id="udiff_heattr" long_name="ocean diffusion heat transport along i-axis" unit="W"    />
+     </field_group>
+      
+      <!-- V grid -->
+      
+      <field_group id="grid_V"   grid_ref="grid_V_2D">
+         <field id="vtau"         long_name="Wind Stress along j-axis"                    unit="N/m2" />
+         <field id="svoce"        long_name="ocean surface current along j-axis"          unit="m/s"  />
+         <field id="voce"         long_name="ocean current along j-axis"                  unit="m/s"  grid_ref="grid_V_3D" />
+         <field id="vocetr_eff"   long_name="Effective ocean transport along j-axis"      unit="m3/s" grid_ref="grid_V_3D" />
+         <field id="vocet"        long_name="ocean transport along j-axis times temperature" unit="degC.m/s" grid_ref="grid_V_3D" />
+         <field id="voces"        long_name="ocean transport along j-axis times salinity"    unit="psu.m/s"  grid_ref="grid_V_3D" />
+         <!-- variables available with MLE -->
+         <field id="psiv_mle"     long_name="MLE streamfunction along j-axis"             unit="m3/s"  grid_ref="grid_V_3D"  />
+         <!-- voce_eiv: available with key_traldf_eiv and key_diaeiv -->
+         <field id="voce_eiv"     long_name="EIV ocean current along j-axis"              unit="m/s"  grid_ref="grid_V_3D" />
+         <!-- voce_eiv: available with key_trabbl -->
+         <field id="voce_bbl"     long_name="BBL ocean current along j-axis"              unit="m/s"  grid_ref="grid_V_3D" />
+	 <field id="ahv_bbl"      long_name="BBL diffusive flux along j-axis"             unit="m3/s"                   />
+         <!-- variables available with key_diaar5 -->
+         <field id="v_masstr"     long_name="ocean eulerian mass transport along j-axis"  unit="kg/s" grid_ref="grid_V_3D" />
+         <field id="v_heattr"     long_name="ocean eulerian heat transport along j-axis"  unit="W"     />
+         <field id="v_salttr"     long_name="ocean eulerian salt transport along i-axis"  unit="PSU*kg/s"    />
+         <field id="veiv_heattr"  long_name="ocean bolus heat transport along j-axis"     unit="W"     />
+         <field id="vdiff_heattr" long_name="ocean diffusion heat transport along j-axis" unit="W"     />
+      </field_group>
+      
+      <!-- W grid -->
+      
+      <field_group id="grid_W" grid_ref="grid_W_3D">
+        <field id="woce"         long_name="ocean vertical velocity"                  unit="m/s"    />
+        <field id="wocetr_eff"   long_name="effective ocean vertical transport"       unit="m3/s"   />
+        <!-- woce_eiv: available with key_traldf_eiv and key_diaeiv -->
+        <field id="woce_eiv"     long_name="EIV ocean vertical velocity"              unit="m/s"    />
+        <!-- woce_eiv: available with key_trabbl_adv -->
+        <field id="avt"          long_name="vertical eddy diffusivity"                unit="m2/s"   />
+        <field id="avm"          long_name="vertical eddy viscosity"                  unit="m2/s"   />
+        <!-- avs: available with key_zdfddm -->
+        <field id="avs"          long_name="salt vertical eddy diffusivity"           unit="m2/s"   />
+        <!-- avt_evd and avm_evd: available with ln_zdfevd -->
+        <field id="avt_evd"      long_name="enhanced vertical diffusivity"            unit="m2/s"   />
+        <field id="avm_evd"      long_name="enhanced vertical viscosity"              unit="m2/s"   />
+        <!-- avt_tide: available with key_zdftmx -->
+        <field id="av_tide"      long_name="tidal vertical diffusivity"               unit="m2/s"   />
+        <!-- variables available with key_diaar5 -->   
+        <field id="w_masstr"     long_name="vertical mass trasport"                   unit="kg/s"   />
+        <field id="w_masstr2"    long_name="square of vertical mass trasport"         unit="kg2/s2" />
+        
+        <!-- aht2d and  aht2d_eiv: available with key_traldf_eiv and key_traldf_c2d -->
+        <field id="aht2d"        long_name="lateral eddy diffusivity"                    unit="m2/s"   grid_ref="grid_W_2D" />
+        <field id="aht2d_eiv"    long_name="EIV lateral eddy diffusivity"                unit="m2/s"   grid_ref="grid_W_2D"/>
+      </field_group>
+          
+      <!-- scalar variables available with key_diaar5 -->
+
+      <field_group id="scalar"  domain_ref="1point" >
+     <field id="voltot"     long_name="global mean volume"                         unit="m3"   />
+     <field id="sshtot"     long_name="global mean ssh"                            unit="m"    />
+     <field id="sshsteric"  long_name="global mean ssh steric"                     unit="m"    />
+     <field id="sshthster"  long_name="global mean ssh thermosteric"               unit="m"    />
+     <field id="masstot"    long_name="global mean mass"                           unit="kg"   />
+     <field id="temptot"    long_name="global mean temperature"                    unit="degC" />
+     <field id="saltot"     long_name="global mean salinity"                       unit="psu"  />
+     <field id="fram_trans" long_name="Sea Ice Mass Transport Through Fram Strait" unit="kg/s" />
+   	 <!-- available with ln_diahsb -->
+	 <field id="bgtemper" long_name="global mean temperature variation"            unit="degC"/>
+	 <field id="bgsaline" long_name="global mean salinity variation"               unit="psu"/>
+	 <field id="bgheatco" long_name="global mean heat content variation"           unit="10^20J"/>
+	 <field id="bgsaltco" long_name="global mean salt content variation"           unit="psu*km3" />
+	 <field id="bgvolssh" long_name="global mean volume variation (ssh)"           unit="km3"/>
+	 <field id="bgvole3t" long_name="global mean volume variation (e3t)"           unit="km3"/>
+	 <field id="bgfrcvol" long_name="global mean volume variation from forcing"    unit="km3"/>
+	 <field id="bgfrctem" long_name="global mean forcing from heat content variation"   unit="degC"/>
+	 <field id="bgfrcsal" long_name="global mean forcing salt content variation"        unit="psu"/>
+	 <field id="bgmistem" long_name="global mean temperature error due to free surface" unit="degC"/>
+	 <field id="bgmissal" long_name="global mean salinity error due to free surface"    unit="psu"/>
+      </field_group>
+
+      <field_group id="SBC_scalar"  domain_ref="1point" >
+         <!-- available with ln_limdiaout -->
+	 <field id="ibgvoltot"    long_name="global mean ice volume"                   unit="km3"   />
+	 <field id="sbgvoltot"    long_name="global mean snow volume"                  unit="km3"   />
+	 <field id="ibgarea"      long_name="global mean ice area"                     unit="km2"   />
+	 <field id="ibgsaline"    long_name="global mean ice salinity"                 unit="psu"   />
+	 <field id="ibgtemper"    long_name="global mean ice temperature"              unit="degC"   />
+	 <field id="ibgheatco"    long_name="global mean ice heat content"             unit="10^20J"   />
+	 <field id="sbgheatco"    long_name="global mean snow heat content"            unit="10^20J"   />
+	 <field id="ibgsaltco"    long_name="global mean ice salt content"             unit="psu*km3"   />
+
+	 <field id="ibgvfx"       long_name="global mean volume flux (emp)"               unit="m/day"   />
+	 <field id="ibgvfxbog"    long_name="global mean volume flux (bottom growth)"     unit="m/day"   />
+	 <field id="ibgvfxopw"    long_name="global mean volume flux (open water growth)" unit="m/day"   />
+	 <field id="ibgvfxsni"    long_name="global mean volume flux (snow-ice growth)"   unit="m/day"   />
+	 <field id="ibgvfxdyn"    long_name="global mean volume flux (dynamic growth)"    unit="m/day"   />
+	 <field id="ibgvfxbom"    long_name="global mean volume flux (bottom melt)"       unit="m/day"   />
+	 <field id="ibgvfxsum"    long_name="global mean volume flux (surface melt)"      unit="m/day"   />
+	 <field id="ibgvfxres"    long_name="global mean volume flux (resultant)"         unit="m/day"   />
+	 <field id="ibgvfxspr"    long_name="global mean volume flux (snow precip)"       unit="m/day"   />
+	 <field id="ibgvfxsnw"    long_name="global mean volume flux (snow melt)"         unit="m/day"   />
+	 <field id="ibgvfxsub"    long_name="global mean volume flux (snow sublimation)"  unit="m/day"   />
+
+	 <field id="ibgsfx"       long_name="global mean salt flux (total)"            unit="psu*m/day"   />
+	 <field id="ibgsfxbri"    long_name="global mean salt flux (brines)"           unit="psu*m/day"   />
+	 <field id="ibgsfxdyn"    long_name="global mean salt flux (dynamic)"          unit="psu*m/day"   />
+	 <field id="ibgsfxres"    long_name="global mean salt flux (resultant)"        unit="psu*m/day"   />
+	 <field id="ibgsfxbog"    long_name="global mean salt flux (thermo)"           unit="psu*m/day"   />
+	 <field id="ibgsfxopw"    long_name="global mean salt flux (thermo)"           unit="psu*m/day"   />
+	 <field id="ibgsfxsni"    long_name="global mean salt flux (thermo)"           unit="psu*m/day"   />
+	 <field id="ibgsfxbom"    long_name="global mean salt flux (thermo)"           unit="psu*m/day"   />
+	 <field id="ibgsfxsum"    long_name="global mean salt flux (thermo)"           unit="psu*m/day"   />
+
+
+        <field id="ibghfxdhc"    long_name="Heat content variation in snow and ice"   unit="W" />
+        <field id="ibghfxspr"    long_name="Heat content of snow precip"              unit="W" />
+
+        <field id="ibghfxthd"   long_name="heat fluxes from ice-ocean exchange during thermo"              unit="W"  />
+        <field id="ibghfxsum"   long_name="heat fluxes causing surface ice melt"              unit="W"  />
+        <field id="ibghfxbom"   long_name="heat fluxes causing bottom ice melt"              unit="W"  />
+        <field id="ibghfxbog"   long_name="heat fluxes causing bottom ice growth"              unit="W"  />
+        <field id="ibghfxdif"   long_name="heat fluxes causing ice temperature change"              unit="W"  />
+        <field id="ibghfxopw"   long_name="heat fluxes causing open water ice formation"              unit="W"  />
+        <field id="ibghfxdyn"   long_name="heat fluxes from ice-ocean exchange during dynamic"             unit="W"  />
+        <field id="ibghfxres"   long_name="heat fluxes from ice-ocean exchange during resultant"           unit="W"  />
+        <field id="ibghfxsub"   long_name="heat fluxes from sublimation"                                   unit="W"  />
+        <field id="ibghfxsnw"   long_name="heat fluxes from snow-ocean exchange"                           unit="W"  />
+        <field id="ibghfxout"   long_name="non solar heat fluxes received by the ocean"                    unit="W"  />
+        <field id="ibghfxin"    long_name="total heat fluxes at the ice surface"                           unit="W"  />
+
+	 <field id="ibgfrcvol"    long_name="global mean forcing volume (emp)"         unit="km3"      />
+	 <field id="ibgfrcsfx"    long_name="global mean forcing salt   (sfx)"         unit="psu*km3"   />
+	 <field id="ibgvolgrm"    long_name="global mean ice growth+melt volume"       unit="km3"      />
+      </field_group>
+  
+      <!-- variables available with key_float -->
+      <field_group id="floatvar" domain_ref="1point" axis_ref="nfloat" operation="instant" >
+        <field id="traj_lon"   long_name="floats longitude"   unit="deg"   />
+        <field id="traj_lat"   long_name="floats latitude"    unit="deg"   />
+        <field id="traj_dep"   long_name="floats depth"       unit="m"     />
+        <field id="traj_temp"  long_name="floats temperature" unit="degC"  />
+        <field id="traj_salt"  long_name="floats salinity"    unit="psu"   />
+        <field id="traj_dens"  long_name="floats density"     unit="kg/m3" />
+        <field id="traj_group" long_name="floats group"       unit="none"  />
+      </field_group>
+
+      <!-- variables available with iceberg trajectories -->
+      <field_group id="icbvar" domain_ref="grid_T"  > 
+        <field id="berg_melt"          long_name="icb melt rate of icebergs"                     unit="kg/m2/s"   />
+        <field id="berg_buoy_melt"     long_name="icb buoyancy component of iceberg melt rate"   unit="kg/m2/s"   />
+        <field id="berg_eros_melt"     long_name="icb erosion component of iceberg melt rate"    unit="kg/m2/s"   />
+        <field id="berg_conv_melt"     long_name="icb convective component of iceberg melt rate" unit="kg/m2/s"   />
+        <field id="berg_virtual_area"  long_name="icb virtual coverage by icebergs"              unit="m2"        />
+        <field id="bits_src"           long_name="icb mass source of bergy bits"                 unit="kg/m2/s"   />
+        <field id="bits_melt"          long_name="icb melt rate of bergy bits"                   unit="kg/m2/s"   />
+        <field id="bits_mass"          long_name="icb bergy bit density field"                   unit="kg/m2"     />
+        <field id="berg_mass"          long_name="icb iceberg density field"                     unit="kg/m2"     />
+        <field id="calving"            long_name="icb calving mass input"                        unit="kg/s"      />
+        <field id="berg_floating_melt" long_name="icb melt rate of icebergs + bits"              unit="kg/m2/s"   />
+        <field id="berg_real_calving"  long_name="icb calving into iceberg class"                unit="kg/s"     axis_ref="icbcla" />
+        <field id="berg_stored_ice"    long_name="icb accumulated ice mass by class"             unit="kg"       axis_ref="icbcla" />
+      </field_group>
+
+      <!-- PTR -->
+      <field_group id="diaptr" domain_ref="ptr"   grid_ref="grid_T_3D"  enabled=".FALSE."> <!-- time step automaticaly defined based on nn_fptr -->
+        <field id="zotemglo"          long_name="Zonal Mean Temperature"                       unit="C"   />
+        <field id="zosalglo"          long_name="Zonal Mean Salinity"                          unit="PSU"   />
+        <field id="zosrfglo"          long_name="Zonal Mean Surface"                           unit="m2"   />
+        <field id="zomsfglo"          long_name="Meridional Stream-Function: Global"           unit="Sv"   />
+        <field id="zomsfeiv"          long_name="Bolus Meridional Stream-Function: Global"     unit="Sv"   />
+        <field id="zotematl"          long_name="Zonal Mean Temperature : Atlantic"            unit="C"   />
+        <field id="zosalatl"          long_name="Zonal Mean Salinity : Atlantic"               unit="PSU"   />
+        <field id="zosrfatl"          long_name="Zonal Mean Surface : Atlantic"                unit="m2"   />
+        <field id="zomsfatl"          long_name="Meridional Stream-Function: Atlantic"         unit="Sv"   />
+        <field id="zotempac"          long_name="Zonal Mean Temperature : Pacific"             unit="C"   />
+        <field id="zosalpac"          long_name="Zonal Mean Salinity : Pacific"                unit="PSU"   />
+        <field id="zosrfpac"          long_name="Zonal Mean Surface : Pacific"                 unit="m2"   />
+        <field id="zomsfpac"          long_name="Meridional Stream-Function: Pacific"          unit="Sv"   />
+        <field id="zotemind"          long_name="Zonal Mean Temperature : Indian"              unit="C"   />
+        <field id="zosalind"          long_name="Zonal Mean Salinity : Indian"                 unit="PSU"   />
+        <field id="zosrfind"          long_name="Zonal Mean Surface : Indian"                  unit="m2"   />
+        <field id="zomsfind"          long_name="Meridional Stream-Function: Indian"           unit="Sv"   />
+        <field id="zotemipc"          long_name="Zonal Mean Temperature : Pacific+Indian"      unit="C"   />
+        <field id="zosalipc"          long_name="Zonal Mean Salinity : Pacific+Indian"         unit="PSU"   />
+        <field id="zosrfipc"          long_name="Zonal Mean Surface : Pacific+Indian"          unit="m2"   />
+        <field id="zomsfipc"          long_name="Meridional Stream-Function: Pacific+Indian"   unit="Sv"    />
+        <field id="sophtadv"          long_name="Advective Heat Transport"                     unit="PW"       grid_ref="grid_T_2D"   />
+        <field id="sophteiv"          long_name="Bolus Advective Heat Transport"               unit="PW"       grid_ref="grid_T_2D"   />
+        <field id="sophtldf"          long_name="Diffusive Heat Transport"                     unit="PW"       grid_ref="grid_T_2D"   />
+        <field id="sophtove"          long_name="Overtuning Heat Transport"                    unit="PW"       grid_ref="grid_T_2D"   />
+        <field id="sohtatl"           long_name="Heat Transport Atlantic"                      unit="PW"       grid_ref="grid_T_2D"   />
+        <field id="sohtpac"           long_name="Heat Transport Pacific"                       unit="PW"       grid_ref="grid_T_2D"   />
+        <field id="sohtind"           long_name="Heat Transport Indian"                        unit="PW"       grid_ref="grid_T_2D"   />
+        <field id="sohtipc"           long_name="Heat Transport Pacific+Indian"                unit="PW"       grid_ref="grid_T_2D"   />
+        <field id="sopstadv"          long_name="Advective Salt Transport"                     unit="Giga g/s" grid_ref="grid_T_2D"   />
+        <field id="sopsteiv"          long_name="Bolus Advective Salt Transport"               unit="Giga g/s" grid_ref="grid_T_2D"   />
+        <field id="sopstldf"          long_name="Diffusive Salt Transport"                     unit="Giga g/s" grid_ref="grid_T_2D"   />
+        <field id="sopstove"          long_name="Overtuning Salt Transport"                    unit="Giga g/s" grid_ref="grid_T_2D"   />
+        <field id="sostatl"           long_name="Salt Transport Atlantic"                      unit="Giga g/s" grid_ref="grid_T_2D"   />
+        <field id="sostpac"           long_name="Salt Transport Pacific"                       unit="Giga g/s" grid_ref="grid_T_2D"   />
+        <field id="sostind"           long_name="Salt Transport Indian"                        unit="Giga g/s" grid_ref="grid_T_2D"   />
+        <field id="sostipc"           long_name="Salt Transport Pacific+Indian"                unit="Giga g/s" grid_ref="grid_T_2D"   />
+      </field_group>
+
+      <!-- ptrc on T grid -->
+
+      <field_group id="ptrc_T" grid_ref="grid_T_3D">
+       <field id="DIC"      long_name="Dissolved inorganic Concentration"        unit="mmol/m3" />
+       <field id="Alkalini" long_name="Total Alkalinity Concentration"           unit="mmol/m3" />
+       <field id="O2"       long_name="Oxygen Concentration"                     unit="mmol/m3" />
+       <field id="CaCO3"    long_name="Calcite Concentration"                    unit="mmol/m3" />
+       <field id="PO4"      long_name="Phosphate Concentration"                  unit="mmol/m3" />
+       <field id="POC"      long_name="Small organic carbon Concentration"       unit="mmol/m3" />
+       <field id="Si"       long_name="Silicate Concentration"                   unit="mmol/m3" />
+       <field id="PHY"      long_name="(Nano)Phytoplankton Concentration"        unit="mmol/m3" />
+       <field id="ZOO"      long_name="(Micro)Zooplankton Concentration"         unit="mmol/m3" />
+       <field id="DOC"      long_name="Dissolved organic Concentration"          unit="mmol/m3" />
+       <field id="PHY2"     long_name="Diatoms Concentration"                    unit="mmol/m3" />
+       <field id="ZOO2"     long_name="Mesozooplankton Concentration"            unit="mmol/m3" />
+       <field id="DSi"      long_name="Diatoms Silicate Concentration"           unit="mmol/m3" />
+       <field id="Fer"      long_name="Dissolved Iron Concentration"             unit="mmol/m3" />
+       <field id="BFe"      long_name="Big iron particles Concentration"         unit="mmol/m3" />
+       <field id="GOC"      long_name="Big organic carbon Concentration"         unit="mmol/m3" />
+       <field id="SFe"      long_name="Small iron particles Concentration"       unit="mmol/m3" />
+       <field id="DFe"      long_name="Diatoms iron  Concentration"              unit="mmol/m3" />
+       <field id="GSi"      long_name="Sinking biogenic Silicate Concentration"  unit="mmol/m3" />
+       <field id="NFe"      long_name="Nano iron Concentration"                  unit="mmol/m3" />
+       <field id="NCHL"     long_name="Nano chlorophyl Concentration"            unit="mg/m3"   />
+       <field id="DCHL"     long_name="Diatoms chlorophyl Concentration"         unit="mg/m3"   />
+       <field id="NO3"      long_name="Nitrate Concentration"                    unit="mmol/m3" />
+       <field id="NH4"      long_name="Ammonium Concentration"                   unit="mmol/m3" />
+
+       <!-- PISCES with Kriest parametisation : variables available with key_kriest -->
+       <field id="Num"      long_name="Number of organic particles"              unit="nbr" />
+
+       <!-- PISCES light : variables available with key_pisces_reduced -->
+       <field id="DET"      long_name="Detritus"                                 unit="mmol-N/m3" />
+       <field id="DOM"      long_name="Dissolved Organic Matter"                 unit="mmol-N/m3" />
+
+       <!-- CFC11 : variables available with key_cfc -->
+       <field id="CFC11"    long_name="CFC-11 Concentration"                     unit="umol/L" />
+       <!-- Bomb C14 : variables available with key_c14b -->
+       <field id="C14B"     long_name="Bomb C14 Concentration"                   unit="ration" />
+     </field_group>
+
+      <!-- PISCES additional diagnostics on T grid  -->
+     <field_group id="diad_T" grid_ref="grid_T_2D">
+       <field id="PH"          long_name="PH"                                      unit="-"          grid_ref="grid_T_3D" />
+       <field id="CO3"         long_name="Bicarbonates"                            unit="mol/m3"     grid_ref="grid_T_3D" />
+       <field id="CO3sat"      long_name="CO3 saturation"                          unit="mol/m3"     grid_ref="grid_T_3D" />
+       <field id="PAR"         long_name="Photosynthetically Available Radiation"  unit="W/m2"       grid_ref="grid_T_3D" />
+       <field id="PPPHY"       long_name="Primary production of nanophyto"         unit="molC/m3/s"  grid_ref="grid_T_3D" />
+       <field id="PPPHY2"      long_name="Primary production of diatoms"           unit="molC/m3/s"  grid_ref="grid_T_3D" />
+       <field id="PPNEWN"      long_name="New Primary production of nanophyto"     unit="molC/m3/s"  grid_ref="grid_T_3D" />
+       <field id="PPNEWD"      long_name="New Primary production of diatoms"       unit="molC/m3/s"  grid_ref="grid_T_3D" />
+       <field id="PBSi"        long_name="Primary production of Si diatoms"        unit="molSi/m3/s" grid_ref="grid_T_3D" />
+       <field id="PFeN"        long_name="Primary production of nano iron"         unit="molFe/m3/s" grid_ref="grid_T_3D" />
+       <field id="PFeD"        long_name="Primary production of diatoms iron"      unit="molFe/m3/s" grid_ref="grid_T_3D" />
+       <field id="xfracal"     long_name="Calcifying fraction"                     unit="-"          grid_ref="grid_T_3D" />
+       <field id="PCAL"        long_name="Calcite production"                      unit="molC/m3/s"  grid_ref="grid_T_3D" />
+       <field id="DCAL"        long_name="Calcite dissolution"                     unit="molC/m3/s"  grid_ref="grid_T_3D" />
+       <field id="GRAZ1"       long_name="Grazing by microzooplankton"             unit="molC/m3/s"  grid_ref="grid_T_3D" />
+       <field id="GRAZ2"       long_name="Grazing by mesozooplankton"              unit="molC/m3/s"  grid_ref="grid_T_3D" />
+       <field id="REMIN"       long_name="Oxic remineralization of OM"             unit="molC/m3/s"  grid_ref="grid_T_3D" />
+       <field id="DENIT"       long_name="Anoxic remineralization of OM"           unit="molC/m3/s"  grid_ref="grid_T_3D" />
+       <field id="Nfix"        long_name="Nitrogen fixation"                       unit="molN/m3/s"  grid_ref="grid_T_3D" />
+       <field id="Mumax"       long_name="Maximum growth rate"                     unit="s-1"        grid_ref="grid_T_3D" />
+       <field id="MuN"         long_name="Realized growth rate for nanophyto"      unit="s-1"        grid_ref="grid_T_3D" />
+       <field id="MuD"         long_name="Realized growth rate for diatomes"       unit="s-1"        grid_ref="grid_T_3D" />
+       <field id="LNnut"       long_name="Nutrient limitation term in Nanophyto"   unit="-"          grid_ref="grid_T_3D" />
+       <field id="LDnut"       long_name="Nutrient limitation term in Diatoms"     unit="-"          grid_ref="grid_T_3D" />
+       <field id="LNFe"        long_name="Iron limitation term in Nanophyto"       unit="-"          grid_ref="grid_T_3D" />
+       <field id="LDFe"        long_name="Iron limitation term in Diatoms"         unit="-"          grid_ref="grid_T_3D" />
+       <field id="LNlight"     long_name="Light limitation term in Nanophyto"      unit="-"          grid_ref="grid_T_3D" />
+       <field id="LDlight"     long_name="Light limitation term in Diatoms"        unit="-"          grid_ref="grid_T_3D" />
+       <field id="Fe2"         long_name="Iron II concentration"                   unit="nmol/L"     grid_ref="grid_T_3D" />
+       <field id="Fe3"         long_name="Iron III concentration"                  unit="nmol/L"     grid_ref="grid_T_3D" />
+       <field id="FeL1"        long_name="Complexed Iron concentration with L1"    unit="nmol/L"     grid_ref="grid_T_3D" />
+       <field id="FeL2"        long_name="Complexed Iron concentration with L2"    unit="nmol/L"     grid_ref="grid_T_3D" />
+       <field id="FeP"         long_name="Precipitated Iron III"                   unit="nmol/L"     grid_ref="grid_T_3D" />
+       <field id="TL1"         long_name="Total L1 concentration"                  unit="nmol/L"     grid_ref="grid_T_3D" />
+       <field id="TL2"         long_name="Total L2 concentration"                  unit="nmol/L"     grid_ref="grid_T_3D" />
+       <field id="pdust"       long_name="dust concentration"                      unit="g/L"                          />
+       <field id="Totlig"      long_name="Total ligand concentation"               unit="nmol/L"     grid_ref="grid_T_3D" />
+       <field id="Biron"       long_name="Bioavailable iron"                       unit="nmol/L"     grid_ref="grid_T_3D" />
+       <field id="Sdenit"      long_name="Nitrate reduction in the sediments"      unit="molN/m2/s"                    />
+       <field id="Ironice"     long_name="Iron input/uptake due to sea ice"        unit="molFe/m2/s"                   />
+       <field id="HYDR"        long_name="Iron input from hydrothemal vents"       unit="molFe/m2/s" grid_ref="grid_T_3D" />
+       <field id="EPC100"      long_name="Export of carbon particles at 100 m"     unit="mol/m2/s"                     />
+       <field id="EPFE100"     long_name="Export of biogenic iron at 100 m"        unit="mol/m2/s"                     />
+       <field id="EPSI100"     long_name="Export of Silicate at 100 m"             unit="mol/m2/s"                     />
+       <field id="EPCAL100"    long_name="Export of Calcite at 100 m"              unit="mol/m2/s"                     />
+       <field id="Cflx"        long_name="DIC flux"                                unit="mol/m2/s"                     />
+       <field id="Oflx"        long_name="Oxygen flux"                             unit="mol/m2/s"                     />
+       <field id="Kg"          long_name="Gas transfer"                            unit="mol/m2/s/uatm"                />
+       <field id="Dpco2"       long_name="Delta CO2"                               unit="uatm"                         />
+       <field id="Dpo2"        long_name="Delta O2"                                unit="uatm"                         />
+       <field id="Heup"        long_name="Euphotic layer depth"                    unit="m"                            />
+       <field id="Irondep"     long_name="Iron deposition from dust"               unit="mol/m2/s"                     />
+       <field id="Ironsed"     long_name="Iron deposition from sediment"           unit="mol/m2/s"  grid_ref="grid_T_3D"/>
+
+       <!-- PISCES with Kriest parametisation : variables available with key_kriest -->
+       <field id="POCFlx"      long_name="Particulate organic C flux"              unit="mol/m2/s"   grid_ref="grid_T_3D" />
+       <field id="NumFlx"      long_name="Particle number flux"                    unit="nbr/m2/s"   grid_ref="grid_T_3D" />
+       <field id="SiFlx"       long_name="Biogenic Si flux"                        unit="mol/m2/s"   grid_ref="grid_T_3D" />
+       <field id="CaCO3Flx"    long_name="CaCO3 flux"                              unit="mol/m2/s"   grid_ref="grid_T_3D" />
+       <field id="xnum"        long_name="Number of particles in aggregats"        unit="-"          grid_ref="grid_T_3D" />
+       <field id="W1"          long_name="sinking speed of mass flux"              unit="m2/s"       grid_ref="grid_T_3D" />
+       <field id="W2"          long_name="sinking speed of number flux"            unit="m2/s"       grid_ref="grid_T_3D" />
+
+       <!-- PISCES light : variables available with key_pisces_reduced -->
+       <field id="FNO3PHY"     long_name="FNO3PHY"                                 unit="-"          grid_ref="grid_T_3D" /> 
+       <field id="FNH4PHY"     long_name="FNH4PHY"                                 unit="-"          grid_ref="grid_T_3D" /> 
+       <field id="FNH4NO3"     long_name="FNH4NO3"                                 unit="-"          grid_ref="grid_T_3D" /> 
+       <field id="TNO3PHY"     long_name="TNO3PHY"                                 unit="-"  /> 
+       <field id="TNH4PHY"     long_name="TNH4PHY"                                 unit="-"  /> 
+       <field id="TPHYDOM"     long_name="TPHYDOM"                                 unit="-"  /> 
+       <field id="TPHYNH4"     long_name="TPHYNH4"                                 unit="-"  /> 
+       <field id="TPHYZOO"     long_name="TPHYZOO"                                 unit="-"  /> 
+       <field id="TPHYDET"     long_name="TPHYDET"                                 unit="-"  /> 
+       <field id="TDETZOO"     long_name="TDETZOO"                                 unit="-"  /> 
+       <field id="TZOODET"     long_name="TZOODET"                                 unit="-"  /> 
+       <field id="TZOOBOD"     long_name="TZOOBOD"                                 unit="-"  /> 
+       <field id="TZOONH4"     long_name="TZOONH4"                                 unit="-"  /> 
+       <field id="TZOODOM"     long_name="TZOODOM"                                 unit="-"  /> 
+       <field id="TNH4NO3"     long_name="TNH4NO3"                                 unit="-"  /> 
+       <field id="TDOMNH4"     long_name="TDOMNH4"                                 unit="-"  /> 
+       <field id="TDETNH4"     long_name="TDETNH4"                                 unit="-"  /> 
+       <field id="TPHYTOT"     long_name="TPHYTOT"                                 unit="-"  /> 
+       <field id="TZOOTOT"     long_name="TZOOTOT"                                 unit="-"  /> 
+       <field id="SEDPOC"      long_name="SEDPOC"                                  unit="-"  /> 
+       <field id="TDETSED"     long_name="TDETSED"                                 unit="-"  /> 
+
+       <!-- CFC11 : variables available with key_cfc -->
+       <field id="qtrCFC11"    long_name="Air-sea flux of CFC-11"                   unit="mol/m2/s"   />
+       <field id="qintCFC11"   long_name="Cumulative air-sea flux of CFC-11"        unit="mol/m2"     />
+       <!-- Bomb C14 : variables available with key_c14b -->
+       <field id="qtrC14b"     long_name="Air-sea flux of Bomb C14"                 unit="mol/m2/s"   />
+       <field id="qintC14b"    long_name="Cumulative air-sea flux of Bomb C14"      unit="mol/m2"     />
+       <field id="fdecay"      long_name="Radiactive decay of Bomb C14"             unit="mol/m3"  grid_ref="grid_T_3D"  />
+     </field_group>
+
+    <!-- 
+============================================================================================================
+    -->
+
+    <field_group id="mooring" >
+      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"      />
+      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                   />
+      <field field_ref="uoce"         name="uo"       long_name="sea_water_x_velocity"                 />
+      <field field_ref="voce"         name="vo"       long_name="sea_water_y_velocity"                 />
+      <field field_ref="woce"         name="wo"       long_name="sea_water_z_velocity"                 />
+      <field field_ref="avt"          name="difvho"   long_name="ocean_vertical_heat_diffusivity"      />
+      <field field_ref="avm"          name="difvmo"   long_name="ocean_vertical_momentum_diffusivity"  />
+   
+      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+      <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
+      <field field_ref="sstgrad"      name="tosgrad"  long_name="module_of_sea_surface_temperature_gradient"    />
+      <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+      <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+      <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
+      <field field_ref="qsr"          name="rsntds"   long_name="surface_net_downward_shortwave_flux"           />
+      <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          />
+      <field field_ref="taum"          />
+      <field field_ref="20d"           />
+      <field field_ref="mldkz5"        />
+      <field field_ref="mldr10_1"      />
+      <field field_ref="mldr10_3"      />
+      <field field_ref="mldr0_1"       />
+      <field field_ref="mldr0_3"       />
+      <field field_ref="mld_dt02"      />
+      <field field_ref="topthdep"      />
+      <field field_ref="pycndep"       />
+      <field field_ref="tinv"          />
+      <field field_ref="depti"         />
+      <field field_ref="BLT"          name="blt"      long_name="barrier_layer_thickness"               />
+      <field field_ref="utau"         name="tauuo"    long_name="surface_downward_x_stress"             />
+      <field field_ref="vtau"         name="tauvo"    long_name="surface_downward_y_stress"             />
+    </field_group>
+
+    
+    <field_group id="groupT" >
+      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               />
+      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            />
+      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+      <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
+      <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+      <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+      <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
+      <field field_ref="qsr"          name="rsntds"   long_name="surface_net_downward_shortwave_flux"           />
+      <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          />
+      <field field_ref="taum"         />
+      <field field_ref="20d"          />
+      <field field_ref="mldkz5"       />
+      <field field_ref="mldr10_1"     />
+      <field field_ref="mldr10_3"     />
+      <field field_ref="mld_dt02"     />
+      <field field_ref="topthdep"     />
+      <field field_ref="pycndep"      />
+      <field field_ref="tinv"         />
+      <field field_ref="depti"        />
+      <field field_ref="BLT"          name="blt"      long_name="Barrier Layer Thickness"  />
+    </field_group>
+    
+    <field_group id="groupU" >
+      <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
+      <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+      <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
+    </field_group>
+    
+    <field_group id="groupV" >
+      <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
+      <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+      <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
+    </field_group>
+    
+    <field_group id="groupW" >
+      <field field_ref="woce"         name="wo"       long_name="ocean vertical velocity"  />
+    </field_group>
+    
+    </field_definition>
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x19
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x19	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x19	(revision 2504)
@@ -0,0 +1,54 @@
+## $Id$
+## nombre de pas par jour (multiple de iperiod) ( ici pour  dt = 1 min )      
+day_step=720
+## periode pour le pas Matsuno (en pas)
+iperiod=5
+## choix de l'operateur de dissipation (star ou  non star )
+lstardis=y
+## nombre d'iterations de l'operateur de dissipation   gradiv
+nitergdiv=1
+## nombre d'iterations de l'operateur de dissipation  nxgradrot
+nitergrot=2
+## nombre d'iterations de l'operateur de dissipation  divgrad            
+niterh=2
+## temps de dissipation des plus petites long.d ondes pour u,v (gradiv)  
+tetagdiv=3600.
+## temps de dissipation des plus petites long.d ondes pour u,v(nxgradrot)
+tetagrot=5400.
+## temps de dissipation des plus petites long.d ondes pour  h ( divgrad) 
+tetatemp=5400.
+## coefficient pour gamdissip                                            
+coefdis=0.
+## choix du shema d'integration temporelle (Matsuno ou Matsuno-leapfrog) 
+purmats=n
+## avec ou sans physique                                                 
+physic=y
+## periode de la physique (en pas)                                       
+## iphysiq est modifie pour la nouvelle physique par le lmdz.driver pour les autres cas le valeur par defaut est utilise
+iphysiq=_AUTO_ : DEFAULT = 15
+##  Avec ou sans strato
+ok_strato=n
+#  Couche eponge dans les couches de pression plus faible que 100 fois la pression de la derniere couche
+iflag_top_bound=1
+#  Coefficient pour la couche eponge (valeur derniere couche)
+tau_top_bound=1.e-5
+## longitude en degres du centre du zoom                                 
+clon=0.
+## latitude en degres du centre du zoom                                  
+clat=0.
+## facteur de grossissement du zoom,selon longitude                      
+grossismx=1.0
+## facteur de grossissement du zoom ,selon latitude                      
+grossismy=1.0
+##  Fonction  f(y)  hyperbolique  si = .true.  , sinon  sinusoidale         
+fxyhypb=y
+## extension en longitude  de la zone du zoom  ( fraction de la zone totale)
+dzoomx=0.0
+## extension en latitude de la zone  du zoom  ( fraction de la zone totale)
+dzoomy=0.0
+##raideur du zoom en  X
+taux=3.
+##raideur du zoom en  Y
+tauy=3.
+##  Fonction  f(y) avec y = Sin(latit.) si = .true. , sinon y = latit.         
+ysinus=y
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x39
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x39	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x39	(revision 2504)
@@ -0,0 +1,54 @@
+## $Id$
+## nombre de pas par jour (multiple de iperiod) ( ici pour  dt = 1 min )      
+day_step=720
+## periode pour le pas Matsuno (en pas)
+iperiod=5
+## choix de l'operateur de dissipation (star ou  non star )
+lstardis=y
+## nombre d'iterations de l'operateur de dissipation   gradiv
+nitergdiv=1
+## nombre d'iterations de l'operateur de dissipation  nxgradrot
+nitergrot=2
+## nombre d'iterations de l'operateur de dissipation  divgrad            
+niterh=2
+## temps de dissipation des plus petites long.d ondes pour u,v (gradiv)  
+tetagdiv=3600.
+## temps de dissipation des plus petites long.d ondes pour u,v(nxgradrot)
+tetagrot=5400.
+## temps de dissipation des plus petites long.d ondes pour  h ( divgrad) 
+tetatemp=5400.
+## coefficient pour gamdissip                                            
+coefdis=0.
+## choix du shema d'integration temporelle (Matsuno ou Matsuno-leapfrog) 
+purmats=n
+## avec ou sans physique                                                 
+physic=y
+## periode de la physique (en pas)                                       
+## iphysiq est modifie pour la nouvelle physique par le lmdz.driver pour les autres cas le valeur par defaut est utilise
+iphysiq=_AUTO_ : DEFAULT = 15
+##  Avec ou sans strato
+ok_strato=y
+#  Couche eponge dans les couches de pression plus faible que 100 fois la pression de la derniere couche
+iflag_top_bound=2
+#  Coefficient pour la couche eponge (valeur derniere couche)
+tau_top_bound=5.e-5
+## longitude en degres du centre du zoom                                 
+clon=0.
+## latitude en degres du centre du zoom                                  
+clat=0.
+## facteur de grossissement du zoom,selon longitude                      
+grossismx=1.0
+## facteur de grossissement du zoom ,selon latitude                      
+grossismy=1.0
+##  Fonction  f(y)  hyperbolique  si = .true.  , sinon  sinusoidale         
+fxyhypb=y
+## extension en longitude  de la zone du zoom  ( fraction de la zone totale)
+dzoomx=0.0
+## extension en latitude de la zone  du zoom  ( fraction de la zone totale)
+dzoomy=0.0
+##raideur du zoom en  X
+taux=3.
+##raideur du zoom en  Y
+tauy=3.
+##  Fonction  f(y) avec y = Sin(latit.) si = .true. , sinon y = latit.         
+ysinus=y
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x59
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x59	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x59	(revision 2504)
@@ -0,0 +1,58 @@
+## $Id$
+## nombre de pas par jour (multiple de iperiod) ( ici pour  dt = 1 min )      
+day_step=960
+## periode pour le pas Matsuno (en pas)
+iperiod=5
+## choix de l'operateur de dissipation (star ou  non star )
+lstardis=y
+## nombre d'iterations de l'operateur de dissipation   gradiv
+nitergdiv=1
+## nombre d'iterations de l'operateur de dissipation  nxgradrot
+nitergrot=2
+## nombre d'iterations de l'operateur de dissipation  divgrad            
+niterh=2
+## temps de dissipation des plus petites long.d ondes pour u,v (gradiv)  
+tetagdiv=4800.
+###tetagdiv=900.
+## temps de dissipation des plus petites long.d ondes pour u,v(nxgradrot)
+tetagrot=5400.
+###tetagrot=900.
+## temps de dissipation des plus petites long.d ondes pour  h ( divgrad) 
+tetatemp=5400.
+###tetatemp=900.
+## coefficient pour gamdissip                                            
+coefdis=0.
+## choix du shema d'integration temporelle (Matsuno ou Matsuno-leapfrog) 
+purmats=n
+## avec ou sans physique                                                 
+physic=y
+## periode de la physique (en pas)                                       
+## iphysiq est modifie pour la nouvelle physique par le lmdz.driver pour les autres cas le valeur par defaut est utilise
+iphysiq=5 : DEFAULT = 5
+##  Avec ou sans strato
+ok_strato=y
+#  Couche eponge dans les couches de pression plus faible que 100 fois la pression de la derniere couche
+iflag_top_bound=2
+#  Coefficient pour la couche eponge (valeur derniere couche)
+tau_top_bound=10.e-5
+## longitude en degres du centre du zoom                                 
+clon=0.
+## latitude en degres du centre du zoom                                  
+clat=0.
+## facteur de grossissement du zoom,selon longitude                      
+grossismx=1.0
+## facteur de grossissement du zoom ,selon latitude                      
+grossismy=1.0
+##  Fonction  f(y)  hyperbolique  si = .true.  , sinon  sinusoidale         
+fxyhypb=y
+## extension en longitude  de la zone du zoom  ( fraction de la zone totale)
+dzoomx=0.0
+## extension en latitude de la zone  du zoom  ( fraction de la zone totale)
+dzoomy=0.0
+##raideur du zoom en  X
+taux=3.
+##raideur du zoom en  Y
+tauy=3.
+##  Fonction  f(y) avec y = Sin(latit.) si = .true. , sinon y = latit.         
+ysinus=y
+dissip_period=5
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x79
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x79	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_144x142x79	(revision 2504)
@@ -0,0 +1,96 @@
+## $Id: gcm.def 1403 2010-07-01 09:02:53Z fairhead $
+## nombre de pas par jour (multiple de iperiod) ( ici pour  dt = 1 min )      
+day_step=720
+## periode pour le pas Matsuno (en pas)
+iperiod=5
+## periode de la dissipation (en pas)
+idissip=5
+## choix de l'operateur de dissipation (star ou  non star )
+lstardis=y
+## nombre d'iterations de l'operateur de dissipation   gradiv
+nitergdiv=1
+## nombre d'iterations de l'operateur de dissipation  nxgradrot
+nitergrot=2
+## nombre d'iterations de l'operateur de dissipation  divgrad            
+niterh=2
+## temps de dissipation des plus petites long.d ondes pour u,v (gradiv)  
+tetagdiv=1800.
+## temps de dissipation des plus petites long.d ondes pour u,v(nxgradrot)
+#tetagrot=5400.
+tetagrot=7200.
+## temps de dissipation des plus petites long.d ondes pour  h ( divgrad) 
+tetatemp=5400.
+## coefficient pour gamdissip                                            
+coefdis=0.
+## choix du shema d'integration temporelle (Matsuno:y ou Matsuno-leapfrog:n) 
+purmats=n
+## avec ou sans physique
+## 0: pas de physique (e.g. en mode Shallow Water)
+## 1: avec physique (e.g. physique phylmd)
+## 2: avec rappel newtonien dans la dynamique                                         
+iflag_phys=1
+## avec ou sans fichiers de demarrage (start.nc, startphy.nc) ?
+## (sans fichiers de demarrage, initialisation des champs par iniacademic
+##  dans la dynamique)
+read_start=y
+## periode de la physique (en pas dynamiques, n'a de sens que si iflag_phys=1)                                       
+iphysiq=_AUTO_ : DEFAULT = 5
+#
+#### Verticale discretisation
+## Modified verticale discretisation for stratospheric versions.
+## The new version can be controled by following parameters
+## Al the parameters are given in km assuming a given scalehigh
+vert_sampling=strato_custom
+## scale hight
+vert_scale=7.
+## width of first layer
+vert_dzmin=0.017
+## dz in the low atmosphere
+vert_dzlow=1.
+## height at which resolution recches dzlow
+vert_z0low=8.7
+## dz in the mid atmsophere
+vert_dzmid=2.
+## height at which resolution recches dzmid
+vert_z0mid=70.
+## width of the transition
+vert_h_mid=20.
+## dz in the high atmsophere
+vert_dzhig=11.
+## height at which resolution recches dz
+vert_z0hig=75.
+## width of the transition
+vert_h_hig=20.
+## vert_prof_dissip used to choose the vertical profile
+## of horizontal dissipation (values are 0 and 1)
+vert_prof_dissip = 1
+dissip_zref = 50
+##  Avec ou sans strato
+ok_strato=y 
+ok_hines=y
+#  Couche eponge dans les couches de pression plus faible que 100 fois la pression de la derniere couche
+iflag_top_bound=2
+#  Coefficient pour la couche eponge (valeur derniere couche)
+tau_top_bound=5.e-4
+#
+### Parametres du zoom
+## longitude en degres du centre du zoom                                 
+clon=-90.
+## latitude en degres du centre du zoom                                  
+clat=-15.
+## facteur de grossissement du zoom,selon longitude                      
+grossismx=1.0
+## facteur de grossissement du zoom ,selon latitude                      
+grossismy=1.0
+##  Fonction  f(y)  hyperbolique  si = .true.  , sinon  sinusoidale         
+fxyhypb=y
+## extension en longitude  de la zone du zoom  ( fraction de la zone totale)
+dzoomx=0.15
+## extension en latitude de la zone  du zoom  ( fraction de la zone totale)
+dzoomy=0.15
+##raideur du zoom en  X
+taux=3.
+##raideur du zoom en  Y
+tauy=3.
+##  Fonction  f(y) avec y = Sin(latit.) si = .true. , sinon y = latit.         
+ysinus=y
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_96x95x19
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_96x95x19	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_96x95x19	(revision 2504)
@@ -0,0 +1,54 @@
+## $Id$
+## nombre de pas par jour (multiple de iperiod) ( ici pour  dt = 1 min )      
+day_step=480
+## periode pour le pas Matsuno (en pas)
+iperiod=5
+## choix de l'operateur de dissipation (star ou  non star )
+lstardis=y
+## nombre d'iterations de l'operateur de dissipation   gradiv
+nitergdiv=1
+## nombre d'iterations de l'operateur de dissipation  nxgradrot
+nitergrot=2
+## nombre d'iterations de l'operateur de dissipation  divgrad            
+niterh=2
+## temps de dissipation des plus petites long.d ondes pour u,v (gradiv)  
+tetagdiv=5400.
+## temps de dissipation des plus petites long.d ondes pour u,v(nxgradrot)
+tetagrot=7200.
+## temps de dissipation des plus petites long.d ondes pour  h ( divgrad) 
+tetatemp=7200.
+## coefficient pour gamdissip                                            
+coefdis=0.
+## choix du shema d'integration temporelle (Matsuno ou Matsuno-leapfrog) 
+purmats=n
+## avec ou sans physique                                                 
+physic=y
+## periode de la physique (en pas)                                       
+## iphysiq est modifie pour la nouvelle physique par le lmdz.driver pour les autres cas le valeur par defaut est utilise
+iphysiq=_AUTO_ : DEFAULT = 10
+##  Avec ou sans strato
+ok_strato=n
+#  Couche eponge dans les couches de pression plus faible que 100 fois la pression de la derniere couche
+iflag_top_bound=1
+#  Coefficient pour la couche eponge (valeur derniere couche)
+tau_top_bound=1.e-5
+## longitude en degres du centre du zoom                                 
+clon=0.
+## latitude en degres du centre du zoom                                  
+clat=0.
+## facteur de grossissement du zoom,selon longitude                      
+grossismx=1.0
+## facteur de grossissement du zoom ,selon latitude                      
+grossismy=1.0
+##  Fonction  f(y)  hyperbolique  si = .true.  , sinon  sinusoidale         
+fxyhypb=y
+## extension en longitude  de la zone du zoom  ( fraction de la zone totale)
+dzoomx=0.0
+## extension en latitude de la zone  du zoom  ( fraction de la zone totale)
+dzoomy=0.0
+##raideur du zoom en  X
+taux=3.
+##raideur du zoom en  Y
+tauy=3.
+##  Fonction  f(y) avec y = Sin(latit.) si = .true. , sinon y = latit.         
+ysinus=y
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_96x95x39
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_96x95x39	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/gcm.def_96x95x39	(revision 2504)
@@ -0,0 +1,54 @@
+## $Id$
+## nombre de pas par jour (multiple de iperiod) ( ici pour  dt = 1 min )      
+day_step=480
+## periode pour le pas Matsuno (en pas)
+iperiod=5
+## choix de l'operateur de dissipation (star ou  non star )
+lstardis=y
+## nombre d'iterations de l'operateur de dissipation   gradiv
+nitergdiv=1
+## nombre d'iterations de l'operateur de dissipation  nxgradrot
+nitergrot=2
+## nombre d'iterations de l'operateur de dissipation  divgrad            
+niterh=2
+## temps de dissipation des plus petites long.d ondes pour u,v (gradiv)  
+tetagdiv=5400.
+## temps de dissipation des plus petites long.d ondes pour u,v(nxgradrot)
+tetagrot=5400.
+## temps de dissipation des plus petites long.d ondes pour  h ( divgrad) 
+tetatemp=5400.
+## coefficient pour gamdissip                                            
+coefdis=0.
+## choix du shema d'integration temporelle (Matsuno ou Matsuno-leapfrog) 
+purmats=n
+## avec ou sans physique                                                 
+physic=y
+## periode de la physique (en pas)                                       
+## iphysiq est modifie pour la nouvelle physique par le lmdz.driver pour les autres cas le valeur par defaut est utilise
+iphysiq=_AUTO_ : DEFAULT = 10
+##  Avec ou sans strato
+ok_strato=y 
+#  Couche eponge dans les couches de pression plus faible que 100 fois la pression de la derniere couche
+iflag_top_bound=2
+#  Coefficient pour la couche eponge (valeur derniere couche)
+tau_top_bound=5.e-5
+## longitude en degres du centre du zoom                                 
+clon=0.
+## latitude en degres du centre du zoom                                  
+clat=0.
+## facteur de grossissement du zoom,selon longitude                      
+grossismx=1.0
+## facteur de grossissement du zoom ,selon latitude                      
+grossismy=1.0
+##  Fonction  f(y)  hyperbolique  si = .true.  , sinon  sinusoidale         
+fxyhypb=y
+## extension en longitude  de la zone du zoom  ( fraction de la zone totale)
+dzoomx=0.0
+## extension en latitude de la zone  du zoom  ( fraction de la zone totale)
+dzoomy=0.0
+##raideur du zoom en  X
+taux=3.
+##raideur du zoom en  Y
+tauy=3.
+##  Fonction  f(y) avec y = Sin(latit.) si = .true. , sinon y = latit.         
+ysinus=y
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/guide.def
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/guide.def	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/guide.def	(revision 2504)
@@ -0,0 +1,16 @@
+# ok_guide=y : guidage active
+ok_guide=_AUTO_ : DEFFAULT = n
+#
+guide_u= y
+guide_v= y
+guide_T= n
+guide_P= n
+guide_Q= n
+
+ini_anal=n
+tau_min_u=0.0208333
+tau_max_u=0.125
+tau_min_v=0.0208333
+tau_max_v=0.125
+#tau_min_T=0.0208333
+#tau_max_T=10
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/iodef.xml
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/iodef.xml	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/iodef.xml	(revision 2504)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!-- =========================================================================================================== -->
+<!-- iodef.xml : Configuration file for production of output files using XIOS                                    -->
+<!--             This file contains the context XIOS.                                                            -->
+<!--             The model components context will be add automatically by the comp.driver                       -->
+<!-- =========================================================================================================== -->
+
+<simulation>
+
+  <!-- =========================================================================================================== -->
+  <!-- XIOS context                                                                                                -->
+  <!-- =========================================================================================================== -->
+  <context id="xios">
+
+    <variable_definition>
+	
+     <!-- We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size) -->
+	  <variable id="buffer_size"               type="integer">10000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">1</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+
+  <!-- =========================================================================================================== -->
+  <!-- COMPONENT CONTEXT : the model components context will be add automatically by the comp.driver               -->
+  
+</simulation>
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/iodef.xml_v32
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/iodef.xml_v32	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/iodef.xml_v32	(revision 2504)
@@ -0,0 +1,720 @@
+<?xml version="1.0"?>
+<simulation> 
+  
+  <context id="nemo">
+
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    
+    <field_definition level="0" prec="4" operation="ave(X)" enabled=".TRUE."> <!-- time step automaticaly defined -->
+
+      <!-- T grid -->
+      
+      <group id="grid_T" axis_ref="none" grid_ref="grid_T">
+	<field id="toce"         description="temperature"                               unit="degC" axis_ref="deptht"   />
+       	<field id="soce"         description="salinity"                                  unit="psu"  axis_ref="deptht"   />
+	<field id="sst"          description="sea surface temperature"                   unit="degC"                     />
+	<field id="sst2"         description="square of sea surface temperature"         unit="degC2"                    />
+	<field id="|sstgrad|"    description="module of sst gradient"                    unit="degC/m"                   />
+	<field id="|sstgrad|2"   description="square of module of sst gradient"          unit="degC2/m2"                 />
+	<field id="sss"          description="sea surface salinity"                      unit="psu"                      />
+	<field id="sss2"         description="square of sea surface salinity"            unit="psu2"                     />
+	<field id="ssh"          description="sea surface height"                        unit="m"                        />
+	<field id="ssh2"         description="square of sea surface height"              unit="m2"                       />
+	<field id="mldkz5"       description="mixing layer depth (Turbocline)"           unit="m"                        />
+	<field id="mldr10_1"     description="Mixed Layer Depth 0.01 ref.10m"            unit="m"                        />
+       	<field id="rhop"         description="potential density (sigma0)"                unit="kg/m3" axis_ref="deptht"  />
+	<!-- next variables available with key_diahth -->
+	<field id="mlddzt"       description="Thermocline Depth (max dT/dz)"             unit="m"                        />
+	<field id="mldr10_3"     description="Mixed Layer Depth dr=0.03 (ref.10m)"       unit="m"                        />
+	<field id="mldr0_1"      description="Mixed Layer Depth dr=0.01 (ref.surf)"      unit="m"                        />
+	<field id="mldr0_3"      description="Mixed Layer Depth dr=0.03 (ref.surf)"      unit="m"                        />
+	<field id="mld|dt|"      description="Mixed Layer Depth |dt|=0.2 (ref.10m)"      unit="m"                        />
+	<field id="topthdep"     description="Top of the thermocline dt=-0.2 (ref.10m)"  unit="m"                        />
+	<field id="pycndep"      description="Pycnocline depth dr~dt=-0.2 (ref.10m)"     unit="m"                        />
+	<field id="BLT"          description="Barrier Layer Thickness"                   unit="m"                        />
+	<field id="tinv"         description="Max of vertical invertion of temperature"  unit="degC"                     />
+	<field id="depti"        description="Depth of max. vert. inv. of temperature"   unit="m"                        />
+	<field id="20d"          description="Depth of 20C isotherm"                     unit="m"                        />
+	<field id="28d"          description="Depth of 28C isotherm"                     unit="m"                        />
+	<field id="hc300"        description="Heat content 300 m"                        unit="W"                        />
+	<!-- variables available with key_diaar5 -->
+	<field id="botpres"      description="Pressure at sea floor"                     unit="dbar"                     />
+	<field id="cellthc"      description="Cell thickness"                            unit="m"     axis_ref="deptht"  />
+     </group>
+
+      <!-- SBC -->
+      
+      <group id="SBC" axis_ref="none" grid_ref="grid_T" > <!-- time step automaticaly defined based on nn_fsbc -->
+
+	<field id="emp"          description="Net Upward Water Flux"                                        unit="kg/m2/s"  />
+	<field id="emps"         description="concentration/dilution water flux"                            unit="kg/m2/s"  />
+	<field id="snowpre"      description="Snow precipitation"                                           unit="kg/m2/s"  />
+	<field id="runoffs"      description="River Runoffs"                                                unit="kg/m2/s"  />
+
+	<field id="qns+qsr"      description="Net Downward Heat Flux"                                       unit="W/m2"     />
+	<field id="qns"          description="non solar Downward Heat Flux"                                 unit="W/m2"     />
+	<field id="qsr"          description="Shortwave Radiation"                                          unit="W/m2"     />
+	<field id="qsr3d"        description="Shortwave Radiation 3D distribution"        axis_ref="deptht" unit="W/m2"     />
+	<field id="qrp"          description="Surface Heat Flux: Damping"                                   unit="W/m2"     />
+	<field id="erp"          description="Surface Water Flux: Damping"                                  unit="kg/m2/s"  />
+	<field id="taum"         description="wind stress module"                                           unit="N/m2"     />
+	<field id="wspd"         description="Wind speed module at 10 m"                                    unit="m/s"      />
+	
+	<!-- *_oce variables available with ln_blk_clio or ln_blk_core -->
+	<field id="qns_oce"      description="Non solar Downward Heat Flux over open ocean"                 unit="W/m2"     />
+	<field id="qlw_oce"      description="Longwave Downward Heat Flux over open ocean"                  unit="W/m2"     />
+	<field id="qsb_oce"      description="Sensible Downward Heat Flux over open ocean"                  unit="W/m2"     />
+	<field id="qla_oce"      description="Latent Downward Heat Flux over open ocean"                    unit="W/m2"     />
+	<field id="taum_oce"     description="wind stress module over open ocean"                           unit="N/m2"     />
+
+	<field id="ice_cover"    description="Ice fraction"                                                 unit="1"        />
+
+	<field id="ioceflxb"     description="Oceanic flux at the ice base"                                 unit="W/m2"     />
+	<field id="qsr_ai_cea"   description="Air-Ice downward solar heat flux (cell average)"              unit="W/m2"     />
+	<field id="qns_ai_cea"   description="Air-Ice downward non-solar heat flux (cell average)"          unit="W/m2"     />
+	<field id="qla_ai_cea"   description="Air-Ice downward Latent heat flux (cell average)"             unit="W/m2"     />
+	
+	<field id="qsr_io_cea"   description="Ice-Oce downward solar heat flux (cell average)"              unit="W/m2"     />
+	<field id="qns_io_cea"   description="Ice-Oce downward non-solar heat flux (cell average)"          unit="W/m2"     />
+	
+	<field id="snowthic_cea" description="Snow thickness (cell average)"                                unit="m"        />
+	<field id="icethic_cea"  description="Ice thickness (cell average)"                                 unit="m"        />
+	<field id="iceprod_cea"  description="Ice production (cell average)"                                unit="m/s"      />
+        <field id="sim"          description="Sea Ice Plus Surface Snow Amount"                             unit="kg/m2"    />
+	
+	<field id="ice_pres"     description="Ice presence"                                                 unit="-"        />
+	<field id="ist_cea"      description="Ice surface temperature (cell average)"                       unit="degC"     />
+	<field id="ist_ipa"      description="Ice surface temperature (ice presence average)"               unit="degC"     />      
+	<field id="uice_ipa"     description="Ice velocity along i-axis at I-point (ice presence average)"  unit="m/s"      />      
+	<field id="vice_ipa"     description="Ice velocity along j-axis at I-point (ice presence average)"  unit="m/s"      />      
+	
+	<field id="utau_ice"     description="Wind stress along i-axis over the ice at i-point"             unit="N/m2"     />
+	<field id="vtau_ice"     description="Wind stress along j-axis over the ice at i-point"             unit="N/m2"     />
+	
+	<field id="u_imasstr"    description="Sea-ice mass transport along i-axis"                          unit="kg/s"     />
+	<field id="v_imasstr"    description="Sea-ice mass transport along j-axis"                          unit="kg/s"     />
+
+	<!-- available key_coupled -->
+	<field id="snow_ao_cea"  description="Snow over ice-free ocean (cell average)"                      unit="kg/m2/s"  />
+	<field id="snow_ai_cea"  description="Snow over sea-ice (cell average)"                             unit="kg/m2/s"  />
+	<field id="subl_ai_cea"  description="Sublimation over sea-ice (cell average)"                      unit="kg/m2/s"  />
+	<field id="icealb_cea"   description="Ice albedo (cell average)"                                    unit="1"        />
+	<field id="calving"      description="Calving"                                                      unit="kg/m2/s"  />
+	<!-- available if key_coupled + conservative method -->
+	<field id="rain"         description="Liquid precipitation"                                         unit="kg/m2/s"  />
+	<field id="evap_ao_cea"  description="Evaporation over ice-free ocean (cell average)"               unit="kg/m2/s"  />
+	<!-- variables available with key_diaar5 -->
+	<field id="isnwmlt_cea"   description="Snow over Ice melting (cell average)"                        unit="kg/m2/s"  />
+	<field id="fsal_virt_cea" description="Virtual salt flux due to ice formation (cell average)"       unit="kg/m2/s"  />
+	<field id="fsal_real_cea" description="Real salt flux due to ice formation (cell average)"          unit="kg/m2/s"  />
+	<field id="hflx_rain_cea" description="heat flux due to rainfall"                                   unit="W/m2"     />
+	<field id="hflx_evap_cea" description="heat flux due to evaporation"                                unit="W/m2"     />
+	<field id="hflx_snow_cea" description="heat flux due to snow falling over ice-free ocean"           unit="W/m2"     />
+	<field id="hflx_ice_cea"  description="heat flux due to ice thermodynamics"                         unit="W/m2"     />
+	<field id="hflx_rnf_cea"  description="heat flux due to runoffs"                                    unit="W/m2"     />
+	<field id="hflx_cal_cea"  description="heat flux due to calving"                                    unit="W/m2"     />
+	<field id="bicemel_cea"  description="Rate of Melt at Sea Ice Base (cell average)"                  unit="kg/m2/s"  />
+	<field id="licepro_cea"  description="Lateral Sea Ice Growth Rate (cell average)"                   unit="kg/m2/s"  />
+	<field id="snowmel_cea"  description="Snow Melt Rate (cell average)"                                unit="kg/m2/s"  />
+	<field id="sntoice_cea"  description="Snow-Ice Formation Rate (cell average)"                       unit="kg/m2/s"  />
+	<field id="ticemel_cea"  description="Rate of Melt at Upper Surface of Sea Ice (cell average)"      unit="kg/m2/s"  />
+
+      </group>
+
+      <!-- U grid -->
+      
+      <group id="grid_U"  axis_ref="depthu" grid_ref="grid_U">
+	<field id="utau"         description="Wind Stress along i-axis"                    unit="N/m2" axis_ref="none" />
+	<field id="uoce"         description="ocean current along i-axis"                  unit="m/s"                  />
+	<field id="uoce_eff"     description="Effective ocean current along i-axis"        unit="m/s"                  />
+	<!-- uoce_eiv: available with key_traldf_eiv and key_diaeiv -->
+	<field id="uoce_eiv"     description="EIV ocean current along i-axis"              unit="m/s"                  />
+	<!-- uoce_eiv: available with key_trabbl_adv -->
+	<field id="uoce_bbl"     description="BBL ocean current along i-axis"              unit="m/s"                  />
+ 	<!-- variables available with key_diaar5 -->
+	<field id="u_masstr"     description="ocean eulerian mass transport along i-axis"  unit="kg/s"                 />
+	<field id="u_heattr"     description="ocean eulerian heat transport along i-axis"  unit="W"    axis_ref="none" />
+	<field id="ueiv_heattr"  description="ocean bolus heat transport along i-axis"     unit="W"    axis_ref="none" />
+	<field id="udiff_heattr" description="ocean diffusion heat transport along i-axis" unit="W"    axis_ref="none" />
+     </group>
+      
+      <!-- V grid -->
+      
+      <group id="grid_V"  axis_ref="depthv" grid_ref="grid_V">
+	<field id="vtau"         description="Wind Stress along j-axis"                    unit="N/m2" axis_ref="none" />
+	<field id="voce"         description="ocean current along j-axis"                  unit="m/s"                  />
+	<field id="voce_eff"     description="Effective ocean current along j-axis"        unit="m/s"                  />
+	<!-- voce_eiv: available with key_traldf_eiv and key_diaeiv -->
+	<field id="voce_eiv"     description="EIV ocean current along j-axis"              unit="m/s"                  />
+	<!-- voce_eiv: available with key_trabbl_adv -->
+	<field id="voce_bbl"     description="BBL ocean current along j-axis"              unit="m/s"                  />
+	<!-- variables available with key_diaar5 -->
+	<field id="v_masstr"     description="ocean eulerian mass transport along j-axis"  unit="kg/s"                 />
+	<field id="v_heattr"     description="ocean eulerian heat transport along j-axis"  unit="W"    axis_ref="none" />
+	<field id="veiv_heattr"  description="ocean bolus heat transport along j-axis"     unit="W"    axis_ref="none" />
+	<field id="vdiff_heattr" description="ocean diffusion heat transport along j-axis" unit="W"    axis_ref="none" />
+      </group>
+      
+      <!-- W grid -->
+      
+      <group id="grid_W"  axis_ref="depthw" grid_ref="grid_W">
+	<field id="woce"         description="ocean vertical velocity"                     unit="m/s"                  />
+	<field id="woce_eff"     description="effective ocean vertical velocity"           unit="m/s"                  />
+	<!-- woce_eiv: available with key_traldf_eiv and key_diaeiv -->
+	<field id="woce_eiv"     description="EIV ocean vertical velocity"                 unit="m/s"                  />
+	<!-- woce_eiv: available with key_trabbl_adv -->
+	<field id="woce_bbl"     description="BBL ocean vertical velocity"                 unit="m/s"                  />
+	<field id="avt"          description="vertical eddy diffusivity"                   unit="m2/s"                 />
+	<field id="avm"          description="vertical eddy viscosity"                     unit="m2/s"                 />
+	<!-- avs: available with key_zdfddm -->
+	<field id="avs"          description="salt vertical eddy diffusivity"              unit="m2/s"                 />
+	<!-- avt_evd and avm_evd: available with ln_zdfevd -->
+	<field id="avt_evd"      description="enhanced vertical diffusivity"               unit="m2/s"                 />
+	<field id="avm_evd"      description="enhanced vertical viscosity"                 unit="m2/s"                 />
+	<!-- aht2d and  aht2d_eiv: available with key_traldf_eiv and key_traldf_c2d -->
+	<field id="aht2d"        description="lateral eddy diffusivity"                    unit="m2/s" axis_ref="none" />
+	<field id="aht2d_eiv"    description="EIV lateral eddy diffusivity"                unit="m2/s" axis_ref="none" />
+	<!-- avt_tide: available with key_zdftmx -->
+	<field id="av_tide"      description="tidal vertical diffusivity"                  unit="m2/s"                 />
+	<!-- variables available with key_diaar5 -->   
+	<field id="w_masstr"     description="vertical mass trasport"                      unit="kg/s"                 />
+	<field id="w_masstr2"    description="square of vertical mass trasport"            unit="kg2/s2"               />
+      </group>
+          
+      <!-- scalar -->
+      
+      <!-- variables available with key_diaar5 -->
+      <group id="scalar" axis_ref="none" grid_ref="scalarpoint" zoom_ref="1point" >
+	<field id="voltot"     description="global mean volume"                         unit="m3"   />
+	<field id="sshtot"     description="global mean ssh"                            unit="m"    />
+	<field id="sshsteric"  description="global mean ssh steric"                     unit="m"    />
+	<field id="sshthster"  description="global mean ssh thermosteric"               unit="m"    />
+	<field id="masstot"    description="global mean mass"                           unit="kg"   />
+	<field id="temptot"    description="global mean temperature"                    unit="degC" />
+	<field id="saltot"     description="global mean salinity"                       unit="psu"  />
+	<field id="fram_trans" description="Sea Ice Mass Transport Through Fram Strait" unit="kg/s" />
+      </group>
+
+      <!-- ptrc on T grid -->
+          
+     <group id="ptrc_T" axis_ref="deptht" grid_ref="grid_T">  
+       <field id="DIC"      description="Dissolved inorganic Concentration"        unit="molC/L" />
+       <field id="Alkalini" description="Total Alkalinity Concentration"           unit="eq/L"    />
+       <field id="O2"       description="Oxygen Concentration"                     unit="molO2/L" />
+       <field id="CaCO3"    description="Calcite Concentration"                    unit="molC/L" />
+       <field id="PO4"      description="Phosphate Concentration"                  unit="molC/L" />
+       <field id="POC"      description="Small organic carbon Concentration"       unit="molC/L" />
+       <field id="Si"       description="Silicate Concentration"                   unit="molSi/L" />
+       <field id="PHY"      description="Nanophytoplankton Concentration"          unit="molC/L" />
+       <field id="ZOO"      description="Microzooplankton Concentration"           unit="molC/L" />
+       <field id="DOC"      description="Dissolved organic Concentration"          unit="molC/L" />
+       <field id="PHY2"     description="Diatoms Concentration"                    unit="molC/L" />
+       <field id="ZOO2"     description="Mesozooplankton Concentration"            unit="molC/L" />
+       <field id="BSi"      description="Diatoms Silicate Concentration"           unit="molC/L" />
+       <field id="Fer"      description="Dissolved Iron Concentration"             unit="molFe/L" />
+       <field id="BFe"      description="Big iron particles Concentration"         unit="molFe/L" />
+       <field id="GOC"      description="Big organic carbon Concentration"         unit="molC/L" />
+       <field id="SFe"      description="Small iron particles Concentration"       unit="molFe/L" />
+       <field id="DFe"      description="Diatoms iron  Concentration"              unit="molFe/L" />
+       <field id="DSi"      description="Sinking biogenic Silicate Concentration"  unit="molC/L" />
+       <field id="NFe"      description="Nano iron Concentration"                  unit="molC/L" />
+       <field id="NCHL"     description="Nano chlorophyl Concentration"            unit="gChl/L" />
+       <field id="DCHL"     description="Diatoms chlorophyl Concentration"         unit="gChl/L" />
+       <field id="NO3"      description="Nitrates Concentration"                   unit="molC/L" />
+       <field id="NH4"      description="Ammonium Concentration"                   unit="molC/L" />
+     </group>
+
+      <!-- diad on T grid : : variables available with key_trc_diaadd && key_trc_dia3d -->
+
+     <group id="diad_T" axis_ref="none" grid_ref="grid_T">
+       <field id="PH"          description="PH"                                       unit="-"           axis_ref="deptht" />
+       <field id="CO3"         description="Bicarbonates"                             unit="mol/L"       axis_ref="deptht" />
+       <field id="CO3sat"      description="CO3 saturation"                           unit="mol/L"       axis_ref="deptht" />
+       <field id="PAR"         description="Photosynthetically Available Radiation"   unit="W/m2"        axis_ref="deptht" />
+       <field id="PPPHY"       description="Primary production of nanophyto"          unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="PPPHY2"      description="Primary production of diatoms"            unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="PPNEWN"      description="New Primary production of nanophyto"      unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="PPNEWD"      description="New Primary production of diatoms"        unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="PBSi"        description="Primary production of Si diatoms"         unit="molSi/m3/s"  axis_ref="deptht" />
+       <field id="PFeN"        description="Primary production of nano iron"          unit="molFe/m3/s"  axis_ref="deptht" />
+       <field id="PFeD"        description="Primary production of diatoms iron"       unit="molFe/m3/s"  axis_ref="deptht" />
+       <field id="PCAL"        description="Calcite production"                       unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="DCAL"        description="Calcite dissolution"                      unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="GRAZ"        description="Grazing by zooplankton"                   unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="Nfix"        description="Nitrogen fixation at surface"             unit="molN/m2/s"      />
+       <field id="EPC100"      description="Export of carbon particles at 100 m"      unit="molC/m2/s"      />
+       <field id="EPFE100"     description="Export of biogenic iron at 100 m"         unit="molFe/m2/s"     />
+       <field id="EPSI100"     description="Export of Silicate at 100 m"              unit="molSi/m2/s"     />
+       <field id="EPCAL100"    description="Export of Calcite at 100 m"               unit="molC/m2/s"      />
+       <field id="Cflx"        description="DIC flux"                                 unit="molC/m2/s"      />
+       <field id="Oflx"        description="Oxygen flux"                              unit="molC/m2/s"      />
+       <field id="Kg"          description="Gas transfer"                             unit="molC/m2/s/uatm" />
+       <field id="Dpco2"       description="Delta CO2"                                unit="uatm"            />
+       <field id="Dpo2"        description="Delta O2"                                 unit="uatm"            />
+       <field id="Heup"        description="Euphotic layer depth"                     unit="m"               />
+       <field id="Irondep"     description="Iron deposition"                          unit="molFe/m2/s"     />
+     </group>
+
+      <!-- dbio_T on T grid : variables available with key_diaar5 -->
+     <group id="dbio_T" axis_ref="none" grid_ref="grid_T">
+       <field id="PHYT"        description="Total phytoplankton Concentration"                   unit="molC/L"     axis_ref="deptht" />
+       <field id="ZOOT"        description="Total zooplankton Concentration"                     unit="molC/L"     axis_ref="deptht" />
+       <field id="CHLT"        description="Total chlorophyll Concentration"                     unit="gChl/L"     axis_ref="deptht" />
+       <field id="POCT"        description="Total carbon particles Concentration"                unit="molC/L"     axis_ref="deptht" />
+       <field id="PFET"        description="Total biogenic Iron Concentration"                   unit="molFe/L"     axis_ref="deptht" />
+       <field id="TPP"         description="Total Primary production of phyto"                   unit="molC/m3/s"  axis_ref="deptht" />
+       <field id="TPNEW"       description="New Primary production of phyto"                     unit="molC/m3/s"  axis_ref="deptht" />
+       <field id="TPBFE"       description="Total biogenic iron production"                      unit="molFe/m3/s" axis_ref="deptht" />
+       <field id="EXPC"        description="Export of carbon"                                    unit="molC/m2/s"  axis_ref="deptht" />
+       <field id="EXPFE"       description="Export of biogenic iron"                             unit="molFe/m2/s" axis_ref="deptht" />
+       <field id="EXPSI"       description="Export of Silicate"                                  unit="molSi/m2/s" axis_ref="deptht" />
+       <field id="EXPCAL"      description="Export of Calcite"                                   unit="molC/m2/s"  axis_ref="deptht" />
+       <field id="PHSFC"       description="PH at surface"                                       unit="-"       />
+       <field id="INTDIC"      description="DIC content"                                         unit="kg/m2"   />
+       <field id="O2MIN"       description="Oxygen minimum concentration"                        unit="molC/L" />
+       <field id="ZO2MIN"      description="Depth of oxygen minimum concentration"               unit="m"       />
+       <field id="INTNFIX"     description="Nitrogen fixation rate : vert. integrated"           unit="molN/m2/s"  />
+       <field id="INTPPPHY"    description="Vertically integrated primary production by nanophy" unit="molC/m2/s"  />
+       <field id="INTPPPHY2"   description="Vertically integrated primary production by diatom"  unit="molC/m2/s"  />
+       <field id="INTPP"       description="Vertically integrated primary production by phyto"   unit="molC/m2/s"  />
+       <field id="INTPNEW"     description="Vertically integrated new primary production"        unit="molC/m2/s"  />
+       <field id="INTPBFE"     description="Vertically integrated of biogenic iron production"   unit="molFe/m2/s" />
+       <field id="INTPBSI"     description="Vertically integrated of biogenic Si production"     unit="molSi/m2/s" />
+       <field id="INTPCAL"     description="Vertically integrated of calcite production"         unit="molSi/m2/s" />
+     </group>
+
+    </field_definition>
+    
+    <!-- 
+============================================================================================================
+=                                                                                                          =
+=                                           output files definition                                        =
+=                                                                                                          =
+=                  http://www2-pcmdi.llnl.gov/svn/repository/cmor/trunk/Tables/CMIP5_Oclim                 =
+=                  http://www2-pcmdi.llnl.gov/svn/repository/cmor/trunk/Tables/CMIP5_Omon                  =
+=                  http://www2-pcmdi.llnl.gov/svn/repository/cmor/trunk/Tables/CMIP5_Oimon                 =              
+=          http://www.clivar.org/organization/wgomd/references/WGOMD_CMIP5_ocean_fields.June2009.pdf       =
+=                                                                                                          =
+============================================================================================================
+    -->
+    
+    <file_definition output_level="<OUTPUT_LEVEL>" >
+      <!--
++++++++++++++++++++++++++++++++++++++++++++++++   daily   ++++++++++++++++++++++++++++++++++++++++++++++++++
+        -->
+      <group id="1d" output_freq="86400"  enabled="<1D_ENABLE>">                             <!-- 1d files -->
+	<!--
+..............................................    grid T   .................................................
+	  -->
+	<file id="ORCA2_1d_grid_T" description="table 2.2" >                                 <!-- grid T  Table 2.2 -->
+	  <field ref="sst"          name="sosstsst" description="sea_surface_temperature"                              level="2"                      />
+	  <field ref="sst2"         name="tossq"    description="square_of_sea_surface_temperature"                    level="2"                      />
+	  <field ref="mldkz5"       name="omldamax" description="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="t_max(X)" />
+         <!--  IPSL variables -->
+	  <field ref="sss"          name="sosaline" description="sea_surface_salinity"                                 level="3"                      />
+	  <field ref="ssh"          name="sossheig" description="sea_surface_height_above_geoid"                       level="3"                      />
+	  <field ref="toce"         name="votemper" description="sea_water_potential_temperature"                      level="3"                      />
+	  <field ref="soce"         name="vosaline" description="sea_water_salinity"                                   level="3"                      />
+	</file> 
+	<!--
+..............................................    grid U   .................................................
+	  -->
+	<file id="ORCA2_1d_grid_U" description="ocean U grid variables : table 2.3" >                       <!-- grid U -->
+
+	  <!--  table 2.3 -->
+	    <field ref="uoce"         name="vozocrtx" description="sea_water_x_velocity"                                level="3"       />
+
+	</file> 
+
+	<!--
+..............................................    grid V   .................................................
+	  -->
+	<file id="ORCA2_1d_grid_V" description="ocean V grid variables : table 2.3" >                      <!-- grid V -->
+
+	  <!-- table 2.3 -->
+	    <field ref="voce"         name="vomecrty" description="sea_water_y_velocity"                                level="3"       />
+
+	</file>   
+  
+	<!--
+..............................................    icemod   .................................................
+	  -->
+	<file id="ORCA2_1d_icemod" description=" ice variables" >                                           <!-- icemod -->
+
+         <!-- table 2.2 -->
+          <field ref="uice_ipa"     name="iicevelu"   description="Ice velocity along i-axis at I-point (ice presence average)"  level="2"    />
+          <field ref="vice_ipa"     name="iicevelv"   description="Ice velocity along j-axis at I-point (ice presence average)"  level="2"    />
+          <field ref="ice_cover"    name="ileadfra"   description="sea_ice_area_fraction"                                        level="2"    />
+	  <field ref="icethic_cea"  name="iicethic"   description="sea_ice_thickness"                                            level="2"    />
+	</file>   
+
+      </group>
+	<!--
+++++++++++++++++++++++++++++++++++++++++++++++   monthly   +++++++++++++++++++++++++++++++++++++++++++++++++
+	  -->
+      <group id="1m" output_freq="-1"     enabled="<1M_ENABLE>">                             <!-- real monthly files -->
+	<!--
+..............................................    grid T   .................................................
+	  -->
+	<file id="ORCA2_1m_grid_T" description="ocean T grid variables table 2.2 2.5 2.6 2.7"> <!-- grid T -->
+
+          <!-- table 2.2 -->
+	    <field ref="botpres"      name="pbo"      description="sea_water_pressure_at_sea_floor"                               />
+	    <!-- pso : sea_water_pressure_at_sea_water_surface = 0 -->
+	    <field ref="ssh"          name="sossheig" description="sea_surface_height_above_geoid"                                 />
+	    <field ref="ssh2"         name="zossq"    description="square_of_sea_surface_height_above_geoid"             level="2" />
+	    <!-- masscello : sea_water_mass_per_unit_area = cellthc*rau0                                          no time changes -->
+	    <field ref="cellthc"      name="thkcello" description="cell_thickness"                                                 /> <!-- no time changes -->
+	    <field ref="toce"         name="votemper" description="sea_water_potential_temperature"                                />
+	    <field ref="sst"          name="sosstsst" description="sea_surface_temperature"                              level="1" />
+	    <field ref="sst2"         name="tossq"    description="square_of_sea_surface_temperature"                    level="2" />
+	    <field ref="soce"         name="vosaline" description="sea_water_salinity"                                             />
+	    <field ref="sss"          name="sosaline" description="sea_surface_salinity"                                 level="1" />
+	    <field ref="rhop"         name="rhopoto"  description="sea_water_potential_density"                          level="2" />
+	    <!-- no agessc : sea_water_age_since_surface_contact -->
+	    <!-- no cfc11  : moles_per_unit_mass_of_cfc11_in_sea_water -->
+	    <!-- msftbarot : ocean_barotropic_mass_streamfunction : offline -->
+	    <!-- mlotst    :           ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline -->
+	    <!-- mlotstsq  : square_of_ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline -->
+	    <field ref="mldkz5"       name='omlmax'   description="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="t_max(X)" />
+
+          <!-- table 2.5 -->
+	    <field ref="rain"         name="pr"       description="rainfall_flux"                                           level="1" />
+	    <field ref="snow_ao_cea"  name="prsn"     description="snowfall_flux"                                           level="1" />
+	    <field ref="evap_ao_cea"  name="evs"      description="water_evaporation_flux"                                  level="1" />
+	    <field ref="runoffs"      name="friver"   description="water_flux_into_sea_water_from_rivers"                   level="1" />
+	    <field ref="calving"      name="ficeberg" description="water_flux_into_sea_water_from_icebergs"                 level="1" />
+	    <field ref="isnwmlt_cea"  name="fsitherm" description="water_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" />
+	    <field ref="emp"          name="sowaflup" description="water_flux_into_sea_water"                               level="1" />
+	    <!-- wfonocorr : water_flux_into_sea_water_without_flux_correction : emp - erp -->  
+	    <field ref="erp"          name="wfcorr"   description="water_flux_correction"                                   level="1" /> <!-- usually = 0 -->
+
+          <!-- table2.6 -->
+	    <!-- vsfpr    : virtual_salt_flux_into_sea_water_due_to_rainfall    = 0 --> 
+	    <!-- vsfevap  : virtual_salt_flux_into_sea_water_due_to_evaporation = 0 --> 
+	    <!-- vsfriver : virtual_salt_flux_into_sea_water_from_rivers        = 0 --> 	  
+	    <field ref="fsal_virt_cea" name="vsfsit" description="virtual_salt_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" />
+	    <!-- vsf      : virtual_salt_flux_into_sea_water = fsal_virtual + fsal_real -->
+	    <!-- wfcorr   : virtual_salt_flux_correction                        = 0 --> 
+	    <field ref="fsal_virt_cea" name="sfdsi"  description="downward_sea_ice_basal_salt_flux"                               level="1" />
+	    <!-- sfriver  : salt_flux_into_sea_water_from_rivers                = 0 --> 
+
+          <!--  table 2.7 -->
+	    <!-- hfgeou : upward_geothermal_heat_flux_at_sea_floor : cte, see nambbc and trabbc.F90 -->
+	    <field ref="hflx_rain_cea" name="hfrainds"    description="temperature_flux_due_to_rainfall_expressed_as_heat_flux_into_sea_water"      level="1" />
+	    <field ref="hflx_evap_cea" name="hfevapds"    description="temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water" level="1" />
+	    <field ref="hflx_rnf_cea"  name="hfrunoffds"  description="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water"        level="1" />
+	    <field ref="hflx_snow_cea" name="hfsnthermds" description="heat_flux_into_sea_water_due_to_snow_thermodynamics"                         level="1" />
+	    <field ref="hflx_ice_cea"  name="hfsithermds" description="heat_flux_into_sea_water_due_to_sea_ice_thermodynamics"                      level="1" />
+	    <field ref="hflx_cal_cea"  name="hfibthermds" description="heat_flux_into_sea_water_due_to_iceberg_thermodynamics"                      level="1" />
+	    <!-- rlds   : surface_net_downward_longwave_flux : not available -->
+	    <!-- hfls   : surface_downward_latent_heat_flux  : not available -->
+	    <!-- hfss   : surface_downward_sensible_heat_flux: not available -->
+	    <field ref="qns"           name="nshfls"      description="surface_net_downward_non_solar_flux"                                         level="1" />
+	    <field ref="qsr"           name="soshfldo"    description="surface_net_downward_shortwave_flux"                                         level="1" />
+	    <field ref="qsr3d"         name="rsds"        description="downwelling_shortwave_flux_in_sea_water"                                     level="1" />
+	    <field ref="qrp"           name="hfcorr"      description="heat_flux_correction"                                                        level="1" />
+
+         <!--  IPSL variables -->
+        <field ref="qns+qsr"           name="sohefldo"    description="Net Downward Heat Flux"                                   />
+	<field ref="20d"               name="so20chgt"    description="Depth of 20C isotherm"                                    />
+	<field ref="28d"               name="so28chgt"    description="Depth of 28C isotherm"                                    />
+	<field ref="hc300"             name="sohtc300"    description="Heat content 300 m"                                       />
+	<field ref="mldr10_1"          name="somxl010"    description="Mixed Layer Depth 0.01 ref.10m"                           />
+	<field ref="mldr10_3"          name="somx3010"    description="Mixed Layer Depth dr=0.03 (ref.10m)"                      />
+	<field ref="mldkz5"            name="somixhgt"    description="mixing layer depth (Turbocline)"                          />
+	<field ref="emps"              name="sowaflcd"    description="concentration/dilution water flux"                        />
+	<field ref="taum"              name="sotaumod"    description="Wind stress module"                                       />
+	<field ref="wspd"              name="sowindsp"    description="Wind speed module at 10 m"                                />
+	<field ref="ice_cover"         name="soicecov"    description="sea_ice_area_fraction"                                    />
+	<field ref="BLT"               name="blt"         description="Barrier Layer Thickness"                    level="3"     />
+	<field ref="mld|dt|"           name="mld_dt02"    description="Mixed Layer Depth |dt|=0.2 (ref.10m)"       level="3"     />
+
+	  </file>   
+	<!--
+..............................................    grid U   .................................................
+	  -->
+	<file id="ORCA2_1m_grid_U" description="ocean U grid variables : table 2.3 2.8" >                       <!-- grid U -->
+
+	  <!--  table 2.3 -->
+	    <field ref="uoce"         name="vozocrtx" description="sea_water_x_velocity"                                       />
+	    <field ref="u_masstr"     name="umo"      description="ocean_mass_x_transport"                           level="1" />
+	    <field ref="u_heattr"     name="hfx"      description="ocean_heat_x_transport"                           level="1" />
+	    <field ref="ueiv_heattr"  name="hfxba"    description="ocean_heat_x_transport_due_to_bolus_advection"    level="2" />
+	    <field ref="udiff_heattr" name="hfxdiff"  description="ocean_heat_x_transport_due_to_diffusion"          level="2" />
+
+	  <!-- table 2.8 -->
+	    <field ref="utau"         name="sozotaux" description="surface_downward_x_stress"                        level="1" />
+	    <!-- tauucorr : surface_downward_x_stress_correction = 0 -->
+
+         <!--  IPSL variables -->
+        <field ref="uoce_eiv"         name="vozoeivu" description="EIV ocean current along i-axis"                             />
+
+        </file>   
+
+	<!--
+..............................................    grid V   .................................................
+	  -->
+	<file id="ORCA2_1m_grid_V" description="ocean V grid variables : table 2.3 2.8" >                      <!-- grid V -->
+
+	  <!-- table 2.3" -->
+	    <field ref="voce"         name="vomecrty" description="sea_water_y_velocity"                                       />
+	    <field ref="v_masstr"     name="vmo"      description="ocean_mass_y_transport"                           level="1" />
+	    <field ref="v_heattr"     name="hfy"      description="ocean_heat_y_transport"                           level="1" />
+	    <field ref="veiv_heattr"  name="hfyba"    description="ocean_heat_y_transport_due_to_bolus_advection"    level="2" />
+	    <field ref="vdiff_heattr" name="hfydiff"  description="ocean_heat_y_transport_due_to_diffusion"          level="2" />
+
+	  <!-- table 2.8 -->
+	    <field ref="vtau"         name="sometauy" description="surface_downward_y_stress"                        level="1" />
+	    <!-- tauvcorr : surface_downward_y_stress_correction = 0 -->
+
+         <!--  IPSL variables -->
+        <field ref="voce_eiv"         name="vomeeivv" description="EIV ocean current along j-axis"                             />
+
+	</file>   
+
+	<!--
+..............................................    grid W   .................................................
+	  -->
+	<file id="ORCA2_1m_grid_W" description="ocean W grid variables table 2.3 2.9 2.10" >                   <!-- grid W -->
+	  
+	  <!-- table 2.3 -->
+	    <field ref="w_masstr"   name="wmo"   description="upward_ocean_mass_transport"                                    />
+	    <field ref="w_masstr2"  name="wmosq" description="square_pf_upward_ocean_mass_transport"                          />
+	  
+	  <!-- table 2.9 -->
+	    <field ref="avt"     name="votkeavt" description="ocean_vertical_heat_diffusivity"                  level="2" />
+	    <field ref="avs"     name="voddmavs" description="ocean_vertical_salt_diffusivity"                  level="2" />
+	    <!-- difvtrbo : ocean_vertical_tracer_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb and  nn_havtb -->
+	    <field ref="av_tide" name="difvtrto" description="ocean_vertical_tracer_diffusivity_due_to_tides"   level="2" />
+	    <!-- tnpeo     : tendency_of_ocean_potential_energy_content                   : not available -->
+	    <!-- tnpeot    : tendency_of_ocean_potential_energy_content_due_to_tides      : not available -->
+	    <!-- tnpeotb   : tendency_of_ocean_potential_energy_content_due_to_background : not available -->
+	    <field ref="avm"     name="difvmo"   description="ocean_vertical_momentum_diffusivity"              level="2" />
+	    <!-- difvmbo : ocean_vertical_momentum_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb -->
+	    <field ref="av_tide" name="difvmto"  description="ocean_vertical_momentum_diffusivity_due_to_tides" level="2" /> <!-- same as tracer -->
+	    <!-- difvmfdo : ocean_vertical_momentum_diffusivity_due_to_form_drag : ??? -->
+	    <!-- dispkevfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_vertical_friction : not available -->
+
+	  <!-- table 2.10 -->
+	    <!-- if ln_traldf_lap    =  .true. -->
+	    <field ref="aht2d_eiv" name="soleaeiw" description="ocean_tracer_bolus_laplacian_diffusivity"                     level="2" />
+	    <!-- diftrelo : ocean_tracer_epineutral_laplacian_diffusivity : cte with time, see ln_traldf_iso -->
+	    <!-- diftrxylo : ocean_tracer_xy_laplacian_diffusivity : cte with time -->
+	    <field ref="aht2d"     name="soleahtw" description="ocean_tracer_xy_laplacian_diffusivity"                        level="2" />
+	    <!-- if ln_traldf_bilap  =  .true. -->
+	    <!-- field ref="diftrbbo" name="aht2d_eiv" description="ocean_tracer_bolus_biharmonic_diffusivity"                level="2" /-->
+	    <!-- diftrebo : ocean_tracer_epineutral_biharmonic_diffusivity : cte with time, see ln_traldf_iso -->
+	    <!-- diftrxybo : ocean_tracer_xy_biharmonic_diffusivity : cte with time -->
+	    <!-- tnkebto : tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport : not available -->
+	    <!-- difmxylo : ocean_momentum_xy_laplacian_diffusivity : cte with time, see ln_dynldf_lap -->
+	    <!-- difmxybo : ocean_momentum_xy_biharmonic_diffusivity : cte with time, see ln_dynldf_bilap -->
+	    <!-- dispkexyfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction : not available -->
+
+         <!--  IPSL variables -->
+        <field ref="woce"             name="vovecrtz" description="ocean vertical velocity"                          />
+        <field ref="woce_eiv"         name="voveeivw" description="EIV ocean vertical velocity"                      />
+
+
+	  </file>   
+
+	<!--
+..............................................    icemod   .................................................
+	  -->
+	<file id="ORCA2_1m_icemod" description=" ice variables" >                                           <!-- icemod -->
+         <!-- table 2.2 -->
+	  <field ref="ice_pres"                     />
+	  <field ref="ice_cover"    name="soicecov"   description="sea_ice_area_fraction"                            />
+	  <field ref="icethic_cea"  name="iicethic"   description="sea_ice_thickness"                                />
+	  <field ref="subl_ai_cea"  name="evap"       description="water_evaporation_flux"                           />
+	  <field ref="snowthic_cea" name="isnowthi"   description="surface_snow_thickness"                           />
+          <field ref="sim"          name="sim"        description="sea_ice_and_surface_snow_amount"                  />
+	  <!-- snc : surface_snow_area_fraction : same as sic -->
+	  <field ref="icealb_cea"   name="ialb"       description="Bare Sea Ice Albedo"                              />
+	  <!-- ssi : Sea Ice Salinity : cte = sice = 6, expect in baltic sea = 2 -->
+	  <field ref="ist_cea"      name="tsice"      description="Surface Temperature of Sea Ice"                   />
+	  <!-- tsnint : Temperature at Interface Between Sea Ice and Snow : not available -->
+	  <!-- pr : Surface Rainfall Rate into the Sea Ice Portion of the Grid Cell = 0 -->
+	  <field ref="snow_ai_cea"  name="prsn"       description="Surface Snowfall Rate into the Sea Ice Portion of the Grid Cell" />
+	  <!-- ageice   : Age of Sea Ice : not available ??? -->
+	  <!-- grFrazil : Frazil Sea Ice Growth (Leads) Rate ??? -->
+	  <!-- grCongel : Congelation Sea Ice Growth Rate ??? -->
+	  <field ref="licepro_cea"  name="grLateral"  description="Lateral Sea Ice Growth Rate"                      />
+	  <field ref="sntoice_cea"  name="snoToIce"   description="Snow-Ice Formation Rate"                          />
+	  <field ref="snowmel_cea"  name="snomelt"    description="Snow Melt Rate"                                   />
+	  <field ref="ticemel_cea"  name="tmelt"      description="Rate of Melt at Upper Surface of Sea Ice"         />
+	  <field ref="bicemel_cea"  name="bmelt"      description="Rate of Melt at Sea Ice Base"                     />
+	  <!-- hcice  : Sea Ice Total Heat Content ??? -->
+	  <field ref="qsr_ai_cea"   name="rsdssi"     description="surface_downwelling_shortwave_flux_in_air"        />
+	  <!-- rsussi : surface_upwelling_shortwave_flux_in_air ??? -->
+	  <!-- rldssi : surface_downwelling_longwave_flux_in_air ??? -->
+	  <!-- rlussi : surface_upwelling_longwave_flux_in_air ??? -->
+	  <!-- hfssi  : surface_upward_sensible_heat_flux ??? -->
+	  <!-- hflssi : surface_upward_latent_heat_flux ??? -->
+	  <field ref="subl_ai_cea"  name="sblsi"      description="surface_snow_and_ice_sublimation_flux"             />
+	  <field ref="u_imasstr"    name="transix"    description="Eastward Sea Ice Transport"                        />
+	  <field ref="v_imasstr"    name="transiy"    description="Northward Sea Ice Transport"                       />
+	  <field ref="fram_trans"   name="transifs"   description="Sea Ice Mass Transport Through Fram Strait"        />
+	  <field ref="utau_ice"     name="strairx"    description="Eastward Atmospheric Stress On Sea Ice"            />
+	  <field ref="vtau_ice"     name="strairy"    description="Northward Atmospheric Stress On Sea Ice"           />
+	  <!-- strocnx : Eastward Ocean Stress On Sea Ice ??? -->
+	  <!-- strocny : Northward Ocean Stress On Sea Ice ??? -->
+	  <!-- streng  : Compressive Sea Ice Strength ??? -->
+	  <!-- divice  : Strain Rate Divergence of Sea Ice ??? -->
+	  <!-- shrice  : Strain Rate Shear of Sea Ice ??? -->
+	  <!-- ridgice : Sea Ice Ridging Rate ??? -->
+         <!-- IPSL variables -->
+          <field ref="ist_ipa"    name="iicetemp"   description="Ice surface temperature (ice presence average)"               />
+          <field ref="uice_ipa"   name="iicevelu"   description="Ice velocity along i-axis at I-point (ice presence average)"  />
+          <field ref="vice_ipa"   name="iicevelv"   description="Ice velocity along j-axis at I-point (ice presence average)"  />
+          <field ref="ice_cover"  name="ileadfra"   description="sea_ice_area_fraction"                                        />
+
+	</file>   
+
+	<!--
+..............................................    scalar   .................................................
+	  -->
+	<file id="ORCA2_1m_scalar" description="Ocean scalar" >                                <!-- scalar -->
+         <!-- table 2.2 -->
+	  <field ref="masstot"    name="masso"    description="sea_water_mass"                                />
+	  <field ref="voltot"     name="volo"     description="sea_water_volume"                              />
+	  <field ref="sshtot"     name="zosga"    description="global_average_sea_level_change"               />
+	  <field ref="sshsteric"  name="zossga"   description="global_average_steric_sea_level_change"        />
+	  <field ref="sshthster"  name="zostoga"  description="global_average_thermosteric_sea_level_change"  />
+	  <field ref="temptot"    name="thetaoga" description="sea_water_potential_temperature"               />
+	  <field ref="saltot"     name="soga"     description="sea_water_salinity"                            />
+	</file>   
+
+        <!--
+..............................................   ptrc_T   .................................................
+          -->
+        <file id="ORCA2_1m_ptrc_T" description="Marine Biogeochemical 3-D Fields" >            <!-- ptrc_T -->
+          <field ref="DIC"      />
+          <field ref="Alkalini" />
+          <field ref="O2"       />
+          <field ref="CaCO3"    />
+          <field ref="PO4"      />
+          <field ref="POC"      />
+          <field ref="Si"       />
+          <field ref="PHY"      />
+          <field ref="ZOO"      />
+          <field ref="DOC"      />
+          <field ref="PHY2"     />
+          <field ref="ZOO2"     />
+          <field ref="BSi"      />
+          <field ref="Fer"      />
+          <field ref="BFe"      />
+          <field ref="GOC"      />
+          <field ref="SFe"      />
+          <field ref="DFe"      />
+          <field ref="DSi"      />
+          <field ref="NFe"      />
+          <field ref="NCHL"     />
+          <field ref="DCHL"     />
+          <field ref="NO3"      />
+          <field ref="NH4"      />
+       </file>
+
+        <!--
+..............................................  diad_T   .................................................
+          -->
+       <file id="ORCA2_1m_diad_T" description="Marine Biogeochemical Fields : Additional diagnostics" >
+          <field ref="PH"       />
+          <field ref="CO3"      />
+          <field ref="CO3sat"   />
+          <field ref="PAR"      />
+          <field ref="PPPHY"    />
+          <field ref="PPPHY2"   />
+          <field ref="PPNEWN"   />
+          <field ref="PPNEWD"   />
+          <field ref="PBSi"     />
+          <field ref="PFeN"     />
+          <field ref="PFeD"     />
+          <field ref="PCAL"     />
+          <field ref="DCAL"     />
+          <field ref="GRAZ"     />
+          <field ref="EPC100"   />
+          <field ref="EPFE100"  />
+          <field ref="EPSI100"  />
+          <field ref="EPCAL100" />
+          <field ref="Cflx"     />
+          <field ref="Oflx"     />
+          <field ref="Kg"       />
+          <field ref="Dpco2"    />
+          <field ref="Dpo2"     />
+          <field ref="Heup"     />
+          <field ref="Irondep"  />
+          <field ref="Nfix"     />
+       </file>
+
+        <!--
+..............................................  dbio_T   .................................................
+          -->
+       <file id="ORCA2_1m_dbio_T" description="Marine Biogeochemical Fields : Additional AR5 variables" enabled="<DBIO_ENABLE>" >
+          <field ref="PHYT"        />
+          <field ref="ZOOT"        />
+          <field ref="CHLT"        />
+          <field ref="POCT"        />
+          <field ref="PFET"        />
+          <field ref="TPP"         />
+          <field ref="TPNEW"       />
+          <field ref="TPBFE"       />
+          <field ref="EXPC"        />
+          <field ref="EXPFE"       />
+          <field ref="EXPSI"       />
+          <field ref="EXPCAL"      />
+          <field ref="INTDIC"      />
+          <field ref="O2MIN"       />
+          <field ref="ZO2MIN"      />
+          <field ref="INTNFIX"     />
+          <field ref="INTPPPHY"    />
+          <field ref="INTPPPHY2"   />
+          <field ref="INTPP"       />
+          <field ref="INTPNEW"     />
+          <field ref="INTPBFE"     />
+          <field ref="INTPBSI"     />
+          <field ref="INTPCAL"     />
+       </file>
+
+      </group>   
+
+      <!-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+        -->
+    </file_definition>
+    
+    <!-- 
+============================================================================================================
+=                                           grid definition                                                =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    
+    <axis_definition>  
+      <axis id="deptht" description="Vertical T levels" unit="m" positive=".false." />
+      <axis id="depthu" description="Vertical U levels" unit="m" positive=".false." />
+      <axis id="depthv" description="Vertical V levels" unit="m" positive=".false." />
+      <axis id="depthw" description="Vertical W levels" unit="m" positive=".false." />
+      <axis id="none" description="axe non defini" unit="none" size="1" />
+    </axis_definition> 
+    
+    <grid_definition>
+      <grid id="grid_T" description="grid T" />
+      <grid id="grid_U" description="grid U" />
+      <grid id="grid_V" description="grid V" />
+      <grid id="grid_W" description="grid W" />
+      <grid id="scalarpoint" description="scalar" >
+	<zoom id="1point" ibegin="1" jbegin="1" ni="1" nj="1" />
+      </grid>
+    </grid_definition>    
+    
+  </context>
+  
+</simulation>
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA1xLMD144142
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA1xLMD144142	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA1xLMD144142	(revision 2504)
@@ -0,0 +1,461 @@
+###############################################################################
+#
+#      Input file for OASIS3
+# 
+#      This version is for use with IPSL_CM4_v1 
+#
+#      The file will be edited at runtime to update it for
+#         - the initial date of the run
+#
+###############################################################################
+#  
+#      Input delimiters have to occupy position 1 to 9 !
+#      No blank lines allowed !
+#      Length of input lines <= 80 !
+#
+###############################################################################
+#
+# NFIELDS : total number of fields being exchanged.
+#
+ $NFIELDS
+            25
+ $END
+###############################################################################
+#
+# NBMODEL : number of models and their names (CHAR*6).
+#
+ $NBMODEL
+  2  LMDZ oceanx
+ $END
+###############################################################################
+# 
+# RUNTIME: total simulated time for the actual run in seconds (<I8)
+#
+ $RUNTIME
+  <total_time>
+ $END
+###############################################################################
+#
+# NLOGPRT: printing level in debug file : 
+#
+ $NLOGPRT
+   2 <lucia_ok>
+ $END
+# 
+###############################################################################
+ $STRINGS
+###############################################################################
+#
+#                      OCEAN  --->>>  ATMOS
+#                      --------------------
+# Field 1 : Weighted sea surface temperature (o->a 1)
+# 
+O_SSTSST  SISUTESW 1 <freq_coupling>  4  sstoc.nc  <output_mode> 
+362 292 144 143 torc  tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+# LOCTRANS: AVERAGE to average value over coupling period
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Mozaic: 1) mapping filename 2) connected unit 3) dataset rank 4) Maximum
+#         number of overlapped neighbors
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 2 : Sea ice extent  (o->a 2)
+#
+OIceFrc SIICECOV 44 <freq_coupling>  4  sstoc.nc <output_mode>
+362 292 144 143 torc  tlmd   LAG=<lag_oce>
+P  2 P  0
+#
+LOCTRANS CHECKIN MAPPING  CHECKOUT 
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+# Field 3 : Weighted Sea Ice Temperature (o->a 3)
+#
+O_TepIce  SIICTEMW 34 <freq_coupling>  4  sstoc.nc  <output_mode>
+362 292 144 143 torc  tlmd   LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# 
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 4 : Weighted Sea ice albedo (o->a 4)
+#
+O_AlbIce  SIICEALW 17 <freq_coupling>  4  sstoc.nc  <output_mode>
+362 292 144 143 torc  tlmd  LAG=<lag_oce>  
+P  2 P  0
+#
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+# Field 5 : Current surface (o->a 5)
+O_OCurx1 CURRENTX 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+362 292 144 143 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1  
+#
+#
+############################################################################
+#
+# Field 6 : Current surface (o->a 6)
+O_OCury1 CURRENTY 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+362 292 144 143 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#  
+############################################################################
+#
+# Field 7 : Current surface (o->a 7)
+O_OCurz1 CURRENTZ 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+362 292 144 143 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+#                      ATMOSPHERE  --->>>  OCEAN
+#                      -------------------------
+############################################################################   
+#
+# Field 8 : wind stress along X axis (a->o 1)
+#
+COTAUXXU O_OTaux1 23 <freq_coupling>  3  flxat.nc   <output_mode>
+144 143 362 292 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 9 : stress along Y axis (a->o 2)
+#
+COTAUYYU O_OTauy1 23 <freq_coupling>  3  flxat.nc  <output_mode>
+144 143 362 292 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 10 :wind stress along Z axis (a->o 3)
+#
+COTAUZZU O_OTauz1 23 <freq_coupling>  3  flxat.nc  <output_mode>
+144 143 362 292 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 11 : wind stress along X axis 2 (a->o 4)
+#
+COTAUXXV O_OTaux2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+144 143 362 292 tlmd    vorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 12 : wind stress along Y axis 2 (a->o 5) 
+#
+COTAUYYV O_OTauy2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+144 143 362 292 tlmd    vorc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 13 :  wind stress along Z axis 2 (a->o 6) 
+#
+COTAUZZV O_OTauz2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+144 143 362 292 tlmd    vorc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+# Field 14 :  wind speed 10m (a->o 7) 
+#
+COWINDSP O_Wind10  56 <freq_coupling>  3    flxat.nc  <output_mode>
+144 143 362 292 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+# 
+#########################################################################
+#
+# Field 15 : Total rain (a->o 8)
+#
+COTOTRAI OTotRain 26 <freq_coupling>  3   flxat.nc   <output_mode>
+144 143 362 292 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 16 :  Total snow (a->o 9)
+#
+COTOTSNO  OTotSnow 28 <freq_coupling>  3   flxat.nc   <output_mode>
+144 143 362 292 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 17 : Total evap (a->o 10)
+#
+COTOTEVA  OTotEvap 25 <freq_coupling>  3   flxat.nc   <output_mode>
+144 143 362 292 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 18 : Evaporation Ice  (a->o 11)
+#
+COICEVAP OIceEvap 41 <freq_coupling>  3   flxat.nc   <output_mode>
+144 143 362 292 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 19 : Total solar heat flux (a->o 12)
+#
+COQSRMIX O_QsrMix  7 <freq_coupling> 3   flxat.nc  <output_mode>
+144 143 362 292 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method or mozaic parameters
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 20 : Total Non solar heat flux (a->o 13)
+#
+COQNSMIX O_QnsMix 6 <freq_coupling>  3   flxat.nc  <output_mode>
+144 143 362 292 tlmd    torc   LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 21 : solar heat flux on ice (a->o 14)
+#
+COSHFICE O_QsrIce  7 <freq_coupling> 3   flxat.nc  <output_mode>
+144 143 362 292 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method or mozaic parameters
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 22 : Non solar heat flux on ice (a->o 15)
+#
+CONSFICE O_QnsIce 6 <freq_coupling>  3  flxat.nc  <output_mode>
+144 143 362 292 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 23 : Non solar heat flux derivative (a->o 16)
+#
+CODFLXDT O_dQnsdT  35 <freq_coupling>  3   flxat.nc  <output_mode>
+144 143 362 292 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 24 : iceberg calving (a->o 17)
+#
+COCALVIN OCalving  36 <freq_coupling>  4  flxat.nc  <output_mode>
+144 143 362 292 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING BLASNEW CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC_calvin.nc src
+# Set to ZERO \!/
+0.0 0
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 25 : liquid run-off (river + direct)  (a->o 18)
+#
+COLIQRUN  O_Runoff 32 <freq_coupling>  5  flxat.nc   <output_mode>
+144 143 362 292 aone    otot  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CONSERV BLASNEW CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+# weights convert from kg/s to kg/m^2/s
+rmp_tlmd_to_torc_MOSAIC_rivflu.nc dst
+# CONSERV
+GLOBAL bfb
+# change units from m/s to kg/s
+0.0 0
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+# Field 26 : wind stress module (a->o 19)
+#
+##COTAUMOD  O_TauMod 466 <freq_coupling>  6   flxat.nc   <output_mode>
+##tlmd    torc  LAG=<lag_atm> 
+##P  0 P  2
+##INVERT CHECKIN MASK EXTRAP INTERP CHECKOUT
+# Reverse
+##NORSUD WSTEST
+# CHECKIN: indicate computation of global, land and sea field integrals.
+## INT=1
+# Mask value
+##888888.
+# Extrapolation method
+##NINENN 2 1 1
+# Interpolation method
+##BICUBIPS  Z   SCALAR
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+## INT=1
+#
+#########################################################################
+#
+ $END
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA1xLMD9695
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA1xLMD9695	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA1xLMD9695	(revision 2504)
@@ -0,0 +1,461 @@
+###############################################################################
+#
+#      Input file for OASIS3
+# 
+#      This version is for use with IPSL_CM4_v1 
+#
+#      The file will be edited at runtime to update it for
+#         - the initial date of the run
+#
+###############################################################################
+#  
+#      Input delimiters have to occupy position 1 to 9 !
+#      No blank lines allowed !
+#      Length of input lines <= 80 !
+#
+###############################################################################
+#
+# NFIELDS : total number of fields being exchanged.
+#
+ $NFIELDS
+            25
+ $END
+###############################################################################
+#
+# NBMODEL : number of models and their names (CHAR*6).
+#
+ $NBMODEL
+  2  LMDZ oceanx
+ $END
+###############################################################################
+# 
+# RUNTIME: total simulated time for the actual run in seconds (<I8)
+#
+ $RUNTIME
+  <total_time>
+ $END
+###############################################################################
+#
+# NLOGPRT: printing level in debug file : 
+#
+ $NLOGPRT
+   2 <lucia_ok>
+ $END
+# 
+###############################################################################
+ $STRINGS
+###############################################################################
+#
+#                      OCEAN  --->>>  ATMOS
+#                      --------------------
+# Field 1 : Weighted sea surface temperature (o->a 1)
+# 
+O_SSTSST  SISUTESW 1 <freq_coupling>  4  sstoc.nc  <output_mode> 
+362 292 96 96 torc  tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+# LOCTRANS: AVERAGE to average value over coupling period
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Mozaic: 1) mapping filename 2) connected unit 3) dataset rank 4) Maximum
+#         number of overlapped neighbors
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 2 : Sea ice extent  (o->a 2)
+#
+OIceFrc SIICECOV 44 <freq_coupling>  4  sstoc.nc <output_mode>
+362 292 96 96 torc  tlmd   LAG=<lag_oce>
+P  2 P  0
+#
+LOCTRANS CHECKIN MAPPING  CHECKOUT 
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+# Field 3 : Weighted Sea Ice Temperature (o->a 3)
+#
+O_TepIce  SIICTEMW 34 <freq_coupling>  4  sstoc.nc  <output_mode>
+362 292 96 96 torc  tlmd   LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# 
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 4 : Weighted Sea ice albedo (o->a 4)
+#
+O_AlbIce  SIICEALW 17 <freq_coupling>  4  sstoc.nc  <output_mode>
+362 292 96 96 torc  tlmd  LAG=<lag_oce>  
+P  2 P  0
+#
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+# Field 5 : Current surface (o->a 5)
+O_OCurx1 CURRENTX 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+362 292 96 96 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1  
+#
+#
+############################################################################
+#
+# Field 6 : Current surface (o->a 6)
+O_OCury1 CURRENTY 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+362 292 96 96 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#  
+############################################################################
+#
+# Field 7 : Current surface (o->a 7)
+O_OCurz1 CURRENTZ 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+362 292 96 96 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+#                      ATMOSPHERE  --->>>  OCEAN
+#                      -------------------------
+############################################################################   
+#
+# Field 8 : wind stress along X axis (a->o 1)
+#
+COTAUXXU O_OTaux1 23 <freq_coupling>  3  flxat.nc   <output_mode>
+96 96 362 292 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 9 : stress along Y axis (a->o 2)
+#
+COTAUYYU O_OTauy1 23 <freq_coupling>  3  flxat.nc  <output_mode>
+96 96 362 292 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 10 :wind stress along Z axis (a->o 3)
+#
+COTAUZZU O_OTauz1 23 <freq_coupling>  3  flxat.nc  <output_mode>
+96 96 362 292 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 11 : wind stress along X axis 2 (a->o 4)
+#
+COTAUXXV O_OTaux2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+96 96 362 292 tlmd    vorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 12 : wind stress along Y axis 2 (a->o 5) 
+#
+COTAUYYV O_OTauy2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+96 96 362 292 tlmd    vorc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 13 :  wind stress along Z axis 2 (a->o 6) 
+#
+COTAUZZV O_OTauz2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+96 96 362 292 tlmd    vorc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+# Field 14 :  wind speed 10m (a->o 7) 
+#
+COWINDSP O_Wind10  56 <freq_coupling>  3    flxat.nc  <output_mode>
+96 96 362 292 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+# 
+#########################################################################
+#
+# Field 15 : Total rain (a->o 8)
+#
+COTOTRAI OTotRain 26 <freq_coupling>  3   flxat.nc   <output_mode>
+96 96 362 292 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 16 :  Total snow (a->o 9)
+#
+COTOTSNO  OTotSnow 28 <freq_coupling>  3   flxat.nc   <output_mode>
+96 96 362 292 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 17 : Total evap (a->o 10)
+#
+COTOTEVA  OTotEvap 25 <freq_coupling>  3   flxat.nc   <output_mode>
+96 96 362 292 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 18 : Evaporation Ice  (a->o 11)
+#
+COICEVAP OIceEvap 41 <freq_coupling>  3   flxat.nc   <output_mode>
+96 96 362 292 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 19 : Total solar heat flux (a->o 12)
+#
+COQSRMIX O_QsrMix  7 <freq_coupling> 3   flxat.nc  <output_mode>
+96 96 362 292 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method or mozaic parameters
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 20 : Total Non solar heat flux (a->o 13)
+#
+COQNSMIX O_QnsMix 6 <freq_coupling>  3   flxat.nc  <output_mode>
+96 96 362 292 tlmd    torc   LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 21 : solar heat flux on ice (a->o 14)
+#
+COSHFICE O_QsrIce  7 <freq_coupling> 3   flxat.nc  <output_mode>
+96 96 362 292 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method or mozaic parameters
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 22 : Non solar heat flux on ice (a->o 15)
+#
+CONSFICE O_QnsIce 6 <freq_coupling>  3  flxat.nc  <output_mode>
+96 96 362 292 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 23 : Non solar heat flux derivative (a->o 16)
+#
+CODFLXDT O_dQnsdT  35 <freq_coupling>  3   flxat.nc  <output_mode>
+96 96 362 292 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 24 : iceberg calving (a->o 17)
+#
+COCALVIN OCalving  36 <freq_coupling>  4  flxat.nc  <output_mode>
+96 96 362 292 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING BLASNEW CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC_calvin.nc src
+# Set to ZERO \!/
+0.0 0
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 25 : liquid run-off (river + direct)  (a->o 18)
+#
+COLIQRUN  O_Runoff 32 <freq_coupling>  5  flxat.nc   <output_mode>
+96 96 362 292 aone    otot  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CONSERV BLASNEW CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+# weights convert from kg/s to kg/m^2/s
+rmp_tlmd_to_torc_MOSAIC_rivflu.nc dst
+# CONSERV
+GLOBAL bfb
+# change units from m/s to kg/s
+0.0 0
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+# Field 26 : wind stress module (a->o 19)
+#
+##COTAUMOD  O_TauMod 466 <freq_coupling>  6   flxat.nc   <output_mode>
+##tlmd    torc  LAG=<lag_atm> 
+##P  0 P  2
+##INVERT CHECKIN MASK EXTRAP INTERP CHECKOUT
+# Reverse
+##NORSUD WSTEST
+# CHECKIN: indicate computation of global, land and sea field integrals.
+## INT=1
+# Mask value
+##888888.
+# Extrapolation method
+##NINENN 2 1 1
+# Interpolation method
+##BICUBIPS  Z   SCALAR
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+## INT=1
+#
+#########################################################################
+#
+ $END
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA2xLMD144142
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA2xLMD144142	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA2xLMD144142	(revision 2504)
@@ -0,0 +1,459 @@
+###############################################################################
+#
+#      Input file for OASIS3
+# 
+#      This version is for use with IPSL_CM4_v1 
+#
+#      The file will be edited at runtime to update it for
+#         - the initial date of the run
+#
+###############################################################################
+#  
+#      Input delimiters have to occupy position 1 to 9 !
+#      No blank lines allowed !
+#      Length of input lines <= 80 !
+#
+###############################################################################
+#
+# NFIELDS : total number of fields being exchanged.
+#
+ $NFIELDS
+            25
+ $END
+###############################################################################
+#
+# NBMODEL : number of models and their names (CHAR*6).
+#
+ $NBMODEL
+  2  LMDZ oceanx
+ $END
+###############################################################################
+# 
+# RUNTIME: total simulated time for the actual run in seconds (<I8)
+#
+ $RUNTIME
+  <total_time>
+ $END
+###############################################################################
+#
+# NLOGPRT: printing level in debug file : 
+#
+ $NLOGPRT
+   2 <lucia_ok>
+ $END
+# 
+###############################################################################
+ $STRINGS
+###############################################################################
+#
+#                      OCEAN  --->>>  ATMOS
+#                      --------------------
+# Field 1 : Weighted sea surface temperature (o->a 1)
+# 
+O_SSTSST  SISUTESW 1 <freq_coupling>  4  sstoc.nc  <output_mode> 
+182 149 144 143 torc  tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+# LOCTRANS: AVERAGE to average value over coupling period
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Mozaic: 1) mapping filename 2) connected unit 3) dataset rank 4) Maximum
+#         number of overlapped neighbors
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 2 : Sea ice extent  (o->a 2)
+#
+OIceFrc SIICECOV 44 <freq_coupling>  4  sstoc.nc <output_mode>
+182 149 144 143 torc  tlmd   LAG=<lag_oce>
+P  2 P  0
+#
+LOCTRANS CHECKIN MAPPING  CHECKOUT 
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+# Field 3 : Weighted Sea Ice Temperature (o->a 3)
+#
+O_TepIce  SIICTEMW 34 <freq_coupling>  4  sstoc.nc  <output_mode>
+182 149 144 143 torc  tlmd   LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# 
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 4 : Weighted Sea ice albedo (o->a 4)
+#
+O_AlbIce  SIICEALW 17 <freq_coupling>  4  sstoc.nc  <output_mode>
+182 149 144 143 torc  tlmd  LAG=<lag_oce>  
+P  2 P  0
+#
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+# Field 5 : Current surface (o->a 5)
+O_OCurx1 CURRENTX 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+182 149 144 143 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1  
+#
+#
+############################################################################
+#
+# Field 6 : Current surface (o->a 6)
+O_OCury1 CURRENTY 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+182 149 144 143 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#  
+############################################################################
+#
+# Field 7 : Current surface (o->a 7)
+O_OCurz1 CURRENTZ 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+182 149 144 143 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+#                      ATMOSPHERE  --->>>  OCEAN
+#                      -------------------------
+############################################################################   
+#
+# Field 8 : wind stress along X axis (a->o 1)
+#
+COTAUXXU O_OTaux1 23 <freq_coupling>  3  flxat.nc   <output_mode>
+144 143 182 149 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 9 : stress along Y axis (a->o 2)
+#
+COTAUYYU O_OTauy1 23 <freq_coupling>  3  flxat.nc  <output_mode>
+144 143 182 149 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 10 :wind stress along Z axis (a->o 3)
+#
+COTAUZZU O_OTauz1 23 <freq_coupling>  3  flxat.nc  <output_mode>
+144 143 182 149 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 11 : wind stress along X axis 2 (a->o 4)
+#
+COTAUXXV O_OTaux2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+144 143 182 149 tlmd    vorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 12 : wind stress along Y axis 2 (a->o 5) 
+#
+COTAUYYV O_OTauy2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+144 143 182 149 tlmd    vorc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 13 :  wind stress along Z axis 2 (a->o 6) 
+#
+COTAUZZV O_OTauz2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+144 143 182 149 tlmd    vorc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+# Field 14 :  wind speed 10m (a->o 7) 
+#
+COWINDSP O_Wind10  56 <freq_coupling>  3    flxat.nc  <output_mode>
+144 143 182 149 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+# 
+#########################################################################
+#
+# Field 15 : Total rain (a->o 8)
+#
+COTOTRAI OTotRain 26 <freq_coupling>  3   flxat.nc   <output_mode>
+144 143 182 149 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 16 :  Total snow (a->o 9)
+#
+COTOTSNO  OTotSnow 28 <freq_coupling>  3   flxat.nc   <output_mode>
+tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 17 : Total evap (a->o 10)
+#
+COTOTEVA  OTotEvap 25 <freq_coupling>  3   flxat.nc   <output_mode>
+144 143 182 149 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 18 : Evaporation Ice  (a->o 11)
+#
+COICEVAP OIceEvap 41 <freq_coupling>  3   flxat.nc   <output_mode>
+tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 19 : Total solar heat flux (a->o 12)
+#
+COQSRMIX O_QsrMix  7 <freq_coupling> 3   flxat.nc  <output_mode>
+144 143 182 149 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method or mozaic parameters
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 20 : Total Non solar heat flux (a->o 13)
+#
+COQNSMIX O_QnsMix 6 <freq_coupling>  3   flxat.nc  <output_mode>
+tlmd    torc   LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 21 : solar heat flux on ice (a->o 14)
+#
+COSHFICE O_QsrIce  7 <freq_coupling> 3   flxat.nc  <output_mode>
+144 143 182 149 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method or mozaic parameters
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 22 : Non solar heat flux on ice (a->o 15)
+#
+CONSFICE O_QnsIce 6 <freq_coupling>  3  flxat.nc  <output_mode>
+tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 23 : Non solar heat flux derivative (a->o 16)
+#
+CODFLXDT O_dQnsdT  35 <freq_coupling>  3   flxat.nc  <output_mode>
+144 143 182 149 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 24 : iceberg calving (a->o 17)
+#
+COCALVIN OCalving  36 <freq_coupling>  3  flxat.nc  <output_mode>
+144 143 182 149 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC_calvin.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 25 : liquid run-off (river + direct)  (a->o 18)
+#
+COLIQRUN  O_Runoff 32 <freq_coupling>  5  flxat.nc   <output_mode>
+144 143 182 149 aone    otot  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CONSERV BLASNEW CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+# weights convert from kg/s to kg/m^2/s
+rmp_tlmd_to_torc_MOSAIC_rivflu.nc dst
+# CONSERV
+GLOBAL bfb
+# change units from m/s to kg/s
+1000.0 0
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+# Field 26 : wind stress module (a->o 19)
+#
+##COTAUMOD  O_TauMod 466 <freq_coupling>  6   flxat.nc   <output_mode>
+##tlmd    torc  LAG=<lag_atm> 
+##P  0 P  2
+##INVERT CHECKIN MASK EXTRAP INTERP CHECKOUT
+# Reverse
+##NORSUD WSTEST
+# CHECKIN: indicate computation of global, land and sea field integrals.
+## INT=1
+# Mask value
+##888888.
+# Extrapolation method
+##NINENN 2 1 1
+# Interpolation method
+##BICUBIPS  Z   SCALAR
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+## INT=1
+#
+#########################################################################
+#
+ $END
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA2xLMD9695
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA2xLMD9695	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namcouple_ORCA2xLMD9695	(revision 2504)
@@ -0,0 +1,459 @@
+###############################################################################
+#
+#      Input file for OASIS3
+# 
+#      This version is for use with IPSL_CM4_v1 
+#
+#      The file will be edited at runtime to update it for
+#         - the initial date of the run
+#
+###############################################################################
+#  
+#      Input delimiters have to occupy position 1 to 9 !
+#      No blank lines allowed !
+#      Length of input lines <= 80 !
+#
+###############################################################################
+#
+# NFIELDS : total number of fields being exchanged.
+#
+ $NFIELDS
+            25
+ $END
+###############################################################################
+#
+# NBMODEL : number of models and their names (CHAR*6).
+#
+ $NBMODEL
+  2  LMDZ oceanx
+ $END
+###############################################################################
+# 
+# RUNTIME: total simulated time for the actual run in seconds (<I8)
+#
+ $RUNTIME
+  <total_time>
+ $END
+###############################################################################
+#
+# NLOGPRT: printing level in debug file : 
+#
+ $NLOGPRT
+   2 <lucia_ok>
+ $END
+# 
+###############################################################################
+ $STRINGS
+###############################################################################
+#
+#                      OCEAN  --->>>  ATMOS
+#                      --------------------
+# Field 1 : Weighted sea surface temperature (o->a 1)
+# 
+O_SSTSST  SISUTESW 1 <freq_coupling>  4  sstoc.nc  <output_mode> 
+182 149 96 96 torc  tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+# LOCTRANS: AVERAGE to average value over coupling period
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Mozaic: 1) mapping filename 2) connected unit 3) dataset rank 4) Maximum
+#         number of overlapped neighbors
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 2 : Sea ice extent  (o->a 2)
+#
+OIceFrc SIICECOV 44 <freq_coupling>  4  sstoc.nc <output_mode>
+182 149 96 96 torc  tlmd   LAG=<lag_oce>
+P  2 P  0
+#
+LOCTRANS CHECKIN MAPPING  CHECKOUT 
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+# Field 3 : Weighted Sea Ice Temperature (o->a 3)
+#
+O_TepIce  SIICTEMW 34 <freq_coupling>  4  sstoc.nc  <output_mode>
+182 149 96 96 torc  tlmd   LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# 
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 4 : Weighted Sea ice albedo (o->a 4)
+#
+O_AlbIce  SIICEALW 17 <freq_coupling>  4  sstoc.nc  <output_mode>
+182 149 96 96 torc  tlmd  LAG=<lag_oce>  
+P  2 P  0
+#
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+# Field 5 : Current surface (o->a 5)
+O_OCurx1 CURRENTX 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+182 149 96 96 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1  
+#
+#
+############################################################################
+#
+# Field 6 : Current surface (o->a 6)
+O_OCury1 CURRENTY 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+182 149 96 96 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#  
+############################################################################
+#
+# Field 7 : Current surface (o->a 7)
+O_OCurz1 CURRENTZ 321 <freq_coupling>  4  sstoc.nc  <output_mode>
+182 149 96 96 torc    tlmd  LAG=<lag_oce>
+P  2 P  0
+LOCTRANS CHECKIN MAPPING CHECKOUT
+ AVERAGE
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+rmp_torc_to_tlmd_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#
+############################################################################
+#
+#                      ATMOSPHERE  --->>>  OCEAN
+#                      -------------------------
+############################################################################   
+#
+# Field 8 : wind stress along X axis (a->o 1)
+#
+COTAUXXU O_OTaux1 23 <freq_coupling>  3  flxat.nc   <output_mode>
+96 96 182 149 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 9 : stress along Y axis (a->o 2)
+#
+COTAUYYU O_OTauy1 23 <freq_coupling>  3  flxat.nc  <output_mode>
+96 96 182 149 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 10 :wind stress along Z axis (a->o 3)
+#
+COTAUZZU O_OTauz1 23 <freq_coupling>  3  flxat.nc  <output_mode>
+96 96 182 149 tlmd    uorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 11 : wind stress along X axis 2 (a->o 4)
+#
+COTAUXXV O_OTaux2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+96 96 182 149 tlmd    vorc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 12 : wind stress along Y axis 2 (a->o 5) 
+#
+COTAUYYV O_OTauy2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+96 96 182 149 tlmd    vorc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 13 :  wind stress along Z axis 2 (a->o 6) 
+#
+COTAUZZV O_OTauz2  24 <freq_coupling>  3    flxat.nc  <output_mode>
+96 96 182 149 tlmd    vorc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+# Field 14 :  wind speed 10m (a->o 7) 
+#
+COWINDSP O_Wind10  56 <freq_coupling>  3    flxat.nc  <output_mode>
+96 96 182 149 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN SCRIPR CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+BILINEAR LR SCALAR LATLON 10
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+# 
+#########################################################################
+#
+# Field 15 : Total rain (a->o 8)
+#
+COTOTRAI OTotRain 26 <freq_coupling>  3   flxat.nc   <output_mode>
+96 96 182 149 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 16 :  Total snow (a->o 9)
+#
+COTOTSNO  OTotSnow 28 <freq_coupling>  3   flxat.nc   <output_mode>
+96 96 182 149 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 17 : Total evap (a->o 10)
+#
+COTOTEVA  OTotEvap 25 <freq_coupling>  3   flxat.nc   <output_mode>
+96 96 182 149 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 18 : Evaporation Ice  (a->o 11)
+#
+COICEVAP OIceEvap 41 <freq_coupling>  3   flxat.nc   <output_mode>
+96 96 182 149 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+##########################################################################
+#
+# Field 19 : Total solar heat flux (a->o 12)
+#
+COQSRMIX O_QsrMix  7 <freq_coupling> 3   flxat.nc  <output_mode>
+96 96 182 149 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method or mozaic parameters
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 20 : Total Non solar heat flux (a->o 13)
+#
+COQNSMIX O_QnsMix 6 <freq_coupling>  3   flxat.nc  <output_mode>
+96 96 182 149 tlmd    torc   LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+###########################################################################
+#
+# Field 21 : solar heat flux on ice (a->o 14)
+#
+COSHFICE O_QsrIce  7 <freq_coupling> 3   flxat.nc  <output_mode>
+96 96 182 149 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method or mozaic parameters
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 22 : Non solar heat flux on ice (a->o 15)
+#
+CONSFICE O_QnsIce 6 <freq_coupling>  3  flxat.nc  <output_mode>
+96 96 182 149 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+############################################################################
+#
+# Field 23 : Non solar heat flux derivative (a->o 16)
+#
+CODFLXDT O_dQnsdT  35 <freq_coupling>  3   flxat.nc  <output_mode>
+96 96 182 149 tlmd    torc  LAG=<lag_atm>
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 24 : iceberg calving (a->o 17)
+#
+COCALVIN OCalving  36 <freq_coupling>  3  flxat.nc  <output_mode>
+96 96 182 149 tlmd    torc  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+rmp_tlmd_to_torc_MOSAIC_calvin.nc src
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+#
+# Field 25 : liquid run-off (river + direct)  (a->o 18)
+#
+COLIQRUN  O_Runoff 32 <freq_coupling>  5  flxat.nc   <output_mode>
+96 96 182 149 aone    otot  LAG=<lag_atm> 
+P  0 P  2
+CHECKIN MAPPING CONSERV BLASNEW CHECKOUT
+# CHECKIN: indicate computation of global, land and sea field integrals.
+ INT=1
+# Interpolation method ou parametres mozaic
+# weights convert from kg/s to kg/m^2/s
+rmp_tlmd_to_torc_MOSAIC_rivflu.nc dst
+# CONSERV
+GLOBAL bfb
+# change units from m/s to kg/s
+1000.0 0
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+ INT=1
+#
+#########################################################################
+# Field 26 : wind stress module (a->o 19)
+#
+##COTAUMOD  O_TauMod 466 <freq_coupling>  6   flxat.nc   <output_mode>
+##tlmd    torc  LAG=<lag_atm> 
+##P  0 P  2
+##INVERT CHECKIN MASK EXTRAP INTERP CHECKOUT
+# Reverse
+##NORSUD WSTEST
+# CHECKIN: indicate computation of global, land and sea field integrals.
+## INT=1
+# Mask value
+##888888.
+# Extrapolation method
+##NINENN 2 1 1
+# Interpolation method
+##BICUBIPS  Z   SCALAR
+# CHECKOUT: indicate computation of global, land and sea field integrals.
+## INT=1
+#
+#########################################################################
+#
+ $END
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA1_cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA1_cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA1_cfg	(revision 2504)
@@ -0,0 +1,302 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   cn_exp      = "ORCA1"   !  AUTO - experience name
+   nn_it000    =       1   !  AUTO - first time step
+   nn_itend    =    5475   !  AUTO - last  time step (std 5475)
+   nn_date0    =  010101   !  AUTO - date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1)
+   nn_leapy    =       0   !  AUTO - Leap year calendar (1) or not (0)
+   ln_rstart   = .false.   !  AUTO - start from rest (F) or from a restart file (T)
+   nn_rstctl   =       0   !  AUTO - restart control => activated only if ln_rstart = T
+                           !    = 0 nn_date0 read in namelist ; nn_it000 : read in namelist
+                           !    = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart
+                           !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart
+   cn_ocerst_in  = "restartopa"   !  suffix of ocean restart name (input)
+   cn_ocerst_out = "restart"   !  suffix of ocean restart name (output)
+   nn_istate   =       0   !  output the initial state (1) or not (0)
+   nn_stock    =    5475   !  AUTO - frequency of creation of a restart file (modulo referenced to 1)
+   nn_write    =    5475   !  AUTO - frequency of write in the output file   (modulo referenced to nn_it000)
+   ln_mskland  = .true.    !  Masks land points in NetCDF outputs
+/
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "orca"               !  name of the configuration
+   jp_cfg      =       1               !  resolution of the configuration
+   jpidta      =     362               !  1st lateral dimension ( >= jpi )
+   jpjdta      =     292               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      75               !  number of levels      ( >= jpk )
+   jpiglo      =     362               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     292               !  2nd    -                  -    --> j  =jpjdta
+   jpizoom     =       1               !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1               !  in data domain indices
+   jperio      =       6               !  lateral cond. type (between 0 and 6)
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+   rn_sbot_min =  300.     !  minimum depth of s-bottom surface (>0) (m)
+   rn_sbot_max = 5250.     !  maximum depth of s-bottom surface (= ocean depth) (>0) (m)
+   rn_theta    =    6.0    !  surface control parameter (0<=rn_theta<=20)
+   rn_thetb    =    0.75   !  bottom control parameter  (0<=rn_thetb<= 1)
+   rn_rmax     =    0.15   !  maximum cut-off r-value allowed (0<rn_max<1)
+   rn_bb       =    0.8    !  stretching with s-sigma
+   rn_hc       =  150.0    !  critical depth with s-sigma 
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   nn_msh      =    0      !  AUTO - create (=1) a mesh file or not (=0)
+   rn_rdt      = 3600.     !  time step for the dynamics (and tracer if nn_acc=0)
+   nn_closea    =   1      !  remove (=0) or keep (=1) closed seas and lakes (ORCA)
+   !
+   jphgr_msh   =       0               !  type of horizontal mesh
+   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =  999999.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
+   ppsur       =   -3958.951371276829  !  ORCA r4, r2 and r05 coefficients
+   ppa0        =     103.9530096000000 ! (default coefficients)
+   ppa1        =       2.415951269000000   !
+   ppkth       =      15.35101370000000    !
+   ppacr       =       7.0             !
+   ppdzmin     =  999999.0             !  Minimum vertical spacing
+   pphmax      =  999999.0             !  Maximum depth
+   ldbletanh   =   .TRUE.              !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =     100.7609285000000 !  Double tanh function parameters
+   ppkth2      =      48.02989372000000    !
+   ppacr2      =      13.00000000000   !
+   rn_hmin     =   20. 
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+   ln_tsd_init   = .true.   !  Initialisation of ocean T & S with T &S input data (T) or not (F)
+   ln_tsd_tradmp = .false.  !  damping of ocean T & S toward T &S input data (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fsbc     = 6         !  frequency of surface boundary condition computation
+                           !     (also = the frequency of sea-ice model call)
+   ln_blk_core = .false.   !  CORE bulk formulation                     (T => fill namsbc_core)
+   ln_cpl      = .true.    !  Coupled formulation                       (T => fill namsbc_cpl )
+   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
+   nn_ice      = 2         !  =0 no ice boundary condition   ,
+                           !  =1 use observed ice-cover      ,
+                           !  =2 ice-model used                         ("key_lim3" or "key_lim2")
+   cn_iceflx   = 'linear'  !  AUTO - 
+                           !  ="ave"    - Average flux over all ice categories ("key_lim3")
+                           !  ="linear" - Linear repartition of fluxes over ice categories ("key_lim3")
+   nn_ice_embd = 0         !  AUTO - 
+                           !  =0 levitating ice (no mass exchange, concentration/dilution effect)
+                           !  =1 levitating ice with mass and salt exchange but no presure effect
+                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure)
+   ln_dm2dc    = .false.   !  daily mean to diurnal cycle on short wave
+   ln_rnf      = .false.   !  runoffs                                   (T => fill namsbc_rnf)
+   ln_ssr      = .false.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked
+                           !     =1 global mean of e-p-r set to zero at each time step
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+   nn_chldta   =      0    !  RGB : Chl data (=1) or cst value (=0)
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+   rn_cloud    =    0.00   !  cloud correction to snow and ice albedo
+   rn_albice   =    0.5    !  albedo of melting ice in the arctic and antarctic
+   rn_alphd    =    0.80   !  coefficients for linear interpolation used to
+   rn_alphc    =    0.65   !  compute albedo between two extremes values
+   rn_alphdi   =    0.72   !  (Pyane, 1972)
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupling parameters
+!-----------------------------------------------------------------------
+!                    !     description       !  multiple  !    vector   !      vector          ! vector !
+!                    !                       ! categories !  reference  !    orientation       ! grids  !
+! send
+sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''
+sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''
+sn_snd_thick  =       'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+sn_snd_crt    =       'mixed oce-ice'        ,    'no'    , 'cartesian' , 'eastward-northward' ,  'T'
+sn_snd_co2    =       'none'              ,    'no'    ,     ''      ,         ''           ,   ''
+! receive
+sn_rcv_w10m   =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_taumod =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_tau    =       'mixed oce-ice'        ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'
+sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_qsr    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_qns    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_co2    =       'none'              ,    'no'    ,     ''      ,         ''          ,   ''
+/
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =    0.0    !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+   nn_bfr      =    2      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+   ln_trabbc   = .false.   !  Apply a geothermal heating at the ocean bottom
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   ln_traldf_grif   =  .true.   !  griffies skew flux formulation       (require "key_ldfslp")
+   ln_traldf_gdia   =  .true.   !  griffies operator strfn diagnostics  (require "key_ldfslp")
+   ln_botmix_grif   =  .true.   !  griffies operator with lateral mixing on bottom (require "key_ldfslp")
+   rn_aht_0         =  1000.    !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_aeiv_0        =  1000.    !  eddy induced velocity coefficient [m2/s]    (require "key_traldf_eiv")
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  .false.  !  add a damping termn (T) or not (F)
+   nn_zdmp     =    1      !  vertical   shape =0    damping throughout the water column
+
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+   ln_dynhpg_imp = .true.  !  time stepping: semi-implicit time scheme  (T)
+   ln_hpg_zps    = .false. !  z-coordinate - partial steps (interpolation)
+   ln_hpg_prj    = .true.  !  s-coordinate (Pressure Jacobian scheme)
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   rn_ahm_0_lap     = 20000.    !  horizontal laplacian eddy viscosity   [m2/s]
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+   jpni        =   1       !  jpni   number of processors following i (set automatically if < 1)
+   jpnj        =  29       !  jpnj   number of processors following j (set automatically if < 1)
+   jpnij       =  29       !  jpnij  number of local domains (set automatically if < 1)
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!----------------------------------------------------------------------- 
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+   ln_diaptr  = .false.     !  Poleward heat and salt transport (T) or not (F)
+   ln_diaznl  = .false.     !  Add zonal means and meridional stream functions
+   ln_subbas  = .false.     !  Atlantic/Pacific/Indian basins computation (T) or not
+                            !  (orca configuration only, need input basins mask file named "subbasins.nc"
+   ln_ptrcomp = .false.     !  Add decomposition : overturning
+   nn_fptr    =  1          !  Frequency of ptr computation [time step]
+   nn_fwri    =  15         !  AUTO - Frequency of ptr outputs [time step]
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_wave   ! External fields from wave model
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA1_ref
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA1_ref	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA1_ref	(revision 2504)
@@ -0,0 +1,1197 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  :  1 - run manager      (namrun, namcfg)
+!! namelists    2 - Domain           (namzgr, namzgr_sco, namdom, namtsd)
+!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core, namsbc_sas
+!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,
+!!                                    namsbc_apr, namsbc_ssr, namsbc_alb)
+!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide)
+!!              5 - bottom  boundary (nambfr, nambbc, nambbl)
+!!              6 - Tracer           (nameos, namtra_adv, namtra_ldf, namtra_dmp)
+!!              7 - dynamics         (namdyn_adv, namdyn_vor, namdyn_hpg, namdyn_spg, namdyn_ldf)
+!!              8 - Verical physics  (namzdf, namzdf_ric, namzdf_tke, namzdf_kpp, namzdf_ddm, namzdf_tmx)
+!!              9 - diagnostics      (namnc4, namtrd, namspr, namflo, namptr, namhsb)
+!!             10 - miscellaneous    (namsol, nammpp, namctl)
+!!             11 - Obs & Assim      (namobs, nam_asminc)
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!!======================================================================
+!!                   ***  Run management namelists  ***
+!!======================================================================
+!!   namrun        parameters of the run
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   nn_no       =       0   !  job number (no more used...)
+   cn_exp      =  "ORCA2"  !  experience name
+   nn_it000    =       1   !  first time step
+   nn_itend    =    5475   !  last  time step (std 5475)
+   nn_date0    =  010101   !  date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1)
+   nn_leapy    =       0   !  Leap year calendar (1) or not (0)
+   ln_rstart   = .false.   !  start from rest (F) or from a restart file (T)
+   nn_euler    =       1   !  = 0 : start with forward time step if ln_rstart=.true.
+   nn_rstctl   =       0   !  restart control => activated only if ln_rstart = T
+                           !    = 0 nn_date0 read in namelist ; nn_it000 : read in namelist
+                           !    = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart
+                           !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart
+   cn_ocerst_in  = "restart"   !  suffix of ocean restart name (input)
+   cn_ocerst_out = "restart"   !  suffix of ocean restart name (output)
+   nn_istate   =       0   !  output the initial state (1) or not (0)
+   nn_stock    =    5475   !  frequency of creation of a restart file (modulo referenced to 1)
+   nn_write    =    5475   !  frequency of write in the output file   (modulo referenced to nn_it000)
+   ln_dimgnnn  = .false.   !  DIMG file format: 1 file for all processors (F) or by processor (T)
+   ln_mskland  = .false.   !  mask land points in NetCDF outputs (costly: + ~15%)
+   ln_clobber  = .false.   !  clobber (overwrite) an existing file
+   nn_chunksz  =       0   !  chunksize (bytes) for NetCDF file (works only with iom_nf90 routines)
+/
+!
+!-----------------------------------------------------------------------
+&namcfg     !   default parameters of the configuration      
+!-----------------------------------------------------------------------
+   cp_cfg      =  "default"            !  name of the configuration
+   cp_cfz      =         ''            !  name of the zoom of configuration
+   jp_cfg      =       0               !  resolution of the configuration
+   jpidta      =      10               !  1st lateral dimension ( >= jpi )
+   jpjdta      =      12               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      31               !  number of levels      ( >= jpk )
+   jpiglo      =      10               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =      12               !  2nd    -                  -    --> j  =jpjdta
+   jpizoom     =       1               !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1               !  in data domain indices
+   jperio      =       0               !  lateral cond. type (between 0 and 6)
+                                       !  = 0 closed                 ;   = 1 cyclic East-West
+                                       !  = 2 equatorial symmetric   ;   = 3 North fold T-point pivot 
+                                       !  = 4 cyclic East-West AND North fold T-point pivot
+                                       !  = 5 North fold F-point pivot
+                                       !  = 6 cyclic East-West AND North fold F-point pivot
+/
+!!======================================================================
+!!                      ***  Domain namelists  ***
+!!======================================================================
+!!   namzgr       vertical coordinate
+!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate
+!!   namdom       space and time domain (bathymetry, mesh, timestep)
+!!   namtsd       data: temperature & salinity
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+   ln_zco      = .false.   !  z-coordinate - full    steps   (T/F)      ("key_zco" may also be defined)
+   ln_zps      = .true.    !  z-coordinate - partial steps   (T/F)
+   ln_sco      = .false.   !  s- or hybrid z-s-coordinate    (T/F)
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+   ln_s_sh94   = .true.    !  Song & Haidvogel 1994 hybrid S-sigma   (T)|
+   ln_s_sf12   = .false.   !  Siddorn & Furner 2012 hybrid S-z-sigma (T)| if both are false the NEMO tanh stretching is applied
+   ln_sigcrit  = .false.   !  use sigma coordinates below critical depth (T) or Z coordinates (F) for Siddorn & Furner stretch
+                           !  stretching coefficients for all functions
+   rn_sbot_min =   10.0    !  minimum depth of s-bottom surface (>0) (m)
+   rn_sbot_max = 7000.0    !  maximum depth of s-bottom surface (= ocean depth) (>0) (m)
+   rn_hc       =  150.0    !  critical depth for transition to stretched coordinates
+                        !!!!!!!  Envelop bathymetry
+   rn_rmax     =    0.3    !  maximum cut-off r-value allowed (0<r_max<1)
+                        !!!!!!!  SH94 stretching coefficients  (ln_s_sh94 = .true.)
+   rn_theta    =    6.0    !  surface control parameter (0<=theta<=20)
+   rn_bb       =    0.8    !  stretching with SH94 s-sigma   
+                        !!!!!!!  SF12 stretching coefficient  (ln_s_sf12 = .true.)
+   rn_alpha    =    4.4    !  stretching with SF12 s-sigma
+   rn_efold    =    0.0    !  efold length scale for transition to stretched coord
+   rn_zs       =    1.0    !  depth of surface grid box
+                           !  bottom cell depth (Zb) is a linear function of water depth Zb = H*a + b
+   rn_zb_a     =    0.024  !  bathymetry scaling factor for calculating Zb
+   rn_zb_b     =   -0.2    !  offset for calculating Zb
+                        !!!!!!!! Other stretching (not SH94 or SF12) [also uses rn_theta above]
+   rn_thetb    =    1.0    !  bottom control parameter  (0<=thetb<= 1) 
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   nn_bathy    =    1      !  compute (=0) or read (=1) the bathymetry file
+   rn_bathy    =    0.     !  value of the bathymetry. if (=0) bottom flat at jpkm1
+   nn_closea   =    0      !  remove (=0) or keep (=1) closed seas and lakes (ORCA)
+   nn_msh      =    0      !  create (=1) a mesh file or not (=0)
+   rn_hmin     =   -3.     !  min depth of the ocean (>0) or min number of ocean level (<0)
+   rn_e3zps_min=   20.     !  partial step thickness is set larger than the minimum of
+   rn_e3zps_rat=    0.1    !  rn_e3zps_min and rn_e3zps_rat*e3t, with 0<rn_e3zps_rat<1
+                           !
+   rn_rdt      = 5760.     !  time step for the dynamics (and tracer if nn_acc=0)
+   rn_atfp     =    0.1    !  asselin time filter parameter
+   nn_acc      =    0      !  acceleration of convergence : =1      used, rdt < rdttra(k)
+                                 !                          =0, not used, rdt = rdttra
+   rn_rdtmin   = 28800.          !  minimum time step on tracers (used if nn_acc=1)
+   rn_rdtmax   = 28800.          !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdth     =  800.           !  depth variation of tracer time step  (used if nn_acc=1)
+   ln_crs      = .false.      !  Logical switch for coarsening module
+   jphgr_msh   =       0               !  type of horizontal mesh
+                                       !  = 0 curvilinear coordinate on the sphere read in coordinate.nc
+                                       !  = 1 geographical mesh on the sphere with regular grid-spacing
+                                       !  = 2 f-plane with regular grid-spacing
+                                       !  = 3 beta-plane with regular grid-spacing
+                                       !  = 4 Mercator grid with T/U point at the equator
+   ppglam0     =       0.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =     -35.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =       1.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =       0.5             !  meridional grid-spacing (degrees)
+   ppe1_m      =    5000.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =    5000.0             !  meridional grid-spacing (degrees)
+   ppsur       =    -4762.96143546300  !  ORCA r4, r2 and r05 coefficients
+   ppa0        =      255.58049070440  ! (default coefficients)
+   ppa1        =      245.58132232490  !
+   ppkth       =       21.43336197938  !
+   ppacr       =        3.0            !
+   ppdzmin     =       10.             !  Minimum vertical spacing
+   pphmax      =     5000.             !  Maximum depth
+   ldbletanh   =    .TRUE.             !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =      100.760928500000 !  Double tanh function parameters
+   ppkth2      =       48.029893720000 !
+   ppacr2      =       13.000000000000 !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+   ln_bt_fw      =    .TRUE.           !  Forward integration of barotropic equations
+   ln_bt_av      =    .TRUE.           !  Time filtering of barotropic variables
+   ln_bt_nn_auto =    .TRUE.           !  Set nn_baro automatically to be just below
+                                       !  a user defined maximum courant number (rn_bt_cmax)
+   nn_baro       =    30               !  Number of iterations of barotropic mode
+                                       !  during rn_rdt seconds. Only used if ln_bt_nn_auto=F
+   rn_bt_cmax    =    0.8              !  Maximum courant number allowed if ln_bt_nn_auto=T 
+   nn_bt_flt     =    1                !  Time filter choice
+                                       !  = 0 None
+                                       !  = 1 Boxcar over   nn_baro barotropic steps
+                                       !  = 2 Boxcar over 2*nn_baro     "        "  
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+   nn_factx    = 3         !  Reduction factor of x-direction
+   nn_facty    = 3         !  Reduction factor of y-direction
+   nn_binref   = 0         !  Bin centering preference: NORTH or EQUAT
+                           !  0, coarse grid is binned with preferential treatment of the north fold
+                           !  1, coarse grid is binned with centering at the equator
+                           !    Symmetry with nn_facty being odd-numbered. Asymmetry with even-numbered nn_facty.
+   nn_msh_crs  = 1         !  create (=1) a mesh file or not (=0)
+   nn_crs_kz   = 0         ! 0, MEAN of volume boxes
+                           ! 1, MAX of boxes
+                           ! 2, MIN of boxes
+   ln_crs_wn   = .true.    ! wn coarsened (T) or computed using horizontal divergence ( F )
+/
+!-----------------------------------------------------------------------
+&namc1d        !   1D configuration options                             ("key_c1d")
+!-----------------------------------------------------------------------
+   rn_lat1d    =      50   !  Column latitude (default at PAPA station)
+   rn_lon1d    =    -145   !  Column longitude (default at PAPA station)
+   ln_c1d_locpt=  .true.   ! Localization of 1D config in a grid (T) or independant point (F)
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+!-----------------------------------------------------------------------
+!          !  file name                            ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!          !                                       !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_tem  = 'data_1m_potential_temperature_nomask',         -1        ,'votemper' ,    .true.    , .true. , 'yearly'   , ''       ,   ''    ,    ''
+   sn_sal  = 'data_1m_salinity_nomask'             ,         -1        ,'vosaline' ,    .true.    , .true. , 'yearly'   , ''       ,   ''    ,    ''
+   !
+   cn_dir        = './'     !  root directory for the location of the runoff files
+   ln_tsd_init   = .true.   !  Initialisation of ocean T & S with T &S input data (T) or not (F)
+   ln_tsd_tradmp = .true.   !  damping of ocean T & S toward T &S input data (T) or not (F)
+/
+!!======================================================================
+!!            ***  Surface Boundary Condition namelists  ***
+!!======================================================================
+!!   namsbc          surface boundary condition
+!!   namsbc_ana      analytical         formulation
+!!   namsbc_flx      flux               formulation
+!!   namsbc_clio     CLIO bulk formulae formulation
+!!   namsbc_core     CORE bulk formulae formulation
+!!   namsbc_mfs      MFS  bulk formulae formulation
+!!   namsbc_cpl      CouPLed            formulation                     ("key_coupled")
+!!   namsbc_sas      StAndalone Surface module
+!!   namtra_qsr      penetrative solar radiation
+!!   namsbc_rnf      river runoffs
+!!   namsbc_apr      Atmospheric Pressure
+!!   namsbc_ssr      sea surface restoring term (for T and/or S)
+!!   namsbc_alb      albedo parameters
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fsbc     = 5         !  frequency of surface boundary condition computation
+                           !     (also = the frequency of sea-ice model call)
+   ln_ana      = .false.   !  analytical formulation                    (T => fill namsbc_ana )
+   ln_flx      = .false.   !  flux formulation                          (T => fill namsbc_flx )
+   ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio)
+   ln_blk_core = .true.    !  CORE bulk formulation                     (T => fill namsbc_core)
+   ln_blk_mfs  = .false.   !  MFS bulk formulation                      (T => fill namsbc_mfs )
+   ln_cpl      = .false.   !  Coupled formulation                       (T => fill namsbc_cpl )
+   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
+   nn_ice      = 2         !  =0 no ice boundary condition   ,
+                           !  =1 use observed ice-cover      ,
+                           !  =2 ice-model used                         ("key_lim3" or "key_lim2)
+   nn_ice_embd = 1         !  =0 levitating ice (no mass exchange, concentration/dilution effect)
+                           !  =1 levitating ice with mass and salt exchange but no presure effect
+                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure)
+   ln_dm2dc    = .false.   !  daily mean to diurnal cycle on short wave
+   ln_rnf      = .true.    !  runoffs                                   (T => fill namsbc_rnf)
+   ln_ssr      = .true.    !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 2         !  FreshWater Budget: =0 unchecked
+                           !     =1 global mean of e-p-r set to zero at each time step
+                           !     =2 annual global mean of e-p-r set to zero
+   ln_wave = .false.       !  Activate coupling with wave (either Stokes Drift or Drag coefficient, or both)  (T => fill namsbc_wave)
+   ln_cdgw = .false.       !  Neutral drag coefficient read from wave model (T => fill namsbc_wave)
+   ln_sdw  = .false.       !  Computation of 3D stokes drift                (T => fill namsbc_wave)
+   nn_lsm  = 0             !  =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) ,
+                           !  =1:n number of iterations of land/sea mask application for input fields (fill land/sea mask filename field)
+   cn_iceflx = 'linear'    !  redistribution of solar input into ice categories during coupling ice/atm.
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+   nn_tau000   =   0       !  gently increase the stress over the first ntau_rst time-steps
+   rn_utau0    =   0.5     !  uniform value for the i-stress
+   rn_vtau0    =   0.e0    !  uniform value for the j-stress
+   rn_qns0     =   0.e0    !  uniform value for the total heat flux
+   rn_qsr0     =   0.e0    !  uniform value for the solar radiation
+   rn_emp0     =   0.e0    !  uniform value for the freswater budget (E-P)
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_utau     = 'utau'      ,        24         , 'utau'    , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_vtau     = 'vtau'      ,        24         , 'vtau'    , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_qtot     = 'qtot'      ,        24         , 'qtot'    , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_qsr      = 'qsr'       ,        24         , 'qsr'     , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_emp      = 'emp'       ,        24         , 'emp'     , .false.      , .false., 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the flux files
+/
+!-----------------------------------------------------------------------
+&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_utau     = 'taux_1m'   ,       -1          , 'sozotaux',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_vtau     = 'tauy_1m'   ,       -1          , 'sometauy',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_wndm     = 'flx'       ,       -1          , 'socliowi',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_tair     = 'flx'       ,       -1          , 'socliot2',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_humi     = 'flx'       ,       -1          , 'socliohu',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_ccov     = 'flx'       ,       -1          , 'socliocl',   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+   sn_prec     = 'flx'       ,       -1          , 'socliopl',   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the bulk files are
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+!              !  file name                    ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights                               ! rotation ! land/sea mask !
+!              !                               !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename                              ! pairing  ! filename      !
+   sn_wndi     = 'u_10.15JUNE2009_fill'        ,         6         , 'U_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bicubic_noc.nc'   , 'Uwnd'   , ''
+   sn_wndj     = 'v_10.15JUNE2009_fill'        ,         6         , 'V_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bicubic_noc.nc'   , 'Vwnd'   , ''
+   sn_qsr      = 'ncar_rad.15JUNE2009_fill'    ,        24         , 'SWDN_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_qlw      = 'ncar_rad.15JUNE2009_fill'    ,        24         , 'LWDN_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_tair     = 't_10.15JUNE2009_fill'        ,         6         , 'T_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_humi     = 'q_10.15JUNE2009_fill'        ,         6         , 'Q_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_prec     = 'ncar_precip.15JUNE2009_fill' ,        -1         , 'PRC_MOD1',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_snow     = 'ncar_precip.15JUNE2009_fill' ,        -1         , 'SNOW'    ,   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_tdif     = 'taudif_core'                 ,        24         , 'taudif'  ,   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_2m       = .false.   !  air temperature and humidity referenced at 2m (T) instead 10m (F)
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   ln_bulk2z   = .false.   !  Air temperature/humidity and wind vectors are referenced at heights rn_zqt and rn_zu
+   rn_zqt      = 3.        !  Air temperature and humidity reference height (m) (ln_bulk2z)
+   rn_zu       = 4.        !  Wind vector reference height (m)                  (ln_bulk2z)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity 
+                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+/
+!-----------------------------------------------------------------------
+&namsbc_mfs   !   namsbc_mfs  MFS bulk formulae
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights     ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename    ! pairing  ! filename      !
+   sn_wndi     =   'ecmwf'   ,        6          , 'u10'     ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_wndj     =   'ecmwf'   ,        6          , 'v10'     ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_clc      =   'ecmwf'   ,        6          , 'clc'     ,    .true.    , .false. , 'daily'  ,'bilinear.nc', ''       , ''
+   sn_msl      =   'ecmwf'   ,        6          , 'msl'     ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_tair     =   'ecmwf'   ,        6          , 't2'      ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_rhm      =   'ecmwf'   ,        6          , 'rh'      ,    .true.    , .false. , 'daily'  ,'bilinear.nc', ''       , ''
+   sn_prec     =   'ecmwf'   ,        6          , 'precip'  ,    .true.    , .true.  , 'daily'  ,'bicubic.nc' , ''       , ''
+
+   cn_dir      = './ECMWF/'      !  root directory for the location of the bulk files
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled")
+!-----------------------------------------------------------------------
+!                    !     description       !  multiple  !    vector   !      vector          ! vector !
+!                    !                       ! categories !  reference  !    orientation       ! grids  !
+! send
+sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''
+sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''
+sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   ''
+sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'
+sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+! receive
+sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'
+sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+/
+!-----------------------------------------------------------------------
+&namsbc_sas    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_usp      = 'sas_grid_U' ,    120           , 'vozocrtx' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''      
+   sn_vsp      = 'sas_grid_V' ,    120           , 'vomecrty' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_tem      = 'sas_grid_T' ,    120           , 'sosstsst' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_sal      = 'sas_grid_T' ,    120           , 'sosaline' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_ssh      = 'sas_grid_T' ,    120           , 'sossheig' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+
+   ln_3d_uv    = .true.    !  specify whether we are supplying a 3D u,v field
+   cn_dir      = './'      !  root directory for the location of the bulk files are
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_chl      ='chlorophyll',        -1         , 'CHLA'    ,   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the runoff files
+   ln_traqsr   = .true.    !  Light penetration (T) or not (F)
+   ln_qsr_rgb  = .true.    !  RGB (Red-Green-Blue) light penetration
+   ln_qsr_2bd  = .false.   !  2 bands              light penetration
+   ln_qsr_bio  = .false.   !  bio-model light penetration
+   nn_chldta   =      1    !  RGB : Chl data (=1) or cst value (=0)
+   rn_abs      =   0.58    !  RGB & 2 bands: fraction of light (rn_si1)
+   rn_si0      =   0.35    !  RGB & 2 bands: shortess depth of extinction
+   rn_si1      =   23.0    !  2 bands: longest depth of extinction
+   ln_qsr_ice  = .true.    !  light penetration for ice-model LIM3
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+!              !  file name           ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                      !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_rnf      = 'runoff_core_monthly',        -1         , 'sorunoff',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_cnf      = 'runoff_core_monthly',         0         , 'socoefr0',   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+   sn_s_rnf    = 'runoffs'            ,        24         , 'rosaline',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_t_rnf    = 'runoffs'            ,        24         , 'rotemper',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_dep_rnf  = 'runoffs'            ,         0         , 'rodepth' ,   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir       = './'      !  root directory for the location of the runoff files
+   ln_rnf_emp   = .false.   !  runoffs included into precipitation field (T) or into a file (F)
+   ln_rnf_mouth = .true.    !  specific treatment at rivers mouths
+   rn_hrnf      =  15.e0    !  depth over which enhanced vertical mixing is used
+   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s]
+   rn_rfact     =   1.e0    !  multiplicative factor for runoff
+   ln_rnf_depth = .false.   !  read in depth information for runoff
+   ln_rnf_tem   = .false.   !  read in temperature information for runoff
+   ln_rnf_sal   = .false.   !  read in salinity information for runoff
+/
+!-----------------------------------------------------------------------
+&namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_apr      = 'patm'      ,         -1        ,'somslpre',    .true.     , .true. , 'yearly'  ,  ''      ,   ''     , ''
+
+   cn_dir      = './'       !  root directory for the location of the bulk files
+   rn_pref     = 101000._wp !  reference atmospheric pressure   [N/m2]/
+   ln_ref_apr  = .false.    !  ref. pressure: global mean Patm (T) or a constant (F)
+   ln_apr_obc  = .false.    !  inverse barometer added to OBC ssh data
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_sst      = 'sst_data'  ,        24         ,  'sst'    ,    .false.   , .false., 'yearly'  , ''       , ''       , ''
+   sn_sss      = 'sss_data'  ,        -1         ,  'sss'    ,    .true.    , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the runoff files
+   nn_sstr     =     0     !  add a retroaction term in the surface heat       flux (=1) or not (=0)
+   nn_sssr     =     2     !  add a damping     term in the surface freshwater flux (=2)
+                           !  or to SSS only (=1) or no damping term (=0)
+   rn_dqdt     =   -40.    !  magnitude of the retroaction on temperature   [W/m2/K]
+   rn_deds     =  -166.67  !  magnitude of the damping on salinity   [mm/day]
+   ln_sssr_bnd =   .true.  !  flag to bound erp term (associated with nn_sssr=2)
+   rn_sssr_bnd =   4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day]
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+   rn_cloud    =    0.06   !  cloud correction to snow and ice albedo
+   rn_albice   =    0.53   !  albedo of melting ice in the arctic and antarctic
+   rn_alphd    =    0.80   !  coefficients for linear interpolation used to
+   rn_alphc    =    0.65   !  compute albedo between two extremes values
+   rn_alphdi   =    0.72   !  (Pyane, 1972)
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+      ln_icebergs              = .false.
+      ln_bergdia               = .true.               ! Calculate budgets
+      nn_verbose_level         = 1                    ! Turn on more verbose output if level > 0
+      nn_verbose_write         = 15                   ! Timesteps between verbose messages
+      nn_sample_rate           = 1                    ! Timesteps between sampling for trajectory storage
+                                                      ! Initial mass required for an iceberg of each class
+      rn_initial_mass          = 8.8e7, 4.1e8, 3.3e9, 1.8e10, 3.8e10, 7.5e10, 1.2e11, 2.2e11, 3.9e11, 7.4e11
+                                                      ! Proportion of calving mass to apportion to each class  
+      rn_distribution          = 0.24, 0.12, 0.15, 0.18, 0.12, 0.07, 0.03, 0.03, 0.03, 0.02
+                                                      ! Ratio between effective and real iceberg mass (non-dim)
+                                                      ! i.e. number of icebergs represented at a point         
+      rn_mass_scaling          = 2000, 200, 50, 20, 10, 5, 2, 1, 1, 1
+                                                      ! thickness of newly calved bergs (m)
+      rn_initial_thickness     = 40., 67., 133., 175., 250., 250., 250., 250., 250., 250.
+      rn_rho_bergs             = 850.                 ! Density of icebergs
+      rn_LoW_ratio             = 1.5                  ! Initial ratio L/W for newly calved icebergs
+      ln_operator_splitting    = .true.               ! Use first order operator splitting for thermodynamics
+      rn_bits_erosion_fraction = 0.                   ! Fraction of erosion melt flux to divert to bergy bits
+      rn_sicn_shift            = 0.                   ! Shift of sea-ice concn in erosion flux (0<sicn_shift<1)
+      ln_passive_mode          = .false.              ! iceberg - ocean decoupling   
+      nn_test_icebergs         =  10                  ! Create test icebergs of this class (-1 = no)
+                                                      ! Put a test iceberg at each gridpoint in box (lon1,lon2,lat1,lat2)
+      rn_test_box              = 108.0,  116.0, -66.0, -58.0
+      rn_speed_limit           = 0.                   ! CFL speed limit for a berg   
+
+!              ! file name ! frequency (hours) !   variable   ! time interp.   !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !           !  (if <0  months)  !     name     !   (logical)    !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      !
+      sn_icb =  'calving' ,       -1           , 'calvingmask',  .true.        , .true.  , 'yearly'  , ''       , ''       , ''
+   
+      cn_dir = './' 
+/
+
+!!======================================================================
+!!               ***  Lateral boundary condition  ***
+!!======================================================================
+!!   namlbc        lateral momentum boundary condition
+!!   namcla        cross land advection
+!!   namobc        open boundaries parameters                           ("key_obc")
+!!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif")
+!!   nambdy        Unstructured open boundaries                         ("key_bdy")
+!!   namtide       Tidal forcing at open boundaries                     ("key_bdy_tides")
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =    2.     !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+                           !  free slip  !   partial slip  !   no slip   ! strong slip
+   ln_vorlat   = .false.   !  consistency of vorticity boundary condition with analytical eqs.
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+   nn_cla      =    0      !  advection between 2 ocean pts separates by land
+/
+!-----------------------------------------------------------------------
+&namobc        !   open boundaries parameters                           ("key_obc")
+!-----------------------------------------------------------------------
+   ln_obc_clim = .false.   !  climatological obc data files (T) or not (F)
+   ln_vol_cst  = .true.    !  impose the total volume conservation (T) or not (F)
+   ln_obc_fla  = .false.   !  Flather open boundary condition
+   nn_obcdta   =    1      !  = 0 the obc data are equal to the initial state
+                           !  = 1 the obc data are read in 'obc.dta' files
+   cn_obcdta   = 'annual'  !  set to annual if obc datafile hold 1 year of data
+                           !  set to monthly if obc datafile hold 1 month of data
+   rn_dpein    =    1.     !  damping time scale for inflow at east  open boundary
+   rn_dpwin    =    1.     !     -           -         -       west    -      -
+   rn_dpnin    =    1.     !     -           -         -       north   -      -
+   rn_dpsin    =    1.     !     -           -         -       south   -      -
+   rn_dpeob    = 3000.     !  time relaxation (days) for the east  open boundary
+   rn_dpwob    =   15.     !     -           -         -     west    -      -
+   rn_dpnob    = 3000.     !     -           -         -     north   -      -
+   rn_dpsob    =   15.     !     -           -         -     south   -      -
+   rn_volemp   =    1.     !  = 0 the total volume change with the surface flux (E-P-R)
+                           !  = 1 the total volume remains constant
+/
+!-----------------------------------------------------------------------
+&namagrif      !  AGRIF zoom                                            ("key_agrif")
+!-----------------------------------------------------------------------
+   nn_cln_update =    3    !  baroclinic update frequency
+   ln_spc_dyn    = .true.  !  use 0 as special value for dynamics
+   rn_sponge_tra = 2880.   !  coefficient for tracer   sponge layer [m2/s]
+   rn_sponge_dyn = 2880.   !  coefficient for dynamics sponge layer [m2/s]
+/
+!-----------------------------------------------------------------------
+&nam_tide      !   tide parameters (#ifdef key_tide)
+!-----------------------------------------------------------------------
+   ln_tide_pot   = .true.   !  use tidal potential forcing
+   ln_tide_ramp  = .false.  !
+   rdttideramp   =    0.    !
+   clname(1)     =   'M2'   !  name of constituent
+   clname(2)     =   'S2'
+   clname(3)     =   'N2'
+   clname(4)     =   'K1'
+   clname(5)     =   'O1'
+   clname(6)     =   'Q1'
+   clname(7)     =   'M4'
+   clname(8)     =   'K2'
+   clname(9)     =   'P1'
+   clname(10)    =   'Mf'
+   clname(11)    =   'Mm'
+/
+!-----------------------------------------------------------------------
+&nambdy        !  unstructured open boundaries                          ("key_bdy")
+!-----------------------------------------------------------------------
+    nb_bdy         = 0                    !  number of open boundary sets
+    ln_coords_file = .true.               !  =T : read bdy coordinates from file
+    cn_coords_file = 'coordinates.bdy.nc' !  bdy coordinates files
+    ln_mask_file   = .false.              !  =T : read mask from file
+    cn_mask_file   = ''                   !  name of mask file (if ln_mask_file=.TRUE.)
+    cn_dyn2d       = 'none'               !
+    nn_dyn2d_dta   =  0                   !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+                                          !  = 2, use tidal harmonic forcing data from files
+                                          !  = 3, use external data AND tidal harmonic forcing
+    cn_dyn3d      =  'none'               !  
+    nn_dyn3d_dta  =  0                    !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+    cn_tra        =  'none'               ! 
+    nn_tra_dta    =  0                    !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+    cn_ice_lim      =  'none'             !  
+    nn_ice_lim_dta  =  0                  !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+    rn_ice_tem      = 270.                !  lim3 only: arbitrary temperature of incoming sea ice
+    rn_ice_sal      = 10.                 !  lim3 only:      --   salinity           --
+    rn_ice_age      = 30.                 !  lim3 only:      --   age                --
+
+    ln_tra_dmp    =.false.                !  open boudaries conditions for tracers
+    ln_dyn3d_dmp  =.false.                !  open boundary condition for baroclinic velocities
+    rn_time_dmp   =  1.                   ! Damping time scale in days 
+    rn_time_dmp_out =  1.                 ! Outflow damping time scale
+    nn_rimwidth   = 10                    !  width of the relaxation zone
+    ln_vol        = .false.               !  total volume correction (see nn_volctl parameter)
+    nn_volctl     = 1                     !  = 0, the total water flux across open boundaries is zero
+/
+!-----------------------------------------------------------------------
+&nambdy_dta      !  open boundaries - external data           ("key_bdy")
+!-----------------------------------------------------------------------
+!              !  file name      ! frequency (hours) ! variable   ! time interp.   !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                 !  (if <0  months)  !   name     !   (logical)    !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      !
+   bn_ssh =     'amm12_bdyT_u2d' ,         24        , 'sossheig' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_u2d =     'amm12_bdyU_u2d' ,         24        , 'vobtcrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_v2d =     'amm12_bdyV_u2d' ,         24        , 'vobtcrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_u3d  =    'amm12_bdyU_u3d' ,         24        , 'vozocrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_v3d  =    'amm12_bdyV_u3d' ,         24        , 'vomecrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_tem  =    'amm12_bdyT_tra' ,         24        , 'votemper' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_sal  =    'amm12_bdyT_tra' ,         24        , 'vosaline' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+! for lim2
+!   bn_frld  =    'amm12_bdyT_ice' ,         24        , 'ileadfra' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_hicif =    'amm12_bdyT_ice' ,         24        , 'iicethic' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_hsnif =    'amm12_bdyT_ice' ,         24        , 'isnowthi' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+! for lim3
+!   bn_a_i  =    'amm12_bdyT_ice' ,         24        , 'ileadfra' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_ht_i =    'amm12_bdyT_ice' ,         24        , 'iicethic' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_ht_s =    'amm12_bdyT_ice' ,         24        , 'isnowthi' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   cn_dir  =    'bdydta/'
+   ln_full_vel = .false.
+/
+!-----------------------------------------------------------------------
+&nambdy_tide     ! tidal forcing at open boundaries
+!-----------------------------------------------------------------------
+   filtide          = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files
+   ln_bdytide_2ddta = .false.
+   ln_bdytide_conj  = .false.
+/
+!!======================================================================
+!!                 ***  Bottom boundary condition  ***
+!!======================================================================
+!!   nambfr        bottom friction
+!!   nambbc        bottom temperature boundary condition
+!!   nambbl        bottom boundary layer scheme                         ("key_trabbl")
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+   nn_bfr      =    1      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
+                           !                              = 2 : nonlinear friction
+   rn_bfri1    =    4.e-4  !  bottom drag coefficient (linear case)
+   rn_bfri2    =    1.e-3  !  bottom drag coefficient (non linear case). Minimum coeft if ln_loglayer=T
+   rn_bfri2_max =   1.e-1  !  max. bottom drag coefficient (non linear case and ln_loglayer=T)
+   rn_bfeb2    =    2.5e-3 !  bottom turbulent kinetic energy background  (m2/s2)
+   rn_bfrz0    =    3.e-3  !  bottom roughness [m] if ln_loglayer=T 
+   ln_loglayer = .false.   !  logarithmic formulation (non linear case)
+   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file )
+   rn_bfrien   =    50.    !  local multiplying factor of bfr (ln_bfr2d=T)
+   ln_bfrimp   = .true.    !  implicit bottom friction (requires ln_zdfexp = .false. if true)
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+   ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom
+   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux
+                           !     = 1 constant flux
+                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)
+   rn_geoflx_cst = 86.4e-3 !  Constant value of geothermal heat flux [W/m2]
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+   nn_bbl_ldf  =  1      !  diffusive bbl (=1)   or not (=0)
+   nn_bbl_adv  =  0      !  advective bbl (=1/2) or not (=0)
+   rn_ahtbbl   =  1000.  !  lateral mixing coefficient in the bbl  [m2/s]
+   rn_gambbl   =  10.    !  advective bbl coefficient                 [s]
+/
+
+!!======================================================================
+!!                        Tracer (T & S ) namelists
+!!======================================================================
+!!   nameos        equation of state
+!!   namtra_adv    advection scheme
+!!   namtra_ldf    lateral diffusion scheme
+!!   namtra_dmp    T & S newtonian damping
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+   nn_eos      =   0       !  type of equation of state and Brunt-Vaisala frequency
+                           !     = 0, UNESCO (formulation of Jackett and McDougall (1994) and of McDougall (1987) )
+                           !     = 1, linear: rho(T)   = rau0 * ( 1.028 - ralpha * T )
+                           !     = 2, linear: rho(T,S) = rau0 * ( rbeta * S - ralpha * T )
+   rn_alpha    =   2.0e-4  !  thermal expension coefficient (nn_eos= 1 or 2)
+   rn_beta     =   7.7e-4  !  saline  expension coefficient (nn_eos= 2)
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+   ln_traadv_cen2   =  .false.  !  2nd order centered scheme
+   ln_traadv_tvd    =  .true.   !  TVD scheme
+   ln_traadv_muscl  =  .false.  !  MUSCL scheme
+   ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries
+   ln_traadv_ubs    =  .false.  !  UBS scheme
+   ln_traadv_qck    =  .false.  !  QUICKEST scheme
+   ln_traadv_msc_ups=  .false.  !  use upstream scheme within muscl
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !   mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+   ln_mle    = .true.      ! (T) use the Mixed Layer Eddy (MLE) parameterisation
+   rn_ce     = 0.06        ! magnitude of the MLE (typical value: 0.06 to 0.08)
+   nn_mle    = 1           ! MLE type: =0 standard Fox-Kemper ; =1 new formulation
+   rn_lf     = 5.e+3       ! typical scale of mixed layer front (meters)                      (case rn_mle=0)
+   rn_time   = 172800.     ! time scale for mixing momentum across the mixed layer (seconds)  (case rn_mle=0)
+   rn_lat    = 20.         ! reference latitude (degrees) of MLE coef.                        (case rn_mle=1)
+   nn_mld_uv = 0           ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max)
+   nn_conv   = 0           ! =1 no MLE in case of convection ; =0 always MLE
+   rn_rho_c_mle  = 0.01    ! delta rho criterion used to calculate MLD for FK
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   !                       !  Operator type:
+   ln_traldf_lap    =  .true.   !  laplacian operator
+   ln_traldf_bilap  =  .false.  !  bilaplacian operator
+   !                       !  Direction of action:
+   ln_traldf_level  =  .false.  !  iso-level
+   ln_traldf_hor    =  .false.  !  horizontal (geopotential)   (needs "key_ldfslp" when ln_sco=T)
+   ln_traldf_iso    =  .true.   !  iso-neutral                 (needs "key_ldfslp")
+   !		       	   !  Griffies parameters              (all need "key_ldfslp")
+   ln_traldf_grif   =  .false.  !  use griffies triads
+   ln_traldf_gdia   =  .false.  !  output griffies eddy velocities
+   ln_triad_iso     =  .false.  !  pure lateral mixing in ML
+   ln_botmix_grif   =  .false.  !  lateral mixing on bottom
+   !                       !  Coefficients
+   ! Eddy-induced (GM) advection always used with Griffies; otherwise needs "key_traldf_eiv"
+   ! Value rn_aeiv_0 is ignored unless = 0 with Held-Larichev spatially varying aeiv
+   !                                  (key_traldf_c2d & key_traldf_eiv & key_orca_r2, _r1 or _r05)
+   rn_aeiv_0        =  2000.    !  eddy induced velocity coefficient [m2/s]
+   rn_aht_0         =  2000.    !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_ahtb_0        =     0.    !  background eddy diffusivity for ldf_iso [m2/s]
+   !                                           (normally=0; not used with Griffies)
+   rn_slpmax        =     0.01  !  slope limit
+   rn_chsmag        =     1.    !  multiplicative factor in Smagorinsky diffusivity
+   rn_smsh          =     1.    !  Smagorinsky diffusivity: = 0 - use only sheer
+   rn_aht_m         =  2000.    !  upper limit or stability criteria for lateral eddy diffusivity (m2/s)
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  .true.   !  add a damping termn (T) or not (F)
+   nn_hdmp     =   -1      !  horizontal shape =-1, damping in Med and Red Seas only
+                           !                   =XX, damping poleward of XX degrees (XX>0)
+                           !                      + F(distance-to-coast) + Red and Med Seas
+   nn_zdmp     =    0      !  vertical   shape =0    damping throughout the water column
+                           !                   =1 no damping in the mixing layer (kz  criteria)
+                           !                   =2 no damping in the mixed  layer (rho crieria)
+   rn_surf     =   50.     !  surface time scale of damping   [days]
+   rn_bot      =  360.     !  bottom  time scale of damping   [days]
+   rn_dep      =  800.     !  depth of transition between rn_surf and rn_bot [meters]
+   nn_file     =    0      !  create a damping.coeff NetCDF file (=1) or not (=0)
+/
+
+!!======================================================================
+!!                      ***  Dynamics namelists  ***
+!!======================================================================
+!!   namdyn_adv    formulation of the momentum advection
+!!   namdyn_vor    advection scheme
+!!   namdyn_hpg    hydrostatic pressure gradient
+!!   namdyn_spg    surface pressure gradient                            (CPP key only)
+!!   namdyn_ldf    lateral diffusion scheme
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)
+   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme
+   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme
+/
+!-----------------------------------------------------------------------
+&nam_vvl    !   vertical coordinate options
+!-----------------------------------------------------------------------
+   ln_vvl_zstar  = .true.           !  zstar vertical coordinate                   
+   ln_vvl_ztilde = .false.          !  ztilde vertical coordinate: only high frequency variations
+   ln_vvl_layer  = .false.          !  full layer vertical coordinate
+   ln_vvl_ztilde_as_zstar = .false. !  ztilde vertical coordinate emulating zstar
+   ln_vvl_zstar_at_eqtor = .false.  !  ztilde near the equator
+   rn_ahe3       = 0.0e0            !  thickness diffusion coefficient
+   rn_rst_e3t    = 30.e0            !  ztilde to zstar restoration timescale [days]
+   rn_lf_cutoff  = 5.0e0            !  cutoff frequency for low-pass filter  [days]
+   rn_zdef_max   = 0.9e0            !  maximum fractional e3t deformation
+   ln_vvl_dbg    = .true.           !  debug prints    (T/F)
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+   ln_dynvor_ene = .false. !  enstrophy conserving scheme
+   ln_dynvor_ens = .false. !  energy conserving scheme
+   ln_dynvor_mix = .false. !  mixed scheme
+   ln_dynvor_een = .true.  !  energy & enstrophy scheme
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+   ln_hpg_zco  = .false.   !  z-coordinate - full steps
+   ln_hpg_zps  = .true.    !  z-coordinate - partial steps (interpolation)
+   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation)
+   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
+   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme)
+   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T)
+                                 !           centered      time scheme  (F)
+/
+!-----------------------------------------------------------------------
+!namdyn_spg    !   surface pressure gradient   (CPP key only)
+!-----------------------------------------------------------------------
+!                          !  explicit free surface                     ("key_dynspg_exp")
+!                          !  filtered free surface                     ("key_dynspg_flt")
+!                          !  split-explicit free surface               ("key_dynspg_ts")
+
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   !                       !  Type of the operator :
+   ln_dynldf_lap    =  .true.   !  laplacian operator
+   ln_dynldf_bilap  =  .false.  !  bilaplacian operator
+   !                       !  Direction of action  :
+   ln_dynldf_level  =  .false.  !  iso-level
+   ln_dynldf_hor    =  .true.   !  horizontal (geopotential)            (require "key_ldfslp" in s-coord.)
+   ln_dynldf_iso    =  .false.  !  iso-neutral                          (require "key_ldfslp")
+   !                       !  Coefficient
+   rn_ahm_0_lap     = 40000.    !  horizontal laplacian eddy viscosity   [m2/s]
+   rn_ahmb_0        =     0.    !  background eddy viscosity for ldf_iso [m2/s]
+   rn_ahm_0_blp     =     0.    !  horizontal bilaplacian eddy viscosity [m4/s]
+   rn_cmsmag_1      =     3.    !  constant in laplacian Smagorinsky viscosity
+   rn_cmsmag_2      =     3     !  constant in bilaplacian Smagorinsky viscosity
+   rn_cmsh          =     1.    !  1 or 0 , if 0 -use only shear for Smagorinsky viscosity
+   rn_ahm_m_blp     =    -1.e12 !  upper limit for bilap  abs(ahm) < min( dx^4/128rdt, rn_ahm_m_blp)
+   rn_ahm_m_lap     = 40000.    !  upper limit for lap  ahm < min(dx^2/16rdt, rn_ahm_m_lap)
+/
+
+!!======================================================================
+!!             Tracers & Dynamics vertical physics namelists
+!!======================================================================
+!!    namzdf        vertical physics
+!!    namzdf_ric    richardson number dependent vertical mixing         ("key_zdfric")
+!!    namzdf_tke    TKE dependent vertical mixing                       ("key_zdftke")
+!!    namzdf_kpp    KPP dependent vertical mixing                       ("key_zdfkpp")
+!!    namzdf_ddm    double diffusive mixing parameterization            ("key_zdfddm")
+!!    namzdf_tmx    tidal mixing parameterization                       ("key_zdftmx")
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+   rn_avm0     =   1.2e-4  !  vertical eddy viscosity   [m2/s]          (background Kz if not "key_zdfcst")
+   rn_avt0     =   1.2e-5  !  vertical eddy diffusivity [m2/s]          (background Kz if not "key_zdfcst")
+   nn_avb      =    0      !  profile for background avt & avm (=1) or not (=0)
+   nn_havtb    =    0      !  horizontal shape for avtb (=1) or not (=0)
+   ln_zdfevd   = .true.    !  enhanced vertical diffusion (evd) (T) or not (F)
+   nn_evdm     =    0      !  evd apply on tracer (=0) or on tracer and momentum (=1)
+   rn_avevd    =  100.     !  evd mixing coefficient [m2/s]
+   ln_zdfnpc   = .false.   !  Non-Penetrative Convective algorithm (T) or not (F)
+   nn_npc      =    1            !  frequency of application of npc
+   nn_npcp     =  365            !  npc control print frequency
+   ln_zdfexp   = .false.   !  time-stepping: split-explicit (T) or implicit (F) time stepping
+   nn_zdfexp   =    3            !  number of sub-timestep for ln_zdfexp=T
+/
+!-----------------------------------------------------------------------
+&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
+!-----------------------------------------------------------------------
+   rn_avmri    = 100.e-4   !  maximum value of the vertical viscosity
+   rn_alp      =   5.      !  coefficient of the parameterization
+   nn_ric      =   2       !  coefficient of the parameterization
+   rn_ekmfc    =   0.7     !  Factor in the Ekman depth Equation
+   rn_mldmin   =   1.0     !  minimum allowable mixed-layer depth estimate (m)
+   rn_mldmax   =1000.0     !  maximum allowable mixed-layer depth estimate (m)
+   rn_wtmix    =  10.0     !  vertical eddy viscosity coeff [m2/s] in the mixed-layer
+   rn_wvmix    =  10.0     !  vertical eddy diffusion coeff [m2/s] in the mixed-layer
+   ln_mldw     = .true.    !  Flag to use or not the mized layer depth param.
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+   rn_ediff    =   0.1     !  coef. for vertical eddy coef. (avt=rn_ediff*mxl*sqrt(e) )
+   rn_ediss    =   0.7     !  coef. of the Kolmogoroff dissipation
+   rn_ebb      =  67.83    !  coef. of the surface input of tke (=67.83 suggested when ln_mxl0=T)
+   rn_emin     =   1.e-6   !  minimum value of tke [m2/s2]
+   rn_emin0    =   1.e-4   !  surface minimum value of tke [m2/s2]
+   rn_bshear   =   1.e-20  ! background shear (>0) currently a numerical threshold (do not change it)
+   nn_mxl      =   2       !  mixing length: = 0 bounded by the distance to surface and bottom
+                           !                 = 1 bounded by the local vertical scale factor
+                           !                 = 2 first vertical derivative of mixing length bounded by 1
+                           !                 = 3 as =2 with distinct disspipative an mixing length scale
+   nn_pdl      =   1       !  Prandtl number function of richarson number (=1, avt=pdl(Ri)*avm) or not (=0, avt=avm)
+   ln_mxl0     = .true.    !  surface mixing length scale = F(wind stress) (T) or not (F)
+   rn_mxl0     =   0.04    !  surface  buoyancy lenght scale minimum value
+   ln_lc       = .true.    !  Langmuir cell parameterisation (Axell 2002)
+   rn_lc       =   0.15    !  coef. associated to Langmuir cells
+   nn_etau     =   1       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
+                           !        = 0 no penetration
+                           !        = 1 add a tke source below the ML
+                           !        = 2 add a tke source just at the base of the ML
+                           !        = 3 as = 1 applied on HF part of the stress    ("key_coupled")
+   rn_efr      =   0.05    !  fraction of surface tke value which penetrates below the ML (nn_etau=1 or 2)
+   nn_htau     =   1       !  type of exponential decrease of tke penetration below the ML
+                           !        = 0  constant 10 m length scale
+                           !        = 1  0.5m at the equator to 30m poleward of 40 degrees
+/
+!------------------------------------------------------------------------
+&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally:
+!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb")
+   ln_kpprimix = .true.    !  shear instability mixing
+   rn_difmiw   =  1.0e-04  !  constant internal wave viscosity [m2/s]
+   rn_difsiw   =  0.1e-04  !  constant internal wave diffusivity [m2/s]
+   rn_riinfty  =  0.8      !  local Richardson Number limit for shear instability
+   rn_difri    =  0.0050   !  maximum shear mixing at Rig = 0    [m2/s]
+   rn_bvsqcon  = -0.01e-07 !  Brunt-Vaisala squared for maximum convection [1/s2]
+   rn_difcon   =  1.       !  maximum mixing in interior convection [m2/s]
+   nn_avb      =  0        !  horizontal averaged (=1) or not (=0) on avt and amv
+   nn_ave      =  1        !  constant (=0) or profile (=1) background on avt
+/
+!-----------------------------------------------------------------------
+&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
+!-----------------------------------------------------------------------
+   rn_emin       = 1.e-6   !  minimum value of e   [m2/s2]
+   rn_epsmin     = 1.e-12  !  minimum value of eps [m2/s3]
+   ln_length_lim = .true.  !  limit on the dissipation rate under stable stratification (Galperin et al., 1988)
+   rn_clim_galp  = 0.53    !  galperin limit
+   ln_crban      = .true.  !  Use Craig & Banner (1994) surface wave mixing parametrisation
+   ln_sigpsi     = .true.  !  Activate or not Burchard 2001 mods on psi schmidt number in the wb case
+   rn_crban      = 100.    !  Craig and Banner 1994 constant for wb tke flux
+   rn_charn      = 70000.  !  Charnock constant for wb induced roughness length
+   nn_tkebc_surf =   1     !  surface tke condition (0/1/2=Dir/Neum/Dir Mellor-Blumberg)
+   nn_tkebc_bot  =   1     !  bottom tke condition (0/1=Dir/Neum)
+   nn_psibc_surf =   1     !  surface psi condition (0/1/2=Dir/Neum/Dir Mellor-Blumberg)
+   nn_psibc_bot  =   1     !  bottom psi condition (0/1=Dir/Neum)
+   nn_stab_func  =   2     !  stability function (0=Galp, 1= KC94, 2=CanutoA, 3=CanutoB)
+   nn_clos       =   1     !  predefined closure type (0=MY82, 1=k-eps, 2=k-w, 3=Gen)
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+   rn_avts     = 1.e-4     !  maximum avs (vertical mixing on salinity)
+   rn_hsbfr    = 1.6       !  heat/salt buoyancy flux ratio
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+   rn_htmx     = 500.      !  vertical decay scale for turbulence (meters)
+   rn_n2min    = 1.e-8     !  threshold of the Brunt-Vaisala frequency (s-1)
+   rn_tfe      = 0.333     !  tidal dissipation efficiency
+   rn_me       = 0.2       !  mixing efficiency
+   ln_tmx_itf  = .true.    !  ITF specific parameterisation
+   rn_tfe_itf  = 1.        !  ITF tidal dissipation efficiency
+/
+
+!!======================================================================
+!!                  ***  Miscellaneous namelists  ***
+!!======================================================================
+!!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi)
+!!   namctl            Control prints & Benchmark
+!!   namsol            elliptic solver / island / free surface
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+   nn_solv     =      1    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
+                           !                   =2 successive-over-relaxation (sor)
+   nn_sol_arp  =      0    !  absolute/relative (0/1) precision convergence test
+   rn_eps      =  1.e-6    !  absolute precision of the solver
+   nn_nmin     =    300    !  minimum of iterations for the SOR solver
+   nn_nmax     =    800    !  maximum of iterations for the SOR solver
+   nn_nmod     =     10    !  frequency of test for the SOR solver
+   rn_resmax   =  1.e-10   !  absolute precision for the SOR solver
+   rn_sor      =  1.92     !  optimal coefficient for SOR solver (to be adjusted with the domain)
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+   cn_mpi_send =  'I'      !  mpi send/recieve type   ='S', 'B', or 'I' for standard send,
+                           !  buffer blocking send or immediate non-blocking sends, resp.
+   nn_buffer   =   0       !  size in bytes of exported buffer ('B' case), 0 no exportation
+   ln_nnogather=  .false.  !  activate code to avoid mpi_allgather use at the northfold
+   jpni        =   0       !  jpni   number of processors following i (set automatically if < 1)
+   jpnj        =   0       !  jpnj   number of processors following j (set automatically if < 1)
+   jpnij       =   0       !  jpnij  number of local domains (set automatically if < 1)
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+   ln_ctl      = .false.   !  trends control print (expensive!)
+   nn_print    =    0      !  level of print (0 no extra print)
+   nn_ictls    =    0      !  start i indice of control sum (use to compare mono versus
+   nn_ictle    =    0      !  end   i indice of control sum        multi processor runs
+   nn_jctls    =    0      !  start j indice of control               over a subdomain)
+   nn_jctle    =    0      !  end   j indice of control
+   nn_isplt    =    1      !  number of processors in i-direction
+   nn_jsplt    =    1      !  number of processors in j-direction
+   nn_bench    =    0      !  Bench mode (1/0): CAUTION use zero except for bench
+                           !     (no physical validity of the results)
+   nn_timing   =    0      !  timing by routine activated (=1) creates timing.output file, or not (=0)
+/
+!-----------------------------------------------------------------------
+&namc1d_uvd    !   data: U & V currents                                 ("key_c1d")
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_ucur     = 'ucurrent'  ,         -1        ,'u_current',   .false.    , .true. , 'monthly' ,  ''      ,  'Ume'   , ''
+   sn_vcur     = 'vcurrent'  ,         -1        ,'v_current',   .false.    , .true. , 'monthly' ,  ''      ,  'Vme'   , ''
+!
+   cn_dir        = './'    !  root directory for the location of the files
+   ln_uvd_init   = .false. !  Initialisation of ocean U & V with U & V input data (T) or not (F)
+   ln_uvd_dyndmp = .false. !  damping of ocean U & V toward U & V input data (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d")
+!-----------------------------------------------------------------------
+   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F)
+/
+!!======================================================================
+!!                  ***  Diagnostics namelists  ***
+!!======================================================================
+!!   namnc4       netcdf4 chunking and compression settings             ("key_netcdf4")
+!!   namtrd       dynamics and/or tracer trends                         ("key_trddyn","key_trdtra","key_trdmld")
+!!   namflo       float parameters                                      ("key_float")
+!!   namptr       Poleward Transport Diagnostics
+!!   namhsb       Heat and salt budgets
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4")
+!-----------------------------------------------------------------------
+   nn_nchunks_i=   4       !  number of chunks in i-dimension
+   nn_nchunks_j=   4       !  number of chunks in j-dimension
+   nn_nchunks_k=   31      !  number of chunks in k-dimension
+                           !  setting nn_nchunks_k = jpk will give a chunk size of 1 in the vertical which
+                           !  is optimal for postprocessing which works exclusively with horizontal slabs
+   ln_nc4zip   = .true.    !  (T) use netcdf4 chunking and compression
+                           !  (F) ignore chunking information and produce netcdf3-compatible files
+/
+!-----------------------------------------------------------------------
+&namtrd        !   diagnostics on dynamics and/or tracer trends         ("key_trddyn" and/or "key_trdtra")
+!              !       or mixed-layer trends or barotropic vorticity    ("key_trdmld" or     "key_trdvor")
+!-----------------------------------------------------------------------
+   nn_trd      = 365       !  time step frequency dynamics and tracers trends
+   nn_ctls     =   0       !  control surface type in mixed-layer trends (0,1 or n<jpk)
+   rn_ucf      =   1.      !  unit conversion factor (=1 -> /seconds ; =86400. -> /day)
+   cn_trdrst_in      = "restart_mld"   ! suffix of ocean restart name (input)
+   cn_trdrst_out     = "restart_mld"   ! suffix of ocean restart name (output)
+   ln_trdmld_restart = .false.         !  restart for ML diagnostics
+   ln_trdmld_instant = .false.         !  flag to diagnose trends of instantantaneous or mean ML T/S
+/
+!-----------------------------------------------------------------------
+&namflo       !   float parameters                                      ("key_float")
+!-----------------------------------------------------------------------
+   jpnfl         = 1          !  total number of floats during the run
+   jpnnewflo     = 0          !  number of floats for the restart
+   ln_rstflo     = .false.    !  float restart (T) or not (F)
+   nn_writefl    =      75    !  frequency of writing in float output file
+   nn_stockfl    =    5475    !  frequency of creation of the float restart file
+   ln_argo       = .false.    !  Argo type floats (stay at the surface each 10 days)
+   ln_flork4     = .false.    !  trajectories computed with a 4th order Runge-Kutta (T)
+                              !  or computed with Blanke' scheme (F)
+   ln_ariane     = .true.     !  Input with Ariane tool convention(T)
+   ln_flo_ascii  = .true.     !  Output with Ariane tool netcdf convention(F) or ascii file (T)
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+   ln_diaptr  = .false.    !  Poleward heat and salt transport (T) or not (F)
+   ln_diaznl  = .true.     !  Add zonal means and meridional stream functions
+   ln_subbas  = .true.     !  Atlantic/Pacific/Indian basins computation (T) or not
+                           !  (orca configuration only, need input basins mask file named "subbasins.nc"
+   ln_ptrcomp = .true.     !  Add decomposition : overturning
+   nn_fptr    =  1         !  Frequency of ptr computation [time step]
+   nn_fwri    =  15        !  Frequency of ptr outputs [time step]
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+   ln_diahsb  = .false.    !  check the heat and salt budgets (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&nam_diaharm   !   Harmonic analysis of tidal constituents ('key_diaharm')
+!-----------------------------------------------------------------------
+    nit000_han = 1         ! First time step used for harmonic analysis
+    nitend_han = 75        ! Last time step used for harmonic analysis
+    nstep_han  = 15        ! Time step frequency for harmonic analysis
+    tname(1)   = 'M2'      ! Name of tidal constituents
+    tname(2)   = 'K1'
+/
+!-----------------------------------------------------------------------
+&namdct        ! transports through sections
+!-----------------------------------------------------------------------
+    nn_dct      = 15       !  time step frequency for transports computing
+    nn_dctwri   = 15       !  time step frequency for transports writing
+    nn_secdebug = 112      !      0 : no section to debug
+                           !     -1 : debug all section
+                           !  0 < n : debug section number n
+/
+
+!!======================================================================
+!!            ***  Observation & Assimilation namelists ***
+!!======================================================================
+!!   namobs       observation and model comparison                      ('key_diaobs')
+!!   nam_asminc   assimilation increments                               ('key_asminc')
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namobs       !  observation usage switch                               ('key_diaobs')
+!-----------------------------------------------------------------------
+   ln_t3d     = .false.    ! Logical switch for T profile observations
+   ln_s3d     = .false.    ! Logical switch for S profile observations
+   ln_ena     = .false.    ! Logical switch for ENACT insitu data set
+   !                       !     ln_cor                  Logical switch for Coriolis insitu data set
+   ln_profb   = .false.    ! Logical switch for feedback insitu data set
+   ln_sla     = .false.    ! Logical switch for SLA observations
+
+   ln_sladt   = .false.    ! Logical switch for AVISO SLA data
+
+   ln_slafb   = .false.    ! Logical switch for feedback SLA data
+                           !     ln_ssh                  Logical switch for SSH observations
+
+   ln_sst     = .true.     ! Logical switch for SST observations
+   ln_reysst  = .true.     !     ln_reysst               Logical switch for Reynolds observations
+   ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations      
+
+   ln_sstfb   = .false.    ! Logical switch for feedback SST data
+                           !     ln_sss                  Logical switch for SSS observations
+                           !     ln_seaice               Logical switch for Sea Ice observations
+                           !     ln_vel3d                Logical switch for velocity observations
+                           !     ln_velavcur             Logical switch for velocity daily av. cur.
+                           !     ln_velhrcur             Logical switch for velocity high freq. cur.
+                           !     ln_velavadcp            Logical switch for velocity daily av. ADCP
+                           !     ln_velhradcp            Logical switch for velocity high freq. ADCP
+                           !     ln_velfb                Logical switch for feedback velocity data
+                           !     ln_grid_global          Global distribtion of observations
+                           !     ln_grid_search_lookup   Logical switch for obs grid search w/lookup table
+                           !     grid_search_file        Grid search lookup file header
+                           !     enactfiles              ENACT input observation file names
+                           !     coriofiles              Coriolis input observation file name
+   !                       ! profbfiles: Profile feedback input observation file name
+   profbfiles = 'profiles_01.nc'
+                           !     ln_profb_enatim         Enact feedback input time setting switch
+                           !     slafilesact             Active SLA input observation file name
+                           !     slafilespas             Passive SLA input observation file name
+   !                       ! slafbfiles: Feedback SLA input observation file name
+   slafbfiles = 'sla_01.nc'
+                           !     sstfiles                GHRSST input observation file name
+   !                       ! sstfbfiles: Feedback SST input observation file name
+   sstfbfiles = 'sst_01.nc' 'sst_02.nc' 'sst_03.nc' 'sst_04.nc' 'sst_05.nc'
+                           !     seaicefiles             Sea Ice input observation file name
+                           !     velavcurfiles           Vel. cur. daily av. input file name
+                           !     velhvcurfiles           Vel. cur. high freq. input file name
+                           !     velavadcpfiles          Vel. ADCP daily av. input file name
+                           !     velhvadcpfiles          Vel. ADCP high freq. input file name
+                           !     velfbfiles              Vel. feedback input observation file name
+                           !     dobsini                 Initial date in window YYYYMMDD.HHMMSS
+                           !     dobsend                 Final date in window YYYYMMDD.HHMMSS
+                           !     n1dint                  Type of vertical interpolation method
+                           !     n2dint                  Type of horizontal interpolation method
+                           !     ln_nea                  Rejection of observations near land switch
+   nmsshc     = 0          ! MSSH correction scheme
+                           !     mdtcorr                 MDT  correction
+                           !     mdtcutoff               MDT cutoff for computed correction
+   ln_altbias = .false.    ! Logical switch for alt bias
+   ln_ignmis  = .true.     ! Logical switch for ignoring missing files
+                           !     endailyavtypes   ENACT daily average types
+   ln_grid_global = .true.
+   ln_grid_search_lookup = .false.
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+    ln_bkgwri = .false.    !  Logical switch for writing out background state
+    ln_trainc = .false.    !  Logical switch for applying tracer increments
+    ln_dyninc = .false.    !  Logical switch for applying velocity increments
+    ln_sshinc = .false.    !  Logical switch for applying SSH increments
+    ln_asmdin = .false.    !  Logical switch for Direct Initialization (DI)
+    ln_asmiau = .false.    !  Logical switch for Incremental Analysis Updating (IAU)
+    nitbkg    = 0          !  Timestep of background in [0,nitend-nit000-1]
+    nitdin    = 0          !  Timestep of background for DI in [0,nitend-nit000-1]
+    nitiaustr = 1          !  Timestep of start of IAU interval in [0,nitend-nit000-1]
+    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1]
+    niaufn    = 0          !  Type of IAU weighting function
+    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin
+    salfixmin = -9999      !  Minimum salinity after applying the increments
+    nn_divdmp = 0          !  Number of iterations of divergence damping operator
+/
+!-----------------------------------------------------------------------
+&namsbc_wave   ! External fields from wave model
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable     ! time interp. !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name       !   (logical)  !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_cdg      =  'cdg_wave' ,        1          , 'drag_coeff' ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_usd      =  'sdw_wave' ,        1          , 'u_sd2d'     ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_vsd      =  'sdw_wave' ,        1          , 'v_sd2d'     ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_wn       =  'sdw_wave' ,        1          , 'wave_num'   ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+!
+   cn_dir_cdg  = './'  !  root directory for the location of drag coefficient files
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+   ! Suggested lengthscale values are those of Eby & Holloway (1994) for a coarse model
+   ln_neptsimp       = .false.  ! yes/no use simplified neptune
+
+   ln_smooth_neptvel = .false.  ! yes/no smooth zunep, zvnep
+   rn_tslse          =  1.2e4   ! value of lengthscale L at the equator
+   rn_tslsp          =  3.0e3   ! value of lengthscale L at the pole
+   ! Specify whether to ramp down the Neptune velocity in shallow
+   ! water, and if so the depth range controlling such ramping down
+   ln_neptramp       = .true.   ! ramp down Neptune velocity in shallow water
+   rn_htrmin         =  100.0   ! min. depth of transition range
+   rn_htrmax         =  200.0   ! max. depth of transition range
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA2_cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA2_cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA2_cfg	(revision 2504)
@@ -0,0 +1,303 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   cn_exp      =  "ORCA2"  !  AUTO - experience name
+   nn_it000    =       1   !  AUTO - first time step
+   nn_itend    =    5475   !  AUTO - last  time step (std 5475)
+   nn_date0    =  010101   !  AUTO - date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1)
+   nn_leapy    =       0   !  AUTO - Leap year calendar (1) or not (0)
+   ln_rstart   = .false.   !  AUTO - start from rest (F) or from a restart file (T)
+   nn_rstctl   =       0   !  AUTO - restart control => activated only if ln_rstart = T
+                           !    = 0 nn_date0 read in namelist ; nn_it000 : read in namelist
+                           !    = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart
+                           !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart
+   cn_ocerst_in  = "restartopa"   !  suffix of ocean restart name (input)
+   cn_ocerst_out = "restart"   !  suffix of ocean restart name (output)
+   nn_istate   =       0   !  output the initial state (1) or not (0)
+   nn_stock    =    5475   !  AUTO - frequency of creation of a restart file (modulo referenced to 1)
+   nn_write    =    5475   !  AUTO - frequency of write in the output file   (modulo referenced to nn_it000)
+   ln_mskland  = .true.    !  Masks land points in NetCDF outputs
+/
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "orca"               !  name of the configuration
+   jp_cfg      =       2               !  resolution of the configuration
+   jpidta      =     182               !  1st lateral dimension ( >= jpi )
+   jpjdta      =     149               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      31               !  number of levels      ( >= jpk )
+   jpiglo      =     182               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     149               !  2nd    -                  -    --> j  =jpjdta
+   jpizoom     =       1               !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1               !  in data domain indices
+   jperio      =       4               !  lateral cond. type (between 0 and 6)
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   nn_msh      =    0      !  AUTO - create (=1) a mesh file or not (=0)
+   rn_rdt      = 5760.     !  time step for the dynamics (and tracer if nn_acc=0)
+   nn_closea    =   1      !  remove (=0) or keep (=1) closed seas and lakes (ORCA)
+   !
+   jphgr_msh   =       0               !  type of horizontal mesh
+   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =  999999.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
+   ppsur       =   -4762.96143546300   !  ORCA r4, r2 and r05 coefficients
+   ppa0        =     255.58049070440   ! (default coefficients)
+   ppa1        =     245.58132232490   !
+   ppkth       =      21.43336197938   !
+   ppacr       =       3.0             !
+   ppdzmin     =  999999.              !  Minimum vertical spacing
+   pphmax      =  999999.              !  Maximum depth
+   ldbletanh   =  .FALSE.              !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =  999999.              !  Double tanh function parameters
+   ppkth2      =  999999.              !
+   ppacr2      =  999999.              !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+   ln_tsd_init   = .true.   !  Initialisation of ocean T & S with T &S input data (T) or not (F)
+   ln_tsd_tradmp = .false.  !  damping of ocean T & S toward T &S input data (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fsbc     = 5         !  frequency of surface boundary condition computation
+                           !     (also = the frequency of sea-ice model call)
+   ln_blk_core = .false.   !  CORE bulk formulation                     (T => fill namsbc_core)
+   ln_cpl      = .true.    !  Coupled formulation                       (T => fill namsbc_cpl )
+   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
+   nn_ice      = 2         !  =0 no ice boundary condition   ,
+                           !  =1 use observed ice-cover      ,
+                           !  =2 ice-model used                         ("key_lim3" or "key_lim2")
+   cn_iceflx   = 'linear'  !  AUTO - 
+                           !  ="ave"    - Average flux over all ice categories ("key_lim3")
+                           !  ="linear" - Linear repartition of fluxes over ice categories ("key_lim3")
+   nn_ice_embd = 0         !  AUTO - 
+                           !  =0 levitating ice (no mass exchange, concentration/dilution effect)
+                           !  =1 levitating ice with mass and salt exchange but no presure effect
+                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure)
+   ln_dm2dc    = .false.   !  daily mean to diurnal cycle on short wave
+   ln_rnf      = .false.   !  runoffs                                   (T => fill namsbc_rnf)
+   ln_ssr      = .false.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked
+                           !     =1 global mean of e-p-r set to zero at each time step
+                           !     =2 annual global mean of e-p-r set to zero
+                           !     =3 global emp set to zero and spread out over erp area
+   ln_wave = .false.       !  Activate coupling with wave (either Stokes Drift or Drag coefficient, or both)  (T => fill namsbc_wave)
+   ln_cdgw = .false.       !  Neutral drag coefficient read from wave model (T => fill namsbc_wave)
+   ln_sdw  = .false.       !  Computation of 3D stokes drift                (T => fill namsbc_wave)
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+   rn_cloud    =    0.00   !  cloud correction to snow and ice albedo
+   rn_albice   =    0.5    !  albedo of melting ice in the arctic and antarctic
+   rn_alphd    =    0.80   !  coefficients for linear interpolation used to
+   rn_alphc    =    0.65   !  compute albedo between two extremes values
+   rn_alphdi   =    0.72   !  (Pyane, 1972)
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupling parameters
+!-----------------------------------------------------------------------
+!                    !     description       !  multiple  !    vector   !      vector          ! vector !
+!                    !                       ! categories !  reference  !    orientation       ! grids  !
+! send
+sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''
+sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''
+sn_snd_thick  =       'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+sn_snd_crt    =       'mixed oce-ice'        ,    'no'    , 'cartesian' , 'eastward-northward' ,  'T'
+sn_snd_co2    =       'none'              ,    'no'    ,     ''      ,         ''           ,   ''
+! receive
+sn_rcv_w10m   =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_taumod =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_tau    =       'mixed oce-ice'        ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'
+sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_qsr    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_qns    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_co2    =       'none'              ,    'no'    ,     ''      ,         ''          ,   ''
+/
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+    ln_tradmp   =  .FALSE.   !  add a damping termn (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+   rn_ebb      =  67.83    !  coef. of the surface input of tke (=67.83 suggested when ln_mxl0=T)
+   rn_mxl0     =   0.01    !  surface  buoyancy lenght scale minimum value
+   nn_etau     =   0       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
+                           !        = 0 no penetration
+                           !        = 1 add a tke source below the ML
+                           !        = 2 add a tke source just at the base of the ML
+                           !        = 3 as = 1 applied on HF part of the stress    ("key_coupled")
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+   cn_mpi_send =  'I'      !  mpi send/recieve type   ='S', 'B', or 'I' for standard send,
+                           !  buffer blocking send or immediate non-blocking sends, resp.
+   nn_buffer   =   0       !  size in bytes of exported buffer ('B' case), 0 no exportation
+   ln_nnogather=  .false.  !  activate code to avoid mpi_allgather use at the northfold
+   jpni        =   1       !  jpni   number of processors following i (set automatically if < 1)
+   jpnj        =   5       !  jpnj   number of processors following j (set automatically if < 1)
+   jpnij       =   5       !  jpnij  number of local domains (set automatically if < 1)
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namc1d        !   1D configuration options                             ("key_c1d")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+   ln_diaptr  = .true.     !  Poleward heat and salt transport (T) or not (F)
+   ln_diaznl  = .true.     !  Add zonal means and meridional stream functions
+   ln_subbas  = .true.     !  Atlantic/Pacific/Indian basins computation (T) or not
+                           !  (orca configuration only, need input basins mask file named "subbasins.nc"
+   ln_ptrcomp = .true.     !  Add decomposition : overturning
+   nn_fptr    =  1         !  Frequency of ptr computation [time step]
+   nn_fwri    =  15        !  AUTO - Frequency of ptr outputs [time step]
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_wave   ! External fields from wave model
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA2_ref
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA2_ref	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_ORCA2_ref	(revision 2504)
@@ -0,0 +1,1197 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  :  1 - run manager      (namrun, namcfg)
+!! namelists    2 - Domain           (namzgr, namzgr_sco, namdom, namtsd)
+!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core, namsbc_sas
+!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,
+!!                                    namsbc_apr, namsbc_ssr, namsbc_alb)
+!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide)
+!!              5 - bottom  boundary (nambfr, nambbc, nambbl)
+!!              6 - Tracer           (nameos, namtra_adv, namtra_ldf, namtra_dmp)
+!!              7 - dynamics         (namdyn_adv, namdyn_vor, namdyn_hpg, namdyn_spg, namdyn_ldf)
+!!              8 - Verical physics  (namzdf, namzdf_ric, namzdf_tke, namzdf_kpp, namzdf_ddm, namzdf_tmx)
+!!              9 - diagnostics      (namnc4, namtrd, namspr, namflo, namptr, namhsb)
+!!             10 - miscellaneous    (namsol, nammpp, namctl)
+!!             11 - Obs & Assim      (namobs, nam_asminc)
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!!======================================================================
+!!                   ***  Run management namelists  ***
+!!======================================================================
+!!   namrun        parameters of the run
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   nn_no       =       0   !  job number (no more used...)
+   cn_exp      =  "ORCA2"  !  experience name
+   nn_it000    =       1   !  first time step
+   nn_itend    =    5475   !  last  time step (std 5475)
+   nn_date0    =  010101   !  date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1)
+   nn_leapy    =       0   !  Leap year calendar (1) or not (0)
+   ln_rstart   = .false.   !  start from rest (F) or from a restart file (T)
+   nn_euler    =       1   !  = 0 : start with forward time step if ln_rstart=.true.
+   nn_rstctl   =       0   !  restart control => activated only if ln_rstart = T
+                           !    = 0 nn_date0 read in namelist ; nn_it000 : read in namelist
+                           !    = 1 nn_date0 read in namelist ; nn_it000 : check consistancy between namelist and restart
+                           !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart
+   cn_ocerst_in  = "restart"   !  suffix of ocean restart name (input)
+   cn_ocerst_out = "restart"   !  suffix of ocean restart name (output)
+   nn_istate   =       0   !  output the initial state (1) or not (0)
+   nn_stock    =    5475   !  frequency of creation of a restart file (modulo referenced to 1)
+   nn_write    =    5475   !  frequency of write in the output file   (modulo referenced to nn_it000)
+   ln_dimgnnn  = .false.   !  DIMG file format: 1 file for all processors (F) or by processor (T)
+   ln_mskland  = .false.   !  mask land points in NetCDF outputs (costly: + ~15%)
+   ln_clobber  = .false.   !  clobber (overwrite) an existing file
+   nn_chunksz  =       0   !  chunksize (bytes) for NetCDF file (works only with iom_nf90 routines)
+/
+!
+!-----------------------------------------------------------------------
+&namcfg     !   default parameters of the configuration      
+!-----------------------------------------------------------------------
+   cp_cfg      =  "default"            !  name of the configuration
+   cp_cfz      =         ''            !  name of the zoom of configuration
+   jp_cfg      =       0               !  resolution of the configuration
+   jpidta      =      10               !  1st lateral dimension ( >= jpi )
+   jpjdta      =      12               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      31               !  number of levels      ( >= jpk )
+   jpiglo      =      10               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =      12               !  2nd    -                  -    --> j  =jpjdta
+   jpizoom     =       1               !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1               !  in data domain indices
+   jperio      =       0               !  lateral cond. type (between 0 and 6)
+                                       !  = 0 closed                 ;   = 1 cyclic East-West
+                                       !  = 2 equatorial symmetric   ;   = 3 North fold T-point pivot 
+                                       !  = 4 cyclic East-West AND North fold T-point pivot
+                                       !  = 5 North fold F-point pivot
+                                       !  = 6 cyclic East-West AND North fold F-point pivot
+/
+!!======================================================================
+!!                      ***  Domain namelists  ***
+!!======================================================================
+!!   namzgr       vertical coordinate
+!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate
+!!   namdom       space and time domain (bathymetry, mesh, timestep)
+!!   namtsd       data: temperature & salinity
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+   ln_zco      = .false.   !  z-coordinate - full    steps   (T/F)      ("key_zco" may also be defined)
+   ln_zps      = .true.    !  z-coordinate - partial steps   (T/F)
+   ln_sco      = .false.   !  s- or hybrid z-s-coordinate    (T/F)
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+   ln_s_sh94   = .true.    !  Song & Haidvogel 1994 hybrid S-sigma   (T)|
+   ln_s_sf12   = .false.   !  Siddorn & Furner 2012 hybrid S-z-sigma (T)| if both are false the NEMO tanh stretching is applied
+   ln_sigcrit  = .false.   !  use sigma coordinates below critical depth (T) or Z coordinates (F) for Siddorn & Furner stretch
+                           !  stretching coefficients for all functions
+   rn_sbot_min =   10.0    !  minimum depth of s-bottom surface (>0) (m)
+   rn_sbot_max = 7000.0    !  maximum depth of s-bottom surface (= ocean depth) (>0) (m)
+   rn_hc       =  150.0    !  critical depth for transition to stretched coordinates
+                        !!!!!!!  Envelop bathymetry
+   rn_rmax     =    0.3    !  maximum cut-off r-value allowed (0<r_max<1)
+                        !!!!!!!  SH94 stretching coefficients  (ln_s_sh94 = .true.)
+   rn_theta    =    6.0    !  surface control parameter (0<=theta<=20)
+   rn_bb       =    0.8    !  stretching with SH94 s-sigma   
+                        !!!!!!!  SF12 stretching coefficient  (ln_s_sf12 = .true.)
+   rn_alpha    =    4.4    !  stretching with SF12 s-sigma
+   rn_efold    =    0.0    !  efold length scale for transition to stretched coord
+   rn_zs       =    1.0    !  depth of surface grid box
+                           !  bottom cell depth (Zb) is a linear function of water depth Zb = H*a + b
+   rn_zb_a     =    0.024  !  bathymetry scaling factor for calculating Zb
+   rn_zb_b     =   -0.2    !  offset for calculating Zb
+                        !!!!!!!! Other stretching (not SH94 or SF12) [also uses rn_theta above]
+   rn_thetb    =    1.0    !  bottom control parameter  (0<=thetb<= 1) 
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   nn_bathy    =    1      !  compute (=0) or read (=1) the bathymetry file
+   rn_bathy    =    0.     !  value of the bathymetry. if (=0) bottom flat at jpkm1
+   nn_closea   =    0      !  remove (=0) or keep (=1) closed seas and lakes (ORCA)
+   nn_msh      =    0      !  create (=1) a mesh file or not (=0)
+   rn_hmin     =   -3.     !  min depth of the ocean (>0) or min number of ocean level (<0)
+   rn_e3zps_min=   20.     !  partial step thickness is set larger than the minimum of
+   rn_e3zps_rat=    0.1    !  rn_e3zps_min and rn_e3zps_rat*e3t, with 0<rn_e3zps_rat<1
+                           !
+   rn_rdt      = 5760.     !  time step for the dynamics (and tracer if nn_acc=0)
+   rn_atfp     =    0.1    !  asselin time filter parameter
+   nn_acc      =    0      !  acceleration of convergence : =1      used, rdt < rdttra(k)
+                                 !                          =0, not used, rdt = rdttra
+   rn_rdtmin   = 28800.          !  minimum time step on tracers (used if nn_acc=1)
+   rn_rdtmax   = 28800.          !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdth     =  800.           !  depth variation of tracer time step  (used if nn_acc=1)
+   ln_crs      = .false.      !  Logical switch for coarsening module
+   jphgr_msh   =       0               !  type of horizontal mesh
+                                       !  = 0 curvilinear coordinate on the sphere read in coordinate.nc
+                                       !  = 1 geographical mesh on the sphere with regular grid-spacing
+                                       !  = 2 f-plane with regular grid-spacing
+                                       !  = 3 beta-plane with regular grid-spacing
+                                       !  = 4 Mercator grid with T/U point at the equator
+   ppglam0     =       0.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =     -35.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =       1.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =       0.5             !  meridional grid-spacing (degrees)
+   ppe1_m      =    5000.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =    5000.0             !  meridional grid-spacing (degrees)
+   ppsur       =    -4762.96143546300  !  ORCA r4, r2 and r05 coefficients
+   ppa0        =      255.58049070440  ! (default coefficients)
+   ppa1        =      245.58132232490  !
+   ppkth       =       21.43336197938  !
+   ppacr       =        3.0            !
+   ppdzmin     =       10.             !  Minimum vertical spacing
+   pphmax      =     5000.             !  Maximum depth
+   ldbletanh   =    .TRUE.             !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =      100.760928500000 !  Double tanh function parameters
+   ppkth2      =       48.029893720000 !
+   ppacr2      =       13.000000000000 !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+   ln_bt_fw      =    .TRUE.           !  Forward integration of barotropic equations
+   ln_bt_av      =    .TRUE.           !  Time filtering of barotropic variables
+   ln_bt_nn_auto =    .TRUE.           !  Set nn_baro automatically to be just below
+                                       !  a user defined maximum courant number (rn_bt_cmax)
+   nn_baro       =    30               !  Number of iterations of barotropic mode
+                                       !  during rn_rdt seconds. Only used if ln_bt_nn_auto=F
+   rn_bt_cmax    =    0.8              !  Maximum courant number allowed if ln_bt_nn_auto=T 
+   nn_bt_flt     =    1                !  Time filter choice
+                                       !  = 0 None
+                                       !  = 1 Boxcar over   nn_baro barotropic steps
+                                       !  = 2 Boxcar over 2*nn_baro     "        "  
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+   nn_factx    = 3         !  Reduction factor of x-direction
+   nn_facty    = 3         !  Reduction factor of y-direction
+   nn_binref   = 0         !  Bin centering preference: NORTH or EQUAT
+                           !  0, coarse grid is binned with preferential treatment of the north fold
+                           !  1, coarse grid is binned with centering at the equator
+                           !    Symmetry with nn_facty being odd-numbered. Asymmetry with even-numbered nn_facty.
+   nn_msh_crs  = 1         !  create (=1) a mesh file or not (=0)
+   nn_crs_kz   = 0         ! 0, MEAN of volume boxes
+                           ! 1, MAX of boxes
+                           ! 2, MIN of boxes
+   ln_crs_wn   = .true.    ! wn coarsened (T) or computed using horizontal divergence ( F )
+/
+!-----------------------------------------------------------------------
+&namc1d        !   1D configuration options                             ("key_c1d")
+!-----------------------------------------------------------------------
+   rn_lat1d    =      50   !  Column latitude (default at PAPA station)
+   rn_lon1d    =    -145   !  Column longitude (default at PAPA station)
+   ln_c1d_locpt=  .true.   ! Localization of 1D config in a grid (T) or independant point (F)
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+!-----------------------------------------------------------------------
+!          !  file name                            ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!          !                                       !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_tem  = 'data_1m_potential_temperature_nomask',         -1        ,'votemper' ,    .true.    , .true. , 'yearly'   , ''       ,   ''    ,    ''
+   sn_sal  = 'data_1m_salinity_nomask'             ,         -1        ,'vosaline' ,    .true.    , .true. , 'yearly'   , ''       ,   ''    ,    ''
+   !
+   cn_dir        = './'     !  root directory for the location of the runoff files
+   ln_tsd_init   = .true.   !  Initialisation of ocean T & S with T &S input data (T) or not (F)
+   ln_tsd_tradmp = .true.   !  damping of ocean T & S toward T &S input data (T) or not (F)
+/
+!!======================================================================
+!!            ***  Surface Boundary Condition namelists  ***
+!!======================================================================
+!!   namsbc          surface boundary condition
+!!   namsbc_ana      analytical         formulation
+!!   namsbc_flx      flux               formulation
+!!   namsbc_clio     CLIO bulk formulae formulation
+!!   namsbc_core     CORE bulk formulae formulation
+!!   namsbc_mfs      MFS  bulk formulae formulation
+!!   namsbc_cpl      CouPLed            formulation                     ("key_coupled")
+!!   namsbc_sas      StAndalone Surface module
+!!   namtra_qsr      penetrative solar radiation
+!!   namsbc_rnf      river runoffs
+!!   namsbc_apr      Atmospheric Pressure
+!!   namsbc_ssr      sea surface restoring term (for T and/or S)
+!!   namsbc_alb      albedo parameters
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fsbc     = 5         !  frequency of surface boundary condition computation
+                           !     (also = the frequency of sea-ice model call)
+   ln_ana      = .false.   !  analytical formulation                    (T => fill namsbc_ana )
+   ln_flx      = .false.   !  flux formulation                          (T => fill namsbc_flx )
+   ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio)
+   ln_blk_core = .true.    !  CORE bulk formulation                     (T => fill namsbc_core)
+   ln_blk_mfs  = .false.   !  MFS bulk formulation                      (T => fill namsbc_mfs )
+   ln_cpl      = .false.   !  Coupled formulation                       (T => fill namsbc_cpl )
+   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
+   nn_ice      = 2         !  =0 no ice boundary condition   ,
+                           !  =1 use observed ice-cover      ,
+                           !  =2 ice-model used                         ("key_lim3" or "key_lim2)
+   nn_ice_embd = 1         !  =0 levitating ice (no mass exchange, concentration/dilution effect)
+                           !  =1 levitating ice with mass and salt exchange but no presure effect
+                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure)
+   ln_dm2dc    = .false.   !  daily mean to diurnal cycle on short wave
+   ln_rnf      = .true.    !  runoffs                                   (T => fill namsbc_rnf)
+   ln_ssr      = .true.    !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 2         !  FreshWater Budget: =0 unchecked
+                           !     =1 global mean of e-p-r set to zero at each time step
+                           !     =2 annual global mean of e-p-r set to zero
+   ln_wave = .false.       !  Activate coupling with wave (either Stokes Drift or Drag coefficient, or both)  (T => fill namsbc_wave)
+   ln_cdgw = .false.       !  Neutral drag coefficient read from wave model (T => fill namsbc_wave)
+   ln_sdw  = .false.       !  Computation of 3D stokes drift                (T => fill namsbc_wave)
+   nn_lsm  = 0             !  =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) ,
+                           !  =1:n number of iterations of land/sea mask application for input fields (fill land/sea mask filename field)
+   cn_iceflx = 'linear'    !  redistribution of solar input into ice categories during coupling ice/atm.
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+   nn_tau000   =   0       !  gently increase the stress over the first ntau_rst time-steps
+   rn_utau0    =   0.5     !  uniform value for the i-stress
+   rn_vtau0    =   0.e0    !  uniform value for the j-stress
+   rn_qns0     =   0.e0    !  uniform value for the total heat flux
+   rn_qsr0     =   0.e0    !  uniform value for the solar radiation
+   rn_emp0     =   0.e0    !  uniform value for the freswater budget (E-P)
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_utau     = 'utau'      ,        24         , 'utau'    , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_vtau     = 'vtau'      ,        24         , 'vtau'    , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_qtot     = 'qtot'      ,        24         , 'qtot'    , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_qsr      = 'qsr'       ,        24         , 'qsr'     , .false.      , .false., 'yearly'  , ''       , ''       , ''
+   sn_emp      = 'emp'       ,        24         , 'emp'     , .false.      , .false., 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the flux files
+/
+!-----------------------------------------------------------------------
+&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_utau     = 'taux_1m'   ,       -1          , 'sozotaux',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_vtau     = 'tauy_1m'   ,       -1          , 'sometauy',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_wndm     = 'flx'       ,       -1          , 'socliowi',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_tair     = 'flx'       ,       -1          , 'socliot2',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_humi     = 'flx'       ,       -1          , 'socliohu',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_ccov     = 'flx'       ,       -1          , 'socliocl',   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+   sn_prec     = 'flx'       ,       -1          , 'socliopl',   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the bulk files are
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+!              !  file name                    ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights                               ! rotation ! land/sea mask !
+!              !                               !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename                              ! pairing  ! filename      !
+   sn_wndi     = 'u_10.15JUNE2009_fill'        ,         6         , 'U_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bicubic_noc.nc'   , 'Uwnd'   , ''
+   sn_wndj     = 'v_10.15JUNE2009_fill'        ,         6         , 'V_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bicubic_noc.nc'   , 'Vwnd'   , ''
+   sn_qsr      = 'ncar_rad.15JUNE2009_fill'    ,        24         , 'SWDN_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_qlw      = 'ncar_rad.15JUNE2009_fill'    ,        24         , 'LWDN_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_tair     = 't_10.15JUNE2009_fill'        ,         6         , 'T_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_humi     = 'q_10.15JUNE2009_fill'        ,         6         , 'Q_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_prec     = 'ncar_precip.15JUNE2009_fill' ,        -1         , 'PRC_MOD1',   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_snow     = 'ncar_precip.15JUNE2009_fill' ,        -1         , 'SNOW'    ,   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+   sn_tdif     = 'taudif_core'                 ,        24         , 'taudif'  ,   .false.    , .true. , 'yearly'  , 'weights_core_orca2_bilinear_noc.nc'  , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_2m       = .false.   !  air temperature and humidity referenced at 2m (T) instead 10m (F)
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   ln_bulk2z   = .false.   !  Air temperature/humidity and wind vectors are referenced at heights rn_zqt and rn_zu
+   rn_zqt      = 3.        !  Air temperature and humidity reference height (m) (ln_bulk2z)
+   rn_zu       = 4.        !  Wind vector reference height (m)                  (ln_bulk2z)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity 
+                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+/
+!-----------------------------------------------------------------------
+&namsbc_mfs   !   namsbc_mfs  MFS bulk formulae
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights     ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename    ! pairing  ! filename      !
+   sn_wndi     =   'ecmwf'   ,        6          , 'u10'     ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_wndj     =   'ecmwf'   ,        6          , 'v10'     ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_clc      =   'ecmwf'   ,        6          , 'clc'     ,    .true.    , .false. , 'daily'  ,'bilinear.nc', ''       , ''
+   sn_msl      =   'ecmwf'   ,        6          , 'msl'     ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_tair     =   'ecmwf'   ,        6          , 't2'      ,    .true.    , .false. , 'daily'  ,'bicubic.nc' , ''       , ''
+   sn_rhm      =   'ecmwf'   ,        6          , 'rh'      ,    .true.    , .false. , 'daily'  ,'bilinear.nc', ''       , ''
+   sn_prec     =   'ecmwf'   ,        6          , 'precip'  ,    .true.    , .true.  , 'daily'  ,'bicubic.nc' , ''       , ''
+
+   cn_dir      = './ECMWF/'      !  root directory for the location of the bulk files
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled")
+!-----------------------------------------------------------------------
+!                    !     description       !  multiple  !    vector   !      vector          ! vector !
+!                    !                       ! categories !  reference  !    orientation       ! grids  !
+! send
+sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''
+sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''
+sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   ''
+sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'
+sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+! receive
+sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'
+sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
+/
+!-----------------------------------------------------------------------
+&namsbc_sas    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_usp      = 'sas_grid_U' ,    120           , 'vozocrtx' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''      
+   sn_vsp      = 'sas_grid_V' ,    120           , 'vomecrty' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_tem      = 'sas_grid_T' ,    120           , 'sosstsst' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_sal      = 'sas_grid_T' ,    120           , 'sosaline' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+   sn_ssh      = 'sas_grid_T' ,    120           , 'sossheig' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , ''
+
+   ln_3d_uv    = .true.    !  specify whether we are supplying a 3D u,v field
+   cn_dir      = './'      !  root directory for the location of the bulk files are
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_chl      ='chlorophyll',        -1         , 'CHLA'    ,   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the runoff files
+   ln_traqsr   = .true.    !  Light penetration (T) or not (F)
+   ln_qsr_rgb  = .true.    !  RGB (Red-Green-Blue) light penetration
+   ln_qsr_2bd  = .false.   !  2 bands              light penetration
+   ln_qsr_bio  = .false.   !  bio-model light penetration
+   nn_chldta   =      1    !  RGB : Chl data (=1) or cst value (=0)
+   rn_abs      =   0.58    !  RGB & 2 bands: fraction of light (rn_si1)
+   rn_si0      =   0.35    !  RGB & 2 bands: shortess depth of extinction
+   rn_si1      =   23.0    !  2 bands: longest depth of extinction
+   ln_qsr_ice  = .true.    !  light penetration for ice-model LIM3
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+!              !  file name           ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                      !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_rnf      = 'runoff_core_monthly',        -1         , 'sorunoff',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_cnf      = 'runoff_core_monthly',         0         , 'socoefr0',   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+   sn_s_rnf    = 'runoffs'            ,        24         , 'rosaline',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_t_rnf    = 'runoffs'            ,        24         , 'rotemper',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_dep_rnf  = 'runoffs'            ,         0         , 'rodepth' ,   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir       = './'      !  root directory for the location of the runoff files
+   ln_rnf_emp   = .false.   !  runoffs included into precipitation field (T) or into a file (F)
+   ln_rnf_mouth = .true.    !  specific treatment at rivers mouths
+   rn_hrnf      =  15.e0    !  depth over which enhanced vertical mixing is used
+   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s]
+   rn_rfact     =   1.e0    !  multiplicative factor for runoff
+   ln_rnf_depth = .false.   !  read in depth information for runoff
+   ln_rnf_tem   = .false.   !  read in temperature information for runoff
+   ln_rnf_sal   = .false.   !  read in salinity information for runoff
+/
+!-----------------------------------------------------------------------
+&namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_apr      = 'patm'      ,         -1        ,'somslpre',    .true.     , .true. , 'yearly'  ,  ''      ,   ''     , ''
+
+   cn_dir      = './'       !  root directory for the location of the bulk files
+   rn_pref     = 101000._wp !  reference atmospheric pressure   [N/m2]/
+   ln_ref_apr  = .false.    !  ref. pressure: global mean Patm (T) or a constant (F)
+   ln_apr_obc  = .false.    !  inverse barometer added to OBC ssh data
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_sst      = 'sst_data'  ,        24         ,  'sst'    ,    .false.   , .false., 'yearly'  , ''       , ''       , ''
+   sn_sss      = 'sss_data'  ,        -1         ,  'sss'    ,    .true.    , .true. , 'yearly'  , ''       , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the runoff files
+   nn_sstr     =     0     !  add a retroaction term in the surface heat       flux (=1) or not (=0)
+   nn_sssr     =     2     !  add a damping     term in the surface freshwater flux (=2)
+                           !  or to SSS only (=1) or no damping term (=0)
+   rn_dqdt     =   -40.    !  magnitude of the retroaction on temperature   [W/m2/K]
+   rn_deds     =  -166.67  !  magnitude of the damping on salinity   [mm/day]
+   ln_sssr_bnd =   .true.  !  flag to bound erp term (associated with nn_sssr=2)
+   rn_sssr_bnd =   4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day]
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+   rn_cloud    =    0.06   !  cloud correction to snow and ice albedo
+   rn_albice   =    0.53   !  albedo of melting ice in the arctic and antarctic
+   rn_alphd    =    0.80   !  coefficients for linear interpolation used to
+   rn_alphc    =    0.65   !  compute albedo between two extremes values
+   rn_alphdi   =    0.72   !  (Pyane, 1972)
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+      ln_icebergs              = .false.
+      ln_bergdia               = .true.               ! Calculate budgets
+      nn_verbose_level         = 1                    ! Turn on more verbose output if level > 0
+      nn_verbose_write         = 15                   ! Timesteps between verbose messages
+      nn_sample_rate           = 1                    ! Timesteps between sampling for trajectory storage
+                                                      ! Initial mass required for an iceberg of each class
+      rn_initial_mass          = 8.8e7, 4.1e8, 3.3e9, 1.8e10, 3.8e10, 7.5e10, 1.2e11, 2.2e11, 3.9e11, 7.4e11
+                                                      ! Proportion of calving mass to apportion to each class  
+      rn_distribution          = 0.24, 0.12, 0.15, 0.18, 0.12, 0.07, 0.03, 0.03, 0.03, 0.02
+                                                      ! Ratio between effective and real iceberg mass (non-dim)
+                                                      ! i.e. number of icebergs represented at a point         
+      rn_mass_scaling          = 2000, 200, 50, 20, 10, 5, 2, 1, 1, 1
+                                                      ! thickness of newly calved bergs (m)
+      rn_initial_thickness     = 40., 67., 133., 175., 250., 250., 250., 250., 250., 250.
+      rn_rho_bergs             = 850.                 ! Density of icebergs
+      rn_LoW_ratio             = 1.5                  ! Initial ratio L/W for newly calved icebergs
+      ln_operator_splitting    = .true.               ! Use first order operator splitting for thermodynamics
+      rn_bits_erosion_fraction = 0.                   ! Fraction of erosion melt flux to divert to bergy bits
+      rn_sicn_shift            = 0.                   ! Shift of sea-ice concn in erosion flux (0<sicn_shift<1)
+      ln_passive_mode          = .false.              ! iceberg - ocean decoupling   
+      nn_test_icebergs         =  10                  ! Create test icebergs of this class (-1 = no)
+                                                      ! Put a test iceberg at each gridpoint in box (lon1,lon2,lat1,lat2)
+      rn_test_box              = 108.0,  116.0, -66.0, -58.0
+      rn_speed_limit           = 0.                   ! CFL speed limit for a berg   
+
+!              ! file name ! frequency (hours) !   variable   ! time interp.   !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !           !  (if <0  months)  !     name     !   (logical)    !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      !
+      sn_icb =  'calving' ,       -1           , 'calvingmask',  .true.        , .true.  , 'yearly'  , ''       , ''       , ''
+   
+      cn_dir = './' 
+/
+
+!!======================================================================
+!!               ***  Lateral boundary condition  ***
+!!======================================================================
+!!   namlbc        lateral momentum boundary condition
+!!   namcla        cross land advection
+!!   namobc        open boundaries parameters                           ("key_obc")
+!!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif")
+!!   nambdy        Unstructured open boundaries                         ("key_bdy")
+!!   namtide       Tidal forcing at open boundaries                     ("key_bdy_tides")
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =    2.     !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+                           !  free slip  !   partial slip  !   no slip   ! strong slip
+   ln_vorlat   = .false.   !  consistency of vorticity boundary condition with analytical eqs.
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+   nn_cla      =    0      !  advection between 2 ocean pts separates by land
+/
+!-----------------------------------------------------------------------
+&namobc        !   open boundaries parameters                           ("key_obc")
+!-----------------------------------------------------------------------
+   ln_obc_clim = .false.   !  climatological obc data files (T) or not (F)
+   ln_vol_cst  = .true.    !  impose the total volume conservation (T) or not (F)
+   ln_obc_fla  = .false.   !  Flather open boundary condition
+   nn_obcdta   =    1      !  = 0 the obc data are equal to the initial state
+                           !  = 1 the obc data are read in 'obc.dta' files
+   cn_obcdta   = 'annual'  !  set to annual if obc datafile hold 1 year of data
+                           !  set to monthly if obc datafile hold 1 month of data
+   rn_dpein    =    1.     !  damping time scale for inflow at east  open boundary
+   rn_dpwin    =    1.     !     -           -         -       west    -      -
+   rn_dpnin    =    1.     !     -           -         -       north   -      -
+   rn_dpsin    =    1.     !     -           -         -       south   -      -
+   rn_dpeob    = 3000.     !  time relaxation (days) for the east  open boundary
+   rn_dpwob    =   15.     !     -           -         -     west    -      -
+   rn_dpnob    = 3000.     !     -           -         -     north   -      -
+   rn_dpsob    =   15.     !     -           -         -     south   -      -
+   rn_volemp   =    1.     !  = 0 the total volume change with the surface flux (E-P-R)
+                           !  = 1 the total volume remains constant
+/
+!-----------------------------------------------------------------------
+&namagrif      !  AGRIF zoom                                            ("key_agrif")
+!-----------------------------------------------------------------------
+   nn_cln_update =    3    !  baroclinic update frequency
+   ln_spc_dyn    = .true.  !  use 0 as special value for dynamics
+   rn_sponge_tra = 2880.   !  coefficient for tracer   sponge layer [m2/s]
+   rn_sponge_dyn = 2880.   !  coefficient for dynamics sponge layer [m2/s]
+/
+!-----------------------------------------------------------------------
+&nam_tide      !   tide parameters (#ifdef key_tide)
+!-----------------------------------------------------------------------
+   ln_tide_pot   = .true.   !  use tidal potential forcing
+   ln_tide_ramp  = .false.  !
+   rdttideramp   =    0.    !
+   clname(1)     =   'M2'   !  name of constituent
+   clname(2)     =   'S2'
+   clname(3)     =   'N2'
+   clname(4)     =   'K1'
+   clname(5)     =   'O1'
+   clname(6)     =   'Q1'
+   clname(7)     =   'M4'
+   clname(8)     =   'K2'
+   clname(9)     =   'P1'
+   clname(10)    =   'Mf'
+   clname(11)    =   'Mm'
+/
+!-----------------------------------------------------------------------
+&nambdy        !  unstructured open boundaries                          ("key_bdy")
+!-----------------------------------------------------------------------
+    nb_bdy         = 0                    !  number of open boundary sets
+    ln_coords_file = .true.               !  =T : read bdy coordinates from file
+    cn_coords_file = 'coordinates.bdy.nc' !  bdy coordinates files
+    ln_mask_file   = .false.              !  =T : read mask from file
+    cn_mask_file   = ''                   !  name of mask file (if ln_mask_file=.TRUE.)
+    cn_dyn2d       = 'none'               !
+    nn_dyn2d_dta   =  0                   !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+                                          !  = 2, use tidal harmonic forcing data from files
+                                          !  = 3, use external data AND tidal harmonic forcing
+    cn_dyn3d      =  'none'               !  
+    nn_dyn3d_dta  =  0                    !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+    cn_tra        =  'none'               ! 
+    nn_tra_dta    =  0                    !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+    cn_ice_lim      =  'none'             !  
+    nn_ice_lim_dta  =  0                  !  = 0, bdy data are equal to the initial state
+                                          !  = 1, bdy data are read in 'bdydata   .nc' files
+    rn_ice_tem      = 270.                !  lim3 only: arbitrary temperature of incoming sea ice
+    rn_ice_sal      = 10.                 !  lim3 only:      --   salinity           --
+    rn_ice_age      = 30.                 !  lim3 only:      --   age                --
+
+    ln_tra_dmp    =.false.                !  open boudaries conditions for tracers
+    ln_dyn3d_dmp  =.false.                !  open boundary condition for baroclinic velocities
+    rn_time_dmp   =  1.                   ! Damping time scale in days 
+    rn_time_dmp_out =  1.                 ! Outflow damping time scale
+    nn_rimwidth   = 10                    !  width of the relaxation zone
+    ln_vol        = .false.               !  total volume correction (see nn_volctl parameter)
+    nn_volctl     = 1                     !  = 0, the total water flux across open boundaries is zero
+/
+!-----------------------------------------------------------------------
+&nambdy_dta      !  open boundaries - external data           ("key_bdy")
+!-----------------------------------------------------------------------
+!              !  file name      ! frequency (hours) ! variable   ! time interp.   !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                 !  (if <0  months)  !   name     !   (logical)    !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      !
+   bn_ssh =     'amm12_bdyT_u2d' ,         24        , 'sossheig' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_u2d =     'amm12_bdyU_u2d' ,         24        , 'vobtcrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_v2d =     'amm12_bdyV_u2d' ,         24        , 'vobtcrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_u3d  =    'amm12_bdyU_u3d' ,         24        , 'vozocrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_v3d  =    'amm12_bdyV_u3d' ,         24        , 'vomecrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_tem  =    'amm12_bdyT_tra' ,         24        , 'votemper' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_sal  =    'amm12_bdyT_tra' ,         24        , 'vosaline' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+! for lim2
+!   bn_frld  =    'amm12_bdyT_ice' ,         24        , 'ileadfra' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_hicif =    'amm12_bdyT_ice' ,         24        , 'iicethic' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_hsnif =    'amm12_bdyT_ice' ,         24        , 'isnowthi' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+! for lim3
+!   bn_a_i  =    'amm12_bdyT_ice' ,         24        , 'ileadfra' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_ht_i =    'amm12_bdyT_ice' ,         24        , 'iicethic' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+!   bn_ht_s =    'amm12_bdyT_ice' ,         24        , 'isnowthi' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   cn_dir  =    'bdydta/'
+   ln_full_vel = .false.
+/
+!-----------------------------------------------------------------------
+&nambdy_tide     ! tidal forcing at open boundaries
+!-----------------------------------------------------------------------
+   filtide          = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files
+   ln_bdytide_2ddta = .false.
+   ln_bdytide_conj  = .false.
+/
+!!======================================================================
+!!                 ***  Bottom boundary condition  ***
+!!======================================================================
+!!   nambfr        bottom friction
+!!   nambbc        bottom temperature boundary condition
+!!   nambbl        bottom boundary layer scheme                         ("key_trabbl")
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+   nn_bfr      =    1      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
+                           !                              = 2 : nonlinear friction
+   rn_bfri1    =    4.e-4  !  bottom drag coefficient (linear case)
+   rn_bfri2    =    1.e-3  !  bottom drag coefficient (non linear case). Minimum coeft if ln_loglayer=T
+   rn_bfri2_max =   1.e-1  !  max. bottom drag coefficient (non linear case and ln_loglayer=T)
+   rn_bfeb2    =    2.5e-3 !  bottom turbulent kinetic energy background  (m2/s2)
+   rn_bfrz0    =    3.e-3  !  bottom roughness [m] if ln_loglayer=T 
+   ln_loglayer = .false.   !  logarithmic formulation (non linear case)
+   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file )
+   rn_bfrien   =    50.    !  local multiplying factor of bfr (ln_bfr2d=T)
+   ln_bfrimp   = .true.    !  implicit bottom friction (requires ln_zdfexp = .false. if true)
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+   ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom
+   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux
+                           !     = 1 constant flux
+                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)
+   rn_geoflx_cst = 86.4e-3 !  Constant value of geothermal heat flux [W/m2]
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+   nn_bbl_ldf  =  1      !  diffusive bbl (=1)   or not (=0)
+   nn_bbl_adv  =  0      !  advective bbl (=1/2) or not (=0)
+   rn_ahtbbl   =  1000.  !  lateral mixing coefficient in the bbl  [m2/s]
+   rn_gambbl   =  10.    !  advective bbl coefficient                 [s]
+/
+
+!!======================================================================
+!!                        Tracer (T & S ) namelists
+!!======================================================================
+!!   nameos        equation of state
+!!   namtra_adv    advection scheme
+!!   namtra_ldf    lateral diffusion scheme
+!!   namtra_dmp    T & S newtonian damping
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+   nn_eos      =   0       !  type of equation of state and Brunt-Vaisala frequency
+                           !     = 0, UNESCO (formulation of Jackett and McDougall (1994) and of McDougall (1987) )
+                           !     = 1, linear: rho(T)   = rau0 * ( 1.028 - ralpha * T )
+                           !     = 2, linear: rho(T,S) = rau0 * ( rbeta * S - ralpha * T )
+   rn_alpha    =   2.0e-4  !  thermal expension coefficient (nn_eos= 1 or 2)
+   rn_beta     =   7.7e-4  !  saline  expension coefficient (nn_eos= 2)
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+   ln_traadv_cen2   =  .false.  !  2nd order centered scheme
+   ln_traadv_tvd    =  .true.   !  TVD scheme
+   ln_traadv_muscl  =  .false.  !  MUSCL scheme
+   ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries
+   ln_traadv_ubs    =  .false.  !  UBS scheme
+   ln_traadv_qck    =  .false.  !  QUICKEST scheme
+   ln_traadv_msc_ups=  .false.  !  use upstream scheme within muscl
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !   mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+   ln_mle    = .true.      ! (T) use the Mixed Layer Eddy (MLE) parameterisation
+   rn_ce     = 0.06        ! magnitude of the MLE (typical value: 0.06 to 0.08)
+   nn_mle    = 1           ! MLE type: =0 standard Fox-Kemper ; =1 new formulation
+   rn_lf     = 5.e+3       ! typical scale of mixed layer front (meters)                      (case rn_mle=0)
+   rn_time   = 172800.     ! time scale for mixing momentum across the mixed layer (seconds)  (case rn_mle=0)
+   rn_lat    = 20.         ! reference latitude (degrees) of MLE coef.                        (case rn_mle=1)
+   nn_mld_uv = 0           ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max)
+   nn_conv   = 0           ! =1 no MLE in case of convection ; =0 always MLE
+   rn_rho_c_mle  = 0.01    ! delta rho criterion used to calculate MLD for FK
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   !                       !  Operator type:
+   ln_traldf_lap    =  .true.   !  laplacian operator
+   ln_traldf_bilap  =  .false.  !  bilaplacian operator
+   !                       !  Direction of action:
+   ln_traldf_level  =  .false.  !  iso-level
+   ln_traldf_hor    =  .false.  !  horizontal (geopotential)   (needs "key_ldfslp" when ln_sco=T)
+   ln_traldf_iso    =  .true.   !  iso-neutral                 (needs "key_ldfslp")
+   !		       	   !  Griffies parameters              (all need "key_ldfslp")
+   ln_traldf_grif   =  .false.  !  use griffies triads
+   ln_traldf_gdia   =  .false.  !  output griffies eddy velocities
+   ln_triad_iso     =  .false.  !  pure lateral mixing in ML
+   ln_botmix_grif   =  .false.  !  lateral mixing on bottom
+   !                       !  Coefficients
+   ! Eddy-induced (GM) advection always used with Griffies; otherwise needs "key_traldf_eiv"
+   ! Value rn_aeiv_0 is ignored unless = 0 with Held-Larichev spatially varying aeiv
+   !                                  (key_traldf_c2d & key_traldf_eiv & key_orca_r2, _r1 or _r05)
+   rn_aeiv_0        =  2000.    !  eddy induced velocity coefficient [m2/s]
+   rn_aht_0         =  2000.    !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_ahtb_0        =     0.    !  background eddy diffusivity for ldf_iso [m2/s]
+   !                                           (normally=0; not used with Griffies)
+   rn_slpmax        =     0.01  !  slope limit
+   rn_chsmag        =     1.    !  multiplicative factor in Smagorinsky diffusivity
+   rn_smsh          =     1.    !  Smagorinsky diffusivity: = 0 - use only sheer
+   rn_aht_m         =  2000.    !  upper limit or stability criteria for lateral eddy diffusivity (m2/s)
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  .true.   !  add a damping termn (T) or not (F)
+   nn_hdmp     =   -1      !  horizontal shape =-1, damping in Med and Red Seas only
+                           !                   =XX, damping poleward of XX degrees (XX>0)
+                           !                      + F(distance-to-coast) + Red and Med Seas
+   nn_zdmp     =    0      !  vertical   shape =0    damping throughout the water column
+                           !                   =1 no damping in the mixing layer (kz  criteria)
+                           !                   =2 no damping in the mixed  layer (rho crieria)
+   rn_surf     =   50.     !  surface time scale of damping   [days]
+   rn_bot      =  360.     !  bottom  time scale of damping   [days]
+   rn_dep      =  800.     !  depth of transition between rn_surf and rn_bot [meters]
+   nn_file     =    0      !  create a damping.coeff NetCDF file (=1) or not (=0)
+/
+
+!!======================================================================
+!!                      ***  Dynamics namelists  ***
+!!======================================================================
+!!   namdyn_adv    formulation of the momentum advection
+!!   namdyn_vor    advection scheme
+!!   namdyn_hpg    hydrostatic pressure gradient
+!!   namdyn_spg    surface pressure gradient                            (CPP key only)
+!!   namdyn_ldf    lateral diffusion scheme
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)
+   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme
+   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme
+/
+!-----------------------------------------------------------------------
+&nam_vvl    !   vertical coordinate options
+!-----------------------------------------------------------------------
+   ln_vvl_zstar  = .true.           !  zstar vertical coordinate                   
+   ln_vvl_ztilde = .false.          !  ztilde vertical coordinate: only high frequency variations
+   ln_vvl_layer  = .false.          !  full layer vertical coordinate
+   ln_vvl_ztilde_as_zstar = .false. !  ztilde vertical coordinate emulating zstar
+   ln_vvl_zstar_at_eqtor = .false.  !  ztilde near the equator
+   rn_ahe3       = 0.0e0            !  thickness diffusion coefficient
+   rn_rst_e3t    = 30.e0            !  ztilde to zstar restoration timescale [days]
+   rn_lf_cutoff  = 5.0e0            !  cutoff frequency for low-pass filter  [days]
+   rn_zdef_max   = 0.9e0            !  maximum fractional e3t deformation
+   ln_vvl_dbg    = .true.           !  debug prints    (T/F)
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+   ln_dynvor_ene = .false. !  enstrophy conserving scheme
+   ln_dynvor_ens = .false. !  energy conserving scheme
+   ln_dynvor_mix = .false. !  mixed scheme
+   ln_dynvor_een = .true.  !  energy & enstrophy scheme
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+   ln_hpg_zco  = .false.   !  z-coordinate - full steps
+   ln_hpg_zps  = .true.    !  z-coordinate - partial steps (interpolation)
+   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation)
+   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
+   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme)
+   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T)
+                                 !           centered      time scheme  (F)
+/
+!-----------------------------------------------------------------------
+!namdyn_spg    !   surface pressure gradient   (CPP key only)
+!-----------------------------------------------------------------------
+!                          !  explicit free surface                     ("key_dynspg_exp")
+!                          !  filtered free surface                     ("key_dynspg_flt")
+!                          !  split-explicit free surface               ("key_dynspg_ts")
+
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   !                       !  Type of the operator :
+   ln_dynldf_lap    =  .true.   !  laplacian operator
+   ln_dynldf_bilap  =  .false.  !  bilaplacian operator
+   !                       !  Direction of action  :
+   ln_dynldf_level  =  .false.  !  iso-level
+   ln_dynldf_hor    =  .true.   !  horizontal (geopotential)            (require "key_ldfslp" in s-coord.)
+   ln_dynldf_iso    =  .false.  !  iso-neutral                          (require "key_ldfslp")
+   !                       !  Coefficient
+   rn_ahm_0_lap     = 40000.    !  horizontal laplacian eddy viscosity   [m2/s]
+   rn_ahmb_0        =     0.    !  background eddy viscosity for ldf_iso [m2/s]
+   rn_ahm_0_blp     =     0.    !  horizontal bilaplacian eddy viscosity [m4/s]
+   rn_cmsmag_1      =     3.    !  constant in laplacian Smagorinsky viscosity
+   rn_cmsmag_2      =     3     !  constant in bilaplacian Smagorinsky viscosity
+   rn_cmsh          =     1.    !  1 or 0 , if 0 -use only shear for Smagorinsky viscosity
+   rn_ahm_m_blp     =    -1.e12 !  upper limit for bilap  abs(ahm) < min( dx^4/128rdt, rn_ahm_m_blp)
+   rn_ahm_m_lap     = 40000.    !  upper limit for lap  ahm < min(dx^2/16rdt, rn_ahm_m_lap)
+/
+
+!!======================================================================
+!!             Tracers & Dynamics vertical physics namelists
+!!======================================================================
+!!    namzdf        vertical physics
+!!    namzdf_ric    richardson number dependent vertical mixing         ("key_zdfric")
+!!    namzdf_tke    TKE dependent vertical mixing                       ("key_zdftke")
+!!    namzdf_kpp    KPP dependent vertical mixing                       ("key_zdfkpp")
+!!    namzdf_ddm    double diffusive mixing parameterization            ("key_zdfddm")
+!!    namzdf_tmx    tidal mixing parameterization                       ("key_zdftmx")
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+   rn_avm0     =   1.2e-4  !  vertical eddy viscosity   [m2/s]          (background Kz if not "key_zdfcst")
+   rn_avt0     =   1.2e-5  !  vertical eddy diffusivity [m2/s]          (background Kz if not "key_zdfcst")
+   nn_avb      =    0      !  profile for background avt & avm (=1) or not (=0)
+   nn_havtb    =    0      !  horizontal shape for avtb (=1) or not (=0)
+   ln_zdfevd   = .true.    !  enhanced vertical diffusion (evd) (T) or not (F)
+   nn_evdm     =    0      !  evd apply on tracer (=0) or on tracer and momentum (=1)
+   rn_avevd    =  100.     !  evd mixing coefficient [m2/s]
+   ln_zdfnpc   = .false.   !  Non-Penetrative Convective algorithm (T) or not (F)
+   nn_npc      =    1            !  frequency of application of npc
+   nn_npcp     =  365            !  npc control print frequency
+   ln_zdfexp   = .false.   !  time-stepping: split-explicit (T) or implicit (F) time stepping
+   nn_zdfexp   =    3            !  number of sub-timestep for ln_zdfexp=T
+/
+!-----------------------------------------------------------------------
+&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
+!-----------------------------------------------------------------------
+   rn_avmri    = 100.e-4   !  maximum value of the vertical viscosity
+   rn_alp      =   5.      !  coefficient of the parameterization
+   nn_ric      =   2       !  coefficient of the parameterization
+   rn_ekmfc    =   0.7     !  Factor in the Ekman depth Equation
+   rn_mldmin   =   1.0     !  minimum allowable mixed-layer depth estimate (m)
+   rn_mldmax   =1000.0     !  maximum allowable mixed-layer depth estimate (m)
+   rn_wtmix    =  10.0     !  vertical eddy viscosity coeff [m2/s] in the mixed-layer
+   rn_wvmix    =  10.0     !  vertical eddy diffusion coeff [m2/s] in the mixed-layer
+   ln_mldw     = .true.    !  Flag to use or not the mized layer depth param.
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+   rn_ediff    =   0.1     !  coef. for vertical eddy coef. (avt=rn_ediff*mxl*sqrt(e) )
+   rn_ediss    =   0.7     !  coef. of the Kolmogoroff dissipation
+   rn_ebb      =  67.83    !  coef. of the surface input of tke (=67.83 suggested when ln_mxl0=T)
+   rn_emin     =   1.e-6   !  minimum value of tke [m2/s2]
+   rn_emin0    =   1.e-4   !  surface minimum value of tke [m2/s2]
+   rn_bshear   =   1.e-20  ! background shear (>0) currently a numerical threshold (do not change it)
+   nn_mxl      =   2       !  mixing length: = 0 bounded by the distance to surface and bottom
+                           !                 = 1 bounded by the local vertical scale factor
+                           !                 = 2 first vertical derivative of mixing length bounded by 1
+                           !                 = 3 as =2 with distinct disspipative an mixing length scale
+   nn_pdl      =   1       !  Prandtl number function of richarson number (=1, avt=pdl(Ri)*avm) or not (=0, avt=avm)
+   ln_mxl0     = .true.    !  surface mixing length scale = F(wind stress) (T) or not (F)
+   rn_mxl0     =   0.04    !  surface  buoyancy lenght scale minimum value
+   ln_lc       = .true.    !  Langmuir cell parameterisation (Axell 2002)
+   rn_lc       =   0.15    !  coef. associated to Langmuir cells
+   nn_etau     =   1       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
+                           !        = 0 no penetration
+                           !        = 1 add a tke source below the ML
+                           !        = 2 add a tke source just at the base of the ML
+                           !        = 3 as = 1 applied on HF part of the stress    ("key_coupled")
+   rn_efr      =   0.05    !  fraction of surface tke value which penetrates below the ML (nn_etau=1 or 2)
+   nn_htau     =   1       !  type of exponential decrease of tke penetration below the ML
+                           !        = 0  constant 10 m length scale
+                           !        = 1  0.5m at the equator to 30m poleward of 40 degrees
+/
+!------------------------------------------------------------------------
+&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally:
+!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb")
+   ln_kpprimix = .true.    !  shear instability mixing
+   rn_difmiw   =  1.0e-04  !  constant internal wave viscosity [m2/s]
+   rn_difsiw   =  0.1e-04  !  constant internal wave diffusivity [m2/s]
+   rn_riinfty  =  0.8      !  local Richardson Number limit for shear instability
+   rn_difri    =  0.0050   !  maximum shear mixing at Rig = 0    [m2/s]
+   rn_bvsqcon  = -0.01e-07 !  Brunt-Vaisala squared for maximum convection [1/s2]
+   rn_difcon   =  1.       !  maximum mixing in interior convection [m2/s]
+   nn_avb      =  0        !  horizontal averaged (=1) or not (=0) on avt and amv
+   nn_ave      =  1        !  constant (=0) or profile (=1) background on avt
+/
+!-----------------------------------------------------------------------
+&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
+!-----------------------------------------------------------------------
+   rn_emin       = 1.e-6   !  minimum value of e   [m2/s2]
+   rn_epsmin     = 1.e-12  !  minimum value of eps [m2/s3]
+   ln_length_lim = .true.  !  limit on the dissipation rate under stable stratification (Galperin et al., 1988)
+   rn_clim_galp  = 0.53    !  galperin limit
+   ln_crban      = .true.  !  Use Craig & Banner (1994) surface wave mixing parametrisation
+   ln_sigpsi     = .true.  !  Activate or not Burchard 2001 mods on psi schmidt number in the wb case
+   rn_crban      = 100.    !  Craig and Banner 1994 constant for wb tke flux
+   rn_charn      = 70000.  !  Charnock constant for wb induced roughness length
+   nn_tkebc_surf =   1     !  surface tke condition (0/1/2=Dir/Neum/Dir Mellor-Blumberg)
+   nn_tkebc_bot  =   1     !  bottom tke condition (0/1=Dir/Neum)
+   nn_psibc_surf =   1     !  surface psi condition (0/1/2=Dir/Neum/Dir Mellor-Blumberg)
+   nn_psibc_bot  =   1     !  bottom psi condition (0/1=Dir/Neum)
+   nn_stab_func  =   2     !  stability function (0=Galp, 1= KC94, 2=CanutoA, 3=CanutoB)
+   nn_clos       =   1     !  predefined closure type (0=MY82, 1=k-eps, 2=k-w, 3=Gen)
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+   rn_avts     = 1.e-4     !  maximum avs (vertical mixing on salinity)
+   rn_hsbfr    = 1.6       !  heat/salt buoyancy flux ratio
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+   rn_htmx     = 500.      !  vertical decay scale for turbulence (meters)
+   rn_n2min    = 1.e-8     !  threshold of the Brunt-Vaisala frequency (s-1)
+   rn_tfe      = 0.333     !  tidal dissipation efficiency
+   rn_me       = 0.2       !  mixing efficiency
+   ln_tmx_itf  = .true.    !  ITF specific parameterisation
+   rn_tfe_itf  = 1.        !  ITF tidal dissipation efficiency
+/
+
+!!======================================================================
+!!                  ***  Miscellaneous namelists  ***
+!!======================================================================
+!!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi)
+!!   namctl            Control prints & Benchmark
+!!   namsol            elliptic solver / island / free surface
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+   nn_solv     =      1    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
+                           !                   =2 successive-over-relaxation (sor)
+   nn_sol_arp  =      0    !  absolute/relative (0/1) precision convergence test
+   rn_eps      =  1.e-6    !  absolute precision of the solver
+   nn_nmin     =    300    !  minimum of iterations for the SOR solver
+   nn_nmax     =    800    !  maximum of iterations for the SOR solver
+   nn_nmod     =     10    !  frequency of test for the SOR solver
+   rn_resmax   =  1.e-10   !  absolute precision for the SOR solver
+   rn_sor      =  1.92     !  optimal coefficient for SOR solver (to be adjusted with the domain)
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+   cn_mpi_send =  'I'      !  mpi send/recieve type   ='S', 'B', or 'I' for standard send,
+                           !  buffer blocking send or immediate non-blocking sends, resp.
+   nn_buffer   =   0       !  size in bytes of exported buffer ('B' case), 0 no exportation
+   ln_nnogather=  .false.  !  activate code to avoid mpi_allgather use at the northfold
+   jpni        =   0       !  jpni   number of processors following i (set automatically if < 1)
+   jpnj        =   0       !  jpnj   number of processors following j (set automatically if < 1)
+   jpnij       =   0       !  jpnij  number of local domains (set automatically if < 1)
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+   ln_ctl      = .false.   !  trends control print (expensive!)
+   nn_print    =    0      !  level of print (0 no extra print)
+   nn_ictls    =    0      !  start i indice of control sum (use to compare mono versus
+   nn_ictle    =    0      !  end   i indice of control sum        multi processor runs
+   nn_jctls    =    0      !  start j indice of control               over a subdomain)
+   nn_jctle    =    0      !  end   j indice of control
+   nn_isplt    =    1      !  number of processors in i-direction
+   nn_jsplt    =    1      !  number of processors in j-direction
+   nn_bench    =    0      !  Bench mode (1/0): CAUTION use zero except for bench
+                           !     (no physical validity of the results)
+   nn_timing   =    0      !  timing by routine activated (=1) creates timing.output file, or not (=0)
+/
+!-----------------------------------------------------------------------
+&namc1d_uvd    !   data: U & V currents                                 ("key_c1d")
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_ucur     = 'ucurrent'  ,         -1        ,'u_current',   .false.    , .true. , 'monthly' ,  ''      ,  'Ume'   , ''
+   sn_vcur     = 'vcurrent'  ,         -1        ,'v_current',   .false.    , .true. , 'monthly' ,  ''      ,  'Vme'   , ''
+!
+   cn_dir        = './'    !  root directory for the location of the files
+   ln_uvd_init   = .false. !  Initialisation of ocean U & V with U & V input data (T) or not (F)
+   ln_uvd_dyndmp = .false. !  damping of ocean U & V toward U & V input data (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d")
+!-----------------------------------------------------------------------
+   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F)
+/
+!!======================================================================
+!!                  ***  Diagnostics namelists  ***
+!!======================================================================
+!!   namnc4       netcdf4 chunking and compression settings             ("key_netcdf4")
+!!   namtrd       dynamics and/or tracer trends                         ("key_trddyn","key_trdtra","key_trdmld")
+!!   namflo       float parameters                                      ("key_float")
+!!   namptr       Poleward Transport Diagnostics
+!!   namhsb       Heat and salt budgets
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4")
+!-----------------------------------------------------------------------
+   nn_nchunks_i=   4       !  number of chunks in i-dimension
+   nn_nchunks_j=   4       !  number of chunks in j-dimension
+   nn_nchunks_k=   31      !  number of chunks in k-dimension
+                           !  setting nn_nchunks_k = jpk will give a chunk size of 1 in the vertical which
+                           !  is optimal for postprocessing which works exclusively with horizontal slabs
+   ln_nc4zip   = .true.    !  (T) use netcdf4 chunking and compression
+                           !  (F) ignore chunking information and produce netcdf3-compatible files
+/
+!-----------------------------------------------------------------------
+&namtrd        !   diagnostics on dynamics and/or tracer trends         ("key_trddyn" and/or "key_trdtra")
+!              !       or mixed-layer trends or barotropic vorticity    ("key_trdmld" or     "key_trdvor")
+!-----------------------------------------------------------------------
+   nn_trd      = 365       !  time step frequency dynamics and tracers trends
+   nn_ctls     =   0       !  control surface type in mixed-layer trends (0,1 or n<jpk)
+   rn_ucf      =   1.      !  unit conversion factor (=1 -> /seconds ; =86400. -> /day)
+   cn_trdrst_in      = "restart_mld"   ! suffix of ocean restart name (input)
+   cn_trdrst_out     = "restart_mld"   ! suffix of ocean restart name (output)
+   ln_trdmld_restart = .false.         !  restart for ML diagnostics
+   ln_trdmld_instant = .false.         !  flag to diagnose trends of instantantaneous or mean ML T/S
+/
+!-----------------------------------------------------------------------
+&namflo       !   float parameters                                      ("key_float")
+!-----------------------------------------------------------------------
+   jpnfl         = 1          !  total number of floats during the run
+   jpnnewflo     = 0          !  number of floats for the restart
+   ln_rstflo     = .false.    !  float restart (T) or not (F)
+   nn_writefl    =      75    !  frequency of writing in float output file
+   nn_stockfl    =    5475    !  frequency of creation of the float restart file
+   ln_argo       = .false.    !  Argo type floats (stay at the surface each 10 days)
+   ln_flork4     = .false.    !  trajectories computed with a 4th order Runge-Kutta (T)
+                              !  or computed with Blanke' scheme (F)
+   ln_ariane     = .true.     !  Input with Ariane tool convention(T)
+   ln_flo_ascii  = .true.     !  Output with Ariane tool netcdf convention(F) or ascii file (T)
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+   ln_diaptr  = .false.    !  Poleward heat and salt transport (T) or not (F)
+   ln_diaznl  = .true.     !  Add zonal means and meridional stream functions
+   ln_subbas  = .true.     !  Atlantic/Pacific/Indian basins computation (T) or not
+                           !  (orca configuration only, need input basins mask file named "subbasins.nc"
+   ln_ptrcomp = .true.     !  Add decomposition : overturning
+   nn_fptr    =  1         !  Frequency of ptr computation [time step]
+   nn_fwri    =  15        !  Frequency of ptr outputs [time step]
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+   ln_diahsb  = .false.    !  check the heat and salt budgets (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&nam_diaharm   !   Harmonic analysis of tidal constituents ('key_diaharm')
+!-----------------------------------------------------------------------
+    nit000_han = 1         ! First time step used for harmonic analysis
+    nitend_han = 75        ! Last time step used for harmonic analysis
+    nstep_han  = 15        ! Time step frequency for harmonic analysis
+    tname(1)   = 'M2'      ! Name of tidal constituents
+    tname(2)   = 'K1'
+/
+!-----------------------------------------------------------------------
+&namdct        ! transports through sections
+!-----------------------------------------------------------------------
+    nn_dct      = 15       !  time step frequency for transports computing
+    nn_dctwri   = 15       !  time step frequency for transports writing
+    nn_secdebug = 112      !      0 : no section to debug
+                           !     -1 : debug all section
+                           !  0 < n : debug section number n
+/
+
+!!======================================================================
+!!            ***  Observation & Assimilation namelists ***
+!!======================================================================
+!!   namobs       observation and model comparison                      ('key_diaobs')
+!!   nam_asminc   assimilation increments                               ('key_asminc')
+!!======================================================================
+!
+!-----------------------------------------------------------------------
+&namobs       !  observation usage switch                               ('key_diaobs')
+!-----------------------------------------------------------------------
+   ln_t3d     = .false.    ! Logical switch for T profile observations
+   ln_s3d     = .false.    ! Logical switch for S profile observations
+   ln_ena     = .false.    ! Logical switch for ENACT insitu data set
+   !                       !     ln_cor                  Logical switch for Coriolis insitu data set
+   ln_profb   = .false.    ! Logical switch for feedback insitu data set
+   ln_sla     = .false.    ! Logical switch for SLA observations
+
+   ln_sladt   = .false.    ! Logical switch for AVISO SLA data
+
+   ln_slafb   = .false.    ! Logical switch for feedback SLA data
+                           !     ln_ssh                  Logical switch for SSH observations
+
+   ln_sst     = .true.     ! Logical switch for SST observations
+   ln_reysst  = .true.     !     ln_reysst               Logical switch for Reynolds observations
+   ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations      
+
+   ln_sstfb   = .false.    ! Logical switch for feedback SST data
+                           !     ln_sss                  Logical switch for SSS observations
+                           !     ln_seaice               Logical switch for Sea Ice observations
+                           !     ln_vel3d                Logical switch for velocity observations
+                           !     ln_velavcur             Logical switch for velocity daily av. cur.
+                           !     ln_velhrcur             Logical switch for velocity high freq. cur.
+                           !     ln_velavadcp            Logical switch for velocity daily av. ADCP
+                           !     ln_velhradcp            Logical switch for velocity high freq. ADCP
+                           !     ln_velfb                Logical switch for feedback velocity data
+                           !     ln_grid_global          Global distribtion of observations
+                           !     ln_grid_search_lookup   Logical switch for obs grid search w/lookup table
+                           !     grid_search_file        Grid search lookup file header
+                           !     enactfiles              ENACT input observation file names
+                           !     coriofiles              Coriolis input observation file name
+   !                       ! profbfiles: Profile feedback input observation file name
+   profbfiles = 'profiles_01.nc'
+                           !     ln_profb_enatim         Enact feedback input time setting switch
+                           !     slafilesact             Active SLA input observation file name
+                           !     slafilespas             Passive SLA input observation file name
+   !                       ! slafbfiles: Feedback SLA input observation file name
+   slafbfiles = 'sla_01.nc'
+                           !     sstfiles                GHRSST input observation file name
+   !                       ! sstfbfiles: Feedback SST input observation file name
+   sstfbfiles = 'sst_01.nc' 'sst_02.nc' 'sst_03.nc' 'sst_04.nc' 'sst_05.nc'
+                           !     seaicefiles             Sea Ice input observation file name
+                           !     velavcurfiles           Vel. cur. daily av. input file name
+                           !     velhvcurfiles           Vel. cur. high freq. input file name
+                           !     velavadcpfiles          Vel. ADCP daily av. input file name
+                           !     velhvadcpfiles          Vel. ADCP high freq. input file name
+                           !     velfbfiles              Vel. feedback input observation file name
+                           !     dobsini                 Initial date in window YYYYMMDD.HHMMSS
+                           !     dobsend                 Final date in window YYYYMMDD.HHMMSS
+                           !     n1dint                  Type of vertical interpolation method
+                           !     n2dint                  Type of horizontal interpolation method
+                           !     ln_nea                  Rejection of observations near land switch
+   nmsshc     = 0          ! MSSH correction scheme
+                           !     mdtcorr                 MDT  correction
+                           !     mdtcutoff               MDT cutoff for computed correction
+   ln_altbias = .false.    ! Logical switch for alt bias
+   ln_ignmis  = .true.     ! Logical switch for ignoring missing files
+                           !     endailyavtypes   ENACT daily average types
+   ln_grid_global = .true.
+   ln_grid_search_lookup = .false.
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+    ln_bkgwri = .false.    !  Logical switch for writing out background state
+    ln_trainc = .false.    !  Logical switch for applying tracer increments
+    ln_dyninc = .false.    !  Logical switch for applying velocity increments
+    ln_sshinc = .false.    !  Logical switch for applying SSH increments
+    ln_asmdin = .false.    !  Logical switch for Direct Initialization (DI)
+    ln_asmiau = .false.    !  Logical switch for Incremental Analysis Updating (IAU)
+    nitbkg    = 0          !  Timestep of background in [0,nitend-nit000-1]
+    nitdin    = 0          !  Timestep of background for DI in [0,nitend-nit000-1]
+    nitiaustr = 1          !  Timestep of start of IAU interval in [0,nitend-nit000-1]
+    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1]
+    niaufn    = 0          !  Type of IAU weighting function
+    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin
+    salfixmin = -9999      !  Minimum salinity after applying the increments
+    nn_divdmp = 0          !  Number of iterations of divergence damping operator
+/
+!-----------------------------------------------------------------------
+&namsbc_wave   ! External fields from wave model
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable     ! time interp. !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name       !   (logical)  !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_cdg      =  'cdg_wave' ,        1          , 'drag_coeff' ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_usd      =  'sdw_wave' ,        1          , 'u_sd2d'     ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_vsd      =  'sdw_wave' ,        1          , 'v_sd2d'     ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_wn       =  'sdw_wave' ,        1          , 'wave_num'   ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+!
+   cn_dir_cdg  = './'  !  root directory for the location of drag coefficient files
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+   ! Suggested lengthscale values are those of Eby & Holloway (1994) for a coarse model
+   ln_neptsimp       = .false.  ! yes/no use simplified neptune
+
+   ln_smooth_neptvel = .false.  ! yes/no smooth zunep, zvnep
+   rn_tslse          =  1.2e4   ! value of lengthscale L at the equator
+   rn_tslsp          =  3.0e3   ! value of lengthscale L at the pole
+   ! Specify whether to ramp down the Neptune velocity in shallow
+   ! water, and if so the depth range controlling such ramping down
+   ln_neptramp       = .true.   ! ramp down Neptune velocity in shallow water
+   rn_htrmin         =  100.0   ! min. depth of transition range
+   rn_htrmax         =  200.0   ! max. depth of transition range
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA1_cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA1_cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA1_cfg	(revision 2504)
@@ -0,0 +1,31 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM-2 : Ice configuration namelist. Overwrites SHARED/namelist_ice_lim2_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+      creepl      =   1.0e-08 !  creep limit
+/
+!-----------------------------------------------------------------------
+&namicetrp     !   ice transport
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+      parsub      = 0.0       !  switch for snow sublimation or not
+/
+!-----------------------------------------------------------------------
+&namice_dmp    !   damping of sea ice alone open boundaries
+!              !   (hard coded damping area: check if it fit your config)
+!-----------------------------------------------------------------------
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA1_ref
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA1_ref	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA1_ref	(revision 2504)
@@ -0,0 +1,130 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM-2 : 1 - dynamics/advection/thermo          (namicerun)
+!! namelists    2 - ice intialisation                  (namiceini)
+!!              3 - ice dynamic                        (namicedyn)
+!!              4 - ice advection                      (namicetrp)
+!!              5 - thermodynamic                      (namicethd)
+!!              6 - ice damping                        (namice_dmp)
+!!              7 - ice diagnostics                    (namicedia)
+!!              8 - ice outputs                        (namiceout)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+   cn_icerst_in  = "restart_ice_in"   !  suffix of ice restart name (input)
+   cn_icerst_out = "restart_ice"      !  suffix of ice restart name (output)
+   ln_limdyn     = .true.             !  ice dynamics (T) or thermodynamics only (F)
+   ln_limdmp     = .false.            !  restoring ice thickness and fraction leads   (T => fill  namice_dmp)
+   acrit         = 1.0e-06 , 1.0e-06  !  minimum lead fraction in the Northern & Southern Hemispheres
+   hsndif        =  0.e0              !  computation of temperature in snow (=0.0) or not
+   hicdif        =  0.e0              !  computation of temperature in ice  (=0.0) or not (=9999.0)
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+   ln_limini   = .false.   !  read the initial state in 'Ice_initialization.nc' (T) or not (F)
+   ttest       =  2.0      !  threshold water temperature for initial sea ice
+   hninn       =  0.5      !  initial snow thickness in the north
+   hginn       =  3.0      !  initial ice  thickness in the north
+   alinn       =  0.05     !  initial leads area     in the north
+   hnins       =  0.1      !  same  three parameter  in the south
+   hgins       =  1.0      !        "                 "     south   
+   alins       =  0.1      !        "                 "     south
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+   epsd        =   1.0e-20 !  tolerance parameter
+   alpha       =   0.5     !  coefficient for semi-implicit coriolis
+   dm          =   0.6e+03 !  diffusion constant for dynamics
+   nbiter      =   1       !  number of sub-time steps for relaxation
+   nbitdr      = 100       !  maximum number of iterations for relaxation
+   om          =   0.5     !  relaxation constant 
+   resl        =   5.0e-05 !  maximum value for the residual of relaxation
+   cw          =   5.0e-03 !  drag coefficient for oceanic stress
+   angvg       =   0.0     !  turning angle for oceanic stress
+   pstar       =   1.0e+04 !  1st bulk-rheology parameter
+   c_rhg       =  20.0     !  2nd bulk-rhelogy parameter
+   etamn       =   0.0e+07 !  minimun value for viscosity
+   creepl      =   1.0e-08 !  creep limit
+   ecc         =   2.0     !  eccentricity of the elliptical yield curve
+   ahi0        = 350.e0    !  horizontal eddy diffusivity coefficient for sea-ice [m2/s]
+   nevp        =   120     !  number of EVP subcycling iterations
+   telast      =   9600    !  timescale for EVP elastic waves
+   alphaevp    =   1.0     !  coefficient for the solution of EVP int. stresses
+   hminrhg     =   0.05     !  ice thickness (m) below which ice velocity equal ocean velocity
+/
+!-----------------------------------------------------------------------
+&namicetrp     !   ice transport
+!-----------------------------------------------------------------------
+   bound       =   0.0     !  boundary conditions (=0. no-slip, =1. free-slip)
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+   hmelt       = -0.15     !  maximum melting at the bottom
+   hiccrit     = 0.3 , 0.3 !  ice thickness for lateral accretion in the Northern (Southern) Hemisphere
+   !                       !  (caution 1.0, 1.0 best value to be used!!! (gilles G.))
+   hicmin      = 0.2       !  ice thickness corr. to max. energy stored in brine pocket
+   hiclim      = 0.05      !  minimum ice thickness
+   amax        = 0.999     !  maximum lead fraction
+   swiqst      = 1.        !  energy stored in brine pocket (=1) or not (=0)	
+   sbeta       = 1.        !  numerical caracteritic of the scheme for diffusion in ice
+                           !        Cranck-Nicholson (=0.5), implicit (=1), explicit (=0)
+   parlat      = 0.0       !  percentage of energy used for lateral ablation
+   hakspl      = 0.5       !  slope of distr. for Hakkinen-Mellor's lateral melting
+   hibspl      = 0.5       !  slope of distribution for Hibler's lateral melting
+   exld        = 2.0       !  exponent for leads-closure rate
+   hakdif      = 1.0       !  coefficient for diffusions of ice and snow
+   thth        = 0.2       !  threshold thickness for comp. of eq. thermal conductivity
+   hnzst       = 0.1       !  thickness of the surf. layer in temp. computation
+   parsub      = 1.0       !  switch for snow sublimation or not
+   alphs       = 1.0       !  coefficient for snow density when snow ice formation
+/
+!-----------------------------------------------------------------------
+&namice_dmp    !   damping of sea ice alone open boundaries
+!              !   (hard coded damping area: check if it fit your config)
+!-----------------------------------------------------------------------
+!              !  file name     ! frequency (hours) ! variable ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                !  (if <0  months)  !   name   !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_hicif    = 'ice_damping'  ,  -1.              , 'hicif'  ,   .true.     , .true. , 'yearly'  , ''       , ''       ,    ''
+   sn_frld     = 'ice_damping'  ,  -1.              , 'frld'   ,   .true.     , .true. , 'yearly'  , ''       , ''       ,    ''
+!
+   cn_dir      = './'      !  root directory for the location of the runoff files
+/
+!-----------------------------------------------------------------------
+&namicedia     !   ice diagnostics
+!-----------------------------------------------------------------------
+   fmtinf      = '1PE13.5' !  format of the output values
+   nfrinf      =  4        !  number of variables written in one line
+   ntmoy       =  1        !  instantaneous values of ice evolution or averaging
+   ninfo       =  1        !  frequency of ouputs on file ice_evolu in case of averaging
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namiceout     !   parameters for outputs
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !         title of the field           !  name     !   units   !  save  ! multipl. ! additive !
+!              !                                      !           !           ! or not !  factor  !  factor  !
+   field_1     = 'Snow thickness                     ', 'isnowthi', 'm       ',    1   ,  1.0     ,    0.0
+   field_2     = 'Ice thickness                      ', 'iicethic', 'm       ',    1   ,  1.0     ,    0.0
+   field_3     = 'Ice produced                       ', 'iiceprod', 'm/kt    ',    1   ,  1.0     ,    0.0
+   field_4     = 'Ice concentration                  ', 'ileadfra', '%       ',    1   , -1.0     ,    1.0
+   field_5     = 'Ice temperature                    ', 'iicetemp', 'C       ',    1   ,  1.0     , -273.15
+   field_6     = 'Oceanic flux at the ice base       ', 'ioceflxb', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_7     = 'Ice velocity u                     ', 'iicevelu', 'm/s     ',    1   ,  1.0     ,    0.0
+   field_8     = 'Ice velocity v                     ', 'iicevelv', 'm/s     ',    1   ,  1.0     ,    0.0
+   field_9     = 'Sea surface temperature            ', 'isstempe', 'C       ',    1   ,  1.0     , -273.15
+   field_10    = 'Sea surface salinity               ', 'isssalin', 'PSU     ',    1   ,  1.0     ,    0.0
+   field_11    = 'Total flux at ocean surface        ', 'iocetflx', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_12    = 'Solar flux at ocean surface        ', 'iocesflx', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_13    = 'Non-solar flux at ocean surface    ', 'iocwnsfl', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_14    = 'Salt flux at ocean surface         ', 'iocesafl', 'kg/m2/kt',    1   ,  1.0     ,    0.0
+   field_15    = 'Wind stress u                      ', 'iocestru', 'Pa      ',    1   ,  1.0     ,    0.0
+   field_16    = 'Wind stress v                      ', 'iocestrv', 'Pa      ',    1   ,  1.0     ,    0.0 
+   field_17    = 'Solar flux at ice/ocean surface    ', 'iicesflx', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_18    = 'Non-solar flux at ice/ocean surface', 'iicenflx', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_19    = 'Snow precipitation                 ', 'isnowpre', 'kg/day  ',    1   ,  1.0     ,    0.0
+!
+   noumef      =   19      !  number of fields
+/      
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA2_cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA2_cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA2_cfg	(revision 2504)
@@ -0,0 +1,31 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM-2 : Ice configuration namelist. Overwrites SHARED/namelist_ice_lim2_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+      creepl      =   1.0e-08 !  creep limit
+/
+!-----------------------------------------------------------------------
+&namicetrp     !   ice transport
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+      parsub      = 0.0       !  switch for snow sublimation or not
+/
+!-----------------------------------------------------------------------
+&namice_dmp    !   damping of sea ice alone open boundaries
+!              !   (hard coded damping area: check if it fit your config)
+!-----------------------------------------------------------------------
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA2_ref
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA2_ref	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim2_ORCA2_ref	(revision 2504)
@@ -0,0 +1,130 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM-2 : 1 - dynamics/advection/thermo          (namicerun)
+!! namelists    2 - ice intialisation                  (namiceini)
+!!              3 - ice dynamic                        (namicedyn)
+!!              4 - ice advection                      (namicetrp)
+!!              5 - thermodynamic                      (namicethd)
+!!              6 - ice damping                        (namice_dmp)
+!!              7 - ice diagnostics                    (namicedia)
+!!              8 - ice outputs                        (namiceout)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+   cn_icerst_in  = "restart_ice_in"   !  suffix of ice restart name (input)
+   cn_icerst_out = "restart_ice"      !  suffix of ice restart name (output)
+   ln_limdyn     = .true.             !  ice dynamics (T) or thermodynamics only (F)
+   ln_limdmp     = .false.            !  restoring ice thickness and fraction leads   (T => fill  namice_dmp)
+   acrit         = 1.0e-06 , 1.0e-06  !  minimum lead fraction in the Northern & Southern Hemispheres
+   hsndif        =  0.e0              !  computation of temperature in snow (=0.0) or not
+   hicdif        =  0.e0              !  computation of temperature in ice  (=0.0) or not (=9999.0)
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+   ln_limini   = .false.   !  read the initial state in 'Ice_initialization.nc' (T) or not (F)
+   ttest       =  2.0      !  threshold water temperature for initial sea ice
+   hninn       =  0.5      !  initial snow thickness in the north
+   hginn       =  3.0      !  initial ice  thickness in the north
+   alinn       =  0.05     !  initial leads area     in the north
+   hnins       =  0.1      !  same  three parameter  in the south
+   hgins       =  1.0      !        "                 "     south   
+   alins       =  0.1      !        "                 "     south
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+   epsd        =   1.0e-20 !  tolerance parameter
+   alpha       =   0.5     !  coefficient for semi-implicit coriolis
+   dm          =   0.6e+03 !  diffusion constant for dynamics
+   nbiter      =   1       !  number of sub-time steps for relaxation
+   nbitdr      = 100       !  maximum number of iterations for relaxation
+   om          =   0.5     !  relaxation constant 
+   resl        =   5.0e-05 !  maximum value for the residual of relaxation
+   cw          =   5.0e-03 !  drag coefficient for oceanic stress
+   angvg       =   0.0     !  turning angle for oceanic stress
+   pstar       =   1.0e+04 !  1st bulk-rheology parameter
+   c_rhg       =  20.0     !  2nd bulk-rhelogy parameter
+   etamn       =   0.0e+07 !  minimun value for viscosity
+   creepl      =   1.0e-08 !  creep limit
+   ecc         =   2.0     !  eccentricity of the elliptical yield curve
+   ahi0        = 350.e0    !  horizontal eddy diffusivity coefficient for sea-ice [m2/s]
+   nevp        =   120     !  number of EVP subcycling iterations
+   telast      =   9600    !  timescale for EVP elastic waves
+   alphaevp    =   1.0     !  coefficient for the solution of EVP int. stresses
+   hminrhg     =   0.05     !  ice thickness (m) below which ice velocity equal ocean velocity
+/
+!-----------------------------------------------------------------------
+&namicetrp     !   ice transport
+!-----------------------------------------------------------------------
+   bound       =   0.0     !  boundary conditions (=0. no-slip, =1. free-slip)
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+   hmelt       = -0.15     !  maximum melting at the bottom
+   hiccrit     = 0.3 , 0.3 !  ice thickness for lateral accretion in the Northern (Southern) Hemisphere
+   !                       !  (caution 1.0, 1.0 best value to be used!!! (gilles G.))
+   hicmin      = 0.2       !  ice thickness corr. to max. energy stored in brine pocket
+   hiclim      = 0.05      !  minimum ice thickness
+   amax        = 0.999     !  maximum lead fraction
+   swiqst      = 1.        !  energy stored in brine pocket (=1) or not (=0)	
+   sbeta       = 1.        !  numerical caracteritic of the scheme for diffusion in ice
+                           !        Cranck-Nicholson (=0.5), implicit (=1), explicit (=0)
+   parlat      = 0.0       !  percentage of energy used for lateral ablation
+   hakspl      = 0.5       !  slope of distr. for Hakkinen-Mellor's lateral melting
+   hibspl      = 0.5       !  slope of distribution for Hibler's lateral melting
+   exld        = 2.0       !  exponent for leads-closure rate
+   hakdif      = 1.0       !  coefficient for diffusions of ice and snow
+   thth        = 0.2       !  threshold thickness for comp. of eq. thermal conductivity
+   hnzst       = 0.1       !  thickness of the surf. layer in temp. computation
+   parsub      = 1.0       !  switch for snow sublimation or not
+   alphs       = 1.0       !  coefficient for snow density when snow ice formation
+/
+!-----------------------------------------------------------------------
+&namice_dmp    !   damping of sea ice alone open boundaries
+!              !   (hard coded damping area: check if it fit your config)
+!-----------------------------------------------------------------------
+!              !  file name     ! frequency (hours) ! variable ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                !  (if <0  months)  !   name   !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_hicif    = 'ice_damping'  ,  -1.              , 'hicif'  ,   .true.     , .true. , 'yearly'  , ''       , ''       ,    ''
+   sn_frld     = 'ice_damping'  ,  -1.              , 'frld'   ,   .true.     , .true. , 'yearly'  , ''       , ''       ,    ''
+!
+   cn_dir      = './'      !  root directory for the location of the runoff files
+/
+!-----------------------------------------------------------------------
+&namicedia     !   ice diagnostics
+!-----------------------------------------------------------------------
+   fmtinf      = '1PE13.5' !  format of the output values
+   nfrinf      =  4        !  number of variables written in one line
+   ntmoy       =  1        !  instantaneous values of ice evolution or averaging
+   ninfo       =  1        !  frequency of ouputs on file ice_evolu in case of averaging
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namiceout     !   parameters for outputs
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !         title of the field           !  name     !   units   !  save  ! multipl. ! additive !
+!              !                                      !           !           ! or not !  factor  !  factor  !
+   field_1     = 'Snow thickness                     ', 'isnowthi', 'm       ',    1   ,  1.0     ,    0.0
+   field_2     = 'Ice thickness                      ', 'iicethic', 'm       ',    1   ,  1.0     ,    0.0
+   field_3     = 'Ice produced                       ', 'iiceprod', 'm/kt    ',    1   ,  1.0     ,    0.0
+   field_4     = 'Ice concentration                  ', 'ileadfra', '%       ',    1   , -1.0     ,    1.0
+   field_5     = 'Ice temperature                    ', 'iicetemp', 'C       ',    1   ,  1.0     , -273.15
+   field_6     = 'Oceanic flux at the ice base       ', 'ioceflxb', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_7     = 'Ice velocity u                     ', 'iicevelu', 'm/s     ',    1   ,  1.0     ,    0.0
+   field_8     = 'Ice velocity v                     ', 'iicevelv', 'm/s     ',    1   ,  1.0     ,    0.0
+   field_9     = 'Sea surface temperature            ', 'isstempe', 'C       ',    1   ,  1.0     , -273.15
+   field_10    = 'Sea surface salinity               ', 'isssalin', 'PSU     ',    1   ,  1.0     ,    0.0
+   field_11    = 'Total flux at ocean surface        ', 'iocetflx', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_12    = 'Solar flux at ocean surface        ', 'iocesflx', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_13    = 'Non-solar flux at ocean surface    ', 'iocwnsfl', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_14    = 'Salt flux at ocean surface         ', 'iocesafl', 'kg/m2/kt',    1   ,  1.0     ,    0.0
+   field_15    = 'Wind stress u                      ', 'iocestru', 'Pa      ',    1   ,  1.0     ,    0.0
+   field_16    = 'Wind stress v                      ', 'iocestrv', 'Pa      ',    1   ,  1.0     ,    0.0 
+   field_17    = 'Solar flux at ice/ocean surface    ', 'iicesflx', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_18    = 'Non-solar flux at ice/ocean surface', 'iicenflx', 'w/m2    ',    1   ,  1.0     ,    0.0
+   field_19    = 'Snow precipitation                 ', 'isnowpre', 'kg/day  ',    1   ,  1.0     ,    0.0
+!
+   noumef      =   19      !  number of fields
+/      
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA1_cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA1_cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA1_cfg	(revision 2504)
@@ -0,0 +1,47 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM3 :  1 - dynamics/advection/thermo          (namicerun)
+!! namelists    2 - ice intialisation                  (namiceini)
+!!              3 - ice dynamic                        (namicedyn)
+!!              4 - ice advection                      (namicetrp)
+!!              5 - thermodynamic                      (namicethd)
+!!              6 - ice salinity                       (namicesal)
+!!              7 - mechanical redistribution of ice   (namiceitdme)
+!!              8 - ice diagnostics                    (namicedia)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+   cn_icerst_in  = "restart_ice_in"   !  suffix of ice restart name (input)
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+   ahi0        = 175.e0     !  horizontal eddy diffusivity coefficient for sea-ice [m2/s]
+   telast      = 3600.0     !  timescale for EVP elastic waves
+/
+!-----------------------------------------------------------------------
+&namicetrp     !   ice transport
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+   parsub      = 0.0       !  switch for snow sublimation or not - O.M. attention : 0 en couple
+/
+!-----------------------------------------------------------------------
+&namicesal     !   ice salinity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceitdme   !   parameters for mechanical redistribution of ice 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedia     !   ice diagnostics
+!-----------------------------------------------------------------------
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA1_ref
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA1_ref	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA1_ref	(revision 2504)
@@ -0,0 +1,127 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM3 :  1 - dynamics/advection/thermo          (namicerun)
+!! namelists    2 - ice intialisation                  (namiceini)
+!!              3 - ice dynamic                        (namicedyn)
+!!              4 - ice advection                      (namicetrp)
+!!              5 - thermodynamic                      (namicethd)
+!!              6 - ice salinity                       (namicesal)
+!!              7 - mechanical redistribution of ice   (namiceitdme)
+!!              8 - ice diagnostics                    (namicedia)
+!!              9 - ice outputs                        (namiceout)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+   cn_icerst_in  = "restart_ice"   !  suffix of ice restart name (input)
+   cn_icerst_out = "restart_ice"   !  suffix of ice restart name (output)
+   ln_limdyn     = .true.          !  ice dynamics (T) or thermodynamics only (F)
+   amax          = 0.999           !  maximum ice concentration
+   cai           = 1.40e-3         !  atmospheric drag over sea ice (clio)
+   cao           = 1.00e-3         !  atmospheric drag over ocean   (clio)
+   ln_nicep      = .false.         !  Ice points output for debug (yes or no)
+   ln_limdiahsb  = .false.          !  check the heat and salt budgets (T) or not (F)
+   ln_limdiaout  = .true.          !  output the heat and salt budgets (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+   ln_limini   = .false.   !  activate ice initialization (T) or not (F)
+   thres_sst   =  0.0      !  threshold water temperature for initial sea ice
+   hts_ini_n   =  0.3      !  initial snow thickness in the north
+   hts_ini_s   =  0.3      !        "            "          south
+   hti_ini_n   =  1.0      !  initial ice thickness in the north
+   hti_ini_s   =  1.0      !        "            "         south
+   ati_ini_n   =  0.9      !  initial ice concentration in the north
+   ati_ini_s   =  0.9      !        "            "             south
+   smi_ini_n   =  6.301    !  initial ice salinity in the north
+   smi_ini_s   =  6.301    !        "            "    south
+   tmi_ini_n   =  270.     !  initial ice/snw temp in the north
+   tmi_ini_s   =  270.     !  initial ice/snw temp in the south
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+   epsd        =   1.0e-20 !  tolerance parameter
+   om          =   0.5     !  relaxation constant 
+   cw          =   5.0e-03 !  drag coefficient for oceanic stress
+   angvg       =   0.0     !  turning angle for oceanic stress
+   pstar       =   2.0e+04 !  1st bulk-rheology parameter
+   c_rhg       =  20.0     !  2nd bulk-rhelogy parameter
+   creepl      =   1.0e-12 !  creep limit
+   ecc         =   2.0     !  eccentricity of the elliptical yield curve
+   ahi0        = 350.e0    !  horizontal eddy diffusivity coefficient for sea-ice [m2/s]
+   nevp        = 300       !  number of iterations for subcycling in EVP, SB, 400
+   telast      =9600.0     !  timescale for elastic waves, SB, 720.0
+   alphaevp    =   1.0     !  coefficient for the solution of internal ice stresses
+   hminrhg     =   0.001   !  ice volume (a*h in m) below which ice velocity equal ocean velocity
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+   hmelt       = -0.15     !  maximum melting at the bottom
+   hiccrit     = 0.1       !  ice thickness for lateral accretion 
+                           !         caution 1.0, 1.0 best value to be used!!! (gilles G.)  ????
+   fraz_swi    = 0         !  use of frazil ice collection thickness in function of wind (1.0) or not (0.0)
+   maxfrazb    = 0.0       !  maximum portion of frazil ice collecting at the ice bottom
+   vfrazb      = 0.4166667 !  thresold drift speed for frazil ice collecting at the ice bottom
+   Cfrazb      = 5.0       !  squeezing coefficient for frazil ice collecting at the ice bottom
+   hiclim      = 0.10      !  minimum ice thickness
+   hnzst       = 0.1       !  thickness of the surf. layer in temp. computation
+   parsub      = 1.0       !  switch for snow sublimation or not
+   betas       = 0.6       !  exponent in lead-ice fractionation of snow precipitation 0.66
+                           !        betas = 1 -> equipartition, betas < 1 -> more on leads
+   kappa_i     = 1.0       !  extinction radiation parameter in sea ice (1.0)
+   nconv_i_thd = 50        !  maximal number of iterations for heat diffusion computation
+   maxer_i_thd = 0.0001    !  maximal error in temperature for heat diffusion computation
+   thcon_i_swi = 1         !  switch for computation of thermal conductivity in the ice
+                           !        (0) Untersteiner (1964), (1) Pringle et al. (2007)
+/
+!-----------------------------------------------------------------------
+&namicesal     !   ice salinity
+!-----------------------------------------------------------------------
+   num_sal     =  2        !  salinity option: 1 -> S = bulk_sal
+                           !                   2 -> S = S(z,t) with a simple parameterization
+                           !                   3 -> S = S(z) profile of Scwharzacher [1959]
+                           !                   4 -> S = S(h) Cox and Weeks [1974]
+   bulk_sal    =  4.0      !  if 1 is used, it represents the ice salinity
+   sal_G       =  5.00     !  restoring salinity for GD
+   time_G      =  1.728e+6 !  restoring time for GD
+   sal_F       =  2.00     !  restoring salinity for flushing
+   time_F      =  8.640e+5 !  restoring time for flushing
+   s_i_max     = 20.0      !  Maximum salinity 
+   s_i_min     =  0.1      !  Minimum tolerated ice salinity
+   s_i_0       =  3.5      !  1st salinity for salinity profile
+   s_i_1       =  4.5      !  2nd salinity for salinity profile
+/
+!-----------------------------------------------------------------------
+&namiceitdme   !   parameters for mechanical redistribution of ice 
+!-----------------------------------------------------------------------
+   ridge_scheme_swi = 0      !  which ridging scheme using (1=Rothrock,else=Hibler79)
+   Cs               =   0.50 !  shearing energy contribution to ridging
+   Cf               =  17.0  !  ratio of ridging work to PE change in ridging
+   fsnowrdg         =   0.5  !  snow fraction that survives in ridging
+   fsnowrft         =   0.5  !  snow fraction that survives in rafting
+   Gstar            =   0.15 !  fractional area of thin ice being ridged
+   astar            =   0.05 !  equivalent of gstar (0.05 for TH75 and 0.03 for weaker ice)
+   Hstar            = 100.0  !  parameter determining the maximum thickness of ridged ice
+   raft_swi         =   1    !  rafting or not
+   hparmeter        =   0.75 !  threshold thickness for rafting or not
+   Craft            =   5.0  !  coefficient used in the rafting function
+   ridge_por        =   0.3  !  initial porosity of the ridged ice (typically 0.30)
+   partfun_swi      =   1    !  participation function linear, TH75 (0) or exponential Letal07 (1)
+   brinstren_swi    =   0    !  (1) use brine volume to diminish ice strength
+/
+!-----------------------------------------------------------------------
+&namicedia     !   ice diagnostics
+!-----------------------------------------------------------------------
+   fmtinf      ='1PE13.5 ' !  format of the output values
+   nfrinf      = 4         !  number of variables written in one line
+   ntmoy       = 1         !  instantaneous values of ice evolution or averaging
+   ninfo       = 1         !  frequency of ouputs on file ice_evolu in case of averaging
+/
+!!-----------------------------------------------------------------------
+!&namicehsb       !  Heat and salt budgets 
+!!-----------------------------------------------------------------------
+!/
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA2_cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA2_cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA2_cfg	(revision 2504)
@@ -0,0 +1,46 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM3 :  1 - dynamics/advection/thermo          (namicerun)
+!! namelists    2 - ice intialisation                  (namiceini)
+!!              3 - ice dynamic                        (namicedyn)
+!!              4 - ice advection                      (namicetrp)
+!!              5 - thermodynamic                      (namicethd)
+!!              6 - ice salinity                       (namicesal)
+!!              7 - mechanical redistribution of ice   (namiceitdme)
+!!              8 - ice diagnostics                    (namicedia)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+   cn_icerst_in  = "restart_ice_in"   !  suffix of ice restart name (input)
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+   pstar       =   4.0e+04 !  1st bulk-rheology parameter
+/
+!-----------------------------------------------------------------------
+&namicetrp     !   ice transport
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+   parsub      = 0.0       !  switch for snow sublimation or not - O.M. attention : 0 en couple
+/
+!-----------------------------------------------------------------------
+&namicesal     !   ice salinity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceitdme   !   parameters for mechanical redistribution of ice 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedia     !   ice diagnostics
+!-----------------------------------------------------------------------
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA2_ref
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA2_ref	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_lim3_ORCA2_ref	(revision 2504)
@@ -0,0 +1,127 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM3 :  1 - dynamics/advection/thermo          (namicerun)
+!! namelists    2 - ice intialisation                  (namiceini)
+!!              3 - ice dynamic                        (namicedyn)
+!!              4 - ice advection                      (namicetrp)
+!!              5 - thermodynamic                      (namicethd)
+!!              6 - ice salinity                       (namicesal)
+!!              7 - mechanical redistribution of ice   (namiceitdme)
+!!              8 - ice diagnostics                    (namicedia)
+!!              9 - ice outputs                        (namiceout)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+   cn_icerst_in  = "restart_ice"   !  suffix of ice restart name (input)
+   cn_icerst_out = "restart_ice"   !  suffix of ice restart name (output)
+   ln_limdyn     = .true.          !  ice dynamics (T) or thermodynamics only (F)
+   amax          = 0.999           !  maximum ice concentration
+   cai           = 1.40e-3         !  atmospheric drag over sea ice (clio)
+   cao           = 1.00e-3         !  atmospheric drag over ocean   (clio)
+   ln_nicep      = .false.         !  Ice points output for debug (yes or no)
+   ln_limdiahsb  = .false.          !  check the heat and salt budgets (T) or not (F)
+   ln_limdiaout  = .true.          !  output the heat and salt budgets (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+   ln_limini   = .false.   !  activate ice initialization (T) or not (F)
+   thres_sst   =  0.0      !  threshold water temperature for initial sea ice
+   hts_ini_n   =  0.3      !  initial snow thickness in the north
+   hts_ini_s   =  0.3      !        "            "          south
+   hti_ini_n   =  1.0      !  initial ice thickness in the north
+   hti_ini_s   =  1.0      !        "            "         south
+   ati_ini_n   =  0.9      !  initial ice concentration in the north
+   ati_ini_s   =  0.9      !        "            "             south
+   smi_ini_n   =  6.301    !  initial ice salinity in the north
+   smi_ini_s   =  6.301    !        "            "    south
+   tmi_ini_n   =  270.     !  initial ice/snw temp in the north
+   tmi_ini_s   =  270.     !  initial ice/snw temp in the south
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+   epsd        =   1.0e-20 !  tolerance parameter
+   om          =   0.5     !  relaxation constant 
+   cw          =   5.0e-03 !  drag coefficient for oceanic stress
+   angvg       =   0.0     !  turning angle for oceanic stress
+   pstar       =   2.0e+04 !  1st bulk-rheology parameter
+   c_rhg       =  20.0     !  2nd bulk-rhelogy parameter
+   creepl      =   1.0e-12 !  creep limit
+   ecc         =   2.0     !  eccentricity of the elliptical yield curve
+   ahi0        = 350.e0    !  horizontal eddy diffusivity coefficient for sea-ice [m2/s]
+   nevp        = 300       !  number of iterations for subcycling in EVP, SB, 400
+   telast      =9600.0     !  timescale for elastic waves, SB, 720.0
+   alphaevp    =   1.0     !  coefficient for the solution of internal ice stresses
+   hminrhg     =   0.001   !  ice volume (a*h in m) below which ice velocity equal ocean velocity
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+   hmelt       = -0.15     !  maximum melting at the bottom
+   hiccrit     = 0.1       !  ice thickness for lateral accretion 
+                           !         caution 1.0, 1.0 best value to be used!!! (gilles G.)  ????
+   fraz_swi    = 0         !  use of frazil ice collection thickness in function of wind (1.0) or not (0.0)
+   maxfrazb    = 0.0       !  maximum portion of frazil ice collecting at the ice bottom
+   vfrazb      = 0.4166667 !  thresold drift speed for frazil ice collecting at the ice bottom
+   Cfrazb      = 5.0       !  squeezing coefficient for frazil ice collecting at the ice bottom
+   hiclim      = 0.10      !  minimum ice thickness
+   hnzst       = 0.1       !  thickness of the surf. layer in temp. computation
+   parsub      = 1.0       !  switch for snow sublimation or not
+   betas       = 0.6       !  exponent in lead-ice fractionation of snow precipitation 0.66
+                           !        betas = 1 -> equipartition, betas < 1 -> more on leads
+   kappa_i     = 1.0       !  extinction radiation parameter in sea ice (1.0)
+   nconv_i_thd = 50        !  maximal number of iterations for heat diffusion computation
+   maxer_i_thd = 0.0001    !  maximal error in temperature for heat diffusion computation
+   thcon_i_swi = 1         !  switch for computation of thermal conductivity in the ice
+                           !        (0) Untersteiner (1964), (1) Pringle et al. (2007)
+/
+!-----------------------------------------------------------------------
+&namicesal     !   ice salinity
+!-----------------------------------------------------------------------
+   num_sal     =  2        !  salinity option: 1 -> S = bulk_sal
+                           !                   2 -> S = S(z,t) with a simple parameterization
+                           !                   3 -> S = S(z) profile of Scwharzacher [1959]
+                           !                   4 -> S = S(h) Cox and Weeks [1974]
+   bulk_sal    =  4.0      !  if 1 is used, it represents the ice salinity
+   sal_G       =  5.00     !  restoring salinity for GD
+   time_G      =  1.728e+6 !  restoring time for GD
+   sal_F       =  2.00     !  restoring salinity for flushing
+   time_F      =  8.640e+5 !  restoring time for flushing
+   s_i_max     = 20.0      !  Maximum salinity 
+   s_i_min     =  0.1      !  Minimum tolerated ice salinity
+   s_i_0       =  3.5      !  1st salinity for salinity profile
+   s_i_1       =  4.5      !  2nd salinity for salinity profile
+/
+!-----------------------------------------------------------------------
+&namiceitdme   !   parameters for mechanical redistribution of ice 
+!-----------------------------------------------------------------------
+   ridge_scheme_swi = 0      !  which ridging scheme using (1=Rothrock,else=Hibler79)
+   Cs               =   0.50 !  shearing energy contribution to ridging
+   Cf               =  17.0  !  ratio of ridging work to PE change in ridging
+   fsnowrdg         =   0.5  !  snow fraction that survives in ridging
+   fsnowrft         =   0.5  !  snow fraction that survives in rafting
+   Gstar            =   0.15 !  fractional area of thin ice being ridged
+   astar            =   0.05 !  equivalent of gstar (0.05 for TH75 and 0.03 for weaker ice)
+   Hstar            = 100.0  !  parameter determining the maximum thickness of ridged ice
+   raft_swi         =   1    !  rafting or not
+   hparmeter        =   0.75 !  threshold thickness for rafting or not
+   Craft            =   5.0  !  coefficient used in the rafting function
+   ridge_por        =   0.3  !  initial porosity of the ridged ice (typically 0.30)
+   partfun_swi      =   1    !  participation function linear, TH75 (0) or exponential Letal07 (1)
+   brinstren_swi    =   0    !  (1) use brine volume to diminish ice strength
+/
+!-----------------------------------------------------------------------
+&namicedia     !   ice diagnostics
+!-----------------------------------------------------------------------
+   fmtinf      ='1PE13.5 ' !  format of the output values
+   nfrinf      = 4         !  number of variables written in one line
+   ntmoy       = 1         !  instantaneous values of ice evolution or averaging
+   ninfo       = 1         !  frequency of ouputs on file ice_evolu in case of averaging
+/
+!!-----------------------------------------------------------------------
+!&namicehsb       !  Heat and salt budgets 
+!!-----------------------------------------------------------------------
+!/
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA1_cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA1_cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA1_cfg	(revision 2504)
@@ -0,0 +1,75 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! PISCES  :   Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_pis_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisext     !   air-sea exchange
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_co2int  =  .false.       ! AUTO - read atm pco2 from a file (T) or constant (F)
+   atcco2     = 0.36886500E+03 ! AUTO - atmospheric pCO2
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisatm     !  Atmospheric pressure 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+  ln_presatm  = .false.   ! constant atmopsheric pressure (F) or from a file (T)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisbio     !   biological parameters
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampislim     !   parameters for nutrient limitations
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisopt     !   parameters for optics
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+ ln_varpar   =  .false.   ! boolean for PAR variable - WARNING changement temporaire
+/ 
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisprod     !   parameters for phytoplankton growth
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismort     !   parameters for phytoplankton sinks
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismes     !   parameters for mesozooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiszoo     !   parameters for microzooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisfer     !   parameters for iron chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/  
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisrem     !   parameters for remineralization
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiscal     !   parameters for Calcite chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampissbc     !   parameters for inputs deposition
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_river    =  .false.   ! AUTO - boolean for river input of nutrients
+   ln_hydrofe  =  .false.   ! AUTO - boolean for hydrothermal vents
+   ln_dust     =  .false.   ! boolean for dust input from the atmosphere WARNING changement temporaire
+   ln_solub    =  .false.   ! boolean for variable solubility of atm. Iron  WARNING changement temporaire
+   ln_ndepo    =  .false.   ! boolean for atmospheric deposition of N  WARNING changement temporaire
+   ln_ironsed  =  .false.   ! boolean for Fe input from sediments  WARNING changement temporaire
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdmp     !  Damping 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   nn_pisdmp   =  8760
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismass     !  Mass conservation
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+  ln_check_mass =  .true.
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA1_ref
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA1_ref	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA1_ref	(revision 2504)
@@ -0,0 +1,372 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! PISCES  (key_pisces) reference namelist (see below for key_pisces_reduced)
+!!              1  - air-sea exchange                         (nampisext)
+!!              2  - biological parameters                    (nampisbio)
+!!              3  - parameters for nutrient limitations      (nampislim)    
+!!              4  - parameters for phytoplankton             (nampisprod,nampismort)
+!!              5  - parameters for zooplankton               (nampismes,nampiszoo)
+!!              6  - parameters for remineralization          (nampisrem)
+!!              7  - parameters for calcite chemistry         (nampiscal)
+!!              8  - parameters for inputs deposition         (nampissed)
+!!              9  - parameters for Kriest parameterization   (nampiskrp, nampiskrs)
+!!              10 - additional 2D/3D  diagnostics            (nampisdia)
+!!              11 - Damping                                  (nampisdmp)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisext     !   air-sea exchange
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_co2int  =  .false. ! read atm pco2 from a file (T) or constant (F)
+   atcco2     =  280.    ! Constant value atmospheric pCO2 - ln_co2int = F
+   clname     =  'atcco2.txt'  ! Name of atm pCO2 file - ln_co2int = T
+   nn_offset  =  0       ! Offset model-data start year - ln_co2int = T
+!                        ! If your model year is iyy, nn_offset=(years(1)-iyy) 
+!                        ! then the first atmospheric CO2 record read is at years(1)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisatm     !  Atmospheric prrssure 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !  file name   ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !              !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_patm     = 'presatm'    ,     -1            , 'patm'    ,  .true.      , .true. , 'yearly'  , ''       , ''       , ''
+   cn_dir      = './'     !  root directory for the location of the dynamical files
+!
+   ln_presatm  = .false.   ! constant atmopsheric pressure (F) or from a file (T)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisbio     !   biological parameters
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   nrdttrc    =  1        ! time step frequency for biology
+   wsbio      =  2.       ! POC sinking speed
+   xkmort     =  2.E-7    ! half saturation constant for mortality
+   ferat3     =  10.E-6   ! Fe/C in zooplankton 
+   wsbio2     =  30.      ! Big particles sinking speed
+   niter1max  =  1        ! Maximum number of iterations for POC
+   niter2max  =  1        ! Maximum number of iterations for GOC
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampislim     !   parameters for nutrient limitations
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   concnno3   =  1.e-6    ! Nitrate half saturation of nanophytoplankton
+   concdno3   =  3.E-6    ! Phosphate half saturation for diatoms
+   concnnh4   =  1.E-7    ! NH4 half saturation for phyto
+   concdnh4   =  3.E-7    ! NH4 half saturation for diatoms
+   concnfer   =  1.E-9    ! Iron half saturation for phyto
+   concdfer   =  3.E-9    ! Iron half saturation for diatoms
+   concbfe    =  1.E-11   ! Half-saturation for Fe limitation of Bacteria
+   concbnh4   =  2.E-8    ! NH4 half saturation for phyto
+   concbno3   =  2.E-7    ! Phosphate half saturation for diatoms
+   xsizedia   =  1.E-6    ! Minimum size criteria for diatoms
+   xsizephy   =  1.E-6    ! Minimum size criteria for phyto
+   xsizern    =  3.0      ! Size ratio for nanophytoplankton
+   xsizerd    =  3.0      ! Size ratio for diatoms
+   xksi1      =  2.E-6    ! half saturation constant for Si uptake
+   xksi2      =  20E-6  ! half saturation constant for Si/C
+   xkdoc      =  417.E-6  ! half-saturation constant of DOC remineralization
+   qnfelim    =  7.E-6    ! Optimal quota of phyto
+   qdfelim    =  7.E-6    ! Optimal quota of diatoms
+   caco3r     =  0.3      ! mean rain ratio
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisopt     !   parameters for optics
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !  file name       ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                  !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_par      = 'par.orca'       ,     24            , 'fr_par'  ,  .true.      , .true. , 'yearly'  , ''       , ''       , ''
+   cn_dir      = './'      !  root directory for the location of the dynamical files
+   ln_varpar   =  .true.   ! boolean for PAR variable
+   parlux      =  0.43      ! Fraction of shortwave as PAR
+/ 
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisprod     !   parameters for phytoplankton growth
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   pislope    =  2.       ! P-I slope
+   pislope2   =  2.       ! P-I slope  for diatoms
+   xadap      =  0.       ! Adaptation factor to low light
+   excret     =  0.05     ! excretion ratio of phytoplankton
+   excret2    =  0.05     ! excretion ratio of diatoms
+   ln_newprod =  .true.   ! Enable new parame. of production (T/F) 
+   bresp      =  0.00333  ! Basal respiration rate
+   chlcnm     =  0.033    ! Minimum Chl/C in nanophytoplankton
+   chlcdm     =  0.05     ! Minimum Chl/C in diatoms
+   chlcmin    =  0.004    ! Maximum Chl/c in phytoplankton
+   fecnm      =  40E-6    ! Maximum Fe/C in nanophytoplankton
+   fecdm      =  40E-6    ! Minimum Fe/C in diatoms
+   grosip     =  0.159    ! mean Si/C ratio
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismort     !   parameters for phytoplankton sinks
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   wchl       =  0.01    ! quadratic mortality of phytoplankton
+   wchld      =  0.01     ! maximum quadratic mortality of diatoms
+   wchldm     =  0.03     ! maximum quadratic mortality of diatoms
+   mprat      =  0.01     ! phytoplankton mortality rate
+   mprat2     =  0.01     ! Diatoms mortality rate
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismes     !   parameters for mesozooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   part2      =  0.75     ! part of calcite not dissolved in mesozoo guts
+   grazrat2   =  0.75     ! maximal mesozoo grazing rate
+   resrat2    =  0.005    ! exsudation rate of mesozooplankton
+   mzrat2     =  0.03     ! mesozooplankton mortality rate
+   xprefc     =  1.       ! zoo preference for phyto
+   xprefp     =  0.3      ! zoo preference for POC
+   xprefz     =  1.       ! zoo preference for zoo
+   xprefpoc   =  0.3      ! zoo preference for poc
+   xthresh2zoo = 1E-8     ! zoo feeding threshold for mesozooplankton 
+   xthresh2dia = 1E-8     ! diatoms feeding threshold for mesozooplankton 
+   xthresh2phy = 1E-8     ! nanophyto feeding threshold for mesozooplankton 
+   xthresh2poc = 1E-8     ! poc feeding threshold for mesozooplankton 
+   xthresh2   =  3E-7     ! Food threshold for grazing
+   xkgraz2    =  20.E-6   ! half sturation constant for meso grazing
+   epsher2    =  0.35     ! Efficicency of Mesozoo growth
+   sigma2     =  0.6      ! Fraction of mesozoo excretion as DOM
+   unass2     =  0.3      ! non assimilated fraction of P by mesozoo
+   grazflux   =  2.e3     ! flux-feeding rate
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiszoo     !   parameters for microzooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   part       =  0.5      ! part of calcite not dissolved in microzoo gutsa
+   grazrat    =  3.0      ! maximal zoo grazing rate
+   resrat     =  0.03     ! exsudation rate of zooplankton
+   mzrat      =  0.004    ! zooplankton mortality rate
+   xpref2c    =  0.1      ! Microzoo preference for POM
+   xpref2p    =  1.       ! Microzoo preference for Nanophyto
+   xpref2d    =  0.5      ! Microzoo preference for Diatoms
+   xthreshdia =  1.E-8    ! Diatoms feeding threshold for microzooplankton 
+   xthreshphy =  1.E-8    ! Nanophyto feeding threshold for microzooplankton 
+   xthreshpoc =  1.E-8    ! POC feeding threshold for microzooplankton 
+   xthresh    =  3.E-7    ! Food threshold for feeding
+   xkgraz     =  20.E-6   ! half sturation constant for grazing
+   epsher     =  0.3      ! Efficiency of microzoo growth
+   sigma1     =  0.6      ! Fraction of microzoo excretion as DOM
+   unass      =  0.3      ! non assimilated fraction of phyto by zoo
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisfer     !   parameters for iron chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_fechem =  .false.   ! complex iron chemistry ( T/F )
+   ln_ligvar =  .false.   ! variable ligand concentration
+   xlam1     =  0.005     ! scavenging rate of Iron
+   xlamdust  =  150.0     ! Scavenging rate of dust
+   ligand    =  0.6E-9    ! Ligands concentration 
+/  
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisrem     !   parameters for remineralization
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xremik    =  0.35      ! remineralization rate of DOC
+   xremip    =  0.025     ! remineralisation rate of POC
+   nitrif    =  0.05      ! NH4 nitrification rate
+   xsirem    =  0.003     ! remineralization rate of Si
+   xsiremlab =  0.03      ! fast remineralization rate of Si
+   xsilab    =  0.5       ! Fraction of labile biogenic silica
+   oxymin    =  1.E-6     ! Half-saturation constant for anoxia
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiscal     !   parameters for Calcite chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   kdca       =  6.       ! calcite dissolution rate constant (1/time)
+   nca        =  1.       ! order of dissolution reaction (dimensionless)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampissbc     !   parameters for inputs deposition
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !  file name        ! frequency (hours) ! variable      ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                   !  (if <0  months)  !   name        !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_dust     = 'dust.orca'       ,     -1            , 'dust'        ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_solub    = 'solubility.orca' ,    -12            , 'solubility1' ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdic = 'river.orca'      ,    120            , 'riverdic'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdoc = 'river.orca'      ,    120            , 'riverdoc'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdin = 'river.orca'      ,    120            , 'riverdin'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdon = 'river.orca'      ,    120            , 'riverdon'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdip = 'river.orca'      ,    120            , 'riverdip'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdop = 'river.orca'      ,    120            , 'riverdop'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdsi = 'river.orca'      ,    120            , 'riverdsi'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_ndepo    = 'ndeposition.orca',    -12            , 'ndep'        ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+   sn_ironsed  = 'bathy.orca'      ,    -12            , 'bathy'       ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+   sn_hydrofe  = 'hydrofe.orca'    ,    -12            , 'epsdb'       ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+!
+   cn_dir      = './'      !  root directory for the location of the dynamical files
+   ln_dust     =  .true.   ! boolean for dust input from the atmosphere
+   ln_solub    =  .true.   ! boolean for variable solubility of atm. Iron
+   ln_river    =  .true.   ! boolean for river input of nutrients
+   ln_ndepo    =  .true.   ! boolean for atmospheric deposition of N
+   ln_ironsed  =  .true.   ! boolean for Fe input from sediments
+   ln_ironice  =  .true.   ! boolean for Fe input from sea ice
+   ln_hydrofe  =  .false.  ! boolean for from hydrothermal vents
+   sedfeinput  =  2.e-9    ! Coastal release of Iron
+   dustsolub   =  0.02     ! Solubility of the dusta
+   mfrac       =  0.035    ! Fe mineral fraction of dust
+   wdust       =  2.0      ! Dust sinking speed 
+   icefeinput  =  15.e-9   ! Iron concentration in sea ice
+   nitrfix     =  1.e-7    ! Nitrogen fixation rate
+   diazolight  =  50.      ! Diazotrophs sensitivity to light (W/m2)
+   concfediaz  =  1.e-10   ! Diazotrophs half-saturation Cste for Iron
+   hratio      =  1.e+7    ! Fe to 3He ratio assumed for vent iron supply 
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiskrp     !   Kriest parameterization : parameters     "key_kriest"
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xkr_eta      = 1.17    ! Sinking  exponent
+   xkr_zeta     = 2.28    ! N content exponent
+   xkr_ncontent = 5.7E-6  ! N content factor
+   xkr_mass_min = 0.0002  ! Minimum mass for Aggregates
+   xkr_mass_max = 1.      ! Maximum mass for Aggregates
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiskrs     !   Kriest parameterization : size classes  "key_kriest"
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xkr_sfact    = 942.    ! Sinking factor
+   xkr_stick    = 0.5     ! Stickiness
+   xkr_nnano    = 2.337   ! Nbr of cell in nano size class
+   xkr_ndiat    = 3.718   ! Nbr of cell in diatoms size class
+   xkr_nmeso    = 7.147   ! Nbr of cell in mesozoo size class
+   xkr_naggr    = 9.877   ! Nbr of cell in aggregates  size class
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdia     !   additional 2D/3D tracers diagnostics 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !    name   !           title of the field          !     units      !
+!              !           !                                       !                !  
+   pisdia2d(1)  = 'Cflx     ' , 'DIC flux                          ',  'molC/m2/s    '
+   pisdia2d(2)  = 'Oflx     ' , 'Oxygen flux                       ',  'molC/m2/s    '
+   pisdia2d(3)  = 'Kg       ' , 'Gas transfer                      ',  'mol/m2/s/uatm'
+   pisdia2d(4)  = 'Delc     ' , 'Delta CO2                         ',  'uatm         '
+   pisdia2d(5)  = 'PMO      ' , 'POC export                        ',  'molC/m2/s    '
+   pisdia2d(6)  = 'PMO2     ' , 'GOC export                        ',  'molC/m2/s    '
+   pisdia2d(7)  = 'ExpFe1   ' , 'Nano iron export                  ',  'molFe/m2/s   '
+   pisdia2d(8)  = 'ExpFe2   ' , 'Diatoms iron export               ',  'molFe/m2/s   '
+   pisdia2d(9)  = 'ExpSi    ' , 'Silicate export                   ',  'molSi/m2/s   '
+   pisdia2d(10) = 'ExpCaCO3 ' , 'Calcite export                    ',  'molC/m2/s    '
+   pisdia2d(11) = 'heup     ' , 'euphotic layer depth              ',  'm            '
+   pisdia2d(12) = 'Fedep    ' , 'Iron dep                          ',  'molFe/m2/s   '
+   pisdia2d(13) = 'Nfix     ' , 'Nitrogen Fixation                 ',  'molN/m2/s    '
+   pisdia3d(1)  = 'PH       ' , 'PH                                ',  '-            '
+   pisdia3d(2)  = 'CO3      ' , 'Bicarbonates                      ',  'mol/l        '
+   pisdia3d(3)  = 'CO3sat   ' , 'CO3 saturation                    ',  'mol/l        '
+   pisdia3d(4)  = 'PAR      ' , 'light penetration                 ',  'W/m2         '
+   pisdia3d(5)  = 'PPPHY    ' , 'Primary production of nanophyto   ',  'molC/m3/s    '
+   pisdia3d(6)  = 'PPPHY2   ' , 'Primary production of diatoms     ',  'molC/m3/s    '
+   pisdia3d(7)  = 'PPNEWN   ' , 'New Primary production of nano    ',  'molC/m3/s    '
+   pisdia3d(8)  = 'PPNEWD   ' , 'New Primary production of diat    ',  'molC/m3/s    '
+   pisdia3d(9)  = 'PBSi     ' , 'Primary production of Si diatoms  ',  'molSi/m3/s   '
+   pisdia3d(10) = 'PFeN     ' , 'Primary production of nano iron   ',  'molFe/m3/s   '
+   pisdia3d(11) = 'PFeD     ' , 'Primary production of diatoms iron',  'molFe/m3/s   '
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdmp     !  Damping 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_pisdmp    =  .true.     !  Relaxation fo some tracers to a mean value
+   nn_pisdmp    =  5475       !  Frequency of Relaxation 
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismass     !  Mass conservation
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_check_mass =  .false.    !  Check mass conservation
+/
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! PISCES reduced (key_pisces_reduced, ex LOBSTER) : namelists
+!!              1  - biological parameters for phytoplankton    (namlobphy)
+!!              2  - biological parameters for nutrients        (namlobnut)
+!!              3  - biological parameters for zooplankton      (namlobzoo)    
+!!              4  - biological parameters for detritus         (namlobdet)
+!!              5  - biological parameters for DOM              (namlobdom)
+!!              6  - parameters from aphotic layers to sediment (namlobsed)
+!!              7  - general coefficients                       (namlobrat)
+!!              8  - optical parameters                         (namlobopt)
+
+!!              10 - biological diagnostics trends              (namlobdbi) 
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobphy     !   biological parameters for phytoplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   tmumax  =  1.21e-5   ! maximal phytoplankton growth rate            [s-1] 
+   rgamma  =  0.05      ! phytoplankton exudation fraction             [%]
+   fphylab =  0.75      ! NH4 fraction of phytoplankton exsudation     
+   tmminp  =  5.8e-7    ! minimal phytoplancton mortality rate         [0.05/86400 s-1=20 days] 
+   aki     =  33.       ! light photosynthesis half saturation constant[W/m2]
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobnut     !   biological parameters for nutrients
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   akno3   =  0.7       ! nitrate limitation half-saturation value     [mmol/m3]
+   aknh4   =  0.001     ! ammonium limitation half-saturation value    [mmol/m3]
+   taunn   =  5.80e-7   ! nitrification rate                           [s-1]  
+   psinut  =  3.        ! inhibition of nitrate uptake by ammonium
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobzoo     !   biological parameters for zooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   rppz    = 0.8        ! zooplankton nominal preference for phytoplancton food  [%]
+   taus    = 9.26E-6    ! specific zooplankton maximal grazing rate              [s-1] 
+!                       ! 0.75/86400 s-1=8.680555E-6    1/86400 = 1.15e-5
+   aks     = 1.         ! half-saturation constant for total zooplankton grazing [mmolN.m-3]
+   rpnaz   = 0.3        ! non-assimilated phytoplankton by zooplancton           [%]
+   rdnaz   = 0.3        ! non-assimilated detritus by zooplankton                [%] 
+   tauzn   = 8.1e-7     ! zooplancton specific excretion rate                    [0.1/86400 s-1=10 days] 
+   fzoolab = 0.5        ! NH4 fraction of zooplankton excretion
+   fdbod   = 0.5        ! zooplankton mortality fraction that goes to detritus
+   tmminz  = 2.31e-6    ! minimal zooplankton mortality rate                     [(mmolN/m3)-1 d-1]
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobdet     !   biological parameters for detritus
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   taudn   = 5.80e-7    ! detritus breakdown rate                        [0.1/86400 s-1=10 days]
+   fdetlab = 0.         ! NH4 fraction of detritus dissolution           
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobdom     !   biological parameters for DOM
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   taudomn = 6.43e-8    ! DOM breakdown rate                             [s-1] 
+!                       ! slow remineralization rate of semi-labile dom to nh4 (1 month)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobsed     !   parameters from aphotic layers to sediment
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   sedlam     = 3.86e-7    ! time coefficient of POC remineralization in sediments [s-1]
+   sedlostpoc = 0.         ! mass of POC lost in sediments
+   vsed       = 3.47e-5    ! detritus sedimentation speed                   [m/s]
+   xhr        = -0.858     ! coeff for martin''s remineralisation profile
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobrat     !   general coefficients
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   rcchl   = 60.       ! Carbone/Chlorophyl ratio                     [mgC.mgChla-1]
+   redf    = 6.56       ! redfield ratio (C:N) for phyto
+   reddom  = 6.56       ! redfield ratio (C:N) for DOM
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobopt     !   optical parameters
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xkg0   = 0.0232     ! green absorption coefficient of water
+   xkr0   = 0.225      ! red absorption coefficent of water
+   xkgp   = 0.074      ! green absorption coefficient of chl
+   xkrp   = 0.037      ! red absorption coefficient of chl
+   xlg    = 0.674      ! green chl exposant for absorption
+   xlr    = 0.629      ! red chl exposant for absorption
+   rpig   = 0.7        ! chla/chla+pheo ratio
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdbi     !   biological diagnostics trends     
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!                !  2D bio diagnostics   units : mmole/m2/s   ("key_trdmld_trc")
+!                !  name    !       title of the field      !     units      !
+   pisdiabio(1)  = 'NO3PHY' , 'Flux from NO3 to PHY          ',  'mmole/m3/s'
+   pisdiabio(2)  = 'NH4PHY' , 'Flux from NH4 to PHY          ',  'mmole/m3/s'
+   pisdiabio(3)  = 'PHYNH4' , 'Flux from PHY to NH4          ',  'mmole/m3/s'
+   pisdiabio(4)  = 'PHYDOM' , 'Flux from PHY to DOM          ',  'mmole/m3/s'
+   pisdiabio(5)  = 'PHYZOO' , 'Flux from PHY to ZOO          ',  'mmole/m3/s'
+   pisdiabio(6)  = 'PHYDET' , 'Flux from PHY to DET          ',  'mmole/m3/s'
+   pisdiabio(7)  = 'DETZOO' , 'Flux from DET to ZOO          ',  'mmole/m3/s'
+   pisdiabio(8)  = 'DETSED' , 'Flux from DET to SED          ',  'mmole/m3/s'
+   pisdiabio(9)  = 'ZOODET' , 'Flux from ZOO to DET          ',  'mmole/m3/s'
+   pisdiabio(10)  = 'ZOOBOD' , 'Zooplankton closure          ',  'mmole/m3/s'
+   pisdiabio(11)  = 'ZOONH4' , 'Flux from ZOO to NH4         ',  'mmole/m3/s'
+   pisdiabio(12)  = 'ZOODOM' , 'Flux from ZOO to DOM         ',  'mmole/m3/s'
+   pisdiabio(13)  = 'NH4NO3' , 'Flux from NH4 to NO3         ',  'mmole/m3/s'
+   pisdiabio(14)  = 'DOMNH4' , 'Flux from DOM to NH4         ',  'mmole/m3/s'
+   pisdiabio(15)  = 'DETNH4' , 'Flux from DET to NH4         ',  'mmole/m3/s'
+   pisdiabio(16)  = 'DETDOM' , 'Flux from DET to DOM         ',  'mmole/m3/s'
+   pisdiabio(17)  = 'SEDNO3' , 'NO3 remineralization from SED',  'mmole/m3/s'
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA2_cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA2_cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA2_cfg	(revision 2504)
@@ -0,0 +1,68 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! PISCES  :   Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_pis_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisext     !   air-sea exchange
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_co2int  =  .false.       ! AUTO - read atm pco2 from a file (T) or constant (F)
+   atcco2     = 0.36886500E+03 ! AUTO - atmospheric pCO2
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisatm     !  Atmospheric pressure 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+  ln_presatm  = .false.   ! constant atmopsheric pressure (F) or from a file (T)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisbio     !   biological parameters
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampislim     !   parameters for nutrient limitations
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisopt     !   parameters for optics
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/ 
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisprod     !   parameters for phytoplankton growth
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismort     !   parameters for phytoplankton sinks
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismes     !   parameters for mesozooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiszoo     !   parameters for microzooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisfer     !   parameters for iron chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/  
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisrem     !   parameters for remineralization
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiscal     !   parameters for Calcite chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampissbc     !   parameters for inputs deposition
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_river    =  .true.   ! AUTO - boolean for river input of nutrients
+   ln_hydrofe  =  .false.  ! AUTO - boolean for hydrothermal vents
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdmp     !  Damping 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismass     !  Mass conservation
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA2_ref
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA2_ref	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_pisces_ORCA2_ref	(revision 2504)
@@ -0,0 +1,372 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! PISCES  (key_pisces) reference namelist (see below for key_pisces_reduced)
+!!              1  - air-sea exchange                         (nampisext)
+!!              2  - biological parameters                    (nampisbio)
+!!              3  - parameters for nutrient limitations      (nampislim)    
+!!              4  - parameters for phytoplankton             (nampisprod,nampismort)
+!!              5  - parameters for zooplankton               (nampismes,nampiszoo)
+!!              6  - parameters for remineralization          (nampisrem)
+!!              7  - parameters for calcite chemistry         (nampiscal)
+!!              8  - parameters for inputs deposition         (nampissed)
+!!              9  - parameters for Kriest parameterization   (nampiskrp, nampiskrs)
+!!              10 - additional 2D/3D  diagnostics            (nampisdia)
+!!              11 - Damping                                  (nampisdmp)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisext     !   air-sea exchange
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_co2int  =  .false. ! read atm pco2 from a file (T) or constant (F)
+   atcco2     =  280.    ! Constant value atmospheric pCO2 - ln_co2int = F
+   clname     =  'atcco2.txt'  ! Name of atm pCO2 file - ln_co2int = T
+   nn_offset  =  0       ! Offset model-data start year - ln_co2int = T
+!                        ! If your model year is iyy, nn_offset=(years(1)-iyy) 
+!                        ! then the first atmospheric CO2 record read is at years(1)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisatm     !  Atmospheric prrssure 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !  file name   ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !              !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_patm     = 'presatm'    ,     -1            , 'patm'    ,  .true.      , .true. , 'yearly'  , ''       , ''       , ''
+   cn_dir      = './'     !  root directory for the location of the dynamical files
+!
+   ln_presatm  = .false.   ! constant atmopsheric pressure (F) or from a file (T)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisbio     !   biological parameters
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   nrdttrc    =  1        ! time step frequency for biology
+   wsbio      =  2.       ! POC sinking speed
+   xkmort     =  2.E-7    ! half saturation constant for mortality
+   ferat3     =  10.E-6   ! Fe/C in zooplankton 
+   wsbio2     =  30.      ! Big particles sinking speed
+   niter1max  =  1        ! Maximum number of iterations for POC
+   niter2max  =  1        ! Maximum number of iterations for GOC
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampislim     !   parameters for nutrient limitations
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   concnno3   =  1.e-6    ! Nitrate half saturation of nanophytoplankton
+   concdno3   =  3.E-6    ! Phosphate half saturation for diatoms
+   concnnh4   =  1.E-7    ! NH4 half saturation for phyto
+   concdnh4   =  3.E-7    ! NH4 half saturation for diatoms
+   concnfer   =  1.E-9    ! Iron half saturation for phyto
+   concdfer   =  3.E-9    ! Iron half saturation for diatoms
+   concbfe    =  1.E-11   ! Half-saturation for Fe limitation of Bacteria
+   concbnh4   =  2.E-8    ! NH4 half saturation for phyto
+   concbno3   =  2.E-7    ! Phosphate half saturation for diatoms
+   xsizedia   =  1.E-6    ! Minimum size criteria for diatoms
+   xsizephy   =  1.E-6    ! Minimum size criteria for phyto
+   xsizern    =  3.0      ! Size ratio for nanophytoplankton
+   xsizerd    =  3.0      ! Size ratio for diatoms
+   xksi1      =  2.E-6    ! half saturation constant for Si uptake
+   xksi2      =  20E-6  ! half saturation constant for Si/C
+   xkdoc      =  417.E-6  ! half-saturation constant of DOC remineralization
+   qnfelim    =  7.E-6    ! Optimal quota of phyto
+   qdfelim    =  7.E-6    ! Optimal quota of diatoms
+   caco3r     =  0.3      ! mean rain ratio
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisopt     !   parameters for optics
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !  file name       ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                  !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_par      = 'par.orca'       ,     24            , 'fr_par'  ,  .true.      , .true. , 'yearly'  , ''       , ''       , ''
+   cn_dir      = './'      !  root directory for the location of the dynamical files
+   ln_varpar   =  .true.   ! boolean for PAR variable
+   parlux      =  0.43      ! Fraction of shortwave as PAR
+/ 
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisprod     !   parameters for phytoplankton growth
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   pislope    =  2.       ! P-I slope
+   pislope2   =  2.       ! P-I slope  for diatoms
+   xadap      =  0.       ! Adaptation factor to low light
+   excret     =  0.05     ! excretion ratio of phytoplankton
+   excret2    =  0.05     ! excretion ratio of diatoms
+   ln_newprod =  .true.   ! Enable new parame. of production (T/F) 
+   bresp      =  0.00333  ! Basal respiration rate
+   chlcnm     =  0.033    ! Minimum Chl/C in nanophytoplankton
+   chlcdm     =  0.05     ! Minimum Chl/C in diatoms
+   chlcmin    =  0.004    ! Maximum Chl/c in phytoplankton
+   fecnm      =  40E-6    ! Maximum Fe/C in nanophytoplankton
+   fecdm      =  40E-6    ! Minimum Fe/C in diatoms
+   grosip     =  0.159    ! mean Si/C ratio
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismort     !   parameters for phytoplankton sinks
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   wchl       =  0.01    ! quadratic mortality of phytoplankton
+   wchld      =  0.01     ! maximum quadratic mortality of diatoms
+   wchldm     =  0.03     ! maximum quadratic mortality of diatoms
+   mprat      =  0.01     ! phytoplankton mortality rate
+   mprat2     =  0.01     ! Diatoms mortality rate
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismes     !   parameters for mesozooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   part2      =  0.75     ! part of calcite not dissolved in mesozoo guts
+   grazrat2   =  0.75     ! maximal mesozoo grazing rate
+   resrat2    =  0.005    ! exsudation rate of mesozooplankton
+   mzrat2     =  0.03     ! mesozooplankton mortality rate
+   xprefc     =  1.       ! zoo preference for phyto
+   xprefp     =  0.3      ! zoo preference for POC
+   xprefz     =  1.       ! zoo preference for zoo
+   xprefpoc   =  0.3      ! zoo preference for poc
+   xthresh2zoo = 1E-8     ! zoo feeding threshold for mesozooplankton 
+   xthresh2dia = 1E-8     ! diatoms feeding threshold for mesozooplankton 
+   xthresh2phy = 1E-8     ! nanophyto feeding threshold for mesozooplankton 
+   xthresh2poc = 1E-8     ! poc feeding threshold for mesozooplankton 
+   xthresh2   =  3E-7     ! Food threshold for grazing
+   xkgraz2    =  20.E-6   ! half sturation constant for meso grazing
+   epsher2    =  0.35     ! Efficicency of Mesozoo growth
+   sigma2     =  0.6      ! Fraction of mesozoo excretion as DOM
+   unass2     =  0.3      ! non assimilated fraction of P by mesozoo
+   grazflux   =  2.e3     ! flux-feeding rate
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiszoo     !   parameters for microzooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   part       =  0.5      ! part of calcite not dissolved in microzoo gutsa
+   grazrat    =  3.0      ! maximal zoo grazing rate
+   resrat     =  0.03     ! exsudation rate of zooplankton
+   mzrat      =  0.004    ! zooplankton mortality rate
+   xpref2c    =  0.1      ! Microzoo preference for POM
+   xpref2p    =  1.       ! Microzoo preference for Nanophyto
+   xpref2d    =  0.5      ! Microzoo preference for Diatoms
+   xthreshdia =  1.E-8    ! Diatoms feeding threshold for microzooplankton 
+   xthreshphy =  1.E-8    ! Nanophyto feeding threshold for microzooplankton 
+   xthreshpoc =  1.E-8    ! POC feeding threshold for microzooplankton 
+   xthresh    =  3.E-7    ! Food threshold for feeding
+   xkgraz     =  20.E-6   ! half sturation constant for grazing
+   epsher     =  0.3      ! Efficiency of microzoo growth
+   sigma1     =  0.6      ! Fraction of microzoo excretion as DOM
+   unass      =  0.3      ! non assimilated fraction of phyto by zoo
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisfer     !   parameters for iron chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_fechem =  .false.   ! complex iron chemistry ( T/F )
+   ln_ligvar =  .false.   ! variable ligand concentration
+   xlam1     =  0.005     ! scavenging rate of Iron
+   xlamdust  =  150.0     ! Scavenging rate of dust
+   ligand    =  0.6E-9    ! Ligands concentration 
+/  
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisrem     !   parameters for remineralization
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xremik    =  0.35      ! remineralization rate of DOC
+   xremip    =  0.025     ! remineralisation rate of POC
+   nitrif    =  0.05      ! NH4 nitrification rate
+   xsirem    =  0.003     ! remineralization rate of Si
+   xsiremlab =  0.03      ! fast remineralization rate of Si
+   xsilab    =  0.5       ! Fraction of labile biogenic silica
+   oxymin    =  1.E-6     ! Half-saturation constant for anoxia
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiscal     !   parameters for Calcite chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   kdca       =  6.       ! calcite dissolution rate constant (1/time)
+   nca        =  1.       ! order of dissolution reaction (dimensionless)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampissbc     !   parameters for inputs deposition
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !  file name        ! frequency (hours) ! variable      ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                   !  (if <0  months)  !   name        !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_dust     = 'dust.orca'       ,     -1            , 'dust'        ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_solub    = 'solubility.orca' ,    -12            , 'solubility1' ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdic = 'river.orca'      ,    120            , 'riverdic'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdoc = 'river.orca'      ,    120            , 'riverdoc'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdin = 'river.orca'      ,    120            , 'riverdin'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdon = 'river.orca'      ,    120            , 'riverdon'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdip = 'river.orca'      ,    120            , 'riverdip'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdop = 'river.orca'      ,    120            , 'riverdop'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_riverdsi = 'river.orca'      ,    120            , 'riverdsi'    ,  .true.      , .true. , 'yearly'  , ''       , ''    , ''
+   sn_ndepo    = 'ndeposition.orca',    -12            , 'ndep'        ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+   sn_ironsed  = 'bathy.orca'      ,    -12            , 'bathy'       ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+   sn_hydrofe  = 'hydrofe.orca'    ,    -12            , 'epsdb'       ,  .false.     , .true. , 'yearly'  , ''       , ''    , ''
+!
+   cn_dir      = './'      !  root directory for the location of the dynamical files
+   ln_dust     =  .true.   ! boolean for dust input from the atmosphere
+   ln_solub    =  .true.   ! boolean for variable solubility of atm. Iron
+   ln_river    =  .true.   ! boolean for river input of nutrients
+   ln_ndepo    =  .true.   ! boolean for atmospheric deposition of N
+   ln_ironsed  =  .true.   ! boolean for Fe input from sediments
+   ln_ironice  =  .true.   ! boolean for Fe input from sea ice
+   ln_hydrofe  =  .false.  ! boolean for from hydrothermal vents
+   sedfeinput  =  2.e-9    ! Coastal release of Iron
+   dustsolub   =  0.02     ! Solubility of the dusta
+   mfrac       =  0.035    ! Fe mineral fraction of dust
+   wdust       =  2.0      ! Dust sinking speed 
+   icefeinput  =  15.e-9   ! Iron concentration in sea ice
+   nitrfix     =  1.e-7    ! Nitrogen fixation rate
+   diazolight  =  50.      ! Diazotrophs sensitivity to light (W/m2)
+   concfediaz  =  1.e-10   ! Diazotrophs half-saturation Cste for Iron
+   hratio      =  1.e+7    ! Fe to 3He ratio assumed for vent iron supply 
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiskrp     !   Kriest parameterization : parameters     "key_kriest"
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xkr_eta      = 1.17    ! Sinking  exponent
+   xkr_zeta     = 2.28    ! N content exponent
+   xkr_ncontent = 5.7E-6  ! N content factor
+   xkr_mass_min = 0.0002  ! Minimum mass for Aggregates
+   xkr_mass_max = 1.      ! Maximum mass for Aggregates
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiskrs     !   Kriest parameterization : size classes  "key_kriest"
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xkr_sfact    = 942.    ! Sinking factor
+   xkr_stick    = 0.5     ! Stickiness
+   xkr_nnano    = 2.337   ! Nbr of cell in nano size class
+   xkr_ndiat    = 3.718   ! Nbr of cell in diatoms size class
+   xkr_nmeso    = 7.147   ! Nbr of cell in mesozoo size class
+   xkr_naggr    = 9.877   ! Nbr of cell in aggregates  size class
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdia     !   additional 2D/3D tracers diagnostics 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!              !    name   !           title of the field          !     units      !
+!              !           !                                       !                !  
+   pisdia2d(1)  = 'Cflx     ' , 'DIC flux                          ',  'molC/m2/s    '
+   pisdia2d(2)  = 'Oflx     ' , 'Oxygen flux                       ',  'molC/m2/s    '
+   pisdia2d(3)  = 'Kg       ' , 'Gas transfer                      ',  'mol/m2/s/uatm'
+   pisdia2d(4)  = 'Delc     ' , 'Delta CO2                         ',  'uatm         '
+   pisdia2d(5)  = 'PMO      ' , 'POC export                        ',  'molC/m2/s    '
+   pisdia2d(6)  = 'PMO2     ' , 'GOC export                        ',  'molC/m2/s    '
+   pisdia2d(7)  = 'ExpFe1   ' , 'Nano iron export                  ',  'molFe/m2/s   '
+   pisdia2d(8)  = 'ExpFe2   ' , 'Diatoms iron export               ',  'molFe/m2/s   '
+   pisdia2d(9)  = 'ExpSi    ' , 'Silicate export                   ',  'molSi/m2/s   '
+   pisdia2d(10) = 'ExpCaCO3 ' , 'Calcite export                    ',  'molC/m2/s    '
+   pisdia2d(11) = 'heup     ' , 'euphotic layer depth              ',  'm            '
+   pisdia2d(12) = 'Fedep    ' , 'Iron dep                          ',  'molFe/m2/s   '
+   pisdia2d(13) = 'Nfix     ' , 'Nitrogen Fixation                 ',  'molN/m2/s    '
+   pisdia3d(1)  = 'PH       ' , 'PH                                ',  '-            '
+   pisdia3d(2)  = 'CO3      ' , 'Bicarbonates                      ',  'mol/l        '
+   pisdia3d(3)  = 'CO3sat   ' , 'CO3 saturation                    ',  'mol/l        '
+   pisdia3d(4)  = 'PAR      ' , 'light penetration                 ',  'W/m2         '
+   pisdia3d(5)  = 'PPPHY    ' , 'Primary production of nanophyto   ',  'molC/m3/s    '
+   pisdia3d(6)  = 'PPPHY2   ' , 'Primary production of diatoms     ',  'molC/m3/s    '
+   pisdia3d(7)  = 'PPNEWN   ' , 'New Primary production of nano    ',  'molC/m3/s    '
+   pisdia3d(8)  = 'PPNEWD   ' , 'New Primary production of diat    ',  'molC/m3/s    '
+   pisdia3d(9)  = 'PBSi     ' , 'Primary production of Si diatoms  ',  'molSi/m3/s   '
+   pisdia3d(10) = 'PFeN     ' , 'Primary production of nano iron   ',  'molFe/m3/s   '
+   pisdia3d(11) = 'PFeD     ' , 'Primary production of diatoms iron',  'molFe/m3/s   '
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdmp     !  Damping 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_pisdmp    =  .true.     !  Relaxation fo some tracers to a mean value
+   nn_pisdmp    =  5475       !  Frequency of Relaxation 
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismass     !  Mass conservation
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_check_mass =  .false.    !  Check mass conservation
+/
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! PISCES reduced (key_pisces_reduced, ex LOBSTER) : namelists
+!!              1  - biological parameters for phytoplankton    (namlobphy)
+!!              2  - biological parameters for nutrients        (namlobnut)
+!!              3  - biological parameters for zooplankton      (namlobzoo)    
+!!              4  - biological parameters for detritus         (namlobdet)
+!!              5  - biological parameters for DOM              (namlobdom)
+!!              6  - parameters from aphotic layers to sediment (namlobsed)
+!!              7  - general coefficients                       (namlobrat)
+!!              8  - optical parameters                         (namlobopt)
+
+!!              10 - biological diagnostics trends              (namlobdbi) 
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobphy     !   biological parameters for phytoplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   tmumax  =  1.21e-5   ! maximal phytoplankton growth rate            [s-1] 
+   rgamma  =  0.05      ! phytoplankton exudation fraction             [%]
+   fphylab =  0.75      ! NH4 fraction of phytoplankton exsudation     
+   tmminp  =  5.8e-7    ! minimal phytoplancton mortality rate         [0.05/86400 s-1=20 days] 
+   aki     =  33.       ! light photosynthesis half saturation constant[W/m2]
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobnut     !   biological parameters for nutrients
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   akno3   =  0.7       ! nitrate limitation half-saturation value     [mmol/m3]
+   aknh4   =  0.001     ! ammonium limitation half-saturation value    [mmol/m3]
+   taunn   =  5.80e-7   ! nitrification rate                           [s-1]  
+   psinut  =  3.        ! inhibition of nitrate uptake by ammonium
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobzoo     !   biological parameters for zooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   rppz    = 0.8        ! zooplankton nominal preference for phytoplancton food  [%]
+   taus    = 9.26E-6    ! specific zooplankton maximal grazing rate              [s-1] 
+!                       ! 0.75/86400 s-1=8.680555E-6    1/86400 = 1.15e-5
+   aks     = 1.         ! half-saturation constant for total zooplankton grazing [mmolN.m-3]
+   rpnaz   = 0.3        ! non-assimilated phytoplankton by zooplancton           [%]
+   rdnaz   = 0.3        ! non-assimilated detritus by zooplankton                [%] 
+   tauzn   = 8.1e-7     ! zooplancton specific excretion rate                    [0.1/86400 s-1=10 days] 
+   fzoolab = 0.5        ! NH4 fraction of zooplankton excretion
+   fdbod   = 0.5        ! zooplankton mortality fraction that goes to detritus
+   tmminz  = 2.31e-6    ! minimal zooplankton mortality rate                     [(mmolN/m3)-1 d-1]
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobdet     !   biological parameters for detritus
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   taudn   = 5.80e-7    ! detritus breakdown rate                        [0.1/86400 s-1=10 days]
+   fdetlab = 0.         ! NH4 fraction of detritus dissolution           
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobdom     !   biological parameters for DOM
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   taudomn = 6.43e-8    ! DOM breakdown rate                             [s-1] 
+!                       ! slow remineralization rate of semi-labile dom to nh4 (1 month)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobsed     !   parameters from aphotic layers to sediment
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   sedlam     = 3.86e-7    ! time coefficient of POC remineralization in sediments [s-1]
+   sedlostpoc = 0.         ! mass of POC lost in sediments
+   vsed       = 3.47e-5    ! detritus sedimentation speed                   [m/s]
+   xhr        = -0.858     ! coeff for martin''s remineralisation profile
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobrat     !   general coefficients
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   rcchl   = 60.       ! Carbone/Chlorophyl ratio                     [mgC.mgChla-1]
+   redf    = 6.56       ! redfield ratio (C:N) for phyto
+   reddom  = 6.56       ! redfield ratio (C:N) for DOM
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namlobopt     !   optical parameters
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   xkg0   = 0.0232     ! green absorption coefficient of water
+   xkr0   = 0.225      ! red absorption coefficent of water
+   xkgp   = 0.074      ! green absorption coefficient of chl
+   xkrp   = 0.037      ! red absorption coefficient of chl
+   xlg    = 0.674      ! green chl exposant for absorption
+   xlr    = 0.629      ! red chl exposant for absorption
+   rpig   = 0.7        ! chla/chla+pheo ratio
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdbi     !   biological diagnostics trends     
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+!                !  2D bio diagnostics   units : mmole/m2/s   ("key_trdmld_trc")
+!                !  name    !       title of the field      !     units      !
+   pisdiabio(1)  = 'NO3PHY' , 'Flux from NO3 to PHY          ',  'mmole/m3/s'
+   pisdiabio(2)  = 'NH4PHY' , 'Flux from NH4 to PHY          ',  'mmole/m3/s'
+   pisdiabio(3)  = 'PHYNH4' , 'Flux from PHY to NH4          ',  'mmole/m3/s'
+   pisdiabio(4)  = 'PHYDOM' , 'Flux from PHY to DOM          ',  'mmole/m3/s'
+   pisdiabio(5)  = 'PHYZOO' , 'Flux from PHY to ZOO          ',  'mmole/m3/s'
+   pisdiabio(6)  = 'PHYDET' , 'Flux from PHY to DET          ',  'mmole/m3/s'
+   pisdiabio(7)  = 'DETZOO' , 'Flux from DET to ZOO          ',  'mmole/m3/s'
+   pisdiabio(8)  = 'DETSED' , 'Flux from DET to SED          ',  'mmole/m3/s'
+   pisdiabio(9)  = 'ZOODET' , 'Flux from ZOO to DET          ',  'mmole/m3/s'
+   pisdiabio(10)  = 'ZOOBOD' , 'Zooplankton closure          ',  'mmole/m3/s'
+   pisdiabio(11)  = 'ZOONH4' , 'Flux from ZOO to NH4         ',  'mmole/m3/s'
+   pisdiabio(12)  = 'ZOODOM' , 'Flux from ZOO to DOM         ',  'mmole/m3/s'
+   pisdiabio(13)  = 'NH4NO3' , 'Flux from NH4 to NO3         ',  'mmole/m3/s'
+   pisdiabio(14)  = 'DOMNH4' , 'Flux from DOM to NH4         ',  'mmole/m3/s'
+   pisdiabio(15)  = 'DETNH4' , 'Flux from DET to NH4         ',  'mmole/m3/s'
+   pisdiabio(16)  = 'DETDOM' , 'Flux from DET to DOM         ',  'mmole/m3/s'
+   pisdiabio(17)  = 'SEDNO3' , 'NO3 remineralization from SED',  'mmole/m3/s'
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA1_cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA1_cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA1_cfg	(revision 2504)
@@ -0,0 +1,92 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/TOP1 :  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_top_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!-----------------------------------------------------------------------
+&namtrc_run     !   run information
+!-----------------------------------------------------------------------
+   nn_dttrc      =  1        !  time step frequency for passive sn_tracers
+   nn_writetrc   =  5475     !  time step frequency for sn_tracer outputs
+   ln_top_euler  = .true.    !  use Euler time-stepping for TOP
+   ln_rsttr      = .false.   !  AUTO - start from a restart file (T) or not (F)
+   nn_rsttr      =   0       !  AUTO - restart control = 0 initial time step is not compared to the restart file value
+                             !                  = 1 do not use the value in the restart file
+                             !                  = 2 calendar parameters read in the restart file
+   cn_trcrst_in  = "restart_trc"   !  suffix of pass. sn_tracer restart name (input)
+   cn_trcrst_out = "restart_trc"   !  suffix of pass. sn_tracer restart name (output)
+/
+!-----------------------------------------------------------------------
+&namtrc     !   tracers definition
+!-----------------------------------------------------------------------
+!                !    name   !           title of the field              ! initial data ! initial data ! save   !
+!                !           !                                           !  units       ! from file    ! or not ! 
+!                !           !                                           !              ! or not       !        !
+   sn_tracer(1)   = 'DIC     ' , 'Dissolved inorganic Concentration      ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(2)   = 'Alkalini' , 'Total Alkalinity Concentration         ',  'eq/L '   ,  .true.     ,  .true.
+   sn_tracer(3)   = 'O2      ' , 'Dissolved Oxygen Concentration         ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(4)   = 'CaCO3   ' , 'Calcite Concentration                  ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(5)   = 'PO4     ' , 'Phosphate Concentration                ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(6)   = 'POC     ' , 'Small organic carbon Concentration     ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(7)   = 'Si      ' , 'Silicate Concentration                 ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(8)   = 'PHY     ' , 'Nanophytoplankton Concentration        ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(9)   = 'ZOO     ' , 'Microzooplankton Concentration         ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(10)  = 'DOC     ' , 'Dissolved organic Concentration        ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(11)  = 'PHY2    ' , 'Diatoms Concentration                  ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(12)  = 'ZOO2    ' , 'Mesozooplankton Concentration          ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(13)  = 'DSi     ' , 'Diatoms Silicate Concentration         ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(14)  = 'Fer     ' , 'Dissolved Iron Concentration           ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(15)  = 'BFe     ' , 'Big iron particles Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(16)  = 'GOC     ' , 'Big organic carbon Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(17)  = 'SFe     ' , 'Small iron particles Concentration     ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(18)  = 'DFe     ' , 'Diatoms iron  Concentration            ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(19)  = 'GSi     ' , 'Sinking biogenic Silicate Concentration',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(20)  = 'NFe     ' , 'Nano iron Concentration                ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(21)  = 'NCHL    ' , 'Nano chlorophyl Concentration          ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(22)  = 'DCHL    ' , 'Diatoms chlorophyl Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(23)  = 'NO3     ' , 'Nitrates Concentration                 ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(24)  = 'NH4     ' , 'Ammonium Concentration                 ',  'mol-C/L' ,  .false.    ,  .true.
+/
+!-----------------------------------------------------------------------
+&namtrc_dta      !    Initialisation from data input file
+!-----------------------------------------------------------------------
+!          !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!          !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_trcdta(1)  = 'data_DIC_nomask'        ,        -12        ,  'DIC'     ,    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(2)  = 'data_Alkalini_nomask'   ,        -12        ,  'Alkalini',    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(3)  = 'data_O2_nomask'         ,        -1         ,  'O2'      ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(5)  = 'data_PO4_nomask'        ,        -1         ,  'PO4'     ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(7)  = 'data_Si_nomask'         ,        -1         ,  'Si'      ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(10) = 'data_DOC_nomask'        ,        -12        ,  'DOC'     ,    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(14) = 'data_Fer_nomask'        ,        -12        ,  'Fer'     ,    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(23) = 'data_NO3_nomask'        ,        -1         ,  'NO3'     ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   rn_trfac(1)   =   1.0      !  multiplicative factor
+   rn_trfac(2)   =   1.0      !  -      -      -     -
+   rn_trfac(3)   =  44.6e-06  !  -      -      -     -
+   rn_trfac(5)   = 122.0e-06  !  -      -      -     -
+   rn_trfac(7)   =   1.0e-06  !  -      -      -     -
+   rn_trfac(10)  =   1.0      !  -      -      -     -
+   rn_trfac(14)  =   1.0      !  -      -      -     -
+   rn_trfac(23)  =   7.6e-06  !  -      -      -     -
+/
+!-----------------------------------------------------------------------
+&namtrc_adv    !   advection scheme for passive tracer 
+!-----------------------------------------------------------------------
+   ln_trcadv_tvd     =  .false.  !  TVD scheme
+   ln_trcadv_muscl   =  .true.   !  MUSCL scheme
+/
+!-----------------------------------------------------------------------
+&namtrc_ldf    !   lateral diffusion scheme for passive tracer 
+!-----------------------------------------------------------------------
+   rn_ahtrc_0       =  1000.    !  horizontal eddy diffusivity for tracers [m2/s]
+/
+!-----------------------------------------------------------------------
+&namtrc_zdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_rad        !  treatment of negative concentrations 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_dia       !   parameters for passive tracer additional diagnostics
+!----------------------------------------------------------------------
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA1_ref
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA1_ref	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA1_ref	(revision 2504)
@@ -0,0 +1,116 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/TOP1 :   - tracer run information                (namtrc_run)
+!!               - tracer definition                     (namtrc    )
+!!               - tracer data initialisation            (namtrc_dta)
+!!               - tracer advection                      (namtrc_adv)
+!!               - tracer lateral diffusion              (namtrc_ldf)
+!!               - tracer vertical physics               (namtrc_zdf)
+!!               - tracer newtonian damping              (namtrc_dmp)
+!!               - dynamical tracer trends               (namtrc_trd)
+!!               - tracer output diagonstics             (namtrc_dia)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!-----------------------------------------------------------------------
+&namtrc_run     !   run information
+!-----------------------------------------------------------------------
+   nn_dttrc      =  1        !  time step frequency for passive sn_tracers
+   nn_writetrc   =  5475     !  time step frequency for sn_tracer outputs
+   ln_top_euler  = .false.    !  use Euler time-stepping for TOP
+   ln_rsttr      = .false.   !  start from a restart file (T) or not (F)
+   nn_rsttr      =   0       !  restart control = 0 initial time step is not compared to the restart file value
+                           !                  = 1 do not use the value in the restart file
+                           !                  = 2 calendar parameters read in the restart file
+   cn_trcrst_in  = "restart_trc"   !  suffix of pass. sn_tracer restart name (input)
+   cn_trcrst_out = "restart_trc"   !  suffix of pass. sn_tracer restart name (output)
+/
+!-----------------------------------------------------------------------
+&namtrc     !   tracers definition
+!-----------------------------------------------------------------------
+   ln_trcdta     =   .true.  !  Initialisation from data input file (T) or not (F)
+   ln_trcdmp     =  .false.  !  add a damping termn (T) or not (F)
+   ln_trcdmp_clo =  .false.  !  damping term (T) or not (F) on closed seas
+/
+!-----------------------------------------------------------------------
+&namtrc_dta      !    Initialisation from data input file
+!-----------------------------------------------------------------------
+!
+   cn_dir        =  './'      !  root directory for the location of the data files
+/
+!-----------------------------------------------------------------------
+&namtrc_adv    !   advection scheme for passive tracer 
+!-----------------------------------------------------------------------
+   ln_trcadv_cen2    =  .false.  !  2nd order centered scheme   
+   ln_trcadv_tvd     =  .true.  !  TVD scheme
+   ln_trcadv_muscl   =  .false.   !  MUSCL scheme
+   ln_trcadv_muscl2  =  .false.  !  MUSCL2 scheme + cen2 at boundaries
+   ln_trcadv_ubs     =  .false.  !  UBS scheme
+   ln_trcadv_qck     =  .false.  !  QUICKEST scheme
+   ln_trcadv_msc_ups =  .false.  !  use upstream scheme within muscl
+/
+!-----------------------------------------------------------------------
+&namtrc_ldf    !   lateral diffusion scheme for passive tracer 
+!-----------------------------------------------------------------------
+   ln_trcldf_diff   =  .true.   !  performs lateral diffusion (T) or not (F)
+!                               !  Type of the operator : 
+   ln_trcldf_lap    =  .true.   !     laplacian operator       
+   ln_trcldf_bilap  =  .false.  !     bilaplacian operator     
+                                !  Direction of action  :
+   ln_trcldf_level  =  .false.  !     iso-level                
+   ln_trcldf_hor    =  .false.  !     horizontal (geopotential)         (require "key_ldfslp" when ln_sco=T)
+   ln_trcldf_iso    =  .true.   !     iso-neutral                       (require "key_ldfslp")
+!                               !  Coefficient
+   rn_ahtrc_0       =  2000.    !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_ahtrb_0       =     0.    !     background eddy diffusivity for ldf_iso [m2/s]
+/
+!-----------------------------------------------------------------------
+&namtrc_zdf        !   vertical physics
+!-----------------------------------------------------------------------
+   ln_trczdf_exp   =  .false.  !  split explicit (T) or implicit (F) time stepping
+   nn_trczdf_exp   =   3       !  number of sub-timestep for ln_trczdfexp=T
+/
+!-----------------------------------------------------------------------
+&namtrc_rad        !  treatment of negative concentrations 
+!-----------------------------------------------------------------------
+   ln_trcrad   =  .true.  !  artificially correct negative concentrations (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namtrc_dmp    !   passive tracer newtonian damping   
+!-----------------------------------------------------------------------
+   nn_hdmp_tr  =   -1      !  horizontal shape =-1, damping in Med and Red Seas only
+                           !                   =XX, damping poleward of XX degrees (XX>0)
+                           !                      + F(distance-to-coast) + Red and Med Seas
+   nn_zdmp_tr  =    1      !  vertical   shape =0    damping throughout the water column
+                           !                   =1 no damping in the mixing layer (kz  criteria)
+                           !                   =2 no damping in the mixed  layer (rho crieria)
+   rn_surf_tr  =   50.     !  surface time scale of damping   [days]
+   rn_bot_tr   =  360.     !  bottom  time scale of damping   [days]
+   rn_dep_tr   =  800.     !  depth of transition between rn_surf and rn_bot [meters]
+   nn_file_tr  =    0      !  create a damping.coeff NetCDF file (=1) or not (=0)
+/
+!-----------------------------------------------------------------------
+&namtrc_trd       !   diagnostics on tracer trends        ('key_trdtrc')
+!                          or mixed-layer trends          ('key_trdmld_trc')
+!----------------------------------------------------------------------
+   nn_trd_trc  =  5475      !  time step frequency and tracers trends
+   nn_ctls_trc =   0        !  control surface type in mixed-layer trends (0,1 or n<jpk)
+   rn_ucf_trc  =   1        !  unit conversion factor (=1 -> /seconds ; =86400. -> /day)
+   ln_trdmld_trc_restart = .false.  !  restart for ML diagnostics
+   ln_trdmld_trc_instant = .true.  !  flag to diagnose trends of instantantaneous or mean ML T/S
+   ln_trdtrc(1)  =   .true.
+   ln_trdtrc(2)  =   .true.
+   ln_trdtrc(23) =   .true.
+/
+!-----------------------------------------------------------------------
+&namtrc_dia       !   parameters for passive tracer additional diagnostics
+!----------------------------------------------------------------------
+   ln_diatrc     =  .true.   !  save additional diag. (T) or not (F)
+   ln_diabio     =  .true.   !  output biological trends
+   nn_writedia   =  5475     !  time step frequency for diagnostics
+   nn_writebio   =    10     !: frequency of biological outputs
+/
+!----------------------------------------------------------------------
+! namtrc_bc       !   data for boundary conditions
+!-----------------------------------------------------------------------
+&namtrc_bc
+!
+   cn_dir        =  './'      !  root directory for the location of the data files
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA2_cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA2_cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA2_cfg	(revision 2504)
@@ -0,0 +1,91 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/TOP1 :  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_top_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!-----------------------------------------------------------------------
+&namtrc_run     !   run information
+!-----------------------------------------------------------------------
+   nn_dttrc      =  1        !  time step frequency for passive sn_tracers
+   nn_writetrc   =  5475     !  time step frequency for sn_tracer outputs
+   ln_top_euler  = .true.    !  use Euler time-stepping for TOP
+   ln_rsttr      = .false.   !  AUTO - start from a restart file (T) or not (F)
+   nn_rsttr      =   0       !  AUTO - restart control = 0 initial time step is not compared to the restart file value
+                             !                  = 1 do not use the value in the restart file
+                             !                  = 2 calendar parameters read in the restart file
+   cn_trcrst_in  = "restart_trc"   !  suffix of pass. sn_tracer restart name (input)
+   cn_trcrst_out = "restart_trc"   !  suffix of pass. sn_tracer restart name (output)
+/
+!-----------------------------------------------------------------------
+&namtrc     !   tracers definition
+!-----------------------------------------------------------------------
+!                !    name   !           title of the field              ! initial data ! initial data ! save   !
+!                !           !                                           !  units       ! from file    ! or not ! 
+!                !           !                                           !              ! or not       !        !
+   sn_tracer(1)   = 'DIC     ' , 'Dissolved inorganic Concentration      ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(2)   = 'Alkalini' , 'Total Alkalinity Concentration         ',  'eq/L '   ,  .true.     ,  .true.
+   sn_tracer(3)   = 'O2      ' , 'Dissolved Oxygen Concentration         ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(4)   = 'CaCO3   ' , 'Calcite Concentration                  ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(5)   = 'PO4     ' , 'Phosphate Concentration                ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(6)   = 'POC     ' , 'Small organic carbon Concentration     ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(7)   = 'Si      ' , 'Silicate Concentration                 ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(8)   = 'PHY     ' , 'Nanophytoplankton Concentration        ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(9)   = 'ZOO     ' , 'Microzooplankton Concentration         ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(10)  = 'DOC     ' , 'Dissolved organic Concentration        ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(11)  = 'PHY2    ' , 'Diatoms Concentration                  ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(12)  = 'ZOO2    ' , 'Mesozooplankton Concentration          ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(13)  = 'DSi     ' , 'Diatoms Silicate Concentration         ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(14)  = 'Fer     ' , 'Dissolved Iron Concentration           ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(15)  = 'BFe     ' , 'Big iron particles Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(16)  = 'GOC     ' , 'Big organic carbon Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(17)  = 'SFe     ' , 'Small iron particles Concentration     ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(18)  = 'DFe     ' , 'Diatoms iron  Concentration            ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(19)  = 'GSi     ' , 'Sinking biogenic Silicate Concentration',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(20)  = 'NFe     ' , 'Nano iron Concentration                ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(21)  = 'NCHL    ' , 'Nano chlorophyl Concentration          ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(22)  = 'DCHL    ' , 'Diatoms chlorophyl Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(23)  = 'NO3     ' , 'Nitrates Concentration                 ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(24)  = 'NH4     ' , 'Ammonium Concentration                 ',  'mol-C/L' ,  .false.    ,  .true.
+/
+!-----------------------------------------------------------------------
+&namtrc_dta      !    Initialisation from data input file
+!-----------------------------------------------------------------------
+!          !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!          !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_trcdta(1)  = 'data_DIC_nomask'        ,        -12        ,  'DIC'     ,    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(2)  = 'data_Alkalini_nomask'   ,        -12        ,  'Alkalini',    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(3)  = 'data_O2_nomask'         ,        -1         ,  'O2'      ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(5)  = 'data_PO4_nomask'        ,        -1         ,  'PO4'     ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(7)  = 'data_Si_nomask'         ,        -1         ,  'Si'      ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(10) = 'data_DOC_nomask'        ,        -12        ,  'DOC'     ,    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(14) = 'data_Fer_nomask'        ,        -12        ,  'Fer'     ,    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(23) = 'data_NO3_nomask'        ,        -1         ,  'NO3'     ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   rn_trfac(1)   =   1.0e-06  !  multiplicative factor
+   rn_trfac(2)   =   1.0e-06  !  -      -      -     -
+   rn_trfac(3)   =  44.6e-06  !  -      -      -     -
+   rn_trfac(5)   = 122.0e-06  !  -      -      -     -
+   rn_trfac(7)   =   1.0e-06  !  -      -      -     -
+   rn_trfac(10)  =   1.0      !  -      -      -     -
+   rn_trfac(14)  =   1.0      !  -      -      -     -
+   rn_trfac(23)  =   7.6e-06  !  -      -      -     -
+/
+!-----------------------------------------------------------------------
+&namtrc_adv    !   advection scheme for passive tracer 
+!-----------------------------------------------------------------------
+   ln_trcadv_tvd     =  .false.  !  TVD scheme
+   ln_trcadv_muscl   =  .true.   !  MUSCL scheme
+/
+!-----------------------------------------------------------------------
+&namtrc_ldf    !   lateral diffusion scheme for passive tracer 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_zdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_rad        !  treatment of negative concentrations 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_dia       !   parameters for passive tracer additional diagnostics
+!----------------------------------------------------------------------
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA2_ref
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA2_ref	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/namelist_top_ORCA2_ref	(revision 2504)
@@ -0,0 +1,116 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/TOP1 :   - tracer run information                (namtrc_run)
+!!               - tracer definition                     (namtrc    )
+!!               - tracer data initialisation            (namtrc_dta)
+!!               - tracer advection                      (namtrc_adv)
+!!               - tracer lateral diffusion              (namtrc_ldf)
+!!               - tracer vertical physics               (namtrc_zdf)
+!!               - tracer newtonian damping              (namtrc_dmp)
+!!               - dynamical tracer trends               (namtrc_trd)
+!!               - tracer output diagonstics             (namtrc_dia)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!-----------------------------------------------------------------------
+&namtrc_run     !   run information
+!-----------------------------------------------------------------------
+   nn_dttrc      =  1        !  time step frequency for passive sn_tracers
+   nn_writetrc   =  5475     !  time step frequency for sn_tracer outputs
+   ln_top_euler  = .false.    !  use Euler time-stepping for TOP
+   ln_rsttr      = .false.   !  start from a restart file (T) or not (F)
+   nn_rsttr      =   0       !  restart control = 0 initial time step is not compared to the restart file value
+                           !                  = 1 do not use the value in the restart file
+                           !                  = 2 calendar parameters read in the restart file
+   cn_trcrst_in  = "restart_trc"   !  suffix of pass. sn_tracer restart name (input)
+   cn_trcrst_out = "restart_trc"   !  suffix of pass. sn_tracer restart name (output)
+/
+!-----------------------------------------------------------------------
+&namtrc     !   tracers definition
+!-----------------------------------------------------------------------
+   ln_trcdta     =   .true.  !  Initialisation from data input file (T) or not (F)
+   ln_trcdmp     =  .false.  !  add a damping termn (T) or not (F)
+   ln_trcdmp_clo =  .false.  !  damping term (T) or not (F) on closed seas
+/
+!-----------------------------------------------------------------------
+&namtrc_dta      !    Initialisation from data input file
+!-----------------------------------------------------------------------
+!
+   cn_dir        =  './'      !  root directory for the location of the data files
+/
+!-----------------------------------------------------------------------
+&namtrc_adv    !   advection scheme for passive tracer 
+!-----------------------------------------------------------------------
+   ln_trcadv_cen2    =  .false.  !  2nd order centered scheme   
+   ln_trcadv_tvd     =  .true.  !  TVD scheme
+   ln_trcadv_muscl   =  .false.   !  MUSCL scheme
+   ln_trcadv_muscl2  =  .false.  !  MUSCL2 scheme + cen2 at boundaries
+   ln_trcadv_ubs     =  .false.  !  UBS scheme
+   ln_trcadv_qck     =  .false.  !  QUICKEST scheme
+   ln_trcadv_msc_ups =  .false.  !  use upstream scheme within muscl
+/
+!-----------------------------------------------------------------------
+&namtrc_ldf    !   lateral diffusion scheme for passive tracer 
+!-----------------------------------------------------------------------
+   ln_trcldf_diff   =  .true.   !  performs lateral diffusion (T) or not (F)
+!                               !  Type of the operator : 
+   ln_trcldf_lap    =  .true.   !     laplacian operator       
+   ln_trcldf_bilap  =  .false.  !     bilaplacian operator     
+                                !  Direction of action  :
+   ln_trcldf_level  =  .false.  !     iso-level                
+   ln_trcldf_hor    =  .false.  !     horizontal (geopotential)         (require "key_ldfslp" when ln_sco=T)
+   ln_trcldf_iso    =  .true.   !     iso-neutral                       (require "key_ldfslp")
+!                               !  Coefficient
+   rn_ahtrc_0       =  2000.    !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_ahtrb_0       =     0.    !     background eddy diffusivity for ldf_iso [m2/s]
+/
+!-----------------------------------------------------------------------
+&namtrc_zdf        !   vertical physics
+!-----------------------------------------------------------------------
+   ln_trczdf_exp   =  .false.  !  split explicit (T) or implicit (F) time stepping
+   nn_trczdf_exp   =   3       !  number of sub-timestep for ln_trczdfexp=T
+/
+!-----------------------------------------------------------------------
+&namtrc_rad        !  treatment of negative concentrations 
+!-----------------------------------------------------------------------
+   ln_trcrad   =  .true.  !  artificially correct negative concentrations (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namtrc_dmp    !   passive tracer newtonian damping   
+!-----------------------------------------------------------------------
+   nn_hdmp_tr  =   -1      !  horizontal shape =-1, damping in Med and Red Seas only
+                           !                   =XX, damping poleward of XX degrees (XX>0)
+                           !                      + F(distance-to-coast) + Red and Med Seas
+   nn_zdmp_tr  =    1      !  vertical   shape =0    damping throughout the water column
+                           !                   =1 no damping in the mixing layer (kz  criteria)
+                           !                   =2 no damping in the mixed  layer (rho crieria)
+   rn_surf_tr  =   50.     !  surface time scale of damping   [days]
+   rn_bot_tr   =  360.     !  bottom  time scale of damping   [days]
+   rn_dep_tr   =  800.     !  depth of transition between rn_surf and rn_bot [meters]
+   nn_file_tr  =    0      !  create a damping.coeff NetCDF file (=1) or not (=0)
+/
+!-----------------------------------------------------------------------
+&namtrc_trd       !   diagnostics on tracer trends        ('key_trdtrc')
+!                          or mixed-layer trends          ('key_trdmld_trc')
+!----------------------------------------------------------------------
+   nn_trd_trc  =  5475      !  time step frequency and tracers trends
+   nn_ctls_trc =   0        !  control surface type in mixed-layer trends (0,1 or n<jpk)
+   rn_ucf_trc  =   1        !  unit conversion factor (=1 -> /seconds ; =86400. -> /day)
+   ln_trdmld_trc_restart = .false.  !  restart for ML diagnostics
+   ln_trdmld_trc_instant = .true.  !  flag to diagnose trends of instantantaneous or mean ML T/S
+   ln_trdtrc(1)  =   .true.
+   ln_trdtrc(2)  =   .true.
+   ln_trdtrc(23) =   .true.
+/
+!-----------------------------------------------------------------------
+&namtrc_dia       !   parameters for passive tracer additional diagnostics
+!----------------------------------------------------------------------
+   ln_diatrc     =  .true.   !  save additional diag. (T) or not (F)
+   ln_diabio     =  .true.   !  output biological trends
+   nn_writedia   =  5475     !  time step frequency for diagnostics
+   nn_writebio   =    10     !: frequency of biological outputs
+/
+!----------------------------------------------------------------------
+! namtrc_bc       !   data for boundary conditions
+!-----------------------------------------------------------------------
+&namtrc_bc
+!
+   cn_dir        =  './'      !  root directory for the location of the data files
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/orchidee.def_CWRR
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/orchidee.def_CWRR	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/orchidee.def_CWRR	(revision 2504)
@@ -0,0 +1,122 @@
+#
+#**************************************************************************
+#                    Parameter file list for ORCHIDEE
+#**************************************************************************
+
+# Input and output
+#**************************************************************************
+# Restart the time from the GCM. 
+# default = n
+SECHIBA_reset_time = y
+
+# Name of restart to read for initial conditions
+# default = NONE
+SECHIBA_restart_in = _AUTOBLOCKER_
+
+# Name of restart to read for initial conditions of STOMATE
+# default = NONE
+STOMATE_RESTART_FILEIN = _AUTOBLOCKER_
+
+# Use XIOS for writing diagnostics file
+# defulat = n
+XIOS_ORCHIDEE_OK = _AUTO_
+
+# Flag to activate sechiba_out_2.nc history file for SECHIBA
+# default  = FALSE
+SECHIBA_HISTFILE2 = _AUTO_
+
+# SECHIBA history output level (0..10)
+# default = 5
+SECHIBA_HISTLEVEL = _AUTO_
+
+# SECHIBA history 2 output level (0..10)
+# default = 1
+SECHIBA_HISTLEVEL2 = _AUTO_
+
+# STOMATE history output level (0..10)
+# default = 10
+STOMATE_HISTLEVEL = _AUTO_
+
+# Writefrequency in seconds in sechiba_history.nc
+# default = 86400.0
+WRITE_STEP = _AUTO_
+
+# Writefrequency in seconds sechiba_out_2.nc 
+# default = 1800.0
+WRITE_STEP2 = _AUTO_
+
+# Writefrequency in days in stomate_history.nc
+# default = 10.
+STOMATE_HIST_DT = _AUTO_
+
+# Writefrequency in days or -1 for monthly output in stomate_ipcc_history.nc
+# default = 0.
+STOMATE_IPCC_HIST_DT = -1
+
+
+# Hydrology parameters
+#**************************************************************************
+# Activate the multi-layer diffusion scheme adapted from CWRR
+# by default the Choisnel hydrology is used.
+# default = n
+HYDROL_CWRR = y
+
+# Total depth of soil reservoir
+# default = 2./4. depending on HYDROL_CWRR
+HYDROL_SOIL_DEPTH = 2.
+
+# Root profile
+HYDROL_HUMCSTE = 5.0, 0.8, 0.8, 1.0, 0.8, 0.8, 1.0, 1.0, 0.8, 4.0, 4.0, 4.0, 4.0 
+
+# Activate river routing
+# default = n
+RIVER_ROUTING = y
+
+
+#**************************************************************************
+# Activate Stomate component
+# default = n
+STOMATE_OK_STOMATE = _AUTOBLOCKER_ 
+
+# Activate calculations of CO2 according to Farqhuar and Ball
+# default = n
+STOMATE_OK_CO2 = y
+
+# Use cdrag coefficient from gcm
+CDRAG_FROM_GCM = y
+
+# Interception reservoir coefficient.
+# default = 0.1
+SECHIBA_QSINT = 0.02
+
+# Parmeters related to vegetation map
+#**************************************************************************
+# Read a land_use vegetation map
+# default = n
+LAND_USE = y
+
+# Year of the land_use vegetation map readed
+# year off the pft map
+# default = 282
+VEGET_YEAR = 1
+
+# The parameter is used to bypass veget_year count 
+# and reinitialize it with VEGET_YEAR parameter.
+# Then it is possible to change LAND USE file.
+# If LAND_USE
+# default = y
+VEGET_REINIT = n
+
+# Update vegetation frequency (since 2.0 version)
+# The veget datas will be update at this period if LAND_USE
+# default = 1Y
+VEGET_UPDATE = _AUTO_
+
+# treat land use modifications
+# With this variable, you can use a Land Use map
+# to simulate anthropic modifications such as   
+# deforestation.                                
+# If LAND_USE
+# default = y
+LAND_COVER_CHANGE = _AUTO_
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/orchidee.def_Choi
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/orchidee.def_Choi	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/orchidee.def_Choi	(revision 2504)
@@ -0,0 +1,122 @@
+#
+#**************************************************************************
+#                    Parameter file list for ORCHIDEE
+#**************************************************************************
+
+# Input and output
+#**************************************************************************
+# Restart the time from the GCM. 
+# default = n
+SECHIBA_reset_time = y
+
+# Name of restart to read for initial conditions
+# default = NONE
+SECHIBA_restart_in = _AUTOBLOCKER_
+
+# Name of restart to read for initial conditions of STOMATE
+# default = NONE
+STOMATE_RESTART_FILEIN = _AUTOBLOCKER_
+
+# Use XIOS for writing diagnostics file
+# defulat = n
+XIOS_ORCHIDEE_OK = _AUTO_
+
+# Flag to activate sechiba_out_2.nc history file for SECHIBA
+# default  = FALSE
+SECHIBA_HISTFILE2 = _AUTO_
+
+# SECHIBA history output level (0..10)
+# default = 5
+SECHIBA_HISTLEVEL = _AUTO_
+
+# SECHIBA history 2 output level (0..10)
+# default = 1
+SECHIBA_HISTLEVEL2 = _AUTO_
+
+# STOMATE history output level (0..10)
+# default = 10
+STOMATE_HISTLEVEL = _AUTO_
+
+# Writefrequency in seconds in sechiba_history.nc
+# default = 86400.0
+WRITE_STEP = _AUTO_
+
+# Writefrequency in seconds sechiba_out_2.nc 
+# default = 1800.0
+WRITE_STEP2 = _AUTO_
+
+# Writefrequency in days in stomate_history.nc
+# default = 10.
+STOMATE_HIST_DT = _AUTO_
+
+# Writefrequency in days or -1 for monthly output in stomate_ipcc_history.nc
+# default = 0.
+STOMATE_IPCC_HIST_DT = -1
+
+
+# Hydrology parameters
+#**************************************************************************
+# Activate the multi-layer diffusion scheme adapted from CWRR
+# by default the Choisnel hydrology is used.
+# default = n
+HYDROL_CWRR = n 
+
+# Total depth of soil reservoir
+# default = 2./4. depending on HYDROL_CWRR
+HYDROL_SOIL_DEPTH = 4.
+
+# Root profile
+HYDROL_HUMCSTE = 5., .4, .4, 1., .8, .8, 1., 1., .8, 4., 1., 4., 1.
+
+# Activate river routing
+# default = n
+RIVER_ROUTING = y
+
+
+#**************************************************************************
+# Activate Stomate component
+# default = n
+STOMATE_OK_STOMATE = _AUTOBLOCKER_ 
+
+# Activate calculations of CO2 according to Farqhuar and Ball
+# default = n
+STOMATE_OK_CO2 = y
+
+# Use cdrag coefficient from gcm
+CDRAG_FROM_GCM = y
+
+# Interception reservoir coefficient.
+# default = 0.1
+SECHIBA_QSINT = 0.02
+
+# Parmeters related to vegetation map
+#**************************************************************************
+# Read a land_use vegetation map
+# default = n
+LAND_USE = y
+
+# Year of the land_use vegetation map readed
+# year off the pft map
+# default = 282
+VEGET_YEAR = 1
+
+# The parameter is used to bypass veget_year count 
+# and reinitialize it with VEGET_YEAR parameter.
+# Then it is possible to change LAND USE file.
+# If LAND_USE
+# default = y
+VEGET_REINIT = n
+
+# Update vegetation frequency (since 2.0 version)
+# The veget datas will be update at this period if LAND_USE
+# default = 1Y
+VEGET_UPDATE = _AUTO_
+
+# treat land use modifications
+# With this variable, you can use a Land Use map
+# to simulate anthropic modifications such as   
+# deforestation.                                
+# If LAND_USE
+# default = y
+LAND_COVER_CHANGE = _AUTO_
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/output.def_high
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/output.def_high	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/output.def_high	(revision 2504)
@@ -0,0 +1,131 @@
+#
+# Parametres fichiers de sortie
+#
+# Noms des fichiers
+phys_out_filenames=      histmth histday histhf   histhf3h  histhf3hm histstn
+# Sortir ou non les fichiers
+phys_out_filekeys= _AUTO_
+# Niveaux de sorties
+phys_out_filelevels=     5       5       5        5         5         5
+### Type de fichier : global (n) ou stations (y)
+phys_out_filestations =  n       n       n        n         n         y
+### Frequences des sorties
+phys_out_filetimesteps = 1.mth,  1.day,  0.25day, 0.125day, 0.125day, 1800.s
+#
+#
+### variables niveaux pressions 100, 50, 10 hPa a 3h-inst - F.Lott
+flag_t100       = 1, 7, 7, 5, 10, 10
+flag_u100       = 1, 7, 7, 5, 10, 10
+flag_v100       = 1, 7, 7, 5, 10, 10
+flag_w100       = 1, 7, 7, 5, 10, 10
+flag_t50        = 1, 7, 7, 5, 10, 10
+flag_u50        = 1, 7, 7, 5, 10, 10
+flag_v50        = 1, 7, 7, 5, 10, 10
+flag_w50        = 1, 7, 7, 5, 10, 10
+flag_t10        = 1, 7, 7, 5, 10, 10
+flag_u10        = 1, 7, 7, 5, 10, 10
+flag_v10        = 1, 7, 7, 5, 10, 10
+flag_w10        = 1, 7, 7, 5, 10, 10
+# more variables for level 5 histday/month: vitw and pres
+# Vertical wind
+flag_vitw         =  2, 3, 7, 6, 6, 6
+# Air pressure
+flag_pres         =  2, 3, 7, 6, 6, 6
+# w500 for histday
+flag_w500         =  1, 5, 3, 10, 10, 10
+# t700 for histday
+flag_t700         =  1, 5, 3, 10, 10, 10
+# Cloud fraction
+flag_rneb         =  2, 5, 10, 5, 10, 10
+# Aga sortie avec niveau 2
+flag_Aga          =  2, 10, 10, 10, 10, 10
+# niveaux maximum 5 mensuel pour variables CFMIP
+flag_rlu          =  5, 10, 10, 10, 10, 10
+flag_rsu          =  5, 10, 10, 10, 10, 10
+flag_rld          =  5, 10, 10, 10, 10, 10
+flag_rsd          =  5, 10, 10, 10, 10, 10
+flag_rlucs        =  5, 10, 10, 10, 10, 10
+flag_rsucs        =  5, 10, 10, 10, 10, 10
+flag_rldcs        =  5, 10, 10, 10, 10, 10
+flag_rsdcs        =  5, 10, 10, 10, 10, 10
+flag_tnt          =  5, 10, 10, 10, 10, 10
+flag_dtdyn        =  4, 10, 10, 10, 10, 10
+flag_dtphy        =  4, 10, 10, 10, 10, 10
+flag_dtlschr      =  5, 10, 10, 10, 10, 10
+flag_tntr         =  5, 10, 10, 10, 10, 10
+flag_tntc         =  5, 10, 10, 10, 10, 10
+flag_tntscpbl     =  5, 10, 10, 10, 10, 10
+flag_tnhus        =  5, 10, 10, 10, 10, 10
+flag_dqdyn        =  4, 10, 10, 10, 10, 10
+flag_tnhusc       =  5, 10, 10, 10, 10, 10
+flag_dqvdf        =  5, 10, 10, 10, 10, 10
+flag_tnhusscpbl   =  5, 10, 10, 10, 10, 10
+flag_dqphy        =  2, 10, 10, 10, 10, 10
+flag_evu          =  5, 10, 10, 10, 10, 10
+flag_kz           =  4, 10, 10, 10, 10, 10
+###
+# more variables for t tendency monthly
+###
+flag_dtvdf        =  5, 10, 10, 10, 10, 10
+flag_dteva        =  5, 10, 10, 10, 10, 10
+flag_dtcon        =  4, 10, 10, 10, 10, 10
+flag_dtajs        =  4, 10, 10, 10, 10, 10
+flag_dtlsc        =  4, 10, 10, 10, 10, 10
+flag_dtoro        =  4, 10, 10, 10, 10, 10
+flag_dtlif        =  4, 10, 10, 10, 10, 10
+flag_dthin        =  4, 10, 10, 10, 10, 10
+flag_dtec         =  4, 10, 10, 10, 10, 10
+### more variables for q tendency monthly
+flag_dqeva        =  5, 10, 10, 10, 10, 10
+flag_dqcon        =  4, 10, 10, 10, 10, 10
+flag_dqajs        =  4, 10, 10, 10, 10, 10
+flag_dqlsc        =  5, 10, 10, 10, 10, 10
+### nouvelle physique monthly
+flag_dtthe        =  4, 10, 10, 10, 10, 10
+flag_dtwak        =  4, 5, 10, 10, 10, 10
+flag_dqthe        =  4, 10, 10, 10, 10, 10
+flag_dqwak        =  4, 5, 10, 10, 10, 10
+flag_ftime_th     =  4, 10, 10, 5, 10, 10
+#
+# Parametres niveau de sorties differents fichiers
+#
+### parametres pour hist*NMC.nc
+#lev_histdayNMC: nombre de niveaux sur la verticale dans le fichier
+#                histdayNMC: 8 ou 17
+lev_histdayNMC=8
+### - ok_histNMC = y/n, y/n, y/n pour avoir les sorties NMC mensuelles, journalieres et haute frequence
+ok_histNMC = _AUTO_
+
+#
+# Parametres simulateur COSP (CFMIP Observational Simulator Package)
+#
+### ok_cosp=y/n flag simulateur COSP
+ok_cosp= _AUTO_
+### freq_COSP = frequence d'appel de COSP en secondes
+freq_COSP=10800.
+### ok_mensuelCOSP=y/n sortir fichier mensuel COSP histmthCOSP.nc, =n pas de fichier histmthCOSP.nc
+ok_mensuelCOSP= _AUTO_
+### ok_journeCOSP=y/n sortir fichier journalier histdayCOSP.nc, =n pas de fichier histdayCOSP.nc
+ok_journeCOSP= _AUTO_
+### ok_hfCOSP=y/n, ecrire sorties  haute frequence histhfCOSP.nc, =n pas de fichier histhfCOSP.nc
+ok_hfCOSP= _AUTO_
+#
+# Parametres simulateur ISCCP
+#
+### ok_isccp=y/n flag simulateur ISCCP
+ok_isccp=n
+### freqin_isccp = frequence input en secondes du simulateur ISCCP
+freq_ISCCP=10800.
+### freqout_isccp = frequence output en jours du simulateur ISCCP
+ecrit_ISCCP= _AUTO_
+### top_height = flag choix calcul nuages par le simulateur en utilisant 
+# -              les donnees IR et/ou VIS et l algorithme ISCCP-D1
+# - top_height = 1 -> algo IR-VIS
+# - top_height = 2 -> identique a 1, mais "ptop(ibox)=pfull(ilev)"
+# - top_height = 3 -> algo IR
+top_height = 1
+### overlap =    Hypothese de Recouvrement (HR) utilisee pour le simulateur ISCCP
+# - overlap=1    Max overlap
+# - overlap=2    Random overlap
+# - overlap=3    Max/Random overlap
+overlap = 3
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/output.def_low
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/output.def_low	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/output.def_low	(revision 2504)
@@ -0,0 +1,60 @@
+#
+# Parametres fichiers de sortie
+#
+# Noms des fichiers
+phys_out_filenames=      histmth histday histhf   histhf3h  histhf3hm histstn
+# Sortir ou non les fichiers
+phys_out_filekeys=  _AUTO_
+# Niveaux de sorties
+phys_out_filelevels=     5       2       2        5         5         5
+### Type de fichier : global (n) ou stations (y)
+phys_out_filestations =  n       n       n        n         n         y
+### Frequences des sorties
+phys_out_filetimesteps = 1.mth,  1.day,  0.25day, 0.125day, 0.125day, 1800.s
+#
+#
+# Parametres niveau de sorties differents fichiers
+#
+### parametres pour hist*NMC.nc
+#lev_histdayNMC: nombre de niveaux sur la verticale dans le fichier
+#                histdayNMC: 8 ou 17
+lev_histdayNMC=8
+### - ok_histNMC = y/n, y/n, y/n pour avoir les sorties NMC mensuelles, journalieres et haute frequence
+ok_histNMC = _AUTO_
+
+#
+# Parametres simulateur COSP (CFMIP Observational Simulator Package)
+#
+### ok_cosp=y/n flag simulateur COSP
+ok_cosp= _AUTO_
+### freq_COSP = frequence d'appel de COSP en secondes
+freq_COSP=10800.
+### ok_mensuelCOSP=y/n sortir fichier mensuel COSP histmthCOSP.nc, =n pas de fichier histmthCOSP.nc
+ok_mensuelCOSP= _AUTO_
+### ok_journeCOSP=y/n sortir fichier journalier histdayCOSP.nc, =n pas de fichier histdayCOSP.nc
+ok_journeCOSP= _AUTO_
+### ok_hfCOSP=y/n, ecrire sorties  haute frequence histhfCOSP.nc, =n pas de fichier histhfCOSP.nc
+ok_hfCOSP= _AUTO_
+
+#
+# Parametres simulateur ISCCP
+#
+### ok_isccp=y/n flag simulateur ISCCP
+ok_isccp=n
+### freqin_isccp = frequence input en secondes du simulateur ISCCP
+freq_ISCCP=10800.
+### freqout_isccp = frequence output en jours du simulateur ISCCP
+ecrit_ISCCP= _AUTO_
+### top_height = flag choix calcul nuages par le simulateur en utilisant 
+# -              les donnees IR et/ou VIS et l algorithme ISCCP-D1
+# - top_height = 1 -> algo IR-VIS
+# - top_height = 2 -> identique a 1, mais "ptop(ibox)=pfull(ilev)"
+# - top_height = 3 -> algo IR
+top_height = 1
+### overlap =    Hypothese de Recouvrement (HR) utilisee pour le simulateur ISCCP
+# - overlap=1    Max overlap
+# - overlap=2    Random overlap
+# - overlap=3    Max/Random overlap
+overlap = 3
+
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/output.def_medium
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/output.def_medium	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/output.def_medium	(revision 2504)
@@ -0,0 +1,131 @@
+#
+# Parametres fichiers de sortie
+#
+# Noms des fichiers
+phys_out_filenames=      histmth histday histhf   histhf3h  histhf3hm histstn
+# Sortir ou non les fichiers
+phys_out_filekeys= _AUTO_
+# Niveaux de sorties
+phys_out_filelevels=     5       5       2        5         5         5
+### Type de fichier : global (n) ou stations (y)
+phys_out_filestations =  n       n       n        n         n         y
+### Frequences des sorties
+phys_out_filetimesteps = 1.mth,  1.day,  0.25day, 0.125day, 0.125day, 1800.s
+#
+#
+### variables niveaux pressions 100, 50, 10 hPa a 3h-inst - F.Lott
+flag_t100       = 1, 7, 7, 5, 10, 10
+flag_u100       = 1, 7, 7, 5, 10, 10
+flag_v100       = 1, 7, 7, 5, 10, 10
+flag_w100       = 1, 7, 7, 5, 10, 10
+flag_t50        = 1, 7, 7, 5, 10, 10
+flag_u50        = 1, 7, 7, 5, 10, 10
+flag_v50        = 1, 7, 7, 5, 10, 10
+flag_w50        = 1, 7, 7, 5, 10, 10
+flag_t10        = 1, 7, 7, 5, 10, 10
+flag_u10        = 1, 7, 7, 5, 10, 10
+flag_v10        = 1, 7, 7, 5, 10, 10
+flag_w10        = 1, 7, 7, 5, 10, 10
+#
+# more variables for level 5 : vitw and pres
+# Vertical wind
+flag_vitw         =  2, 3, 7, 6, 6, 6
+# Air pressure
+flag_pres         =  2, 3, 7, 6, 6, 6
+# w500 for histday
+flag_w500         =  1, 5, 3, 10, 10, 10
+# t700 for histday
+flag_t700         =  1, 5, 3, 10, 10, 10
+# Cloud fraction
+flag_rneb         =  2, 5, 10, 5, 10, 10
+# Aga sortie avec niveau 2
+flag_Aga          =  2, 10, 10, 10, 10, 10
+# niveaux maximum 5 mensuel pour variables CFMIP
+flag_rlu          =  5, 10, 10, 10, 10, 10
+flag_rsu          =  5, 10, 10, 10, 10, 10
+flag_rld          =  5, 10, 10, 10, 10, 10
+flag_rsd          =  5, 10, 10, 10, 10, 10
+flag_rlucs        =  5, 10, 10, 10, 10, 10
+flag_rsucs        =  5, 10, 10, 10, 10, 10
+flag_rldcs        =  5, 10, 10, 10, 10, 10
+flag_rsdcs        =  5, 10, 10, 10, 10, 10
+flag_tnt          =  5, 10, 10, 10, 10, 10
+flag_dtdyn        =  4, 10, 10, 10, 10, 10
+flag_dtphy        =  4, 10, 10, 10, 10, 10
+flag_dtlschr      =  5, 10, 10, 10, 10, 10
+flag_tntr         =  5, 10, 10, 10, 10, 10
+flag_tntc         =  5, 10, 10, 10, 10, 10
+flag_tntscpbl     =  5, 10, 10, 10, 10, 10
+flag_tnhus        =  5, 10, 10, 10, 10, 10
+flag_dqdyn        =  4, 10, 10, 10, 10, 10
+flag_tnhusc       =  5, 10, 10, 10, 10, 10
+flag_dqvdf        =  5, 10, 10, 10, 10, 10
+flag_tnhusscpbl   =  5, 10, 10, 10, 10, 10
+flag_dqphy        =  2, 10, 10, 10, 10, 10
+flag_evu          =  5, 10, 10, 10, 10, 10
+flag_kz           =  4, 10, 10, 10, 10, 10
+###
+# more variables for t tendency monthly
+###
+flag_dtvdf        =  5, 10, 10, 10, 10, 10
+flag_dteva        =  5, 10, 10, 10, 10, 10
+flag_dtcon        =  4, 10, 10, 10, 10, 10
+flag_dtajs        =  4, 10, 10, 10, 10, 10
+flag_dtlsc        =  4, 10, 10, 10, 10, 10
+flag_dtoro        =  4, 10, 10, 10, 10, 10
+flag_dtlif        =  4, 10, 10, 10, 10, 10
+flag_dthin        =  4, 10, 10, 10, 10, 10
+flag_dtec         =  4, 10, 10, 10, 10, 10
+### more variables for q tendency monthly
+flag_dqeva        =  5, 10, 10, 10, 10, 10
+flag_dqcon        =  4, 10, 10, 10, 10, 10
+flag_dqajs        =  4, 10, 10, 10, 10, 10
+flag_dqlsc        =  5, 10, 10, 10, 10, 10
+### nouvelle physique monthly
+flag_dtthe        =  4, 10, 10, 10, 10, 10
+flag_dtwak        =  4, 5, 10, 10, 10, 10
+flag_dqthe        =  4, 10, 10, 10, 10, 10
+flag_dqwak        =  4, 5, 10, 10, 10, 10
+flag_ftime_th     =  4, 10, 10, 5, 10, 10
+#
+# Parametres niveau de sorties differents fichiers
+#
+### parametres pour hist*NMC.nc
+#lev_histdayNMC: nombre de niveaux sur la verticale dans le fichier
+#                histdayNMC: 8 ou 17
+lev_histdayNMC=8
+### - ok_histNMC = y/n, y/n, y/n pour avoir les sorties NMC mensuelles, journalieres et haute frequence
+ok_histNMC = _AUTO_
+#
+# Parametres simulateur COSP (CFMIP Observational Simulator Package)
+#
+### ok_cosp=y/n flag simulateur COSP
+ok_cosp= _AUTO_
+### freq_COSP = frequence d'appel de COSP en secondes
+freq_COSP=10800.
+### ok_mensuelCOSP=y/n sortir fichier mensuel COSP histmthCOSP.nc, =n pas de fichier histmthCOSP.nc
+ok_mensuelCOSP= _AUTO_
+### ok_journeCOSP=y/n sortir fichier journalier histdayCOSP.nc, =n pas de fichier histdayCOSP.nc
+ok_journeCOSP= _AUTO_
+### ok_hfCOSP=y/n, ecrire sorties  haute frequence histhfCOSP.nc, =n pas de fichier histhfCOSP.nc
+ok_hfCOSP= _AUTO_
+#
+# Parametres simulateur ISCCP
+#
+### ok_isccp=y/n flag simulateur ISCCP
+ok_isccp=n
+### freqin_isccp = frequence input en secondes du simulateur ISCCP
+freq_ISCCP=10800.
+### freqout_isccp = frequence output en jours du simulateur ISCCP
+ecrit_ISCCP= _AUTO_
+### top_height = flag choix calcul nuages par le simulateur en utilisant 
+# -              les donnees IR et/ou VIS et l algorithme ISCCP-D1
+# - top_height = 1 -> algo IR-VIS
+# - top_height = 2 -> identique a 1, mais "ptop(ibox)=pfull(ilev)"
+# - top_height = 3 -> algo IR
+top_height = 1
+### overlap =    Hypothese de Recouvrement (HR) utilisee pour le simulateur ISCCP
+# - overlap=1    Max overlap
+# - overlap=2    Random overlap
+# - overlap=3    Max/Random overlap
+overlap = 3
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L19_AP
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L19_AP	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L19_AP	(revision 2504)
@@ -0,0 +1,97 @@
+## $Id$
+#
+##  Choix ou non  de  New oliq               
+new_oliq=y
+##  Activation ou non de la parametrisation de Hines pour la strato
+ok_hines=n
+##  Orodr  ou  non   pour l orographie              
+ok_orodr=y
+##  Orolf  ou  non   pour l orographie              
+ok_orolf=y
+##   Si = .T. ,  lecture du fichier limit avec la bonne annee             
+ok_limitvrai=n
+##  Flag  pour la convection : 1 pour LMD, 2 pour Tiedtke, 3 KE(nvlle version JYG), 30 KE(version IPCC AR4), 4 KE vect
+iflag_con=30
+## Facteur multiplication des precip convectives dans KE
+cvl_corr=1.0
+#
+#
+### niveau du diagnostique de conservation d energie
+if_ebil=0
+#
+# parametres KE
+#
+### epmax = Efficacite precipitation maximale
+epmax = .99
+### ok_adj_ema = ?? pas utilise
+ok_adj_ema = n
+### iflag_clw Flag calcul eau liquide
+# - iflag_clw=0 : qcond_incld(i,l) = em_qcondc(l)
+# - iflag_clw=1 : qcond_incld(i,l) = em_qcond(l)
+# - iflag_clw=2 : eau liquide diagnostique en fonction de la Precip
+iflag_clw = 1
+# 
+# parametres nuages
+#
+### cld_lc_lsc  contenu en eau liquide des nuages large-scale (fisrtilp) 
+cld_lc_lsc = 2.6e-4
+### cld_lc_con  contenu en eau liquide des nuages convectifs (fisrtilp) 
+cld_lc_con = 2.6e-4
+### cld_tau_lsc cte de temps utilisee pour eliminer l eau large-scale (fisrtilp) 
+cld_tau_lsc = 3600.
+### cld_tau_con cte de temps utilisee pour eliminer l eau convective (fisrtilp) 
+cld_tau_con = 3600.
+### ffallv_lsc  cte utilisee dans calcul vitesse de chute cristaux de glace large-scale (fisrtilp) 
+ffallv_lsc = 1.
+### ffallv_lsc  cte utilisee dans calcul vitesse de chute cristaux de glace convectifs (fisrtilp) 
+ffallv_con = 1.
+### coef_eva coef evaporation precips eau/glace (fisrtilp/fisrtilp_tr?/conlmd?)
+coef_eva = 2.e-5
+### reevap_ice  reevaporation de toute la precip dans la couche du dessous pour la glace (fisrtilp) 
+reevap_ice = y
+### iflag_cldcon  flag pour calculer ratqsc=F(ratqsbas,fact_cldcon,q_seri) (physiq) 
+# - iflag_cldcon<=-1 diag. rain_Tiedtke 
+# - iflag_cldcon=1, ratqsc=ratqsbas+fact_cldcon*(q_seri(1)-q_seri(k))/q_seri(k)
+# - iflag_cldcon=1/2, ratqs=max(ratqs,ratqsc)
+# - iflag_cldcon=3,   ratqs=ratqss
+iflag_cldcon = 3
+### iflag_pdf :  flag calcul distribution sous-maille de l eau et des nuages 
+# - iflag_pdf=0, version ratqs, 
+# - iflag_pdf=1, calcul eau condensee, fraction nuageuse, eau nuageuse a partir
+# -              des PDFS de Sandrine Bony 
+iflag_pdf = 1
+### fact_cldcon  constante calcul ratqsc (voir iflag_cldcon) et proprietes nuages convectifs, clwcon0 (physiq.F) 
+fact_cldcon = 1.
+### facttemps=   facteur de relaxation de ratqs (iflag_cldcon=1/2) et rnebcon (iflag_cldcon=3)
+facttemps = 0.
+## ok_newmicro   =y appel newmicro , =n appel nuage (calcul epaisseur optique et emmissivite des nuages) 
+ok_newmicro = y
+### iflag_ratqs=0 correspond a la version IPCC AR4 
+iflag_ratqs=0
+### ratqsbas     ratqs en bas si iflag_cldcon=1 
+ratqsbas = 0.005
+### ratqshaut    ratqs en haut pour ratqss "stables"  
+ratqshaut = 0.33
+### rad_froid    rayon cristaux des nuages de glace "froids" 
+rad_froid = 35
+### rad_chau1    rayon goutelettes d eau chauds", en haut: k=4-klev 
+rad_chau1=12
+### rad_chau2    rayon goutelettes d eau chauds", en bas: k=1-3  
+rad_chau2=11
+# 
+# Coefficient et parametres sur les drags
+#
+f_cdrag_ter=1.
+f_cdrag_stable=1.
+f_cdrag_oce=0.8
+f_rugoro=0.
+### ksta_ter      coef.diffusion minimale sur terre/sic/lic 
+ksta_ter=1.e-7
+### cdmmax =     cdrag maximum pour le moment
+cdmmax = 2.5E-3
+### cdhmax =     cdrag maximum pour l energie
+cdhmax = 2.0E-3
+
+### nsplit_phys (D=1) 
+nsplit_phys=1
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L39_AP
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L39_AP	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L39_AP	(revision 2504)
@@ -0,0 +1,97 @@
+## $Id$
+#
+##  Choix ou non  de  New oliq               
+new_oliq=y
+##  Activation ou non de la parametrisation de Hines pour la strato
+ok_hines=y
+##  Orodr  ou  non   pour l orographie              
+ok_orodr=y
+##  Orolf  ou  non   pour l orographie              
+ok_orolf=y
+##   Si = .T. ,  lecture du fichier limit avec la bonne annee             
+ok_limitvrai=n
+##  Flag  pour la convection : 1 pour LMD, 2 pour Tiedtke, 3 KE(nvlle version JYG), 30 KE(version IPCC AR4), 4 KE vect
+iflag_con=30
+## Facteur multiplication des precip convectives dans KE
+cvl_corr=1.0
+#
+#
+
+### niveau du diagnostique de conservation d energie
+if_ebil=0
+#
+# parametres KE
+#
+### epmax = Efficacite precipitation maximale
+epmax = .999
+### ok_adj_ema = ?? pas utilise
+ok_adj_ema = n
+### iflag_clw Flag calcul eau liquide
+# - iflag_clw=0 : qcond_incld(i,l) = em_qcondc(l)
+# - iflag_clw=1 : qcond_incld(i,l) = em_qcond(l)
+# - iflag_clw=2 : eau liquide diagnostique en fonction de la Precip
+iflag_clw = 1
+# 
+# parametres nuages
+#
+### cld_lc_lsc  contenu en eau liquide des nuages large-scale (fisrtilp) 
+cld_lc_lsc = 4.16e-4
+### cld_lc_con  contenu en eau liquide des nuages convectifs (fisrtilp) 
+cld_lc_con = 4.16e-4
+### cld_tau_lsc cte de temps utilisee pour eliminer l eau large-scale (fisrtilp) 
+cld_tau_lsc = 1800.
+### cld_tau_con cte de temps utilisee pour eliminer l eau convective (fisrtilp) 
+cld_tau_con = 1800.
+### ffallv_lsc  cte utilisee dans calcul vitesse de chute cristaux de glace large-scale (fisrtilp) 
+ffallv_lsc = 0.5
+### ffallv_lsc  cte utilisee dans calcul vitesse de chute cristaux de glace convectifs (fisrtilp) 
+ffallv_con = 0.5
+### coef_eva coef evaporation precips eau/glace (fisrtilp/fisrtilp_tr?/conlmd?)
+coef_eva = 2.e-5
+### reevap_ice  reevaporation de toute la precip dans la couche du dessous pour la glace (fisrtilp) 
+reevap_ice = y
+### iflag_cldcon  flag pour calculer ratqsc=F(ratqsbas,fact_cldcon,q_seri) (physiq) 
+# - iflag_cldcon<=-1 diag. rain_Tiedtke 
+# - iflag_cldcon=1, ratqsc=ratqsbas+fact_cldcon*(q_seri(1)-q_seri(k))/q_seri(k)
+# - iflag_cldcon=1/2, ratqs=max(ratqs,ratqsc)
+# - iflag_cldcon=3,   ratqs=ratqss
+iflag_cldcon = 3
+### iflag_pdf :  flag calcul distribution sous-maille de l eau et des nuages 
+# - iflag_pdf=0, version ratqs, 
+# - iflag_pdf=1, calcul eau condensee, fraction nuageuse, eau nuageuse a partir
+# -              des PDFS de Sandrine Bony 
+iflag_pdf = 1
+### fact_cldcon  constante calcul ratqsc (voir iflag_cldcon) et proprietes nuages convectifs, clwcon0 (physiq.F) 
+fact_cldcon = 1.
+### facttemps=   facteur de relaxation de ratqs (iflag_cldcon=1/2) et rnebcon (iflag_cldcon=3)
+facttemps = 0.
+## ok_newmicro   =y appel newmicro , =n appel nuage (calcul epaisseur optique et emmissivite des nuages) 
+ok_newmicro = y
+### iflag_ratqs=0 correspond a la version IPCC AR4 
+iflag_ratqs=0
+### ratqsbas     ratqs en bas si iflag_cldcon=1 
+ratqsbas = 0.005
+### ratqshaut    ratqs en haut pour ratqss "stables"  
+ratqshaut = 0.33
+### rad_froid    rayon cristaux des nuages de glace "froids" 
+rad_froid = 35
+### rad_chau1    rayon goutelettes d eau chauds", en haut: k=4-klev 
+rad_chau1=12
+### rad_chau2    rayon goutelettes d eau chauds", en bas: k=1-3  
+rad_chau2=11
+# 
+# Coefficient et parametres sur les drags
+#
+f_cdrag_ter=1.
+f_cdrag_stable=1.
+f_cdrag_oce=0.8
+f_rugoro=0.
+### ksta_ter      coef.diffusion minimale sur terre/sic/lic 
+ksta_ter=1.e-7
+### cdmmax =     cdrag maximum pour le moment
+cdmmax = 2.5E-3
+### cdhmax =     cdrag maximum pour l energie
+cdhmax = 2.0E-3
+
+### nsplit_phys (D=1) 
+nsplit_phys=1
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L39_NPv3.1
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L39_NPv3.1	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L39_NPv3.1	(revision 2504)
@@ -0,0 +1,132 @@
+##############################################################################
+# PARAMETRES ET CLES DE CONFIGURATION LMDZ 
+# Cette parie sera bientot extrait dans un fichier config.def
+##############################################################################
+# D: Valeur par default
+#
+##############################################################################
+# PARAMETRES ET CLES DE LA PHYSIQUE LMDZ
+##############################################################################
+# D: Valeur par default
+#
+#Parametres Orographiques et cdrags
+#**********************************
+##   Si=.T. ,  lecture du fichier limit avec la bonne annee 
+ok_limitvrai=n
+#Cdrags 
+f_cdrag_stable=1.
+f_cdrag_ter=1.
+f_cdrag_oce=0.7
+#cdmmax
+cdmmax=2.5E-3
+#cdhmax
+cdhmax=2.0E-3
+##  Orodr  ou  non   pour l orographie
+ok_orodr=y
+##  Orolf  ou  non   pour l orographie              
+ok_orolf=y
+#Rugoro
+f_rugoro=0.
+#
+# Rayonnement
+#*********************
+# activation du nouveau code de rayonnement RRTM
+# 0 : Ancien code et 1 : RRTM (D=0)
+iflag_rrtm=0
+#
+##  Activation ou non de la parametrisation de Hines pour la strato
+#******************************************************************
+ok_hines=y
+#
+# Parametres nuages
+#******************
+#seuils de la precipitation des nuages strateformes (D: 2.6e-4 2.6e-4)
+cld_lc_lsc=6.e-4
+cld_lc_con=6.e-4
+#constante de temps pour eleminer eau lsc et convective (D: 3600. 3600.)
+cld_tau_lsc=1800.
+cld_tau_con=1800.
+#facteurs correctifs sur la vitesse de chute des cristaux de glace (D: 1 1)
+ffallv_lsc=1.35
+ffallv_con=1.35
+#coefficient sur la reevaporation de la pluie (D: 2.e-5 n)
+coef_eva=1e-4
+reevap_ice=y
+#calcul des proprietes des nuages convectifs (D:1 0.375 1.e-4) 
+iflag_cldcon=6
+fact_cldcon=1.
+facttemps=0.
+#calcul eau condensee et fraction nuageuse a partir des PDF (D:0, 0:version avec ratqs sinon nouvelles PDFs)  
+iflag_pdf=1
+#calcul epaisseur optique et emmissivite des nuages (D: y 1 0.01 0.3)
+ok_newmicro=y
+iflag_ratqs=2
+ratqsbas=0.002
+ratqshaut=0.25
+#rayon effectif pour les nuages de glace (D:35)
+rad_froid=35
+#rayons effectifs pour les nuages eau liq (tailles des gouttes d eau nuageuse, D: 13 9)
+rad_chau1=12
+rad_chau2=11
+##  Choix ou non  de  New oliq               
+new_oliq=y
+#
+rei_min=20.
+rei_max=61.29
+#
+t_glace_min=258.
+t_glace_max=273.13
+#
+# Flags Convection 
+#*****************
+#flag  pour la convection (D:2, 1:LMD, 2:Tiedtke, 3:KE nouvelle physique, 30:KE IPCC)
+iflag_con=3
+#niveau de sorties des diagnos sur la conservation energie
+if_ebil=0
+#efficacite de precepitation maxim (D:.993)
+epmax=0.997
+#ajustement convectif sec au debut de la convection (D: n 0)
+ok_adj_ema=n
+iflag_clw=0
+#fermeture convective (D:1, 0:AR4, 2:ALE and ALP)
+iflag_clos=2
+#loi de melange a l entrainement  (D:1, 0:AR4=PDF plate, 1=PDF)
+iflag_mix=1
+#poids des PDFs plate et en cloche (D: 1 0)
+qqa1=1.
+qqa2=0.
+# Facteur multiplication des precip convectives dans KE
+cvl_corr=1.0
+#
+Fmax=0.65
+#
+# Flags Couche limite
+#********************
+#shema de CL des thermiques (D:0, 0:ajustement sec,=>1:versions thermiques) 
+iflag_thermals=15
+#pas de temps du spliting pour les thermiques
+nsplit_thermals=1
+tau_thermals=0.
+iflag_thermals_ed=10
+iflag_thermals_optflux=0
+#shema de la couche de surface (D:1, 1:LMD, 8:Mellor-Yamada) 
+iflag_pbl=8
+#diffusion turbulente
+ksta_ter=1.e-7
+ksta=1.e-10
+#ok_kzmin : calcul Kzmin dans la CL de surface
+ok_kzmin=y
+#couplage ou non avec la convection
+iflag_coupl=5 (0:AR4 et 1:nouvelle physique)
+seuil_inversion=-0.08
+#rendement sur la puissance fournie par les thermiques a la convection
+alp_bl_k=0.5
+#
+# Flags wakes
+#************
+#activation ou non des wakes (D:0, 0:AR4, 1:nouvelle physique) 
+iflag_wake=1
+alp_offset=0.
+
+nsplit_phys=2
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L59_NPv4.12
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L59_NPv4.12	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L59_NPv4.12	(revision 2504)
@@ -0,0 +1,146 @@
+##############################################################################
+# PARAMETRES ET CLES DE LA PHYSIQUE LMDZ
+##############################################################################
+# D: Valeur par default
+#
+#Parametres Orographiques et cdrags
+#**********************************
+##   Si=.T. ,  lecture du fichier limit avec la bonne annee 
+ok_limitvrai=n
+#Cdrags 
+f_cdrag_stable=1.
+f_cdrag_ter=1.
+f_cdrag_oce=0.7
+#cdmmax
+cdmmax=2.5E-3
+#cdhmax
+cdhmax=2.0E-3
+##  Orodr  ou  non   pour l orographie
+ok_orodr=y
+##  Orolf  ou  non   pour l orographie              
+ok_orolf=y
+#Rugoro
+f_rugoro=0.
+#
+# Rayonnement
+#*********************
+# activation du nouveau code de rayonnement RRTM
+# 0 : Ancien code et 1 : RRTM (D=0)
+iflag_rrtm=0
+#
+# Parametres nuages
+#******************
+#seuils de la precipitation des nuages strateformes (D: 2.6e-4 2.6e-4)
+cld_lc_lsc=0.000192
+cld_lc_con=0.000192
+#constante de temps pour eleminer eau lsc et convective (D: 3600. 3600.)
+cld_tau_lsc=1800.
+cld_tau_con=1800.
+#facteurs correctifs sur la vitesse de chute des cristaux de glace (D: 1 1)
+ffallv_lsc=0.9504
+ffallv_con=0.9504
+#coefficient sur la reevaporation de la pluie (D: 2.e-5 n)
+coef_eva=1e-5
+reevap_ice=y
+#calcul des proprietes des nuages convectifs (D:1 0.375 1.e-4) 
+iflag_cldcon=6
+fact_cldcon=1.
+facttemps=0.
+#calcul eau condensee et fraction nuageuse a partir des PDF (D:0, 0:version avec ratqs sinon nouvelles PDFs)  
+iflag_pdf=1
+#calcul epaisseur optique et emmissivite des nuages (D: y 1 0.01 0.3)
+ok_newmicro=y
+iflag_ratqs=4
+ratqsbas=0.002
+ratqshaut=0.24
+#rayon effectif pour les nuages de glace (D:35)
+rad_froid=35
+#rayons effectifs pour les nuages eau liq (tailles des gouttes d eau nuageuse, D: 13 9)
+rad_chau1=12
+rad_chau2=11
+##  Choix ou non  de  New oliq               
+new_oliq=y
+#
+rei_min=20.
+rei_max=61.29
+#
+#t_glace_min=258.
+#t_glace_max=273.13
+#
+# Flags Convection 
+#*****************
+#flag  pour la convection (D:2, 1:LMD, 2:Tiedtke, 3:KE nouvelle physique, 30:KE IPCC)
+iflag_con=3
+#niveau de sorties des diagnos sur la conservation energie
+if_ebil=0
+#efficacite de precepitation maxim (D:.993)
+epmax=0.97
+#ajustement convectif sec au debut de la convection (D: n 0)
+ok_adj_ema=n
+iflag_clw=0
+#fermeture convective (D:1, 0:AR4, 2:ALE and ALP)
+iflag_clos=2
+#loi de melange a l entrainement  (D:1, 0:AR4=PDF plate, 1=PDF)
+iflag_mix=1
+#poids des PDFs plate et en cloche (D: 1 0)
+qqa1=1.
+qqa2=0.
+# Facteur multiplication des precip convectives dans KE
+cvl_corr=1.0
+#
+Fmax=0.65
+#
+# Flags Couche limite
+#********************
+#shema de CL des thermiques (D:0, 0:ajustement sec,=>1:versions thermiques) 
+iflag_thermals=18
+#pas de temps du spliting pour les thermiques
+nsplit_thermals=1
+tau_thermals=0.
+iflag_thermals_ed=8
+iflag_thermals_optflux=0
+#shema de la couche de surface (D:1, 1:LMD, 8:Mellor-Yamada) 
+iflag_pbl=11
+#diffusion turbulente
+ksta_ter=1.e-7
+ksta=1.e-10
+#ok_kzmin : calcul Kzmin dans la CL de surface
+ok_kzmin=y
+#couplage ou non avec la convection
+iflag_coupl=5 (0:AR4 et 1:nouvelle physique)
+seuil_inversion=-0.08
+#rendement sur la puissance fournie par les thermiques a la convection
+alp_bl_k=0.5
+#
+iflag_fisrt_qsat=3
+iflag_thermals_closure=1
+#
+# Flags wakes
+#************
+#activation ou non des wakes (D:0, 0:AR4, 1:nouvelle physique) 
+iflag_wake=1
+alp_offset=0.
+
+### nrlmd le 10/04/2012: Declenchement ###
+#Déclelenchement par couche-limite (0: deterministe, 1: stochastique)
+iflag_trig_bl=2
+#Surface critique au LCL
+s_trig=1.2e7
+#Temps de decorrelation entre scenes de cumulus
+tau_trig_shallow=1200
+#Temps de decorrelation entre scenes de cumulonimbus
+tau_trig_deep=1200
+### fin nrlmd le 10/04/2012
+
+### nrlmd le 10/04/2012: Fermeture ###
+#Fermeture par couche-limite (0: deterministe, 1: statistique, 2: statistique+convergence grande échelle)
+iflag_clos_bl=1
+### fin nrlmd le 10/04/2012
+
+dsigmin=0.125
+
+t_glace_min=240.
+t_glace_max=273.13
+exposant_glace=1.7
+iflag_t_glace=1
+nsplit_phys=1
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L79_AP
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L79_AP	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/physiq.def_L79_AP	(revision 2504)
@@ -0,0 +1,97 @@
+## $Id$
+#
+##  Choix ou non  de  New oliq               
+new_oliq=y
+##  Activation ou non de la parametrisation de Hines pour la strato
+ok_hines=y
+##  Orodr  ou  non   pour l orographie              
+ok_orodr=y
+##  Orolf  ou  non   pour l orographie              
+ok_orolf=y
+##   Si = .T. ,  lecture du fichier limit avec la bonne annee             
+ok_limitvrai=n
+##  Flag  pour la convection : 1 pour LMD, 2 pour Tiedtke, 3 KE(nvlle version JYG), 30 KE(version IPCC AR4), 4 KE vect
+iflag_con=30
+## Facteur multiplication des precip convectives dans KE
+cvl_corr=1.0
+#
+#
+
+### niveau du diagnostique de conservation d energie
+if_ebil=0
+#
+# parametres KE
+#
+### epmax = Efficacite precipitation maximale
+epmax = .999
+### ok_adj_ema = ?? pas utilise
+ok_adj_ema = n
+### iflag_clw Flag calcul eau liquide
+# - iflag_clw=0 : qcond_incld(i,l) = em_qcondc(l)
+# - iflag_clw=1 : qcond_incld(i,l) = em_qcond(l)
+# - iflag_clw=2 : eau liquide diagnostique en fonction de la Precip
+iflag_clw = 1
+# 
+# parametres nuages
+#
+### cld_lc_lsc  contenu en eau liquide des nuages large-scale (fisrtilp) 
+cld_lc_lsc = 4.16e-4
+### cld_lc_con  contenu en eau liquide des nuages convectifs (fisrtilp) 
+cld_lc_con = 4.16e-4
+### cld_tau_lsc cte de temps utilisee pour eliminer l eau large-scale (fisrtilp) 
+cld_tau_lsc = 1800.
+### cld_tau_con cte de temps utilisee pour eliminer l eau convective (fisrtilp) 
+cld_tau_con = 1800.
+### ffallv_lsc  cte utilisee dans calcul vitesse de chute cristaux de glace large-scale (fisrtilp) 
+ffallv_lsc = 0.5
+### ffallv_lsc  cte utilisee dans calcul vitesse de chute cristaux de glace convectifs (fisrtilp) 
+ffallv_con = 0.5
+### coef_eva coef evaporation precips eau/glace (fisrtilp/fisrtilp_tr?/conlmd?)
+coef_eva = 2.e-5
+### reevap_ice  reevaporation de toute la precip dans la couche du dessous pour la glace (fisrtilp) 
+reevap_ice = y
+### iflag_cldcon  flag pour calculer ratqsc=F(ratqsbas,fact_cldcon,q_seri) (physiq) 
+# - iflag_cldcon<=-1 diag. rain_Tiedtke 
+# - iflag_cldcon=1, ratqsc=ratqsbas+fact_cldcon*(q_seri(1)-q_seri(k))/q_seri(k)
+# - iflag_cldcon=1/2, ratqs=max(ratqs,ratqsc)
+# - iflag_cldcon=3,   ratqs=ratqss
+iflag_cldcon = 3
+### iflag_pdf :  flag calcul distribution sous-maille de l eau et des nuages 
+# - iflag_pdf=0, version ratqs, 
+# - iflag_pdf=1, calcul eau condensee, fraction nuageuse, eau nuageuse a partir
+# -              des PDFS de Sandrine Bony 
+iflag_pdf = 1
+### fact_cldcon  constante calcul ratqsc (voir iflag_cldcon) et proprietes nuages convectifs, clwcon0 (physiq.F) 
+fact_cldcon = 1.
+### facttemps=   facteur de relaxation de ratqs (iflag_cldcon=1/2) et rnebcon (iflag_cldcon=3)
+facttemps = 0.
+## ok_newmicro   =y appel newmicro , =n appel nuage (calcul epaisseur optique et emmissivite des nuages) 
+ok_newmicro = y
+### iflag_ratqs=0 correspond a la version IPCC AR4 
+iflag_ratqs=0
+### ratqsbas     ratqs en bas si iflag_cldcon=1 
+ratqsbas = 0.005
+### ratqshaut    ratqs en haut pour ratqss "stables"  
+ratqshaut = 0.33
+### rad_froid    rayon cristaux des nuages de glace "froids" 
+rad_froid = 35
+### rad_chau1    rayon goutelettes d eau chauds", en haut: k=4-klev 
+rad_chau1=12
+### rad_chau2    rayon goutelettes d eau chauds", en bas: k=1-3  
+rad_chau2=11
+# 
+# Coefficient et parametres sur les drags
+#
+f_cdrag_ter=1.
+f_cdrag_stable=1.
+f_cdrag_oce=0.8
+f_rugoro=0.
+### ksta_ter      coef.diffusion minimale sur terre/sic/lic 
+ksta_ter=1.e-7
+### cdmmax =     cdrag maximum pour le moment
+cdmmax = 2.5E-3
+### cdhmax =     cdrag maximum pour l energie
+cdhmax = 2.0E-3
+
+### nsplit_phys (D=1) 
+nsplit_phys=1
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/run.def
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/run.def	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/run.def	(revision 2504)
@@ -0,0 +1,57 @@
+# $Id$
+#
+INCLUDEDEF=physiq.def
+INCLUDEDEF=gcm.def
+INCLUDEDEF=orchidee.def
+INCLUDEDEF=output.def
+INCLUDEDEF=config.def
+INCLUDEDEF=reprobus.def
+INCLUDEDEF=guide.def
+INCLUDEDEF=inca.def
+## Type de calendrier utilise
+## valeur possible: earth_360d (defaut), earth_365d, earth_366d
+calend= _AUTOBLOCKER_
+## Jour de l etat initial ( = 350  si 20 Decembre ,par expl. ,comme ici )
+dayref= _AUTOBLOCKER_
+##  Annee de l etat  initial (   avec  4  chiffres   )
+anneeref= _AUTOBLOCKER_
+## Nombre de jours d integration
+nday= _AUTOBLOCKER_
+## Remise a zero de la date initiale
+raz_date= _AUTOBLOCKER_
+## periode de sortie des variables de controle (en pas)
+iconser=240
+## periode d ecriture du fichier histoire (en jour)
+iecri=1
+## flag de sortie dynzon
+ok_dynzon=n
+## periode de stockage fichier dynzon (en jour)
+periodav= _AUTOBLOCKER_
+## activation du calcul d equilibrage de charge
+adjust= _AUTO_
+## activation du filtre fft
+use_filtre_fft=y
+## niveau d impression de controle
+prt_level=0
+###
+### Informations sur la configuration utilisee
+###
+### type_ocean = force / slab  /couple
+### type_ocean is modified automatically by the lmdz.driver 
+type_ocean=_AUTOBLOCKER_
+### version_ocean = nemo / opa8
+version_ocean=nemo
+### activation passage courants surface ocean-glace
+cpl_current=y
+### VEGET= y si ORCHIDEE, =n si bucket
+### VEGET is modified automatically by the lmdz.driver 
+VEGET=_AUTOBLOCKER_
+### Choice of tracers type_trac=lmdz/inca/repr
+### type_trac is set automatically by the lmdz.driver
+type_trac=_AUTOBLOCKER_
+### config_inca=aero/chem needed only if type_trac=inca
+config_inca=_AUTOBLOCKER_ 
+### Only concerning the program ce0l : for creating file grilles_gcm.nc
+grilles_gcm_netcdf=_AUTO_
+### To activate XIOS ouputs only
+ok_all_xml=y 
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/traceur.def
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/traceur.def	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/traceur.def	(revision 2504)
@@ -0,0 +1,4 @@
+3
+14 14 H2Ov
+10 10 H2Ol
+10 10 Aga
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/xmlio_server.def
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/xmlio_server.def	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/PARAM/xmlio_server.def	(revision 2504)
@@ -0,0 +1,18 @@
+! xmlio_server namelist
+!
+! using_server: .TRUE.(.FALSE.) to use(bypass) the io_server. AUTO : this variable is updated by the opa9.driver
+! using_oasis : .TRUE.(.FALSE.) if nemo is coupled through OASIS
+! client_id   : used only for OASIS, NEMO      id in the namecouple
+! server_id   : used only for OASIS, io_server id in the namecouple
+!
+&coupling_param
+  using_server = .FALSE.
+  using_oasis  = .TRUE.
+  client_id    = 'oceanx'
+  server_id    = 'ionemo'
+/
+
+! global_mpi_buffer_size: size in Mo of the MPI buffer used by the io_server
+&mpi_param
+  global_mpi_buffer_size = 512
+/
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim2.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim2.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim2.cfg	(revision 2504)
@@ -0,0 +1,50 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.1 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by '#' character
+#   - Separator between fields is '|' character
+#   - Operations must use the ferret syntax, if several files are used precise with the syntax d=x to refer to the x dataset
+#   - files patterns, operations,title,units must be enclosed with character '"'
+#   - fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=D4E3E6
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ iicethic_north  | "iicethic ice_pres"  | ORCA2.3_grid.nc | "(iicethic[d=1])" | "Ice thickness (NORTH)"      | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ iicethic_south  | "iicethic ice_pres"  | ORCA2.3_grid.nc | "(iicethic[d=1])" | "Ice thickness (SOUTH)"      | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_north  | "isnowthi ice_pres"  | ORCA2.3_grid.nc | "(isnowthi[d=1])" | "Snow thickness (NORTH)"     | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_south  | "isnowthi ice_pres"  | ORCA2.3_grid.nc | "(isnowthi[d=1])" | "Snow thickness (SOUTH)"     | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ icesurf_north   | "ice_pres"           | ORCA2.3_grid.nc | "(if lat[d=2] gt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (NORTH)"  | "m2" | "2"
+ icesurf_south   | "ice_pres"           | ORCA2.3_grid.nc | "(if lat[d=2] lt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (SOUTH)"  | "m2" | "2"
+ icevol_north    | "ice_pres iicethic"  | ORCA2.3_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (NORTH)"   | "m3" | "2"
+ icevol_south    | "ice_pres iicethic"  | ORCA2.3_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (SOUTH)"   | "m3" | "2"
+ snowvol_north   | "ice_pres isnowthi"  | ORCA2.3_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (NORTH)"  | "m3" | "2"
+ snowvol_south   | "ice_pres isnowthi"  | ORCA2.3_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (SOUTH)"  | "m3" | "2"
+#-----------------------------------------------------------------------------------------------------------------
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim2_ORCA1.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim2_ORCA1.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim2_ORCA1.cfg	(revision 2504)
@@ -0,0 +1,50 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.1 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by '#' character
+#   - Separator between fields is '|' character
+#   - Operations must use the ferret syntax, if several files are used precise with the syntax d=x to refer to the x dataset
+#   - files patterns, operations,title,units must be enclosed with character '"'
+#   - fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=D4E3E6
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ iicethic_north  | "iicethic ice_pres"  | ORCA1.0_grid.nc | "(iicethic[d=1])" | "Ice thickness (NORTH)"      | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ iicethic_south  | "iicethic ice_pres"  | ORCA1.0_grid.nc | "(iicethic[d=1])" | "Ice thickness (SOUTH)"      | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_north  | "isnowthi ice_pres"  | ORCA1.0_grid.nc | "(isnowthi[d=1])" | "Snow thickness (NORTH)"     | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_south  | "isnowthi ice_pres"  | ORCA1.0_grid.nc | "(isnowthi[d=1])" | "Snow thickness (SOUTH)"     | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ icesurf_north   | "ice_pres"           | ORCA1.0_grid.nc | "(if lat[d=2] gt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (NORTH)"  | "m2" | "2"
+ icesurf_south   | "ice_pres"           | ORCA1.0_grid.nc | "(if lat[d=2] lt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (SOUTH)"  | "m2" | "2"
+ icevol_north    | "ice_pres iicethic"  | ORCA1.0_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (NORTH)"   | "m3" | "2"
+ icevol_south    | "ice_pres iicethic"  | ORCA1.0_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (SOUTH)"   | "m3" | "2"
+ snowvol_north   | "ice_pres isnowthi"  | ORCA1.0_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (NORTH)"  | "m3" | "2"
+ snowvol_south   | "ice_pres isnowthi"  | ORCA1.0_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (SOUTH)"  | "m3" | "2"
+#-----------------------------------------------------------------------------------------------------------------
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim2_ORCA2.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim2_ORCA2.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim2_ORCA2.cfg	(revision 2504)
@@ -0,0 +1,50 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.1 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by '#' character
+#   - Separator between fields is '|' character
+#   - Operations must use the ferret syntax, if several files are used precise with the syntax d=x to refer to the x dataset
+#   - files patterns, operations,title,units must be enclosed with character '"'
+#   - fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=D4E3E6
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ iicethic_north  | "iicethic ice_pres"  | ORCA2.3_grid.nc | "(iicethic[d=1])" | "Ice thickness (NORTH)"      | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ iicethic_south  | "iicethic ice_pres"  | ORCA2.3_grid.nc | "(iicethic[d=1])" | "Ice thickness (SOUTH)"      | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_north  | "isnowthi ice_pres"  | ORCA2.3_grid.nc | "(isnowthi[d=1])" | "Snow thickness (NORTH)"     | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_south  | "isnowthi ice_pres"  | ORCA2.3_grid.nc | "(isnowthi[d=1])" | "Snow thickness (SOUTH)"     | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ icesurf_north   | "ice_pres"           | ORCA2.3_grid.nc | "(if lat[d=2] gt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (NORTH)"  | "m2" | "2"
+ icesurf_south   | "ice_pres"           | ORCA2.3_grid.nc | "(if lat[d=2] lt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (SOUTH)"  | "m2" | "2"
+ icevol_north    | "ice_pres iicethic"  | ORCA2.3_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (NORTH)"   | "m3" | "2"
+ icevol_south    | "ice_pres iicethic"  | ORCA2.3_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (SOUTH)"   | "m3" | "2"
+ snowvol_north   | "ice_pres isnowthi"  | ORCA2.3_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (NORTH)"  | "m3" | "2"
+ snowvol_south   | "ice_pres isnowthi"  | ORCA2.3_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (SOUTH)"  | "m3" | "2"
+#-----------------------------------------------------------------------------------------------------------------
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim3.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim3.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim3.cfg	(revision 2504)
@@ -0,0 +1,50 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.1 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by '#' character
+#   - Separator between fields is '|' character
+#   - Operations must use the ferret syntax, if several files are used precise with the syntax d=x to refer to the x dataset
+#   - files patterns, operations,title,units must be enclosed with character '"'
+#   - fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=D4E3E6
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ iicethic_north  | "iicethic ice_pres"  | ORCA2.3_grid.nc | "(iicethic[d=1])" | "Ice thickness (NORTH)"      | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ iicethic_south  | "iicethic ice_pres"  | ORCA2.3_grid.nc | "(iicethic[d=1])" | "Ice thickness (SOUTH)"      | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_north  | "isnowthi ice_pres"  | ORCA2.3_grid.nc | "(isnowthi[d=1])" | "Snow thickness (NORTH)"     | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_south  | "isnowthi ice_pres"  | ORCA2.3_grid.nc | "(isnowthi[d=1])" | "Snow thickness (SOUTH)"     | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ icesurf_north   | "ice_pres"           | ORCA2.3_grid.nc | "(if lat[d=2] gt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (NORTH)"  | "m2" | "2"
+ icesurf_south   | "ice_pres"           | ORCA2.3_grid.nc | "(if lat[d=2] lt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (SOUTH)"  | "m2" | "2"
+ icevol_north    | "ice_pres iicethic"  | ORCA2.3_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (NORTH)"   | "m3" | "2"
+ icevol_south    | "ice_pres iicethic"  | ORCA2.3_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (SOUTH)"   | "m3" | "2"
+ snowvol_north   | "ice_pres isnowthi"  | ORCA2.3_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (NORTH)"  | "m3" | "2"
+ snowvol_south   | "ice_pres isnowthi"  | ORCA2.3_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (SOUTH)"  | "m3" | "2"
+#-----------------------------------------------------------------------------------------------------------------
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim3_ORCA1.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim3_ORCA1.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim3_ORCA1.cfg	(revision 2504)
@@ -0,0 +1,50 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.1 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by '#' character
+#   - Separator between fields is '|' character
+#   - Operations must use the ferret syntax, if several files are used precise with the syntax d=x to refer to the x dataset
+#   - files patterns, operations,title,units must be enclosed with character '"'
+#   - fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=D4E3E6
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ iicethic_north  | "iicethic ice_pres"  | ORCA1.0_grid.nc | "(iicethic[d=1])" | "Ice thickness (NORTH)"      | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ iicethic_south  | "iicethic ice_pres"  | ORCA1.0_grid.nc | "(iicethic[d=1])" | "Ice thickness (SOUTH)"      | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_north  | "isnowthi ice_pres"  | ORCA1.0_grid.nc | "(isnowthi[d=1])" | "Snow thickness (NORTH)"     | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_south  | "isnowthi ice_pres"  | ORCA1.0_grid.nc | "(isnowthi[d=1])" | "Snow thickness (SOUTH)"     | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ icesurf_north   | "ice_pres"           | ORCA1.0_grid.nc | "(if lat[d=2] gt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (NORTH)"  | "m2" | "2"
+ icesurf_south   | "ice_pres"           | ORCA1.0_grid.nc | "(if lat[d=2] lt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (SOUTH)"  | "m2" | "2"
+ icevol_north    | "ice_pres iicethic"  | ORCA1.0_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (NORTH)"   | "m3" | "2"
+ icevol_south    | "ice_pres iicethic"  | ORCA1.0_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (SOUTH)"   | "m3" | "2"
+ snowvol_north   | "ice_pres isnowthi"  | ORCA1.0_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (NORTH)"  | "m3" | "2"
+ snowvol_south   | "ice_pres isnowthi"  | ORCA1.0_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (SOUTH)"  | "m3" | "2"
+#-----------------------------------------------------------------------------------------------------------------
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim3_ORCA2.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim3_ORCA2.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lim3_ORCA2.cfg	(revision 2504)
@@ -0,0 +1,50 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.1 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by '#' character
+#   - Separator between fields is '|' character
+#   - Operations must use the ferret syntax, if several files are used precise with the syntax d=x to refer to the x dataset
+#   - files patterns, operations,title,units must be enclosed with character '"'
+#   - fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=D4E3E6
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ iicethic_north  | "iicethic ice_pres"  | ORCA2.3_grid.nc | "(iicethic[d=1])" | "Ice thickness (NORTH)"      | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ iicethic_south  | "iicethic ice_pres"  | ORCA2.3_grid.nc | "(iicethic[d=1])" | "Ice thickness (SOUTH)"      | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_north  | "isnowthi ice_pres"  | ORCA2.3_grid.nc | "(isnowthi[d=1])" | "Snow thickness (NORTH)"     | "m" | "if lat[d=3] ge 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ isnowthi_south  | "isnowthi ice_pres"  | ORCA2.3_grid.nc | "(isnowthi[d=1])" | "Snow thickness (SOUTH)"     | "m" | "if lat[d=3] le 0 and ice_pres[d=2] ne 0 then ice_pres[d=2]*mask[k=1,d=3]*area[d=3]"
+ icesurf_north   | "ice_pres"           | ORCA2.3_grid.nc | "(if lat[d=2] gt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (NORTH)"  | "m2" | "2"
+ icesurf_south   | "ice_pres"           | ORCA2.3_grid.nc | "(if lat[d=2] lt 0 then ice_pres[d=1]*area[d=2]*mask[k=1,d=2])"               | "Ice surface (SOUTH)"  | "m2" | "2"
+ icevol_north    | "ice_pres iicethic"  | ORCA2.3_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (NORTH)"   | "m3" | "2"
+ icevol_south    | "ice_pres iicethic"  | ORCA2.3_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*iicethic[d=2]*area[d=3]*mask[k=1,d=3])" | "Ice volume (SOUTH)"   | "m3" | "2"
+ snowvol_north   | "ice_pres isnowthi"  | ORCA2.3_grid.nc | "(if lat[d=3] gt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (NORTH)"  | "m3" | "2"
+ snowvol_south   | "ice_pres isnowthi"  | ORCA2.3_grid.nc | "(if lat[d=3] lt 0 then ice_pres[d=1]*isnowthi[d=2]*area[d=3]*mask[k=1,d=3])" | "Snow volume (SOUTH)"  | "m3" | "2"
+#-----------------------------------------------------------------------------------------------------------------
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lmdz.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lmdz.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_lmdz.cfg	(revision 2504)
@@ -0,0 +1,72 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.2 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by # character.
+#   - Separator between fields is | character.
+#   - Operations must use the ferret syntax, if several files are used precise with the syntax d=x to refer to the x dataset.
+#     They must be enclosed by parenthesis if more than one variable is used.
+#   - files patterns,files additionnal,operations,title,units must be enclosed with character ". 
+#     Use "" if empty.
+#   - Fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=AECDFF
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ bils_global    | "bils"                       | "" | "bils[d=1]"               | "Surf. total heat flux (GLOBAL)"         | "W/m^2"     | "aire[d=1]"   
+ nettop_global  | "tops topl"                  | "" | "(tops[d=1]-topl[d=2])"   | "TOA. total heat flux (GLOBAL)"          | "W/m^2"     | "aire[d=1]"
+ nettop0_global | "tops0 topl0"                | "" | "(tops0[d=1]-topl0[d=2])" | "TOA. total heat flux ClearSky (GLOBAL)" | "W/m^2"     | "aire[d=1]"
+ t2m_global     | "t2m"                        | "" | "(t2m[d=1]-273.15)"       | "Temperature at 2 meters (GLOBAL)"       | "degrees C" | "aire[d=1]"
+ t2m_land       | "t2m pourc_ter pourc_lic"    | "" | "(t2m[d=1]-273.15)"       | "Temperature at 2 meters (LAND)"         | "degrees C" | "aire[d=1]*((pourc_ter[d=2]+pourc_lic[d=3])/100.)"
+ tsol_global    | "tsol"                       | "" | "(tsol[d=1]-273.15)"      | "Surface Temperature (GLOBAL)"           | "degrees C" | "aire[d=1]"
+ tsol_land      | "tsol pourc_ter pourc_lic"   | "" | "(tsol[d=1]-273.15)"      | "Surface Temperature (LAND)"             | "degrees C" | "aire[d=1]*((pourc_ter[d=2]+pourc_lic[d=3])/100.)"
+ precip_global  | "precip"                     | "" | "precip[d=1]*86400"       | "Precipitation Totale liq+sol (GLOBAL)"  | "mm/d"      | "aire[d=1]"
+ precip_land    | "precip pourc_ter pourc_lic" | "" | "precip[d=1]*86400"       | "Precipitation Totale liq+sol (LAND)"    | "mm/d"      | "aire[d=1]*((pourc_ter[d=2]+pourc_lic[d=3])/100.)"
+ evap_global    | "evap"                       | "" | "evap[d=1]"               | "Evaporation (GLOBAL)"                   | "kg/(s*m2)" | "aire[d=1]"
+ evap_land      | "evap pourc_ter pourc_lic"   | "" | "evap[d=1]"               | "Evaporation (LAND)"                     | "kg/(s*m2)" | "aire[d=1]*((pourc_ter[d=2]+pourc_lic[d=3])/100.)"
+ flat_global    | "lat_ter pourc_ter lat_sic pourc_sic lat_lic pourc_lic lat_oce pourc_oce" | "" | "(lat_ter[d=1]*pourc_ter[d=2]+lat_sic[d=3]*pourc_sic[d=4]+lat_lic[d=5]*pourc_lic[d=6]+lat_oce[d=7]*pourc_oce[d=8])" | "Latent Heat Flux (GLOBAL)"      | "W/m^2" | "aire[d=1]"
+ od550aer_forcing       | "od550aer"              | "" | "od550aer[d=1]"           | "Total aerosol optical depth at 550nm"   | "-"         | "aire[d=1]"   
+ od550lt1aer_forcing    | "od550lt1aer"           | "" | "od550lt1aer[d=1]"        | "Fine mode optical depth"                | "-"         | "aire[d=1]"   
+ absvisaer_forcing      | "absvisaer"             | "" | "absvisaer[d=1]"          | "Absorption aerosol visible optical depth" | "-"       | "aire[d=1]"   
+ topswai_forcing        | "topswai"               | "" | "topswai[d=1]"            | "AIE at TOA"                             | "W/m^2" | "aire[d=1]"
+ solswai_forcing        | "solswai"               | "" | "solswai[d=1]"            | "AIE at SRF"                             | "W/m^2" | "aire[d=1]"
+ topswad_forcing        | "topswad"               | "" | "topswad[d=1]"            | "ADE at TOA"                             | "W/m^2" | "aire[d=1]"
+ solswad_forcing        | "solswad"               | "" | "solswad[d=1]"            | "ADE at SRF"                             | "W/m^2" | "aire[d=1]" 
+ tro3_strato_forcing    | "tro3"                  | "" | "tro3[x=@din,y=@din,k=1:7@sum,d=1]"  | "ozone strato k=1:7@sum" | "Mole" | ""
+ tro3_tropo_forcing     | "tro3"                  | "" | "tro3[x=@din,y=@din,k=8:17@sum,d=1]" | "ozone trop k=8:17@sum"  | "Mole" | ""
+ solaire_forcing        | "solaire"               | "" | "solaire[d=1]"   | "Constante solaire"      | "W/m^2" | "1"
+ co2_ppm_forcing        | "co2_ppm"               | "" | "co2_ppm[d=1]"   | "Concentration du CO2"   | "ppm"   | "1"
+ CH4_ppb_forcing        | "CH4_ppb"               | "" | "CH4_ppb[d=1]"   | "Concentration du CH4"   | "ppb"   | "1"
+ N2O_ppb_forcing        | "N2O_ppb"               | "" | "N2O_ppb[d=1]"   | "Concentration du N2O"   | "ppb"   | "1"
+ CFC11_ppt_forcing      | "CFC11_ppt"             | "" | "CFC11_ppt[d=1]" | "Concentration du CFC11" | "ppt"   | "1"
+ CFC12_ppt_forcing      | "CFC12_ppt"             | "" | "CFC12_ppt[d=1]" | "Concentration du CFC12" | "ppt"   | "1"
+## R_ecc_forcing      | "R_ecc"                  | "" | "R_ecc[d=1]"   | "Excentricite"      | "-"     | "1"
+## R_peri_forcing     | "R_peri"                 | "" | "R_peri[d=1]"  | "Equinoxe"          | "-"     | "1"
+## R_incl_forcing     | "R_incl"                 | "" | "R_incl[d=1]"  | "Inclinaison"       | "deg"   | "1"
+#-----------------------------------------------------------------------------------------------------------------
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_opa9.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_opa9.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_opa9.cfg	(revision 2504)
@@ -0,0 +1,67 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.1 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by '#' character
+#   - Separator between fields is '|' character
+#   - Operations must use the ferret syntax
+#   - Each variable must be referenced to its dataset ie var[d=x]
+#   - files patterns, operations,title,units must be enclosed with character '"'
+#   - fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=6D80FF
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ sosstsst_global  | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])"                                    | "Sea Surface Temperature (GLOBAL)" | "degC"  | "mask[k=1,d=2]*area[d=2]"
+ sohtc300_global  | "sohtc300"  | ORCA2.3_grid.nc | "(sohtc300[d=1])"                                    | "Heat content 300 m (GLOBAL)"      | "W"     | "mask[k=1,d=2]*area[d=2]"
+ sosaline_global  | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])"                                    | "Sea Surface Salinity (GLOBAL)"    | "PSU"   | "mask[k=1,d=2]*area[d=2]"
+ sossheig_global  | "sossheig"  | ORCA2.3_grid.nc | "(sossheig[d=1])"                                    | "Sea Surface Heigh (GLOBAL)"       | "m"     | "mask[k=1,d=2]*area[d=2]"
+ sohefldo_global  | "sohefldo"  | ORCA2.3_grid.nc | "(sohefldo[d=1])"                                    | "Net Downward Heat Flux (GLOBAL)"  | "W/m^2" | "mask[k=1,d=2]*area[d=2]"
+ nadw_ocean       | "zomsfatl"  |       ""        | "(zomsfatl[z=500:6000@max,y=10:55@max,d=1])"         | "North Atlantic Deep Water"        | "Sv"    | "1"
+ npdw_ocean       | "zomsfpac"  |       ""        | "(zomsfpac[z=500:6000@max,y=10:55@max,d=1])"         | "North Pacific Deep Water"         | "Sv"    | "1"
+ aabw_ocean       | "zomsfglo"  |       ""        | "(zomsfglo[z=2000:6000@max,y=-50:60@max,d=1])"       | "Antarctic Bottom Water"           | "Sv"    | "1"
+ deacon_ocean     | "zomsfglo"  |       ""        | "(zomsfglo[z=2000:6000@max,y=-80:-30@max,d=1])"      | "Deacon Cell"                      | "Sv"    | "1"
+ somxl010_north   | "somxl010"  | ORCA2.3_grid.nc | "(somxl010[d=1])" | "Mixed layer depth (NORTH)"         | "m"     | "(if lat[d=2] gt 0 then mask[k=1,d=2]*area[d=2])"
+ somxl010_south   | "somxl010"  | ORCA2.3_grid.nc | "(somxl010[d=1])" | "Mixed layer depth (SOUTH)"         | "m"     | "(if lat[d=2] lt 0 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_70N_90N | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (70N-90N)" | "degC"  | "(if lat[d=2] ge  70                     then mask[k=1,d=2]*area[d=2])"
+ sosstsst_50N_70N | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (50N-70N)" | "degC"  | "(if lat[d=2] ge  50 and lat[d=2] le  70 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_30N_50N | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (30N-50N)" | "degC"  | "(if lat[d=2] ge  30 and lat[d=2] le  50 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_10N_30N | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (10N-30N)" | "degC"  | "(if lat[d=2] ge  10 and lat[d=2] le  30 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_10S_10N | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (10S-10N)" | "degC"  | "(if lat[d=2] ge -10 and lat[d=2] le  10 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_30S_10S | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (30S-10S)" | "degC"  | "(if lat[d=2] ge -30 and lat[d=2] le -10 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_50S_30S | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (50S-30S)" | "degC"  | "(if lat[d=2] ge -50 and lat[d=2] le -30 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_70S_50S | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (70S-50S)" | "degC"  | "(if                     lat[d=2] le -50 then mask[k=1,d=2]*area[d=2])"
+ sosaline_70N_90N | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (70N-90N)"    | "PSU"   | "(if lat[d=2] ge  70                     then mask[k=1,d=2]*area[d=2])"
+ sosaline_50N_70N | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (50N-70N)"    | "PSU"   | "(if lat[d=2] ge  50 and lat[d=2] le  70 then mask[k=1,d=2]*area[d=2])"
+ sosaline_30N_50N | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (30N-50N)"    | "PSU"   | "(if lat[d=2] ge  30 and lat[d=2] le  50 then mask[k=1,d=2]*area[d=2])"
+ sosaline_10N_30N | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (10N-30N)"    | "PSU"   | "(if lat[d=2] ge  10 and lat[d=2] le  30 then mask[k=1,d=2]*area[d=2])"
+ sosaline_10S_10N | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (10S-10N)"    | "PSU"   | "(if lat[d=2] ge -10 and lat[d=2] le  10 then mask[k=1,d=2]*area[d=2])"
+ sosaline_30S_10S | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (30S-10S)"    | "PSU"   | "(if lat[d=2] ge -30 and lat[d=2] le -10 then mask[k=1,d=2]*area[d=2])"
+ sosaline_50S_30S | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (50S-30S)"    | "PSU"   | "(if lat[d=2] ge -50 and lat[d=2] le -30 then mask[k=1,d=2]*area[d=2])"
+ sosaline_70S_50S | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (70S-50S)"    | "PSU"   | "(if                     lat[d=2] le -50 then mask[k=1,d=2]*area[d=2])"
+#-----------------------------------------------------------------------------------------------------------------
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_opa9_ORCA1.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_opa9_ORCA1.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_opa9_ORCA1.cfg	(revision 2504)
@@ -0,0 +1,62 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.1 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by '#' character
+#   - Separator between fields is '|' character
+#   - Operations must use the ferret syntax
+#   - Each variable must be referenced to its dataset ie var[d=x]
+#   - files patterns, operations,title,units must be enclosed with character '"'
+#   - fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=6D80FF
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ sosstsst_global  | "sosstsst"  | ORCA1.0_grid.nc | "(sosstsst[d=1])"                                    | "Sea Surface Temperature (GLOBAL)" | "degC"  | "mask[k=1,d=2]*area[d=2]"
+ sosaline_global  | "sosaline"  | ORCA1.0_grid.nc | "(sosaline[d=1])"                                    | "Sea Surface Salinity (GLOBAL)"    | "PSU"   | "mask[k=1,d=2]*area[d=2]"
+ sossheig_global  | "sossheig"  | ORCA1.0_grid.nc | "(sossheig[d=1])"                                    | "Sea Surface Heigh (GLOBAL)"       | "m"     | "mask[k=1,d=2]*area[d=2]"
+ sohefldo_global  | "sohefldo"  | ORCA1.0_grid.nc | "(sohefldo[d=1])"                                    | "Net Downward Heat Flux (GLOBAL)"  | "W/m^2" | "mask[k=1,d=2]*area[d=2]"
+ somxl010_north   | "somxl010"  | ORCA1.0_grid.nc | "(somxl010[d=1])" | "Mixed layer depth (NORTH)"         | "m"     | "(if lat[d=2] gt 0 then mask[k=1,d=2]*area[d=2])"
+ somxl010_south   | "somxl010"  | ORCA1.0_grid.nc | "(somxl010[d=1])" | "Mixed layer depth (SOUTH)"         | "m"     | "(if lat[d=2] lt 0 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_70N_90N | "sosstsst"  | ORCA1.0_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (70N-90N)" | "degC"  | "(if lat[d=2] ge  70                     then mask[k=1,d=2]*area[d=2])"
+ sosstsst_50N_70N | "sosstsst"  | ORCA1.0_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (50N-70N)" | "degC"  | "(if lat[d=2] ge  50 and lat[d=2] le  70 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_30N_50N | "sosstsst"  | ORCA1.0_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (30N-50N)" | "degC"  | "(if lat[d=2] ge  30 and lat[d=2] le  50 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_10N_30N | "sosstsst"  | ORCA1.0_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (10N-30N)" | "degC"  | "(if lat[d=2] ge  10 and lat[d=2] le  30 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_10S_10N | "sosstsst"  | ORCA1.0_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (10S-10N)" | "degC"  | "(if lat[d=2] ge -10 and lat[d=2] le  10 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_30S_10S | "sosstsst"  | ORCA1.0_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (30S-10S)" | "degC"  | "(if lat[d=2] ge -30 and lat[d=2] le -10 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_50S_30S | "sosstsst"  | ORCA1.0_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (50S-30S)" | "degC"  | "(if lat[d=2] ge -50 and lat[d=2] le -30 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_70S_50S | "sosstsst"  | ORCA1.0_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (70S-50S)" | "degC"  | "(if                     lat[d=2] le -50 then mask[k=1,d=2]*area[d=2])"
+ sosaline_70N_90N | "sosaline"  | ORCA1.0_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (70N-90N)"    | "PSU"   | "(if lat[d=2] ge  70                     then mask[k=1,d=2]*area[d=2])"
+ sosaline_50N_70N | "sosaline"  | ORCA1.0_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (50N-70N)"    | "PSU"   | "(if lat[d=2] ge  50 and lat[d=2] le  70 then mask[k=1,d=2]*area[d=2])"
+ sosaline_30N_50N | "sosaline"  | ORCA1.0_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (30N-50N)"    | "PSU"   | "(if lat[d=2] ge  30 and lat[d=2] le  50 then mask[k=1,d=2]*area[d=2])"
+ sosaline_10N_30N | "sosaline"  | ORCA1.0_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (10N-30N)"    | "PSU"   | "(if lat[d=2] ge  10 and lat[d=2] le  30 then mask[k=1,d=2]*area[d=2])"
+ sosaline_10S_10N | "sosaline"  | ORCA1.0_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (10S-10N)"    | "PSU"   | "(if lat[d=2] ge -10 and lat[d=2] le  10 then mask[k=1,d=2]*area[d=2])"
+ sosaline_30S_10S | "sosaline"  | ORCA1.0_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (30S-10S)"    | "PSU"   | "(if lat[d=2] ge -30 and lat[d=2] le -10 then mask[k=1,d=2]*area[d=2])"
+ sosaline_50S_30S | "sosaline"  | ORCA1.0_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (50S-30S)"    | "PSU"   | "(if lat[d=2] ge -50 and lat[d=2] le -30 then mask[k=1,d=2]*area[d=2])"
+ sosaline_70S_50S | "sosaline"  | ORCA1.0_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (70S-50S)"    | "PSU"   | "(if                     lat[d=2] le -50 then mask[k=1,d=2]*area[d=2])"
+#-----------------------------------------------------------------------------------------------------------------
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_opa9_ORCA2.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_opa9_ORCA2.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_opa9_ORCA2.cfg	(revision 2504)
@@ -0,0 +1,62 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.1 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by '#' character
+#   - Separator between fields is '|' character
+#   - Operations must use the ferret syntax
+#   - Each variable must be referenced to its dataset ie var[d=x]
+#   - files patterns, operations,title,units must be enclosed with character '"'
+#   - fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=6D80FF
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ sosstsst_global  | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])"                                    | "Sea Surface Temperature (GLOBAL)" | "degC"  | "mask[k=1,d=2]*area[d=2]"
+ sosaline_global  | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])"                                    | "Sea Surface Salinity (GLOBAL)"    | "PSU"   | "mask[k=1,d=2]*area[d=2]"
+ sossheig_global  | "sossheig"  | ORCA2.3_grid.nc | "(sossheig[d=1])"                                    | "Sea Surface Heigh (GLOBAL)"       | "m"     | "mask[k=1,d=2]*area[d=2]"
+ sohefldo_global  | "sohefldo"  | ORCA2.3_grid.nc | "(sohefldo[d=1])"                                    | "Net Downward Heat Flux (GLOBAL)"  | "W/m^2" | "mask[k=1,d=2]*area[d=2]"
+ somxl010_north   | "somxl010"  | ORCA2.3_grid.nc | "(somxl010[d=1])" | "Mixed layer depth (NORTH)"         | "m"     | "(if lat[d=2] gt 0 then mask[k=1,d=2]*area[d=2])"
+ somxl010_south   | "somxl010"  | ORCA2.3_grid.nc | "(somxl010[d=1])" | "Mixed layer depth (SOUTH)"         | "m"     | "(if lat[d=2] lt 0 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_70N_90N | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (70N-90N)" | "degC"  | "(if lat[d=2] ge  70                     then mask[k=1,d=2]*area[d=2])"
+ sosstsst_50N_70N | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (50N-70N)" | "degC"  | "(if lat[d=2] ge  50 and lat[d=2] le  70 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_30N_50N | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (30N-50N)" | "degC"  | "(if lat[d=2] ge  30 and lat[d=2] le  50 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_10N_30N | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (10N-30N)" | "degC"  | "(if lat[d=2] ge  10 and lat[d=2] le  30 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_10S_10N | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (10S-10N)" | "degC"  | "(if lat[d=2] ge -10 and lat[d=2] le  10 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_30S_10S | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (30S-10S)" | "degC"  | "(if lat[d=2] ge -30 and lat[d=2] le -10 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_50S_30S | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (50S-30S)" | "degC"  | "(if lat[d=2] ge -50 and lat[d=2] le -30 then mask[k=1,d=2]*area[d=2])"
+ sosstsst_70S_50S | "sosstsst"  | ORCA2.3_grid.nc | "(sosstsst[d=1])" | "Sea Surface Temperature (70S-50S)" | "degC"  | "(if                     lat[d=2] le -50 then mask[k=1,d=2]*area[d=2])"
+ sosaline_70N_90N | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (70N-90N)"    | "PSU"   | "(if lat[d=2] ge  70                     then mask[k=1,d=2]*area[d=2])"
+ sosaline_50N_70N | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (50N-70N)"    | "PSU"   | "(if lat[d=2] ge  50 and lat[d=2] le  70 then mask[k=1,d=2]*area[d=2])"
+ sosaline_30N_50N | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (30N-50N)"    | "PSU"   | "(if lat[d=2] ge  30 and lat[d=2] le  50 then mask[k=1,d=2]*area[d=2])"
+ sosaline_10N_30N | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (10N-30N)"    | "PSU"   | "(if lat[d=2] ge  10 and lat[d=2] le  30 then mask[k=1,d=2]*area[d=2])"
+ sosaline_10S_10N | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (10S-10N)"    | "PSU"   | "(if lat[d=2] ge -10 and lat[d=2] le  10 then mask[k=1,d=2]*area[d=2])"
+ sosaline_30S_10S | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (30S-10S)"    | "PSU"   | "(if lat[d=2] ge -30 and lat[d=2] le -10 then mask[k=1,d=2]*area[d=2])"
+ sosaline_50S_30S | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (50S-30S)"    | "PSU"   | "(if lat[d=2] ge -50 and lat[d=2] le -30 then mask[k=1,d=2]*area[d=2])"
+ sosaline_70S_50S | "sosaline"  | ORCA2.3_grid.nc | "(sosaline[d=1])" | "Sea Surface Salinity (70S-50S)"    | "PSU"   | "(if                     lat[d=2] le -50 then mask[k=1,d=2]*area[d=2])"
+#-----------------------------------------------------------------------------------------------------------------
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_orchidee.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_orchidee.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_orchidee.cfg	(revision 2504)
@@ -0,0 +1,48 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.2 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by # character.
+#   - Separator between fields is | character.
+#   - Operations must use the ferret syntax, if several files are used precise with the syntax d=x to refer to the x dataset.
+#     They must be enclosed by parenthesis if more than one variable is used.
+#   - files patterns,files additionnal,operations,title,units must be enclosed with character ". 
+#     Use "" if empty.
+#   - Fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=E7FFAB
+smooth=12
+#------------------------------------------------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#------------------------------------------------------------------------------------------------------------------------------------------------------
+temp_sol_lands | "temp_sol"         |  ""              | "temp_sol[d=1]"                    | "TSOL (LANDS)"                 | "K/d"    | "Areas[d=1]*Contfrac[d=1]"
+humidity_lands | "bqsb gqsb"        |  ""              | "(bqsb[d=1]+gqsb[d=2])"            | "Total Soil Moisture  (LANDS)" | "1"      | "Areas[d=1]*Contfrac[d=1]"
+albedo_lands   | "alb_vis alb_nir"  |  ""              | "((alb_vis[d=1]+alb_nir[d=2])*0.5)"| "Mean Albedo (LANDS)"          | "1"      | "Areas[d=1]*Contfrac[d=1]"
+snow_lands     | "snow"             |  ""              | "snow[d=1]"                        | "Snow Mass (LANDS)"            | "kg/m^2" | "Areas[d=1]*Contfrac[d=1]"
+maxveget_lands | "maxvegetfrac"     |  ""              | "maxvegetfrac[d=1,K=12:13]"        | "vegetmax[pft=12,13] (LANDS)"  | "1"      | "2"
+nee_lands      | "nee maxvegetfrac" |  ""              | "(nee[d=1]*365*86400*maxvegetfrac[d=2]*Areas[d=1]*Contfrac[d=1]/1e15)"  | "Net Ecosystem Exchange"    | "PgC/yr" | "2"
+maxveget_forcing | "maxvegetfrac"   |  ""              | "((maxvegetfrac[d=1,K=12]+maxvegetfrac[d=1,K=13])*Areas[d=1]*Contfrac[d=1]/1e12)" | "maxveget surface[pft=12,13] "  | "Mkm^2"  | "2"
+#------------------------------------------------------------------------------------------------------------------------------------------------------
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_pisces_ORCA1.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_pisces_ORCA1.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_pisces_ORCA1.cfg	(revision 2504)
@@ -0,0 +1,48 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2011/09/12 12:17:53 $
+# $Name: ATLAS_672_1_1 $
+# $Revision: 1.1.1.1 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by # character.
+#   - Separator between fields is | character.
+#   - Operations must use the ferret syntax, if several files are used precise with the syntax d=x to refer to the x dataset.
+#     They must be enclosed by parenthesis if more than one variable is used.
+#   - files patterns,files additionnal,operations,title,units must be enclosed with character ". 
+#     Use "" if empty.
+#   - Fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=D0F8E0
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ no3_global  | "NO3"      | "ORCA1.0_grid.nc" | "(NO3[k=1,d=1])"                   | "Nitrate Conc. at surf. (GLOBAL)"      | "mmol/m3"    | "mask[k=1,d=2]*area[d=2]"
+ dic_global  | "DIC"      | "ORCA1.0_grid.nc" | "(DIC[k=1,d=1])"                   | "DIC conc. at surf. (GLOBAL)"          | "mmol/m3"    | "mask[k=1,d=2]*area[d=2]"
+ alk_global  | "Alkalini" | "ORCA1.0_grid.nc" | "(Alkalini[k=1,d=1])"              | "Alkalinity conc. at surf. (GLOBAL)"   | "mmol/m3"    | "mask[k=1,d=2]*area[d=2]"
+ o2_global   | "O2"       | "ORCA1.0_grid.nc" | "(O2[k=1,d=1])"                    | "Oxygen Conc. at surf. (GLOBAL)"       | "mmol/m3"    | "mask[k=1,d=2]*area[d=2]"
+ si_global   | "Si"       | "ORCA1.0_grid.nc" | "(Si[k=1,d=1])"                    | "Silicate Conc. at surf. (GLOBAL)"     | "mmol/m3"    | "mask[k=1,d=2]*area[d=2]"
+ cflx_global | "Cflx"     | "ORCA1.0_grid.nc" | "(Cflx[d=1]*3600*24*365*12)"       | "Ocean carbon flux (GLOBAL)"           | "gC/m2/yr"   | "mask[k=1,d=2]*area[d=2]"
+ epc_global  | "EPC100"   | "ORCA1.0_grid.nc" | "(EPC100[d=1]*3600*24*365*12)"     | "Carbon export at 100m (GLOBAL)"       | "gC/m2/yr"   | "mask[k=1,d=2]*area[d=2]"
+#-----------------------------------------------------------------------------------------------------------------
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_pisces_ORCA2.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_pisces_ORCA2.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_pisces_ORCA2.cfg	(revision 2504)
@@ -0,0 +1,48 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2011/09/12 12:17:53 $
+# $Name: ATLAS_672_1_1 $
+# $Revision: 1.1.1.1 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by # character.
+#   - Separator between fields is | character.
+#   - Operations must use the ferret syntax, if several files are used precise with the syntax d=x to refer to the x dataset.
+#     They must be enclosed by parenthesis if more than one variable is used.
+#   - files patterns,files additionnal,operations,title,units must be enclosed with character ". 
+#     Use "" if empty.
+#   - Fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=D0F8E0
+smooth=12
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+ no3_global  | "NO3"      | "ORCA2.3_grid.nc" | "(NO3[k=1,d=1])"                   | "Nitrate Conc. at surf. (GLOBAL)"      | "mmol/m3"    | "mask[k=1,d=2]*area[d=2]"
+ dic_global  | "DIC"      | "ORCA2.3_grid.nc" | "(DIC[k=1,d=1])"                   | "DIC conc. at surf. (GLOBAL)"          | "mmol/m3"    | "mask[k=1,d=2]*area[d=2]"
+ alk_global  | "Alkalini" | "ORCA2.3_grid.nc" | "(Alkalini[k=1,d=1])"              | "Alkalinity conc. at surf. (GLOBAL)"   | "mmol/m3"    | "mask[k=1,d=2]*area[d=2]"
+ o2_global   | "O2"       | "ORCA2.3_grid.nc" | "(O2[k=1,d=1])"                    | "Oxygen Conc. at surf. (GLOBAL)"       | "mmol/m3"    | "mask[k=1,d=2]*area[d=2]"
+ si_global   | "Si"       | "ORCA2.3_grid.nc" | "(Si[k=1,d=1])"                    | "Silicate Conc. at surf. (GLOBAL)"     | "mmol/m3"    | "mask[k=1,d=2]*area[d=2]"
+ cflx_global | "Cflx"     | "ORCA2.3_grid.nc" | "(Cflx[d=1]*3600*24*365*12)"       | "Ocean carbon flux (GLOBAL)"           | "gC/m2/yr"   | "mask[k=1,d=2]*area[d=2]"
+ epc_global  | "EPC100"   | "ORCA2.3_grid.nc" | "(EPC100[d=1]*3600*24*365*12)"     | "Carbon export at 100m (GLOBAL)"       | "gC/m2/yr"   | "mask[k=1,d=2]*area[d=2]"
+#-----------------------------------------------------------------------------------------------------------------
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_stomate.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_stomate.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/GENERAL/POST/monitoring01_stomate.cfg	(revision 2504)
@@ -0,0 +1,51 @@
+#**************************************************************
+# Author: Patrick Brockmann
+# Contact: Patrick.Brockmann@cea.fr
+# $Date: 2009/05/14 15:09:35 $
+# $Name: ATLAS_608_1_5 $
+# $Revision: 1.1.1.2 $
+# History:
+# Modification:
+#**************************************************************
+
+##################################################################################################################
+#-----------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#-----------------------------------------------------------------------------------------------------------------
+#
+#   field = name of the field to monitore 
+#   files patterns = pattern of the files used to monitore the field (must be discriminant) 
+#   files additionnal = additionnal files accessible by $FER_DATA
+#   operations = operations to calculate the field 
+#   title = variable title
+#   units = variable units
+#   calcul of area = expression to use for the weight average
+#
+# Notes:
+#   - Comment lines begin by # character.
+#   - Separator between fields is | character.
+#   - Operations must use the ferret syntax, if several files are used precise with the syntax d=x to refer to the x dataset.
+#     They must be enclosed by parenthesis if more than one variable is used.
+#   - files patterns,files additionnal,operations,title,units must be enclosed with character ". 
+#     Use "" if empty.
+#   - Fields will be presented through an html page with thumbnails global, north, south, land, ocean.
+#     Use a field name with one of these pattern to display it under the corresponding thumbnail.
+#
+##################################################################################################################
+
+color=EEE8AA
+smooth=12
+#------------------------------------------------------------------------------------------------------------------------------------------------------
+#  field | files patterns | files additionnal | operations | title | units | calcul of area
+#------------------------------------------------------------------------------------------------------------------------------------------------------
+fLuc_fHarvest_lands | "CONVFLUX CFLUX_PROD10 CFLUX_PROD100 HARVEST_ABOVE CONTFRAC"  | "" | "((CONVFLUX[d=1]+CFLUX_PROD10[d=2]+CFLUX_PROD100[d=3]+HARVEST_ABOVE[d=4])*AREAS[d=1]*CONTFRAC[d=5]*365/1e15)"                           | "CO2 flux from Land Use Change and Crop Harvesting"            | "PgC/yr" | "2"
+fHarvest_lands      | "HARVEST_ABOVE CONTFRAC"             | "" | "((HARVEST_ABOVE[d=1])*AREAS[d=1]*CONTFRAC[d=2]*365/1e15)"                           | "CO2 flux from Land Use Change and Crop Harvesting"            | "PgC/yr" | "2"
+nbp_lands           | "nbp"                                | "" | "(nbp[d=1]*Areas[d=1]*86400*365/1e12)"             | "Net Biospheric Production"       | "PgC/yr" | "2"
+cSoil_lands         | "TOTAL_SOIL_CARB VEGET_MAX CONTFRAC" | "" | "(TOTAL_SOIL_CARB[d=1]*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"     | "Carbon Soil in Pool"                                   | "PgC"    | "2"
+cVeg_lands          | "TOTAL_M VEGET_MAX CONTFRAC"         | "" | "(TOTAL_M[d=1]*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"             | "Carbon in vegetation"                                       | "PgC"    | "2"
+npp_lands           | "NPP VEGET_MAX CONTFRAC"             | "" | "(NPP[d=1]*365*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"             | "Net Primary Production"                                  | "PgC/yr" | "2"
+rh_lands            | "HET_RESP VEGET_MAX CONTFRAC"        | "" | "(HET_RESP[d=1]*365*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"        | "Heterotrophic Respiration"                                     | "PgC/yr" | "2"
+fFire_lands         | "CO2_FIRE VEGET_MAX CONTFRAC"        | "" | "(CO2_FIRE[d=1]*365*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"        | "CO2 emission from fire"                                     | "PgC/yr" | "2"
+#------------------------------------------------------------------------------------------------------------------------------------------------------
+
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/README
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/README	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/README	(revision 2504)
@@ -0,0 +1,13 @@
+How to create a job and run directory :
+
+Choose in EXPERIMENTS the experiment to be done and copy the corresponding config.card to modipsl/config/IPSLCM5_v5/, beside this README file. Modify the config.card as usual, for at least the JobName. Apply ../../util/ins_job and the creation of a new run directory will be done :
+  - the run directory will be created with the same name as JobName in config.card. If a directory with the same name already exists, nothing will be done.
+  - the PARAM, DRIVER and POST directories from GENERAL/ will be copied into the new run directory.
+  - the COMP directory from EXPERIMENTS/ will be copied into the new run directory, according to the variable ExpType in config.card.
+  - the config.card will be moved into the run directory.
+  - a job will be created in the run directory.
+
+Once the run directory has been created with ins_job, this directory is used as a normal run directory. More run directories can be created using ins_job several times. ins_job will never write in an existing run directory.
+
+
+For details see http://forge.ipsl.jussieu.fr/igcmg/wiki/Modipsl_exec
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/arch-X64_ADA.fcm
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/arch-X64_ADA.fcm	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/arch-X64_ADA.fcm	(revision 2504)
@@ -0,0 +1,52 @@
+# ADA IBM at IDRIS, http://www.idris.fr/eng/ada/
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%XIOS_HOME           ${PWD}/../../XIOS
+%OASIS_HOME          ${PWD}/../../../oasis3-mct/BLD
+
+%NCDF_INC            -I/smplocal/pub/NetCDF/4.1.3/mpi/include
+%NCDF_LIB            -L/smplocal/pub/NetCDF/4.1.3/mpi/lib -lnetcdff -lnetcdf -lnetcdf_c++ -L/smplocal/pub/HDF5/1.8.9/par/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -Bdynamic -lz -Wl,-rpath=/smplocal/pub/NetCDF/4.1.3/mpi/lib:/smplocal/pub/HDF5/1.8.9/par/lib
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           -I%OASIS_HOME/build/lib/psmile.MPI1 
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lscrip -lmct -lmpeu
+
+%FC                  mpiifort -c -cpp
+# for Ada
+%FCFLAGS             -DCPP_PARA -i4 -r8 -O3
+%FFLAGS              %FCFLAGS
+%LD                  mpiifort
+%LDFLAGS             -lstdc++
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/arch-X64_CURIE.fcm
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/arch-X64_CURIE.fcm	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/arch-X64_CURIE.fcm	(revision 2504)
@@ -0,0 +1,56 @@
+# Curie BULL at TGCC, http://www-hpc.cea.fr/en/complexe/tgcc-curie.htm
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%XIOS_HOME           ${PWD}/../../XIOS
+%OASIS_HOME          ${PWD}/../../../oasis3-mct/BLD
+
+%NCDF_INC            -I${NETCDF_INC_DIR} 
+%NCDF_LIB            -L${NETCDF_LIB_DIR} -lnetcdff -lnetcdf 
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           -I%OASIS_HOME/build/lib/psmile.MPI1 
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lscrip -lmct -lmpeu
+
+%FC                  mpif90 -c -cpp
+# for Curie Fat Node
+#%FCFLAGS             -i4 -r8 -O3 -fp-model precise -xSSE4.2 
+# for Curie Thin Node
+#%FCFLAGS             -i4 -r8 -O3 -fp-model precise -xAVX
+# for Curie all Node
+%FCFLAGS             -i4 -r8 -O3 -fp-model precise
+%FFLAGS              %FCFLAGS
+%LD                  mpif90
+%LDFLAGS             -lstdc++
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/bld.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/bld.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/bld.cfg	(revision 2504)
@@ -0,0 +1,72 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+
+search_src           1
+
+src::ioipsl               $MAIN_DIR/EXTERNAL/IOIPSL/src
+src::agrif                $MAIN_DIR/EXTERNAL/AGRIF/AGRIF_FILES
+src::nemo                 $CONFIG_DIR/$NEW_CONF/OPAFILES/obj
+
+bld::target  nemo.exe
+bld::exe_dep
+
+
+dir::root            $NEMO_TDIR/$NEW_CONF/BLD
+
+
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::fflags::agrif   %FFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Pre-process code before analysing dependencies
+bld::pp::ioipsl   1
+bld::pp::nemo     1
+bld::pp::agrif    1
+bld::tool::fppflags::nemo      %FPPFLAGS -I$CONFIG_DIR/$NEW_CONF/OPAFILES/inc
+bld::tool::fppflags::ioipsl    %FPPFLAGS
+bld::tool::fppflags::agrif     %FPPFLAGS
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        use::xios
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_prism_proto
+bld::excl_dep        use::mod_prism_def_partition_proto
+bld::excl_dep        use::mod_prism_get_comm
+bld::excl_dep        use::mod_prism_get_proto
+bld::excl_dep        use::mod_prism_put_proto
+bld::excl_dep        use::mod_comprism_proto
+bld::excl_dep        use::mod_prism
+bld::excl_dep        use::mkl_dfti
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+bld::infile_ext::f90  FPP::FPP9X::SOURCE
+
+# extension for module output
+bld::outfile_ext::mod .mod
+
+# rename executable to nemo.exe
+bld::exe_name::model  nemo.exe
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/bld_preproagr.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/bld_preproagr.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/bld_preproagr.cfg	(revision 2504)
@@ -0,0 +1,86 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+search_src           1
+
+src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK
+
+bld::target  lib_cray.f90 nemo.f90 agrif_user.f90 agrif2model.f90 
+
+dir::root            $NEMO_TDIR/$NEW_CONF/OPAFILES
+
+bld::tool::fc_output
+bld::tool::fc_compile
+bld::tool::fc_include
+bld::tool::fc        $COMPIL_DIR/agrifpp.sh 
+bld::tool::fflags    
+bld::tool::ld       
+bld::tool::ldflags   
+bld::tool::ar        
+bld::tool::arflags   
+bld::tool::make      %MK
+
+OUTFILE_EXT::obj   .f90
+
+# Pre-process code before analysing dependencies
+bld::pp::nemo     1
+bld::pp::nemo/agrif2model     0
+bld::tool::fpp       cpp
+bld::tool::fppflags::nemo  %FPPFLAGS
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_prism_proto
+bld::excl_dep        use::mod_prism_def_partition_proto
+bld::excl_dep        use::mod_prism_get_comm
+bld::excl_dep        use::mod_prism_get_proto
+bld::excl_dep        use::mod_prism_put_proto
+bld::excl_dep        use::mod_comprism_proto
+bld::excl_dep        use::mod_prism
+bld::excl_dep        use::mkl_dfti
+bld::excl_dep	     use::nc4interface
+bld::excl_dep	     use::ioipsl
+bld::excl_dep	     use::xios
+bld::excl_dep	     use::agrif_types
+bld::excl_dep	     use::agrif_util
+bld::excl_dep        inc::SetNumberofcells.h
+bld::excl_dep        inc::GetNumberofcells.h
+bld::excl_dep        inc::include_use_Alloc_agrif.h
+bld::excl_dep        inc::allocations_calls_agrif.h
+bld::excl_dep        inc::modtype_agrif.h
+bld::excl_dep        inc::probdim_agrif.h
+bld::excl_dep        inc::keys_agrif.h
+bld::excl_dep        h::SetNumberofcells.h
+bld::excl_dep        h::GetNumberofcells.h
+bld::excl_dep        h::include_use_Alloc_agrif.h
+bld::excl_dep        h::allocations_calls_agrif.h
+bld::excl_dep        h::modtype_agrif.h
+bld::excl_dep        h::probdim_agrif.h
+bld::excl_dep        h::keys_agrif.h
+bld::excl_dep        use::mod_attribut
+bld::excl_dep        use::mod_event_client
+bld::excl_dep        use::mod_ioclient
+#bld::excl_dep        OBJ
+
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" and ".f90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+bld::infile_ext::f90  FPP::FPP9X::SOURCE
+bld::src_type::nemo/agrif2model.F90 FORTRAN::FORTRAN9X::SOURCE
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/bldxag.cfg
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/bldxag.cfg	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/bldxag.cfg	(revision 2504)
@@ -0,0 +1,68 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+
+search_src           1
+
+src::ioipsl               $MAIN_DIR/EXTERNAL/IOIPSL/src
+src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK
+
+bld::target nemo.exe
+bld::exe_dep
+
+
+dir::root            $NEMO_TDIR/$NEW_CONF/BLD
+
+
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Pre-process code before analysing dependencies
+bld::pp::ioipsl   1
+bld::pp::nemo     1
+bld::tool::fppflags::nemo     %FPPFLAGS
+bld::tool::fppflags::ioipsl   %FPPFLAGS
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        use::xios
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_prism_proto
+bld::excl_dep        use::mod_prism_def_partition_proto
+bld::excl_dep        use::mod_prism_get_comm
+bld::excl_dep        use::mod_prism_get_proto
+bld::excl_dep        use::mod_prism_put_proto
+bld::excl_dep        use::mod_comprism_proto
+bld::excl_dep        use::mod_prism
+bld::excl_dep        use::mkl_dfti
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+
+# extension for module output
+bld::outfile_ext::mod .mod
+
+# rename executable to nemo.exe
+bld::exe_name::model  nemo.exe
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/closea.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/closea.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/closea.F90	(revision 2504)
@@ -0,0 +1,478 @@
+MODULE closea
+   !!======================================================================
+   !!                       ***  MODULE  closea  ***
+   !! Closed Seas  : specific treatments associated with closed seas
+   !!======================================================================
+   !! History :   8.2  !  00-05  (O. Marti)  Original code
+   !!             8.5  !  02-06  (E. Durand, G. Madec)  F90
+   !!             9.0  !  06-07  (G. Madec)  add clo_rnf, clo_ups, clo_bat
+   !!        NEMO 3.4  !  03-12  (P.G. Fogli) sbc_clo bug fix & mpp reproducibility
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   dom_clo    : modification of the ocean domain for closed seas cases
+   !!   sbc_clo    : Special handling of closed seas
+   !!   clo_rnf    : set close sea outflows as river mouths (see sbcrnf)
+   !!   clo_ups    : set mixed centered/upstream scheme in closed sea (see traadv_cen2)
+   !!   clo_bat    : set to zero a field over closed sea (see domzrg)
+   !!----------------------------------------------------------------------
+   USE oce             ! dynamics and tracers
+   USE dom_oce         ! ocean space and time domain
+   USE phycst          ! physical constants
+   USE in_out_manager  ! I/O manager
+   !USE iom             ! I/O manager library
+   USE sbc_oce         ! ocean surface boundary conditions
+   USE lib_fortran,    ONLY: glob_sum, DDPDD
+   USE lbclnk          ! lateral boundary condition - MPP exchanges
+   USE lib_mpp         ! MPP library
+   USE timing
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC dom_clo      ! routine called by domain module
+   PUBLIC sbc_clo      ! routine called by step module
+   PUBLIC clo_rnf      ! routine called by sbcrnf module
+   PUBLIC clo_ups      ! routine called in traadv_cen2(_jki) module
+   PUBLIC clo_bat      ! routine called in domzgr module
+
+   INTEGER, PUBLIC, PARAMETER          ::   jpncs   = 4      !: number of closed sea
+   INTEGER, PUBLIC, DIMENSION(jpncs)   ::   ncstt            !: Type of closed sea
+   INTEGER, PUBLIC, DIMENSION(jpncs)   ::   ncsi1, ncsj1     !: south-west closed sea limits (i,j)
+   INTEGER, PUBLIC, DIMENSION(jpncs)   ::   ncsi2, ncsj2     !: north-east closed sea limits (i,j)
+   INTEGER, PUBLIC, DIMENSION(jpncs)   ::   ncsnr            !: number of point where run-off pours
+   INTEGER, PUBLIC, DIMENSION(jpncs,4) ::   ncsir, ncsjr     !: Location of runoff
+
+   REAL(wp), DIMENSION (:,:), ALLOCATABLE :: clo_mask        !: Defines area where excess run-off is distributed
+
+   REAL(wp), DIMENSION (jpncs+1)       ::   surf             !: Closed sea surface
+
+   INTEGER :: dia_closea_alloc
+
+   !! * Substitutions
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: closea.F90 4162 2013-11-07 10:19:49Z cetlod $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE dom_clo
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE dom_clo  ***
+      !!        
+      !! ** Purpose :   Closed sea domain initialization
+      !!
+      !! ** Method  :   if a closed sea is located only in a model grid point
+      !!                just the thermodynamic processes are applied.
+      !!
+      !! ** Action  :   ncsi1(), ncsj1() : south-west closed sea limits (i,j)
+      !!                ncsi2(), ncsj2() : north-east Closed sea limits (i,j)
+      !!                ncsir(), ncsjr() : Location of runoff
+      !!                ncsnr            : number of point where run-off pours
+      !!                ncstt            : Type of closed sea
+      !!                                   =0 spread over the world ocean
+      !!                                   =2 put at location runoff
+      !!----------------------------------------------------------------------
+      INTEGER ::   jc               ! dummy loop indices
+      REAL(wp)::   ztmp   
+      !!----------------------------------------------------------------------
+      
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*)'dom_clo : closed seas '
+      IF(lwp) WRITE(numout,*)'~~~~~~~'
+
+      ! Initial values
+      ncsnr(:) = 1  ;  ncsi1(:) = 1  ;  ncsi2(:) = 1  ;  ncsir(:,:) = 1
+      ncstt(:) = 0  ;  ncsj1(:) = 1  ;  ncsj2(:) = 1  ;  ncsjr(:,:) = 1
+
+      ! set the closed seas (in data domain indices)
+      ! -------------------
+
+      IF( cp_cfg == "orca" ) THEN
+         !
+         SELECT CASE ( jp_cfg )
+         !                                           ! =======================
+         CASE ( 1 )                                  ! ORCA_R1 configuration
+            !                                        ! =======================
+            ncsnr(1)   = 1    ; ncstt(1)   = 0           ! Caspian Sea
+            ncsi1(1)   = 332  ; ncsj1(1)   = 203           ! spread over the globe
+            ncsi2(1)   = 344  ; ncsj2(1)   = 235
+            ncsir(1,1) = 1    ; ncsjr(1,1) = 1
+            ! 
+            ncsnr(2)   = 4    ; ncstt(2)   = 2           ! Great North American Lakes
+            ncsi1(2)   = 198  ; ncsj1(2)   = 209           ! put at St Laurent mouth
+            ncsi2(2)   = 213  ; ncsj2(2)   = 223
+            ncsir(1,2) = 225  ; ncsjr(1,2) = 220
+            ncsir(1,2) = 225  ; ncsjr(1,2) = 221
+            ncsir(1,2) = 226  ; ncsjr(1,2) = 220
+            ncsir(1,2) = 226  ; ncsjr(1,2) = 221
+
+            !                                        
+            !                                        ! =======================
+         CASE ( 2 )                                  !  ORCA_R2 configuration
+            !                                        ! =======================
+            !                                            ! Caspian Sea
+            ncsnr(1)   =   1  ;  ncstt(1)   =   0           ! spread over the globe
+            ncsi1(1)   =  11  ;  ncsj1(1)   = 103
+            ncsi2(1)   =  17  ;  ncsj2(1)   = 112
+            ncsir(1,1) =   1  ;  ncsjr(1,1) =   1 
+            !                                            ! Great North American Lakes
+            ncsnr(2)   =   1  ;  ncstt(2)   =   2           ! put at St Laurent mouth
+            ncsi1(2)   =  97  ;  ncsj1(2)   = 107
+            ncsi2(2)   = 103  ;  ncsj2(2)   = 111
+            ncsir(2,1) = 110  ;  ncsjr(2,1) = 111           
+            !                                            ! Black Sea (crossed by the cyclic boundary condition)
+            ncsnr(3:4) =   4  ;  ncstt(3:4) =   2           ! put in Med Sea (north of Aegean Sea)
+            ncsir(3:4,1) = 171;  ncsjr(3:4,1) = 106         !
+            ncsir(3:4,2) = 170;  ncsjr(3:4,2) = 106 
+            ncsir(3:4,3) = 171;  ncsjr(3:4,3) = 105 
+            ncsir(3:4,4) = 170;  ncsjr(3:4,4) = 105 
+            ncsi1(3)   = 174  ;  ncsj1(3)   = 107           ! 1 : west part of the Black Sea      
+            ncsi2(3)   = 181  ;  ncsj2(3)   = 112           !            (ie west of the cyclic b.c.)
+            ncsi1(4)   =   2  ;  ncsj1(4)   = 107           ! 2 : east part of the Black Sea 
+            ncsi2(4)   =   6  ;  ncsj2(4)   = 112           !           (ie east of the cyclic b.c.)
+             
+          
+
+            !                                        ! =======================
+         CASE ( 4 )                                  !  ORCA_R4 configuration
+            !                                        ! =======================
+            !                                            ! Caspian Sea
+            ncsnr(1)   =  1  ;  ncstt(1)   =  0  
+            ncsi1(1)   =  4  ;  ncsj1(1)   = 53 
+            ncsi2(1)   =  4  ;  ncsj2(1)   = 56
+            ncsir(1,1) =  1  ;  ncsjr(1,1) =  1
+            !                                            ! Great North American Lakes
+            ncsnr(2)   =  1  ;  ncstt(2)   =  2 
+            ncsi1(2)   = 49  ;  ncsj1(2)   = 55
+            ncsi2(2)   = 51  ;  ncsj2(2)   = 56
+            ncsir(2,1) = 57  ;  ncsjr(2,1) = 55
+            !                                            ! Black Sea
+            ncsnr(3)   =  4  ;  ncstt(3)   =  2  
+            ncsi1(3)   = 88  ;  ncsj1(3)   = 55 
+            ncsi2(3)   = 91  ;  ncsj2(3)   = 56
+            ncsir(3,1) = 86  ;  ncsjr(3,1) = 53
+            ncsir(3,2) = 87  ;  ncsjr(3,2) = 53 
+            ncsir(3,3) = 86  ;  ncsjr(3,3) = 52 
+            ncsir(3,4) = 87  ;  ncsjr(3,4) = 52
+            !                                            ! Baltic Sea
+            ncsnr(4)   =  1  ;  ncstt(4)   =  2
+            ncsi1(4)   = 75  ;  ncsj1(4)   = 59
+            ncsi2(4)   = 76  ;  ncsj2(4)   = 61
+            ncsir(4,1) = 84  ;  ncsjr(4,1) = 59 
+            !                                        ! =======================
+         CASE ( 025 )                                ! ORCA_R025 configuration
+            !                                        ! =======================
+            ncsnr(1)   = 1    ; ncstt(1)   = 0               ! Caspian + Aral sea
+            ncsi1(1)   = 1330 ; ncsj1(1)   = 645
+            ncsi2(1)   = 1400 ; ncsj2(1)   = 795
+            ncsir(1,1) = 1    ; ncsjr(1,1) = 1
+            !                                        
+            ncsnr(2)   = 1    ; ncstt(2)   = 0               ! Azov Sea 
+            ncsi1(2)   = 1284 ; ncsj1(2)   = 722
+            ncsi2(2)   = 1304 ; ncsj2(2)   = 747
+            ncsir(2,1) = 1    ; ncsjr(2,1) = 1
+            !
+         END SELECT
+         !
+      ENDIF
+
+      ! convert the position in local domain indices
+      ! --------------------------------------------
+      DO jc = 1, jpncs
+         ncsi1(jc)   = mi0( ncsi1(jc) )
+         ncsj1(jc)   = mj0( ncsj1(jc) )
+
+         ncsi2(jc)   = mi1( ncsi2(jc) )   
+         ncsj2(jc)   = mj1( ncsj2(jc) )  
+      END DO
+
+      !
+   END SUBROUTINE dom_clo
+
+
+   SUBROUTINE sbc_clo( kt )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE sbc_clo  ***
+      !!                    
+      !! ** Purpose :   Special handling of closed seas
+      !!
+      !! ** Method  :   Water flux is forced to zero over closed sea
+      !!      Excess is shared between remaining ocean, or
+      !!      put as run-off in open ocean.
+      !!
+      !! ** Action  :   emp updated surface freshwater fluxes and associated heat content at kt
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   kt   ! ocean model time step
+      !
+      INTEGER             ::   ji, jj, jc, jn   ! dummy loop indices
+      REAL(wp), PARAMETER ::   rsmall = 1.e-20_wp    ! Closed sea correction epsilon
+      REAL(wp)            ::   zze2, ztmp, zcorr     ! 
+      REAL(wp)            ::   zcoef, zcoef1         ! 
+      COMPLEX(wp)         ::   ctmp 
+      REAL(wp), DIMENSION(jpncs) ::   zfwf   ! 1D workspace
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('sbc_clo')
+      !                                                   !------------------!
+      IF( kt == nit000 ) THEN                             !  Initialisation  !
+         !                                                !------------------!
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*)'sbc_clo : closed seas '
+         IF(lwp) WRITE(numout,*)'~~~~~~~'
+         !
+         ! Mask
+         ! --------------------------------------------
+         ALLOCATE ( clo_mask (jpi, jpj), STAT=dia_closea_alloc)
+         IF(dia_closea_alloc /= 0)   CALL ctl_warn('dia_closea_alloc: failed to allocate arrays.')
+         
+         clo_mask (:,:) = tmask (:,:,1)
+         
+         ! Latitude limits
+         WHERE ( gphit (:,:) .GT.  30.0_wp ) clo_mask (:,:) = 0.0_wp
+         WHERE ( gphit (:,:) .LT. -30.0_wp ) clo_mask (:,:) = 0.0_wp
+         !
+         ! Remove closed seas from mask
+         DO jc = 1, jpncs
+            DO jj = ncsj1(jc), ncsj2(jc)
+               DO ji = ncsi1(jc), ncsi2(jc)
+                  clo_mask (ji, jj) = 0.0_wp
+               END DO
+            END DO
+         END DO
+         
+         IF( lk_mpp ) CALL lbc_lnk ( clo_mask, 'T', 1._wp)
+      
+         !
+         surf(:) = 0.e0_wp
+         !
+         surf(jpncs+1) = glob_sum( e1e2t(:,:) * clo_mask (:,:) )   ! surface of the ocean where excess run-off goes
+         !
+         !                                        ! surface of closed seas 
+         IF( lk_mpp_rep ) THEN                         ! MPP reproductible calculation
+            DO jc = 1, jpncs
+               ctmp = CMPLX( 0.e0, 0.e0, wp )
+               DO jj = ncsj1(jc), ncsj2(jc)
+                  DO ji = ncsi1(jc), ncsi2(jc)
+                     ztmp = e1e2t(ji,jj) * tmask_i(ji,jj)
+                     CALL DDPDD( CMPLX( ztmp, 0.e0, wp ), ctmp )
+                  END DO 
+               END DO 
+               IF( lk_mpp )   CALL mpp_sum( ctmp )
+               surf(jc) = REAL(ctmp,wp)
+            END DO
+         ELSE                                          ! Standard calculation           
+            DO jc = 1, jpncs
+               DO jj = ncsj1(jc), ncsj2(jc)
+                  DO ji = ncsi1(jc), ncsi2(jc)
+                     surf(jc) = surf(jc) + e1e2t(ji,jj) * tmask_i(ji,jj)      ! surface of closed seas
+                  END DO 
+               END DO 
+            END DO 
+            IF( lk_mpp )   CALL mpp_sum ( surf, jpncs )       ! mpp: sum over all the global domain
+         ENDIF
+
+         IF(lwp) WRITE(numout,*)'     Closed sea surfaces'
+         DO jc = 1, jpncs
+            IF(lwp)WRITE(numout,FMT='(1I3,4I4,5X,F16.2)') jc, ncsi1(jc), ncsi2(jc), ncsj1(jc), ncsj2(jc), surf(jc)
+         END DO
+
+         IF(lwp) WRITE(numout,*)'     Surface for redistribution in closea ', surf(jpncs+1)
+         
+         !
+      ENDIF
+      !
+      !                                                   !--------------------!
+      !                                                   !  update emp        !
+      zfwf = 0.e0_wp                                      !--------------------!
+      IF( lk_mpp_rep ) THEN                         ! MPP reproductible calculation
+         DO jc = 1, jpncs
+            ctmp = CMPLX( 0.e0, 0.e0, wp )
+            DO jj = ncsj1(jc), ncsj2(jc)
+               DO ji = ncsi1(jc), ncsi2(jc)
+                  ztmp = e1e2t(ji,jj) * ( emp(ji,jj)-rnf(ji,jj) ) * tmask_i(ji,jj)
+                  CALL DDPDD( CMPLX( ztmp, 0.e0, wp ), ctmp )
+               END DO  
+            END DO 
+            IF( lk_mpp )   CALL mpp_sum( ctmp )
+            zfwf(jc) = REAL(ctmp,wp)
+         END DO
+      ELSE                                          ! Standard calculation           
+         DO jc = 1, jpncs
+            DO jj = ncsj1(jc), ncsj2(jc)
+               DO ji = ncsi1(jc), ncsi2(jc)
+                  zfwf(jc) = zfwf(jc) + e1e2t(ji,jj) * ( emp(ji,jj)-rnf(ji,jj) ) * tmask_i(ji,jj) 
+               END DO  
+            END DO 
+         END DO
+         IF( lk_mpp )   CALL mpp_sum ( zfwf(:) , jpncs )       ! mpp: sum over all the global domain
+      ENDIF
+
+      IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN      ! Black Sea case for ORCA_R2 configuration
+         zze2    = ( zfwf(3) + zfwf(4) ) * 0.5_wp
+         zfwf(3) = zze2
+         zfwf(4) = zze2
+      ENDIF
+
+      zcorr = 0._wp
+
+      DO jc = 1, jpncs
+         !
+         ! The following if avoids the redistribution of the round off
+         IF ( ABS(zfwf(jc) / surf(jpncs+1) ) > rsmall) THEN
+            !
+            IF( ncstt(jc) == 0 ) THEN           ! water/evap excess is shared by all open ocean
+               zcoef    = zfwf(jc) / surf(jpncs+1)
+               zcoef1   = rcp * zcoef
+               emp(:,:) = emp(:,:) + zcoef  * clo_mask (:,:) 
+               qns(:,:) = qns(:,:) - zcoef1 * sst_m(:,:) * clo_mask (:,:)
+               !
+            ELSEIF( ncstt(jc) == 1 ) THEN       ! Excess water in open sea, at outflow location, excess evap shared
+               IF ( zfwf(jc) <= 0.e0_wp ) THEN 
+                   DO jn = 1, ncsnr(jc)
+                     ji = mi0(ncsir(jc,jn))
+                     jj = mj0(ncsjr(jc,jn)) ! Location of outflow in open ocean
+                     IF (      ji > 1 .AND. ji < jpi   &
+                         .AND. jj > 1 .AND. jj < jpj ) THEN 
+                         zcoef      = zfwf(jc) / ( REAL(ncsnr(jc)) * e1e2t(ji,jj) )
+                         zcoef1     = rcp * zcoef
+                         emp(ji,jj) = emp(ji,jj) + zcoef 
+                         qns(ji,jj) = qns(ji,jj) - zcoef1 * sst_m(ji,jj)
+                     ENDIF 
+                   END DO 
+               ELSE 
+                   zcoef    = zfwf(jc) / surf(jpncs+1)
+                   zcoef1   = rcp * zcoef
+                   emp(:,:) = emp(:,:) + zcoef  * clo_mask (:,:)
+                   qns(:,:) = qns(:,:) - zcoef1 * sst_m(:,:) * clo_mask (:,:)
+               ENDIF
+            ELSEIF( ncstt(jc) == 2 ) THEN       ! Excess e-p-r (either sign) goes to open ocean, at outflow location
+               DO jn = 1, ncsnr(jc)
+                  ji = mi0(ncsir(jc,jn))
+                  jj = mj0(ncsjr(jc,jn)) ! Location of outflow in open ocean
+                  IF(      ji > 1 .AND. ji < jpi    &
+                     .AND. jj > 1 .AND. jj < jpj ) THEN 
+                     zcoef      = zfwf(jc) / ( REAL(ncsnr(jc)) *  e1e2t(ji,jj) )
+                     zcoef1     = rcp * zcoef
+                     emp(ji,jj) = emp(ji,jj) + zcoef
+                     qns(ji,jj) = qns(ji,jj) - zcoef1 * sst_m(ji,jj)
+                  ENDIF 
+               END DO 
+            ENDIF 
+            !
+            DO jj = ncsj1(jc), ncsj2(jc)
+               DO ji = ncsi1(jc), ncsi2(jc)
+                  zcoef      = zfwf(jc) / surf(jc)
+                  zcoef1     = rcp * zcoef
+                  emp(ji,jj) = emp(ji,jj) - zcoef
+                  qns(ji,jj) = qns(ji,jj) + zcoef1 * sst_m(ji,jj)
+               END DO  
+            END DO 
+            !
+         END IF
+      END DO 
+
+      emp (:,:) = emp (:,:) * tmask(:,:,1)
+      qns (:,:) = qns (:,:) * tmask(:,:,1)
+      !
+      CALL lbc_lnk( emp , 'T', 1._wp )
+      CALL lbc_lnk( qns , 'T', 1._wp )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('sbc_clo')
+      !
+   END SUBROUTINE sbc_clo
+
+
+   SUBROUTINE clo_rnf( p_rnfmsk )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE sbc_rnf  ***
+      !!                    
+      !! ** Purpose :   allow the treatment of closed sea outflow grid-points
+      !!                to be the same as river mouth grid-points
+      !!
+      !! ** Method  :   set to 1 the runoff mask (mskrnf, see sbcrnf module)
+      !!                at the closed sea outflow grid-point.
+      !!
+      !! ** Action  :   update (p_)mskrnf (set 1 at closed sea outflow)
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) ::   p_rnfmsk   ! river runoff mask (rnfmsk array)
+      !
+      INTEGER  ::   jc, jn, ji, jj      ! dummy loop indices
+      !!----------------------------------------------------------------------
+      !
+      DO jc = 1, jpncs
+         IF( ncstt(jc) >= 1 ) THEN            ! runoff mask set to 1 at closed sea outflows
+             DO jn = 1, 4
+                DO jj =    mj0( ncsjr(jc,jn) ), mj1( ncsjr(jc,jn) )
+                   DO ji = mi0( ncsir(jc,jn) ), mi1( ncsir(jc,jn) )
+                      p_rnfmsk(ji,jj) = MAX( p_rnfmsk(ji,jj), 1.0_wp )
+                   END DO
+                END DO
+            END DO 
+         ENDIF 
+      END DO 
+      !
+   END SUBROUTINE clo_rnf
+
+   
+   SUBROUTINE clo_ups( p_upsmsk )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE sbc_rnf  ***
+      !!                    
+      !! ** Purpose :   allow the treatment of closed sea outflow grid-points
+      !!                to be the same as river mouth grid-points
+      !!
+      !! ** Method  :   set to 0.5 the upstream mask (upsmsk, see traadv_cen2 
+      !!                module) over the closed seas.
+      !!
+      !! ** Action  :   update (p_)upsmsk (set 0.5 over closed seas)
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) ::   p_upsmsk   ! upstream mask (upsmsk array)
+      !
+      INTEGER  ::   jc, ji, jj      ! dummy loop indices
+      !!----------------------------------------------------------------------
+      !
+      DO jc = 1, jpncs
+         DO jj = ncsj1(jc), ncsj2(jc)
+            DO ji = ncsi1(jc), ncsi2(jc)
+               p_upsmsk(ji,jj) = 0.5_wp         ! mixed upstream/centered scheme over closed seas
+            END DO 
+         END DO 
+       END DO 
+       !
+   END SUBROUTINE clo_ups
+   
+      
+   SUBROUTINE clo_bat( pbat, kbat )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE clo_bat  ***
+      !!                    
+      !! ** Purpose :   suppress closed sea from the domain
+      !!
+      !! ** Method  :   set to 0 the meter and level bathymetry (given in 
+      !!                arguments) over the closed seas.
+      !!
+      !! ** Action  :   set pbat=0 and kbat=0 over closed seas
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) ::   pbat   ! bathymetry in meters (bathy array)
+      INTEGER , DIMENSION(jpi,jpj), INTENT(inout) ::   kbat   ! bathymetry in levels (mbathy array)
+      !
+      INTEGER  ::   jc, ji, jj      ! dummy loop indices
+      !!----------------------------------------------------------------------
+      !
+      DO jc = 1, jpncs
+         DO jj = ncsj1(jc), ncsj2(jc)
+            DO ji = ncsi1(jc), ncsi2(jc)
+               pbat(ji,jj) = 0._wp   
+               kbat(ji,jj) = 0   
+            END DO 
+         END DO 
+       END DO 
+       !
+   END SUBROUTINE clo_bat
+
+   !!======================================================================
+END MODULE closea
+
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/cpl_oasis3.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/cpl_oasis3.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/cpl_oasis3.F90	(revision 2504)
@@ -0,0 +1,379 @@
+MODULE cpl_oasis3
+   !!======================================================================
+   !!                    ***  MODULE cpl_oasis  ***
+   !! Coupled O/A : coupled ocean-atmosphere case using OASIS3 V. prism_2_4
+   !!               special case: NEMO OPA/LIM coupled to ECHAM5
+   !!=====================================================================
+   !! History :   
+   !!   9.0  !  04-06  (R. Redler, NEC Laboratories Europe, Germany) Original code
+   !!   " "  !  04-11  (R. Redler, NEC Laboratories Europe; N. Keenlyside, W. Park, IFM-GEOMAR, Germany) revision
+   !!   " "  !  04-11  (V. Gayler, MPI M&D) Grid writing
+   !!   " "  !  05-08  (R. Redler, W. Park) frld initialization, paral(2) revision
+   !!   " "  !  05-09  (R. Redler) extended to allow for communication over root only
+   !!   " "  !  06-01  (W. Park) modification of physical part
+   !!   " "  !  06-02  (R. Redler, W. Park) buffer array fix for root exchange
+   !!   3.4  !  11-11  (C. Harris) Changes to allow mutiple category fields
+   !!----------------------------------------------------------------------
+#if defined key_oasis3
+   !!----------------------------------------------------------------------
+   !!   'key_oasis3'                    coupled Ocean/Atmosphere via OASIS3
+   !!----------------------------------------------------------------------
+   !!   cpl_prism_init     : initialization of coupled mode communication
+   !!   cpl_prism_define   : definition of grid and fields
+   !!   cpl_prism_snd     : snd out fields in coupled mode
+   !!   cpl_prism_rcv     : receive fields in coupled mode
+   !!   cpl_prism_finalize : finalize the coupled mode communication
+   !!----------------------------------------------------------------------
+#if defined key_oasis_mct
+   USE mod_prism
+#else
+   USE mod_prism_proto              ! OASIS3 prism module
+   USE mod_prism_def_partition_proto! OASIS3 prism module for partitioning
+   USE mod_prism_put_proto          ! OASIS3 prism module for snding
+   USE mod_prism_get_proto          ! OASIS3 prism module for receiving
+   USE mod_comprism_proto           ! OASIS3 prism module to get coupling frequency
+#endif
+   USE par_oce                      ! ocean parameters
+   USE dom_oce                      ! ocean space and time domain
+   USE in_out_manager               ! I/O manager
+   USE lbclnk                       ! ocean lateral boundary conditions (or mpp link)
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   cpl_prism_init
+   PUBLIC   cpl_prism_define
+   PUBLIC   cpl_prism_snd
+   PUBLIC   cpl_prism_rcv
+   PUBLIC   cpl_prism_freq
+   PUBLIC   cpl_prism_finalize
+
+   LOGICAL, PUBLIC, PARAMETER ::   lk_cpl = .TRUE.   !: coupled flag
+   INTEGER, PUBLIC            ::   OASIS_Rcv  = 1    !: return code if received field
+   INTEGER, PUBLIC            ::   OASIS_idle = 0    !: return code if nothing done by oasis
+   INTEGER                    ::   ncomp_id          ! id returned by prism_init_comp
+   INTEGER                    ::   nerror            ! return error code
+
+   INTEGER, PARAMETER ::   nmaxfld=40    ! Maximum number of coupling fields
+   
+   TYPE, PUBLIC ::   FLD_CPL               !: Type for coupling field information
+      LOGICAL               ::   laction   ! To be coupled or not
+      CHARACTER(len = 8)    ::   clname    ! Name of the coupling field   
+      CHARACTER(len = 1)    ::   clgrid    ! Grid type  
+      REAL(wp)              ::   nsgn      ! Control of the sign change
+      INTEGER, DIMENSION(9) ::   nid       ! Id of the field (no more than 9 categories)
+      INTEGER               ::   nct       ! Number of categories in field
+   END TYPE FLD_CPL
+
+   TYPE(FLD_CPL), DIMENSION(nmaxfld), PUBLIC ::   srcv, ssnd   !: Coupling fields
+
+   REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   exfld   ! Temporary buffer for receiving
+
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: cpl_oasis3.F90 3294 2012-01-28 16:44:18Z rblod $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE cpl_prism_init( kl_comm )
+      !!-------------------------------------------------------------------
+      !!             ***  ROUTINE cpl_prism_init  ***
+      !!
+      !! ** Purpose :   Initialize coupled mode communication for ocean
+      !!    exchange between AGCM, OGCM and COUPLER. (OASIS3 software)
+      !!
+      !! ** Method  :   OASIS3 MPI communication 
+      !!--------------------------------------------------------------------
+      INTEGER, INTENT(out) ::   kl_comm   ! local communicator of the model
+      !!--------------------------------------------------------------------
+
+      ! WARNING: No write in numout in this routine
+      !============================================
+
+      !------------------------------------------------------------------
+      ! 1st Initialize the PRISM system for the application
+      !------------------------------------------------------------------
+      CALL prism_init_comp_proto ( ncomp_id, 'oceanx', nerror )
+      IF ( nerror /= PRISM_Ok ) &
+         CALL prism_abort_proto (ncomp_id, 'cpl_prism_init', 'Failure in prism_init_comp_proto')
+
+      !------------------------------------------------------------------
+      ! 3rd Get an MPI communicator for OPA local communication
+      !------------------------------------------------------------------
+
+      CALL prism_get_localcomm_proto ( kl_comm, nerror )
+      IF ( nerror /= PRISM_Ok ) &
+         CALL prism_abort_proto (ncomp_id, 'cpl_prism_init','Failure in prism_get_localcomm_proto' )
+      !
+   END SUBROUTINE cpl_prism_init
+
+
+   SUBROUTINE cpl_prism_define( krcv, ksnd )
+      !!-------------------------------------------------------------------
+      !!             ***  ROUTINE cpl_prism_define  ***
+      !!
+      !! ** Purpose :   Define grid and field information for ocean
+      !!    exchange between AGCM, OGCM and COUPLER. (OASIS3 software)
+      !!
+      !! ** Method  :   OASIS3 MPI communication 
+      !!--------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   krcv, ksnd     ! Number of received and sent coupling fields
+      !
+      INTEGER :: id_part
+      INTEGER :: paral(5)       ! OASIS3 box partition
+      INTEGER :: ishape(2,2)    ! shape of arrays passed to PSMILe
+      INTEGER :: ji,jc          ! local loop indicees
+      CHARACTER(LEN=8) :: zclname
+      !!--------------------------------------------------------------------
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) 'cpl_prism_define : initialization in coupled ocean/atmosphere case'
+      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~'
+      IF(lwp) WRITE(numout,*)
+
+      !
+      ! ... Define the shape for the area that excludes the halo
+      !     For serial configuration (key_mpp_mpi not being active)
+      !     nl* is set to the global values 1 and jp*glo.
+      !
+      ishape(:,1) = (/ 1, nlei-nldi+1 /)
+      ishape(:,2) = (/ 1, nlej-nldj+1 /)
+      !
+      ! ... Allocate memory for data exchange
+      !
+      ALLOCATE(exfld(nlei-nldi+1, nlej-nldj+1), stat = nerror)
+      IF( nerror > 0 ) THEN
+         CALL prism_abort_proto ( ncomp_id, 'cpl_prism_define', 'Failure in allocating exfld')   ;   RETURN
+      ENDIF
+      !
+      ! -----------------------------------------------------------------
+      ! ... Define the partition 
+      ! -----------------------------------------------------------------
+      
+      paral(1) = 2                                              ! box partitioning
+      paral(2) = jpiglo * (nldj-1+njmpp-1) + (nldi-1+nimpp-1)   ! NEMO lower left corner global offset    
+      paral(3) = nlei-nldi+1                                    ! local extent in i 
+      paral(4) = nlej-nldj+1                                    ! local extent in j
+      paral(5) = jpiglo                                         ! global extent in x
+      
+      IF( ln_ctl ) THEN
+         WRITE(numout,*) ' multiexchg: paral (1:5)', paral
+         WRITE(numout,*) ' multiexchg: jpi, jpj =', jpi, jpj
+         WRITE(numout,*) ' multiexchg: nldi, nlei, nimpp =', nldi, nlei, nimpp
+         WRITE(numout,*) ' multiexchg: nldj, nlej, njmpp =', nldj, nlej, njmpp
+      ENDIF
+      
+      CALL prism_def_partition_proto ( id_part, paral, nerror )
+      !
+      ! ... Announce send variables. 
+      !
+      DO ji = 1, ksnd
+         IF ( ssnd(ji)%laction ) THEN 
+            DO jc = 1, ssnd(ji)%nct
+               IF ( ssnd(ji)%nct .gt. 1 ) THEN
+                  WRITE(zclname,'( a7, i1)') ssnd(ji)%clname,jc
+               ELSE
+                  zclname=ssnd(ji)%clname
+               ENDIF
+               WRITE(numout,*) "Define",ji,jc,zclname," for",PRISM_Out
+               CALL prism_def_var_proto (ssnd(ji)%nid(jc), zclname, id_part, (/ 2, 0/),   &
+                    PRISM_Out, ishape, PRISM_REAL, nerror)
+               IF ( nerror /= PRISM_Ok ) THEN
+                  WRITE(numout,*) 'Failed to define transient ', ji, TRIM(zclname)
+                  CALL prism_abort_proto ( ssnd(ji)%nid(jc), 'cpl_prism_define', 'Failure in prism_def_var')
+               ENDIF
+            END DO
+         ENDIF
+      END DO
+      !
+      ! ... Announce received variables. 
+      !
+      DO ji = 1, krcv
+         IF ( srcv(ji)%laction ) THEN 
+            DO jc = 1, srcv(ji)%nct
+               IF ( srcv(ji)%nct .gt. 1 ) THEN
+                  WRITE(zclname,'( a7, i1)') srcv(ji)%clname,jc
+               ELSE
+                  zclname=srcv(ji)%clname
+               ENDIF
+               WRITE(numout,*) "Define",ji,jc,zclname," for",PRISM_In
+               CALL prism_def_var_proto ( srcv(ji)%nid(jc), zclname, id_part, (/ 2, 0/),   &
+                    &                      PRISM_In    , ishape   , PRISM_REAL, nerror)
+               IF ( nerror /= PRISM_Ok ) THEN
+                  WRITE(numout,*) 'Failed to define transient ', ji, TRIM(zclname)
+                  CALL prism_abort_proto ( srcv(ji)%nid(jc), 'cpl_prism_define', 'Failure in prism_def_var')
+               ENDIF
+            END DO
+         ENDIF
+      END DO
+      
+      !------------------------------------------------------------------
+      ! End of definition phase
+      !------------------------------------------------------------------
+      
+      CALL prism_enddef_proto(nerror)
+      IF( nerror /= PRISM_Ok )   CALL prism_abort_proto ( ncomp_id, 'cpl_prism_define', 'Failure in prism_enddef')
+      !
+   END SUBROUTINE cpl_prism_define
+   
+   
+   SUBROUTINE cpl_prism_snd( kid, kstep, pdata, kinfo )
+      !!---------------------------------------------------------------------
+      !!              ***  ROUTINE cpl_prism_snd  ***
+      !!
+      !! ** Purpose : - At each coupling time-step,this routine sends fields
+      !!      like sst or ice cover to the coupler or remote application.
+      !!----------------------------------------------------------------------
+      INTEGER                   , INTENT(in   ) ::   kid       ! variable index in the array
+      INTEGER                   , INTENT(  out) ::   kinfo     ! OASIS3 info argument
+      INTEGER                   , INTENT(in   ) ::   kstep     ! ocean time-step in seconds
+      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   pdata
+      !!
+      INTEGER                                   ::   jc        ! local loop index
+      !!--------------------------------------------------------------------
+      !
+      ! snd data to OASIS3
+      !
+      DO jc = 1, ssnd(kid)%nct
+
+         CALL prism_put_proto ( ssnd(kid)%nid(jc), kstep, pdata(nldi:nlei, nldj:nlej,jc), kinfo )
+         
+         IF ( ln_ctl ) THEN        
+            IF ( kinfo == PRISM_Sent     .OR. kinfo == PRISM_ToRest .OR.   &
+                 & kinfo == PRISM_SentOut  .OR. kinfo == PRISM_ToRestOut ) THEN
+               WRITE(numout,*) '****************'
+               WRITE(numout,*) 'prism_put_proto: Outgoing ', ssnd(kid)%clname
+               WRITE(numout,*) 'prism_put_proto: ivarid ', ssnd(kid)%nid(jc)
+               WRITE(numout,*) 'prism_put_proto:  kstep ', kstep
+               WRITE(numout,*) 'prism_put_proto:   info ', kinfo
+               WRITE(numout,*) '     - Minimum value is ', MINVAL(pdata(:,:,jc))
+               WRITE(numout,*) '     - Maximum value is ', MAXVAL(pdata(:,:,jc))
+               WRITE(numout,*) '     -     Sum value is ', SUM(pdata(:,:,jc))
+               WRITE(numout,*) '****************'
+            ENDIF
+         ENDIF
+
+      ENDDO
+      !
+    END SUBROUTINE cpl_prism_snd
+
+
+   SUBROUTINE cpl_prism_rcv( kid, kstep, pdata, kinfo )
+      !!---------------------------------------------------------------------
+      !!              ***  ROUTINE cpl_prism_rcv  ***
+      !!
+      !! ** Purpose : - At each coupling time-step,this routine receives fields
+      !!      like stresses and fluxes from the coupler or remote application.
+      !!----------------------------------------------------------------------
+      INTEGER                   , INTENT(in   ) ::   kid       ! variable index in the array
+      INTEGER                   , INTENT(in   ) ::   kstep     ! ocean time-step in seconds
+      REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::   pdata     ! IN to keep the value if nothing is done
+      INTEGER                   , INTENT(  out) ::   kinfo     ! OASIS3 info argument
+      !!
+      INTEGER                                   ::   jc        ! local loop index
+      LOGICAL                                   ::   llaction
+      !!--------------------------------------------------------------------
+      !
+      ! receive local data from OASIS3 on every process
+      !
+      DO jc = 1, srcv(kid)%nct
+
+         CALL prism_get_proto ( srcv(kid)%nid(jc), kstep, exfld, kinfo )         
+         
+         llaction = .false.
+         IF( kinfo == PRISM_Recvd   .OR. kinfo == PRISM_FromRest .OR.   &
+              kinfo == PRISM_RecvOut .OR. kinfo == PRISM_FromRestOut )   llaction = .TRUE.
+         
+         IF ( ln_ctl )   WRITE(numout,*) "llaction, kinfo, kstep, ivarid: " , llaction, kinfo, kstep, srcv(kid)%nid(jc)
+         
+         IF ( llaction ) THEN
+            
+            pdata(nldi:nlei, nldj:nlej,jc) = exfld(:,:)
+            
+            !--- Fill the overlap areas and extra hallows (mpp)
+            !--- check periodicity conditions (all cases)
+            CALL lbc_lnk( pdata(:,:,jc), srcv(kid)%clgrid, srcv(kid)%nsgn )   
+            
+            IF ( ln_ctl ) THEN        
+               WRITE(numout,*) '****************'
+               WRITE(numout,*) 'prism_get_proto: Incoming ', srcv(kid)%clname
+               WRITE(numout,*) 'prism_get_proto: ivarid '  , srcv(kid)%nid(jc)
+               WRITE(numout,*) 'prism_get_proto:   kstep', kstep
+               WRITE(numout,*) 'prism_get_proto:   info ', kinfo
+               WRITE(numout,*) '     - Minimum value is ', MINVAL(pdata(:,:,jc))
+               WRITE(numout,*) '     - Maximum value is ', MAXVAL(pdata(:,:,jc))
+               WRITE(numout,*) '     -     Sum value is ', SUM(pdata(:,:,jc))
+               WRITE(numout,*) '****************'
+            ENDIF
+
+            ! Ideally we would not reuse kinfo, but define a separate variable
+            ! for use as the return code from this routine to avoid confusion
+            ! with the return code previously obtained from the coupler.
+            kinfo = OASIS_Rcv
+            
+         ELSE
+            kinfo = OASIS_idle     
+         ENDIF
+         
+      ENDDO
+      !
+   END SUBROUTINE cpl_prism_rcv
+
+
+   INTEGER FUNCTION cpl_prism_freq( kid )  
+      !!---------------------------------------------------------------------
+      !!              ***  ROUTINE cpl_prism_freq  ***
+      !!
+      !! ** Purpose : - send back the coupling frequency for a particular field
+      !!----------------------------------------------------------------------
+      INTEGER,INTENT(in) ::   kid   ! variable index 
+      !!----------------------------------------------------------------------
+#if ! defined key_oasis_mct
+      cpl_prism_freq = ig_def_freq( kid )
+#else
+      cpl_prism_freq = 300
+#endif
+      !
+   END FUNCTION cpl_prism_freq
+
+
+   SUBROUTINE cpl_prism_finalize
+      !!---------------------------------------------------------------------
+      !!              ***  ROUTINE cpl_prism_finalize  ***
+      !!
+      !! ** Purpose : - Finalizes the coupling. If MPI_init has not been
+      !!      called explicitly before cpl_prism_init it will also close
+      !!      MPI communication.
+      !!----------------------------------------------------------------------
+      !
+      DEALLOCATE( exfld )
+      IF (nstop == 0) THEN
+          CALL prism_terminate_proto( nerror )         
+      ELSE
+          CALL prism_abort_proto(ncomp_id, "nemo crash", "nemo crash")
+      ENDIF
+      !
+   END SUBROUTINE cpl_prism_finalize
+
+#else
+   !!----------------------------------------------------------------------
+   !!   Default case          Dummy module          Forced Ocean/Atmosphere
+   !!----------------------------------------------------------------------
+   USE in_out_manager               ! I/O manager
+   LOGICAL, PUBLIC, PARAMETER :: lk_cpl = .FALSE.   !: coupled flag
+   PUBLIC cpl_prism_init
+   PUBLIC cpl_prism_finalize
+CONTAINS
+   SUBROUTINE cpl_prism_init (kl_comm) 
+      INTEGER, INTENT(out)   :: kl_comm       ! local communicator of the model
+      kl_comm = -1
+      WRITE(numout,*) 'cpl_prism_init: Error you sould not be there...'
+   END SUBROUTINE cpl_prism_init
+   SUBROUTINE cpl_prism_finalize
+      WRITE(numout,*) 'cpl_prism_finalize: Error you sould not be there...'
+   END SUBROUTINE cpl_prism_finalize
+#endif
+
+   !!=====================================================================
+END MODULE cpl_oasis3
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/diaptr.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/diaptr.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/diaptr.F90	(revision 2504)
@@ -0,0 +1,773 @@
+MODULE diaptr
+   !!======================================================================
+   !!                       ***  MODULE  diaptr  ***
+   !! Ocean physics:  Computes meridonal transports and zonal means
+   !!=====================================================================
+   !! History :  1.0  ! 2003-09  (C. Talandier, G. Madec)  Original code
+   !!            2.0  ! 2006-01  (A. Biastoch)  Allow sub-basins computation
+   !!            3.2  ! 2010-03  (O. Marti, S. Flavoni) Add fields
+   !!            3.3  ! 2010-10  (G. Madec)  dynamical allocation
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   dia_ptr      : Poleward Transport Diagnostics module
+   !!   dia_ptr_init : Initialization, namelist read
+   !!   dia_ptr_wri  : Output of poleward fluxes
+   !!   ptr_vjk      : "zonal" sum computation of a "meridional" flux array
+   !!   ptr_tjk      : "zonal" mean computation of a tracer field
+   !!   ptr_vj       : "zonal" and vertical sum computation of a "meridional" flux array
+   !!                   (Generic interface to ptr_vj_3d, ptr_vj_2d)
+   !!----------------------------------------------------------------------
+   USE oce              ! ocean dynamics and active tracers
+   USE dom_oce          ! ocean space and time domain
+   USE phycst           ! physical constants
+   USE ldftra_oce       ! ocean active tracers: lateral physics
+   USE dianam           !
+   USE diaptr_oce
+   USE iom              ! IOM library
+   USE ioipsl           ! IO-IPSL library
+   USE in_out_manager   ! I/O manager
+   USE lib_mpp          ! MPP library
+   USE lbclnk           ! lateral boundary condition - processor exchanges
+   USE timing           ! preformance summary
+   USE wrk_nemo         ! working arrays
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   dia_ptr_init   ! call in opa module
+   PUBLIC   dia_ptr        ! call in step module
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: diaptr.F90 4624 2014-04-28 12:09:03Z acc $ 
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+
+   SUBROUTINE dia_ptr( kt )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE dia_ptr  ***
+      !!----------------------------------------------------------------------
+      USE oce,     vt  =>   ua   ! use ua as workspace
+      USE oce,     vs  =>   va   ! use va as workspace
+      IMPLICIT none
+      !!
+      INTEGER, INTENT(in) ::   kt   ! ocean time step index
+      !
+      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
+      REAL(wp) ::   zv               ! local scalar
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )   CALL timing_start('dia_ptr')
+      !
+      IF( kt == nit000 .OR. MOD( kt, nn_fptr ) == 0 )   THEN
+         !
+         IF( MOD( kt, nn_fptr ) == 0 ) THEN 
+            !
+            IF( ln_diaznl ) THEN               ! i-mean temperature and salinity
+               DO jn = 1, nptr
+                  tn_jk(:,:,jn) = ptr_tjk( tsn(:,:,:,jp_tem), btmsk(:,:,jn) ) * r1_sjk(:,:,jn)
+                  sn_jk(:,:,jn) = ptr_tjk( tsn(:,:,:,jp_sal), btmsk(:,:,jn) ) * r1_sjk(:,:,jn)
+               END DO
+            ENDIF
+            !
+            !                          ! horizontal integral and vertical dz 
+            !                                ! eulerian velocity
+            v_msf(:,:,1) = ptr_vjk( vn(:,:,:) ) 
+            DO jn = 2, nptr
+               v_msf(:,:,jn) = ptr_vjk( vn(:,:,:), btmsk(:,:,jn)*btm30(:,:) ) 
+            END DO
+#if defined key_diaeiv
+            DO jn = 1, nptr                  ! bolus velocity
+               v_msf_eiv(:,:,jn) = ptr_vjk( v_eiv(:,:,:), btmsk(:,:,jn) )   ! here no btm30 for MSFeiv
+            END DO
+            !                                ! add bolus stream-function to the eulerian one
+            v_msf(:,:,:) = v_msf(:,:,:) + v_msf_eiv(:,:,:)
+#endif
+            !
+            !                          ! Transports
+            !                                ! local heat & salt transports at T-points  ( tsn*mj[vn+v_eiv] )
+            vt(:,:,jpk) = 0._wp   ;   vs(:,:,jpk) = 0._wp
+            DO jk= 1, jpkm1
+               DO jj = 2, jpj
+                  DO ji = 1, jpi
+#if defined key_diaeiv 
+                     zv = ( vn(ji,jj,jk) + vn(ji,jj-1,jk) + v_eiv(ji,jj,jk) + v_eiv(ji,jj-1,jk) ) * 0.5_wp
+#else
+                     zv = ( vn(ji,jj,jk) + vn(ji,jj-1,jk) ) * 0.5_wp
+#endif 
+                     vt(ji,jj,jk) = zv * tsn(ji,jj,jk,jp_tem)
+                     vs(ji,jj,jk) = zv * tsn(ji,jj,jk,jp_sal)
+                  END DO
+               END DO
+            END DO
+!!gm useless as overlap areas are not used in ptr_vjk
+            CALL lbc_lnk( vs, 'V', -1. )   ;   CALL lbc_lnk( vt, 'V', -1. )
+!!gm
+            !                                ! heat & salt advective transports (approximation)
+            htr(:,1) = SUM( ptr_vjk( vt(:,:,:) ) , 2 ) * rc_pwatt   ! SUM over jk + conversion
+            str(:,1) = SUM( ptr_vjk( vs(:,:,:) ) , 2 ) * rc_ggram
+            DO jn = 2, nptr 
+               htr(:,jn) = SUM( ptr_vjk( vt(:,:,:), btmsk(:,:,jn)*btm30(:,:) ) , 2 ) * rc_pwatt   ! mask Southern Ocean
+               str(:,jn) = SUM( ptr_vjk( vs(:,:,:), btmsk(:,:,jn)*btm30(:,:) ) , 2 ) * rc_ggram   ! mask Southern Ocean
+            END DO
+
+            IF( ln_ptrcomp ) THEN            ! overturning transport
+               htr_ove(:) = SUM( v_msf(:,:,1) * tn_jk(:,:,1), 2 ) * rc_pwatt   ! SUM over jk + conversion
+               str_ove(:) = SUM( v_msf(:,:,1) * sn_jk(:,:,1), 2 ) * rc_ggram
+            END IF
+            !                                ! Advective and diffusive transport
+            htr_adv(:) = htr_adv(:) * rc_pwatt        ! these are computed in tra_adv... and tra_ldf... routines 
+            htr_ldf(:) = htr_ldf(:) * rc_pwatt        ! here just the conversion in PW and Gg
+            str_adv(:) = str_adv(:) * rc_ggram
+            str_ldf(:) = str_ldf(:) * rc_ggram
+
+#if defined key_diaeiv
+            DO jn = 1, nptr                  ! Bolus component
+               htr_eiv(:,jn) = SUM( v_msf_eiv(:,:,jn) * tn_jk(:,:,jn), 2 ) * rc_pwatt   ! SUM over jk
+               str_eiv(:,jn) = SUM( v_msf_eiv(:,:,jn) * sn_jk(:,:,jn), 2 ) * rc_ggram   ! SUM over jk
+            END DO
+#endif
+            !                                ! "Meridional" Stream-Function
+            DO jn = 1, nptr
+               DO jk = 2, jpk 
+                  v_msf    (:,jk,jn) = v_msf    (:,jk-1,jn) + v_msf    (:,jk,jn)       ! Eulerian j-Stream-Function
+#if defined key_diaeiv
+                  v_msf_eiv(:,jk,jn) = v_msf_eiv(:,jk-1,jn) + v_msf_eiv(:,jk,jn)       ! Bolus    j-Stream-Function
+
+#endif
+               END DO
+            END DO
+            v_msf    (:,:,:) = v_msf    (:,:,:) * rc_sv       ! converte in Sverdrups
+#if defined key_diaeiv
+            v_msf_eiv(:,:,:) = v_msf_eiv(:,:,:) * rc_sv
+#endif
+         ENDIF
+         !
+         CALL dia_ptr_wri( kt )                        ! outputs
+         !
+      ENDIF
+      !
+      IF( nn_timing == 1 )   CALL timing_stop('dia_ptr')
+      !
+   END SUBROUTINE dia_ptr
+
+
+   SUBROUTINE dia_ptr_init
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE dia_ptr_init  ***
+      !!                   
+      !! ** Purpose :   Initialization, namelist read
+      !!----------------------------------------------------------------------
+      INTEGER ::   jn, ji, jj           ! dummy loop indices 
+      INTEGER ::   inum, ierr   ! local integers
+      INTEGER ::   ios          ! Local integer output status for namelist read
+#if defined key_mpp_mpi
+      INTEGER, DIMENSION(1) :: iglo, iloc, iabsf, iabsl, ihals, ihale, idid
+#endif
+      !!
+      NAMELIST/namptr/ ln_diaptr, ln_diaznl, ln_subbas, ln_ptrcomp, nn_fptr, nn_fwri
+      !!----------------------------------------------------------------------
+
+      REWIND( numnam_ref )              ! Namelist namptr in reference namelist : Poleward transport
+      READ  ( numnam_ref, namptr, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in reference namelist', lwp )
+
+      REWIND( numnam_cfg )              ! Namelist namptr in configuration namelist : Poleward transport
+      READ  ( numnam_cfg, namptr, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist', lwp )
+      IF(lwm) WRITE ( numond, namptr )
+
+      IF(lwp) THEN                     ! Control print
+         WRITE(numout,*)
+         WRITE(numout,*) 'dia_ptr_init : poleward transport and msf initialization'
+         WRITE(numout,*) '~~~~~~~~~~~~'
+         WRITE(numout,*) '   Namelist namptr : set ptr parameters'
+         WRITE(numout,*) '      Poleward heat & salt transport (T) or not (F)      ln_diaptr  = ', ln_diaptr
+         WRITE(numout,*) '      Overturning heat & salt transport                  ln_ptrcomp = ', ln_ptrcomp
+         WRITE(numout,*) '      T & S zonal mean and meridional stream function    ln_diaznl  = ', ln_diaznl 
+         WRITE(numout,*) '      Global (F) or glo/Atl/Pac/Ind/Indo-Pac basins      ln_subbas  = ', ln_subbas
+         WRITE(numout,*) '      Frequency of computation                           nn_fptr    = ', nn_fptr
+         WRITE(numout,*) '      Frequency of outputs                               nn_fwri    = ', nn_fwri
+      ENDIF
+      
+      IF( ln_diaptr) THEN  
+     
+         IF( nn_timing == 1 )   CALL timing_start('dia_ptr_init')
+      
+         IF( ln_subbas ) THEN   ;   nptr = 5       ! Global, Atlantic, Pacific, Indian, Indo-Pacific
+         ELSE                   ;   nptr = 1       ! Global only
+         ENDIF
+
+         !                                      ! allocate dia_ptr arrays
+         IF( dia_ptr_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dia_ptr_init : unable to allocate arrays' )
+
+         rc_pwatt = rc_pwatt * rau0 * rcp          ! conversion from K.s-1 to PetaWatt
+
+         IF( lk_mpp )   CALL mpp_ini_znl( numout )     ! Define MPI communicator for zonal sum
+
+         IF( ln_subbas ) THEN                ! load sub-basin mask
+            CALL iom_open( 'subbasins', inum )
+            CALL iom_get( inum, jpdom_data, 'atlmsk', btmsk(:,:,2) )   ! Atlantic basin
+            CALL iom_get( inum, jpdom_data, 'pacmsk', btmsk(:,:,3) )   ! Pacific  basin
+            CALL iom_get( inum, jpdom_data, 'indmsk', btmsk(:,:,4) )   ! Indian   basin
+            CALL iom_close( inum )
+            btmsk(:,:,5) = MAX ( btmsk(:,:,3), btmsk(:,:,4) )          ! Indo-Pacific basin
+            WHERE( gphit(:,:) < -30._wp)   ;   btm30(:,:) = 0._wp      ! mask out Southern Ocean
+            ELSE WHERE                     ;   btm30(:,:) = tmask(:,:,1)
+            END WHERE
+         ENDIF
+         btmsk(:,:,1) = tmask_i(:,:)                                   ! global ocean
+      
+         DO jn = 1, nptr
+            btmsk(:,:,jn) = btmsk(:,:,jn) * tmask_i(:,:)               ! interior domain only
+         END DO
+      
+         IF( lk_vvl )   CALL ctl_stop( 'diaptr: error in vvl case as constant i-mean surface is used' )
+
+         !                                   ! i-sum of e1v*e3v surface and its inverse
+         DO jn = 1, nptr
+            sjk(:,:,jn) = ptr_tjk( tmask(:,:,:), btmsk(:,:,jn) )
+            r1_sjk(:,:,jn) = 0._wp
+            WHERE( sjk(:,:,jn) /= 0._wp )   r1_sjk(:,:,jn) = 1._wp / sjk(:,:,jn)
+         END DO
+
+      ! Initialise arrays to zero because diatpr is called before they are first calculated
+      ! Note that this means diagnostics will not be exactly correct when model run is restarted.
+      htr_adv(:) = 0._wp ; str_adv(:) =  0._wp ;  htr_ldf(:) = 0._wp ; str_ldf(:) =  0._wp
+
+      ! Reference latitude (used in plots)
+      ! ------------------
+      !                                           ! =======================
+      IF( cp_cfg == "orca" ) THEN                 !   ORCA configurations
+        !                                        ! =======================
+        IF( jp_cfg == 05  )   nxline = 192   ! i-line that passes near the North Pole
+        IF( jp_cfg == 025 )   nxline = 384   ! i-line that passes near the North Pole
+        IF( jp_cfg == 1   )   nxline =  96   ! i-line that passes near the North Pole
+        IF( jp_cfg == 2   )   nxline =  48   ! i-line that passes near the North Pole
+        IF( jp_cfg == 4   )   nxline =  24   ! i-line that passes near the North Pole
+        !                                         !=======================
+      ELSE                                        !   OTHER configurations 
+        !                                        ! =======================
+        nxline = 1
+        !
+      ENDIF
+
+      IF( nn_timing == 1 )   CALL timing_stop('dia_ptr_init')
+      !
+      ENDIF 
+      ! 
+   END SUBROUTINE dia_ptr_init
+
+#if defined key_iomput
+
+   SUBROUTINE dia_ptr_wri( kt )
+      !!---------------------------------------------------------------------
+      !!                ***  ROUTINE dia_ptr_wri  ***
+      !!
+      !! ** Purpose :   output of poleward fluxes
+      !!
+      !! ** Method  :   NetCDF file
+      !!----------------------------------------------------------------------
+      !!
+      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
+      !!
+      REAL(wp), POINTER, DIMENSION(:,:    ) :: z2d 
+      REAL(wp), POINTER, DIMENSION(:,:,:  ) :: z3d  
+      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: z4d 
+      !!----------------------------------------------------------------------
+
+
+      CALL wrk_alloc( jpi, jpj, jpk, nptr, z4d )
+      CALL wrk_alloc( jpi, jpj,      nptr, z3d )
+      CALL wrk_alloc( jpi, jpj,            z2d )
+      !
+      z4d(:,:,:,:) = 0._wp
+      z3d(:,:,:  ) = 0._wp
+      z2d(:,:    ) = 0._wp
+      !
+      IF( ln_diaznl ) THEN 
+        !
+        z4d(nxline,:,:,1) = sjk(:,:,1)
+        CALL iom_put( 'zosrfglo', z4d(:,:,:,1) )
+        z4d(nxline,:,:,1) = tn_jk(:,:,1)
+        CALL iom_put( 'zotemglo', z4d(:,:,:,1) )
+        z4d(nxline,:,:,1) = sn_jk(:,:,1)
+        CALL iom_put( 'zosalglo', z4d(:,:,:,1) )
+        ! overturning outputs:
+        z4d(nxline,:,:,1) = v_msf(:,:,1)
+        CALL iom_put( 'zomsfglo', z4d(:,:,:,1) )
+#if defined key_diaeiv
+        z4d(nxline,:,:,1) = v_msf_eiv(:,:,1)
+        CALL iom_put( 'zomsfeiv', z4d(:,:,:,1) )
+#endif
+        IF (ln_subbas) THEN 
+           !
+           z4d(nxline,:,:,2) = sjk(:,:,2)
+           z4d(nxline,:,:,3) = sjk(:,:,3)
+           z4d(nxline,:,:,4) = sjk(:,:,4)
+           z4d(nxline,:,:,5) = sjk(:,:,5)
+           CALL iom_put( 'zosrfatl', z4d(:,:,:,2) )
+           CALL iom_put( 'zosrfpac', z4d(:,:,:,3) )
+           CALL iom_put( 'zosrfind', z4d(:,:,:,4) )
+           CALL iom_put( 'zosrfipc', z4d(:,:,:,5) )
+           !
+           z4d(nxline,:,:,2) = tn_jk(:,:,2)
+           z4d(nxline,:,:,3) = tn_jk(:,:,3)
+           z4d(nxline,:,:,4) = tn_jk(:,:,4)
+           z4d(nxline,:,:,5) = tn_jk(:,:,5)
+           CALL iom_put( 'zotematl', z4d(:,:,:,2) )
+           CALL iom_put( 'zotempac', z4d(:,:,:,3) )
+           CALL iom_put( 'zotemind', z4d(:,:,:,4) )
+           CALL iom_put( 'zotemipc', z4d(:,:,:,5) )
+           !
+           z4d(nxline,:,:,2) = sn_jk(:,:,2)
+           z4d(nxline,:,:,3) = sn_jk(:,:,3)
+           z4d(nxline,:,:,4) = sn_jk(:,:,4)
+           z4d(nxline,:,:,5) = sn_jk(:,:,5)
+           CALL iom_put( 'zosalatl', z4d(:,:,:,2) )
+           CALL iom_put( 'zosalpac', z4d(:,:,:,3) )
+           CALL iom_put( 'zosalind', z4d(:,:,:,4) )
+           CALL iom_put( 'zosalipc', z4d(:,:,:,5) )
+           !
+           z4d(nxline,:,:,2) = v_msf(:,:,2)
+           z4d(nxline,:,:,3) = v_msf(:,:,3)
+           z4d(nxline,:,:,4) = v_msf(:,:,4)
+           z4d(nxline,:,:,5) = v_msf(:,:,5)
+           CALL iom_put( 'zomsfatl', z4d(:,:,:,2) )
+           CALL iom_put( 'zomsfpac', z4d(:,:,:,3) )
+           CALL iom_put( 'zomsfind', z4d(:,:,:,4) )
+           CALL iom_put( 'zomsfipc', z4d(:,:,:,5) )
+        END IF
+     ENDIF
+
+     ! heat transport outputs:
+     IF( ln_subbas ) THEN
+        !
+        z3d(nxline,:,2) = htr(:,2)
+        z3d(nxline,:,3) = htr(:,3)
+        z3d(nxline,:,4) = htr(:,4)
+        z3d(nxline,:,5) = htr(:,5)
+        CALL iom_put( 'sohtatl', z3d(:,:,2) )
+        CALL iom_put( 'sohtpac', z3d(:,:,3) )
+        CALL iom_put( 'sohtind', z3d(:,:,4) )
+        CALL iom_put( 'sohtipc', z3d(:,:,5) )
+        !
+        z3d(nxline,:,2) = str(:,2)
+        z3d(nxline,:,3) = str(:,3)
+        z3d(nxline,:,4) = str(:,4)
+        z3d(nxline,:,5) = str(:,5)
+        CALL iom_put( 'sostatl', z3d(:,:,2) )
+        CALL iom_put( 'sostpac', z3d(:,:,3) )
+        CALL iom_put( 'sostind', z3d(:,:,4) )
+        CALL iom_put( 'sostipc', z3d(:,:,5) )
+        !
+     ENDIF
+#if defined key_diaeiv
+     z3d(nxline,:,1) = htr_eiv(:,1)
+     CALL iom_put( 'sophteiv', z3d(:,:,1) )
+     !
+     z3d(nxline,:,1) = str_eiv(:,1)
+     CALL iom_put( 'sopsteiv', z3d(:,:,1) )
+#endif
+     z2d(nxline,:) = htr_adv(:)
+     CALL iom_put( 'sophtadv', z2d(:,:) )
+     z2d(nxline,:) = htr_ldf(:)
+     CALL iom_put( 'sophtldf', z2d(:,:) )
+     !
+     z2d(nxline,:) = str_adv(:)
+     CALL iom_put( 'sopstadv', z2d(:,:) )
+     z2d(nxline,:) = str_ldf(:)
+     CALL iom_put( 'sopstldf', z2d(:,:) )
+     !
+     IF( ln_ptrcomp ) THEN 
+        z2d(nxline,:) = htr_ove(:)
+        CALL iom_put( 'sophtove', z2d(:,:) )
+        !
+        z2d(nxline,:) = str_ove(:)
+        CALL iom_put( 'sopstove', z2d(:,:) )
+     ENDIF
+    !
+    CALL wrk_dealloc( jpi, jpj, jpk, nptr, z4d )
+    CALL wrk_dealloc( jpi, jpj,      nptr, z3d )
+    CALL wrk_dealloc( jpi, jpj,            z2d )
+
+   END SUBROUTINE dia_ptr_wri
+
+#else
+
+   SUBROUTINE dia_ptr_wri( kt )
+      !!---------------------------------------------------------------------
+      !!                ***  ROUTINE dia_ptr_wri  ***
+      !!
+      !! ** Purpose :   output of poleward fluxes
+      !!
+      !! ** Method  :   NetCDF file
+      !!----------------------------------------------------------------------
+      !!
+      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
+      !!
+      INTEGER, SAVE ::   nhoridz, ndepidzt, ndepidzw
+      INTEGER, SAVE ::   ndim  , ndim_atl     , ndim_pac     , ndim_ind     , ndim_ipc
+      INTEGER, SAVE ::           ndim_atl_30  , ndim_pac_30  , ndim_ind_30  , ndim_ipc_30
+      INTEGER, SAVE ::   ndim_h, ndim_h_atl_30, ndim_h_pac_30, ndim_h_ind_30, ndim_h_ipc_30
+      !!
+      CHARACTER (len=40) ::   clhstnam, clop, clop_once, cl_comment   ! temporary names
+      INTEGER            ::   it, itmod, ji, jj, jk            !
+#if defined key_iomput
+      INTEGER            ::   inum                                    ! temporary logical unit
+#endif
+      REAL(wp)           ::   zsto, zout, zdt, zjulian                ! temporary scalars
+      !!
+      REAL(wp), POINTER, DIMENSION(:)   ::   zphi, zfoo    ! 1D workspace
+      REAL(wp), POINTER, DIMENSION(:,:) ::   z_1           ! 2D workspace
+#if defined key_mpp_mpi
+      INTEGER, DIMENSION(1) :: iglo, iloc, iabsf, iabsl, ihals, ihale, idid
+#endif
+
+      !!-------------------------------------------------------------------- 
+      !
+      CALL wrk_alloc( jpj      , zphi, zfoo )
+      CALL wrk_alloc( jpj , jpk, z_1        )
+
+      ! define time axis
+      it    = kt / nn_fptr
+      itmod = kt - nit000 + 1
+      
+      ! Initialization
+      ! --------------
+      IF( kt == nit000 ) THEN
+         niter = ( nit000 - 1 ) / nn_fptr
+         zdt = rdt
+         IF( nacc == 1 )   zdt = rdtmin
+         !
+         IF(lwp) THEN
+            WRITE(numout,*)
+            WRITE(numout,*) 'dia_ptr_wri : poleward transport and msf writing: initialization , niter = ', niter
+            WRITE(numout,*) '~~~~~~~~~~~~'
+         ENDIF
+         !
+#if defined key_mpp_mpi 
+         iglo (1) = jpjglo                   ! MPP case using MPI  ('key_mpp_mpi')
+         iloc (1) = nlcj
+         iabsf(1) = njmppt(narea)
+         iabsl(:) = iabsf(:) + iloc(:) - 1
+         ihals(1) = nldj - 1
+         ihale(1) = nlcj - nlej
+         idid (1) = 2
+         CALL flio_dom_set( jpnj, nproc/jpni, idid, iglo, iloc, iabsf, iabsl, ihals, ihale, 'BOX', nidom_ptr )
+#else
+         nidom_ptr = FLIO_DOM_NONE
+#endif
+
+         ! Reference latitude (used in plots)
+         ! ------------------
+         !                                           ! =======================
+         IF( cp_cfg == "orca" ) THEN                 !   ORCA configurations
+           !                                        ! =======================
+           zphi(1:jpj) = 0._wp
+           DO ji = mi0(nxline), mi1(nxline) 
+              zphi(1:jpj) = gphiv(ji,:)         ! if nxline is in the local domain
+              ! Correct highest latitude for some configurations - will work if domain is parallelized in J ?
+              IF( jp_cfg == 05 ) THEN
+                 DO jj = mj0(jpjdta), mj1(jpjdta) 
+                    zphi( jj ) = zphi(mj0(jpjdta-1)) + ( zphi(mj0(jpjdta-1))-zphi(mj0(jpjdta-2)) ) * 0.5_wp
+                    zphi( jj ) = MIN( zphi(jj), 90._wp )
+                 END DO
+              END IF
+              IF( jp_cfg == 1 .OR. jp_cfg == 2 .OR. jp_cfg == 4 ) THEN
+                 DO jj = mj0(jpjdta-1), mj1(jpjdta-1) 
+                    zphi( jj ) = 88.5_wp
+                 END DO
+                 DO jj = mj0(jpjdta  ), mj1(jpjdta  ) 
+                    zphi( jj ) = 89.5_wp
+                 END DO
+              END IF
+           END DO
+           ! provide the correct zphi to all local domains
+#if defined key_mpp_mpi
+           CALL mpp_sum( zphi, jpj, ncomm_znl )        
+#endif
+           !                                        ! =======================
+         ELSE                                       !   OTHER configurations 
+           !                                        ! =======================
+           zphi(1:jpj) = gphiv(1,:)             ! assume lat/lon coordinate, select the first i-line
+           !
+         ENDIF
+
+         ! Work only on westmost processor (will not work if mppini2 is used)
+#if defined key_mpp_mpi
+         IF( l_znl_root ) THEN 
+#endif
+            !
+            ! OPEN netcdf file 
+            ! ----------------
+            ! Define frequency of output and means
+            zsto = nn_fptr * zdt
+            IF( ln_mskland )   THEN    ! put 1.e+20 on land (very expensive!!)
+               clop      = "ave(only(x))"
+               clop_once = "once(only(x))"
+            ELSE                       ! no use of the mask value (require less cpu time)
+               clop      = "ave(x)"       
+               clop_once = "once"
+            ENDIF
+
+            zout = nn_fwri * zdt
+            zfoo(1:jpj) = 0._wp
+
+            CALL ymds2ju( nyear, nmonth, nday, rdt, zjulian )  ! Compute julian date from starting date of the run
+            zjulian = zjulian - adatrj                         ! set calendar origin to the beginning of the experiment
+
+#if defined key_iomput
+            ! Requested by IPSL people, use by their postpro...
+            IF(lwp) THEN
+               CALL dia_nam( clhstnam, nn_fwri,' ' )
+               CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
+               WRITE(inum,*) clhstnam
+               CLOSE(inum)
+            ENDIF
+#endif
+
+            CALL dia_nam( clhstnam, nn_fwri, 'diaptr' )
+            IF(lwp)WRITE( numout,*)" Name of diaptr NETCDF file : ", clhstnam
+
+            ! Horizontal grid : zphi()
+            CALL histbeg(clhstnam, 1, zfoo, jpj, zphi,   &
+               1, 1, 1, jpj, niter, zjulian, zdt*nn_fptr, nhoridz, numptr, domain_id=nidom_ptr)
+            ! Vertical grids : gdept_1d, gdepw_1d
+            CALL histvert( numptr, "deptht", "Vertical T levels",   &
+               &                   "m", jpk, gdept_1d, ndepidzt, "down" )
+            CALL histvert( numptr, "depthw", "Vertical W levels",   &
+               &                   "m", jpk, gdepw_1d, ndepidzw, "down" )
+            !
+            CALL wheneq ( jpj*jpk, MIN(sjk(:,:,1), 1._wp), 1, 1., ndex  , ndim  )      ! Lat-Depth
+            CALL wheneq ( jpj    , MIN(sjk(:,1,1), 1._wp), 1, 1., ndex_h, ndim_h )     ! Lat
+
+            IF( ln_subbas ) THEN
+               z_1(:,1) = 1._wp
+               WHERE ( gphit(jpi/2,:) < -30._wp )   z_1(:,1) = 0._wp
+               DO jk = 2, jpk
+                  z_1(:,jk) = z_1(:,1)
+               END DO
+               !                       ! Atlantic (jn=2)
+               CALL wheneq ( jpj*jpk, MIN(sjk(:,:,2)         , 1._wp), 1, 1., ndex_atl     , ndim_atl      ) ! Lat-Depth
+               CALL wheneq ( jpj*jpk, MIN(sjk(:,:,2)*z_1(:,:), 1._wp), 1, 1., ndex_atl_30  , ndim_atl_30   ) ! Lat-Depth
+               CALL wheneq ( jpj    , MIN(sjk(:,1,2)*z_1(:,1), 1._wp), 1, 1., ndex_h_atl_30, ndim_h_atl_30 ) ! Lat
+               !                       ! Pacific (jn=3)
+               CALL wheneq ( jpj*jpk, MIN(sjk(:,:,3)         , 1._wp), 1, 1., ndex_pac     , ndim_pac      ) ! Lat-Depth
+               CALL wheneq ( jpj*jpk, MIN(sjk(:,:,3)*z_1(:,:), 1._wp), 1, 1., ndex_pac_30  , ndim_pac_30   ) ! Lat-Depth
+               CALL wheneq ( jpj    , MIN(sjk(:,1,3)*z_1(:,1), 1._wp), 1, 1., ndex_h_pac_30, ndim_h_pac_30 ) ! Lat
+               !                       ! Indian (jn=4)
+               CALL wheneq ( jpj*jpk, MIN(sjk(:,:,4)         , 1._wp), 1, 1., ndex_ind     , ndim_ind      ) ! Lat-Depth
+               CALL wheneq ( jpj*jpk, MIN(sjk(:,:,4)*z_1(:,:), 1._wp), 1, 1., ndex_ind_30  , ndim_ind_30   ) ! Lat-Depth
+               CALL wheneq ( jpj    , MIN(sjk(:,1,4)*z_1(:,1), 1._wp), 1, 1., ndex_h_ind_30, ndim_h_ind_30 ) ! Lat
+               !                       ! Indo-Pacific (jn=5)
+               CALL wheneq ( jpj*jpk, MIN(sjk(:,:,5)         , 1._wp), 1, 1., ndex_ipc     , ndim_ipc      ) ! Lat-Depth
+               CALL wheneq ( jpj*jpk, MIN(sjk(:,:,5)*z_1(:,:), 1._wp), 1, 1., ndex_ipc_30  , ndim_ipc_30   ) ! Lat-Depth
+               CALL wheneq ( jpj    , MIN(sjk(:,1,5)*z_1(:,1), 1._wp), 1, 1., ndex_h_ipc_30, ndim_h_ipc_30 ) ! Lat
+            ENDIF
+            ! 
+#if defined key_diaeiv
+            cl_comment = ' (Bolus part included)'
+#else
+            cl_comment = '                      '
+#endif
+            IF( ln_diaznl ) THEN             !  Zonal mean T and S
+               CALL histdef( numptr, "zotemglo", "Zonal Mean Temperature","C" ,   &
+                  1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop, zsto, zout )
+               CALL histdef( numptr, "zosalglo", "Zonal Mean Salinity","PSU"  ,   &
+                  1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop, zsto, zout )
+
+               CALL histdef( numptr, "zosrfglo", "Zonal Mean Surface","m^2"   ,   &
+                  1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop_once, zsto, zout )
+               !
+               IF (ln_subbas) THEN 
+                  CALL histdef( numptr, "zotematl", "Zonal Mean Temperature: Atlantic","C" ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop, zsto, zout )
+                  CALL histdef( numptr, "zosalatl", "Zonal Mean Salinity: Atlantic","PSU"  ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop, zsto, zout )
+                  CALL histdef( numptr, "zosrfatl", "Zonal Mean Surface: Atlantic","m^2"   ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop_once, zsto, zout )
+
+                  CALL histdef( numptr, "zotempac", "Zonal Mean Temperature: Pacific","C"  ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop, zsto, zout )
+                  CALL histdef( numptr, "zosalpac", "Zonal Mean Salinity: Pacific","PSU"   ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop, zsto, zout )
+                  CALL histdef( numptr, "zosrfpac", "Zonal Mean Surface: Pacific","m^2"    ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop_once, zsto, zout )
+
+                  CALL histdef( numptr, "zotemind", "Zonal Mean Temperature: Indian","C"   ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop, zsto, zout )
+                  CALL histdef( numptr, "zosalind", "Zonal Mean Salinity: Indian","PSU"    ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop, zsto, zout )
+                  CALL histdef( numptr, "zosrfind", "Zonal Mean Surface: Indian","m^2"     ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop_once, zsto, zout )
+
+                  CALL histdef( numptr, "zotemipc", "Zonal Mean Temperature: Pacific+Indian","C" ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop, zsto, zout )
+                  CALL histdef( numptr, "zosalipc", "Zonal Mean Salinity: Pacific+Indian","PSU"  ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop, zsto, zout )
+                  CALL histdef( numptr, "zosrfipc", "Zonal Mean Surface: Pacific+Indian","m^2"   ,   &
+                     1, jpj, nhoridz, jpk, 1, jpk, ndepidzt, 32, clop_once, zsto, zout )
+               ENDIF
+            ENDIF
+            !
+            !  Meridional Stream-Function (Eulerian and Bolus)
+            CALL histdef( numptr, "zomsfglo", "Meridional Stream-Function: Global"//TRIM(cl_comment),"Sv" ,   &
+               1, jpj, nhoridz, jpk, 1, jpk, ndepidzw, 32, clop, zsto, zout )
+            IF( ln_subbas .AND. ln_diaznl ) THEN
+               CALL histdef( numptr, "zomsfatl", "Meridional Stream-Function: Atlantic"//TRIM(cl_comment),"Sv" ,   &
+                  1, jpj, nhoridz, jpk, 1, jpk, ndepidzw, 32, clop, zsto, zout )
+               CALL histdef( numptr, "zomsfpac", "Meridional Stream-Function: Pacific"//TRIM(cl_comment),"Sv"  ,   &
+                  1, jpj, nhoridz, jpk, 1, jpk, ndepidzw, 32, clop, zsto, zout )
+               CALL histdef( numptr, "zomsfind", "Meridional Stream-Function: Indian"//TRIM(cl_comment),"Sv"   ,   &
+                  1, jpj, nhoridz, jpk, 1, jpk, ndepidzw, 32, clop, zsto, zout )
+               CALL histdef( numptr, "zomsfipc", "Meridional Stream-Function: Indo-Pacific"//TRIM(cl_comment),"Sv" ,&
+                  1, jpj, nhoridz, jpk, 1, jpk, ndepidzw, 32, clop, zsto, zout )
+            ENDIF
+            !
+            !  Heat transport 
+            CALL histdef( numptr, "sophtadv", "Advective Heat Transport"      ,   &
+               "PW", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+            CALL histdef( numptr, "sophtldf", "Diffusive Heat Transport"      ,   &
+               "PW",1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+            IF ( ln_ptrcomp ) THEN 
+               CALL histdef( numptr, "sophtove", "Overturning Heat Transport"    ,   &
+                  "PW",1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+            END IF
+            IF( ln_subbas ) THEN
+               CALL histdef( numptr, "sohtatl", "Heat Transport Atlantic"//TRIM(cl_comment),  &
+                  "PW", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+               CALL histdef( numptr, "sohtpac", "Heat Transport Pacific"//TRIM(cl_comment) ,  &
+                  "PW", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+               CALL histdef( numptr, "sohtind", "Heat Transport Indian"//TRIM(cl_comment)  ,  &
+                  "PW", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+               CALL histdef( numptr, "sohtipc", "Heat Transport Pacific+Indian"//TRIM(cl_comment), &
+                  "PW", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+            ENDIF
+            !
+            !  Salt transport 
+            CALL histdef( numptr, "sopstadv", "Advective Salt Transport"      ,   &
+               "Giga g/s", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+            CALL histdef( numptr, "sopstldf", "Diffusive Salt Transport"      ,   &
+               "Giga g/s", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+            IF ( ln_ptrcomp ) THEN 
+               CALL histdef( numptr, "sopstove", "Overturning Salt Transport"    ,   &
+                  "Giga g/s", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+            END IF
+#if defined key_diaeiv
+            ! Eddy induced velocity
+            CALL histdef( numptr, "zomsfeiv", "Bolus Meridional Stream-Function: global",   &
+               "Sv"      , 1, jpj, nhoridz, jpk, 1, jpk, ndepidzw, 32, clop, zsto, zout )
+            CALL histdef( numptr, "sophteiv", "Bolus Advective Heat Transport",   &
+               "PW"      , 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+            CALL histdef( numptr, "sopsteiv", "Bolus Advective Salt Transport",   &
+               "Giga g/s", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+#endif
+            IF( ln_subbas ) THEN
+               CALL histdef( numptr, "sostatl", "Salt Transport Atlantic"//TRIM(cl_comment)      ,  &
+                  "Giga g/s", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+               CALL histdef( numptr, "sostpac", "Salt Transport Pacific"//TRIM(cl_comment)      ,   &
+                  "Giga g/s", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+               CALL histdef( numptr, "sostind", "Salt Transport Indian"//TRIM(cl_comment)      ,    &
+                  "Giga g/s", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+               CALL histdef( numptr, "sostipc", "Salt Transport Pacific+Indian"//TRIM(cl_comment),  &
+                  "Giga g/s", 1, jpj, nhoridz, 1, 1, 1, -99, 32, clop, zsto, zout )
+            ENDIF
+            !
+            CALL histend( numptr )
+            !
+#if defined key_mpp_mpi
+         END IF
+#endif
+      END IF
+
+#if defined key_mpp_mpi
+      IF( MOD( itmod, nn_fptr ) == 0 .AND. l_znl_root ) THEN
+#else
+      IF( MOD( itmod, nn_fptr ) == 0  ) THEN
+#endif
+         niter = niter + 1
+
+         IF( ln_diaznl ) THEN 
+            CALL histwrite( numptr, "zosrfglo", niter, sjk  (:,:,1) , ndim, ndex )
+            CALL histwrite( numptr, "zotemglo", niter, tn_jk(:,:,1)  , ndim, ndex )
+            CALL histwrite( numptr, "zosalglo", niter, sn_jk(:,:,1)  , ndim, ndex )
+
+            IF (ln_subbas) THEN 
+               CALL histwrite( numptr, "zosrfatl", niter, sjk(:,:,2), ndim_atl, ndex_atl )
+               CALL histwrite( numptr, "zosrfpac", niter, sjk(:,:,3), ndim_pac, ndex_pac )
+               CALL histwrite( numptr, "zosrfind", niter, sjk(:,:,4), ndim_ind, ndex_ind )
+               CALL histwrite( numptr, "zosrfipc", niter, sjk(:,:,5), ndim_ipc, ndex_ipc )
+
+               CALL histwrite( numptr, "zotematl", niter, tn_jk(:,:,2)  , ndim_atl, ndex_atl )
+               CALL histwrite( numptr, "zosalatl", niter, sn_jk(:,:,2)  , ndim_atl, ndex_atl )
+               CALL histwrite( numptr, "zotempac", niter, tn_jk(:,:,3)  , ndim_pac, ndex_pac )
+               CALL histwrite( numptr, "zosalpac", niter, sn_jk(:,:,3)  , ndim_pac, ndex_pac )
+               CALL histwrite( numptr, "zotemind", niter, tn_jk(:,:,4)  , ndim_ind, ndex_ind )
+               CALL histwrite( numptr, "zosalind", niter, sn_jk(:,:,4)  , ndim_ind, ndex_ind )
+               CALL histwrite( numptr, "zotemipc", niter, tn_jk(:,:,5)  , ndim_ipc, ndex_ipc )
+               CALL histwrite( numptr, "zosalipc", niter, sn_jk(:,:,5)  , ndim_ipc, ndex_ipc )
+            END IF
+         ENDIF
+
+         ! overturning outputs:
+         CALL histwrite( numptr, "zomsfglo", niter, v_msf(:,:,1), ndim, ndex )
+         IF( ln_subbas .AND. ln_diaznl ) THEN
+            CALL histwrite( numptr, "zomsfatl", niter, v_msf(:,:,2) , ndim_atl_30, ndex_atl_30 )
+            CALL histwrite( numptr, "zomsfpac", niter, v_msf(:,:,3) , ndim_pac_30, ndex_pac_30 )
+            CALL histwrite( numptr, "zomsfind", niter, v_msf(:,:,4) , ndim_ind_30, ndex_ind_30 )
+            CALL histwrite( numptr, "zomsfipc", niter, v_msf(:,:,5) , ndim_ipc_30, ndex_ipc_30 )
+         ENDIF
+#if defined key_diaeiv
+         CALL histwrite( numptr, "zomsfeiv", niter, v_msf_eiv(:,:,1), ndim  , ndex   )
+#endif
+
+         ! heat transport outputs:
+         IF( ln_subbas ) THEN
+            CALL histwrite( numptr, "sohtatl", niter, htr(:,2)  , ndim_h_atl_30, ndex_h_atl_30 )
+            CALL histwrite( numptr, "sohtpac", niter, htr(:,3)  , ndim_h_pac_30, ndex_h_pac_30 )
+            CALL histwrite( numptr, "sohtind", niter, htr(:,4)  , ndim_h_ind_30, ndex_h_ind_30 )
+            CALL histwrite( numptr, "sohtipc", niter, htr(:,5)  , ndim_h_ipc_30, ndex_h_ipc_30 )
+            CALL histwrite( numptr, "sostatl", niter, str(:,2)  , ndim_h_atl_30, ndex_h_atl_30 )
+            CALL histwrite( numptr, "sostpac", niter, str(:,3)  , ndim_h_pac_30, ndex_h_pac_30 )
+            CALL histwrite( numptr, "sostind", niter, str(:,4)  , ndim_h_ind_30, ndex_h_ind_30 )
+            CALL histwrite( numptr, "sostipc", niter, str(:,5)  , ndim_h_ipc_30, ndex_h_ipc_30 )
+         ENDIF
+
+         CALL histwrite( numptr, "sophtadv", niter, htr_adv     , ndim_h, ndex_h )
+         CALL histwrite( numptr, "sophtldf", niter, htr_ldf     , ndim_h, ndex_h )
+         CALL histwrite( numptr, "sopstadv", niter, str_adv     , ndim_h, ndex_h )
+         CALL histwrite( numptr, "sopstldf", niter, str_ldf     , ndim_h, ndex_h )
+         IF( ln_ptrcomp ) THEN 
+            CALL histwrite( numptr, "sopstove", niter, str_ove(:) , ndim_h, ndex_h )
+            CALL histwrite( numptr, "sophtove", niter, htr_ove(:) , ndim_h, ndex_h )
+         ENDIF
+#if defined key_diaeiv
+         CALL histwrite( numptr, "sophteiv", niter, htr_eiv(:,1)  , ndim_h, ndex_h )
+         CALL histwrite( numptr, "sopsteiv", niter, str_eiv(:,1)  , ndim_h, ndex_h )
+#endif
+         !
+      ENDIF
+
+      ! Close all files
+#if defined key_mpp_mpi
+      IF( kt == nitend .AND. l_znl_root )   CALL histclo( numptr )      ! Close the file
+#else
+      IF( kt == nitend )                    CALL histclo( numptr )      ! Close the file
+#endif
+      !
+      CALL wrk_dealloc( jpj      , zphi, zfoo )
+      CALL wrk_dealloc( jpj , jpk, z_1        )
+      !
+  END SUBROUTINE dia_ptr_wri
+
+#endif
+
+   !!======================================================================
+END MODULE diaptr
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/diaptr_oce.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/diaptr_oce.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/diaptr_oce.F90	(revision 2504)
@@ -0,0 +1,314 @@
+MODULE diaptr_oce
+   !!======================================================================
+   !!                       ***  MODULE  diaptr  ***
+   !! Ocean physics:  Computes meridonal transports and zonal means
+   !!=====================================================================
+   !! History :  1.0  ! 2003-09  (C. Talandier, G. Madec)  Original code
+   !!            2.0  ! 2006-01  (A. Biastoch)  Allow sub-basins computation
+   !!            3.2  ! 2010-03  (O. Marti, S. Flavoni) Add fields
+   !!            3.3  ! 2010-10  (G. Madec)  dynamical allocation
+   !!----------------------------------------------------------------------
+
+   USE par_oce
+   USE dom_oce
+   USE in_out_manager
+   USE lib_mpp
+   USE wrk_nemo
+
+   IMPLICIT NONE
+   PRIVATE
+
+   INTERFACE ptr_vj
+      MODULE PROCEDURE ptr_vj_3d, ptr_vj_2d
+   END INTERFACE
+
+   PUBLIC   ptr_vj         ! call by tra_ldf & tra_adv routines
+   PUBLIC   ptr_vjk        ! call by tra_ldf & tra_adv routines
+   PUBLIC   ptr_tjk        ! 
+   PUBLIC   dia_ptr_alloc   ! call in opa module
+   !                                  !!** namelist  namptr  **
+   LOGICAL , PUBLIC ::   ln_diaptr     !: Poleward transport flag (T) or not (F)
+   LOGICAL , PUBLIC ::   ln_subbas     !: Atlantic/Pacific/Indian basins calculation
+   LOGICAL , PUBLIC ::   ln_diaznl     !: Add zonal means and meridional stream functions
+   LOGICAL , PUBLIC ::   ln_ptrcomp    !: Add decomposition : overturning (and gyre, soon ...)
+   INTEGER , PUBLIC ::   nn_fptr       !: frequency of ptr computation  [time step]
+   INTEGER , PUBLIC ::   nn_fwri       !: frequency of ptr outputs      [time step]
+
+   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:) ::   htr_adv, htr_ldf, htr_ove   !: Heat TRansports (adv, diff, overturn.)
+   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:) ::   str_adv, str_ldf, str_ove   !: Salt TRansports (adv, diff, overturn.)
+   
+   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:,:) ::   btmsk                  ! T-point basin interior masks
+   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:)   ::   btm30                  ! mask out Southern Ocean (=0 south of 30°S)
+   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:)   ::   htr  , str             ! adv heat and salt transports (approx)
+   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:,:) ::   tn_jk, sn_jk , v_msf   ! i-mean T and S, j-Stream-Function
+   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:,:) ::   sjk  , r1_sjk          ! i-mean i-k-surface and its inverse        
+   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:)   ::   htr_eiv, str_eiv       ! bolus adv heat ans salt transports ('key_diaeiv')
+   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:,:) ::   v_msf_eiv              ! bolus j-streamfuction              ('key_diaeiv')
+
+
+   INTEGER, SAVE, PUBLIC :: nxline       !
+   INTEGER, PUBLIC ::   niter       !
+   INTEGER, PUBLIC ::   nidom_ptr   !
+   INTEGER, PUBLIC ::   numptr      ! logical unit for Poleward TRansports
+   INTEGER, PUBLIC ::   nptr        ! = 1 (ln_subbas=F) or = 5 (glo, atl, pac, ind, ipc) (ln_subbas=T) 
+
+   REAL(wp), PUBLIC ::   rc_sv    = 1.e-6_wp   ! conversion from m3/s to Sverdrup
+   REAL(wp), PUBLIC ::   rc_pwatt = 1.e-15_wp  ! conversion from W    to PW (further x rau0 x Cp)
+   REAL(wp), PUBLIC ::   rc_ggram = 1.e-6_wp   ! conversion from g    to Pg
+
+   REAL(wp), PUBLIC, TARGET, DIMENSION(:)  , ALLOCATABLE, SAVE :: p_fval1d
+   REAL(wp), PUBLIC, TARGET, DIMENSION(:,:), ALLOCATABLE, SAVE :: p_fval2d
+
+   !! Integer, 1D workspace arrays. Not common enough to be implemented in 
+   !! wrk_nemo module.
+   INTEGER, ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:) :: ndex  , ndex_atl     , ndex_pac     , ndex_ind     , ndex_ipc
+   INTEGER, ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:) ::         ndex_atl_30  , ndex_pac_30  , ndex_ind_30  , ndex_ipc_30
+   INTEGER, ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:) :: ndex_h, ndex_h_atl_30, ndex_h_pac_30, ndex_h_ind_30, ndex_h_ipc_30
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+
+CONTAINS
+
+   FUNCTION dia_ptr_alloc()
+      !!----------------------------------------------------------------------
+      !!                    ***  ROUTINE dia_ptr_alloc  ***
+      !!----------------------------------------------------------------------
+      INTEGER               ::   dia_ptr_alloc   ! return value
+      INTEGER, DIMENSION(6) ::   ierr
+      !!----------------------------------------------------------------------
+      ierr(:) = 0
+      !
+      ALLOCATE( btmsk(jpi,jpj,nptr) ,           &
+         &      htr_adv(jpj) , str_adv(jpj) ,   &
+         &      htr_ldf(jpj) , str_ldf(jpj) ,   &
+         &      htr_ove(jpj) , str_ove(jpj),    &
+         &      htr(jpj,nptr) , str(jpj,nptr) , &
+         &      tn_jk(jpj,jpk,nptr) , sn_jk (jpj,jpk,nptr) , v_msf(jpj,jpk,nptr) , &
+         &      sjk  (jpj,jpk,nptr) , r1_sjk(jpj,jpk,nptr) , STAT=ierr(1)  )
+         !
+#if defined key_diaeiv
+      ALLOCATE( htr_eiv(jpj,nptr) , str_eiv(jpj,nptr) , &
+         &      v_msf_eiv(jpj,jpk,nptr) , STAT=ierr(2) )
+#endif
+      ALLOCATE( p_fval1d(jpj), p_fval2d(jpj,jpk), Stat=ierr(3))
+      !
+      ALLOCATE( btm30(jpi,jpj), STAT=ierr(4)  )
+
+#if ! defined key_iomput
+      ALLOCATE(ndex(jpj*jpk),        ndex_atl(jpj*jpk), ndex_pac(jpj*jpk), &
+         &     ndex_ind(jpj*jpk),    ndex_ipc(jpj*jpk),                    &
+         &     ndex_atl_30(jpj*jpk), ndex_pac_30(jpj*jpk), Stat=ierr(5))
+
+      ALLOCATE(ndex_ind_30(jpj*jpk), ndex_ipc_30(jpj*jpk),                   &
+         &     ndex_h(jpj),          ndex_h_atl_30(jpj), ndex_h_pac_30(jpj), &
+         &     ndex_h_ind_30(jpj),   ndex_h_ipc_30(jpj), Stat=ierr(6) )
+         !
+#endif
+         !
+      dia_ptr_alloc = MAXVAL( ierr )
+      IF(lk_mpp)   CALL mpp_sum( dia_ptr_alloc )
+      !
+   END FUNCTION dia_ptr_alloc
+
+
+   FUNCTION ptr_vj_3d( pva )   RESULT ( p_fval )
+      !!----------------------------------------------------------------------
+      !!                    ***  ROUTINE ptr_vj_3d  ***
+      !!
+      !! ** Purpose :   i-k sum computation of a j-flux array
+      !!
+      !! ** Method  : - i-k sum of pva using the interior 2D vmask (vmask_i).
+      !!              pva is supposed to be a masked flux (i.e. * vmask*e1v*e3v)
+      !!
+      !! ** Action  : - p_fval: i-k-mean poleward flux of pva
+      !!----------------------------------------------------------------------
+      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj,jpk) ::   pva   ! mask flux array at V-point
+      !!
+      INTEGER                  ::   ji, jj, jk   ! dummy loop arguments
+      INTEGER                  ::   ijpj         ! ???
+      REAL(wp), POINTER, DIMENSION(:) :: p_fval  ! function value
+      !!--------------------------------------------------------------------
+      !
+      p_fval => p_fval1d
+
+      ijpj = jpj
+      p_fval(:) = 0._wp
+      DO jk = 1, jpkm1
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! Vector opt.
+               p_fval(jj) = p_fval(jj) + pva(ji,jj,jk) * tmask_i(ji,jj) 
+            END DO
+         END DO
+      END DO
+#if defined key_mpp_mpi
+      IF(lk_mpp)   CALL mpp_sum( p_fval, ijpj, ncomm_znl)
+#endif
+      !
+   END FUNCTION ptr_vj_3d
+
+
+   FUNCTION ptr_vj_2d( pva )   RESULT ( p_fval )
+      !!----------------------------------------------------------------------
+      !!                    ***  ROUTINE ptr_vj_2d  ***
+      !!
+      !! ** Purpose :   "zonal" and vertical sum computation of a i-flux array
+      !!
+      !! ** Method  : - i-k sum of pva using the interior 2D vmask (vmask_i).
+      !!      pva is supposed to be a masked flux (i.e. * vmask*e1v*e3v)
+      !!
+      !! ** Action  : - p_fval: i-k-mean poleward flux of pva
+      !!----------------------------------------------------------------------
+      IMPLICIT none
+      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj) ::   pva   ! mask flux array at V-point
+      !!
+      INTEGER                  ::   ji,jj       ! dummy loop arguments
+      INTEGER                  ::   ijpj        ! ???
+      REAL(wp), POINTER, DIMENSION(:) :: p_fval ! function value
+      !!--------------------------------------------------------------------
+      ! 
+      p_fval => p_fval1d
+
+      ijpj = jpj
+      p_fval(:) = 0._wp
+      DO jj = 2, jpjm1
+         DO ji = nldi, nlei   ! No vector optimisation here. Better use a mask ?
+            p_fval(jj) = p_fval(jj) + pva(ji,jj) * tmask_i(ji,jj)
+         END DO
+      END DO
+#if defined key_mpp_mpi
+      CALL mpp_sum( p_fval, ijpj, ncomm_znl )
+#endif
+      ! 
+   END FUNCTION ptr_vj_2d
+
+
+   FUNCTION ptr_vjk( pva, pmsk )   RESULT ( p_fval )
+      !!----------------------------------------------------------------------
+      !!                    ***  ROUTINE ptr_vjk  ***
+      !!
+      !! ** Purpose :   i-sum computation of a j-velocity array
+      !!
+      !! ** Method  : - i-sum of pva using the interior 2D vmask (vmask_i).
+      !!              pva is supposed to be a masked flux (i.e. * vmask)
+      !!
+      !! ** Action  : - p_fval: i-mean poleward flux of pva
+      !!----------------------------------------------------------------------
+      !!
+      IMPLICIT none
+      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj,jpk)           ::   pva    ! mask flux array at V-point
+      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj)    , OPTIONAL ::   pmsk   ! Optional 2D basin mask
+      !!
+      INTEGER                           :: ji, jj, jk ! dummy loop arguments
+      REAL(wp), POINTER, DIMENSION(:,:) :: p_fval     ! return function value
+#if defined key_mpp_mpi
+      INTEGER, DIMENSION(1) ::   ish
+      INTEGER, DIMENSION(2) ::   ish2
+      INTEGER               ::   ijpjjpk
+#endif
+#if defined key_mpp_mpi
+      REAL(wp), POINTER, DIMENSION(:) ::   zwork    ! mask flux array at V-point
+#endif
+      !!--------------------------------------------------------------------
+      !
+#if defined key_mpp_mpi
+      ijpjjpk = jpj*jpk
+      CALL wrk_alloc( jpj*jpk, zwork )
+#endif
+
+      p_fval => p_fval2d
+
+      p_fval(:,:) = 0._wp
+      !
+      IF( PRESENT( pmsk ) ) THEN 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+!!gm here, use of tmask_i  ==> no need of loop over nldi, nlei....
+               DO ji =  nldi, nlei   ! No vector optimisation here. Better use a mask ?
+                  p_fval(jj,jk) = p_fval(jj,jk) + pva(ji,jj,jk) * e1v(ji,jj) * fse3v(ji,jj,jk) * pmsk(ji,jj)
+               END DO
+            END DO
+         END DO
+      ELSE 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji =  nldi, nlei   ! No vector optimisation here. Better use a mask ?
+                  p_fval(jj,jk) = p_fval(jj,jk) + pva(ji,jj,jk) * e1v(ji,jj) * fse3v(ji,jj,jk) * tmask_i(ji,jj)
+               END DO
+            END DO
+         END DO
+      END IF
+      !
+#if defined key_mpp_mpi
+      ijpjjpk = jpj*jpk
+      ish(1) = ijpjjpk  ;   ish2(1) = jpj   ;   ish2(2) = jpk
+      zwork(1:ijpjjpk) = RESHAPE( p_fval, ish )
+      CALL mpp_sum( zwork, ijpjjpk, ncomm_znl )
+      p_fval(:,:) = RESHAPE( zwork, ish2 )
+#endif
+      !
+#if defined key_mpp_mpi
+      CALL wrk_dealloc( jpj*jpk, zwork )
+#endif
+      !
+   END FUNCTION ptr_vjk
+
+
+   FUNCTION ptr_tjk( pta, pmsk )   RESULT ( p_fval )
+      !!----------------------------------------------------------------------
+      !!                    ***  ROUTINE ptr_tjk  ***
+      !!
+      !! ** Purpose :   i-sum computation of e1t*e3t * a tracer field
+      !!
+      !! ** Method  : - i-sum of mj(pta) using tmask
+      !!
+      !! ** Action  : - p_fval: i-sum of e1t*e3t*pta
+      !!----------------------------------------------------------------------
+      !!
+      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj,jpk) ::   pta    ! tracer flux array at T-point
+      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj)     ::   pmsk   ! Optional 2D basin mask
+      !!
+      INTEGER                           :: ji, jj, jk   ! dummy loop arguments
+      REAL(wp), POINTER, DIMENSION(:,:) :: p_fval       ! return function value
+#if defined key_mpp_mpi
+      INTEGER, DIMENSION(1) ::   ish
+      INTEGER, DIMENSION(2) ::   ish2
+      INTEGER               ::   ijpjjpk
+#endif
+#if defined key_mpp_mpi
+      REAL(wp), POINTER, DIMENSION(:) ::   zwork    ! mask flux array at V-point
+#endif
+      !!-------------------------------------------------------------------- 
+      !
+#if defined key_mpp_mpi
+      ijpjjpk = jpj*jpk
+      CALL wrk_alloc( jpj*jpk, zwork )
+#endif
+
+      p_fval => p_fval2d
+
+      p_fval(:,:) = 0._wp
+      DO jk = 1, jpkm1
+         DO jj = 2, jpjm1
+            DO ji =  nldi, nlei   ! No vector optimisation here. Better use a mask ?
+               p_fval(jj,jk) = p_fval(jj,jk) + pta(ji,jj,jk) * e1t(ji,jj) * fse3t(ji,jj,jk) * pmsk(ji,jj)
+            END DO
+         END DO
+      END DO
+#if defined key_mpp_mpi
+      ijpjjpk = jpj*jpk
+      ish(1) = jpj*jpk   ;   ish2(1) = jpj   ;   ish2(2) = jpk
+      zwork(1:ijpjjpk)= RESHAPE( p_fval, ish )
+      CALL mpp_sum( zwork, ijpjjpk, ncomm_znl )
+      p_fval(:,:)= RESHAPE( zwork, ish2 )
+#endif
+      !
+#if defined key_mpp_mpi
+      CALL wrk_dealloc( jpj*jpk, zwork )
+#endif
+      !    
+   END FUNCTION ptr_tjk
+
+   !!======================================================================
+END MODULE diaptr_oce
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/iom.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/iom.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/iom.F90	(revision 2504)
@@ -0,0 +1,1530 @@
+MODULE iom
+   !!=====================================================================
+   !!                    ***  MODULE  iom ***
+   !! Input/Output manager :  Library to read input files
+   !!====================================================================
+   !! History :  2.0  ! 2005-12  (J. Belier) Original code
+   !!            2.0  ! 2006-02  (S. Masson) Adaptation to NEMO
+   !!            3.0  ! 2007-07  (D. Storkey) Changes to iom_gettime
+   !!            3.4  ! 2012-12  (R. Bourdalle-Badie and G. Reffray)  add C1D case  
+   !!--------------------------------------------------------------------
+
+   !!--------------------------------------------------------------------
+   !!   iom_open       : open a file read only
+   !!   iom_close      : close a file or all files opened by iom
+   !!   iom_get        : read a field (interfaced to several routines)
+   !!   iom_gettime    : read the time axis cdvar in the file
+   !!   iom_varid      : get the id of a variable in a file
+   !!   iom_rstput     : write a field in a restart file (interfaced to several routines)
+   !!--------------------------------------------------------------------
+   USE dom_oce         ! ocean space and time domain
+   USE c1d             ! 1D vertical configuration
+   USE flo_oce         ! floats module declarations
+   USE lbclnk          ! lateal boundary condition / mpp exchanges
+   USE iom_def         ! iom variables definitions
+   USE iom_ioipsl      ! NetCDF format with IOIPSL library
+   USE iom_nf90        ! NetCDF format with native NetCDF library
+   USE iom_rstdimg     ! restarts access direct format "dimg" style...
+   USE in_out_manager  ! I/O manager
+   USE lib_mpp           ! MPP library
+#if defined key_iomput
+   USE sbc_oce    , ONLY :   nn_fsbc         ! ocean space and time domain
+   USE trc_oce    , ONLY :   nn_dttrc        !  !: frequency of step on passive tracers
+   USE icb_oce    , ONLY :   nclasses, class_num       !  !: iceberg classes
+   USE diaptr_oce , ONLY :   nn_fptr, nxline         ! ocean space and time domain
+#if defined key_lim3
+   USE par_ice
+#elif defined key_lim2
+   USE par_ice_2
+#endif
+   USE domngb          ! ocean space and time domain
+   USE phycst          ! physical constants
+   USE dianam          ! build name of file
+   USE xios
+# endif
+   USE ioipsl, ONLY :  ju2ymds    ! for calendar
+   USE crs             ! Grid coarsening
+
+   IMPLICIT NONE
+   PUBLIC   !   must be public to be able to access iom_def through iom
+   
+#if defined key_iomput
+   LOGICAL, PUBLIC, PARAMETER ::   lk_iomput = .TRUE.        !: iom_put flag
+#else
+   LOGICAL, PUBLIC, PARAMETER ::   lk_iomput = .FALSE.       !: iom_put flag
+#endif
+   PUBLIC iom_init, iom_swap, iom_open, iom_close, iom_setkt, iom_varid, iom_get, iom_gettime, iom_rstput, iom_put
+   PUBLIC iom_getatt, iom_use, iom_context_finalize
+
+   PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d
+   PRIVATE iom_g0d, iom_g1d, iom_g2d, iom_g3d, iom_get_123d
+   PRIVATE iom_p1d, iom_p2d, iom_p3d
+#if defined key_iomput
+   PRIVATE iom_set_domain_attr, iom_set_axis_attr, iom_set_field_attr, iom_set_file_attr, iom_get_file_attr, iom_set_grid_attr
+   PRIVATE set_grid, set_scalar, set_xmlatt, set_mooring, iom_update_file_name, iom_sdate
+# endif
+
+   INTERFACE iom_get
+      MODULE PROCEDURE iom_g0d, iom_g1d, iom_g2d, iom_g3d
+   END INTERFACE
+   INTERFACE iom_getatt
+      MODULE PROCEDURE iom_g0d_intatt
+   END INTERFACE
+   INTERFACE iom_rstput
+      MODULE PROCEDURE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d
+   END INTERFACE
+  INTERFACE iom_put
+     MODULE PROCEDURE iom_p0d, iom_p1d, iom_p2d, iom_p3d
+  END INTERFACE
+
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: iom.F90 4691 2014-06-25 12:31:42Z clem $
+   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
+CONTAINS
+
+   SUBROUTINE iom_init( cdname ) 
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE   ***
+      !!
+      !! ** Purpose :   
+      !!
+      !!----------------------------------------------------------------------
+      CHARACTER(len=*), INTENT(in)  :: cdname
+#if defined key_iomput
+      TYPE(xios_time)   :: dtime    = xios_time(0, 0, 0, 0, 0, 0)
+      CHARACTER(len=19) :: cldate 
+      CHARACTER(len=10) :: clname
+      INTEGER           ::   ji
+      !!----------------------------------------------------------------------
+
+      clname = cdname
+      IF( TRIM(Agrif_CFixed()) /= '0' )   clname = TRIM(Agrif_CFixed())//"_"//TRIM(cdname)
+# if defined key_mpp_mpi
+      CALL xios_context_initialize(TRIM(clname), mpi_comm_opa)
+# else
+      CALL xios_context_initialize(TRIM(clname), 0)
+# endif
+      CALL iom_swap( cdname )
+
+      ! calendar parameters
+      SELECT CASE ( nleapy )        ! Choose calendar for IOIPSL
+      CASE ( 1)   ;   CALL xios_set_context_attr(TRIM(clname), calendar_type= "Gregorian")
+      CASE ( 0)   ;   CALL xios_set_context_attr(TRIM(clname), calendar_type= "NoLeap")
+      CASE (30)   ;   CALL xios_set_context_attr(TRIM(clname), calendar_type= "D360")
+      END SELECT
+      WRITE(cldate,"(i4.4,'-',i2.2,'-',i2.2,' 00:00:00')") nyear,nmonth,nday 
+      CALL xios_set_context_attr(TRIM(clname), start_date=cldate )
+
+      ! horizontal grid definition
+      CALL set_scalar
+
+      IF( TRIM(cdname) == "nemo" ) THEN  
+         CALL set_grid( "T", glamt, gphit ) 
+         CALL set_grid( "U", glamu, gphiu )
+         CALL set_grid( "V", glamv, gphiv )
+         CALL set_grid( "W", glamt, gphit )
+      ENDIF
+
+      IF( TRIM(cdname) == "nemo_crs" ) THEN  
+         CALL dom_grid_crs   ! Save the parent grid information  & Switch to coarse grid domain
+         !
+         CALL set_grid( "T", glamt_crs, gphit_crs ) 
+         CALL set_grid( "U", glamu_crs, gphiu_crs ) 
+         CALL set_grid( "V", glamv_crs, gphiv_crs ) 
+         CALL set_grid( "W", glamt_crs, gphit_crs ) 
+          !
+         CALL dom_grid_glo   ! Return to parent grid domain
+      ENDIF
+
+
+      ! vertical grid definition
+      CALL iom_set_axis_attr( "deptht", gdept_1d )
+      CALL iom_set_axis_attr( "depthu", gdept_1d )
+      CALL iom_set_axis_attr( "depthv", gdept_1d )
+      CALL iom_set_axis_attr( "depthw", gdepw_1d )
+# if defined key_floats
+      CALL iom_set_axis_attr( "nfloat", (/ (REAL(ji,wp), ji=1,nfloat) /) )
+# endif
+#if defined key_lim3 || defined key_lim2
+      CALL iom_set_axis_attr( "ncatice", (/ (REAL(ji,wp), ji=1,jpl) /) )
+#endif
+      CALL iom_set_axis_attr( "icbcla", class_num )
+      
+      ! automatic definitions of some of the xml attributs
+      CALL set_xmlatt
+
+      ! end file definition
+      dtime%second = rdt
+      CALL xios_set_timestep(dtime)
+      CALL xios_close_context_definition()
+      
+      CALL xios_update_calendar(0)
+#endif
+      
+   END SUBROUTINE iom_init
+
+
+   SUBROUTINE iom_swap( cdname )
+      !!---------------------------------------------------------------------
+      !!                   ***  SUBROUTINE  iom_swap  ***
+      !!
+      !! ** Purpose :  swap context between different agrif grid for xmlio_server
+      !!---------------------------------------------------------------------
+      CHARACTER(len=*), INTENT(in) :: cdname
+#if defined key_iomput
+      TYPE(xios_context) :: nemo_hdl
+
+      IF( TRIM(Agrif_CFixed()) == '0' ) THEN
+        CALL xios_get_handle(TRIM(cdname),nemo_hdl)
+      ELSE
+        CALL xios_get_handle(TRIM(Agrif_CFixed())//"_"//TRIM(cdname),nemo_hdl)
+      ENDIF
+      !
+      CALL xios_set_current_context(nemo_hdl)
+#endif
+      !
+   END SUBROUTINE iom_swap
+
+
+   SUBROUTINE iom_open( cdname, kiomid, ldwrt, kdom, kiolib, ldstop, ldiof )
+      !!---------------------------------------------------------------------
+      !!                   ***  SUBROUTINE  iom_open  ***
+      !!
+      !! ** Purpose :  open an input file (return 0 if not found)
+      !!---------------------------------------------------------------------
+      CHARACTER(len=*), INTENT(in   )           ::   cdname   ! File name
+      INTEGER         , INTENT(  out)           ::   kiomid   ! iom identifier of the opened file
+      LOGICAL         , INTENT(in   ), OPTIONAL ::   ldwrt    ! open in write modeb          (default = .FALSE.)
+      INTEGER         , INTENT(in   ), OPTIONAL ::   kdom     ! Type of domain to be written (default = jpdom_local_noovlap)
+      INTEGER         , INTENT(in   ), OPTIONAL ::   kiolib   ! library used to open the file (default = jpnf90) 
+      LOGICAL         , INTENT(in   ), OPTIONAL ::   ldstop   ! stop if open to read a non-existing file (default = .TRUE.)
+      LOGICAL         , INTENT(in   ), OPTIONAL ::   ldiof    ! Interp On the Fly, needed for AGRIF (default = .FALSE.)
+
+      CHARACTER(LEN=256)    ::   clname    ! the name of the file based on cdname [[+clcpu]+clcpu]
+      CHARACTER(LEN=256)    ::   cltmpn    ! tempory name to store clname (in writting mode)
+      CHARACTER(LEN=10)     ::   clsuffix  ! ".nc" or ".dimg"
+      CHARACTER(LEN=15)     ::   clcpu     ! the cpu number (max jpmax_digits digits)
+      CHARACTER(LEN=256)    ::   clinfo    ! info character
+      LOGICAL               ::   llok      ! check the existence 
+      LOGICAL               ::   llwrt     ! local definition of ldwrt
+      LOGICAL               ::   llnoov    ! local definition to read overlap
+      LOGICAL               ::   llstop    ! local definition of ldstop
+      LOGICAL               ::   lliof     ! local definition of ldiof
+      INTEGER               ::   iolib     ! library do we use to open the file
+      INTEGER               ::   icnt      ! counter for digits in clcpu (max = jpmax_digits)
+      INTEGER               ::   iln, ils  ! lengths of character
+      INTEGER               ::   idom      ! type of domain
+      INTEGER               ::   istop     ! 
+      INTEGER, DIMENSION(2,5) ::   idompar ! domain parameters: 
+      ! local number of points for x,y dimensions
+      ! position of first local point for x,y dimensions
+      ! position of last local point for x,y dimensions
+      ! start halo size for x,y dimensions
+      ! end halo size for x,y dimensions
+      !---------------------------------------------------------------------
+      ! Initializations and control
+      ! =============
+      kiomid = -1
+      clinfo = '                    iom_open ~~~  '
+      istop = nstop
+      ! if iom_open is called for the first time: initialize iom_file(:)%nfid to 0
+      ! (could be done when defining iom_file in f95 but not in f90)
+      IF( Agrif_Root() ) THEN
+         IF( iom_open_init == 0 ) THEN
+            iom_file(:)%nfid = 0
+            iom_open_init = 1
+         ENDIF
+      ENDIF
+      ! do we read or write the file?
+      IF( PRESENT(ldwrt) ) THEN   ;   llwrt = ldwrt
+      ELSE                        ;   llwrt = .FALSE.
+      ENDIF
+      ! do we call ctl_stop if we try to open a non-existing file in read mode?
+      IF( PRESENT(ldstop) ) THEN   ;   llstop = ldstop
+      ELSE                         ;   llstop = .TRUE.
+      ENDIF
+      ! what library do we use to open the file?
+      IF( PRESENT(kiolib) ) THEN   ;   iolib = kiolib
+      ELSE                         ;   iolib = jpnf90
+      ENDIF
+      ! are we using interpolation on the fly?
+      IF( PRESENT(ldiof) ) THEN   ;   lliof = ldiof
+      ELSE                        ;   lliof = .FALSE.
+      ENDIF
+      ! do we read the overlap 
+      ! ugly patch SM+JMM+RB to overwrite global definition in some cases
+      llnoov = (jpni * jpnj ) == jpnij .AND. .NOT. lk_agrif 
+      ! create the file name by added, if needed, TRIM(Agrif_CFixed()) and TRIM(clsuffix)
+      ! =============
+      clname   = trim(cdname)
+      IF ( .NOT. Agrif_Root() .AND. .NOT. lliof ) THEN
+         iln    = INDEX(clname,'/') 
+         cltmpn = clname(1:iln)
+         clname = clname(iln+1:LEN_TRIM(clname))
+         clname=TRIM(cltmpn)//TRIM(Agrif_CFixed())//'_'//TRIM(clname)
+      ENDIF
+      ! which suffix should we use?
+      SELECT CASE (iolib)
+      CASE (jpioipsl ) ;   clsuffix = '.nc'
+      CASE (jpnf90   ) ;   clsuffix = '.nc'
+      CASE (jprstdimg) ;   clsuffix = '.dimg'
+      CASE DEFAULT     ;   clsuffix = ''
+         CALL ctl_stop( TRIM(clinfo), 'accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+      END SELECT
+      ! Add the suffix if needed
+      iln = LEN_TRIM(clname)
+      ils = LEN_TRIM(clsuffix)
+      IF( iln <= ils .OR. INDEX( TRIM(clname), TRIM(clsuffix), back = .TRUE. ) /= iln - ils + 1 )   &
+         &   clname = TRIM(clname)//TRIM(clsuffix)
+      cltmpn = clname   ! store this name
+      ! try to find if the file to be opened already exist
+      ! =============
+      INQUIRE( FILE = clname, EXIST = llok )
+      IF( .NOT.llok ) THEN
+         ! we try to add the cpu number to the name
+         IF( iolib == jprstdimg ) THEN   ;   WRITE(clcpu,*) narea
+         ELSE                            ;   WRITE(clcpu,*) narea-1
+         ENDIF
+         clcpu  = TRIM(ADJUSTL(clcpu))
+         iln = INDEX(clname,TRIM(clsuffix), back = .TRUE.)
+         clname = clname(1:iln-1)//'_'//TRIM(clcpu)//TRIM(clsuffix)
+         icnt = 0
+         INQUIRE( FILE = clname, EXIST = llok ) 
+         ! we try different formats for the cpu number by adding 0
+         DO WHILE( .NOT.llok .AND. icnt < jpmax_digits )
+            clcpu  = "0"//trim(clcpu)
+            clname = clname(1:iln-1)//'_'//TRIM(clcpu)//TRIM(clsuffix)
+            INQUIRE( FILE = clname, EXIST = llok )
+            icnt = icnt + 1
+         END DO
+      ENDIF
+      IF( llwrt ) THEN
+         ! check the domain definition
+! JMM + SM: ugly patch before getting the new version of lib_mpp)
+!         idom = jpdom_local_noovlap   ! default definition
+         IF( llnoov ) THEN   ;   idom = jpdom_local_noovlap   ! default definition
+         ELSE                ;   idom = jpdom_local_full      ! default definition
+         ENDIF
+         IF( PRESENT(kdom) )   idom = kdom
+         ! create the domain informations
+         ! =============
+         SELECT CASE (idom)
+         CASE (jpdom_local_full)
+            idompar(:,1) = (/ jpi             , jpj              /)
+            idompar(:,2) = (/ nimpp           , njmpp            /)
+            idompar(:,3) = (/ nimpp + jpi - 1 , njmpp + jpj - 1  /)
+            idompar(:,4) = (/ nldi - 1        , nldj - 1         /)
+            idompar(:,5) = (/ jpi - nlei      , jpj - nlej       /)
+         CASE (jpdom_local_noextra)
+            idompar(:,1) = (/ nlci            , nlcj             /)
+            idompar(:,2) = (/ nimpp           , njmpp            /)
+            idompar(:,3) = (/ nimpp + nlci - 1, njmpp + nlcj - 1 /)
+            idompar(:,4) = (/ nldi - 1        , nldj - 1         /)
+            idompar(:,5) = (/ nlci - nlei     , nlcj - nlej      /)
+         CASE (jpdom_local_noovlap)
+            idompar(:,1) = (/ nlei  - nldi + 1, nlej  - nldj + 1 /)
+            idompar(:,2) = (/ nimpp + nldi - 1, njmpp + nldj - 1 /)
+            idompar(:,3) = (/ nimpp + nlei - 1, njmpp + nlej - 1 /)
+            idompar(:,4) = (/ 0               , 0                /)
+            idompar(:,5) = (/ 0               , 0                /)
+         CASE DEFAULT
+            CALL ctl_stop( TRIM(clinfo), 'wrong value of kdom, only jpdom_local* cases are accepted' )
+         END SELECT
+      ENDIF
+      ! Open the NetCDF or RSTDIMG file
+      ! =============
+      ! do we have some free file identifier?
+      IF( MINVAL(iom_file(:)%nfid) /= 0 )   &
+         &   CALL ctl_stop( TRIM(clinfo), 'No more free file identifier', 'increase jpmax_files in iom_def' )
+      ! if no file was found...
+      IF( .NOT. llok ) THEN
+         IF( .NOT. llwrt ) THEN   ! we are in read mode 
+            IF( llstop ) THEN   ;   CALL ctl_stop( TRIM(clinfo), 'File '//TRIM(cltmpn)//'* not found' )
+            ELSE                ;   istop = nstop + 1   ! make sure that istop /= nstop so we don't open the file
+            ENDIF
+         ELSE                     ! we are in write mode so we 
+            clname = cltmpn       ! get back the file name without the cpu number
+         ENDIF
+      ELSE
+         IF( llwrt .AND. .NOT. ln_clobber ) THEN   ! we stop as we want to write in a new file 
+            CALL ctl_stop( TRIM(clinfo), 'We want to write in a new file but '//TRIM(clname)//' already exists...' )
+            istop = nstop + 1                      ! make sure that istop /= nstop so we don't open the file
+         ELSEIF( llwrt ) THEN     ! the file exists and we are in write mode with permission to 
+            clname = cltmpn       ! overwrite so get back the file name without the cpu number
+         ENDIF
+      ENDIF
+      IF( istop == nstop ) THEN   ! no error within this routine
+         SELECT CASE (iolib)
+         CASE (jpioipsl )   ;   CALL iom_ioipsl_open(  clname, kiomid, llwrt, llok, idompar )
+         CASE (jpnf90   )   ;   CALL iom_nf90_open(    clname, kiomid, llwrt, llok, idompar )
+         CASE (jprstdimg)   ;   CALL iom_rstdimg_open( clname, kiomid, llwrt, llok, idompar )
+         CASE DEFAULT
+            CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+         END SELECT
+      ENDIF
+      !
+   END SUBROUTINE iom_open
+
+
+   SUBROUTINE iom_close( kiomid )
+      !!--------------------------------------------------------------------
+      !!                   ***  SUBROUTINE  iom_close  ***
+      !!
+      !! ** Purpose : close an input file, or all files opened by iom
+      !!--------------------------------------------------------------------
+      INTEGER, INTENT(inout), OPTIONAL ::   kiomid   ! iom identifier of the file to be closed
+      !                                              ! return 0 when file is properly closed
+      !                                              ! No argument: all files opened by iom are closed
+
+      INTEGER ::   jf         ! dummy loop indices
+      INTEGER ::   i_s, i_e   ! temporary integer
+      CHARACTER(LEN=100)    ::   clinfo    ! info character
+      !---------------------------------------------------------------------
+      !
+      clinfo = '                    iom_close ~~~  '
+      IF( PRESENT(kiomid) ) THEN
+         i_s = kiomid
+         i_e = kiomid
+      ELSE
+         i_s = 1
+         i_e = jpmax_files
+      ENDIF
+
+      IF( i_s > 0 ) THEN
+         DO jf = i_s, i_e
+            IF( iom_file(jf)%nfid > 0 ) THEN
+               SELECT CASE (iom_file(jf)%iolib)
+               CASE (jpioipsl )   ;   CALL iom_ioipsl_close(  jf )
+               CASE (jpnf90   )   ;   CALL iom_nf90_close(    jf )
+               CASE (jprstdimg)   ;   CALL iom_rstdimg_close( jf )
+               CASE DEFAULT
+                  CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+               END SELECT
+               iom_file(jf)%nfid       = 0          ! free the id 
+               IF( PRESENT(kiomid) )   kiomid = 0   ! return 0 as id to specify that the file was closed
+               IF(lwp) WRITE(numout,*) TRIM(clinfo)//' close file: '//TRIM(iom_file(jf)%name)//' ok'
+            ELSEIF( PRESENT(kiomid) ) THEN
+               WRITE(ctmp1,*) '--->',  kiomid
+               CALL ctl_stop( TRIM(clinfo)//' Invalid file identifier', ctmp1 )
+            ENDIF
+         END DO
+      ENDIF
+      !    
+   END SUBROUTINE iom_close
+
+
+   FUNCTION iom_varid ( kiomid, cdvar, kdimsz, kndims, ldstop )  
+      !!-----------------------------------------------------------------------
+      !!                  ***  FUNCTION  iom_varid  ***
+      !!
+      !! ** Purpose : get the id of a variable in a file (return 0 if not found)
+      !!-----------------------------------------------------------------------
+      INTEGER              , INTENT(in   )           ::   kiomid   ! file Identifier
+      CHARACTER(len=*)     , INTENT(in   )           ::   cdvar    ! name of the variable
+      INTEGER, DIMENSION(:), INTENT(  out), OPTIONAL ::   kdimsz   ! size of the dimensions
+      INTEGER,               INTENT(  out), OPTIONAL ::   kndims   ! size of the dimensions
+      LOGICAL              , INTENT(in   ), OPTIONAL ::   ldstop   ! stop if looking for non-existing variable (default = .TRUE.)
+      !
+      INTEGER                        ::   iom_varid, iiv, i_nvd
+      LOGICAL                        ::   ll_fnd
+      CHARACTER(LEN=100)             ::   clinfo                   ! info character
+      LOGICAL                        ::   llstop                   ! local definition of ldstop
+      !!-----------------------------------------------------------------------
+      iom_varid = 0                         ! default definition
+      ! do we call ctl_stop if we look for non-existing variable?
+      IF( PRESENT(ldstop) ) THEN   ;   llstop = ldstop
+      ELSE                         ;   llstop = .TRUE.
+      ENDIF
+      !
+      IF( kiomid > 0 ) THEN
+         clinfo = 'iom_varid, file: '//trim(iom_file(kiomid)%name)//', var: '//trim(cdvar)
+         IF( iom_file(kiomid)%nfid == 0 ) THEN 
+            CALL ctl_stop( trim(clinfo), 'the file is not open' )
+         ELSE
+            ll_fnd  = .FALSE.
+            iiv = 0
+            !
+            DO WHILE ( .NOT.ll_fnd .AND. iiv < iom_file(kiomid)%nvars )
+               iiv = iiv + 1
+               ll_fnd  = ( TRIM(cdvar) == TRIM(iom_file(kiomid)%cn_var(iiv)) )
+            END DO
+            !
+            IF( .NOT.ll_fnd ) THEN
+               iiv = iiv + 1
+               IF( iiv <= jpmax_vars ) THEN
+                  SELECT CASE (iom_file(kiomid)%iolib)
+                  CASE (jpioipsl )   ;   iom_varid = iom_ioipsl_varid( kiomid, cdvar, iiv, kdimsz )
+                  CASE (jpnf90   )   ;   iom_varid = iom_nf90_varid  ( kiomid, cdvar, iiv, kdimsz, kndims )
+                  CASE (jprstdimg)   ;   iom_varid = -1   ! all variables are listed in iom_file
+                  CASE DEFAULT   
+                     CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+                  END SELECT
+               ELSE
+                  CALL ctl_stop( trim(clinfo), 'Too many variables in the file '//iom_file(kiomid)%name,   &
+                        &                         'increase the parameter jpmax_vars')
+               ENDIF
+               IF( llstop .AND. iom_varid == -1 )   CALL ctl_stop( TRIM(clinfo)//' not found' ) 
+            ELSE
+               iom_varid = iiv
+               IF( PRESENT(kdimsz) ) THEN 
+                  i_nvd = iom_file(kiomid)%ndims(iiv)
+                  IF( i_nvd == size(kdimsz) ) THEN
+                     kdimsz(:) = iom_file(kiomid)%dimsz(1:i_nvd,iiv)
+                  ELSE
+                     WRITE(ctmp1,*) i_nvd, size(kdimsz)
+                     CALL ctl_stop( trim(clinfo), 'error in kdimsz size'//trim(ctmp1) )
+                  ENDIF
+               ENDIF
+               IF( PRESENT(kndims) )  kndims = iom_file(kiomid)%ndims(iiv)
+            ENDIF
+         ENDIF
+      ENDIF
+      !
+   END FUNCTION iom_varid
+
+
+   !!----------------------------------------------------------------------
+   !!                   INTERFACE iom_get
+   !!----------------------------------------------------------------------
+   SUBROUTINE iom_g0d( kiomid, cdvar, pvar, ktime )
+      INTEGER         , INTENT(in   )                 ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*), INTENT(in   )                 ::   cdvar     ! Name of the variable
+      REAL(wp)        , INTENT(  out)                 ::   pvar      ! read field
+      INTEGER         , INTENT(in   ),     OPTIONAL   ::   ktime     ! record number
+      !
+      INTEGER                                         ::   idvar     ! variable id
+      INTEGER                                         ::   idmspc    ! number of spatial dimensions
+      INTEGER         , DIMENSION(1)                  ::   itime     ! record number
+      CHARACTER(LEN=100)                              ::   clinfo    ! info character
+      CHARACTER(LEN=100)                              ::   clname    ! file name
+      CHARACTER(LEN=1)                                ::   cldmspc   !
+      !
+      itime = 1
+      IF( PRESENT(ktime) ) itime = ktime
+      !
+      clname = iom_file(kiomid)%name
+      clinfo = '          iom_g0d, file: '//trim(clname)//', var: '//trim(cdvar)
+      !
+      IF( kiomid > 0 ) THEN
+         idvar = iom_varid( kiomid, cdvar )
+         IF( iom_file(kiomid)%nfid > 0 .AND. idvar > 0 ) THEN
+            idmspc = iom_file ( kiomid )%ndims( idvar )
+            IF( iom_file(kiomid)%luld(idvar) )  idmspc = idmspc - 1
+            WRITE(cldmspc , fmt='(i1)') idmspc
+            IF( idmspc > 0 )  CALL ctl_stop( TRIM(clinfo), 'When reading to a 0D array, we do not accept data', &
+                                 &                         'with 1 or more spatial dimensions: '//cldmspc//' were found.' , &
+                                 &                         'Use ncwa -a to suppress the unnecessary dimensions' )
+            SELECT CASE (iom_file(kiomid)%iolib)
+            CASE (jpioipsl )   ;   CALL iom_ioipsl_get(  kiomid, idvar, pvar, itime )
+            CASE (jpnf90   )   ;   CALL iom_nf90_get(    kiomid, idvar, pvar, itime )
+            CASE (jprstdimg)   ;   CALL iom_rstdimg_get( kiomid, idvar, pvar )
+            CASE DEFAULT    
+               CALL ctl_stop( 'iom_g0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+            END SELECT
+         ENDIF
+      ENDIF
+   END SUBROUTINE iom_g0d
+
+   SUBROUTINE iom_g1d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount )
+      INTEGER         , INTENT(in   )                         ::   kiomid    ! Identifier of the file
+      INTEGER         , INTENT(in   )                         ::   kdom      ! Type of domain to be read
+      CHARACTER(len=*), INTENT(in   )                         ::   cdvar     ! Name of the variable
+      REAL(wp)        , INTENT(  out), DIMENSION(:)           ::   pvar      ! read field
+      INTEGER         , INTENT(in   )              , OPTIONAL ::   ktime     ! record number
+      INTEGER         , INTENT(in   ), DIMENSION(1), OPTIONAL ::   kstart    ! start axis position of the reading 
+      INTEGER         , INTENT(in   ), DIMENSION(1), OPTIONAL ::   kcount    ! number of points in each axis
+      !
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom       , cdvar        , pv_r1d=pvar,   &
+              &                                                     ktime=ktime, kstart=kstart, kcount=kcount )
+      ENDIF
+   END SUBROUTINE iom_g1d
+
+   SUBROUTINE iom_g2d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount )
+      INTEGER         , INTENT(in   )                           ::   kiomid    ! Identifier of the file
+      INTEGER         , INTENT(in   )                           ::   kdom      ! Type of domain to be read
+      CHARACTER(len=*), INTENT(in   )                           ::   cdvar     ! Name of the variable
+      REAL(wp)        , INTENT(  out), DIMENSION(:,:)           ::   pvar      ! read field
+      INTEGER         , INTENT(in   )                , OPTIONAL ::   ktime     ! record number
+      INTEGER         , INTENT(in   ), DIMENSION(2)  , OPTIONAL ::   kstart    ! start axis position of the reading 
+      INTEGER         , INTENT(in   ), DIMENSION(2)  , OPTIONAL ::   kcount    ! number of points in each axis
+      !
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom       , cdvar        , pv_r2d=pvar,   &
+              &                                                     ktime=ktime, kstart=kstart, kcount=kcount )
+      ENDIF
+   END SUBROUTINE iom_g2d
+
+   SUBROUTINE iom_g3d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount )
+      INTEGER         , INTENT(in   )                             ::   kiomid    ! Identifier of the file
+      INTEGER         , INTENT(in   )                             ::   kdom      ! Type of domain to be read
+      CHARACTER(len=*), INTENT(in   )                             ::   cdvar     ! Name of the variable
+      REAL(wp)        , INTENT(  out), DIMENSION(:,:,:)           ::   pvar      ! read field
+      INTEGER         , INTENT(in   )                  , OPTIONAL ::   ktime     ! record number
+      INTEGER         , INTENT(in   ), DIMENSION(3)    , OPTIONAL ::   kstart    ! start axis position of the reading 
+      INTEGER         , INTENT(in   ), DIMENSION(3)    , OPTIONAL ::   kcount    ! number of points in each axis
+      !
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom       , cdvar        , pv_r3d=pvar,   &
+              &                                                     ktime=ktime, kstart=kstart, kcount=kcount )
+      ENDIF
+   END SUBROUTINE iom_g3d
+   !!----------------------------------------------------------------------
+
+   SUBROUTINE iom_get_123d( kiomid, kdom  , cdvar ,   &
+         &                  pv_r1d, pv_r2d, pv_r3d,   &
+         &                  ktime , kstart, kcount  )
+      !!-----------------------------------------------------------------------
+      !!                  ***  ROUTINE  iom_get_123d  ***
+      !!
+      !! ** Purpose : read a 1D/2D/3D variable
+      !!
+      !! ** Method : read ONE record at each CALL
+      !!-----------------------------------------------------------------------
+      INTEGER                    , INTENT(in   )           ::   kiomid     ! Identifier of the file
+      INTEGER                    , INTENT(in   )           ::   kdom       ! Type of domain to be read
+      CHARACTER(len=*)           , INTENT(in   )           ::   cdvar      ! Name of the variable
+      REAL(wp), DIMENSION(:)     , INTENT(  out), OPTIONAL ::   pv_r1d     ! read field (1D case)
+      REAL(wp), DIMENSION(:,:)   , INTENT(  out), OPTIONAL ::   pv_r2d     ! read field (2D case)
+      REAL(wp), DIMENSION(:,:,:) , INTENT(  out), OPTIONAL ::   pv_r3d     ! read field (3D case)
+      INTEGER                    , INTENT(in   ), OPTIONAL ::   ktime      ! record number
+      INTEGER , DIMENSION(:)     , INTENT(in   ), OPTIONAL ::   kstart     ! start position of the reading in each axis 
+      INTEGER , DIMENSION(:)     , INTENT(in   ), OPTIONAL ::   kcount     ! number of points to be read in each axis
+      !
+      LOGICAL                        ::   llnoov      ! local definition to read overlap
+      INTEGER                        ::   jl          ! loop on number of dimension 
+      INTEGER                        ::   idom        ! type of domain
+      INTEGER                        ::   idvar       ! id of the variable
+      INTEGER                        ::   inbdim      ! number of dimensions of the variable
+      INTEGER                        ::   idmspc      ! number of spatial dimensions 
+      INTEGER                        ::   itime       ! record number
+      INTEGER                        ::   istop       ! temporary value of nstop
+      INTEGER                        ::   ix1, ix2, iy1, iy2   ! subdomain indexes
+      INTEGER                        ::   ji, jj      ! loop counters
+      INTEGER                        ::   irankpv       ! 
+      INTEGER                        ::   ind1, ind2  ! substring index
+      INTEGER, DIMENSION(jpmax_dims) ::   istart      ! starting point to read for each axis
+      INTEGER, DIMENSION(jpmax_dims) ::   icnt        ! number of value to read along each axis 
+      INTEGER, DIMENSION(jpmax_dims) ::   idimsz      ! size of the dimensions of the variable
+      INTEGER, DIMENSION(jpmax_dims) ::   ishape      ! size of the dimensions of the variable
+      REAL(wp)                       ::   zscf, zofs  ! sacle_factor and add_offset
+      INTEGER                        ::   itmp        ! temporary integer
+      CHARACTER(LEN=256)             ::   clinfo      ! info character
+      CHARACTER(LEN=256)             ::   clname      ! file name
+      CHARACTER(LEN=1)               ::   clrankpv, cldmspc      ! 
+      !---------------------------------------------------------------------
+      !
+      clname = iom_file(kiomid)%name   !   esier to read
+      clinfo = '          iom_get_123d, file: '//trim(clname)//', var: '//trim(cdvar)
+      ! local definition of the domain ?
+      idom = kdom
+      ! do we read the overlap 
+      ! ugly patch SM+JMM+RB to overwrite global definition in some cases
+      llnoov = (jpni * jpnj ) == jpnij .AND. .NOT. lk_agrif 
+      ! check kcount and kstart optionals parameters...
+      IF( PRESENT(kcount) .AND. (.NOT. PRESENT(kstart)) ) CALL ctl_stop(trim(clinfo), 'kcount present needs kstart present')
+      IF( PRESENT(kstart) .AND. (.NOT. PRESENT(kcount)) ) CALL ctl_stop(trim(clinfo), 'kstart present needs kcount present')
+      IF( PRESENT(kstart) .AND. idom /= jpdom_unknown   ) CALL ctl_stop(trim(clinfo), 'kstart present needs kdom = jpdom_unknown')
+
+      ! Search for the variable in the data base (eventually actualize data)
+      istop = nstop
+      idvar = iom_varid( kiomid, cdvar )
+      !
+      IF( idvar > 0 ) THEN
+         ! to write iom_file(kiomid)%dimsz in a shorter way !
+         idimsz(:) = iom_file(kiomid)%dimsz(:, idvar) 
+         inbdim = iom_file(kiomid)%ndims(idvar)            ! number of dimensions in the file
+         idmspc = inbdim                                   ! number of spatial dimensions in the file
+         IF( iom_file(kiomid)%luld(idvar) )   idmspc = inbdim - 1
+         IF( idmspc > 3 )   CALL ctl_stop(trim(clinfo), 'the file has more than 3 spatial dimensions this case is not coded...') 
+         !
+         ! update idom definition...
+         ! Identify the domain in case of jpdom_auto(glo/dta) definition
+         IF( idom == jpdom_autoglo .OR. idom == jpdom_autodta ) THEN            
+            IF( idom == jpdom_autoglo ) THEN   ;   idom = jpdom_global 
+            ELSE                               ;   idom = jpdom_data
+            ENDIF
+            ind1 = INDEX( clname, '_', back = .TRUE. ) + 1
+            ind2 = INDEX( clname, '.', back = .TRUE. ) - 1
+            IF( ind2 > ind1 ) THEN   ;   IF( VERIFY( clname(ind1:ind2), '0123456789' ) == 0 )   idom = jpdom_local   ;   ENDIF
+         ENDIF
+         ! Identify the domain in case of jpdom_local definition
+         IF( idom == jpdom_local ) THEN
+            IF(     idimsz(1) == jpi               .AND. idimsz(2) == jpj               ) THEN   ;   idom = jpdom_local_full
+            ELSEIF( idimsz(1) == nlci              .AND. idimsz(2) == nlcj              ) THEN   ;   idom = jpdom_local_noextra
+            ELSEIF( idimsz(1) == (nlei - nldi + 1) .AND. idimsz(2) == (nlej - nldj + 1) ) THEN   ;   idom = jpdom_local_noovlap
+            ELSE   ;   CALL ctl_stop( trim(clinfo), 'impossible to identify the local domain' )
+            ENDIF
+         ENDIF
+         !
+         ! check the consistency between input array and data rank in the file
+         !
+         ! initializations
+         itime = 1
+         IF( PRESENT(ktime) ) itime = ktime
+
+         irankpv = 1 * COUNT( (/PRESENT(pv_r1d)/) ) + 2 * COUNT( (/PRESENT(pv_r2d)/) ) + 3 * COUNT( (/PRESENT(pv_r3d)/) )
+         WRITE(clrankpv, fmt='(i1)') irankpv
+         WRITE(cldmspc , fmt='(i1)') idmspc
+         !
+         IF(     idmspc <  irankpv ) THEN 
+            CALL ctl_stop( TRIM(clinfo), 'The file has only '//cldmspc//' spatial dimension',   &
+               &                         'it is impossible to read a '//clrankpv//'D array from this file...' )
+         ELSEIF( idmspc == irankpv ) THEN
+            IF( PRESENT(pv_r1d) .AND. idom /= jpdom_unknown )   &
+               &   CALL ctl_stop( TRIM(clinfo), 'case not coded...You must use jpdom_unknown' )
+         ELSEIF( idmspc >  irankpv ) THEN
+               IF( PRESENT(pv_r2d) .AND. itime == 1 .AND. idimsz(3) == 1 .AND. idmspc == 3 ) THEN
+                  CALL ctl_warn( trim(clinfo), '2D array but 3 spatial dimensions for the data...'              ,   &
+                        &         'As the size of the z dimension is 1 and as we try to read the first record, ',   &
+                        &         'we accept this case, even if there is a possible mix-up between z and time dimension' )   
+                  idmspc = idmspc - 1
+               ELSE
+                  CALL ctl_stop( TRIM(clinfo), 'To keep iom lisibility, when reading a '//clrankpv//'D array,'         ,   &
+                     &                         'we do not accept data with '//cldmspc//' spatial dimensions',   &
+                     &                         'Use ncwa -a to suppress the unnecessary dimensions' )
+               ENDIF
+         ENDIF
+
+         !
+         ! definition of istart and icnt
+         !
+         icnt  (:) = 1
+         istart(:) = 1
+         istart(idmspc+1) = itime
+
+         IF(              PRESENT(kstart)       ) THEN ; istart(1:idmspc) = kstart(1:idmspc) ; icnt(1:idmspc) = kcount(1:idmspc)
+         ELSE
+            IF(           idom == jpdom_unknown ) THEN                                       ; icnt(1:idmspc) = idimsz(1:idmspc)
+            ELSE 
+               IF( .NOT. PRESENT(pv_r1d) ) THEN   !   not a 1D array
+                  IF(     idom == jpdom_data    ) THEN ; istart(1:2) = (/ mig(1), mjg(1) /)  ! icnt(1:2) done bellow
+                  ELSEIF( idom == jpdom_global  ) THEN ; istart(1:2) = (/ nimpp , njmpp  /)  ! icnt(1:2) done bellow
+                  ENDIF
+                  ! we do not read the overlap                     -> we start to read at nldi, nldj
+! JMM + SM: ugly patch before getting the new version of lib_mpp)
+!                  IF( idom /= jpdom_local_noovlap )   istart(1:2) = istart(1:2) + (/ nldi - 1, nldj - 1 /)
+                  IF( llnoov .AND. idom /= jpdom_local_noovlap ) istart(1:2) = istart(1:2) + (/ nldi - 1, nldj - 1 /)
+                  ! we do not read the overlap and the extra-halos -> from nldi to nlei and from nldj to nlej 
+! JMM + SM: ugly patch before getting the new version of lib_mpp)
+!                  icnt(1:2) = (/ nlei - nldi + 1, nlej - nldj + 1 /)
+                  IF( llnoov ) THEN   ;   icnt(1:2) = (/ nlei - nldi + 1, nlej - nldj + 1 /)
+                  ELSE                ;   icnt(1:2) = (/ nlci           , nlcj            /)
+                  ENDIF
+                  IF( PRESENT(pv_r3d) ) THEN
+                     IF( idom == jpdom_data ) THEN   ; icnt(3) = jpkdta
+                     ELSE                            ; icnt(3) = jpk
+                     ENDIF
+                  ENDIF
+               ENDIF
+            ENDIF
+         ENDIF
+
+         ! check that istart and icnt can be used with this file
+         !-
+         DO jl = 1, jpmax_dims
+            itmp = istart(jl)+icnt(jl)-1
+            IF( itmp > idimsz(jl) .AND. idimsz(jl) /= 0 ) THEN
+               WRITE( ctmp1, FMT="('(istart(', i1, ') + icnt(', i1, ') - 1) = ', i5)" ) jl, jl, itmp
+               WRITE( ctmp2, FMT="(' is larger than idimsz(', i1,') = ', i5)"         ) jl, idimsz(jl)
+               CALL ctl_stop( trim(clinfo), 'start and count too big regarding to the size of the data, ', ctmp1, ctmp2 )     
+            ENDIF
+         END DO
+
+         ! check that icnt matches the input array
+         !-     
+         IF( idom == jpdom_unknown ) THEN
+            IF( irankpv == 1 )        ishape(1:1) = SHAPE(pv_r1d)
+            IF( irankpv == 2 )        ishape(1:2) = SHAPE(pv_r2d)
+            IF( irankpv == 3 )        ishape(1:3) = SHAPE(pv_r3d)
+            ctmp1 = 'd'
+         ELSE
+            IF( irankpv == 2 ) THEN
+! JMM + SM: ugly patch before getting the new version of lib_mpp)
+!               ishape(1:2) = SHAPE(pv_r2d(nldi:nlei,nldj:nlej  ))   ;   ctmp1 = 'd(nldi:nlei,nldj:nlej)'
+               IF( llnoov ) THEN ; ishape(1:2)=SHAPE(pv_r2d(nldi:nlei,nldj:nlej  )) ; ctmp1='d(nldi:nlei,nldj:nlej)'
+               ELSE              ; ishape(1:2)=SHAPE(pv_r2d(1   :nlci,1   :nlcj  )) ; ctmp1='d(1:nlci,1:nlcj)'
+               ENDIF
+            ENDIF
+            IF( irankpv == 3 ) THEN 
+! JMM + SM: ugly patch before getting the new version of lib_mpp)
+!               ishape(1:3) = SHAPE(pv_r3d(nldi:nlei,nldj:nlej,:))   ;   ctmp1 = 'd(nldi:nlei,nldj:nlej,:)'
+               IF( llnoov ) THEN ; ishape(1:3)=SHAPE(pv_r3d(nldi:nlei,nldj:nlej,:)) ; ctmp1='d(nldi:nlei,nldj:nlej,:)'
+               ELSE              ; ishape(1:3)=SHAPE(pv_r3d(1   :nlci,1   :nlcj,:)) ; ctmp1='d(1:nlci,1:nlcj,:)'
+               ENDIF
+            ENDIF
+         ENDIF
+         
+         DO jl = 1, irankpv
+            WRITE( ctmp2, FMT="(', ', i1,'): ', i5,' /= icnt(', i1,'):', i5)" ) jl, ishape(jl), jl, icnt(jl)
+            IF( ishape(jl) /= icnt(jl) )   CALL ctl_stop( TRIM(clinfo), 'size(pv_r'//clrankpv//TRIM(ctmp1)//TRIM(ctmp2) )
+         END DO
+
+      ENDIF
+
+      ! read the data
+      !-     
+      IF( idvar > 0 .AND. istop == nstop ) THEN   ! no additional errors until this point...
+         !
+         ! find the right index of the array to be read
+! JMM + SM: ugly patch before getting the new version of lib_mpp)
+!         IF( idom /= jpdom_unknown ) THEN   ;   ix1 = nldi   ;   ix2 = nlei      ;   iy1 = nldj   ;   iy2 = nlej
+!         ELSE                               ;   ix1 = 1      ;   ix2 = icnt(1)   ;   iy1 = 1      ;   iy2 = icnt(2)
+!         ENDIF
+         IF( llnoov ) THEN
+            IF( idom /= jpdom_unknown ) THEN   ;   ix1 = nldi   ;   ix2 = nlei      ;   iy1 = nldj   ;   iy2 = nlej
+            ELSE                               ;   ix1 = 1      ;   ix2 = icnt(1)   ;   iy1 = 1      ;   iy2 = icnt(2)
+            ENDIF
+         ELSE
+            IF( idom /= jpdom_unknown ) THEN   ;   ix1 = 1      ;   ix2 = nlci      ;   iy1 = 1      ;   iy2 = nlcj
+            ELSE                               ;   ix1 = 1      ;   ix2 = icnt(1)   ;   iy1 = 1      ;   iy2 = icnt(2)
+            ENDIF
+         ENDIF
+      
+         SELECT CASE (iom_file(kiomid)%iolib)
+         CASE (jpioipsl )   ;   CALL iom_ioipsl_get(  kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2,   &
+            &                                         pv_r1d, pv_r2d, pv_r3d )
+         CASE (jpnf90   )   ;   CALL iom_nf90_get(    kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2,   &
+            &                                         pv_r1d, pv_r2d, pv_r3d )
+         CASE (jprstdimg)   ;   CALL iom_rstdimg_get( kiomid, idom, idvar, ix1, ix2, iy1, iy2,   &
+            &                                         pv_r1d, pv_r2d, pv_r3d )
+         CASE DEFAULT    
+            CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+         END SELECT
+
+         IF( istop == nstop ) THEN   ! no additional errors until this point...
+            IF(lwp) WRITE(numout,"(10x,' read ',a,' (rec: ',i6,') in ',a,' ok')") TRIM(cdvar), itime, TRIM(iom_file(kiomid)%name)
+          
+            !--- overlap areas and extra hallows (mpp)
+            IF(     PRESENT(pv_r2d) .AND. idom /= jpdom_unknown ) THEN
+               CALL lbc_lnk( pv_r2d,'Z',-999.,'no0' )
+            ELSEIF( PRESENT(pv_r3d) .AND. idom /= jpdom_unknown ) THEN
+               ! this if could be simplified with the new lbc_lnk that works with any size of the 3rd dimension
+               IF( icnt(3) == jpk ) THEN
+                  CALL lbc_lnk( pv_r3d,'Z',-999.,'no0' )
+               ELSE   ! put some arbitrary value (a call to lbc_lnk will be done later...)
+                  DO jj = nlcj+1, jpj   ;   pv_r3d(1:nlci, jj, :) = pv_r3d(1:nlci, nlej, :)   ;   END DO
+                  DO ji = nlci+1, jpi   ;   pv_r3d(ji    , : , :) = pv_r3d(nlei  , :   , :)   ;   END DO
+               ENDIF
+            ENDIF
+            
+            ! C1D case : always call lbc_lnk to replicate the central value over the whole 3X3 domain
+            IF( lk_c1d .AND. PRESENT(pv_r2d) )   CALL lbc_lnk( pv_r2d,'Z',1. )
+            IF( lk_c1d .AND. PRESENT(pv_r3d) )   CALL lbc_lnk( pv_r3d,'Z',1. )
+    
+            !--- Apply scale_factor and offset
+            zscf = iom_file(kiomid)%scf(idvar)      ! scale factor
+            zofs = iom_file(kiomid)%ofs(idvar)      ! offset
+            IF(     PRESENT(pv_r1d) ) THEN
+               IF( zscf /= 1. )   pv_r1d(:) = pv_r1d(:) * zscf 
+               IF( zofs /= 0. )   pv_r1d(:) = pv_r1d(:) + zofs
+            ELSEIF( PRESENT(pv_r2d) ) THEN
+!CDIR COLLAPSE
+               IF( zscf /= 1.)   pv_r2d(:,:) = pv_r2d(:,:) * zscf
+!CDIR COLLAPSE
+               IF( zofs /= 0.)   pv_r2d(:,:) = pv_r2d(:,:) + zofs
+            ELSEIF( PRESENT(pv_r3d) ) THEN
+!CDIR COLLAPSE
+               IF( zscf /= 1.)   pv_r3d(:,:,:) = pv_r3d(:,:,:) * zscf
+!CDIR COLLAPSE
+               IF( zofs /= 0.)   pv_r3d(:,:,:) = pv_r3d(:,:,:) + zofs
+            ENDIF
+            !
+         ENDIF
+         !
+      ENDIF
+      !
+   END SUBROUTINE iom_get_123d
+
+
+   SUBROUTINE iom_gettime( kiomid, ptime, cdvar, kntime, cdunits, cdcalendar )
+      !!--------------------------------------------------------------------
+      !!                   ***  SUBROUTINE iom_gettime  ***
+      !!
+      !! ** Purpose : read the time axis cdvar in the file 
+      !!--------------------------------------------------------------------
+      INTEGER                    , INTENT(in   ) ::   kiomid     ! file Identifier
+      REAL(wp), DIMENSION(:)     , INTENT(  out) ::   ptime      ! the time axis
+      CHARACTER(len=*), OPTIONAL , INTENT(in   ) ::   cdvar      ! time axis name
+      INTEGER         , OPTIONAL , INTENT(  out) ::   kntime     ! number of times in file
+      CHARACTER(len=*), OPTIONAL , INTENT(  out) ::   cdunits    ! units attribute of time coordinate
+      CHARACTER(len=*), OPTIONAL , INTENT(  out) ::   cdcalendar ! calendar attribute of 
+      !
+      INTEGER, DIMENSION(1) :: kdimsz
+      INTEGER            ::   idvar    ! id of the variable
+      CHARACTER(LEN=32)  ::   tname    ! local name of time coordinate
+      CHARACTER(LEN=100) ::   clinfo   ! info character
+      !---------------------------------------------------------------------
+      !
+      IF ( PRESENT(cdvar) ) THEN
+         tname = cdvar
+      ELSE
+         tname = iom_file(kiomid)%uldname
+      ENDIF
+      IF( kiomid > 0 ) THEN
+         clinfo = 'iom_gettime, file: '//trim(iom_file(kiomid)%name)//', var: '//trim(tname)
+         IF ( PRESENT(kntime) ) THEN
+            idvar  = iom_varid( kiomid, tname, kdimsz = kdimsz )
+            kntime = kdimsz(1)
+         ELSE
+            idvar = iom_varid( kiomid, tname )
+         ENDIF
+         !
+         ptime(:) = 0. ! default definition
+         IF( idvar > 0 ) THEN
+            IF( iom_file(kiomid)%ndims(idvar) == 1 ) THEN
+               IF( iom_file(kiomid)%luld(idvar) ) THEN
+                  IF( iom_file(kiomid)%dimsz(1,idvar) <= size(ptime) ) THEN
+                     SELECT CASE (iom_file(kiomid)%iolib)
+                     CASE (jpioipsl )   ;   CALL iom_ioipsl_gettime( kiomid, idvar, ptime, cdunits, cdcalendar )
+                     CASE (jpnf90   )   ;   CALL iom_nf90_gettime(   kiomid, idvar, ptime, cdunits, cdcalendar )
+                     CASE (jprstdimg)   ;   CALL ctl_stop( TRIM(clinfo)//' case IO library == jprstdimg not coded...' )
+                     CASE DEFAULT    
+                        CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+                     END SELECT
+                  ELSE
+                     WRITE(ctmp1,*) 'error with the size of ptime ',size(ptime),iom_file(kiomid)%dimsz(1,idvar)
+                     CALL ctl_stop( trim(clinfo), trim(ctmp1) )
+                  ENDIF
+               ELSE
+                  CALL ctl_stop( trim(clinfo), 'variable dimension is not unlimited... use iom_get' )
+               ENDIF
+            ELSE
+               CALL ctl_stop( trim(clinfo), 'the variable has more than 1 dimension' )
+            ENDIF
+         ELSE
+            CALL ctl_stop( trim(clinfo), 'variable not found in '//iom_file(kiomid)%name )
+         ENDIF
+      ENDIF
+      !
+   END SUBROUTINE iom_gettime
+
+
+   !!----------------------------------------------------------------------
+   !!                   INTERFACE iom_getatt
+   !!----------------------------------------------------------------------
+   SUBROUTINE iom_g0d_intatt( kiomid, cdatt, pvar )
+      INTEGER         , INTENT(in   )                 ::   kiomid    ! Identifier of the file
+      CHARACTER(len=*), INTENT(in   )                 ::   cdatt     ! Name of the attribute
+      INTEGER         , INTENT(  out)                 ::   pvar      ! read field
+      !
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 ) THEN
+            SELECT CASE (iom_file(kiomid)%iolib)
+            CASE (jpioipsl )   ;   CALL ctl_stop('iom_getatt: only nf90 available')
+            CASE (jpnf90   )   ;   CALL iom_nf90_getatt( kiomid, cdatt, pvar )
+            CASE (jprstdimg)   ;   CALL ctl_stop('iom_getatt: only nf90 available')
+            CASE DEFAULT    
+               CALL ctl_stop( 'iom_g0d_att: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+            END SELECT
+         ENDIF
+      ENDIF
+   END SUBROUTINE iom_g0d_intatt
+
+
+   !!----------------------------------------------------------------------
+   !!                   INTERFACE iom_rstput
+   !!----------------------------------------------------------------------
+   SUBROUTINE iom_rp0d( kt, kwrite, kiomid, cdvar, pvar, ktype )
+      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step
+      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step
+      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
+      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name
+      REAL(wp)        , INTENT(in)                         ::   pvar     ! written field
+      INTEGER         , INTENT(in), OPTIONAL               ::   ktype    ! variable external type
+      INTEGER :: ivid   ! variable id
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 ) THEN
+            ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
+            SELECT CASE (iom_file(kiomid)%iolib)
+            CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar )
+            CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar )
+            CASE (jprstdimg)   ;   IF( kt == kwrite )    CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pvar )
+            CASE DEFAULT     
+               CALL ctl_stop( 'iom_rp0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+            END SELECT
+         ENDIF
+      ENDIF
+   END SUBROUTINE iom_rp0d
+
+   SUBROUTINE iom_rp1d( kt, kwrite, kiomid, cdvar, pvar, ktype )
+      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step
+      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step
+      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
+      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name
+      REAL(wp)        , INTENT(in), DIMENSION(          :) ::   pvar     ! written field
+      INTEGER         , INTENT(in), OPTIONAL               ::   ktype    ! variable external type
+      INTEGER :: ivid   ! variable id
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 ) THEN
+            ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
+            SELECT CASE (iom_file(kiomid)%iolib)
+            CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar )
+            CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar )
+            CASE (jprstdimg)   ;   IF( kt == kwrite )    CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r1d = pvar )
+            CASE DEFAULT     
+               CALL ctl_stop( 'iom_rp1d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+            END SELECT
+         ENDIF
+      ENDIF
+   END SUBROUTINE iom_rp1d
+
+   SUBROUTINE iom_rp2d( kt, kwrite, kiomid, cdvar, pvar, ktype )
+      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step
+      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step
+      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
+      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name
+      REAL(wp)        , INTENT(in), DIMENSION(:,    :    ) ::   pvar     ! written field
+      INTEGER         , INTENT(in), OPTIONAL               ::   ktype    ! variable external type
+      INTEGER :: ivid   ! variable id
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 ) THEN
+            ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
+            SELECT CASE (iom_file(kiomid)%iolib)
+            CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar )
+            CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar )
+            CASE (jprstdimg)   ;   IF( kt == kwrite )   CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r2d = pvar ) 
+            CASE DEFAULT     
+               CALL ctl_stop( 'iom_rp2d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' )
+            END SELECT
+         ENDIF
+      ENDIF
+   END SUBROUTINE iom_rp2d
+
+   SUBROUTINE iom_rp3d( kt, kwrite, kiomid, cdvar, pvar, ktype )
+      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step
+      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step
+      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file 
+      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name
+      REAL(wp)        , INTENT(in),       DIMENSION(:,:,:) ::   pvar     ! written field
+      INTEGER         , INTENT(in), OPTIONAL               ::   ktype    ! variable external type
+      INTEGER :: ivid   ! variable id
+      IF( kiomid > 0 ) THEN
+         IF( iom_file(kiomid)%nfid > 0 ) THEN
+            ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. )
+            SELECT CASE (iom_file(kiomid)%iolib)
+            CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar )
+            CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar )
+            CASE (jprstdimg)   ;   IF( kt == kwrite )   CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r3d = pvar )
+            CASE DEFAULT     
+               CALL ctl_stop( 'iom_rp3d: accepted IO library are only jpioipsl and jprstdimg' )
+            END SELECT
+         ENDIF
+      ENDIF
+   END SUBROUTINE iom_rp3d
+
+
+   !!----------------------------------------------------------------------
+   !!                   INTERFACE iom_put
+   !!----------------------------------------------------------------------
+   SUBROUTINE iom_p0d( cdname, pfield0d )
+      CHARACTER(LEN=*), INTENT(in) ::   cdname
+      REAL(wp)        , INTENT(in) ::   pfield0d
+      REAL(wp)        , DIMENSION(jpi,jpj) ::   zz     ! masson
+#if defined key_iomput
+      zz(:,:)=pfield0d
+      CALL xios_send_field(cdname, zz)
+      !CALL xios_send_field(cdname, (/pfield0d/)) 
+#else
+      IF( .FALSE. )   WRITE(numout,*) cdname, pfield0d   ! useless test to avoid compilation warnings
+#endif
+   END SUBROUTINE iom_p0d
+
+   SUBROUTINE iom_p1d( cdname, pfield1d )
+      CHARACTER(LEN=*)          , INTENT(in) ::   cdname
+      REAL(wp),     DIMENSION(:), INTENT(in) ::   pfield1d
+#if defined key_iomput
+      CALL xios_send_field( cdname, RESHAPE( (/pfield1d/), (/1,1,SIZE(pfield1d)/) ) )
+#else
+      IF( .FALSE. )   WRITE(numout,*) cdname, pfield1d   ! useless test to avoid compilation warnings
+#endif
+   END SUBROUTINE iom_p1d
+
+   SUBROUTINE iom_p2d( cdname, pfield2d )
+      CHARACTER(LEN=*)            , INTENT(in) ::   cdname
+      REAL(wp),     DIMENSION(:,:), INTENT(in) ::   pfield2d
+#if defined key_iomput
+      CALL xios_send_field(cdname, pfield2d)
+#else
+      IF( .FALSE. )   WRITE(numout,*) cdname, pfield2d   ! useless test to avoid compilation warnings
+#endif
+   END SUBROUTINE iom_p2d
+
+   SUBROUTINE iom_p3d( cdname, pfield3d )
+      CHARACTER(LEN=*)                , INTENT(in) ::   cdname
+      REAL(wp),       DIMENSION(:,:,:), INTENT(in) ::   pfield3d
+#if defined key_iomput
+      CALL xios_send_field(cdname, pfield3d)
+#else
+      IF( .FALSE. )   WRITE(numout,*) cdname, pfield3d   ! useless test to avoid compilation warnings
+#endif
+   END SUBROUTINE iom_p3d
+   !!----------------------------------------------------------------------
+
+#if defined key_iomput
+
+   SUBROUTINE iom_set_domain_attr( cdid, ni_glo, nj_glo, ibegin, jbegin, ni, nj, zoom_ibegin, zoom_jbegin, zoom_ni, zoom_nj,   &
+      &                                    data_dim, data_ibegin, data_ni, data_jbegin, data_nj, lonvalue, latvalue, mask )
+      CHARACTER(LEN=*)                 , INTENT(in) ::   cdid
+      INTEGER                , OPTIONAL, INTENT(in) ::   ni_glo, nj_glo, ibegin, jbegin, ni, nj
+      INTEGER                , OPTIONAL, INTENT(in) ::   data_dim, data_ibegin, data_ni, data_jbegin, data_nj
+      INTEGER                , OPTIONAL, INTENT(in) ::   zoom_ibegin, zoom_jbegin, zoom_ni, zoom_nj
+      REAL(wp), DIMENSION(:) , OPTIONAL, INTENT(in) ::   lonvalue, latvalue
+      LOGICAL, DIMENSION(:,:), OPTIONAL, INTENT(in) ::   mask
+
+      IF ( xios_is_valid_domain     (cdid) ) THEN
+         CALL xios_set_domain_attr     ( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj,   &
+            &    data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj ,   &
+            &    zoom_ibegin=zoom_ibegin, zoom_jbegin=zoom_jbegin, zoom_ni=zoom_ni, zoom_nj=zoom_nj,                       &
+            &    lonvalue=lonvalue, latvalue=latvalue,mask=mask )
+      ENDIF
+
+      IF ( xios_is_valid_domaingroup(cdid) ) THEN
+         CALL xios_set_domaingroup_attr( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj,   &
+            &    data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj ,   &
+            &    zoom_ibegin=zoom_ibegin, zoom_jbegin=zoom_jbegin, zoom_ni=zoom_ni, zoom_nj=zoom_nj,                       &
+            &    lonvalue=lonvalue, latvalue=latvalue,mask=mask )
+      ENDIF
+      CALL xios_solve_inheritance()
+
+   END SUBROUTINE iom_set_domain_attr
+
+
+   SUBROUTINE iom_set_axis_attr( cdid, paxis )
+      CHARACTER(LEN=*)      , INTENT(in) ::   cdid
+      REAL(wp), DIMENSION(:), INTENT(in) ::   paxis
+      IF ( xios_is_valid_axis     (cdid) )   CALL xios_set_axis_attr     ( cdid, size=size(paxis),value=paxis )
+      IF ( xios_is_valid_axisgroup(cdid) )   CALL xios_set_axisgroup_attr( cdid, size=size(paxis),value=paxis )
+      CALL xios_solve_inheritance()
+   END SUBROUTINE iom_set_axis_attr
+
+
+   SUBROUTINE iom_set_field_attr( cdid, freq_op, freq_offset )
+      CHARACTER(LEN=*)          , INTENT(in) ::   cdid
+      CHARACTER(LEN=*),OPTIONAL , INTENT(in) ::   freq_op
+      CHARACTER(LEN=*),OPTIONAL , INTENT(in) ::   freq_offset
+      IF ( xios_is_valid_field     (cdid) )   CALL xios_set_field_attr     ( cdid, freq_op=freq_op, freq_offset=freq_offset )
+      IF ( xios_is_valid_fieldgroup(cdid) )   CALL xios_set_fieldgroup_attr( cdid, freq_op=freq_op, freq_offset=freq_offset )
+      CALL xios_solve_inheritance()
+   END SUBROUTINE iom_set_field_attr
+
+
+   SUBROUTINE iom_set_file_attr( cdid, name, name_suffix )
+      CHARACTER(LEN=*)          , INTENT(in) ::   cdid
+      CHARACTER(LEN=*),OPTIONAL , INTENT(in) ::   name, name_suffix
+      IF ( xios_is_valid_file     (cdid) )   CALL xios_set_file_attr     ( cdid, name=name, name_suffix=name_suffix )
+      IF ( xios_is_valid_filegroup(cdid) )   CALL xios_set_filegroup_attr( cdid, name=name, name_suffix=name_suffix )
+      CALL xios_solve_inheritance()
+   END SUBROUTINE iom_set_file_attr
+
+
+   SUBROUTINE iom_get_file_attr( cdid, name, name_suffix, output_freq )
+      CHARACTER(LEN=*)          , INTENT(in ) ::   cdid
+      CHARACTER(LEN=*),OPTIONAL , INTENT(out) ::   name, name_suffix, output_freq
+      LOGICAL                                 ::   llexist1,llexist2,llexist3
+      !---------------------------------------------------------------------
+      IF( PRESENT( name        ) )   name = ''          ! default values
+      IF( PRESENT( name_suffix ) )   name_suffix = ''
+      IF( PRESENT( output_freq ) )   output_freq = ''
+      IF ( xios_is_valid_file     (cdid) ) THEN
+         CALL xios_solve_inheritance()
+         CALL xios_is_defined_file_attr     ( cdid, name = llexist1, name_suffix = llexist2, output_freq = llexist3)
+         IF(llexist1)   CALL xios_get_file_attr     ( cdid, name = name )
+         IF(llexist2)   CALL xios_get_file_attr     ( cdid, name_suffix = name_suffix )
+         IF(llexist3)   CALL xios_get_file_attr     ( cdid, output_freq = output_freq )
+      ENDIF
+      IF ( xios_is_valid_filegroup(cdid) ) THEN
+         CALL xios_solve_inheritance()
+         CALL xios_is_defined_filegroup_attr( cdid, name = llexist1, name_suffix = llexist2, output_freq = llexist3)
+         IF(llexist1)   CALL xios_get_filegroup_attr( cdid, name = name )
+         IF(llexist2)   CALL xios_get_filegroup_attr( cdid, name_suffix = name_suffix )
+         IF(llexist3)   CALL xios_get_filegroup_attr( cdid, output_freq = output_freq )
+      ENDIF
+   END SUBROUTINE iom_get_file_attr
+
+
+   SUBROUTINE iom_set_grid_attr( cdid, mask )
+      CHARACTER(LEN=*)                   , INTENT(in) ::   cdid
+      LOGICAL, DIMENSION(:,:,:), OPTIONAL, INTENT(in) ::   mask
+      IF ( xios_is_valid_grid     (cdid) )   CALL xios_set_grid_attr     ( cdid, mask=mask )
+      IF ( xios_is_valid_gridgroup(cdid) )   CALL xios_set_gridgroup_attr( cdid, mask=mask )
+      CALL xios_solve_inheritance()
+   END SUBROUTINE iom_set_grid_attr
+
+   SUBROUTINE iom_setkt( kt, cdname )
+      INTEGER         , INTENT(in) ::   kt 
+      CHARACTER(LEN=*), INTENT(in) ::   cdname
+      !     
+      CALL iom_swap( cdname )   ! swap to cdname context
+      CALL xios_update_calendar(kt)
+      IF( cdname /= "nemo" ) CALL iom_swap( "nemo" )   ! return back to nemo context
+      !
+   END SUBROUTINE iom_setkt
+
+   SUBROUTINE iom_context_finalize( cdname )
+      CHARACTER(LEN=*), INTENT(in) :: cdname
+      !     
+      CALL iom_swap( cdname )   ! swap to cdname context
+      CALL xios_context_finalize() ! finalize the context
+      IF( cdname /= "nemo" ) CALL iom_swap( "nemo" )   ! return back to nemo context
+      !
+   END SUBROUTINE iom_context_finalize
+
+
+   SUBROUTINE set_grid( cdgrd, plon, plat )
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE set_grid  ***
+      !!
+      !! ** Purpose :   define horizontal grids
+      !!
+      !!----------------------------------------------------------------------
+      CHARACTER(LEN=1)            , INTENT(in) ::   cdgrd
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   plon
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   plat
+      !
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zmask
+      INTEGER  :: ni,nj
+      
+      ni=nlei-nldi+1 ; nj=nlej-nldj+1
+
+      CALL iom_set_domain_attr("grid_"//cdgrd, ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-1, jbegin=njmpp+nldj-1, ni=ni, nj=nj)
+      CALL iom_set_domain_attr("grid_"//cdgrd, data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj)
+      CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = RESHAPE(plon(nldi:nlei, nldj:nlej),(/ ni*nj /)),   &
+         &                                     latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /)))  
+
+      IF ( ln_mskland ) THEN
+         ! mask land points, keep values on coast line -> specific mask for U, V and W points
+         SELECT CASE ( cdgrd )
+         CASE('T')   ;   zmask(:,:,:)       = tmask(:,:,:)
+         CASE('U')   ;   zmask(2:jpim1,:,:) = tmask(2:jpim1,:,:) + tmask(3:jpi,:,:)   ;   CALL lbc_lnk( zmask, 'U', 1. )
+         CASE('V')   ;   zmask(:,2:jpjm1,:) = tmask(:,2:jpjm1,:) + tmask(:,3:jpi,:)   ;   CALL lbc_lnk( zmask, 'V', 1. )
+         CASE('W')   ;   zmask(:,:,2:jpk  ) = tmask(:,:,1:jpkm1) + tmask(:,:,2:jpk)   ;   zmask(:,:,1) = tmask(:,:,1)
+         END SELECT
+         !
+         CALL iom_set_domain_attr( "grid_"//cdgrd       , mask = RESHAPE(zmask(nldi:nlei,nldj:nlej,1),(/ni,nj    /)) /= 0. )
+         CALL iom_set_grid_attr  ( "grid_"//cdgrd//"_3D", mask = RESHAPE(zmask(nldi:nlei,nldj:nlej,:),(/ni,nj,jpk/)) /= 0. )
+      ENDIF
+      
+   END SUBROUTINE set_grid
+
+
+   SUBROUTINE set_scalar
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE set_scalar  ***
+      !!
+      !! ** Purpose :   define fake grids for scalar point
+      !!
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(1) ::   zz = 1.
+      !!----------------------------------------------------------------------
+      CALL iom_set_domain_attr('scalarpoint', ni_glo=jpnij, nj_glo=1, ibegin=narea, jbegin=1, ni=1, nj=1)
+      CALL iom_set_domain_attr('scalarpoint', data_dim=2, data_ibegin = 1, data_ni = 1, data_jbegin = 1, data_nj = 1)
+      zz=REAL(narea,wp)
+      CALL iom_set_domain_attr('scalarpoint', lonvalue=zz, latvalue=zz)
+
+   END SUBROUTINE set_scalar
+
+
+   SUBROUTINE set_xmlatt
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE set_xmlatt  ***
+      !!
+      !! ** Purpose :   automatic definitions of some of the xml attributs...
+      !!
+      !!----------------------------------------------------------------------
+      CHARACTER(len=1),DIMENSION( 3) ::   clgrd                    ! suffix name
+      CHARACTER(len=256)             ::   clsuff                   ! suffix name
+      CHARACTER(len=1)               ::   cl1                      ! 1 character
+      CHARACTER(len=2)               ::   cl2                      ! 1 character
+      INTEGER                        ::   ji, jg                   ! loop counters
+      INTEGER                        ::   ix, iy                   ! i-,j- index
+      REAL(wp)        ,DIMENSION(11) ::   zlontao                  ! longitudes of tao    moorings
+      REAL(wp)        ,DIMENSION( 7) ::   zlattao                  ! latitudes  of tao    moorings
+      REAL(wp)        ,DIMENSION( 4) ::   zlonrama                 ! longitudes of rama   moorings
+      REAL(wp)        ,DIMENSION(11) ::   zlatrama                 ! latitudes  of rama   moorings
+      REAL(wp)        ,DIMENSION( 3) ::   zlonpira                 ! longitudes of pirata moorings
+      REAL(wp)        ,DIMENSION( 9) ::   zlatpira                 ! latitudes  of pirata moorings
+      !!----------------------------------------------------------------------
+      ! 
+      ! frequency of the call of iom_put (attribut: freq_op)
+      WRITE(cl1,'(i1)')        1   ;   CALL iom_set_field_attr('field_definition', freq_op = cl1//'ts', freq_offset='0ts')
+      WRITE(cl1,'(i1)')  nn_fsbc   ;   CALL iom_set_field_attr('SBC'             , freq_op = cl1//'ts', freq_offset='0ts')
+      WRITE(cl1,'(i1)')  nn_fsbc   ;   CALL iom_set_field_attr('SBC_scalar'      , freq_op = cl1//'ts', freq_offset='0ts')
+      WRITE(cl1,'(i1)') nn_dttrc   ;   CALL iom_set_field_attr('ptrc_T'          , freq_op = cl1//'ts', freq_offset='0ts')
+      WRITE(cl1,'(i1)') nn_dttrc   ;   CALL iom_set_field_attr('diad_T'          , freq_op = cl1//'ts', freq_offset='0ts')
+      WRITE(cl1,'(i1)') nn_fptr    ;   CALL iom_set_field_attr('diaptr'          , freq_op = cl1//'ts', freq_offset='0ts')
+       
+      ! output file names (attribut: name)
+      DO ji = 1, 9
+         WRITE(cl1,'(i1)') ji 
+         CALL iom_update_file_name('file'//cl1)
+      END DO
+      DO ji = 1, 99
+         WRITE(cl2,'(i2.2)') ji 
+         CALL iom_update_file_name('file'//cl2)
+      END DO
+
+      ! Zooms...
+      clgrd = (/ 'T', 'U', 'W' /) 
+      DO jg = 1, SIZE(clgrd)                                                                   ! grid type
+         cl1 = clgrd(jg)
+         ! Equatorial section (attributs: jbegin, ni, name_suffix)
+         CALL dom_ngb( 0., 0., ix, iy, cl1 )
+         CALL iom_set_domain_attr ('Eq'//cl1, zoom_jbegin=iy, zoom_ni=jpiglo)
+         CALL iom_get_file_attr   ('Eq'//cl1, name_suffix = clsuff             )
+         CALL iom_set_file_attr   ('Eq'//cl1, name_suffix = TRIM(clsuff)//'_Eq')
+         CALL iom_update_file_name('Eq'//cl1)
+      END DO
+      ! TAO moorings (attributs: ibegin, jbegin, name_suffix)
+      zlontao = (/ 137.0, 147.0, 156.0, 165.0, -180.0, -170.0, -155.0, -140.0, -125.0, -110.0, -95.0 /)
+      zlattao = (/  -8.0,  -5.0,  -2.0,   0.0,    2.0,    5.0,    8.0 /)
+      CALL set_mooring( zlontao, zlattao )
+      ! RAMA moorings (attributs: ibegin, jbegin, name_suffix)
+      zlonrama = (/  55.0,  67.0, 80.5, 90.0 /)
+      zlatrama = (/ -16.0, -12.0, -8.0, -4.0, -1.5, 0.0, 1.5, 4.0, 8.0, 12.0, 15.0 /)
+      CALL set_mooring( zlonrama, zlatrama )
+      ! PIRATA moorings (attributs: ibegin, jbegin, name_suffix)
+      zlonpira = (/ -38.0, -23.0, -10.0 /)
+      zlatpira = (/ -19.0, -14.0,  -8.0, 0.0, 4.0, 8.0, 12.0, 15.0, 20.0 /)
+      CALL set_mooring( zlonpira, zlatpira )
+    
+      ! diaptr : zonal mean 
+      CALL iom_set_domain_attr ('ptr', zoom_ibegin=nxline, zoom_nj=jpjglo)
+      CALL iom_update_file_name('ptr')
+      !
+   END SUBROUTINE set_xmlatt
+
+
+   SUBROUTINE set_mooring( plon, plat)
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE set_mooring  ***
+      !!
+      !! ** Purpose :   automatic definitions of moorings xml attributs...
+      !!
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(:), INTENT(in) ::  plon, plat           ! longitudes/latitudes oft the mooring
+      !
+!!$      CHARACTER(len=1),DIMENSION(4) ::   clgrd = (/ 'T', 'U', 'V', 'W' /)   ! suffix name
+      CHARACTER(len=1),DIMENSION(1) ::   clgrd = (/ 'T' /)        ! suffix name
+      CHARACTER(len=256)            ::   clname                   ! file name
+      CHARACTER(len=256)            ::   clsuff                   ! suffix name
+      CHARACTER(len=1)              ::   cl1                      ! 1 character
+      CHARACTER(len=6)              ::   clon,clat                ! name of longitude, latitude
+      INTEGER                       ::   ji, jj, jg               ! loop counters
+      INTEGER                       ::   ix, iy                   ! i-,j- index
+      REAL(wp)                      ::   zlon, zlat
+      !!----------------------------------------------------------------------
+      DO jg = 1, SIZE(clgrd)
+         cl1 = clgrd(jg)
+         DO ji = 1, SIZE(plon)
+            DO jj = 1, SIZE(plat)
+               zlon = plon(ji)
+               zlat = plat(jj)
+               ! modifications for RAMA moorings
+               IF( zlon ==  67. .AND. zlat ==  15. )   zlon =  65.
+               IF( zlon ==  90. .AND. zlat <=  -4. )   zlon =  95.
+               IF( zlon ==  95. .AND. zlat ==  -4. )   zlat =  -5.
+               ! modifications for PIRATA moorings
+               IF( zlon == -38. .AND. zlat == -19. )   zlon = -34.
+               IF( zlon == -38. .AND. zlat == -14. )   zlon = -32.
+               IF( zlon == -38. .AND. zlat ==  -8. )   zlon = -30.
+               IF( zlon == -38. .AND. zlat ==   0. )   zlon = -35.
+               IF( zlon == -23. .AND. zlat ==  20. )   zlat =  21.
+               IF( zlon == -10. .AND. zlat == -14. )   zlat = -10.
+               IF( zlon == -10. .AND. zlat ==  -8. )   zlat =  -6.
+               IF( zlon == -10. .AND. zlat ==   4. ) THEN   ;   zlon = 0.   ;   zlat = 0.   ;   ENDIF
+               CALL dom_ngb( zlon, zlat, ix, iy, cl1 )
+               IF( zlon >= 0. ) THEN  
+                  IF( zlon == REAL(NINT(zlon), wp) ) THEN   ;   WRITE(clon, '(i3,  a)') NINT( zlon), 'e'
+                  ELSE                                      ;   WRITE(clon, '(f5.1,a)')       zlon , 'e'
+                  ENDIF
+               ELSE             
+                  IF( zlon == REAL(NINT(zlon), wp) ) THEN   ;   WRITE(clon, '(i3,  a)') NINT(-zlon), 'w'
+                  ELSE                                      ;   WRITE(clon, '(f5.1,a)')      -zlon , 'w'
+                  ENDIF
+               ENDIF
+               IF( zlat >= 0. ) THEN  
+                  IF( zlat == REAL(NINT(zlat), wp) ) THEN   ;   WRITE(clat, '(i2,  a)') NINT( zlat), 'n'
+                  ELSE                                      ;   WRITE(clat, '(f4.1,a)')       zlat , 'n'
+                  ENDIF
+               ELSE             
+                  IF( zlat == REAL(NINT(zlat), wp) ) THEN   ;   WRITE(clat, '(i2,  a)') NINT(-zlat), 's'
+                  ELSE                                      ;   WRITE(clat, '(f4.1,a)')      -zlat , 's'
+                  ENDIF
+               ENDIF
+               clname = TRIM(ADJUSTL(clat))//TRIM(ADJUSTL(clon))
+               CALL iom_set_domain_attr (TRIM(clname)//cl1, zoom_ibegin= ix, zoom_jbegin= iy)
+               CALL iom_get_file_attr   (TRIM(clname)//cl1, name_suffix = clsuff                         )
+               CALL iom_set_file_attr   (TRIM(clname)//cl1, name_suffix = TRIM(clsuff)//'_'//TRIM(clname))
+               CALL iom_update_file_name(TRIM(clname)//cl1)
+            END DO
+         END DO
+      END DO
+      
+   END SUBROUTINE set_mooring
+
+   
+   SUBROUTINE iom_update_file_name( cdid )
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE iom_update_file_name  ***
+      !!
+      !! ** Purpose :   
+      !!
+      !!----------------------------------------------------------------------
+      CHARACTER(LEN=*)          , INTENT(in) ::   cdid
+      !
+      CHARACTER(LEN=256) ::   clname
+      CHARACTER(LEN=20)  ::   clfreq
+      CHARACTER(LEN=20)  ::   cldate
+      INTEGER            ::   idx
+      INTEGER            ::   jn
+      INTEGER            ::   itrlen
+      INTEGER            ::   iyear, imonth, iday, isec
+      REAL(wp)           ::   zsec
+      LOGICAL            ::   llexist
+      !!----------------------------------------------------------------------
+
+      DO jn = 1,2
+
+         IF( jn == 1 )   CALL iom_get_file_attr( cdid, name        = clname, output_freq = clfreq )
+         IF( jn == 2 )   CALL iom_get_file_attr( cdid, name_suffix = clname )
+
+         IF ( TRIM(clname) /= '' ) THEN 
+
+            idx = INDEX(clname,'@expname@') + INDEX(clname,'@EXPNAME@')
+            DO WHILE ( idx /= 0 ) 
+               clname = clname(1:idx-1)//TRIM(cexper)//clname(idx+9:LEN_TRIM(clname))
+               idx = INDEX(clname,'@expname@') + INDEX(clname,'@EXPNAME@')
+            END DO
+
+            idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@')
+            DO WHILE ( idx /= 0 ) 
+               IF ( TRIM(clfreq) /= '' ) THEN
+                  itrlen = LEN_TRIM(clfreq)
+                  IF ( clfreq(itrlen-1:itrlen) == 'mo' ) clfreq = clfreq(1:itrlen-1)
+                  clname = clname(1:idx-1)//TRIM(clfreq)//clname(idx+6:LEN_TRIM(clname))
+               ELSE
+                  CALL ctl_stop('error in the name of file id '//TRIM(cdid),   &
+                     & ' attribute output_freq is undefined -> cannot replace @freq@ in '//TRIM(clname) )
+               ENDIF
+               idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@')
+            END DO
+
+            idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@')
+            DO WHILE ( idx /= 0 ) 
+               cldate = iom_sdate( fjulday - rdttra(1) / rday )
+               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+11:LEN_TRIM(clname))
+               idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@')
+            END DO
+
+            idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@')
+            DO WHILE ( idx /= 0 ) 
+               cldate = iom_sdate( fjulday - rdttra(1) / rday, ldfull = .TRUE. )
+               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+15:LEN_TRIM(clname))
+               idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@')
+            END DO
+
+            idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@')
+            DO WHILE ( idx /= 0 ) 
+               cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. )
+               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+9:LEN_TRIM(clname))
+               idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@')
+            END DO
+
+            idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@')
+            DO WHILE ( idx /= 0 ) 
+               cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. )
+               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+13:LEN_TRIM(clname))
+               idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@')
+            END DO
+
+            IF( jn == 1 )   CALL iom_set_file_attr( cdid, name        = clname )
+            IF( jn == 2 )   CALL iom_set_file_attr( cdid, name_suffix = clname )
+
+         ENDIF
+
+      END DO
+
+   END SUBROUTINE iom_update_file_name
+
+
+   FUNCTION iom_sdate( pjday, ld24, ldfull )
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE iom_sdate  ***
+      !!
+      !! ** Purpose :   send back the date corresponding to the given julian day
+      !!
+      !!----------------------------------------------------------------------
+      REAL(wp), INTENT(in   )           ::   pjday         ! julian day
+      LOGICAL , INTENT(in   ), OPTIONAL ::   ld24          ! true to force 24:00 instead of 00:00
+      LOGICAL , INTENT(in   ), OPTIONAL ::   ldfull        ! true to get the compleate date: yyyymmdd_hh:mm:ss
+      !
+      CHARACTER(LEN=20) ::   iom_sdate
+      CHARACTER(LEN=50) ::   clfmt                         !  format used to write the date 
+      INTEGER           ::   iyear, imonth, iday, ihour, iminute, isec
+      REAL(wp)          ::   zsec
+      LOGICAL           ::   ll24, llfull
+      !
+      IF( PRESENT(ld24) ) THEN   ;   ll24 = ld24
+      ELSE                       ;   ll24 = .FALSE.
+      ENDIF
+
+      IF( PRESENT(ldfull) ) THEN   ;   llfull = ldfull
+      ELSE                         ;   llfull = .FALSE.
+      ENDIF
+
+      CALL ju2ymds( pjday, iyear, imonth, iday, zsec )
+      isec = NINT(zsec)
+
+      IF ( ll24 .AND. isec == 0 ) THEN   ! 00:00 of the next day -> move to 24:00 of the current day
+         CALL ju2ymds( pjday - 1., iyear, imonth, iday, zsec )
+         isec = 86400
+      ENDIF
+
+      IF( iyear < 10000 ) THEN   ;   clfmt = "i4.4,2i2.2"                ! format used to write the date 
+      ELSE                       ;   WRITE(clfmt, "('i',i1,',2i2.2')") INT(LOG10(REAL(iyear,wp))) + 1
+      ENDIF
+      
+      IF( llfull ) THEN 
+         clfmt = TRIM(clfmt)//",'_',i2.2,':',i2.2,':',i2.2"
+         ihour   = isec / 3600
+         isec    = MOD(isec, 3600)
+         iminute = isec / 60
+         isec    = MOD(isec, 60)
+         WRITE(iom_sdate, '('//TRIM(clfmt)//')') iyear, imonth, iday, ihour, iminute, isec    ! date of the end of run
+      ELSE
+         WRITE(iom_sdate, '('//TRIM(clfmt)//')') iyear, imonth, iday                          ! date of the end of run
+      ENDIF
+
+   END FUNCTION iom_sdate
+
+#else
+
+
+   SUBROUTINE iom_setkt( kt, cdname )
+      INTEGER         , INTENT(in)::   kt 
+      CHARACTER(LEN=*), INTENT(in) ::   cdname
+      IF( .FALSE. )   WRITE(numout,*) kt, cdname   ! useless test to avoid compilation warnings
+   END SUBROUTINE iom_setkt
+
+   SUBROUTINE iom_context_finalize( cdname )
+      CHARACTER(LEN=*), INTENT(in) ::   cdname
+      IF( .FALSE. )   WRITE(numout,*)  cdname   ! useless test to avoid compilation warnings
+   END SUBROUTINE iom_context_finalize
+
+#endif
+
+   LOGICAL FUNCTION iom_use( cdname )
+      CHARACTER(LEN=*), INTENT(in) ::   cdname
+#if defined key_iomput
+      iom_use = xios_field_is_active( cdname )
+#else
+      iom_use = .FALSE.
+#endif
+   END FUNCTION iom_use
+   
+   !!======================================================================
+END MODULE iom
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/limistate.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/limistate.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/limistate.F90	(revision 2504)
@@ -0,0 +1,534 @@
+MODULE limistate
+   !!======================================================================
+   !!                     ***  MODULE  limistate  ***
+   !!              Initialisation of diagnostics ice variables
+   !!======================================================================
+   !! History :  2.0  ! 2004-01 (C. Ethe, G. Madec)  Original code
+   !!            4.0  ! 2011-02 (G. Madec) dynamical allocation
+   !!             -   ! 2012    (C. Rousset) add par_oce (for jp_sal)...bug?
+   !!----------------------------------------------------------------------
+#if defined key_lim3
+   !!----------------------------------------------------------------------
+   !!   'key_lim3' :                                    LIM3 sea-ice model
+   !!----------------------------------------------------------------------
+   !!   lim_istate      :  Initialisation of diagnostics ice variables
+   !!   lim_istate_init :  initialization of ice state and namelist read
+   !!----------------------------------------------------------------------
+   USE phycst           ! physical constant
+   USE oce              ! dynamics and tracers variables
+   USE dom_oce          ! ocean domain
+   USE sbc_oce          ! Surface boundary condition: ocean fields
+   USE sbc_ice          ! Surface boundary condition: ice fields
+   USE eosbn2           ! equation of state
+   USE ice              ! sea-ice variables
+   USE par_ice          ! ice parameters
+   USE par_oce          ! ocean parameters
+   USE dom_ice          ! sea-ice domain
+   USE in_out_manager   ! I/O manager
+   USE lib_mpp          ! MPP library
+   USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
+   USE wrk_nemo         ! work arrays
+   USE cpl_oasis3, ONLY : lk_cpl
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   lim_istate      ! routine called by lim_init.F90
+
+   !! * Module variables
+   !                          !!** init namelist (namiceini) **
+   REAL(wp) ::   thres_sst   ! threshold water temperature for initial sea ice
+   REAL(wp) ::   hts_ini_n   ! initial snow thickness in the north
+   REAL(wp) ::   hts_ini_s   ! initial snow thickness in the south
+   REAL(wp) ::   hti_ini_n   ! initial ice thickness in the north
+   REAL(wp) ::   hti_ini_s   ! initial ice thickness in the south
+   REAL(wp) ::   ati_ini_n   ! initial leads area in the north
+   REAL(wp) ::   ati_ini_s   ! initial leads area in the south
+   REAL(wp) ::   smi_ini_n   ! initial salinity 
+   REAL(wp) ::   smi_ini_s   ! initial salinity
+   REAL(wp) ::   tmi_ini_n   ! initial temperature
+   REAL(wp) ::   tmi_ini_s   ! initial temperature
+
+   LOGICAL  ::  ln_limini    ! initialization or not
+   !!----------------------------------------------------------------------
+   !!   LIM 3.0,  UCL-LOCEAN-IPSL (2008)
+   !! $Id: limistate.F90 4765 2014-09-16 12:55:11Z rblod $
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
+CONTAINS
+
+   SUBROUTINE lim_istate
+      !!-------------------------------------------------------------------
+      !!                    ***  ROUTINE lim_istate  ***
+      !!
+      !! ** Purpose :   defined the sea-ice initial state
+      !!
+      !! ** Method  :   
+      !!                This routine will put some ice where ocean
+      !!                is at the freezing point, then fill in ice 
+      !!                state variables using prescribed initial 
+      !!                values in the namelist            
+      !!
+      !! ** Steps   :   
+      !!                1) Read namelist
+      !!                2) Basal temperature; ice and hemisphere masks
+      !!                3) Fill in the ice thickness distribution using gaussian
+      !!                4) Fill in space-dependent arrays for state variables
+      !!                5) Diagnostic arrays
+      !!                6) Lateral boundary conditions
+      !!
+      !! ** Notes   : o_i, t_su, t_s, t_i, s_i must be filled everywhere, even
+      !!              where there is no ice (clem: I do not know why but it is mandatory) 
+      !!
+      !! History :
+      !!   2.0  !  01-04  (C. Ethe, G. Madec)  Original code
+      !!   3.0  !  2007   (M. Vancoppenolle)   Rewrite for ice cats
+      !!   4.0  !  09-11  (M. Vancoppenolle)   Enhanced version for ice cats
+      !!--------------------------------------------------------------------
+
+      !! * Local variables
+      INTEGER    :: ji, jj, jk, jl             ! dummy loop indices
+      REAL(wp)   :: epsi20, ztmelts, zdh
+      INTEGER    :: i_hemis, i_fill, jl0  
+      REAL(wp)   :: ztest_1, ztest_2, ztest_3, ztest_4, ztests, zsigma, zarg, zA, zV, zA_cons, zV_cons, zconv
+      REAL(wp), POINTER, DIMENSION(:)     :: zht_i_ini, zat_i_ini, zvt_i_ini, zht_s_ini, zsm_i_ini, ztm_i_ini
+      REAL(wp), POINTER, DIMENSION(:,:)   :: zh_i_ini, za_i_ini, zv_i_ini
+      REAL(wp), POINTER, DIMENSION(:,:)   :: zswitch    ! ice indicator
+      INTEGER,  POINTER, DIMENSION(:,:)   :: zhemis   ! hemispheric index
+      !--------------------------------------------------------------------
+
+      CALL wrk_alloc( jpi, jpj, zswitch )
+      CALL wrk_alloc( jpi, jpj, zhemis )
+      CALL wrk_alloc( jpl,   2, zh_i_ini,  za_i_ini,  zv_i_ini )
+      CALL wrk_alloc(   2,      zht_i_ini, zat_i_ini, zvt_i_ini, zht_s_ini, zsm_i_ini, ztm_i_ini )
+
+      epsi20   = 1.e-20_wp
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) 'lim_istate : Ice initialization '
+      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '
+
+      !--------------------------------------------------------------------
+      ! 1) Read namelist
+      !--------------------------------------------------------------------
+
+      CALL lim_istate_init     !  reading the initials parameters of the ice
+
+      ! surface temperature
+      DO jl = 1, jpl ! loop over categories
+         t_su  (:,:,jl) = rtt * tms(:,:)
+         tn_ice(:,:,jl) = rtt * tms(:,:)
+      END DO
+      ! Basal temperature is set to the freezing point of seawater in Kelvin
+      t_bo(:,:) = ( tfreez( tsn(:,:,1,jp_sal) ) + rt0 ) * tms(:,:) 
+
+      IF( ln_limini ) THEN
+
+      !--------------------------------------------------------------------
+      ! 2) Basal temperature, ice mask and hemispheric index
+      !--------------------------------------------------------------------
+      ! ice if sst <= t-freez + thres_sst
+      DO jj = 1, jpj                                       
+         DO ji = 1, jpi
+            IF( ( tsn(ji,jj,1,jp_tem)  - ( t_bo(ji,jj) - rt0 ) ) * tms(ji,jj) >= thres_sst ) THEN 
+               zswitch(ji,jj) = 0._wp * tms(ji,jj)    ! no ice
+            ELSE                                                                                   
+               zswitch(ji,jj) = 1._wp * tms(ji,jj)    !    ice
+            ENDIF
+         END DO
+      END DO
+
+
+      ! Hemispheric index
+      ! MV 2011 new initialization
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            IF( fcor(ji,jj) >= 0._wp ) THEN    
+               zhemis(ji,jj) = 1 ! Northern hemisphere
+            ELSE
+               zhemis(ji,jj) = 2 ! Southern hemisphere
+            ENDIF
+         END DO
+      END DO
+      ! END MV 2011 new initialization
+
+      !--------------------------------------------------------------------
+      ! 3) Initialization of sea ice state variables
+      !--------------------------------------------------------------------
+
+      !-----------------------------
+      ! 3.1) Hemisphere-dependent arrays
+      !-----------------------------
+      ! assign initial thickness, concentration, snow depth and salinity to an hemisphere-dependent array
+      zht_i_ini(1) = hti_ini_n ; zht_i_ini(2) = hti_ini_s  ! ice thickness
+      zht_s_ini(1) = hts_ini_n ; zht_s_ini(2) = hts_ini_s  ! snow depth
+      zat_i_ini(1) = ati_ini_n ; zat_i_ini(2) = ati_ini_s  ! ice concentration
+      zsm_i_ini(1) = smi_ini_n ; zsm_i_ini(2) = smi_ini_s  ! bulk ice salinity
+      ztm_i_ini(1) = tmi_ini_n ; ztm_i_ini(2) = tmi_ini_s  ! temperature (ice and snow)
+
+      zvt_i_ini(:) = zht_i_ini(:) * zat_i_ini(:)   ! ice volume
+
+      !---------------------------------------------------------------------
+      ! 3.2) Distribute ice concentration and thickness into the categories
+      !---------------------------------------------------------------------
+      ! a gaussian distribution for ice concentration is used
+      ! then we check whether the distribution fullfills
+      ! volume and area conservation, positivity and ice categories bounds
+      DO i_hemis = 1, 2
+
+      ztest_1 = 0 ; ztest_2 = 0 ; ztest_3 = 0 ; ztest_4 = 0
+
+      ! note for the great nemo engineers: 
+      ! only very few of the WRITE statements are necessary for the reference version
+      ! they were one day useful, but now i personally doubt of their
+      ! potential for bringing anything useful
+
+      DO i_fill = jpl, 1, -1
+         IF ( ( ztest_1 + ztest_2 + ztest_3 + ztest_4 ) .NE. 4 ) THEN
+            !----------------------------
+            ! fill the i_fill categories
+            !----------------------------
+            ! *** 1 category to fill
+            IF ( i_fill .EQ. 1 ) THEN
+               zh_i_ini(1,i_hemis)       = zht_i_ini(i_hemis)
+               za_i_ini(1,i_hemis)       = zat_i_ini(i_hemis)
+               zh_i_ini(2:jpl,i_hemis)   = 0._wp
+               za_i_ini(2:jpl,i_hemis)   = 0._wp
+            ELSE
+
+               ! *** >1 categores to fill
+               !--- Ice thicknesses in the i_fill - 1 first categories
+               DO jl = 1, i_fill - 1
+                  zh_i_ini(jl,i_hemis)    = 0.5 * ( hi_max(jl) + hi_max(jl-1) )
+               END DO
+               
+               !--- jl0: most likely index where cc will be maximum
+               DO jl = 1, jpl
+                  IF ( ( zht_i_ini(i_hemis) .GT. hi_max(jl-1) ) .AND. &
+                     ( zht_i_ini(i_hemis) .LE. hi_max(jl)   ) ) THEN
+                     jl0 = jl
+                  ENDIF
+               END DO
+               jl0 = MIN(jl0, i_fill)
+               
+               !--- Concentrations
+               za_i_ini(jl0,i_hemis)      = zat_i_ini(i_hemis) / SQRT(REAL(jpl))
+               DO jl = 1, i_fill - 1
+                  IF ( jl .NE. jl0 ) THEN
+                     zsigma               = 0.5 * zht_i_ini(i_hemis)
+                     zarg                 = ( zh_i_ini(jl,i_hemis) - zht_i_ini(i_hemis) ) / zsigma
+                     za_i_ini(jl,i_hemis) = za_i_ini(jl0,i_hemis) * EXP(-zarg**2)
+                  ENDIF
+               END DO
+               
+               zA = 0. ! sum of the areas in the jpl categories 
+               DO jl = 1, i_fill - 1
+                 zA = zA + za_i_ini(jl,i_hemis)
+               END DO
+               za_i_ini(i_fill,i_hemis)   = zat_i_ini(i_hemis) - zA ! ice conc in the last category
+               IF ( i_fill .LT. jpl ) za_i_ini(i_fill+1:jpl, i_hemis) = 0._wp
+         
+               !--- Ice thickness in the last category
+               zV = 0. ! sum of the volumes of the N-1 categories
+               DO jl = 1, i_fill - 1
+                  zV = zV + za_i_ini(jl,i_hemis)*zh_i_ini(jl,i_hemis)
+               END DO
+               zh_i_ini(i_fill,i_hemis) = ( zvt_i_ini(i_hemis) - zV ) / za_i_ini(i_fill,i_hemis) 
+               IF ( i_fill .LT. jpl ) zh_i_ini(i_fill+1:jpl, i_hemis) = 0._wp
+
+               !--- volumes
+               zv_i_ini(:,i_hemis) = za_i_ini(:,i_hemis) * zh_i_ini(:,i_hemis)
+               IF ( i_fill .LT. jpl ) zv_i_ini(i_fill+1:jpl, i_hemis) = 0._wp
+
+            ENDIF ! i_fill
+
+            !---------------------
+            ! Compatibility tests
+            !---------------------
+            ! Test 1: area conservation
+            zA_cons = SUM(za_i_ini(:,i_hemis)) ; zconv = ABS(zat_i_ini(i_hemis) - zA_cons )
+            IF ( zconv .LT. 1.0e-6 ) THEN
+               ztest_1 = 1
+            ELSE 
+              ! this write is useful
+              IF(lwp)  WRITE(numout,*) ' * TEST1 AREA NOT CONSERVED *** zA_cons = ', zA_cons,' zat_i_ini = ',zat_i_ini(i_hemis) 
+               ztest_1 = 0
+            ENDIF
+
+            ! Test 2: volume conservation
+            zV_cons = SUM(zv_i_ini(:,i_hemis))
+            zconv = ABS(zvt_i_ini(i_hemis) - zV_cons)
+
+            IF ( zconv .LT. 1.0e-6 ) THEN
+               ztest_2 = 1
+            ELSE
+              ! this write is useful
+              IF(lwp)  WRITE(numout,*) ' * TEST2 VOLUME NOT CONSERVED *** zV_cons = ', zV_cons, &
+                            ' zvt_i_ini = ', zvt_i_ini(i_hemis)
+               ztest_2 = 0
+            ENDIF
+
+            ! Test 3: thickness of the last category is in-bounds ?
+            IF ( zh_i_ini(i_fill, i_hemis) .GT. hi_max(i_fill-1) ) THEN
+               ztest_3 = 1
+            ELSE
+               ! this write is useful
+               IF(lwp) WRITE(numout,*) ' * TEST 3 THICKNESS OF THE LAST CATEGORY OUT OF BOUNDS *** zh_i_ini(i_fill,i_hemis) = ', &
+               zh_i_ini(i_fill,i_hemis), ' hi_max(jpl-1) = ', hi_max(i_fill-1)
+               ztest_3 = 0
+            ENDIF
+
+            ! Test 4: positivity of ice concentrations
+            ztest_4 = 1
+            DO jl = 1, jpl
+               IF ( za_i_ini(jl,i_hemis) .LT. 0._wp ) THEN 
+                  ! this write is useful
+                  IF(lwp) WRITE(numout,*) ' * TEST 4 POSITIVITY NOT OK FOR CAT ', jl, ' WITH A = ', za_i_ini(jl,i_hemis)
+                  ztest_4 = 0
+               ENDIF
+            END DO
+
+         ENDIF ! ztest_1 + ztest_2 + ztest_3 + ztest_4
+ 
+         ztests = ztest_1 + ztest_2 + ztest_3 + ztest_4
+
+      END DO ! i_fill
+
+      IF(lwp) THEN 
+         WRITE(numout,*), ' ztests : ', ztests
+         IF ( ztests .NE. 4 ) THEN
+            WRITE(numout,*)
+            WRITE(numout,*), ' !!!! ALERT                  !!! '
+            WRITE(numout,*), ' !!!! Something is wrong in the LIM3 initialization procedure '
+            WRITE(numout,*)
+            WRITE(numout,*), ' *** ztests is not equal to 4 '
+            WRITE(numout,*), ' *** ztest_i (i=1,4) = ', ztest_1, ztest_2, ztest_3, ztest_4
+            WRITE(numout,*), ' zat_i_ini : ', zat_i_ini(i_hemis)
+            WRITE(numout,*), ' zht_i_ini : ', zht_i_ini(i_hemis)
+         ENDIF ! ztests .NE. 4
+      ENDIF
+      
+      END DO ! i_hemis
+
+      !---------------------------------------------------------------------
+      ! 3.3) Space-dependent arrays for ice state variables
+      !---------------------------------------------------------------------
+
+      ! Ice concentration, thickness and volume, ice salinity, ice age, surface temperature
+      DO jl = 1, jpl ! loop over categories
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               a_i(ji,jj,jl)   = zswitch(ji,jj) * za_i_ini (jl,zhemis(ji,jj))  ! concentration
+               ht_i(ji,jj,jl)  = zswitch(ji,jj) * zh_i_ini(jl,zhemis(ji,jj))  ! ice thickness
+               ht_s(ji,jj,jl)  = ht_i(ji,jj,jl) * ( zht_s_ini( zhemis(ji,jj) ) / zht_i_ini( zhemis(ji,jj) ) )  ! snow depth
+               sm_i(ji,jj,jl)  = zswitch(ji,jj) * zsm_i_ini(zhemis(ji,jj)) !+ ( 1._wp - zswitch(ji,jj) ) * s_i_min ! salinity
+               o_i(ji,jj,jl)   = zswitch(ji,jj) * 1._wp + ( 1._wp - zswitch(ji,jj) ) ! age
+               t_su(ji,jj,jl)  = zswitch(ji,jj) * ztm_i_ini(zhemis(ji,jj)) + ( 1._wp - zswitch(ji,jj) ) * rtt ! surf temp
+
+               ! This case below should not be used if (ht_s/ht_i) is ok in namelist
+               ! In case snow load is in excess that would lead to transformation from snow to ice
+               ! Then, transfer the snow excess into the ice (different from limthd_dh)
+               zdh = MAX( 0._wp, ( rhosn * ht_s(ji,jj,jl) + ( rhoic - rau0 ) * ht_i(ji,jj,jl) ) * r1_rau0 ) 
+               ! recompute ht_i, ht_s avoiding out of bounds values
+               ht_i(ji,jj,jl) = MIN( hi_max(jl), ht_i(ji,jj,jl) + zdh )
+               ht_s(ji,jj,jl) = MAX( 0._wp, ht_s(ji,jj,jl) - zdh * rhoic / rhosn )
+
+               ! ice volume, salt content, age content
+               v_i(ji,jj,jl)   = ht_i(ji,jj,jl) * a_i(ji,jj,jl)              ! ice volume
+               v_s(ji,jj,jl)   = ht_s(ji,jj,jl) * a_i(ji,jj,jl)              ! snow volume
+               smv_i(ji,jj,jl) = MIN( sm_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) ! salt content
+               oa_i(ji,jj,jl)  = o_i(ji,jj,jl) * a_i(ji,jj,jl)               ! age content
+            END DO ! ji
+         END DO ! jj
+      END DO ! jl
+
+      ! Snow temperature and heat content
+      DO jk = 1, nlay_s
+         DO jl = 1, jpl ! loop over categories
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                   t_s(ji,jj,jk,jl) = zswitch(ji,jj) * ztm_i_ini(zhemis(ji,jj)) + ( 1._wp - zswitch(ji,jj) ) * rtt
+                   ! Snow energy of melting
+                   e_s(ji,jj,jk,jl) = zswitch(ji,jj) * rhosn * ( cpic * ( rtt - t_s(ji,jj,jk,jl) ) + lfus )
+                   ! Change dimensions
+                   e_s(ji,jj,jk,jl) = e_s(ji,jj,jk,jl) / unit_fac
+                   ! Multiply by volume, so that heat content in Joules
+                   e_s(ji,jj,jk,jl) = e_s(ji,jj,jk,jl) * area(ji,jj) * v_s(ji,jj,jl) / nlay_s
+               END DO ! ji
+            END DO ! jj
+         END DO ! jl
+      END DO ! jk
+
+      ! Ice salinity, temperature and heat content
+      DO jk = 1, nlay_i
+         DO jl = 1, jpl ! loop over categories
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                   t_i(ji,jj,jk,jl) = zswitch(ji,jj) * ztm_i_ini(zhemis(ji,jj)) + ( 1._wp - zswitch(ji,jj) ) * rtt 
+                   s_i(ji,jj,jk,jl) = zswitch(ji,jj) * zsm_i_ini(zhemis(ji,jj)) !+ ( 1._wp - zswitch(ji,jj) ) * s_i_min
+                   ztmelts          = - tmut * s_i(ji,jj,jk,jl) + rtt !Melting temperature in K
+
+                   ! heat content per unit volume
+                   e_i(ji,jj,jk,jl) = zswitch(ji,jj) * rhoic * (   cpic    * ( ztmelts - t_i(ji,jj,jk,jl) ) &
+                      +   lfus    * ( 1._wp - (ztmelts-rtt) / MIN((t_i(ji,jj,jk,jl)-rtt),-epsi20) ) &
+                      -   rcp     * ( ztmelts - rtt ) )
+
+                   ! Correct dimensions to avoid big values
+                   e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) / unit_fac 
+
+                   ! Mutliply by ice volume, and divide by number of layers to get heat content in J
+                   e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * area(ji,jj) * v_i(ji,jj,jl) / nlay_i
+               END DO ! ji
+            END DO ! jj
+         END DO ! jl
+      END DO ! jk
+
+      tn_ice (:,:,:) = t_su (:,:,:)
+
+      ELSE 
+         ! if ln_limini=false
+         a_i  (:,:,:) = 0._wp
+         v_i  (:,:,:) = 0._wp
+         v_s  (:,:,:) = 0._wp
+         smv_i(:,:,:) = 0._wp
+         oa_i (:,:,:) = 0._wp
+         ht_i (:,:,:) = 0._wp
+         ht_s (:,:,:) = 0._wp
+         sm_i (:,:,:) = 0._wp
+         o_i  (:,:,:) = 0._wp
+
+         e_i(:,:,:,:) = 0._wp
+         e_s(:,:,:,:) = 0._wp
+
+         DO jl = 1, jpl
+            DO jk = 1, nlay_i
+               t_i(:,:,jk,jl) = rtt * tms(:,:)
+            END DO
+            DO jk = 1, nlay_s
+               t_s(:,:,jk,jl) = rtt * tms(:,:)
+            END DO
+         END DO
+      
+      ENDIF ! ln_limini
+      
+      at_i (:,:) = 0.0_wp
+      DO jl = 1, jpl
+         at_i (:,:) = at_i (:,:) + a_i (:,:,jl)
+      END DO
+      !
+      !--------------------------------------------------------------------
+      ! 4) Global ice variables for output diagnostics                    | 
+      !--------------------------------------------------------------------
+      u_ice (:,:)     = 0._wp
+      v_ice (:,:)     = 0._wp
+      stress1_i(:,:)  = 0._wp
+      stress2_i(:,:)  = 0._wp
+      stress12_i(:,:) = 0._wp
+
+      !--------------------------------------------------------------------
+      ! 5) Moments for advection
+      !--------------------------------------------------------------------
+
+      sxopw (:,:) = 0._wp 
+      syopw (:,:) = 0._wp 
+      sxxopw(:,:) = 0._wp 
+      syyopw(:,:) = 0._wp 
+      sxyopw(:,:) = 0._wp
+
+      sxice (:,:,:)  = 0._wp   ;   sxsn (:,:,:)  = 0._wp   ;   sxa  (:,:,:)  = 0._wp
+      syice (:,:,:)  = 0._wp   ;   sysn (:,:,:)  = 0._wp   ;   sya  (:,:,:)  = 0._wp
+      sxxice(:,:,:)  = 0._wp   ;   sxxsn(:,:,:)  = 0._wp   ;   sxxa (:,:,:)  = 0._wp
+      syyice(:,:,:)  = 0._wp   ;   syysn(:,:,:)  = 0._wp   ;   syya (:,:,:)  = 0._wp
+      sxyice(:,:,:)  = 0._wp   ;   sxysn(:,:,:)  = 0._wp   ;   sxya (:,:,:)  = 0._wp
+
+      sxc0  (:,:,:)  = 0._wp   ;   sxe  (:,:,:,:)= 0._wp   
+      syc0  (:,:,:)  = 0._wp   ;   sye  (:,:,:,:)= 0._wp   
+      sxxc0 (:,:,:)  = 0._wp   ;   sxxe (:,:,:,:)= 0._wp   
+      syyc0 (:,:,:)  = 0._wp   ;   syye (:,:,:,:)= 0._wp   
+      sxyc0 (:,:,:)  = 0._wp   ;   sxye (:,:,:,:)= 0._wp   
+
+      sxsal  (:,:,:)  = 0._wp
+      sysal  (:,:,:)  = 0._wp
+      sxxsal (:,:,:)  = 0._wp
+      syysal (:,:,:)  = 0._wp
+      sxysal (:,:,:)  = 0._wp
+
+      sxage  (:,:,:)  = 0._wp
+      syage  (:,:,:)  = 0._wp
+      sxxage (:,:,:)  = 0._wp
+      syyage (:,:,:)  = 0._wp
+      sxyage (:,:,:)  = 0._wp
+
+
+      CALL wrk_dealloc( jpi, jpj, zswitch )
+      CALL wrk_dealloc( jpi, jpj, zhemis )
+      CALL wrk_dealloc( jpl,   2, zh_i_ini,  za_i_ini,  zv_i_ini )
+      CALL wrk_dealloc(   2,      zht_i_ini, zat_i_ini, zvt_i_ini, zht_s_ini, zsm_i_ini, ztm_i_ini )
+
+   END SUBROUTINE lim_istate
+
+   SUBROUTINE lim_istate_init
+      !!-------------------------------------------------------------------
+      !!                   ***  ROUTINE lim_istate_init  ***
+      !!        
+      !! ** Purpose : Definition of initial state of the ice 
+      !!
+      !! ** Method : Read the namiceini namelist and check the parameter 
+      !!       values called at the first timestep (nit000)
+      !!
+      !! ** input : 
+      !!        Namelist namiceini
+      !!
+      !! history :
+      !!  8.5  ! 03-08 (C. Ethe) original code 
+      !!  8.5  ! 07-11 (M. Vancoppenolle) rewritten initialization
+      !!-----------------------------------------------------------------------------
+      NAMELIST/namiceini/ ln_limini, thres_sst, hts_ini_n, hts_ini_s, hti_ini_n, hti_ini_s,  &
+         &                                      ati_ini_n, ati_ini_s, smi_ini_n, smi_ini_s, tmi_ini_n, tmi_ini_s
+      INTEGER :: ios                 ! Local integer output status for namelist read
+      !!-----------------------------------------------------------------------------
+      !
+      REWIND( numnam_ice_ref )              ! Namelist namiceini in reference namelist : Ice initial state
+      READ  ( numnam_ice_ref, namiceini, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceini in reference namelist', lwp )
+
+      REWIND( numnam_ice_cfg )              ! Namelist namiceini in configuration namelist : Ice initial state
+      READ  ( numnam_ice_cfg, namiceini, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceini in configuration namelist', lwp )
+      IF(lwm) WRITE ( numoni, namiceini )
+
+      ! Define the initial parameters
+      ! -------------------------
+
+      IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) 'lim_istate_init : ice parameters inititialisation '
+         WRITE(numout,*) '~~~~~~~~~~~~~~~'
+         WRITE(numout,*) '   initialization with ice (T) or not (F)       ln_limini   = ', ln_limini
+         WRITE(numout,*) '   threshold water temp. for initial sea-ice    thres_sst  = ', thres_sst
+         WRITE(numout,*) '   initial snow thickness in the north          hts_ini_n  = ', hts_ini_n
+         WRITE(numout,*) '   initial snow thickness in the south          hts_ini_s  = ', hts_ini_s 
+         WRITE(numout,*) '   initial ice thickness  in the north          hti_ini_n  = ', hti_ini_n
+         WRITE(numout,*) '   initial ice thickness  in the south          hti_ini_s  = ', hti_ini_s
+         WRITE(numout,*) '   initial ice concentr.  in the north          ati_ini_n  = ', ati_ini_n
+         WRITE(numout,*) '   initial ice concentr.  in the north          ati_ini_s  = ', ati_ini_s
+         WRITE(numout,*) '   initial  ice salinity  in the north          smi_ini_n  = ', smi_ini_n
+         WRITE(numout,*) '   initial  ice salinity  in the south          smi_ini_s  = ', smi_ini_s
+         WRITE(numout,*) '   initial  ice/snw temp  in the north          tmi_ini_n  = ', tmi_ini_n
+         WRITE(numout,*) '   initial  ice/snw temp  in the south          tmi_ini_s  = ', tmi_ini_s
+      ENDIF
+
+   END SUBROUTINE lim_istate_init
+
+#else
+   !!----------------------------------------------------------------------
+   !!   Default option :         Empty module          NO LIM sea-ice model
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE lim_istate          ! Empty routine
+   END SUBROUTINE lim_istate
+#endif
+
+   !!======================================================================
+END MODULE limistate
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/p4zopt.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/p4zopt.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/p4zopt.F90	(revision 2504)
@@ -0,0 +1,408 @@
+MODULE p4zopt
+   !!======================================================================
+   !!                         ***  MODULE p4zopt  ***
+   !! TOP - PISCES : Compute the light availability in the water column
+   !!======================================================================
+   !! History :   1.0  !  2004     (O. Aumont) Original code
+   !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
+   !!             3.2  !  2009-04  (C. Ethe, G. Madec)  optimisation
+   !!             3.4  !  2011-06  (O. Aumont, C. Ethe) Improve light availability of nano & diat
+   !!----------------------------------------------------------------------
+#if defined  key_pisces
+   !!----------------------------------------------------------------------
+   !!   'key_pisces'                                       PISCES bio-model
+   !!----------------------------------------------------------------------
+   !!   p4z_opt       : light availability in the water column
+   !!----------------------------------------------------------------------
+   USE trc            ! tracer variables
+   USE oce_trc        ! tracer-ocean share variables
+   USE sms_pisces     ! Source Minus Sink of PISCES
+   USE iom            ! I/O manager
+   USE fldread         !  time interpolation
+   USE prtctl_trc      !  print control for debugging
+
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   p4z_opt        ! called in p4zbio.F90 module
+   PUBLIC   p4z_opt_init   ! called in trcsms_pisces.F90 module
+   PUBLIC   p4z_opt_alloc
+
+   !! * Shared module variables
+
+   LOGICAL  :: ln_varpar   !: boolean for variable PAR fraction
+   REAL(wp) :: parlux      !: Fraction of shortwave as PAR
+   REAL(wp) :: xparsw                 !: parlux/3
+
+   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_par      ! structure of input par
+   INTEGER , PARAMETER :: nbtimes = 365  !: maximum number of times record in a file
+   INTEGER  :: ntimes_par                ! number of time steps in a file
+   REAL(wp), ALLOCATABLE, SAVE,   DIMENSION(:,:) :: par_varsw    !: PAR fraction of shortwave
+
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: enano, ediat   !: PAR for phyto, nano and diat 
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: emoy           !: averaged PAR in the mixed layer
+
+   INTEGER  ::   nksrp   ! levels below which the light cannot penetrate ( depth larger than 391 m)
+
+   INTEGER, PARAMETER :: jp_rgb = 61
+   REAL(wp), DIMENSION(3,jp_rgb), PUBLIC ::   xkrgb   !: tabulated attenuation coefficients for RGB absorption
+
+     
+   !!* Substitution
+#  include "top_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
+   !! $Id: p4zopt.F90 3160 2011-11-20 14:27:18Z cetlod $ 
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE p4z_opt( kt, jnt )
+      !!---------------------------------------------------------------------
+      !!                     ***  ROUTINE p4z_opt  ***
+      !!
+      !! ** Purpose :   Compute the light availability in the water column
+      !!              depending on the depth and the chlorophyll concentration
+      !!
+      !! ** Method  : - ???
+      !!---------------------------------------------------------------------
+      !
+      INTEGER, INTENT(in) ::   kt, jnt   ! ocean time step
+      !
+      INTEGER  ::   ji, jj, jk
+      INTEGER  ::   irgb
+      REAL(wp) ::   zchl, zxsi0r
+      REAL(wp) ::   zc0 , zc1 , zc2, zc3, z1_dep
+      REAL(wp), POINTER, DIMENSION(:,:  ) :: zdepmoy, zetmp, zetmp1, zetmp2
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zekg, zekr, zekb, ze0, ze1, ze2, ze3
+      !!---------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('p4z_opt')
+      !
+      ! Allocate temporary workspace
+      CALL wrk_alloc( jpi, jpj,      zdepmoy, zetmp, zetmp1, zetmp2 ) 
+      CALL wrk_alloc( jpi, jpj, jpk, zekg, zekr, zekb, ze0, ze1, ze2, ze3 )
+
+      IF( jnt == 1 .AND. ln_varpar ) CALL p4z_optsbc( kt )
+
+      !     Initialisation of variables used to compute PAR
+      !     -----------------------------------------------
+      ze1(:,:,jpk) = 0._wp
+      ze2(:,:,jpk) = 0._wp
+      ze3(:,:,jpk) = 0._wp
+
+      !                                        !* attenuation coef. function of Chlorophyll and wavelength (Red-Green-Blue)
+      DO jk = 1, jpkm1                         !  --------------------------------------------------------
+!CDIR NOVERRCHK
+         DO jj = 1, jpj
+!CDIR NOVERRCHK
+            DO ji = 1, jpi
+               zchl = ( trn(ji,jj,jk,jpnch) + trn(ji,jj,jk,jpdch) + rtrn ) * 1.e6
+               zchl = MIN(  10. , MAX( 0.05, zchl )  )
+               irgb = MAX ( 1, MIN ( jp_rgb, NINT( 41 + 20.* LOG10( zchl ) + rtrn )))
+               !                                                         
+               zekb(ji,jj,jk) = xkrgb(1,irgb) * fse3t(ji,jj,jk)
+               zekg(ji,jj,jk) = xkrgb(2,irgb) * fse3t(ji,jj,jk)
+               zekr(ji,jj,jk) = xkrgb(3,irgb) * fse3t(ji,jj,jk)
+            END DO
+         END DO
+      END DO
+
+
+      !                                        !* Photosynthetically Available Radiation (PAR)
+      !                                        !  --------------------------------------
+
+      IF( ln_varpar ) THEN
+         ze1(:,:,1) = par_varsw(:,:) * qsr(:,:) * EXP( -0.5 * zekb(:,:,1) )
+         ze2(:,:,1) = par_varsw(:,:) * qsr(:,:) * EXP( -0.5 * zekg(:,:,1) )
+         ze3(:,:,1) = par_varsw(:,:) * qsr(:,:) * EXP( -0.5 * zekr(:,:,1) )
+      ELSE
+         ze1(:,:,1) = xparsw         * qsr(:,:) * EXP( -0.5 * zekb(:,:,1) )
+         ze2(:,:,1) = xparsw         * qsr(:,:) * EXP( -0.5 * zekg(:,:,1) )
+         ze3(:,:,1) = xparsw         * qsr(:,:) * EXP( -0.5 * zekr(:,:,1) )
+      ENDIF
+
+!CDIR NOVERRCHK
+      DO jj = 1, jpj
+!CDIR NOVERRCHK
+         DO ji = 1, jpi
+            zc1 = ze1(ji,jj,1)
+            zc2 = ze2(ji,jj,1) 
+            zc3 = ze3(ji,jj,1)
+            etot (ji,jj,1) = (       zc1 +        zc2 +       zc3 )
+            enano(ji,jj,1) = ( 2.1 * zc1 + 0.42 * zc2 + 0.4 * zc3 )
+            ediat(ji,jj,1) = ( 1.6 * zc1 + 0.69 * zc2 + 0.7 * zc3 )
+         END DO
+      END DO
+
+    
+      DO jk = 2, nksrp      
+!CDIR NOVERRCHK
+         DO jj = 1, jpj
+!CDIR NOVERRCHK
+            DO ji = 1, jpi
+               zc1 = ze1(ji,jj,jk-1) * EXP( -0.5 * ( zekb(ji,jj,jk-1) + zekb(ji,jj,jk) ) )
+               zc2 = ze2(ji,jj,jk-1) * EXP( -0.5 * ( zekg(ji,jj,jk-1) + zekg(ji,jj,jk) ) )
+               zc3 = ze3(ji,jj,jk-1) * EXP( -0.5 * ( zekr(ji,jj,jk-1) + zekr(ji,jj,jk) ) )
+               ze1  (ji,jj,jk) = zc1
+               ze2  (ji,jj,jk) = zc2
+               ze3  (ji,jj,jk) = zc3
+               etot (ji,jj,jk) = (       zc1 +        zc2 +       zc3 )
+               enano(ji,jj,jk) = ( 2.1 * zc1 + 0.42 * zc2 + 0.4 * zc3 )
+               ediat(ji,jj,jk) = ( 1.6 * zc1 + 0.69 * zc2 + 0.7 * zc3 )
+            END DO
+         END DO
+      END DO
+
+      IF( ln_qsr_bio ) THEN                    !* heat flux accros w-level (used in the dynamics)
+         !                                     !  ------------------------
+         zxsi0r = 1.e0 / rn_si0
+         !
+         ze0(:,:,1) = rn_abs * qsr(:,:)
+         !                                                    ! surface value : separation in R-G-B + near surface
+         IF( ln_varpar ) THEN
+            ze0(:,:,1) = ( 1. - 3. * par_varsw(:,:) ) * qsr(:,:)
+            ze1(:,:,1) = par_varsw(:,:)               * qsr(:,:)         
+            ze2(:,:,1) = par_varsw(:,:)               * qsr(:,:)
+            ze3(:,:,1) = par_varsw(:,:)               * qsr(:,:)
+         ELSE
+            ze0(:,:,1) = ( 1. - 3. * xparsw )  * qsr(:,:)
+            ze1(:,:,1) = xparsw                * qsr(:,:)         
+            ze2(:,:,1) = xparsw                * qsr(:,:)
+            ze3(:,:,1) = xparsw                * qsr(:,:)
+         ENDIF
+         etot3(:,:,1) =  qsr(:,:) * tmask(:,:,1)
+         !
+         !
+         DO jk = 2, nksrp + 1
+!CDIR NOVERRCHK
+            DO jj = 1, jpj
+!CDIR NOVERRCHK
+               DO ji = 1, jpi
+                  zc0 = ze0(ji,jj,jk-1) * EXP( -fse3t(ji,jj,jk-1) * zxsi0r )
+                  zc1 = ze1(ji,jj,jk-1) * EXP( -zekb(ji,jj,jk-1 ) )
+                  zc2 = ze2(ji,jj,jk-1) * EXP( -zekg(ji,jj,jk-1 ) )
+                  zc3 = ze3(ji,jj,jk-1) * EXP( -zekr(ji,jj,jk-1 ) )
+                  ze0(ji,jj,jk) = zc0
+                  ze1(ji,jj,jk) = zc1
+                  ze2(ji,jj,jk) = zc2
+                  ze3(ji,jj,jk) = zc3
+                  etot3(ji,jj,jk) = ( zc0 + zc1 + zc2 + zc3 ) * tmask(ji,jj,jk)
+              END DO
+              !
+            END DO
+            !
+        END DO
+        !
+      ENDIF
+
+      !                                        !* Euphotic depth and level
+      neln(:,:) = 1                            !  ------------------------
+      heup(:,:) = 300.
+
+      DO jk = 2, nksrp
+         DO jj = 1, jpj
+           DO ji = 1, jpi
+              IF( etot(ji,jj,jk) * tmask(ji,jj,jk) >= 0.0043 * qsr(ji,jj) )  THEN
+                 neln(ji,jj) = jk+1                    ! Euphotic level : 1rst T-level strictly below Euphotic layer
+                 !                                     ! nb: ensure the compatibility with nmld_trc definition in trd_mld_trc_zint
+                 heup(ji,jj) = fsdepw(ji,jj,jk+1)      ! Euphotic layer depth
+              ENDIF
+           END DO
+        END DO
+      END DO
+ 
+      heup(:,:) = MIN( 300., heup(:,:) )
+
+      !                                        !* mean light over the mixed layer
+      zdepmoy(:,:)   = 0.e0                    !  -------------------------------
+      zetmp  (:,:)   = 0.e0
+      zetmp1 (:,:)   = 0.e0
+      zetmp2 (:,:)   = 0.e0
+
+      DO jk = 1, nksrp
+!CDIR NOVERRCHK
+         DO jj = 1, jpj
+!CDIR NOVERRCHK
+            DO ji = 1, jpi
+               IF( fsdepw(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
+                  zetmp  (ji,jj) = zetmp  (ji,jj) + etot (ji,jj,jk) * fse3t(ji,jj,jk)
+                  zetmp1 (ji,jj) = zetmp1 (ji,jj) + enano(ji,jj,jk) * fse3t(ji,jj,jk)
+                  zetmp2 (ji,jj) = zetmp2 (ji,jj) + ediat(ji,jj,jk) * fse3t(ji,jj,jk)
+                  zdepmoy(ji,jj) = zdepmoy(ji,jj) + fse3t(ji,jj,jk)
+               ENDIF
+            END DO
+         END DO
+      END DO
+      !
+      emoy(:,:,:) = etot(:,:,:)
+      !
+      DO jk = 1, nksrp
+!CDIR NOVERRCHK
+         DO jj = 1, jpj
+!CDIR NOVERRCHK
+            DO ji = 1, jpi
+               IF( fsdepw(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
+                  z1_dep = 1. / ( zdepmoy(ji,jj) + rtrn )
+                  emoy (ji,jj,jk) = zetmp (ji,jj) * z1_dep
+                  enano(ji,jj,jk) = zetmp1(ji,jj) * z1_dep
+                  ediat(ji,jj,jk) = zetmp2(ji,jj) * z1_dep
+               ENDIF
+            END DO
+         END DO
+      END DO
+
+      IF( ln_diatrc ) THEN        ! save output diagnostics
+        !
+        IF( lk_iomput ) THEN
+           IF( jnt == nrdttrc ) THEN
+              CALL iom_put( "Heup", heup(:,:  ) * tmask(:,:,1) )  ! euphotic layer deptht
+              CALL iom_put( "PAR" , emoy(:,:,:) * tmask(:,:,:) )  ! Photosynthetically Available Radiation
+           ENDIF
+        ELSE
+           trc2d(:,:,  jp_pcs0_2d + 10) = heup(:,:  ) * tmask(:,:,1)  
+           trc3d(:,:,:,jp_pcs0_3d + 3)  = etot(:,:,:) * tmask(:,:,:)
+        ENDIF
+        !
+      ENDIF
+      !
+      CALL wrk_dealloc( jpi, jpj,      zdepmoy, zetmp, zetmp1, zetmp2 )
+      CALL wrk_dealloc( jpi, jpj, jpk, zekg, zekr, zekb, ze0, ze1, ze2, ze3 )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('p4z_opt')
+      !
+   END SUBROUTINE p4z_opt
+
+   SUBROUTINE p4z_optsbc( kt )
+      !!----------------------------------------------------------------------
+      !!                  ***  routine p4z_optsbc  ***
+      !!
+      !! ** purpose :   read and interpolate the variable PAR fraction
+      !!                of shortwave radiation
+      !!
+      !! ** method  :   read the files and interpolate the appropriate variables
+      !!
+      !! ** input   :   external netcdf files
+      !!
+      !!----------------------------------------------------------------------
+      !! * arguments
+      INTEGER, INTENT( in  ) ::   kt   ! ocean time step
+
+      !! * local declarations
+      INTEGER  :: ji,jj
+      REAL(wp) :: zcoef
+      !!---------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('p4z_optsbc')
+      !
+      ! Compute par_varsw at nit000 or only if there is more than 1 time record in par coefficient file
+      IF( ln_varpar ) THEN
+         IF( kt == nit000 .OR. ( kt /= nit000 .AND. ntimes_par > 1 ) ) THEN
+            CALL fld_read( kt, 1, sf_par )
+            par_varsw(:,:) = ( sf_par(1)%fnow(:,:,1) )/3.0
+         ENDIF
+      ENDIF
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('p4z_optsbc')
+      !
+   END SUBROUTINE p4z_optsbc
+
+   SUBROUTINE p4z_opt_init
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE p4z_opt_init  ***
+      !!
+      !! ** Purpose :   Initialization of tabulated attenuation coef
+      !!                and of the percentage of PAR in Shortwave
+      !!
+      !! ** Input   :   external ascii and netcdf files
+      !!----------------------------------------------------------------------
+      !
+      INTEGER :: numpar
+      INTEGER :: ierr
+      INTEGER :: ios                 ! Local integer output status for namelist read
+      REAL(wp), DIMENSION(nbtimes) :: zsteps                 ! times records
+      !
+      CHARACTER(len=100) ::  cn_dir          ! Root directory for location of ssr files
+      TYPE(FLD_N) ::   sn_par                ! informations about the fields to be read
+      !
+      NAMELIST/nampisopt/cn_dir, sn_par, ln_varpar, parlux
+
+      !!----------------------------------------------------------------------
+
+      IF( nn_timing == 1 )  CALL timing_start('p4z_opt_init')
+
+      REWIND( numnatp_ref )              ! Namelist nampisopt in reference namelist : Pisces attenuation coef. and PAR
+      READ  ( numnatp_ref, nampisopt, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisopt in reference namelist', lwp )
+
+      REWIND( numnatp_cfg )              ! Namelist nampisopt in configuration namelist : Pisces attenuation coef. and PAR
+      READ  ( numnatp_cfg, nampisopt, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisopt in configuration namelist', lwp )
+      IF(lwm) WRITE ( numonp, nampisopt )
+
+      IF(lwp) THEN
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' namelist : nampisopt '
+         WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~ '
+         WRITE(numout,*) '    PAR as a variable fraction of SW     ln_varpar      = ', ln_varpar
+         WRITE(numout,*) '    Default value for the PAR fraction   parlux         = ', parlux
+      ENDIF
+      !
+      xparsw = parlux / 3.0
+      !
+      ! Variable PAR at the surface of the ocean
+      ! ----------------------------------------
+      IF( ln_varpar ) THEN
+         IF(lwp) WRITE(numout,*) '    initialize variable par fraction '
+         IF(lwp) WRITE(numout,*) '    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
+         !
+         ALLOCATE( par_varsw(jpi,jpj) )
+         !
+         ALLOCATE( sf_par(1), STAT=ierr )           !* allocate and fill sf_sst (forcing structure) with sn_sst
+         IF( ierr > 0 )   CALL ctl_stop( 'STOP', 'p4z_opt_init: unable to allocate sf_par structure' )
+         !
+         CALL fld_fill( sf_par, (/ sn_par /), cn_dir, 'p4z_opt_init', 'Variable PAR fraction ', 'nampisopt' )
+                                   ALLOCATE( sf_par(1)%fnow(jpi,jpj,1)   )
+         IF( sn_par%ln_tint )      ALLOCATE( sf_par(1)%fdta(jpi,jpj,1,2) )
+
+         CALL iom_open (  TRIM( sn_par%clname ) , numpar )
+         CALL iom_gettime( numpar, zsteps, kntime=ntimes_par)  ! get number of record in file
+      ENDIF
+      !
+      CALL trc_oce_rgb( xkrgb )                  ! tabulated attenuation coefficients
+      nksrp = trc_oce_ext_lev( r_si2, 0.33e2 )     ! max level of light extinction (Blue Chl=0.01)
+      !
+      IF(lwp) WRITE(numout,*) '        level of light extinction = ', nksrp, ' ref depth = ', gdepw_1d(nksrp+1), ' m'
+      !
+                         etot (:,:,:) = 0._wp
+                         enano(:,:,:) = 0._wp
+                         ediat(:,:,:) = 0._wp
+      IF( ln_qsr_bio )   etot3(:,:,:) = 0._wp
+      ! 
+      IF( nn_timing == 1 )  CALL timing_stop('p4z_opt_init')
+      !
+   END SUBROUTINE p4z_opt_init
+
+
+   INTEGER FUNCTION p4z_opt_alloc()
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE p4z_opt_alloc  ***
+      !!----------------------------------------------------------------------
+      ALLOCATE( enano(jpi,jpj,jpk), ediat(jpi,jpj,jpk), emoy (jpi,jpj,jpk), STAT=p4z_opt_alloc ) 
+         !
+      IF( p4z_opt_alloc /= 0 ) CALL ctl_warn('p4z_opt_alloc : failed to allocate arrays.')
+      !
+   END FUNCTION p4z_opt_alloc
+
+#else
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                   No PISCES bio-model
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE p4z_opt                   ! Empty routine
+   END SUBROUTINE p4z_opt
+#endif 
+
+   !!======================================================================
+END MODULE  p4zopt
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/sbccpl.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/sbccpl.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/sbccpl.F90	(revision 2504)
@@ -0,0 +1,1621 @@
+MODULE sbccpl
+   !!======================================================================
+   !!                       ***  MODULE  sbccpl  ***
+   !! Surface Boundary Condition :  momentum, heat and freshwater fluxes in coupled mode
+   !!======================================================================
+   !! History :  2.0  ! 2007-06  (R. Redler, N. Keenlyside, W. Park) Original code split into flxmod & taumod
+   !!            3.0  ! 2008-02  (G. Madec, C Talandier)  surface module
+   !!            3.1  ! 2009_02  (G. Madec, S. Masson, E. Maisonave, A. Caubel) generic coupled interface
+   !!            3.4  ! 2011_11  (C. Harris) more flexibility + multi-category fields
+   !!----------------------------------------------------------------------
+#if defined key_oasis3 || defined key_oasis4
+   !!----------------------------------------------------------------------
+   !!   'key_oasis3' or 'key_oasis4'   Coupled Ocean/Atmosphere formulation
+   !!----------------------------------------------------------------------
+   !!   namsbc_cpl      : coupled formulation namlist
+   !!   sbc_cpl_init    : initialisation of the coupled exchanges
+   !!   sbc_cpl_rcv     : receive fields from the atmosphere over the ocean (ocean only)
+   !!                     receive stress from the atmosphere over the ocean (ocean-ice case)
+   !!   sbc_cpl_ice_tau : receive stress from the atmosphere over ice
+   !!   sbc_cpl_ice_flx : receive fluxes from the atmosphere over ice
+   !!   sbc_cpl_snd     : send     fields to the atmosphere
+   !!----------------------------------------------------------------------
+   USE dom_oce         ! ocean space and time domain
+   USE sbc_oce         ! Surface boundary condition: ocean fields
+   USE sbc_ice         ! Surface boundary condition: ice fields
+   USE sbcdcy          ! surface boundary condition: diurnal cycle
+   USE phycst          ! physical constants
+#if defined key_lim3
+   USE par_ice         ! ice parameters
+   USE ice             ! ice variables
+#endif
+#if defined key_lim2
+   USE par_ice_2       ! ice parameters
+   USE ice_2           ! ice variables
+#endif
+#if defined key_oasis3
+   USE cpl_oasis3      ! OASIS3 coupling
+#endif
+#if defined key_oasis4
+   USE cpl_oasis4      ! OASIS4 coupling
+#endif
+   USE geo2ocean       ! 
+   USE oce   , ONLY : tsn, un, vn
+   USE albedo          !
+   USE in_out_manager  ! I/O manager
+   USE iom             ! NetCDF library
+   USE lib_mpp         ! distribued memory computing library
+   USE wrk_nemo        ! work arrays
+   USE timing          ! Timing
+   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+#if defined key_cpl_carbon_cycle
+   USE p4zflx, ONLY : oce_co2
+#endif
+   USE diaar5, ONLY :   lk_diaar5
+#if defined key_cice
+   USE ice_domain_size, only: ncat
+#endif
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   sbc_cpl_rcv        ! routine called by sbc_ice_lim(_2).F90
+   PUBLIC   sbc_cpl_snd        ! routine called by step.F90
+   PUBLIC   sbc_cpl_ice_tau    ! routine called by sbc_ice_lim(_2).F90
+   PUBLIC   sbc_cpl_ice_flx    ! routine called by sbc_ice_lim(_2).F90
+#if defined key_oasis_mct
+   PUBLIC   sbc_cpl_init 
+#endif
+
+   INTEGER, PARAMETER ::   jpr_otx1   =  1            ! 3 atmosphere-ocean stress components on grid 1
+   INTEGER, PARAMETER ::   jpr_oty1   =  2            ! 
+   INTEGER, PARAMETER ::   jpr_otz1   =  3            ! 
+   INTEGER, PARAMETER ::   jpr_otx2   =  4            ! 3 atmosphere-ocean stress components on grid 2
+   INTEGER, PARAMETER ::   jpr_oty2   =  5            ! 
+   INTEGER, PARAMETER ::   jpr_otz2   =  6            ! 
+   INTEGER, PARAMETER ::   jpr_itx1   =  7            ! 3 atmosphere-ice   stress components on grid 1
+   INTEGER, PARAMETER ::   jpr_ity1   =  8            ! 
+   INTEGER, PARAMETER ::   jpr_itz1   =  9            ! 
+   INTEGER, PARAMETER ::   jpr_itx2   = 10            ! 3 atmosphere-ice   stress components on grid 2
+   INTEGER, PARAMETER ::   jpr_ity2   = 11            ! 
+   INTEGER, PARAMETER ::   jpr_itz2   = 12            ! 
+   INTEGER, PARAMETER ::   jpr_qsroce = 13            ! Qsr above the ocean
+   INTEGER, PARAMETER ::   jpr_qsrice = 14            ! Qsr above the ice
+   INTEGER, PARAMETER ::   jpr_qsrmix = 15 
+   INTEGER, PARAMETER ::   jpr_qnsoce = 16            ! Qns above the ocean
+   INTEGER, PARAMETER ::   jpr_qnsice = 17            ! Qns above the ice
+   INTEGER, PARAMETER ::   jpr_qnsmix = 18
+   INTEGER, PARAMETER ::   jpr_rain   = 19            ! total liquid precipitation (rain)
+   INTEGER, PARAMETER ::   jpr_snow   = 20            ! solid precipitation over the ocean (snow)
+   INTEGER, PARAMETER ::   jpr_tevp   = 21            ! total evaporation
+   INTEGER, PARAMETER ::   jpr_ievp   = 22            ! solid evaporation (sublimation)
+   INTEGER, PARAMETER ::   jpr_sbpr   = 23            ! sublimation - liquid precipitation - solid precipitation
+   INTEGER, PARAMETER ::   jpr_semp   = 24            ! solid freshwater budget (sublimation - snow)
+   INTEGER, PARAMETER ::   jpr_oemp   = 25            ! ocean freshwater budget (evap - precip)
+   INTEGER, PARAMETER ::   jpr_w10m   = 26            ! 10m wind
+   INTEGER, PARAMETER ::   jpr_dqnsdt = 27            ! d(Q non solar)/d(temperature)
+   INTEGER, PARAMETER ::   jpr_rnf    = 28            ! runoffs
+   INTEGER, PARAMETER ::   jpr_cal    = 29            ! calving
+   INTEGER, PARAMETER ::   jpr_taum   = 30            ! wind stress module
+   INTEGER, PARAMETER ::   jpr_co2    = 31
+   INTEGER, PARAMETER ::   jpr_topm   = 32            ! topmeltn
+   INTEGER, PARAMETER ::   jpr_botm   = 33            ! botmeltn
+   INTEGER, PARAMETER ::   jprcv      = 33            ! total number of fields received
+
+   INTEGER, PARAMETER ::   jps_fice   =  1            ! ice fraction 
+   INTEGER, PARAMETER ::   jps_toce   =  2            ! ocean temperature
+   INTEGER, PARAMETER ::   jps_tice   =  3            ! ice   temperature
+   INTEGER, PARAMETER ::   jps_tmix   =  4            ! mixed temperature (ocean+ice)
+   INTEGER, PARAMETER ::   jps_albice =  5            ! ice   albedo
+   INTEGER, PARAMETER ::   jps_albmix =  6            ! mixed albedo
+   INTEGER, PARAMETER ::   jps_hice   =  7            ! ice  thickness
+   INTEGER, PARAMETER ::   jps_hsnw   =  8            ! snow thickness
+   INTEGER, PARAMETER ::   jps_ocx1   =  9            ! ocean current on grid 1
+   INTEGER, PARAMETER ::   jps_ocy1   = 10            !
+   INTEGER, PARAMETER ::   jps_ocz1   = 11            !
+   INTEGER, PARAMETER ::   jps_ivx1   = 12            ! ice   current on grid 1
+   INTEGER, PARAMETER ::   jps_ivy1   = 13            !
+   INTEGER, PARAMETER ::   jps_ivz1   = 14            !
+   INTEGER, PARAMETER ::   jps_co2    = 15
+   INTEGER, PARAMETER ::   jpsnd      = 15            ! total number of fields sended
+
+   !                                                         !!** namelist namsbc_cpl **
+   TYPE ::   FLD_C
+      CHARACTER(len = 32) ::   cldes                  ! desciption of the coupling strategy
+      CHARACTER(len = 32) ::   clcat                  ! multiple ice categories strategy
+      CHARACTER(len = 32) ::   clvref                 ! reference of vector ('spherical' or 'cartesian')
+      CHARACTER(len = 32) ::   clvor                  ! orientation of vector fields ('eastward-northward' or 'local grid')
+      CHARACTER(len = 32) ::   clvgrd                 ! grids on which is located the vector fields
+   END TYPE FLD_C
+   ! Send to the atmosphere                           !
+   TYPE(FLD_C) ::   sn_snd_temp, sn_snd_alb, sn_snd_thick, sn_snd_crt, sn_snd_co2                        
+   ! Received from the atmosphere                     !
+   TYPE(FLD_C) ::   sn_rcv_w10m, sn_rcv_taumod, sn_rcv_tau, sn_rcv_dqnsdt, sn_rcv_qsr, sn_rcv_qns, sn_rcv_emp, sn_rcv_rnf
+   TYPE(FLD_C) ::   sn_rcv_cal, sn_rcv_iceflx, sn_rcv_co2                        
+
+   TYPE ::   DYNARR     
+      REAL(wp), POINTER, DIMENSION(:,:,:)    ::   z3   
+   END TYPE DYNARR
+
+   TYPE( DYNARR ), SAVE, DIMENSION(jprcv) ::   frcv                      ! all fields recieved from the atmosphere
+
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   albedo_oce_mix     ! ocean albedo sent to atmosphere (mix clear/overcast sky)
+
+   INTEGER , ALLOCATABLE, SAVE, DIMENSION(    :) ::   nrcvinfo           ! OASIS info argument
+
+#if ! defined key_lim2   &&   ! defined key_lim3
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   u_ice, v_ice,fr1_i0,fr2_i0          ! jpi, jpj
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tn_ice, alb_ice, qns_ice, dqns_ice  ! (jpi,jpj,jpl)
+#endif
+
+#if defined key_cice
+   INTEGER, PARAMETER ::   jpl = ncat
+#elif ! defined key_lim2   &&   ! defined key_lim3
+   INTEGER, PARAMETER ::   jpl = 1 
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   emp_ice
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qsr_ice
+#endif
+
+#if ! defined key_lim3   &&  ! defined key_cice
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_i
+#endif
+
+#if ! defined key_lim3
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  ht_i, ht_s
+#endif
+
+#if ! defined key_cice
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  topmelt, botmelt
+#endif
+
+   !! Substitution
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: sbccpl.F90 4162 2013-11-07 10:19:49Z cetlod $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
+CONTAINS
+  
+   INTEGER FUNCTION sbc_cpl_alloc()
+      !!----------------------------------------------------------------------
+      !!             ***  FUNCTION sbc_cpl_alloc  ***
+      !!----------------------------------------------------------------------
+      INTEGER :: ierr(4),jn
+      !!----------------------------------------------------------------------
+      ierr(:) = 0
+      !
+      ALLOCATE( albedo_oce_mix(jpi,jpj), nrcvinfo(jprcv),  STAT=ierr(1) )
+      !
+#if ! defined key_lim2 && ! defined key_lim3
+      ! quick patch to be able to run the coupled model without sea-ice...
+      ALLOCATE( u_ice(jpi,jpj) , fr1_i0(jpi,jpj) , tn_ice (jpi,jpj,1) ,     &
+                v_ice(jpi,jpj) , fr2_i0(jpi,jpj) , alb_ice(jpi,jpj,1),      &
+                emp_ice(jpi,jpj) , qns_ice(jpi,jpj,1) , dqns_ice(jpi,jpj,1) , STAT=ierr(2) )
+#endif
+
+#if ! defined key_lim3 && ! defined key_cice
+      ALLOCATE( a_i(jpi,jpj,jpl) , STAT=ierr(3) )
+#endif
+
+#if defined key_cice || defined key_lim2
+      ALLOCATE( ht_i(jpi,jpj,jpl) , ht_s(jpi,jpj,jpl) , STAT=ierr(4) )
+#endif
+      sbc_cpl_alloc = MAXVAL( ierr )
+      IF( lk_mpp            )   CALL mpp_sum ( sbc_cpl_alloc )
+      IF( sbc_cpl_alloc > 0 )   CALL ctl_warn('sbc_cpl_alloc: allocation of arrays failed')
+      !
+   END FUNCTION sbc_cpl_alloc
+
+
+   SUBROUTINE sbc_cpl_init( k_ice )     
+      !!----------------------------------------------------------------------
+      !!             ***  ROUTINE sbc_cpl_init  ***
+      !!
+      !! ** Purpose :   Initialisation of send and recieved information from
+      !!                the atmospheric component
+      !!
+      !! ** Method  : * Read namsbc_cpl namelist 
+      !!              * define the receive interface
+      !!              * define the send    interface
+      !!              * initialise the OASIS coupler
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   k_ice    ! ice management in the sbc (=0/1/2/3)
+      !!
+      INTEGER ::   jn   ! dummy loop index
+      INTEGER ::   ios  ! Local integer output status for namelist read
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zacs, zaos
+      !!
+      NAMELIST/namsbc_cpl/  sn_snd_temp, sn_snd_alb   , sn_snd_thick, sn_snd_crt   , sn_snd_co2,   &
+         &                  sn_rcv_w10m, sn_rcv_taumod, sn_rcv_tau  , sn_rcv_dqnsdt, sn_rcv_qsr,   &
+         &                  sn_rcv_qns , sn_rcv_emp   , sn_rcv_rnf  , sn_rcv_cal   , sn_rcv_iceflx  , sn_rcv_co2
+      !!---------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('sbc_cpl_init')
+      !
+      CALL wrk_alloc( jpi,jpj, zacs, zaos )
+
+      ! ================================ !
+      !      Namelist informations       !
+      ! ================================ !
+
+      REWIND( numnam_ref )              ! Namelist namsbc_cpl in reference namelist : Variables for OASIS coupling
+      READ  ( numnam_ref, namsbc_cpl, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in reference namelist', lwp )
+
+      REWIND( numnam_cfg )              ! Namelist namsbc_cpl in configuration namelist : Variables for OASIS coupling
+      READ  ( numnam_cfg, namsbc_cpl, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in configuration namelist', lwp )
+      IF(lwm) WRITE ( numond, namsbc_cpl )
+
+      IF(lwp) THEN                        ! control print
+         WRITE(numout,*)
+         WRITE(numout,*)'sbc_cpl_init : namsbc_cpl namelist '
+         WRITE(numout,*)'~~~~~~~~~~~~'
+         WRITE(numout,*)'  received fields (mutiple ice categogies)'
+         WRITE(numout,*)'      10m wind module                 = ', TRIM(sn_rcv_w10m%cldes  ), ' (', TRIM(sn_rcv_w10m%clcat  ), ')'
+         WRITE(numout,*)'      stress module                   = ', TRIM(sn_rcv_taumod%cldes), ' (', TRIM(sn_rcv_taumod%clcat), ')'
+         WRITE(numout,*)'      surface stress                  = ', TRIM(sn_rcv_tau%cldes   ), ' (', TRIM(sn_rcv_tau%clcat   ), ')'
+         WRITE(numout,*)'                     - referential    = ', sn_rcv_tau%clvref
+         WRITE(numout,*)'                     - orientation    = ', sn_rcv_tau%clvor
+         WRITE(numout,*)'                     - mesh           = ', sn_rcv_tau%clvgrd
+         WRITE(numout,*)'      non-solar heat flux sensitivity = ', TRIM(sn_rcv_dqnsdt%cldes), ' (', TRIM(sn_rcv_dqnsdt%clcat), ')'
+         WRITE(numout,*)'      solar heat flux                 = ', TRIM(sn_rcv_qsr%cldes   ), ' (', TRIM(sn_rcv_qsr%clcat   ), ')'
+         WRITE(numout,*)'      non-solar heat flux             = ', TRIM(sn_rcv_qns%cldes   ), ' (', TRIM(sn_rcv_qns%clcat   ), ')'
+         WRITE(numout,*)'      freshwater budget               = ', TRIM(sn_rcv_emp%cldes   ), ' (', TRIM(sn_rcv_emp%clcat   ), ')'
+         WRITE(numout,*)'      runoffs                         = ', TRIM(sn_rcv_rnf%cldes   ), ' (', TRIM(sn_rcv_rnf%clcat   ), ')'
+         WRITE(numout,*)'      calving                         = ', TRIM(sn_rcv_cal%cldes   ), ' (', TRIM(sn_rcv_cal%clcat   ), ')'
+         WRITE(numout,*)'      sea ice heat fluxes             = ', TRIM(sn_rcv_iceflx%cldes), ' (', TRIM(sn_rcv_iceflx%clcat), ')'
+         WRITE(numout,*)'      atm co2                         = ', TRIM(sn_rcv_co2%cldes   ), ' (', TRIM(sn_rcv_co2%clcat   ), ')'
+         WRITE(numout,*)'  sent fields (multiple ice categories)'
+         WRITE(numout,*)'      surface temperature             = ', TRIM(sn_snd_temp%cldes  ), ' (', TRIM(sn_snd_temp%clcat  ), ')'
+         WRITE(numout,*)'      albedo                          = ', TRIM(sn_snd_alb%cldes   ), ' (', TRIM(sn_snd_alb%clcat   ), ')'
+         WRITE(numout,*)'      ice/snow thickness              = ', TRIM(sn_snd_thick%cldes ), ' (', TRIM(sn_snd_thick%clcat ), ')'
+         WRITE(numout,*)'      surface current                 = ', TRIM(sn_snd_crt%cldes   ), ' (', TRIM(sn_snd_crt%clcat   ), ')'
+         WRITE(numout,*)'                      - referential   = ', sn_snd_crt%clvref 
+         WRITE(numout,*)'                      - orientation   = ', sn_snd_crt%clvor
+         WRITE(numout,*)'                      - mesh          = ', sn_snd_crt%clvgrd
+         WRITE(numout,*)'      oce co2 flux                    = ', TRIM(sn_snd_co2%cldes   ), ' (', TRIM(sn_snd_co2%clcat   ), ')'
+      ENDIF
+
+      !                                   ! allocate sbccpl arrays
+      IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' )
+     
+      ! ================================ !
+      !   Define the receive interface   !
+      ! ================================ !
+      nrcvinfo(:) = OASIS_idle   ! needed by nrcvinfo(jpr_otx1) if we do not receive ocean stress 
+
+      ! for each field: define the OASIS name                              (srcv(:)%clname)
+      !                 define receive or not from the namelist parameters (srcv(:)%laction)
+      !                 define the north fold type of lbc                  (srcv(:)%nsgn)
+
+      ! default definitions of srcv
+      srcv(:)%laction = .FALSE.   ;   srcv(:)%clgrid = 'T'   ;   srcv(:)%nsgn = 1.   ;   srcv(:)%nct = 1
+
+      !                                                      ! ------------------------- !
+      !                                                      ! ice and ocean wind stress !   
+      !                                                      ! ------------------------- !
+      !                                                           ! Name 
+      srcv(jpr_otx1)%clname = 'O_OTaux1'      ! 1st ocean component on grid ONE (T or U)
+      srcv(jpr_oty1)%clname = 'O_OTauy1'      ! 2nd   -      -         -     - 
+      srcv(jpr_otz1)%clname = 'O_OTauz1'      ! 3rd   -      -         -     - 
+      srcv(jpr_otx2)%clname = 'O_OTaux2'      ! 1st ocean component on grid TWO (V)
+      srcv(jpr_oty2)%clname = 'O_OTauy2'      ! 2nd   -      -         -     - 
+      srcv(jpr_otz2)%clname = 'O_OTauz2'      ! 3rd   -      -         -     - 
+      !
+      srcv(jpr_itx1)%clname = 'O_ITaux1'      ! 1st  ice  component on grid ONE (T, F, I or U)
+      srcv(jpr_ity1)%clname = 'O_ITauy1'      ! 2nd   -      -         -     - 
+      srcv(jpr_itz1)%clname = 'O_ITauz1'      ! 3rd   -      -         -     - 
+      srcv(jpr_itx2)%clname = 'O_ITaux2'      ! 1st  ice  component on grid TWO (V)
+      srcv(jpr_ity2)%clname = 'O_ITauy2'      ! 2nd   -      -         -     - 
+      srcv(jpr_itz2)%clname = 'O_ITauz2'      ! 3rd   -      -         -     - 
+      ! 
+      ! Vectors: change of sign at north fold ONLY if on the local grid
+      IF( TRIM( sn_rcv_tau%clvor ) == 'local grid' )   srcv(jpr_otx1:jpr_itz2)%nsgn = -1.
+      
+      !                                                           ! Set grid and action
+      SELECT CASE( TRIM( sn_rcv_tau%clvgrd ) )      !  'T', 'U,V', 'U,V,I', 'U,V,F', 'T,I', 'T,F', or 'T,U,V'
+      CASE( 'T' ) 
+         srcv(jpr_otx1:jpr_itz2)%clgrid  = 'T'        ! oce and ice components given at T-point
+         srcv(jpr_otx1:jpr_otz1)%laction = .TRUE.     ! receive oce components on grid 1 
+         srcv(jpr_itx1:jpr_itz1)%laction = .TRUE.     ! receive ice components on grid 1 
+      CASE( 'U,V' ) 
+         srcv(jpr_otx1:jpr_otz1)%clgrid  = 'U'        ! oce components given at U-point
+         srcv(jpr_otx2:jpr_otz2)%clgrid  = 'V'        !           and           V-point
+         srcv(jpr_itx1:jpr_itz1)%clgrid  = 'U'        ! ice components given at U-point
+         srcv(jpr_itx2:jpr_itz2)%clgrid  = 'V'        !           and           V-point
+         srcv(jpr_otx1:jpr_itz2)%laction = .TRUE.     ! receive oce and ice components on both grid 1 & 2
+      CASE( 'U,V,T' )
+         srcv(jpr_otx1:jpr_otz1)%clgrid  = 'U'        ! oce components given at U-point
+         srcv(jpr_otx2:jpr_otz2)%clgrid  = 'V'        !           and           V-point
+         srcv(jpr_itx1:jpr_itz1)%clgrid  = 'T'        ! ice components given at T-point
+         srcv(jpr_otx1:jpr_otz2)%laction = .TRUE.     ! receive oce components on grid 1 & 2
+         srcv(jpr_itx1:jpr_itz1)%laction = .TRUE.     ! receive ice components on grid 1 only
+      CASE( 'U,V,I' )
+         srcv(jpr_otx1:jpr_otz1)%clgrid  = 'U'        ! oce components given at U-point
+         srcv(jpr_otx2:jpr_otz2)%clgrid  = 'V'        !           and           V-point
+         srcv(jpr_itx1:jpr_itz1)%clgrid  = 'I'        ! ice components given at I-point
+         srcv(jpr_otx1:jpr_otz2)%laction = .TRUE.     ! receive oce components on grid 1 & 2
+         srcv(jpr_itx1:jpr_itz1)%laction = .TRUE.     ! receive ice components on grid 1 only
+      CASE( 'U,V,F' )
+         srcv(jpr_otx1:jpr_otz1)%clgrid  = 'U'        ! oce components given at U-point
+         srcv(jpr_otx2:jpr_otz2)%clgrid  = 'V'        !           and           V-point
+         srcv(jpr_itx1:jpr_itz1)%clgrid  = 'F'        ! ice components given at F-point
+         srcv(jpr_otx1:jpr_otz2)%laction = .TRUE.     ! receive oce components on grid 1 & 2
+         srcv(jpr_itx1:jpr_itz1)%laction = .TRUE.     ! receive ice components on grid 1 only
+      CASE( 'T,I' ) 
+         srcv(jpr_otx1:jpr_itz2)%clgrid  = 'T'        ! oce and ice components given at T-point
+         srcv(jpr_itx1:jpr_itz1)%clgrid  = 'I'        ! ice components given at I-point
+         srcv(jpr_otx1:jpr_otz1)%laction = .TRUE.     ! receive oce components on grid 1 
+         srcv(jpr_itx1:jpr_itz1)%laction = .TRUE.     ! receive ice components on grid 1 
+      CASE( 'T,F' ) 
+         srcv(jpr_otx1:jpr_itz2)%clgrid  = 'T'        ! oce and ice components given at T-point
+         srcv(jpr_itx1:jpr_itz1)%clgrid  = 'F'        ! ice components given at F-point
+         srcv(jpr_otx1:jpr_otz1)%laction = .TRUE.     ! receive oce components on grid 1 
+         srcv(jpr_itx1:jpr_itz1)%laction = .TRUE.     ! receive ice components on grid 1 
+      CASE( 'T,U,V' )
+         srcv(jpr_otx1:jpr_otz1)%clgrid  = 'T'        ! oce components given at T-point
+         srcv(jpr_itx1:jpr_itz1)%clgrid  = 'U'        ! ice components given at U-point
+         srcv(jpr_itx2:jpr_itz2)%clgrid  = 'V'        !           and           V-point
+         srcv(jpr_otx1:jpr_otz1)%laction = .TRUE.     ! receive oce components on grid 1 only
+         srcv(jpr_itx1:jpr_itz2)%laction = .TRUE.     ! receive ice components on grid 1 & 2
+      CASE default   
+         CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_tau%clvgrd' )
+      END SELECT
+      !
+      IF( TRIM( sn_rcv_tau%clvref ) == 'spherical' )   &           ! spherical: 3rd component not received
+         &     srcv( (/jpr_otz1, jpr_otz2, jpr_itz1, jpr_itz2/) )%laction = .FALSE. 
+      !
+      IF( TRIM( sn_rcv_tau%clvor  ) == 'local grid' ) THEN        ! already on local grid -> no need of the second grid
+            srcv(jpr_otx2:jpr_otz2)%laction = .FALSE. 
+            srcv(jpr_itx2:jpr_itz2)%laction = .FALSE. 
+            srcv(jpr_oty1)%clgrid = srcv(jpr_oty2)%clgrid   ! not needed but cleaner...
+            srcv(jpr_ity1)%clgrid = srcv(jpr_ity2)%clgrid   ! not needed but cleaner...
+      ENDIF
+      !
+      IF( TRIM( sn_rcv_tau%cldes ) /= 'oce and ice' ) THEN        ! 'oce and ice' case ocean stress on ocean mesh used
+         srcv(jpr_itx1:jpr_itz2)%laction = .FALSE.    ! ice components not received
+         srcv(jpr_itx1)%clgrid = 'U'                  ! ocean stress used after its transformation
+         srcv(jpr_ity1)%clgrid = 'V'                  ! i.e. it is always at U- & V-points for i- & j-comp. resp.
+      ENDIF
+       
+      !                                                      ! ------------------------- !
+      !                                                      !    freshwater budget      !   E-P
+      !                                                      ! ------------------------- !
+      ! we suppose that atmosphere modele do not make the difference between precipiration (liquide or solid)
+      ! over ice of free ocean within the same atmospheric cell.cd 
+      srcv(jpr_rain)%clname = 'OTotRain'      ! Rain = liquid precipitation
+      srcv(jpr_snow)%clname = 'OTotSnow'      ! Snow = solid precipitation
+      srcv(jpr_tevp)%clname = 'OTotEvap'      ! total evaporation (over oce + ice sublimation)
+      srcv(jpr_ievp)%clname = 'OIceEvap'      ! evaporation over ice = sublimation
+      srcv(jpr_sbpr)%clname = 'OSubMPre'      ! sublimation - liquid precipitation - solid precipitation 
+      srcv(jpr_semp)%clname = 'OISubMSn'      ! ice solid water budget = sublimation - solid precipitation
+      srcv(jpr_oemp)%clname = 'OOEvaMPr'      ! ocean water budget = ocean Evap - ocean precip
+      SELECT CASE( TRIM( sn_rcv_emp%cldes ) )
+      CASE( 'oce only'      )   ;   srcv(                                 jpr_oemp   )%laction = .TRUE. 
+      CASE( 'conservative'  )
+         srcv( (/jpr_rain, jpr_snow, jpr_ievp, jpr_tevp/) )%laction = .TRUE.
+!$$ O.M.         IF ( k_ice <= 1 )  srcv(jpr_ivep)%laction = .FALSE.
+         IF ( k_ice <= 1 )  srcv(jpr_ievp)%laction = .FALSE.
+      CASE( 'oce and ice'   )   ;   srcv( (/jpr_ievp, jpr_sbpr, jpr_semp, jpr_oemp/) )%laction = .TRUE.
+      CASE default              ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_emp%cldes' )
+      END SELECT
+
+      !                                                      ! ------------------------- !
+      !                                                      !     Runoffs & Calving     !   
+      !                                                      ! ------------------------- !
+      srcv(jpr_rnf   )%clname = 'O_Runoff'   ;   IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' )   srcv(jpr_rnf)%laction = .TRUE.
+! This isn't right - really just want ln_rnf_emp changed
+!                                                 IF( TRIM( sn_rcv_rnf%cldes ) == 'climato' )   THEN   ;   ln_rnf = .TRUE.
+!                                                 ELSE                                                 ;   ln_rnf = .FALSE.
+!                                                 ENDIF
+      srcv(jpr_cal   )%clname = 'OCalving'   ;   IF( TRIM( sn_rcv_cal%cldes ) == 'coupled' )   srcv(jpr_cal)%laction = .TRUE.
+
+      !                                                      ! ------------------------- !
+      !                                                      !    non solar radiation    !   Qns
+      !                                                      ! ------------------------- !
+      srcv(jpr_qnsoce)%clname = 'O_QnsOce'
+      srcv(jpr_qnsice)%clname = 'O_QnsIce'
+      srcv(jpr_qnsmix)%clname = 'O_QnsMix'
+      SELECT CASE( TRIM( sn_rcv_qns%cldes ) )
+      CASE( 'oce only'      )   ;   srcv(               jpr_qnsoce   )%laction = .TRUE.
+      CASE( 'conservative'  )   ;   srcv( (/jpr_qnsice, jpr_qnsmix/) )%laction = .TRUE.
+      CASE( 'oce and ice'   )   ;   srcv( (/jpr_qnsice, jpr_qnsoce/) )%laction = .TRUE.
+      CASE( 'mixed oce-ice' )   ;   srcv(               jpr_qnsmix   )%laction = .TRUE. 
+      CASE default              ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_qns%cldes' )
+      END SELECT
+      IF( TRIM( sn_rcv_qns%cldes ) == 'mixed oce-ice' .AND. jpl > 1 ) &
+         CALL ctl_stop( 'sbc_cpl_init: sn_rcv_qns%cldes not currently allowed to be mixed oce-ice for multi-category ice' )
+      !                                                      ! ------------------------- !
+      !                                                      !    solar radiation        !   Qsr
+      !                                                      ! ------------------------- !
+      srcv(jpr_qsroce)%clname = 'O_QsrOce'
+      srcv(jpr_qsrice)%clname = 'O_QsrIce'
+      srcv(jpr_qsrmix)%clname = 'O_QsrMix'
+      SELECT CASE( TRIM( sn_rcv_qsr%cldes ) )
+      CASE( 'oce only'      )   ;   srcv(               jpr_qsroce   )%laction = .TRUE.
+      CASE( 'conservative'  )   ;   srcv( (/jpr_qsrice, jpr_qsrmix/) )%laction = .TRUE.
+      CASE( 'oce and ice'   )   ;   srcv( (/jpr_qsrice, jpr_qsroce/) )%laction = .TRUE.
+      CASE( 'mixed oce-ice' )   ;   srcv(               jpr_qsrmix   )%laction = .TRUE. 
+      CASE default              ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_qsr%cldes' )
+      END SELECT
+      IF( TRIM( sn_rcv_qsr%cldes ) == 'mixed oce-ice' .AND. jpl > 1 ) &
+         CALL ctl_stop( 'sbc_cpl_init: sn_rcv_qsr%cldes not currently allowed to be mixed oce-ice for multi-category ice' )
+      !                                                      ! ------------------------- !
+      !                                                      !   non solar sensitivity   !   d(Qns)/d(T)
+      !                                                      ! ------------------------- !
+      srcv(jpr_dqnsdt)%clname = 'O_dQnsdT'   
+      IF( TRIM( sn_rcv_dqnsdt%cldes ) == 'coupled' )   srcv(jpr_dqnsdt)%laction = .TRUE.
+      !
+      ! non solar sensitivity mandatory for LIM ice model
+      IF( TRIM( sn_rcv_dqnsdt%cldes ) == 'none' .AND. k_ice /= 0 .AND. k_ice /= 4) &
+         CALL ctl_stop( 'sbc_cpl_init: sn_rcv_dqnsdt%cldes must be coupled in namsbc_cpl namelist' )
+      ! non solar sensitivity mandatory for mixed oce-ice solar radiation coupling technique
+      IF( TRIM( sn_rcv_dqnsdt%cldes ) == 'none' .AND. TRIM( sn_rcv_qns%cldes ) == 'mixed oce-ice' ) &
+         CALL ctl_stop( 'sbc_cpl_init: namsbc_cpl namelist mismatch between sn_rcv_qns%cldes and sn_rcv_dqnsdt%cldes' )
+      !                                                      ! ------------------------- !
+      !                                                      !      10m wind module      !   
+      !                                                      ! ------------------------- !
+      srcv(jpr_w10m)%clname = 'O_Wind10'   ;   IF( TRIM(sn_rcv_w10m%cldes  ) == 'coupled' )   srcv(jpr_w10m)%laction = .TRUE. 
+      !
+      !                                                      ! ------------------------- !
+      !                                                      !   wind stress module      !   
+      !                                                      ! ------------------------- !
+      srcv(jpr_taum)%clname = 'O_TauMod'   ;   IF( TRIM(sn_rcv_taumod%cldes) == 'coupled' )   srcv(jpr_taum)%laction = .TRUE.
+      lhftau = srcv(jpr_taum)%laction
+
+      !                                                      ! ------------------------- !
+      !                                                      !      Atmospheric CO2      !
+      !                                                      ! ------------------------- !
+      srcv(jpr_co2 )%clname = 'O_AtmCO2'   ;   IF( TRIM(sn_rcv_co2%cldes   ) == 'coupled' )    srcv(jpr_co2 )%laction = .TRUE.
+      !                                                      ! ------------------------- !
+      !                                                      !   topmelt and botmelt     !   
+      !                                                      ! ------------------------- !
+      srcv(jpr_topm )%clname = 'OTopMlt'
+      srcv(jpr_botm )%clname = 'OBotMlt'
+      IF( TRIM(sn_rcv_iceflx%cldes) == 'coupled' ) THEN
+         IF ( TRIM( sn_rcv_iceflx%clcat ) == 'yes' ) THEN
+            srcv(jpr_topm:jpr_botm)%nct = jpl
+         ELSE
+            CALL ctl_stop( 'sbc_cpl_init: sn_rcv_iceflx%clcat should always be set to yes currently' )
+         ENDIF
+         srcv(jpr_topm:jpr_botm)%laction = .TRUE.
+      ENDIF
+
+      ! Allocate all parts of frcv used for received fields
+      DO jn = 1, jprcv
+         IF ( srcv(jn)%laction ) ALLOCATE( frcv(jn)%z3(jpi,jpj,srcv(jn)%nct) )
+      END DO
+      ! Allocate taum part of frcv which is used even when not received as coupling field
+      IF ( .NOT. srcv(jpr_taum)%laction ) ALLOCATE( frcv(jpr_taum)%z3(jpi,jpj,srcv(jn)%nct) )
+      ! Allocate itx1 and ity1 as they are used in sbc_cpl_ice_tau even if srcv(jpr_itx1)%laction = .FALSE.
+      IF( k_ice /= 0 ) THEN
+         IF ( .NOT. srcv(jpr_itx1)%laction ) ALLOCATE( frcv(jpr_itx1)%z3(jpi,jpj,srcv(jn)%nct) )
+         IF ( .NOT. srcv(jpr_ity1)%laction ) ALLOCATE( frcv(jpr_ity1)%z3(jpi,jpj,srcv(jn)%nct) )
+      END IF
+
+      ! ================================ !
+      !     Define the send interface    !
+      ! ================================ !
+      ! for each field: define the OASIS name                           (ssnd(:)%clname)
+      !                 define send or not from the namelist parameters (ssnd(:)%laction)
+      !                 define the north fold type of lbc               (ssnd(:)%nsgn)
+      
+      ! default definitions of nsnd
+      ssnd(:)%laction = .FALSE.   ;   ssnd(:)%clgrid = 'T'   ;   ssnd(:)%nsgn = 1.  ; ssnd(:)%nct = 1
+         
+      !                                                      ! ------------------------- !
+      !                                                      !    Surface temperature    !
+      !                                                      ! ------------------------- !
+      ssnd(jps_toce)%clname = 'O_SSTSST'
+      ssnd(jps_tice)%clname = 'O_TepIce'
+      ssnd(jps_tmix)%clname = 'O_TepMix'
+      SELECT CASE( TRIM( sn_snd_temp%cldes ) )
+      CASE( 'none'         )       ! nothing to do
+      CASE( 'oce only'             )   ;   ssnd(   jps_toce             )%laction = .TRUE.
+      CASE( 'weighted oce and ice' )
+         ssnd( (/jps_toce, jps_tice/) )%laction = .TRUE.
+         IF ( TRIM( sn_snd_temp%clcat ) == 'yes' )  ssnd(jps_tice)%nct = jpl
+      CASE( 'mixed oce-ice'        )   ;   ssnd(   jps_tmix             )%laction = .TRUE.
+      CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_temp%cldes' )
+      END SELECT
+     
+      !                                                      ! ------------------------- !
+      !                                                      !          Albedo           !
+      !                                                      ! ------------------------- !
+      ssnd(jps_albice)%clname = 'O_AlbIce' 
+      ssnd(jps_albmix)%clname = 'O_AlbMix'
+      SELECT CASE( TRIM( sn_snd_alb%cldes ) )
+      CASE( 'none'          )       ! nothing to do
+      CASE( 'weighted ice'  )   ;   ssnd(jps_albice)%laction = .TRUE.
+      CASE( 'mixed oce-ice' )   ;   ssnd(jps_albmix)%laction = .TRUE.
+      CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_alb%cldes' )
+      END SELECT
+      !
+      ! Need to calculate oceanic albedo if
+      !     1. sending mixed oce-ice albedo or
+      !     2. receiving mixed oce-ice solar radiation 
+      IF ( TRIM ( sn_snd_alb%cldes ) == 'mixed oce-ice' .OR. TRIM ( sn_rcv_qsr%cldes ) == 'mixed oce-ice' ) THEN
+         CALL albedo_oce( zaos, zacs )
+         ! Due to lack of information on nebulosity : mean clear/overcast sky
+         albedo_oce_mix(:,:) = ( zacs(:,:) + zaos(:,:) ) * 0.5
+      ENDIF
+
+      !                                                      ! ------------------------- !
+      !                                                      !  Ice fraction & Thickness ! 
+      !                                                      ! ------------------------- !
+      ssnd(jps_fice)%clname = 'OIceFrc'
+      ssnd(jps_hice)%clname = 'OIceTck'
+      ssnd(jps_hsnw)%clname = 'OSnwTck'
+      IF( k_ice /= 0 ) THEN
+         ssnd(jps_fice)%laction = .TRUE.                  ! if ice treated in the ocean (even in climato case)
+! Currently no namelist entry to determine sending of multi-category ice fraction so use the thickness entry for now
+         IF ( TRIM( sn_snd_thick%clcat ) == 'yes' ) ssnd(jps_fice)%nct = jpl
+      ENDIF
+
+      SELECT CASE ( TRIM( sn_snd_thick%cldes ) )
+      CASE( 'none'         )       ! nothing to do
+      CASE( 'ice and snow' ) 
+         ssnd(jps_hice:jps_hsnw)%laction = .TRUE.
+         IF ( TRIM( sn_snd_thick%clcat ) == 'yes' ) THEN
+            ssnd(jps_hice:jps_hsnw)%nct = jpl
+         ELSE
+            IF ( jpl > 1 ) THEN
+CALL ctl_stop( 'sbc_cpl_init: use weighted ice and snow option for sn_snd_thick%cldes if not exchanging category fields' )
+            ENDIF
+         ENDIF
+      CASE ( 'weighted ice and snow' ) 
+         ssnd(jps_hice:jps_hsnw)%laction = .TRUE.
+         IF ( TRIM( sn_snd_thick%clcat ) == 'yes' ) ssnd(jps_hice:jps_hsnw)%nct = jpl
+      CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_thick%cldes' )
+      END SELECT
+
+      !                                                      ! ------------------------- !
+      !                                                      !      Surface current      !
+      !                                                      ! ------------------------- !
+      !        ocean currents              !            ice velocities
+      ssnd(jps_ocx1)%clname = 'O_OCurx1'   ;   ssnd(jps_ivx1)%clname = 'O_IVelx1'
+      ssnd(jps_ocy1)%clname = 'O_OCury1'   ;   ssnd(jps_ivy1)%clname = 'O_IVely1'
+      ssnd(jps_ocz1)%clname = 'O_OCurz1'   ;   ssnd(jps_ivz1)%clname = 'O_IVelz1'
+      !
+      ssnd(jps_ocx1:jps_ivz1)%nsgn = -1.   ! vectors: change of the sign at the north fold
+
+      IF( sn_snd_crt%clvgrd == 'U,V' ) THEN
+         ssnd(jps_ocx1)%clgrid = 'U' ; ssnd(jps_ocy1)%clgrid = 'V'
+      ELSE IF( sn_snd_crt%clvgrd /= 'T' ) THEN  
+         CALL ctl_stop( 'sn_snd_crt%clvgrd must be equal to T' )
+         ssnd(jps_ocx1:jps_ivz1)%clgrid  = 'T'      ! all oce and ice components on the same unique grid
+      ENDIF
+      ssnd(jps_ocx1:jps_ivz1)%laction = .TRUE.   ! default: all are send
+      IF( TRIM( sn_snd_crt%clvref ) == 'spherical' )   ssnd( (/jps_ocz1, jps_ivz1/) )%laction = .FALSE. 
+      IF( TRIM( sn_snd_crt%clvor ) == 'eastward-northward' ) ssnd(jps_ocx1:jps_ivz1)%nsgn = 1.
+      SELECT CASE( TRIM( sn_snd_crt%cldes ) )
+      CASE( 'none'                 )   ;   ssnd(jps_ocx1:jps_ivz1)%laction = .FALSE.
+      CASE( 'oce only'             )   ;   ssnd(jps_ivx1:jps_ivz1)%laction = .FALSE.
+      CASE( 'weighted oce and ice' )   !   nothing to do
+      CASE( 'mixed oce-ice'        )   ;   ssnd(jps_ivx1:jps_ivz1)%laction = .FALSE.
+      CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_crt%cldes' )
+      END SELECT
+
+      !                                                      ! ------------------------- !
+      !                                                      !          CO2 flux         !
+      !                                                      ! ------------------------- !
+      ssnd(jps_co2)%clname = 'O_CO2FLX' ;  IF( TRIM(sn_snd_co2%cldes) == 'coupled' )    ssnd(jps_co2 )%laction = .TRUE.
+      !
+      ! ================================ !
+      !   initialisation of the coupler  !
+      ! ================================ !
+
+      CALL cpl_prism_define(jprcv, jpsnd)            
+      !
+      IF( ln_dm2dc .AND. ( cpl_prism_freq( jpr_qsroce ) + cpl_prism_freq( jpr_qsrmix ) /= 86400 ) )   &
+         &   CALL ctl_stop( 'sbc_cpl_init: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' )
+
+      CALL wrk_dealloc( jpi,jpj, zacs, zaos )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('sbc_cpl_init')
+      !
+   END SUBROUTINE sbc_cpl_init
+
+
+   SUBROUTINE sbc_cpl_rcv( kt, k_fsbc, k_ice )     
+      !!----------------------------------------------------------------------
+      !!             ***  ROUTINE sbc_cpl_rcv  ***
+      !!
+      !! ** Purpose :   provide the stress over the ocean and, if no sea-ice,
+      !!                provide the ocean heat and freshwater fluxes.
+      !!
+      !! ** Method  : - Receive all the atmospheric fields (stored in frcv array). called at each time step.
+      !!                OASIS controls if there is something do receive or not. nrcvinfo contains the info
+      !!                to know if the field was really received or not
+      !!
+      !!              --> If ocean stress was really received:
+      !!
+      !!                  - transform the received ocean stress vector from the received
+      !!                 referential and grid into an atmosphere-ocean stress in 
+      !!                 the (i,j) ocean referencial and at the ocean velocity point. 
+      !!                    The received stress are :
+      !!                     - defined by 3 components (if cartesian coordinate)
+      !!                            or by 2 components (if spherical)
+      !!                     - oriented along geographical   coordinate (if eastward-northward)
+      !!                            or  along the local grid coordinate (if local grid)
+      !!                     - given at U- and V-point, resp.   if received on 2 grids
+      !!                            or at T-point               if received on 1 grid
+      !!                    Therefore and if necessary, they are successively 
+      !!                  processed in order to obtain them 
+      !!                     first  as  2 components on the sphere 
+      !!                     second as  2 components oriented along the local grid
+      !!                     third  as  2 components on the U,V grid 
+      !!
+      !!              --> 
+      !!
+      !!              - In 'ocean only' case, non solar and solar ocean heat fluxes 
+      !!             and total ocean freshwater fluxes  
+      !!
+      !! ** Method  :   receive all fields from the atmosphere and transform 
+      !!              them into ocean surface boundary condition fields 
+      !!
+      !! ** Action  :   update  utau, vtau   ocean stress at U,V grid 
+      !!                        taum, wndm   wind stres and wind speed module at T-point
+      !!                        qns          non solar heat fluxes including emp heat content    (ocean only case)
+      !!                                     and the latent heat flux of solid precip. melting
+      !!                        qsr          solar ocean heat fluxes   (ocean only case)
+      !!                        emp          upward mass flux [evap. - precip. (- runoffs) (- calving)] (ocean only case)
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   kt       ! ocean model time step index
+      INTEGER, INTENT(in) ::   k_fsbc   ! frequency of sbc (-> ice model) computation 
+      INTEGER, INTENT(in) ::   k_ice    ! ice management in the sbc (=0/1/2/3)
+      !!
+      LOGICAL ::    llnewtx, llnewtau      ! update wind stress components and module??
+      INTEGER  ::   ji, jj, jn             ! dummy loop indices
+      INTEGER  ::   isec                   ! number of seconds since nit000 (assuming rdttra did not change since nit000)
+      REAL(wp) ::   zcumulneg, zcumulpos   ! temporary scalars     
+      REAL(wp) ::   zcoef                  ! temporary scalar
+      REAL(wp) ::   zrhoa  = 1.22          ! Air density kg/m3
+      REAL(wp) ::   zcdrag = 1.5e-3        ! drag coefficient
+      REAL(wp) ::   zzx, zzy               ! temporary variables
+      REAL(wp), POINTER, DIMENSION(:,:) ::   ztx, zty 
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('sbc_cpl_rcv')
+      !
+      CALL wrk_alloc( jpi,jpj, ztx, zty )
+
+#if ! defined key_oasis_mct
+       IF( kt == nit000 )   CALL sbc_cpl_init( k_ice )          ! initialisation
+#endif
+      !                                                 ! Receive all the atmos. fields (including ice information)
+      isec = ( kt - nit000 ) * NINT( rdttra(1) )             ! date of exchanges
+      DO jn = 1, jprcv                                       ! received fields sent by the atmosphere
+         IF( srcv(jn)%laction )   CALL cpl_prism_rcv( jn, isec, frcv(jn)%z3, nrcvinfo(jn) )
+      END DO
+
+      !                                                      ! ========================= !
+      IF( srcv(jpr_otx1)%laction ) THEN                      !  ocean stress components  !
+         !                                                   ! ========================= !
+         ! define frcv(jpr_otx1)%z3(:,:,1) and frcv(jpr_oty1)%z3(:,:,1): stress at U/V point along model grid
+         ! => need to be done only when we receive the field
+         IF(  nrcvinfo(jpr_otx1) == OASIS_Rcv ) THEN
+            !
+            IF( TRIM( sn_rcv_tau%clvref ) == 'cartesian' ) THEN            ! 2 components on the sphere
+               !                                                       ! (cartesian to spherical -> 3 to 2 components)
+               !
+               CALL geo2oce( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), frcv(jpr_otz1)%z3(:,:,1),   &
+                  &          srcv(jpr_otx1)%clgrid, ztx, zty )
+               frcv(jpr_otx1)%z3(:,:,1) = ztx(:,:)   ! overwrite 1st comp. on the 1st grid
+               frcv(jpr_oty1)%z3(:,:,1) = zty(:,:)   ! overwrite 2nd comp. on the 1st grid
+               !
+               IF( srcv(jpr_otx2)%laction ) THEN
+                  CALL geo2oce( frcv(jpr_otx2)%z3(:,:,1), frcv(jpr_oty2)%z3(:,:,1), frcv(jpr_otz2)%z3(:,:,1),   &
+                     &          srcv(jpr_otx2)%clgrid, ztx, zty )
+                  frcv(jpr_otx2)%z3(:,:,1) = ztx(:,:)   ! overwrite 1st comp. on the 2nd grid
+                  frcv(jpr_oty2)%z3(:,:,1) = zty(:,:)   ! overwrite 2nd comp. on the 2nd grid
+               ENDIF
+               !
+            ENDIF
+            !
+            IF( TRIM( sn_rcv_tau%clvor ) == 'eastward-northward' ) THEN   ! 2 components oriented along the local grid
+               !                                                       ! (geographical to local grid -> rotate the components)
+               CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->i', ztx )   
+               IF( srcv(jpr_otx2)%laction ) THEN
+                  CALL rot_rep( frcv(jpr_otx2)%z3(:,:,1), frcv(jpr_oty2)%z3(:,:,1), srcv(jpr_otx2)%clgrid, 'en->j', zty )   
+               ELSE	
+                  CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->j', zty )  
+               ENDIF
+               frcv(jpr_otx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid
+               frcv(jpr_oty1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 2nd grid
+            ENDIF
+            !                              
+            IF( srcv(jpr_otx1)%clgrid == 'T' ) THEN
+               DO jj = 2, jpjm1                                          ! T ==> (U,V)
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     frcv(jpr_otx1)%z3(ji,jj,1) = 0.5 * ( frcv(jpr_otx1)%z3(ji+1,jj  ,1) + frcv(jpr_otx1)%z3(ji,jj,1) )
+                     frcv(jpr_oty1)%z3(ji,jj,1) = 0.5 * ( frcv(jpr_oty1)%z3(ji  ,jj+1,1) + frcv(jpr_oty1)%z3(ji,jj,1) )
+                  END DO
+               END DO
+               CALL lbc_lnk( frcv(jpr_otx1)%z3(:,:,1), 'U',  -1. )   ;   CALL lbc_lnk( frcv(jpr_oty1)%z3(:,:,1), 'V',  -1. )
+            ENDIF
+            llnewtx = .TRUE.
+         ELSE
+            llnewtx = .FALSE.
+         ENDIF
+         !                                                   ! ========================= !
+      ELSE                                                   !   No dynamical coupling   !
+         !                                                   ! ========================= !
+         frcv(jpr_otx1)%z3(:,:,1) = 0.e0                               ! here simply set to zero 
+         frcv(jpr_oty1)%z3(:,:,1) = 0.e0                               ! an external read in a file can be added instead
+         llnewtx = .TRUE.
+         !
+      ENDIF
+      
+      !                                                      ! ========================= !
+      !                                                      !    wind stress module     !   (taum)
+      !                                                      ! ========================= !
+      !
+      IF( .NOT. srcv(jpr_taum)%laction ) THEN                    ! compute wind stress module from its components if not received 
+         ! => need to be done only when otx1 was changed
+         IF( llnewtx ) THEN
+!CDIR NOVERRCHK
+            DO jj = 2, jpjm1
+!CDIR NOVERRCHK
+               DO ji = fs_2, fs_jpim1   ! vect. opt.
+                  zzx = frcv(jpr_otx1)%z3(ji-1,jj  ,1) + frcv(jpr_otx1)%z3(ji,jj,1)
+                  zzy = frcv(jpr_oty1)%z3(ji  ,jj-1,1) + frcv(jpr_oty1)%z3(ji,jj,1)
+                  frcv(jpr_taum)%z3(ji,jj,1) = 0.5 * SQRT( zzx * zzx + zzy * zzy )
+               END DO
+            END DO
+            CALL lbc_lnk( frcv(jpr_taum)%z3(:,:,1), 'T', 1. )
+            llnewtau = .TRUE.
+         ELSE
+            llnewtau = .FALSE.
+         ENDIF
+      ELSE
+         llnewtau = nrcvinfo(jpr_taum) == OASIS_Rcv
+         ! Stress module can be negative when received (interpolation problem)
+         IF( llnewtau ) THEN 
+            frcv(jpr_taum)%z3(:,:,1) = MAX( 0._wp, frcv(jpr_taum)%z3(:,:,1) )
+         ENDIF
+      ENDIF
+      
+      !                                                      ! ========================= !
+      !                                                      !      10 m wind speed      !   (wndm)
+      !                                                      ! ========================= !
+      !
+      IF( .NOT. srcv(jpr_w10m)%laction ) THEN                    ! compute wind spreed from wind stress module if not received  
+         ! => need to be done only when taumod was changed
+         IF( llnewtau ) THEN 
+            zcoef = 1. / ( zrhoa * zcdrag ) 
+!CDIR NOVERRCHK
+            DO jj = 1, jpj
+!CDIR NOVERRCHK
+               DO ji = 1, jpi 
+                  wndm(ji,jj) = SQRT( frcv(jpr_taum)%z3(ji,jj,1) * zcoef )
+               END DO
+            END DO
+         ENDIF
+      ELSE
+         IF ( nrcvinfo(jpr_w10m) == OASIS_Rcv ) wndm(:,:) = frcv(jpr_w10m)%z3(:,:,1)
+      ENDIF
+
+      ! u(v)tau and taum will be modified by ice model
+      ! -> need to be reset before each call of the ice/fsbc      
+      IF( MOD( kt-1, k_fsbc ) == 0 ) THEN
+         !
+         utau(:,:) = frcv(jpr_otx1)%z3(:,:,1)
+         vtau(:,:) = frcv(jpr_oty1)%z3(:,:,1)
+         taum(:,:) = frcv(jpr_taum)%z3(:,:,1)
+         CALL iom_put( "taum_oce", taum )   ! output wind stress module
+         !  
+      ENDIF
+
+#if defined key_cpl_carbon_cycle
+      !                                                              ! atmosph. CO2 (ppm)
+      IF( srcv(jpr_co2)%laction )   atm_co2(:,:) = frcv(jpr_co2)%z3(:,:,1)
+#endif
+
+      !                                                      ! ========================= !
+      IF( k_ice <= 1 ) THEN                                  !  heat & freshwater fluxes ! (Ocean only case)
+         !                                                   ! ========================= !
+         !
+         !                                                       ! total freshwater fluxes over the ocean (emp)
+         SELECT CASE( TRIM( sn_rcv_emp%cldes ) )                                    ! evaporation - precipitation
+         CASE( 'conservative' )
+            emp(:,:) = frcv(jpr_tevp)%z3(:,:,1) - ( frcv(jpr_rain)%z3(:,:,1) + frcv(jpr_snow)%z3(:,:,1) )
+         CASE( 'oce only', 'oce and ice' )
+            emp(:,:) = frcv(jpr_oemp)%z3(:,:,1)
+         CASE default
+            CALL ctl_stop( 'sbc_cpl_rcv: wrong definition of sn_rcv_emp%cldes' )
+         END SELECT
+         !
+         !                                                        ! runoffs and calving (added in emp)
+         IF( srcv(jpr_rnf)%laction )   emp(:,:) = emp(:,:) - frcv(jpr_rnf)%z3(:,:,1)
+         IF( srcv(jpr_cal)%laction )   emp(:,:) = emp(:,:) - frcv(jpr_cal)%z3(:,:,1)
+         !
+!!gm :  this seems to be internal cooking, not sure to need that in a generic interface 
+!!gm                                       at least should be optional...
+!!         IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' ) THEN     ! add to the total freshwater budget
+!!            ! remove negative runoff
+!!            zcumulpos = SUM( MAX( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1t(:,:) * e2t(:,:) * tmask_i(:,:) ) 
+!!            zcumulneg = SUM( MIN( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1t(:,:) * e2t(:,:) * tmask_i(:,:) )
+!!            IF( lk_mpp )   CALL mpp_sum( zcumulpos )   ! sum over the global domain
+!!            IF( lk_mpp )   CALL mpp_sum( zcumulneg ) 
+!!            IF( zcumulpos /= 0. ) THEN                 ! distribute negative runoff on positive runoff grid points
+!!               zcumulneg = 1.e0 + zcumulneg / zcumulpos
+!!               frcv(jpr_rnf)%z3(:,:,1) = MAX( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * zcumulneg
+!!            ENDIF     
+!!            ! add runoff to e-p 
+!!            emp(:,:) = emp(:,:) - frcv(jpr_rnf)%z3(:,:,1)
+!!         ENDIF
+!!gm  end of internal cooking
+         !
+         !                                                       ! non solar heat flux over the ocean (qns)
+         IF( srcv(jpr_qnsoce)%laction )   qns(:,:) = frcv(jpr_qnsoce)%z3(:,:,1)
+         IF( srcv(jpr_qnsmix)%laction )   qns(:,:) = frcv(jpr_qnsmix)%z3(:,:,1)
+         ! add the latent heat of solid precip. melting
+         IF( srcv(jpr_snow  )%laction )   THEN                         ! update qns over the free ocean with:
+              qns(:,:) = qns(:,:) - frcv(jpr_snow)%z3(:,:,1) * lfus  & ! energy for melting solid precipitation over the free ocean
+           &           - emp(:,:) * sst_m(:,:) * rcp                   ! remove heat content due to mass flux (assumed to be at SST)
+         ENDIF
+
+         !                                                       ! solar flux over the ocean          (qsr)
+         IF( srcv(jpr_qsroce)%laction )   qsr(:,:) = frcv(jpr_qsroce)%z3(:,:,1)
+         IF( srcv(jpr_qsrmix)%laction )   qsr(:,:) = frcv(jpr_qsrmix)%z3(:,:,1)
+         IF( ln_dm2dc )   qsr(:,:) = sbc_dcy( qsr )                           ! modify qsr to include the diurnal cycle
+         !
+  
+      ENDIF
+      !
+      CALL wrk_dealloc( jpi,jpj, ztx, zty )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('sbc_cpl_rcv')
+      !
+   END SUBROUTINE sbc_cpl_rcv
+   
+
+   SUBROUTINE sbc_cpl_ice_tau( p_taui, p_tauj )     
+      !!----------------------------------------------------------------------
+      !!             ***  ROUTINE sbc_cpl_ice_tau  ***
+      !!
+      !! ** Purpose :   provide the stress over sea-ice in coupled mode 
+      !!
+      !! ** Method  :   transform the received stress from the atmosphere into
+      !!             an atmosphere-ice stress in the (i,j) ocean referencial
+      !!             and at the velocity point of the sea-ice model (cp_ice_msh):
+      !!                'C'-grid : i- (j-) components given at U- (V-) point 
+      !!                'I'-grid : B-grid lower-left corner: both components given at I-point 
+      !!
+      !!                The received stress are :
+      !!                 - defined by 3 components (if cartesian coordinate)
+      !!                        or by 2 components (if spherical)
+      !!                 - oriented along geographical   coordinate (if eastward-northward)
+      !!                        or  along the local grid coordinate (if local grid)
+      !!                 - given at U- and V-point, resp.   if received on 2 grids
+      !!                        or at a same point (T or I) if received on 1 grid
+      !!                Therefore and if necessary, they are successively 
+      !!             processed in order to obtain them 
+      !!                 first  as  2 components on the sphere 
+      !!                 second as  2 components oriented along the local grid
+      !!                 third  as  2 components on the cp_ice_msh point 
+      !!
+      !!                Except in 'oce and ice' case, only one vector stress field 
+      !!             is received. It has already been processed in sbc_cpl_rcv
+      !!             so that it is now defined as (i,j) components given at U-
+      !!             and V-points, respectively. Therefore, only the third
+      !!             transformation is done and only if the ice-grid is a 'I'-grid. 
+      !!
+      !! ** Action  :   return ptau_i, ptau_j, the stress over the ice at cp_ice_msh point
+      !!----------------------------------------------------------------------
+      REAL(wp), INTENT(out), DIMENSION(:,:) ::   p_taui   ! i- & j-components of atmos-ice stress [N/m2]
+      REAL(wp), INTENT(out), DIMENSION(:,:) ::   p_tauj   ! at I-point (B-grid) or U & V-point (C-grid)
+      !!
+      INTEGER ::   ji, jj                          ! dummy loop indices
+      INTEGER ::   itx                             ! index of taux over ice
+      REAL(wp), POINTER, DIMENSION(:,:) ::   ztx, zty 
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('sbc_cpl_ice_tau')
+      !
+      CALL wrk_alloc( jpi,jpj, ztx, zty )
+
+!AC Pour eviter un stress nul sur la glace dans le cas mixed oce-ice
+      IF( srcv(jpr_itx1)%laction .AND. TRIM( sn_rcv_tau%cldes ) == 'oce and ice') THEN   ;   itx =  jpr_itx1   
+      ELSE                                ;   itx =  jpr_otx1
+      ENDIF
+
+      ! do something only if we just received the stress from atmosphere
+      IF(  nrcvinfo(itx) == OASIS_Rcv ) THEN
+
+         !                                                                                              ! ======================= !
+!AC Pour eviter un stress nul sur la glace dans le cas mixes oce-ice
+         IF( srcv(jpr_itx1)%laction .AND. TRIM( sn_rcv_tau%cldes ) == 'oce and ice') THEN               !   ice stress received   !
+            !                                                                                           ! ======================= !
+            !  
+            IF( TRIM( sn_rcv_tau%clvref ) == 'cartesian' ) THEN            ! 2 components on the sphere
+               !                                                       ! (cartesian to spherical -> 3 to 2 components)
+               CALL geo2oce(  frcv(jpr_itx1)%z3(:,:,1), frcv(jpr_ity1)%z3(:,:,1), frcv(jpr_itz1)%z3(:,:,1),   &
+                  &          srcv(jpr_itx1)%clgrid, ztx, zty )
+               frcv(jpr_itx1)%z3(:,:,1) = ztx(:,:)   ! overwrite 1st comp. on the 1st grid
+               frcv(jpr_ity1)%z3(:,:,1) = zty(:,:)   ! overwrite 2nd comp. on the 1st grid
+               !
+               IF( srcv(jpr_itx2)%laction ) THEN
+                  CALL geo2oce( frcv(jpr_itx2)%z3(:,:,1), frcv(jpr_ity2)%z3(:,:,1), frcv(jpr_itz2)%z3(:,:,1),   &
+                     &          srcv(jpr_itx2)%clgrid, ztx, zty )
+                  frcv(jpr_itx2)%z3(:,:,1) = ztx(:,:)   ! overwrite 1st comp. on the 2nd grid
+                  frcv(jpr_ity2)%z3(:,:,1) = zty(:,:)   ! overwrite 2nd comp. on the 2nd grid
+               ENDIF
+               !
+            ENDIF
+            !
+            IF( TRIM( sn_rcv_tau%clvor ) == 'eastward-northward' ) THEN   ! 2 components oriented along the local grid
+               !                                                       ! (geographical to local grid -> rotate the components)
+               CALL rot_rep( frcv(jpr_itx1)%z3(:,:,1), frcv(jpr_ity1)%z3(:,:,1), srcv(jpr_itx1)%clgrid, 'en->i', ztx )   
+               IF( srcv(jpr_itx2)%laction ) THEN
+                  CALL rot_rep( frcv(jpr_itx2)%z3(:,:,1), frcv(jpr_ity2)%z3(:,:,1), srcv(jpr_itx2)%clgrid, 'en->j', zty )   
+               ELSE
+                  CALL rot_rep( frcv(jpr_itx1)%z3(:,:,1), frcv(jpr_ity1)%z3(:,:,1), srcv(jpr_itx1)%clgrid, 'en->j', zty )  
+               ENDIF
+               frcv(jpr_itx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid
+               frcv(jpr_ity1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 1st grid
+            ENDIF
+            !                                                   ! ======================= !
+         ELSE                                                   !     use ocean stress    !
+            !                                                   ! ======================= !
+            frcv(jpr_itx1)%z3(:,:,1) = frcv(jpr_otx1)%z3(:,:,1)
+            frcv(jpr_ity1)%z3(:,:,1) = frcv(jpr_oty1)%z3(:,:,1)
+            !
+         ENDIF
+
+         !                                                      ! ======================= !
+         !                                                      !     put on ice grid     !
+         !                                                      ! ======================= !
+         !    
+         !                                                  j+1   j     -----V---F
+         ! ice stress on ice velocity point (cp_ice_msh)                 !       |
+         ! (C-grid ==>(U,V) or B-grid ==> I or F)                 j      |   T   U
+         !                                                               |       |
+         !                                                   j    j-1   -I-------|
+         !                                               (for I)         |       |
+         !                                                              i-1  i   i
+         !                                                               i      i+1 (for I)
+         SELECT CASE ( cp_ice_msh )
+            !
+         CASE( 'I' )                                         ! B-grid ==> I
+            SELECT CASE ( srcv(jpr_itx1)%clgrid )
+            CASE( 'U' )
+               DO jj = 2, jpjm1                                   ! (U,V) ==> I
+                  DO ji = 2, jpim1   ! NO vector opt.
+                     p_taui(ji,jj) = 0.5 * ( frcv(jpr_itx1)%z3(ji-1,jj  ,1) + frcv(jpr_itx1)%z3(ji-1,jj-1,1) )
+                     p_tauj(ji,jj) = 0.5 * ( frcv(jpr_ity1)%z3(ji  ,jj-1,1) + frcv(jpr_ity1)%z3(ji-1,jj-1,1) )
+                  END DO
+               END DO
+            CASE( 'F' )
+               DO jj = 2, jpjm1                                   ! F ==> I
+                  DO ji = 2, jpim1   ! NO vector opt.
+                     p_taui(ji,jj) = frcv(jpr_itx1)%z3(ji-1,jj-1,1)
+                     p_tauj(ji,jj) = frcv(jpr_ity1)%z3(ji-1,jj-1,1)
+                  END DO
+               END DO
+            CASE( 'T' )
+               DO jj = 2, jpjm1                                   ! T ==> I
+                  DO ji = 2, jpim1   ! NO vector opt.
+                     p_taui(ji,jj) = 0.25 * ( frcv(jpr_itx1)%z3(ji,jj  ,1) + frcv(jpr_itx1)%z3(ji-1,jj  ,1)   &
+                        &                   + frcv(jpr_itx1)%z3(ji,jj-1,1) + frcv(jpr_itx1)%z3(ji-1,jj-1,1) ) 
+                     p_tauj(ji,jj) = 0.25 * ( frcv(jpr_ity1)%z3(ji,jj  ,1) + frcv(jpr_ity1)%z3(ji-1,jj  ,1)   &
+                        &                   + frcv(jpr_oty1)%z3(ji,jj-1,1) + frcv(jpr_ity1)%z3(ji-1,jj-1,1) )
+                  END DO
+               END DO
+            CASE( 'I' )
+               p_taui(:,:) = frcv(jpr_itx1)%z3(:,:,1)                   ! I ==> I
+               p_tauj(:,:) = frcv(jpr_ity1)%z3(:,:,1)
+            END SELECT
+            IF( srcv(jpr_itx1)%clgrid /= 'I' ) THEN 
+               CALL lbc_lnk( p_taui, 'I',  -1. )   ;   CALL lbc_lnk( p_tauj, 'I',  -1. )
+            ENDIF
+            !
+         CASE( 'F' )                                         ! B-grid ==> F
+            SELECT CASE ( srcv(jpr_itx1)%clgrid )
+            CASE( 'U' )
+               DO jj = 2, jpjm1                                   ! (U,V) ==> F
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     p_taui(ji,jj) = 0.5 * ( frcv(jpr_itx1)%z3(ji,jj,1) + frcv(jpr_itx1)%z3(ji  ,jj+1,1) )
+                     p_tauj(ji,jj) = 0.5 * ( frcv(jpr_ity1)%z3(ji,jj,1) + frcv(jpr_ity1)%z3(ji+1,jj  ,1) )
+                  END DO
+               END DO
+            CASE( 'I' )
+               DO jj = 2, jpjm1                                   ! I ==> F
+                  DO ji = 2, jpim1   ! NO vector opt.
+                     p_taui(ji,jj) = frcv(jpr_itx1)%z3(ji+1,jj+1,1)
+                     p_tauj(ji,jj) = frcv(jpr_ity1)%z3(ji+1,jj+1,1)
+                  END DO
+               END DO
+            CASE( 'T' )
+               DO jj = 2, jpjm1                                   ! T ==> F
+                  DO ji = 2, jpim1   ! NO vector opt.
+                     p_taui(ji,jj) = 0.25 * ( frcv(jpr_itx1)%z3(ji,jj  ,1) + frcv(jpr_itx1)%z3(ji+1,jj  ,1)   &
+                        &                   + frcv(jpr_itx1)%z3(ji,jj+1,1) + frcv(jpr_itx1)%z3(ji+1,jj+1,1) ) 
+                     p_tauj(ji,jj) = 0.25 * ( frcv(jpr_ity1)%z3(ji,jj  ,1) + frcv(jpr_ity1)%z3(ji+1,jj  ,1)   &
+                        &                   + frcv(jpr_ity1)%z3(ji,jj+1,1) + frcv(jpr_ity1)%z3(ji+1,jj+1,1) )
+                  END DO
+               END DO
+            CASE( 'F' )
+               p_taui(:,:) = frcv(jpr_itx1)%z3(:,:,1)                   ! F ==> F
+               p_tauj(:,:) = frcv(jpr_ity1)%z3(:,:,1)
+            END SELECT
+            IF( srcv(jpr_itx1)%clgrid /= 'F' ) THEN 
+               CALL lbc_lnk( p_taui, 'F',  -1. )   ;   CALL lbc_lnk( p_tauj, 'F',  -1. )
+            ENDIF
+            !
+         CASE( 'C' )                                         ! C-grid ==> U,V
+            SELECT CASE ( srcv(jpr_itx1)%clgrid )
+            CASE( 'U' )
+               p_taui(:,:) = frcv(jpr_itx1)%z3(:,:,1)                   ! (U,V) ==> (U,V)
+               p_tauj(:,:) = frcv(jpr_ity1)%z3(:,:,1)
+            CASE( 'F' )
+               DO jj = 2, jpjm1                                   ! F ==> (U,V)
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     p_taui(ji,jj) = 0.5 * ( frcv(jpr_itx1)%z3(ji,jj,1) + frcv(jpr_itx1)%z3(ji  ,jj-1,1) )
+                     p_tauj(ji,jj) = 0.5 * ( frcv(jpr_ity1)%z3(jj,jj,1) + frcv(jpr_ity1)%z3(ji-1,jj  ,1) )
+                  END DO
+               END DO
+            CASE( 'T' )
+               DO jj = 2, jpjm1                                   ! T ==> (U,V)
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     p_taui(ji,jj) = 0.5 * ( frcv(jpr_itx1)%z3(ji+1,jj  ,1) + frcv(jpr_itx1)%z3(ji,jj,1) )
+                     p_tauj(ji,jj) = 0.5 * ( frcv(jpr_ity1)%z3(ji  ,jj+1,1) + frcv(jpr_ity1)%z3(ji,jj,1) )
+                  END DO
+               END DO
+            CASE( 'I' )
+               DO jj = 2, jpjm1                                   ! I ==> (U,V)
+                  DO ji = 2, jpim1   ! NO vector opt.
+                     p_taui(ji,jj) = 0.5 * ( frcv(jpr_itx1)%z3(ji+1,jj+1,1) + frcv(jpr_itx1)%z3(ji+1,jj  ,1) )
+                     p_tauj(ji,jj) = 0.5 * ( frcv(jpr_ity1)%z3(ji+1,jj+1,1) + frcv(jpr_ity1)%z3(ji  ,jj+1,1) )
+                  END DO
+               END DO
+            END SELECT
+            IF( srcv(jpr_itx1)%clgrid /= 'U' ) THEN 
+               CALL lbc_lnk( p_taui, 'U',  -1. )   ;   CALL lbc_lnk( p_tauj, 'V',  -1. )
+            ENDIF
+         END SELECT
+
+      ENDIF
+      !   
+      CALL wrk_dealloc( jpi,jpj, ztx, zty )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('sbc_cpl_ice_tau')
+      !
+   END SUBROUTINE sbc_cpl_ice_tau
+   
+
+   SUBROUTINE sbc_cpl_ice_flx( p_frld  , palbi   , psst    , pist    )
+      !!----------------------------------------------------------------------
+      !!             ***  ROUTINE sbc_cpl_ice_flx  ***
+      !!
+      !! ** Purpose :   provide the heat and freshwater fluxes of the 
+      !!              ocean-ice system.
+      !!
+      !! ** Method  :   transform the fields received from the atmosphere into
+      !!             surface heat and fresh water boundary condition for the 
+      !!             ice-ocean system. The following fields are provided:
+      !!              * total non solar, solar and freshwater fluxes (qns_tot, 
+      !!             qsr_tot and emp_tot) (total means weighted ice-ocean flux)
+      !!             NB: emp_tot include runoffs and calving.
+      !!              * fluxes over ice (qns_ice, qsr_ice, emp_ice) where
+      !!             emp_ice = sublimation - solid precipitation as liquid
+      !!             precipitation are re-routed directly to the ocean and 
+      !!             runoffs and calving directly enter the ocean.
+      !!              * solid precipitation (sprecip), used to add to qns_tot 
+      !!             the heat lost associated to melting solid precipitation
+      !!             over the ocean fraction.
+      !!       ===>> CAUTION here this changes the net heat flux received from
+      !!             the atmosphere
+      !!
+      !!                  - the fluxes have been separated from the stress as
+      !!                 (a) they are updated at each ice time step compare to
+      !!                 an update at each coupled time step for the stress, and
+      !!                 (b) the conservative computation of the fluxes over the
+      !!                 sea-ice area requires the knowledge of the ice fraction
+      !!                 after the ice advection and before the ice thermodynamics,
+      !!                 so that the stress is updated before the ice dynamics
+      !!                 while the fluxes are updated after it.
+      !!
+      !! ** Action  :   update at each nf_ice time step:
+      !!                   qns_tot, qsr_tot  non-solar and solar total heat fluxes
+      !!                   qns_ice, qsr_ice  non-solar and solar heat fluxes over the ice
+      !!                   emp_tot            total evaporation - precipitation(liquid and solid) (-runoff)(-calving)
+      !!                   emp_ice            ice sublimation - solid precipitation over the ice
+      !!                   dqns_ice           d(non-solar heat flux)/d(Temperature) over the ice
+      !!                   sprecip             solid precipitation over the ocean  
+      !!----------------------------------------------------------------------
+      REAL(wp), INTENT(in   ), DIMENSION(:,:)   ::   p_frld     ! lead fraction                [0 to 1]
+      ! optional arguments, used only in 'mixed oce-ice' case
+      REAL(wp), INTENT(in   ), DIMENSION(:,:,:), OPTIONAL ::   palbi   ! ice albedo 
+      REAL(wp), INTENT(in   ), DIMENSION(:,:  ), OPTIONAL ::   psst    ! sea surface temperature     [Celcius]
+      REAL(wp), INTENT(in   ), DIMENSION(:,:,:), OPTIONAL ::   pist    ! ice surface temperature     [Kelvin]
+      !
+      INTEGER ::   jl   ! dummy loop index
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zcptn, ztmp, zicefr
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('sbc_cpl_ice_flx')
+      !
+      CALL wrk_alloc( jpi,jpj, zcptn, ztmp, zicefr )
+
+      zicefr(:,:) = 1.- p_frld(:,:)
+      zcptn(:,:) = rcp * sst_m(:,:)
+      !
+      !                                                      ! ========================= !
+      !                                                      !    freshwater budget      !   (emp)
+      !                                                      ! ========================= !
+      !
+      !                                                           ! total Precipitations - total Evaporation (emp_tot)
+      !                                                           ! solid precipitation  - sublimation       (emp_ice)
+      !                                                           ! solid Precipitation                      (sprecip)
+      SELECT CASE( TRIM( sn_rcv_emp%cldes ) )
+      CASE( 'conservative'  )   ! received fields: jpr_rain, jpr_snow, jpr_ievp, jpr_tevp
+         sprecip(:,:) = frcv(jpr_snow)%z3(:,:,1)                 ! May need to ensure positive here
+         tprecip(:,:) = frcv(jpr_rain)%z3(:,:,1) + sprecip (:,:) ! May need to ensure positive here
+         emp_tot(:,:) = frcv(jpr_tevp)%z3(:,:,1) - tprecip(:,:)
+         emp_ice(:,:) = frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_snow)%z3(:,:,1)
+                           CALL iom_put( 'rain'         , frcv(jpr_rain)%z3(:,:,1)              )   ! liquid precipitation 
+         IF( lk_diaar5 )   CALL iom_put( 'hflx_rain_cea', frcv(jpr_rain)%z3(:,:,1) * zcptn(:,:) )   ! heat flux from liq. precip. 
+         ztmp(:,:) = frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:)
+                           CALL iom_put( 'evap_ao_cea'  , ztmp                            )   ! ice-free oce evap (cell average)
+         IF( lk_diaar5 )   CALL iom_put( 'hflx_evap_cea', ztmp(:,:         ) * zcptn(:,:) )   ! heat flux from from evap (cell ave)
+      CASE( 'oce and ice'   )   ! received fields: jpr_sbpr, jpr_semp, jpr_oemp, jpr_ievp
+         emp_tot(:,:) = p_frld(:,:) * frcv(jpr_oemp)%z3(:,:,1) + zicefr(:,:) * frcv(jpr_sbpr)%z3(:,:,1)
+         emp_ice(:,:) = frcv(jpr_semp)%z3(:,:,1)
+         sprecip(:,:) = - frcv(jpr_semp)%z3(:,:,1) + frcv(jpr_ievp)%z3(:,:,1)
+      END SELECT
+
+      CALL iom_put( 'snowpre'    , sprecip                                )   ! Snow
+      CALL iom_put( 'snow_ao_cea', sprecip(:,:         ) * p_frld(:,:)    )   ! Snow        over ice-free ocean  (cell average)
+      CALL iom_put( 'snow_ai_cea', sprecip(:,:         ) * zicefr(:,:)    )   ! Snow        over sea-ice         (cell average)
+      CALL iom_put( 'subl_ai_cea', frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) )   ! Sublimation over sea-ice         (cell average)
+      !   
+      !                                                           ! runoffs and calving (put in emp_tot)
+      IF( srcv(jpr_rnf)%laction ) THEN 
+         emp_tot(:,:) = emp_tot(:,:) - frcv(jpr_rnf)%z3(:,:,1)
+                           CALL iom_put( 'runoffs'      , frcv(jpr_rnf)%z3(:,:,1)              )   ! rivers
+         IF( lk_diaar5 )   CALL iom_put( 'hflx_rnf_cea' , frcv(jpr_rnf)%z3(:,:,1) * zcptn(:,:) )   ! heat flux from rivers
+      ENDIF
+      IF( srcv(jpr_cal)%laction ) THEN 
+         emp_tot(:,:) = emp_tot(:,:) - frcv(jpr_cal)%z3(:,:,1)
+         CALL iom_put( 'calving', frcv(jpr_cal)%z3(:,:,1) )
+      ENDIF
+      !
+!!gm :  this seems to be internal cooking, not sure to need that in a generic interface 
+!!gm                                       at least should be optional...
+!!       ! remove negative runoff                            ! sum over the global domain
+!!       zcumulpos = SUM( MAX( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1t(:,:) * e2t(:,:) * tmask_i(:,:) ) 
+!!       zcumulneg = SUM( MIN( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1t(:,:) * e2t(:,:) * tmask_i(:,:) )
+!!       IF( lk_mpp )   CALL mpp_sum( zcumulpos )
+!!       IF( lk_mpp )   CALL mpp_sum( zcumulneg ) 
+!!       IF( zcumulpos /= 0. ) THEN                          ! distribute negative runoff on positive runoff grid points
+!!          zcumulneg = 1.e0 + zcumulneg / zcumulpos
+!!          frcv(jpr_rnf)%z3(:,:,1) = MAX( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * zcumulneg
+!!       ENDIF     
+!!       emp_tot(:,:) = emp_tot(:,:) - frcv(jpr_rnf)%z3(:,:,1)   ! add runoff to e-p 
+!!
+!!gm  end of internal cooking
+
+      !                                                      ! ========================= !
+      SELECT CASE( TRIM( sn_rcv_qns%cldes ) )                !   non solar heat fluxes   !   (qns)
+      !                                                      ! ========================= !
+      CASE( 'oce only' )                                     ! the required field is directly provided
+         qns_tot(:,:  ) = frcv(jpr_qnsoce)%z3(:,:,1)
+      CASE( 'conservative' )                                      ! the required fields are directly provided
+         qns_tot(:,:  ) = frcv(jpr_qnsmix)%z3(:,:,1)
+         IF ( TRIM(sn_rcv_qns%clcat) == 'yes' ) THEN
+            qns_ice(:,:,1:jpl) = frcv(jpr_qnsice)%z3(:,:,1:jpl)
+         ELSE
+            ! Set all category values equal for the moment
+            DO jl=1,jpl
+               qns_ice(:,:,jl) = frcv(jpr_qnsice)%z3(:,:,1)
+            ENDDO
+         ENDIF
+      CASE( 'oce and ice' )       ! the total flux is computed from ocean and ice fluxes
+         qns_tot(:,:  ) =  p_frld(:,:) * frcv(jpr_qnsoce)%z3(:,:,1)
+         IF ( TRIM(sn_rcv_qns%clcat) == 'yes' ) THEN
+            DO jl=1,jpl
+               qns_tot(:,:   ) = qns_tot(:,:) + a_i(:,:,jl) * frcv(jpr_qnsice)%z3(:,:,jl)   
+               qns_ice(:,:,jl) = frcv(jpr_qnsice)%z3(:,:,jl)
+            ENDDO
+         ELSE
+            DO jl=1,jpl
+               qns_tot(:,:   ) = qns_tot(:,:) + zicefr(:,:) * frcv(jpr_qnsice)%z3(:,:,1)
+               qns_ice(:,:,jl) = frcv(jpr_qnsice)%z3(:,:,1)
+            ENDDO
+         ENDIF
+      CASE( 'mixed oce-ice' )     ! the ice flux is cumputed from the total flux, the SST and ice informations
+! ** NEED TO SORT OUT HOW THIS SHOULD WORK IN THE MULTI-CATEGORY CASE - CURRENTLY NOT ALLOWED WHEN INTERFACE INITIALISED **
+         qns_tot(:,:  ) = frcv(jpr_qnsmix)%z3(:,:,1)
+         qns_ice(:,:,1) = frcv(jpr_qnsmix)%z3(:,:,1)    &
+            &            + frcv(jpr_dqnsdt)%z3(:,:,1) * ( pist(:,:,1) - ( (rt0 + psst(:,:  ) ) * p_frld(:,:)   &
+            &                                                   +          pist(:,:,1)   * zicefr(:,:) ) )
+      END SELECT
+      ztmp(:,:) = p_frld(:,:) * sprecip(:,:) * lfus
+      qns_tot(:,:) = qns_tot(:,:)                         &            ! qns_tot update over free ocean with:
+         &          - ztmp(:,:)                           &            ! remove the latent heat flux of solid precip. melting
+         &          - (  emp_tot(:,:)                     &            ! remove the heat content of mass flux (assumed to be at SST)
+         &             - emp_ice(:,:) * zicefr(:,:)  ) * zcptn(:,:) 
+      IF( lk_diaar5 )   CALL iom_put( 'hflx_snow_cea', ztmp + sprecip(:,:) * zcptn(:,:) )   ! heat flux from snow (cell average)
+!!gm
+!!    currently it is taken into account in leads budget but not in the qns_tot, and thus not in 
+!!    the flux that enter the ocean....
+!!    moreover 1 - it is not diagnose anywhere.... 
+!!             2 - it is unclear for me whether this heat lost is taken into account in the atmosphere or not...
+!!
+!! similar job should be done for snow and precipitation temperature
+      !                                     
+      IF( srcv(jpr_cal)%laction ) THEN                            ! Iceberg melting 
+         ztmp(:,:) = frcv(jpr_cal)%z3(:,:,1) * lfus               ! add the latent heat of iceberg melting 
+         qns_tot(:,:) = qns_tot(:,:) - ztmp(:,:)
+         IF( lk_diaar5 )   CALL iom_put( 'hflx_cal_cea', ztmp + frcv(jpr_cal)%z3(:,:,1) * zcptn(:,:) )   ! heat flux from calving
+      ENDIF
+
+      !                                                      ! ========================= !
+      SELECT CASE( TRIM( sn_rcv_qsr%cldes ) )                !      solar heat fluxes    !   (qsr)
+      !                                                      ! ========================= !
+      CASE( 'oce only' )
+         qsr_tot(:,:  ) = MAX( 0._wp , frcv(jpr_qsroce)%z3(:,:,1) )
+      CASE( 'conservative' )
+         qsr_tot(:,:  ) = frcv(jpr_qsrmix)%z3(:,:,1)
+         IF ( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN
+            qsr_ice(:,:,1:jpl) = frcv(jpr_qsrice)%z3(:,:,1:jpl)
+         ELSE
+            ! Set all category values equal for the moment
+            DO jl=1,jpl
+               qsr_ice(:,:,jl) = frcv(jpr_qsrice)%z3(:,:,1)
+            ENDDO
+         ENDIF
+         qsr_tot(:,:  ) = frcv(jpr_qsrmix)%z3(:,:,1)
+         qsr_ice(:,:,1) = frcv(jpr_qsrice)%z3(:,:,1)
+      CASE( 'oce and ice' )
+         qsr_tot(:,:  ) =  p_frld(:,:) * frcv(jpr_qsroce)%z3(:,:,1)
+         IF ( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN
+            DO jl=1,jpl
+               qsr_tot(:,:   ) = qsr_tot(:,:) + a_i(:,:,jl) * frcv(jpr_qsrice)%z3(:,:,jl)   
+               qsr_ice(:,:,jl) = frcv(jpr_qsrice)%z3(:,:,jl)
+            ENDDO
+         ELSE
+            DO jl=1,jpl
+               qsr_tot(:,:   ) = qsr_tot(:,:) + zicefr(:,:) * frcv(jpr_qsrice)%z3(:,:,1)
+               qsr_ice(:,:,jl) = frcv(jpr_qsrice)%z3(:,:,1)
+            ENDDO
+         ENDIF
+      CASE( 'mixed oce-ice' )
+         qsr_tot(:,:  ) = frcv(jpr_qsrmix)%z3(:,:,1)
+! ** NEED TO SORT OUT HOW THIS SHOULD WORK IN THE MULTI-CATEGORY CASE - CURRENTLY NOT ALLOWED WHEN INTERFACE INITIALISED **
+!       Create solar heat flux over ice using incoming solar heat flux and albedos
+!       ( see OASIS3 user guide, 5th edition, p39 )
+         qsr_ice(:,:,1) = frcv(jpr_qsrmix)%z3(:,:,1) * ( 1.- palbi(:,:,1) )   &
+            &            / (  1.- ( albedo_oce_mix(:,:  ) * p_frld(:,:)       &
+            &                     + palbi         (:,:,1) * zicefr(:,:) ) )
+      END SELECT
+      IF( ln_dm2dc ) THEN   ! modify qsr to include the diurnal cycle
+         qsr_tot(:,:  ) = sbc_dcy( qsr_tot(:,:  ) )
+         DO jl=1,jpl
+            qsr_ice(:,:,jl) = sbc_dcy( qsr_ice(:,:,jl) )
+         ENDDO
+      ENDIF
+
+      SELECT CASE( TRIM( sn_rcv_dqnsdt%cldes ) )
+      CASE ('coupled')
+         IF ( TRIM(sn_rcv_dqnsdt%clcat) == 'yes' ) THEN
+            dqns_ice(:,:,1:jpl) = frcv(jpr_dqnsdt)%z3(:,:,1:jpl)
+         ELSE
+            ! Set all category values equal for the moment
+            DO jl=1,jpl
+               dqns_ice(:,:,jl) = frcv(jpr_dqnsdt)%z3(:,:,1)
+            ENDDO
+         ENDIF
+      END SELECT
+
+      SELECT CASE( TRIM( sn_rcv_iceflx%cldes ) )
+      CASE ('coupled')
+         topmelt(:,:,:)=frcv(jpr_topm)%z3(:,:,:)
+         botmelt(:,:,:)=frcv(jpr_botm)%z3(:,:,:)
+      END SELECT
+
+      !    Ice Qsr penetration used (only?)in lim2 or lim3 
+      ! fraction of net shortwave radiation which is not absorbed in the thin surface layer 
+      ! and penetrates inside the ice cover ( Maykut and Untersteiner, 1971 ; Elbert anbd Curry, 1993 )
+      ! Coupled case: since cloud cover is not received from atmosphere 
+      !               ===> defined as constant value -> definition done in sbc_cpl_init
+      fr1_i0(:,:) = 0.18
+      fr2_i0(:,:) = 0.82
+
+
+      CALL wrk_dealloc( jpi,jpj, zcptn, ztmp, zicefr )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('sbc_cpl_ice_flx')
+      !
+   END SUBROUTINE sbc_cpl_ice_flx
+   
+   
+   SUBROUTINE sbc_cpl_snd( kt )
+      !!----------------------------------------------------------------------
+      !!             ***  ROUTINE sbc_cpl_snd  ***
+      !!
+      !! ** Purpose :   provide the ocean-ice informations to the atmosphere
+      !!
+      !! ** Method  :   send to the atmosphere through a call to cpl_prism_snd
+      !!              all the needed fields (as defined in sbc_cpl_init)
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   kt
+      !
+      INTEGER ::   ji, jj, jl   ! dummy loop indices
+      INTEGER ::   isec, info   ! local integer
+      REAL(wp), POINTER, DIMENSION(:,:)   ::   zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1
+      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztmp3, ztmp4   
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('sbc_cpl_snd')
+      !
+      CALL wrk_alloc( jpi,jpj, zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 )
+      CALL wrk_alloc( jpi,jpj,jpl, ztmp3, ztmp4 )
+
+      isec = ( kt - nit000 ) * NINT(rdttra(1))        ! date of exchanges
+
+      zfr_l(:,:) = 1.- fr_i(:,:)
+
+      !                                                      ! ------------------------- !
+      !                                                      !    Surface temperature    !   in Kelvin
+      !                                                      ! ------------------------- !
+      IF( ssnd(jps_toce)%laction .OR. ssnd(jps_tice)%laction .OR. ssnd(jps_tmix)%laction ) THEN
+         SELECT CASE( sn_snd_temp%cldes)
+         CASE( 'oce only'             )   ;   ztmp1(:,:) =   tsn(:,:,1,jp_tem) + rt0
+         CASE( 'weighted oce and ice' )   ;   ztmp1(:,:) = ( tsn(:,:,1,jp_tem) + rt0 ) * zfr_l(:,:)   
+            SELECT CASE( sn_snd_temp%clcat )
+            CASE( 'yes' )   
+               ztmp3(:,:,1:jpl) = tn_ice(:,:,1:jpl) * a_i(:,:,1:jpl)
+            CASE( 'no' )
+               ztmp3(:,:,:) = 0.0
+               DO jl=1,jpl
+                  ztmp3(:,:,1) = ztmp3(:,:,1) + tn_ice(:,:,jl) * a_i(:,:,jl)
+               ENDDO
+            CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%clcat' )
+            END SELECT
+         CASE( 'mixed oce-ice'        )   
+            ztmp1(:,:) = ( tsn(:,:,1,jp_tem) + rt0 ) * zfr_l(:,:) 
+            DO jl=1,jpl
+               ztmp1(:,:) = ztmp1(:,:) + tn_ice(:,:,jl) * a_i(:,:,jl)
+            ENDDO
+         CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%cldes' )
+         END SELECT
+         IF( ssnd(jps_toce)%laction )   CALL cpl_prism_snd( jps_toce, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info )
+         IF( ssnd(jps_tice)%laction )   CALL cpl_prism_snd( jps_tice, isec, ztmp3, info )
+         IF( ssnd(jps_tmix)%laction )   CALL cpl_prism_snd( jps_tmix, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info )
+      ENDIF
+      !
+      !                                                      ! ------------------------- !
+      !                                                      !           Albedo          !
+      !                                                      ! ------------------------- !
+      IF( ssnd(jps_albice)%laction ) THEN                         ! ice 
+         ztmp3(:,:,1:jpl) = alb_ice(:,:,1:jpl) * a_i(:,:,1:jpl)
+         CALL cpl_prism_snd( jps_albice, isec, ztmp3, info )
+      ENDIF
+      IF( ssnd(jps_albmix)%laction ) THEN                         ! mixed ice-ocean
+         ztmp1(:,:) = albedo_oce_mix(:,:) * zfr_l(:,:)
+         DO jl=1,jpl
+            ztmp1(:,:) = ztmp1(:,:) + alb_ice(:,:,jl) * a_i(:,:,jl)
+         ENDDO
+         CALL cpl_prism_snd( jps_albmix, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info )
+      ENDIF
+      !                                                      ! ------------------------- !
+      !                                                      !  Ice fraction & Thickness ! 
+      !                                                      ! ------------------------- !
+      ! Send ice fraction field 
+      IF( ssnd(jps_fice)%laction ) THEN
+         SELECT CASE( sn_snd_thick%clcat )
+         CASE( 'yes' )   ;   ztmp3(:,:,1:jpl) =  a_i(:,:,1:jpl)
+         CASE( 'no'  )   ;   ztmp3(:,:,1    ) = fr_i(:,:      )
+         CASE default    ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' )
+         END SELECT
+         CALL cpl_prism_snd( jps_fice, isec, ztmp3, info )
+      ENDIF
+
+      ! Send ice and snow thickness field 
+      IF( ssnd(jps_hice)%laction .OR. ssnd(jps_hsnw)%laction ) THEN 
+         SELECT CASE( sn_snd_thick%cldes)
+         CASE( 'none'                  )       ! nothing to do
+         CASE( 'weighted ice and snow' )   
+            SELECT CASE( sn_snd_thick%clcat )
+            CASE( 'yes' )   
+               ztmp3(:,:,1:jpl) =  ht_i(:,:,1:jpl) * a_i(:,:,1:jpl)
+               ztmp4(:,:,1:jpl) =  ht_s(:,:,1:jpl) * a_i(:,:,1:jpl)
+            CASE( 'no' )
+               ztmp3(:,:,:) = 0.0   ;  ztmp4(:,:,:) = 0.0
+               DO jl=1,jpl
+                  ztmp3(:,:,1) = ztmp3(:,:,1) + ht_i(:,:,jl) * a_i(:,:,jl)
+                  ztmp4(:,:,1) = ztmp4(:,:,1) + ht_s(:,:,jl) * a_i(:,:,jl)
+               ENDDO
+            CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%clcat' )
+            END SELECT
+         CASE( 'ice and snow'         )   
+            ztmp3(:,:,1:jpl) = ht_i(:,:,1:jpl)
+            ztmp4(:,:,1:jpl) = ht_s(:,:,1:jpl)
+         CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_thick%cldes' )
+         END SELECT
+         IF( ssnd(jps_hice)%laction )   CALL cpl_prism_snd( jps_hice, isec, ztmp3, info )
+         IF( ssnd(jps_hsnw)%laction )   CALL cpl_prism_snd( jps_hsnw, isec, ztmp4, info )
+      ENDIF
+      !
+#if defined key_cpl_carbon_cycle
+      !                                                      ! ------------------------- !
+      !                                                      !  CO2 flux from PISCES     ! 
+      !                                                      ! ------------------------- !
+      IF( ssnd(jps_co2)%laction )   CALL cpl_prism_snd( jps_co2, isec, RESHAPE ( oce_co2, (/jpi,jpj,1/) ) , info )
+      !
+#endif
+      !                                                      ! ------------------------- !
+      IF( ssnd(jps_ocx1)%laction ) THEN                      !      Surface current      !
+         !                                                   ! ------------------------- !
+         !    
+         !                                                  j+1   j     -----V---F
+         ! surface velocity always sent from T point                     !       |
+         !                                                        j      |   T   U
+         !                                                               |       |
+         !                                                   j    j-1   -I-------|
+         !                                               (for I)         |       |
+         !                                                              i-1  i   i
+         !                                                               i      i+1 (for I)
+         SELECT CASE( TRIM( sn_snd_crt%cldes ) )
+         CASE( 'oce only'             )      ! C-grid ==> T
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zotx1(ji,jj) = 0.5 * ( un(ji,jj,1) + un(ji-1,jj  ,1) )
+                  zoty1(ji,jj) = 0.5 * ( vn(ji,jj,1) + vn(ji  ,jj-1,1) ) 
+               END DO
+            END DO
+         CASE( 'weighted oce and ice' )   
+            SELECT CASE ( cp_ice_msh )
+            CASE( 'C' )                      ! Ocean and Ice on C-grid ==> T
+               DO jj = 2, jpjm1
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     zotx1(ji,jj) = 0.5 * ( un   (ji,jj,1) + un   (ji-1,jj  ,1) ) * zfr_l(ji,jj)  
+                     zoty1(ji,jj) = 0.5 * ( vn   (ji,jj,1) + vn   (ji  ,jj-1,1) ) * zfr_l(ji,jj)
+                     zitx1(ji,jj) = 0.5 * ( u_ice(ji,jj  ) + u_ice(ji-1,jj    ) ) *  fr_i(ji,jj)
+                     zity1(ji,jj) = 0.5 * ( v_ice(ji,jj  ) + v_ice(ji  ,jj-1  ) ) *  fr_i(ji,jj)
+                  END DO
+               END DO
+            CASE( 'I' )                      ! Ocean on C grid, Ice on I-point (B-grid) ==> T
+               DO jj = 2, jpjm1
+                  DO ji = 2, jpim1   ! NO vector opt.
+                     zotx1(ji,jj) = 0.5  * ( un(ji,jj,1)      + un(ji-1,jj  ,1) ) * zfr_l(ji,jj)  
+                     zoty1(ji,jj) = 0.5  * ( vn(ji,jj,1)      + vn(ji  ,jj-1,1) ) * zfr_l(ji,jj)  
+                     zitx1(ji,jj) = 0.25 * ( u_ice(ji+1,jj+1) + u_ice(ji,jj+1)                     &
+                        &                  + u_ice(ji+1,jj  ) + u_ice(ji,jj  )  ) *  fr_i(ji,jj)
+                     zity1(ji,jj) = 0.25 * ( v_ice(ji+1,jj+1) + v_ice(ji,jj+1)                     &
+                        &                  + v_ice(ji+1,jj  ) + v_ice(ji,jj  )  ) *  fr_i(ji,jj)
+                  END DO
+               END DO
+            CASE( 'F' )                      ! Ocean on C grid, Ice on F-point (B-grid) ==> T
+               DO jj = 2, jpjm1
+                  DO ji = 2, jpim1   ! NO vector opt.
+                     zotx1(ji,jj) = 0.5  * ( un(ji,jj,1)      + un(ji-1,jj  ,1) ) * zfr_l(ji,jj)  
+                     zoty1(ji,jj) = 0.5  * ( vn(ji,jj,1)      + vn(ji  ,jj-1,1) ) * zfr_l(ji,jj)  
+                     zitx1(ji,jj) = 0.25 * ( u_ice(ji-1,jj-1) + u_ice(ji,jj-1)                     &
+                        &                  + u_ice(ji-1,jj  ) + u_ice(ji,jj  )  ) *  fr_i(ji,jj)
+                     zity1(ji,jj) = 0.25 * ( v_ice(ji-1,jj-1) + v_ice(ji,jj-1)                     &
+                        &                  + v_ice(ji-1,jj  ) + v_ice(ji,jj  )  ) *  fr_i(ji,jj)
+                  END DO
+               END DO
+            END SELECT
+            CALL lbc_lnk( zitx1, 'T', -1. )   ;   CALL lbc_lnk( zity1, 'T', -1. )
+         CASE( 'mixed oce-ice'        )
+            SELECT CASE ( cp_ice_msh )
+            CASE( 'C' )                      ! Ocean and Ice on C-grid ==> T
+               DO jj = 2, jpjm1
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     zotx1(ji,jj) = 0.5 * ( un   (ji,jj,1) + un   (ji-1,jj  ,1) ) * zfr_l(ji,jj)   &
+                        &         + 0.5 * ( u_ice(ji,jj  ) + u_ice(ji-1,jj    ) ) *  fr_i(ji,jj)
+                     zoty1(ji,jj) = 0.5 * ( vn   (ji,jj,1) + vn   (ji  ,jj-1,1) ) * zfr_l(ji,jj)   &
+                        &         + 0.5 * ( v_ice(ji,jj  ) + v_ice(ji  ,jj-1  ) ) *  fr_i(ji,jj)
+                  END DO
+               END DO
+            CASE( 'I' )                      ! Ocean on C grid, Ice on I-point (B-grid) ==> T
+               DO jj = 2, jpjm1
+                  DO ji = 2, jpim1   ! NO vector opt.
+                     zotx1(ji,jj) = 0.5  * ( un(ji,jj,1)      + un(ji-1,jj  ,1) ) * zfr_l(ji,jj)   &   
+                        &         + 0.25 * ( u_ice(ji+1,jj+1) + u_ice(ji,jj+1)                     &
+                        &                  + u_ice(ji+1,jj  ) + u_ice(ji,jj  )  ) *  fr_i(ji,jj)
+                     zoty1(ji,jj) = 0.5  * ( vn(ji,jj,1)      + vn(ji  ,jj-1,1) ) * zfr_l(ji,jj)   & 
+                        &         + 0.25 * ( v_ice(ji+1,jj+1) + v_ice(ji,jj+1)                     &
+                        &                  + v_ice(ji+1,jj  ) + v_ice(ji,jj  )  ) *  fr_i(ji,jj)
+                  END DO
+               END DO
+            CASE( 'F' )                      ! Ocean on C grid, Ice on F-point (B-grid) ==> T
+               DO jj = 2, jpjm1
+                  DO ji = 2, jpim1   ! NO vector opt.
+                     zotx1(ji,jj) = 0.5  * ( un(ji,jj,1)      + un(ji-1,jj  ,1) ) * zfr_l(ji,jj)   &   
+                        &         + 0.25 * ( u_ice(ji-1,jj-1) + u_ice(ji,jj-1)                     &
+                        &                  + u_ice(ji-1,jj  ) + u_ice(ji,jj  )  ) *  fr_i(ji,jj)
+                     zoty1(ji,jj) = 0.5  * ( vn(ji,jj,1)      + vn(ji  ,jj-1,1) ) * zfr_l(ji,jj)   & 
+                        &         + 0.25 * ( v_ice(ji-1,jj-1) + v_ice(ji,jj-1)                     &
+                        &                  + v_ice(ji-1,jj  ) + v_ice(ji,jj  )  ) *  fr_i(ji,jj)
+                  END DO
+               END DO
+            END SELECT
+         END SELECT
+         CALL lbc_lnk( zotx1, ssnd(jps_ocx1)%clgrid, -1. )   ;   CALL lbc_lnk( zoty1, ssnd(jps_ocy1)%clgrid, -1. )
+         !
+         !
+         IF( TRIM( sn_snd_crt%clvor ) == 'eastward-northward' ) THEN             ! Rotation of the components
+            !                                                                     ! Ocean component
+            CALL rot_rep( zotx1, zoty1, ssnd(jps_ocx1)%clgrid, 'ij->e', ztmp1 )       ! 1st component 
+            CALL rot_rep( zotx1, zoty1, ssnd(jps_ocx1)%clgrid, 'ij->n', ztmp2 )       ! 2nd component 
+            zotx1(:,:) = ztmp1(:,:)                                                   ! overwrite the components 
+            zoty1(:,:) = ztmp2(:,:)
+            IF( ssnd(jps_ivx1)%laction ) THEN                                     ! Ice component
+               CALL rot_rep( zitx1, zity1, ssnd(jps_ivx1)%clgrid, 'ij->e', ztmp1 )    ! 1st component 
+               CALL rot_rep( zitx1, zity1, ssnd(jps_ivx1)%clgrid, 'ij->n', ztmp2 )    ! 2nd component 
+               zitx1(:,:) = ztmp1(:,:)                                                ! overwrite the components 
+               zity1(:,:) = ztmp2(:,:)
+            ENDIF
+         ENDIF
+         !
+         ! spherical coordinates to cartesian -> 2 components to 3 components
+         IF( TRIM( sn_snd_crt%clvref ) == 'cartesian' ) THEN
+            ztmp1(:,:) = zotx1(:,:)                     ! ocean currents
+            ztmp2(:,:) = zoty1(:,:)
+            CALL oce2geo ( ztmp1, ztmp2, 'T', zotx1, zoty1, zotz1 )
+            !
+            IF( ssnd(jps_ivx1)%laction ) THEN           ! ice velocities
+               ztmp1(:,:) = zitx1(:,:)
+               ztmp1(:,:) = zity1(:,:)
+               CALL oce2geo ( ztmp1, ztmp2, 'T', zitx1, zity1, zitz1 )
+            ENDIF
+         ENDIF
+         !
+         IF( ssnd(jps_ocx1)%laction )   CALL cpl_prism_snd( jps_ocx1, isec, RESHAPE ( zotx1, (/jpi,jpj,1/) ), info )   ! ocean x current 1st grid
+         IF( ssnd(jps_ocy1)%laction )   CALL cpl_prism_snd( jps_ocy1, isec, RESHAPE ( zoty1, (/jpi,jpj,1/) ), info )   ! ocean y current 1st grid
+         IF( ssnd(jps_ocz1)%laction )   CALL cpl_prism_snd( jps_ocz1, isec, RESHAPE ( zotz1, (/jpi,jpj,1/) ), info )   ! ocean z current 1st grid
+         !
+         IF( ssnd(jps_ivx1)%laction )   CALL cpl_prism_snd( jps_ivx1, isec, RESHAPE ( zitx1, (/jpi,jpj,1/) ), info )   ! ice   x current 1st grid
+         IF( ssnd(jps_ivy1)%laction )   CALL cpl_prism_snd( jps_ivy1, isec, RESHAPE ( zity1, (/jpi,jpj,1/) ), info )   ! ice   y current 1st grid
+         IF( ssnd(jps_ivz1)%laction )   CALL cpl_prism_snd( jps_ivz1, isec, RESHAPE ( zitz1, (/jpi,jpj,1/) ), info )   ! ice   z current 1st grid
+         ! 
+      ENDIF
+      !
+      CALL wrk_dealloc( jpi,jpj, zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 )
+      CALL wrk_dealloc( jpi,jpj,jpl, ztmp3, ztmp4 )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('sbc_cpl_snd')
+      !
+   END SUBROUTINE sbc_cpl_snd
+   
+#else
+   !!----------------------------------------------------------------------
+   !!   Dummy module                                            NO coupling
+   !!----------------------------------------------------------------------
+   USE par_kind        ! kind definition
+CONTAINS
+   SUBROUTINE sbc_cpl_snd( kt )
+      WRITE(*,*) 'sbc_cpl_snd: You should not have seen this print! error?', kt
+   END SUBROUTINE sbc_cpl_snd
+   !
+   SUBROUTINE sbc_cpl_rcv( kt, k_fsbc, k_ice )     
+      WRITE(*,*) 'sbc_cpl_snd: You should not have seen this print! error?', kt, k_fsbc, k_ice
+   END SUBROUTINE sbc_cpl_rcv
+   !
+   SUBROUTINE sbc_cpl_ice_tau( p_taui, p_tauj )     
+      REAL(wp), INTENT(out), DIMENSION(:,:) ::   p_taui   ! i- & j-components of atmos-ice stress [N/m2]
+      REAL(wp), INTENT(out), DIMENSION(:,:) ::   p_tauj   ! at I-point (B-grid) or U & V-point (C-grid)
+      p_taui(:,:) = 0.   ;   p_tauj(:,:) = 0. ! stupid definition to avoid warning message when compiling...
+      WRITE(*,*) 'sbc_cpl_snd: You should not have seen this print! error?'
+   END SUBROUTINE sbc_cpl_ice_tau
+   !
+   SUBROUTINE sbc_cpl_ice_flx( p_frld , palbi   , psst    , pist  )
+      REAL(wp), INTENT(in   ), DIMENSION(:,:  ) ::   p_frld     ! lead fraction                [0 to 1]
+      REAL(wp), INTENT(in   ), DIMENSION(:,:,:), OPTIONAL ::   palbi   ! ice albedo
+      REAL(wp), INTENT(in   ), DIMENSION(:,:  ), OPTIONAL ::   psst    ! sea surface temperature      [Celcius]
+      REAL(wp), INTENT(in   ), DIMENSION(:,:,:), OPTIONAL ::   pist    ! ice surface temperature      [Kelvin]
+      WRITE(*,*) 'sbc_cpl_snd: You should not have seen this print! error?', p_frld(1,1), palbi(1,1,1), psst(1,1), pist(1,1,1) 
+   END SUBROUTINE sbc_cpl_ice_flx
+   
+#endif
+
+   !!======================================================================
+END MODULE sbccpl
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/sbcmod.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/sbcmod.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/sbcmod.F90	(revision 2504)
@@ -0,0 +1,461 @@
+MODULE sbcmod
+   !!======================================================================
+   !!                       ***  MODULE  sbcmod  ***
+   !! Surface module :  provide to the ocean its surface boundary condition
+   !!======================================================================
+   !! History :  3.0  ! 2006-07  (G. Madec)  Original code
+   !!            3.1  ! 2008-08  (S. Masson, A. Caubel, E. Maisonnave, G. Madec) coupled interface
+   !!            3.3  ! 2010-04  (M. Leclair, G. Madec)  Forcing averaged over 2 time steps
+   !!            3.3  ! 2010-10  (S. Masson)  add diurnal cycle
+   !!            3.3  ! 2010-09  (D. Storkey) add ice boundary conditions (BDY)
+   !!             -   ! 2010-11  (G. Madec) ice-ocean stress always computed at each ocean time-step
+   !!             -   ! 2010-10  (J. Chanut, C. Bricaud, G. Madec)  add the surface pressure forcing
+   !!            3.4  ! 2011-11  (C. Harris) CICE added as an option
+   !!            3.5  ! 2012-11  (A. Coward, G. Madec) Rethink of heat, mass and salt surface fluxes
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   sbc_init       : read namsbc namelist
+   !!   sbc            : surface ocean momentum, heat and freshwater boundary conditions
+   !!----------------------------------------------------------------------
+   USE oce              ! ocean dynamics and tracers
+   USE dom_oce          ! ocean space and time domain
+   USE phycst           ! physical constants
+   USE sbc_oce          ! Surface boundary condition: ocean fields
+   USE sbc_ice          ! Surface boundary condition: ice fields
+   USE sbcdcy           ! surface boundary condition: diurnal cycle
+   USE sbcssm           ! surface boundary condition: sea-surface mean variables
+   USE sbcapr           ! surface boundary condition: atmospheric pressure
+   USE sbcana           ! surface boundary condition: analytical formulation
+   USE sbcflx           ! surface boundary condition: flux formulation
+   USE sbcblk_clio      ! surface boundary condition: bulk formulation : CLIO
+   USE sbcblk_core      ! surface boundary condition: bulk formulation : CORE
+   USE sbcblk_mfs       ! surface boundary condition: bulk formulation : MFS
+   USE sbcice_if        ! surface boundary condition: ice-if sea-ice model
+   USE sbcice_lim       ! surface boundary condition: LIM 3.0 sea-ice model
+   USE sbcice_lim_2     ! surface boundary condition: LIM 2.0 sea-ice model
+   USE sbcice_cice      ! surface boundary condition: CICE    sea-ice model
+   USE sbccpl           ! surface boundary condition: coupled florulation
+   USE cpl_oasis3, ONLY:lk_cpl      ! are we in coupled mode?
+   USE sbcssr           ! surface boundary condition: sea surface restoring
+   USE sbcrnf           ! surface boundary condition: runoffs
+   USE sbcfwb           ! surface boundary condition: freshwater budget
+   USE closea           ! closed sea
+   USE icbstp           ! Icebergs!
+
+   USE prtctl           ! Print control                    (prt_ctl routine)
+   USE iom              ! IOM library
+   USE in_out_manager   ! I/O manager
+   USE lib_mpp          ! MPP library
+   USE timing           ! Timing
+   USE sbcwave          ! Wave module
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   sbc        ! routine called by step.F90
+   PUBLIC   sbc_init   ! routine called by opa.F90
+   
+   INTEGER ::   nsbc   ! type of surface boundary condition (deduced from namsbc informations)
+      
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 4.0 , NEMO-consortium (2011) 
+   !! $Id: sbcmod.F90 4624 2014-04-28 12:09:03Z acc $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE sbc_init
+      !!---------------------------------------------------------------------
+      !!                    ***  ROUTINE sbc_init ***
+      !!
+      !! ** Purpose :   Initialisation of the ocean surface boundary computation
+      !!
+      !! ** Method  :   Read the namsbc namelist and set derived parameters
+      !!                Call init routines for all other SBC modules that have one
+      !!
+      !! ** Action  : - read namsbc parameters
+      !!              - nsbc: type of sbc
+      !!----------------------------------------------------------------------
+      INTEGER ::   icpt   ! local integer
+      !!
+      NAMELIST/namsbc/ nn_fsbc   , ln_ana    , ln_flx,  ln_blk_clio, ln_blk_core, ln_cpl,   &
+         &             ln_blk_mfs, ln_apr_dyn, nn_ice,  nn_ice_embd, ln_dm2dc   , ln_rnf,   &
+         &             ln_ssr    , nn_fwb    , ln_cdgw , ln_wave , ln_sdw, nn_lsm, cn_iceflx
+      INTEGER  ::   ios
+      !!----------------------------------------------------------------------
+
+      IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) 'sbc_init : surface boundary condition setting'
+         WRITE(numout,*) '~~~~~~~~ '
+      ENDIF
+
+      REWIND( numnam_ref )              ! Namelist namsbc in reference namelist : Surface boundary
+      READ  ( numnam_ref, namsbc, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc in reference namelist', lwp )
+
+      REWIND( numnam_cfg )              ! Namelist namsbc in configuration namelist : Parameters of the run
+      READ  ( numnam_cfg, namsbc, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc in configuration namelist', lwp )
+      IF(lwm) WRITE ( numond, namsbc )
+
+      !                          ! overwrite namelist parameter using CPP key information
+      IF( Agrif_Root() ) THEN                ! AGRIF zoom
+        IF( lk_lim2 )   nn_ice      = 2
+        IF( lk_lim3 )   nn_ice      = 3
+        IF( lk_cice )   nn_ice      = 4
+      ENDIF
+      IF( cp_cfg == 'gyre' ) THEN            ! GYRE configuration
+          ln_ana      = .TRUE.   
+          nn_ice      =   0
+      ENDIF
+     
+      IF(lwp) THEN               ! Control print
+         WRITE(numout,*) '        Namelist namsbc (partly overwritten with CPP key setting)'
+         WRITE(numout,*) '           frequency update of sbc (and ice)             nn_fsbc     = ', nn_fsbc
+         WRITE(numout,*) '           Type of sbc : '
+         WRITE(numout,*) '              analytical formulation                     ln_ana      = ', ln_ana
+         WRITE(numout,*) '              flux       formulation                     ln_flx      = ', ln_flx
+         WRITE(numout,*) '              CLIO bulk  formulation                     ln_blk_clio = ', ln_blk_clio
+         WRITE(numout,*) '              CORE bulk  formulation                     ln_blk_core = ', ln_blk_core
+         WRITE(numout,*) '              MFS  bulk  formulation                     ln_blk_mfs  = ', ln_blk_mfs
+         WRITE(numout,*) '              coupled    formulation (T if key_sbc_cpl)  ln_cpl      = ', ln_cpl
+         WRITE(numout,*) '              Flux handling over ice categories          cn_iceflx   = ', TRIM (cn_iceflx)
+         WRITE(numout,*) '           Misc. options of sbc : '
+         WRITE(numout,*) '              Patm gradient added in ocean & ice Eqs.    ln_apr_dyn  = ', ln_apr_dyn
+         WRITE(numout,*) '              ice management in the sbc (=0/1/2/3)       nn_ice      = ', nn_ice 
+         WRITE(numout,*) '              ice-ocean embedded/levitating (=0/1/2)     nn_ice_embd = ', nn_ice_embd
+         WRITE(numout,*) '              daily mean to diurnal cycle qsr            ln_dm2dc    = ', ln_dm2dc 
+         WRITE(numout,*) '              runoff / runoff mouths                     ln_rnf      = ', ln_rnf
+         WRITE(numout,*) '              Sea Surface Restoring on SST and/or SSS    ln_ssr      = ', ln_ssr
+         WRITE(numout,*) '              FreshWater Budget control  (=0/1/2)        nn_fwb      = ', nn_fwb
+         WRITE(numout,*) '              closed sea (=0/1) (set in namdom)          nn_closea   = ', nn_closea
+         WRITE(numout,*) '              n. of iterations if land-sea-mask applied  nn_lsm      = ', nn_lsm
+      ENDIF
+
+      !   Flux handling over ice categories
+#if defined key_coupled 
+      SELECT CASE ( TRIM (cn_iceflx))
+      CASE ('ave')
+         ln_iceflx_ave    = .TRUE.
+         ln_iceflx_linear = .FALSE.
+      CASE ('linear')
+         ln_iceflx_ave    = .FALSE.
+         ln_iceflx_linear = .TRUE.
+      CASE default
+         ln_iceflx_ave    = .FALSE.
+         ln_iceflx_linear = .FALSE.
+      END SELECT
+      IF(lwp) WRITE(numout,*) '              Fluxes averaged over all ice categories         ln_iceflx_ave    = ', ln_iceflx_ave
+      IF(lwp) WRITE(numout,*) '              Fluxes distributed linearly over ice categories ln_iceflx_linear = ', ln_iceflx_linear
+#endif
+      !
+#if defined key_top && ! defined key_offline
+      ltrcdm2dc = (ln_dm2dc .AND. ln_blk_core .AND. nn_ice==2)
+      IF( ltrcdm2dc )THEN
+         IF(lwp)THEN
+            WRITE(numout,*)"analytical diurnal cycle, core bulk formulation and LIM2 use: "
+            WRITE(numout,*)"Diurnal cycle on physics but not in passive tracers"
+         ENDIF
+      ENDIF
+#else 
+      ltrcdm2dc =  .FALSE.
+#endif
+
+      !
+      !                              ! allocate sbc arrays
+      IF( sbc_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_oce arrays' )
+
+      !                          ! Checks:
+      IF( .NOT. ln_rnf ) THEN                      ! no specific treatment in vicinity of river mouths 
+         ln_rnf_mouth  = .false.                      
+         IF( sbc_rnf_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_rnf arrays' )
+         nkrnf         = 0
+         rnf     (:,:) = 0.0_wp
+         rnf_b   (:,:) = 0.0_wp
+         rnfmsk  (:,:) = 0.0_wp
+         rnfmsk_z(:)   = 0.0_wp
+      ENDIF
+      IF( nn_ice == 0  )   fr_i(:,:) = 0.e0        ! no ice in the domain, ice fraction is always zero
+
+      sfx(:,:) = 0.0_wp                            ! the salt flux due to freezing/melting will be computed (i.e. will be non-zero) 
+                                                   ! only if sea-ice is present
+ 
+      fmmflx(:,:) = 0.0_wp                        ! freezing-melting array initialisation
+
+      taum(:,:) = 0.0_wp                           ! Initialise taum for use in gls in case of reduced restart
+
+      !                                            ! restartability   
+      IF( MOD( nitend - nit000 + 1, nn_fsbc) /= 0 .OR.   &
+          MOD( nstock             , nn_fsbc) /= 0 ) THEN 
+         WRITE(ctmp1,*) 'experiment length (', nitend - nit000 + 1, ') or nstock (', nstock,   &
+            &           ' is NOT a multiple of nn_fsbc (', nn_fsbc, ')'
+         CALL ctl_stop( ctmp1, 'Impossible to properly do model restart' )
+      ENDIF
+      !
+      IF( MOD( rday, REAL(nn_fsbc, wp) * rdt ) /= 0 )   &
+         &  CALL ctl_warn( 'nn_fsbc is NOT a multiple of the number of time steps in a day' )
+      !
+      IF( ( nn_ice == 2 .OR. nn_ice ==3 ) .AND. .NOT.( ln_blk_clio .OR. ln_blk_core .OR. lk_cpl ) )   &
+         &   CALL ctl_stop( 'LIM sea-ice model requires a bulk formulation or coupled configuration' )
+      IF( nn_ice == 4 .AND. .NOT.( ln_blk_core .OR. lk_cpl ) )   &
+         &   CALL ctl_stop( 'CICE sea-ice model requires ln_blk_core or lk_cpl' )
+      IF( nn_ice == 4 .AND. lk_agrif )   &
+         &   CALL ctl_stop( 'CICE sea-ice model not currently available with AGRIF' )
+      IF( ( nn_ice == 3 .OR. nn_ice == 4 ) .AND. nn_ice_embd == 0 )   &
+         &   CALL ctl_stop( 'LIM3 and CICE sea-ice models require nn_ice_embd = 1 or 2' )
+#if defined key_coupled
+      IF( ln_iceflx_ave .AND. ln_iceflx_linear ) &
+         &   CALL ctl_stop( ' ln_iceflx_ave and ln_iceflx_linear options are not compatible' )
+      IF( ( nn_ice ==3 .AND. lk_cpl) .AND. .NOT. ( ln_iceflx_ave .OR. ln_iceflx_linear ) ) &
+         &   CALL ctl_stop( ' With lim3 coupled, either ln_iceflx_ave or ln_iceflx_linear must be set to .TRUE.' )
+#endif      
+      IF( ln_dm2dc )   nday_qsr = -1   ! initialisation flag
+
+      IF( ln_dm2dc .AND. .NOT.( ln_flx .OR. ln_blk_core ) )   &
+         &   CALL ctl_stop( 'diurnal cycle into qsr field from daily values requires a flux or core-bulk formulation' )
+      
+      IF( ln_dm2dc .AND. ( ( NINT(rday) / ( nn_fsbc * NINT(rdt) ) )  < 8 ) )   &
+         &   CALL ctl_warn( 'diurnal cycle for qsr: the sampling of the diurnal cycle is too small...' )
+
+      IF ( ln_wave ) THEN
+      !Activated wave module but neither drag nor stokes drift activated
+         IF ( .NOT.(ln_cdgw .OR. ln_sdw) )   THEN
+            CALL ctl_warn( 'Ask for wave coupling but nor drag coefficient (ln_cdgw=F) neither stokes drift activated (ln_sdw=F)' )
+      !drag coefficient read from wave model definable only with mfs bulk formulae and core 
+         ELSEIF (ln_cdgw .AND. .NOT.(ln_blk_mfs .OR. ln_blk_core) )       THEN       
+             CALL ctl_stop( 'drag coefficient read from wave model definable only with mfs bulk formulae and core')
+         ENDIF
+      ELSE
+      IF ( ln_cdgw .OR. ln_sdw  )                                         & 
+         &   CALL ctl_stop('Not Activated Wave Module (ln_wave=F) but     &
+         & asked coupling with drag coefficient (ln_cdgw =T) or Stokes drift (ln_sdw=T) ')
+      ENDIF 
+      
+      !                          ! Choice of the Surface Boudary Condition (set nsbc)
+      icpt = 0
+      IF( ln_ana          ) THEN   ;   nsbc =  1   ; icpt = icpt + 1   ;   ENDIF       ! analytical      formulation
+      IF( ln_flx          ) THEN   ;   nsbc =  2   ; icpt = icpt + 1   ;   ENDIF       ! flux            formulation
+      IF( ln_blk_clio     ) THEN   ;   nsbc =  3   ; icpt = icpt + 1   ;   ENDIF       ! CLIO bulk       formulation
+      IF( ln_blk_core     ) THEN   ;   nsbc =  4   ; icpt = icpt + 1   ;   ENDIF       ! CORE bulk       formulation
+      IF( ln_blk_mfs      ) THEN   ;   nsbc =  6   ; icpt = icpt + 1   ;   ENDIF       ! MFS  bulk       formulation
+      IF( ln_cpl          ) THEN   ;   nsbc =  5   ; icpt = icpt + 1   ;   ENDIF       ! Coupled         formulation
+      IF( cp_cfg == 'gyre') THEN   ;   nsbc =  0                       ;   ENDIF       ! GYRE analytical formulation
+      IF( lk_esopa        )            nsbc = -1                                       ! esopa test, ALL formulations
+      !
+      IF( icpt /= 1 .AND. .NOT.lk_esopa ) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) '           E R R O R in setting the sbc, one and only one namelist/CPP key option '
+         WRITE(numout,*) '                     must be choosen. You choose ', icpt, ' option(s)'
+         WRITE(numout,*) '                     We stop'
+         nstop = nstop + 1
+      ENDIF
+      IF(lwp) THEN
+         WRITE(numout,*)
+         IF( nsbc == -1 )   WRITE(numout,*) '              ESOPA test All surface boundary conditions'
+         IF( nsbc ==  0 )   WRITE(numout,*) '              GYRE analytical formulation'
+         IF( nsbc ==  1 )   WRITE(numout,*) '              analytical formulation'
+         IF( nsbc ==  2 )   WRITE(numout,*) '              flux formulation'
+         IF( nsbc ==  3 )   WRITE(numout,*) '              CLIO bulk formulation'
+         IF( nsbc ==  4 )   WRITE(numout,*) '              CORE bulk formulation'
+         IF( nsbc ==  5 )   WRITE(numout,*) '              coupled formulation'
+         IF( nsbc ==  6 )   WRITE(numout,*) '              MFS Bulk formulation'
+      ENDIF
+      !
+                          CALL sbc_ssm_init               ! Sea-surface mean fields initialisation
+      !
+      IF( ln_ssr      )   CALL sbc_ssr_init               ! Sea-Surface Restoring initialisation
+      !
+      IF( nn_ice == 4 )   CALL cice_sbc_init( nsbc )      ! CICE initialisation
+      !
+#if defined key_oasis_mct
+      IF( nsbc == 5 )   CALL sbc_cpl_init (nn_ice)
+#endif
+      !
+   END SUBROUTINE sbc_init
+
+
+   SUBROUTINE sbc( kt )
+      !!---------------------------------------------------------------------
+      !!                    ***  ROUTINE sbc  ***
+      !!              
+      !! ** Purpose :   provide at each time-step the ocean surface boundary
+      !!                condition (momentum, heat and freshwater fluxes)
+      !!
+      !! ** Method  :   blah blah  to be written ????????? 
+      !!                CAUTION : never mask the surface stress field (tke sbc)
+      !!
+      !! ** Action  : - set the ocean surface boundary condition at before and now 
+      !!                time step, i.e.  
+      !!                utau_b, vtau_b, qns_b, qsr_b, emp_n, sfx_b, qrp_b, erp_b
+      !!                utau  , vtau  , qns  , qsr  , emp  , sfx  , qrp  , erp
+      !!              - updte the ice fraction : fr_i
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   kt       ! ocean time step
+      !!---------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('sbc')
+      !
+      !                                            ! ---------------------------------------- !
+      IF( kt /= nit000 ) THEN                      !          Swap of forcing fields          !
+         !                                         ! ---------------------------------------- !
+         utau_b(:,:) = utau(:,:)                         ! Swap the ocean forcing fields
+         vtau_b(:,:) = vtau(:,:)                         ! (except at nit000 where before fields
+         qns_b (:,:) = qns (:,:)                         !  are set at the end of the routine)
+         ! The 3D heat content due to qsr forcing is treated in traqsr
+         ! qsr_b (:,:) = qsr (:,:)
+         emp_b(:,:) = emp(:,:)
+         sfx_b(:,:) = sfx(:,:)
+      ENDIF
+      !                                            ! ---------------------------------------- !
+      !                                            !        forcing field computation         !
+      !                                            ! ---------------------------------------- !
+      !
+      IF( ln_apr_dyn ) CALL sbc_apr( kt )                ! atmospheric pressure provided at kt+0.5*nn_fsbc
+                                                         ! (caution called before sbc_ssm)
+      !
+      CALL sbc_ssm( kt )                                 ! ocean sea surface variables (sst_m, sss_m, ssu_m, ssv_m)
+      !                                                  ! averaged over nf_sbc time-step
+
+      IF (ln_wave) CALL sbc_wave( kt )
+                                                   !==  sbc formulation  ==!
+                                                            
+      SELECT CASE( nsbc )                                ! Compute ocean surface boundary condition
+      !                                                  ! (i.e. utau,vtau, qns, qsr, emp, sfx)
+      CASE(  0 )   ;   CALL sbc_gyre    ( kt )                    ! analytical formulation : GYRE configuration
+      CASE(  1 )   ;   CALL sbc_ana     ( kt )                    ! analytical formulation : uniform sbc
+      CASE(  2 )   ;   CALL sbc_flx     ( kt )                    ! flux formulation
+      CASE(  3 )   ;   CALL sbc_blk_clio( kt )                    ! bulk formulation : CLIO for the ocean
+      CASE(  4 )   ;   CALL sbc_blk_core( kt )                    ! bulk formulation : CORE for the ocean
+      CASE(  5 )   ;   CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! coupled formulation
+      CASE(  6 )   ;   CALL sbc_blk_mfs ( kt )                    ! bulk formulation : MFS for the ocean
+      CASE( -1 )                                
+                       CALL sbc_ana     ( kt )                    ! ESOPA, test ALL the formulations
+                       CALL sbc_gyre    ( kt )                    !
+                       CALL sbc_flx     ( kt )                    !
+                       CALL sbc_blk_clio( kt )                    !
+                       CALL sbc_blk_core( kt )                    !
+                       CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   !
+      END SELECT
+
+      !                                            !==  Misc. Options  ==!
+      
+      SELECT CASE( nn_ice )                                       ! Update heat and freshwater fluxes over sea-ice areas
+      CASE(  1 )   ;         CALL sbc_ice_if   ( kt )                ! Ice-cover climatology ("Ice-if" model)
+      CASE(  2 )   ;         CALL sbc_ice_lim_2( kt, nsbc )          ! LIM-2 ice model
+      CASE(  3 )   ;         CALL sbc_ice_lim  ( kt, nsbc )          ! LIM-3 ice model
+      !is it useful?
+      CASE(  4 )   ;         CALL sbc_ice_cice ( kt, nsbc )          ! CICE ice model
+      END SELECT                                              
+
+      IF( ln_icebergs    )   CALL icb_stp( kt )                   ! compute icebergs
+
+      IF( ln_rnf         )   CALL sbc_rnf( kt )                   ! add runoffs to fresh water fluxes
+ 
+      IF( ln_ssr         )   CALL sbc_ssr( kt )                   ! add SST/SSS damping term
+
+      IF( nn_fwb    /= 0 )   CALL sbc_fwb( kt, nn_fwb, nn_fsbc )  ! control the freshwater budget
+
+      IF( nn_closea == 1 )   CALL sbc_clo( kt )                   ! treatment of closed sea in the model domain 
+      !                                                           ! (update freshwater fluxes)
+!RBbug do not understand why see ticket 667
+      !clem-bugsal CALL lbc_lnk( emp, 'T', 1. )
+      !
+      IF( kt == nit000 ) THEN                          !   set the forcing field at nit000 - 1    !
+         !                                             ! ---------------------------------------- !
+         IF( ln_rstart .AND.    &                               !* Restart: read in restart file
+            & iom_varid( numror, 'utau_b', ldstop = .FALSE. ) > 0 ) THEN 
+            IF(lwp) WRITE(numout,*) '          nit000-1 surface forcing fields red in the restart file'
+            CALL iom_get( numror, jpdom_autoglo, 'utau_b', utau_b )   ! before i-stress  (U-point)
+            CALL iom_get( numror, jpdom_autoglo, 'vtau_b', vtau_b )   ! before j-stress  (V-point)
+            CALL iom_get( numror, jpdom_autoglo, 'qns_b' , qns_b  )   ! before non solar heat flux (T-point)
+            ! The 3D heat content due to qsr forcing is treated in traqsr
+            ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b  ) ! before     solar heat flux (T-point)
+            CALL iom_get( numror, jpdom_autoglo, 'emp_b', emp_b  )    ! before     freshwater flux (T-point)
+            ! To ensure restart capability with 3.3x/3.4 restart files    !! to be removed in v3.6
+            IF( iom_varid( numror, 'sfx_b', ldstop = .FALSE. ) > 0 ) THEN
+               CALL iom_get( numror, jpdom_autoglo, 'sfx_b', sfx_b )  ! before salt flux (T-point)
+            ELSE
+               sfx_b (:,:) = sfx(:,:)
+            ENDIF
+         ELSE                                                   !* no restart: set from nit000 values
+            IF(lwp) WRITE(numout,*) '          nit000-1 surface forcing fields set to nit000'
+            utau_b(:,:) = utau(:,:) 
+            vtau_b(:,:) = vtau(:,:)
+            qns_b (:,:) = qns (:,:)
+            emp_b (:,:) = emp(:,:)
+            sfx_b (:,:) = sfx(:,:)
+         ENDIF
+      ENDIF
+      !                                                ! ---------------------------------------- !
+      IF( lrst_oce ) THEN                              !      Write in the ocean restart file     !
+         !                                             ! ---------------------------------------- !
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'sbc : ocean surface forcing fields written in ocean restart file ',   &
+            &                    'at it= ', kt,' date= ', ndastp
+         IF(lwp) WRITE(numout,*) '~~~~'
+         CALL iom_rstput( kt, nitrst, numrow, 'utau_b' , utau )
+         CALL iom_rstput( kt, nitrst, numrow, 'vtau_b' , vtau )
+         CALL iom_rstput( kt, nitrst, numrow, 'qns_b'  , qns  )
+         ! The 3D heat content due to qsr forcing is treated in traqsr
+         ! CALL iom_rstput( kt, nitrst, numrow, 'qsr_b'  , qsr  )
+         CALL iom_rstput( kt, nitrst, numrow, 'emp_b'  , emp  )
+         CALL iom_rstput( kt, nitrst, numrow, 'sfx_b' , sfx )
+      ENDIF
+
+      !                                                ! ---------------------------------------- !
+      !                                                !        Outputs and control print         !
+      !                                                ! ---------------------------------------- !
+      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN
+         CALL iom_put( "empmr" , emp  - rnf )                   ! upward water flux
+         CALL iom_put( "saltflx", sfx  )                        ! downward salt flux  
+                                                                ! (includes virtual salt flux beneath ice 
+                                                                ! in linear free surface case)
+         CALL iom_put( "fmmflx", fmmflx  )                      ! Freezing-melting water flux
+         CALL iom_put( "qt"    , qns  + qsr )                   ! total heat flux 
+         CALL iom_put( "qns"   , qns        )                   ! solar heat flux
+         CALL iom_put( "qsr"   ,       qsr  )                   ! solar heat flux
+         IF( nn_ice > 0 )   CALL iom_put( "ice_cover", fr_i )   ! ice fraction 
+      ENDIF
+      !
+      CALL iom_put( "utau", utau )   ! i-wind stress   (stress can be updated at 
+      CALL iom_put( "vtau", vtau )   ! j-wind stress    each time step in sea-ice)
+      CALL iom_put( "taum", taum )   ! wind stress module 
+      CALL iom_put( "wspd", wndm )   ! wind speed  module 
+      !
+      IF(ln_ctl) THEN         ! print mean trends (used for debugging)
+         CALL prt_ctl(tab2d_1=fr_i             , clinfo1=' fr_i     - : ', mask1=tmask, ovlap=1 )
+         CALL prt_ctl(tab2d_1=(emp-rnf)        , clinfo1=' emp-rnf  - : ', mask1=tmask, ovlap=1 )
+         CALL prt_ctl(tab2d_1=(sfx-rnf)        , clinfo1=' sfx-rnf  - : ', mask1=tmask, ovlap=1 )
+         CALL prt_ctl(tab2d_1=qns              , clinfo1=' qns      - : ', mask1=tmask, ovlap=1 )
+         CALL prt_ctl(tab2d_1=qsr              , clinfo1=' qsr      - : ', mask1=tmask, ovlap=1 )
+         CALL prt_ctl(tab3d_1=tmask            , clinfo1=' tmask    - : ', mask1=tmask, ovlap=1, kdim=jpk )
+         CALL prt_ctl(tab3d_1=tsn(:,:,:,jp_tem), clinfo1=' sst      - : ', mask1=tmask, ovlap=1, kdim=1   )
+         CALL prt_ctl(tab3d_1=tsn(:,:,:,jp_sal), clinfo1=' sss      - : ', mask1=tmask, ovlap=1, kdim=1   )
+         CALL prt_ctl(tab2d_1=utau             , clinfo1=' utau     - : ', mask1=umask,                      &
+            &         tab2d_2=vtau             , clinfo2=' vtau     - : ', mask2=vmask, ovlap=1 )
+      ENDIF
+
+      IF( kt == nitend )   CALL sbc_final         ! Close down surface module if necessary
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('sbc')
+      !
+   END SUBROUTINE sbc
+
+
+   SUBROUTINE sbc_final
+      !!---------------------------------------------------------------------
+      !!                    ***  ROUTINE sbc_final  ***
+      !!
+      !! ** Purpose :   Finalize CICE (if used)
+      !!---------------------------------------------------------------------
+      !
+      IF( nn_ice == 4 )   CALL cice_sbc_final
+      !
+   END SUBROUTINE sbc_final
+
+   !!======================================================================
+END MODULE sbcmod
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/step_oce.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/step_oce.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/step_oce.F90	(revision 2504)
@@ -0,0 +1,126 @@
+MODULE step_oce
+   !!======================================================================
+   !!                       ***  MODULE step_oce  ***
+   !! Ocean time-stepping : module used in both initialisation phase and time stepping
+   !!======================================================================
+   !! History :   3.3  ! 2010-08  (C. Ethe)  Original code - reorganisation of the initial phase
+   !!----------------------------------------------------------------------
+   USE oce              ! ocean dynamics and tracers variables
+   USE dom_oce          ! ocean space and time domain variables
+   USE zdf_oce          ! ocean vertical physics variables
+   USE ldftra_oce       ! ocean tracer   - trends
+   USE ldfdyn_oce       ! ocean dynamics - trends
+   USE divcur           ! hor. divergence and curl      (div & cur routines)
+   USE in_out_manager   ! I/O manager
+   USE iom              !
+   USE lbclnk
+   USE restart          ! restart
+#if defined key_iomput
+   USE xios
+#endif
+
+   USE daymod           ! calendar                         (day     routine)
+
+   USE sbcmod           ! surface boundary condition       (sbc     routine)
+   USE sbcrnf           ! surface boundary condition: runoff variables
+   USE sbccpl           ! surface boundary condition: coupled formulation (call send at end of step)
+   USE cpl_oasis3, ONLY : lk_cpl
+   USE sbctide          ! Tide initialisation
+
+   USE traqsr           ! solar radiation penetration      (tra_qsr routine)
+   USE trasbc           ! surface boundary condition       (tra_sbc routine)
+   USE trabbc           ! bottom boundary condition        (tra_bbc routine)
+   USE trabbl           ! bottom boundary layer            (tra_bbl routine)
+   USE tradmp           ! internal damping                 (tra_dmp routine)
+   USE traadv           ! advection scheme control     (tra_adv_ctl routine)
+   USE traldf           ! lateral mixing                   (tra_ldf routine)
+   !   zdfkpp           ! KPP non-local tracer fluxes      (tra_kpp routine)
+   USE trazdf           ! vertical mixing                  (tra_zdf routine)
+   USE tranxt           ! time-stepping                    (tra_nxt routine)
+   USE tranpc           ! non-penetrative convection       (tra_npc routine)
+
+   USE eosbn2           ! equation of state                (eos_bn2 routine)
+
+   USE dynadv           ! advection                        (dyn_adv routine)
+   USE dynbfr           ! Bottom friction terms            (dyn_bfr routine)
+   USE dynvor           ! vorticity term                   (dyn_vor routine)
+   USE dynhpg           ! hydrostatic pressure grad.       (dyn_hpg routine)
+   USE dynldf           ! lateral momentum diffusion       (dyn_ldf routine)
+   USE dynzdf           ! vertical diffusion               (dyn_zdf routine)
+   USE dynspg_oce       ! surface pressure gradient        (dyn_spg routine)
+   USE dynspg           ! surface pressure gradient        (dyn_spg routine)
+   USE dynnept          ! simp. form of Neptune effect(dyn_nept_cor routine)
+
+   USE dynnxt           ! time-stepping                    (dyn_nxt routine)
+
+   USE bdy_par          ! for lk_bdy
+   USE bdy_oce          ! for dmp logical
+   USE bdydta           ! open boundary condition data     (bdy_dta routine)
+   USE bdytra           ! bdy cond. for tracers            (bdy_tra routine)
+   USE bdydyn3d         ! bdy cond. for baroclinic vel.  (bdy_dyn3d routine)
+
+   USE sshwzv           ! vertical velocity and ssh        (ssh_nxt routine)
+   !                                                       (ssh_swp routine)
+   !                                                       (wzv     routine)
+   USE domvvl           ! variable vertical scale factors  (dom_vvl_sf_nxt routine)
+   !                                                       (dom_vvl_sf_swp routine)
+
+   USE ldfslp           ! iso-neutral slopes               (ldf_slp routine)
+   USE ldfeiv           ! eddy induced velocity coef.      (ldf_eiv routine)
+   USE ldftra_smag      ! Smagirinsky diffusion            (ldftra_smag routine)
+   USE ldfdyn_smag      ! Smagorinsky viscosity            (ldfdyn_smag routine) 
+
+   USE zdftmx           ! tide-induced vertical mixing     (zdf_tmx routine)
+   USE zdfbfr           ! bottom friction                  (zdf_bfr routine)
+   USE zdftke           ! TKE vertical mixing              (zdf_tke routine)
+   USE zdfgls           ! GLS vertical mixing              (zdf_gls routine)
+   USE zdfkpp           ! KPP vertical mixing              (zdf_kpp routine)
+   USE zdfddm           ! double diffusion mixing          (zdf_ddm routine)
+   USE zdfevd           ! enhanced vertical diffusion      (zdf_evd routine)
+   USE zdfric           ! Richardson vertical mixing       (zdf_ric routine)
+   USE zdfmxl           ! Mixed-layer depth                (zdf_mxl routine)
+
+   USE zpshde           ! partial step: hor. derivative     (zps_hde routine)
+
+   USE diawri           ! Standard run outputs             (dia_wri routine)
+   USE trdicp           ! Ocean momentum/tracers trends    (trd_wri routine)
+   USE trdmld           ! mixed-layer trends               (trd_mld routine)
+   USE trdmld_rst       ! restart for mixed-layer trends
+   USE trdmod_oce       ! ocean momentum/tracers trends
+   USE trdmod           ! momentum/tracers trends
+   USE trdvor           ! vorticity budget                 (trd_vor routine)
+   USE diaptr_oce       ! poleward transports variables
+   USE diaptr           ! poleward transports              (dia_ptr routine)
+   USE diadct           ! sections transports              (dia_dct routine)
+   USE diaar5           ! AR5 diagnosics                   (dia_ar5 routine)
+   USE diahth           ! thermocline depth                (dia_hth routine)
+   USE diafwb           ! freshwater budget                (dia_fwb routine)
+   USE diahsb           ! heat, salt and volume budgets    (dia_hsb routine)
+   USE diaharm
+   USE flo_oce          ! floats variables
+   USE floats           ! floats computation               (flo_stp routine)
+
+   USE crsfld           ! Standard output on coarse grid   (crs_fld routine)
+
+   USE asminc           ! assimilation increments      (tra_asm_inc routine)
+   !                                                   (dyn_asm_inc routine)
+   USE asmbkg
+   USE stpctl           ! time stepping control            (stp_ctl routine)
+   USE prtctl           ! Print control                    (prt_ctl routine)
+
+   USE diaobs           ! Observation operator
+
+   USE timing           ! Timing
+
+#if defined key_agrif
+   USE agrif_opa_sponge ! Momemtum and tracers sponges
+#endif
+#if defined key_top
+   USE trcstp           ! passive tracer time-stepping      (trc_stp routine)
+#endif
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: step_oce.F90 4328 2013-12-06 10:25:13Z davestorkey $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!======================================================================
+END MODULE step_oce
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_cen2.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_cen2.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_cen2.F90	(revision 2504)
@@ -0,0 +1,357 @@
+MODULE traadv_cen2
+   !!======================================================================
+   !!                     ***  MODULE  traadv_cen2  ***
+   !! Ocean  tracers:  horizontal & vertical advective trend
+   !!======================================================================
+   !! History :  8.2  ! 2001-08  (G. Madec, E. Durand)  trahad+trazad=traadv 
+   !!            1.0  ! 2002-06  (G. Madec)  F90: Free form and module
+   !!            9.0  ! 2004-08  (C. Talandier) New trends organization
+   !!             -   ! 2005-11  (V. Garnier) Surface pressure gradient organization
+   !!            2.0  ! 2006-04  (R. Benshila, G. Madec) Step reorganization
+   !!             -   ! 2006-07  (G. madec)  add ups_orca_set routine
+   !!            3.2  ! 2009-07  (G. Madec) add avmb, avtb in restart for cen2 advection
+   !!            3.3  ! 2010-05  (C. Ethe, G. Madec)  merge TRC-TRA + switch from velocity to transport
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   tra_adv_cen2 : update the tracer trend with the advection trends using a 2nd order centered scheme
+   !!   ups_orca_set : allow mixed upstream/centered scheme in specific area (set for orca 2 and 4 only)
+   !!----------------------------------------------------------------------
+   USE oce, ONLY: tsn  ! now ocean temperature and salinity
+   USE dom_oce         ! ocean space and time domain
+   USE eosbn2          ! equation of state
+   USE trdmod_oce      ! tracers trends
+   USE trdtra          ! tracers trends
+   USE closea          ! closed sea
+   USE sbcrnf          ! river runoffs
+   USE in_out_manager  ! I/O manager
+   USE iom             ! IOM library
+   USE diaptr_oce      ! poleward transport diagnostics
+   USE zdf_oce         ! ocean vertical physics
+   USE trc_oce         ! share passive tracers/Ocean variables
+   USE lib_mpp         ! MPP library
+   USE wrk_nemo        ! Memory Allocation
+   USE timing          ! Timing
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_adv_cen2       ! routine called by step.F90
+   PUBLIC   ups_orca_set       ! routine used by traadv_cen2_jki.F90
+
+   LOGICAL  :: l_trd       ! flag to compute trends
+
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: upsmsk !: mixed upstream/centered scheme near some straits 
+   !                                                             !  and in closed seas (orca 2 and 4 configurations)
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: traadv_cen2.F90 4499 2014-02-18 15:14:31Z timgraham $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE tra_adv_cen2( kt, kit000, cdtype, pun, pvn, pwn,     &
+      &                                 ptb, ptn, pta, kjpt   ) 
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE tra_adv_cen2  ***
+      !!                 
+      !! ** Purpose :   Compute the now trend due to the advection of tracers
+      !!      and add it to the general trend of passive tracer equations.
+      !!
+      !! ** Method  :   The advection is evaluated by a second order centered
+      !!      scheme using now fields (leap-frog scheme). In specific areas
+      !!      (vicinity of major river mouths, some straits, or where tn is
+      !!      approaching the freezing point) it is mixed with an upstream
+      !!      scheme for stability reasons.
+      !!         Part 0 : compute the upstream / centered flag
+      !!                  (3D array, zind, defined at T-point (0<zind<1))
+      !!         Part I : horizontal advection
+      !!       * centered flux:
+      !!               zcenu = e2u*e3u  un  mi(ptn)
+      !!               zcenv = e1v*e3v  vn  mj(ptn)
+      !!       * upstream flux:
+      !!               zupsu = e2u*e3u  un  (ptb(i) or ptb(i-1) ) [un>0 or <0]
+      !!               zupsv = e1v*e3v  vn  (ptb(j) or ptb(j-1) ) [vn>0 or <0]
+      !!       * mixed upstream / centered horizontal advection scheme
+      !!               zcofi = max(zind(i+1), zind(i))
+      !!               zcofj = max(zind(j+1), zind(j))
+      !!               zwx = zcofi * zupsu + (1-zcofi) * zcenu
+      !!               zwy = zcofj * zupsv + (1-zcofj) * zcenv
+      !!       * horizontal advective trend (divergence of the fluxes)
+      !!               ztra = 1/(e1t*e2t*e3t) { di-1[zwx] + dj-1[zwy] }
+      !!       * Add this trend now to the general trend of tracer (ta,sa):
+      !!               pta = pta + ztra
+      !!       * trend diagnostic ('key_trdtra' defined): the trend is
+      !!      saved for diagnostics. The trends saved is expressed as
+      !!      Uh.gradh(T), i.e.
+      !!                     save trend = ztra + ptn divn
+      !!
+      !!         Part II : vertical advection
+      !!      For temperature (idem for salinity) the advective trend is com-
+      !!      puted as follows :
+      !!            ztra = 1/e3t dk+1[ zwz ]
+      !!      where the vertical advective flux, zwz, is given by :
+      !!            zwz = zcofk * zupst + (1-zcofk) * zcent
+      !!      with
+      !!        zupsv = upstream flux = wn * (ptb(k) or ptb(k-1) ) [wn>0 or <0]
+      !!        zcenu = centered flux = wn * mk(tn)
+      !!         The surface boundary condition is :
+      !!      variable volume (lk_vvl = T) : zero advective flux
+      !!      lin. free-surf  (lk_vvl = F) : wn(:,:,1) * ptn(:,:,1)
+      !!         Add this trend now to the general trend of tracer (ta,sa):
+      !!             pta = pta + ztra
+      !!         Trend diagnostic ('key_trdtra' defined): the trend is
+      !!      saved for diagnostics. The trends saved is expressed as :
+      !!             save trend =  w.gradz(T) = ztra - ptn divn.
+      !!
+      !! ** Action :  - update pta  with the now advective tracer trends
+      !!              - save trends if needed
+      !!----------------------------------------------------------------------
+      USE oce     , ONLY:   zwx => ua        , zwy  => va          ! (ua,va) used as 3D workspace
+      !
+      INTEGER                              , INTENT(in   ) ::   kt              ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000          ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
+      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta             ! tracer trend 
+      !
+      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
+      INTEGER  ::   ierr             ! local integer
+      REAL(wp) ::   zbtr, ztra                            ! local scalars
+      REAL(wp) ::   zfp_ui, zfp_vj, zfp_w, zcofi          !   -      -
+      REAL(wp) ::   zfm_ui, zfm_vj, zfm_w, zcofj, zcofk   !   -      -
+      REAL(wp) ::   zupsut, zcenut, zupst                 !   -      -
+      REAL(wp) ::   zupsvt, zcenvt, zcent, zice           !   -      -
+      REAL(wp), POINTER, DIMENSION(:,:  ) :: ztfreez 
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zwz, zind
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tra_adv_cen2')
+      !
+      CALL wrk_alloc( jpi, jpj, ztfreez )
+      CALL wrk_alloc( jpi, jpj, jpk, zwz, zind )
+      !
+
+      IF( kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_adv_cen2 : 2nd order centered advection scheme on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~ '
+         IF(lwp) WRITE(numout,*)
+         !
+         IF ( .NOT. ALLOCATED( upsmsk ) )  THEN
+             ALLOCATE( upsmsk(jpi,jpj), STAT=ierr )
+             IF( ierr /= 0 )   CALL ctl_stop('STOP', 'tra_adv_cen2: unable to allocate array')
+         ENDIF
+
+         !
+         upsmsk(:,:) = 0._wp                             ! not upstream by default
+         ! 
+         IF( cp_cfg == "orca" )   CALL ups_orca_set      ! set mixed Upstream/centered scheme near some straits
+         !                                               ! and in closed seas (orca2 and orca4 only)
+         IF( jp_cfg == 2 .AND. .NOT. ln_rstart ) THEN    ! Increase the background in the surface layers
+            avmb(1) = 10.  * avmb(1)      ;      avtb(1) = 10.  * avtb(1)
+            avmb(2) = 10.  * avmb(2)      ;      avtb(2) = 10.  * avtb(2)
+            avmb(3) =  5.  * avmb(3)      ;      avtb(3) =  5.  * avtb(3)
+            avmb(4) =  2.5 * avmb(4)      ;      avtb(4) =  2.5 * avtb(4)
+         ENDIF
+      ENDIF
+      !
+      l_trd = .FALSE.
+      IF( ( cdtype == 'TRA' .AND. l_trdtra ) .OR. ( cdtype == 'TRC' .AND. l_trdtrc ) )   l_trd = .TRUE.
+      !
+      ! Upstream / centered scheme indicator
+      ! ------------------------------------
+!!gm  not strickly exact : the freezing point should be computed at each ocean levels...
+!!gm  not a big deal since cen2 is no more used in global ice-ocean simulations
+      ztfreez(:,:) = tfreez( tsn(:,:,1,jp_sal) )
+      DO jk = 1, jpk
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               !                                        ! below ice covered area (if tn < "freezing"+0.1 )
+               IF( tsn(ji,jj,jk,jp_tem) <= ztfreez(ji,jj) + 0.1 ) THEN   ;   zice = 1.e0
+               ELSE                                                      ;   zice = 0.e0
+               ENDIF
+               zind(ji,jj,jk) = MAX (   &
+                  rnfmsk(ji,jj) * rnfmsk_z(jk),      &  ! near runoff mouths (& closed sea outflows)
+                  upsmsk(ji,jj)               ,      &  ! some of some straits
+                  zice                               &  ! below ice covered area (if tn < "freezing"+0.1 )
+                  &                  ) * tmask(ji,jj,jk)
+            END DO
+         END DO
+      END DO
+
+      DO jn = 1, kjpt
+         !
+         ! I. Horizontal advection
+         !    ====================
+         !
+         DO jk = 1, jpkm1
+            !                        ! Second order centered tracer flux at u- and v-points
+            DO jj = 1, jpjm1
+               !
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  ! upstream indicator
+                  zcofi = MAX( zind(ji+1,jj,jk), zind(ji,jj,jk) )
+                  zcofj = MAX( zind(ji,jj+1,jk), zind(ji,jj,jk) )
+                  !
+                  ! upstream scheme
+                  zfp_ui = pun(ji,jj,jk) + ABS( pun(ji,jj,jk) )
+                  zfm_ui = pun(ji,jj,jk) - ABS( pun(ji,jj,jk) )
+                  zfp_vj = pvn(ji,jj,jk) + ABS( pvn(ji,jj,jk) )
+                  zfm_vj = pvn(ji,jj,jk) - ABS( pvn(ji,jj,jk) )
+                  zupsut = zfp_ui * ptb(ji,jj,jk,jn) + zfm_ui * ptb(ji+1,jj  ,jk,jn)
+                  zupsvt = zfp_vj * ptb(ji,jj,jk,jn) + zfm_vj * ptb(ji  ,jj+1,jk,jn)
+                  ! centered scheme
+                  zcenut = pun(ji,jj,jk) * ( ptn(ji,jj,jk,jn) + ptn(ji+1,jj  ,jk,jn) )
+                  zcenvt = pvn(ji,jj,jk) * ( ptn(ji,jj,jk,jn) + ptn(ji  ,jj+1,jk,jn) )
+                  ! mixed centered / upstream scheme
+                  zwx(ji,jj,jk) = 0.5 * ( zcofi * zupsut + (1.-zcofi) * zcenut )
+                  zwy(ji,jj,jk) = 0.5 * ( zcofj * zupsvt + (1.-zcofj) * zcenvt )
+               END DO
+            END DO
+         END DO
+
+         ! II. Vertical advection
+         !     ==================
+         !
+         !                                                ! Vertical advective fluxes
+         zwz(:,:,jpk) = 0.e0                                   ! Bottom  value : flux set to zero
+         !                                                     ! Surface value : 
+         IF( lk_vvl ) THEN   ;   zwz(:,:, 1 ) = 0.e0                         ! volume variable
+         ELSE                ;   zwz(:,:, 1 ) = pwn(:,:,1) * ptn(:,:,1,jn)   ! linear free surface 
+         ENDIF
+         !
+         DO jk = 2, jpk              ! Second order centered tracer flux at w-point
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  ! upstream indicator
+                  zcofk = MAX( zind(ji,jj,jk-1), zind(ji,jj,jk) ) 
+                  ! mixed centered / upstream scheme
+                  zfp_w = pwn(ji,jj,jk) + ABS( pwn(ji,jj,jk) )
+                  zfm_w = pwn(ji,jj,jk) - ABS( pwn(ji,jj,jk) )
+                  zupst = zfp_w * ptb(ji,jj,jk,jn) + zfm_w * ptb(ji,jj,jk-1,jn)
+                  ! centered scheme
+                  zcent = pwn(ji,jj,jk) * ( ptn(ji,jj,jk,jn) + ptn(ji,jj,jk-1,jn) )
+                  ! mixed centered / upstream scheme
+                  zwz(ji,jj,jk) = 0.5 * ( zcofk * zupst + (1.-zcofk) * zcent )
+               END DO
+            END DO
+         END DO
+
+         ! II. Divergence of advective fluxes
+         ! ----------------------------------
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) *  fse3t(ji,jj,jk) )
+                  ! advective trends
+                  ztra = - zbtr * (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
+                  &                + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  )   &
+                  &                + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1)  )
+                  ! advective trends added to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+         END DO
+
+         !                                 ! trend diagnostics (contribution of upstream fluxes)
+         IF( l_trd ) THEN
+            CALL trd_tra( kt, cdtype, jn, jptra_trd_xad, zwx, pun, ptn(:,:,:,jn) )
+            CALL trd_tra( kt, cdtype, jn, jptra_trd_yad, zwy, pvn, ptn(:,:,:,jn) )
+            CALL trd_tra( kt, cdtype, jn, jptra_trd_zad, zwz, pwn, ptn(:,:,:,jn) )
+         END IF
+         !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN  
+           IF( jn == jp_tem )  htr_adv(:) = ptr_vj( zwy(:,:,:) )
+           IF( jn == jp_sal )  str_adv(:) = ptr_vj( zwy(:,:,:) )
+         ENDIF
+         !
+      ENDDO
+
+      ! ---------------------------  required in restart file to ensure restartability)
+      ! avmb, avtb will be read in zdfini in restart case as they are used in zdftke, kpp etc...
+      IF( lrst_oce .AND. cdtype == 'TRA' ) THEN
+         CALL iom_rstput( kt, nitrst, numrow, 'avmb', avmb )
+         CALL iom_rstput( kt, nitrst, numrow, 'avtb', avtb )
+      ENDIF
+      !
+      CALL wrk_dealloc( jpi, jpj, ztfreez )
+      CALL wrk_dealloc( jpi, jpj, jpk, zwz, zind )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tra_adv_cen2')
+      !
+   END SUBROUTINE tra_adv_cen2
+   
+   
+   SUBROUTINE ups_orca_set
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE ups_orca_set  ***
+      !!       
+      !! ** Purpose :   add a portion of upstream scheme in area where the
+      !!                centered scheme generates too strong overshoot
+      !!
+      !! ** Method  :   orca (R4 and R2) confiiguration setting. Set upsmsk
+      !!                array to nozero value in some straith. 
+      !!
+      !! ** Action : - upsmsk set to 1 at some strait, 0 elsewhere for orca
+      !!----------------------------------------------------------------------
+      INTEGER  ::   ii0, ii1, ij0, ij1      ! temporary integers
+      !!----------------------------------------------------------------------
+      
+      !
+      IF( nn_timing == 1 )  CALL timing_start('ups_orca_set')
+      !
+      ! mixed upstream/centered scheme near river mouths
+      ! ------------------------------------------------
+      SELECT CASE ( jp_cfg )
+      !                                        ! =======================
+      CASE ( 4 )                               !  ORCA_R4 configuration 
+         !                                     ! =======================
+         !                                          ! Gibraltar Strait
+         ii0 =  70   ;   ii1 =  71
+         ij0 =  52   ;   ij1 =  53   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.50
+         !
+         !                                     ! =======================
+      CASE ( 2 )                               !  ORCA_R2 configuration 
+         !                                     ! =======================
+         !                                          ! Gibraltar Strait
+         ij0 = 102   ;   ij1 = 102
+         ii0 = 138   ;   ii1 = 138   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.20
+         ii0 = 139   ;   ii1 = 139   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.40
+         ii0 = 140   ;   ii1 = 140   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.50
+         ij0 = 101   ;   ij1 = 102
+         ii0 = 141   ;   ii1 = 141   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.50
+         !                                          ! Bab el Mandeb Strait
+         ij0 =  87   ;   ij1 =  88
+         ii0 = 164   ;   ii1 = 164   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.10
+         ij0 =  88   ;   ij1 =  88
+         ii0 = 163   ;   ii1 = 163   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.25
+         ii0 = 162   ;   ii1 = 162   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.40
+         ii0 = 160   ;   ii1 = 161   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.50
+         ij0 =  89   ;   ij1 =  89
+         ii0 = 158   ;   ii1 = 160   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.25
+         ij0 =  90   ;   ij1 =  90
+         ii0 = 160   ;   ii1 = 160   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.25
+         !                                          ! Sound Strait
+         ij0 = 116   ;   ij1 = 116
+         ii0 = 144   ;   ii1 = 144   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.25
+         ii0 = 145   ;   ii1 = 147   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.50
+         ii0 = 148   ;   ii1 = 148   ;   upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.25
+         !
+      END SELECT 
+      
+      ! mixed upstream/centered scheme over closed seas
+      ! -----------------------------------------------
+      CALL clo_ups( upsmsk(:,:) )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('ups_orca_set')
+      !
+   END SUBROUTINE ups_orca_set
+
+   !!======================================================================
+END MODULE traadv_cen2
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_muscl.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_muscl.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_muscl.F90	(revision 2504)
@@ -0,0 +1,307 @@
+MODULE traadv_muscl
+   !!======================================================================
+   !!                       ***  MODULE  traadv_muscl  ***
+   !! Ocean  tracers:  horizontal & vertical advective trend
+   !!======================================================================
+   !! History :       !  2000-06  (A.Estublier)  for passive tracers
+   !!                 !  2001-08  (E.Durand, G.Madec)  adapted for T & S
+   !!   NEMO     1.0  !  2002-06  (G. Madec)  F90: Free form and module
+   !!            3.2  !  2010-05  (C. Ethe, G. Madec)  merge TRC-TRA + switch from velocity to transport
+   !!            3.4  !  2012-06  (P. Oddo, M. Vichi) include the upstream where needed
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   tra_adv_muscl : update the tracer trend with the horizontal
+   !!                   and vertical advection trends using MUSCL scheme
+   !!----------------------------------------------------------------------
+   USE oce            ! ocean dynamics and active tracers
+   USE dom_oce        ! ocean space and time domain
+   USE trdmod_oce     ! tracers trends 
+   USE trdtra         ! tracers trends 
+   USE in_out_manager ! I/O manager
+   USE dynspg_oce     ! choice/control of key cpp for surface pressure gradient
+   USE trabbl         ! tracers: bottom boundary layer
+   USE lib_mpp        ! distribued memory computing
+   USE lbclnk         ! ocean lateral boundary condition (or mpp link) 
+   USE diaptr_oce         ! poleward transport diagnostics
+   USE trc_oce        ! share passive tracers/Ocean variables
+   USE wrk_nemo       ! Memory Allocation
+   USE timing         ! Timing
+   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
+   USE eosbn2          ! equation of state
+   USE sbcrnf          ! river runoffs
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_adv_muscl  ! routine called by step.F90
+
+   LOGICAL  :: l_trd                        ! flag to compute trends
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: upsmsk !: mixed upstream/centered scheme near some straits
+   !                                                             !  and in closed seas (orca 2 and 4 configurations)
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xind         !: mixed upstream/centered index
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: traadv_muscl.F90 4499 2014-02-18 15:14:31Z timgraham $ 
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE tra_adv_muscl( kt, kit000, cdtype, p2dt, pun, pvn, pwn, &
+      &                                        ptb, pta, kjpt, ld_msc_ups )
+      !!----------------------------------------------------------------------
+      !!                    ***  ROUTINE tra_adv_muscl  ***
+      !!
+      !! ** Purpose :   Compute the now trend due to total advection of T and 
+      !!      S using a MUSCL scheme (Monotone Upstream-centered Scheme for
+      !!      Conservation Laws) and add it to the general tracer trend.
+      !!
+      !! ** Method  : MUSCL scheme plus centered scheme at ocean boundaries
+      !!
+      !! ** Action  : - update (ta,sa) with the now advective tracer trends
+      !!              - save trends 
+      !!
+      !! References : Estubier, A., and M. Levy, Notes Techn. Pole de Modelisation
+      !!              IPSL, Sept. 2000 (http://www.lodyc.jussieu.fr/opa)
+      !!----------------------------------------------------------------------
+      USE oce     , ONLY:   zwx   => ua    , zwy   => va          ! (ua,va) used as workspace
+      !
+      INTEGER                              , INTENT(in   ) ::   kt              ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000          ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
+      LOGICAL                              , INTENT(in   ) ::   ld_msc_ups      ! use upstream scheme within muscl
+      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb             ! before tracer field
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta             ! tracer trend 
+
+      !
+      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
+      REAL(wp) ::   zu, z0u, zzwx, zw         ! local scalars
+      REAL(wp) ::   zv, z0v, zzwy, z0w        !   -      -
+      REAL(wp) ::   ztra, zbtr, zdt, zalpha   !   -      -
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zslpx, zslpy
+      INTEGER  ::   ierr
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tra_adv_muscl')
+      !
+      CALL wrk_alloc( jpi, jpj, jpk, zslpx, zslpy )
+      !
+
+      IF( kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_adv : MUSCL advection scheme on ', cdtype
+         IF(lwp) WRITE(numout,*) '        : mixed up-stream           ', ld_msc_ups
+         IF(lwp) WRITE(numout,*) '~~~~~~~'
+         IF(lwp) WRITE(numout,*)
+         !
+         !
+         IF( ld_msc_ups ) THEN
+            IF( .NOT. ALLOCATED( upsmsk ) )  THEN
+                ALLOCATE( upsmsk(jpi,jpj), STAT=ierr )
+                IF( ierr /= 0 )   CALL ctl_stop('STOP', 'tra_adv_muscl: unable to allocate upsmsk array')
+            ENDIF
+            upsmsk(:,:) = 0._wp                             ! not upstream by default
+         ENDIF
+
+         IF( .NOT. ALLOCATED( xind ) ) THEN
+             ALLOCATE( xind(jpi,jpj,jpk), STAT=ierr )
+             IF( ierr /= 0 )   CALL ctl_stop('STOP', 'tra_adv_muscl: unable to allocate zind array')
+         ENDIF
+         !
+
+         !
+         ! Upstream / centered scheme indicator
+         ! ------------------------------------
+         xind(:,:,:) = 1._wp                             ! set equal to 1 where up-stream is not needed
+         !
+         IF( ld_msc_ups )  THEN
+            DO jk = 1, jpk
+               DO jj = 1, jpj
+                  DO ji = 1, jpi
+                     xind(ji,jj,jk) = 1  - MAX (           &
+                        rnfmsk(ji,jj) * rnfmsk_z(jk),      &  ! near runoff mouths (& closed sea outflows)
+                        upsmsk(ji,jj) ) * tmask(ji,jj,jk)     ! some of some straits
+                  END DO
+               END DO
+            END DO
+         ENDIF 
+         !
+      ENDIF 
+      !
+      l_trd = .FALSE.
+      IF( ( cdtype == 'TRA' .AND. l_trdtra ) .OR. ( cdtype == 'TRC' .AND. l_trdtrc ) ) l_trd = .TRUE.
+      
+      !                                                     ! ===========
+      DO jn = 1, kjpt                                       ! tracer loop
+         !                                                  ! ===========
+         ! I. Horizontal advective fluxes
+         ! ------------------------------
+         ! first guess of the slopes
+         zwx(:,:,jpk) = 0.e0   ;   zwy(:,:,jpk) = 0.e0        ! bottom values
+         ! interior values
+         DO jk = 1, jpkm1
+            DO jj = 1, jpjm1      
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zwx(ji,jj,jk) = umask(ji,jj,jk) * ( ptb(ji+1,jj,jk,jn) - ptb(ji,jj,jk,jn) )
+                  zwy(ji,jj,jk) = vmask(ji,jj,jk) * ( ptb(ji,jj+1,jk,jn) - ptb(ji,jj,jk,jn) )
+               END DO
+           END DO
+         END DO
+         !
+         CALL lbc_lnk( zwx, 'U', -1. )                        ! lateral boundary conditions on zwx, zwy   (changed sign)
+         CALL lbc_lnk( zwy, 'V', -1. )
+         !                                             !-- Slopes of tracer
+         zslpx(:,:,jpk) = 0.e0   ;   zslpy(:,:,jpk) = 0.e0    ! bottom values
+         DO jk = 1, jpkm1                                     ! interior values
+            DO jj = 2, jpj
+               DO ji = fs_2, jpi   ! vector opt.
+                  zslpx(ji,jj,jk) =                    ( zwx(ji,jj,jk) + zwx(ji-1,jj  ,jk) )   &
+                     &            * ( 0.25 + SIGN( 0.25, zwx(ji,jj,jk) * zwx(ji-1,jj  ,jk) ) )
+                  zslpy(ji,jj,jk) =                    ( zwy(ji,jj,jk) + zwy(ji  ,jj-1,jk) )   &
+                     &            * ( 0.25 + SIGN( 0.25, zwy(ji,jj,jk) * zwy(ji  ,jj-1,jk) ) )
+               END DO
+            END DO
+         END DO
+         !
+         DO jk = 1, jpkm1                                     ! Slopes limitation
+            DO jj = 2, jpj
+               DO ji = fs_2, jpi   ! vector opt.
+                  zslpx(ji,jj,jk) = SIGN( 1., zslpx(ji,jj,jk) ) * MIN(    ABS( zslpx(ji  ,jj,jk) ),   &
+                     &                                                 2.*ABS( zwx  (ji-1,jj,jk) ),   &
+                     &                                                 2.*ABS( zwx  (ji  ,jj,jk) ) )
+                  zslpy(ji,jj,jk) = SIGN( 1., zslpy(ji,jj,jk) ) * MIN(    ABS( zslpy(ji,jj  ,jk) ),   &
+                     &                                                 2.*ABS( zwy  (ji,jj-1,jk) ),   &
+                     &                                                 2.*ABS( zwy  (ji,jj  ,jk) ) )
+               END DO
+           END DO
+         END DO             ! interior values
+
+         !                                             !-- MUSCL horizontal advective fluxes
+         DO jk = 1, jpkm1                                     ! interior values
+            zdt  = p2dt(jk)
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  ! MUSCL fluxes
+                  z0u = SIGN( 0.5, pun(ji,jj,jk) )
+                  zalpha = 0.5 - z0u
+                  zu  = z0u - 0.5 * pun(ji,jj,jk) * zdt / ( e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) )
+                  zzwx = ptb(ji+1,jj,jk,jn) + xind(ji,jj,jk) * (zu * zslpx(ji+1,jj,jk))
+                  zzwy = ptb(ji  ,jj,jk,jn) + xind(ji,jj,jk) * (zu * zslpx(ji  ,jj,jk))
+                  zwx(ji,jj,jk) = pun(ji,jj,jk) * ( zalpha * zzwx + (1.-zalpha) * zzwy )
+                  !
+                  z0v = SIGN( 0.5, pvn(ji,jj,jk) )
+                  zalpha = 0.5 - z0v
+                  zv  = z0v - 0.5 * pvn(ji,jj,jk) * zdt / ( e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  zzwx = ptb(ji,jj+1,jk,jn) + xind(ji,jj,jk) * (zv * zslpy(ji,jj+1,jk))
+                  zzwy = ptb(ji,jj  ,jk,jn) + xind(ji,jj,jk) * (zv * zslpy(ji,jj  ,jk))
+                  zwy(ji,jj,jk) = pvn(ji,jj,jk) * ( zalpha * zzwx + (1.-zalpha) * zzwy )
+               END DO
+            END DO
+         END DO
+         !                                                    ! lateral boundary conditions on zwx, zwy   (changed sign)
+         CALL lbc_lnk( zwx, 'U', -1. )   ;   CALL lbc_lnk( zwy, 'V', -1. )
+         !
+         ! Tracer flux divergence at t-point added to the general trend
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1      
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ! horizontal advective trends
+                  ztra = - zbtr * ( zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
+                  &               + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  ) )
+                  ! add it to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+           END DO
+         END DO        
+         !                                 ! trend diagnostics (contribution of upstream fluxes)
+         IF( l_trd )  THEN
+            CALL trd_tra( kt, cdtype, jn, jptra_trd_xad, zwx, pun, ptb(:,:,:,jn) )
+            CALL trd_tra( kt, cdtype, jn, jptra_trd_yad, zwy, pvn, ptb(:,:,:,jn) )
+         END IF
+         !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN  
+            IF( jn == jp_tem )  htr_adv(:) = ptr_vj( zwy(:,:,:) )
+            IF( jn == jp_sal )  str_adv(:) = ptr_vj( zwy(:,:,:) )
+         ENDIF
+
+         ! II. Vertical advective fluxes
+         ! -----------------------------
+         !                                             !-- first guess of the slopes
+         zwx (:,:, 1 ) = 0.e0    ;    zwx (:,:,jpk) = 0.e0    ! surface & bottom boundary conditions
+         DO jk = 2, jpkm1                                     ! interior values
+            zwx(:,:,jk) = tmask(:,:,jk) * ( ptb(:,:,jk-1,jn) - ptb(:,:,jk,jn) )
+         END DO
+
+         !                                             !-- Slopes of tracer
+         zslpx(:,:,1) = 0.e0                                  ! surface values
+         DO jk = 2, jpkm1                                     ! interior value
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  zslpx(ji,jj,jk) =                    ( zwx(ji,jj,jk) + zwx(ji,jj,jk+1) )   &
+                     &            * ( 0.25 + SIGN( 0.25, zwx(ji,jj,jk) * zwx(ji,jj,jk+1) ) )
+               END DO
+            END DO
+         END DO
+         !                                             !-- Slopes limitation
+         DO jk = 2, jpkm1                                     ! interior values
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  zslpx(ji,jj,jk) = SIGN( 1., zslpx(ji,jj,jk) ) * MIN(    ABS( zslpx(ji,jj,jk  ) ),   &
+                     &                                                 2.*ABS( zwx  (ji,jj,jk+1) ),   &
+                     &                                                 2.*ABS( zwx  (ji,jj,jk  ) )  )
+               END DO
+            END DO
+         END DO
+         !                                             !-- vertical advective flux
+         !                                                    ! surface values  (bottom already set to zero)
+         IF( lk_vvl ) THEN    ;   zwx(:,:, 1 ) = 0.e0                      !  variable volume
+         ELSE                 ;   zwx(:,:, 1 ) = pwn(:,:,1) * ptb(:,:,1,jn)   ! linear free surface
+         ENDIF 
+         !
+         DO jk = 1, jpkm1                                     ! interior values
+            zdt  = p2dt(jk)
+            DO jj = 2, jpjm1      
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3w(ji,jj,jk+1) )
+                  z0w = SIGN( 0.5, pwn(ji,jj,jk+1) )
+                  zalpha = 0.5 + z0w
+                  zw  = z0w - 0.5 * pwn(ji,jj,jk+1) * zdt * zbtr 
+                  zzwx = ptb(ji,jj,jk+1,jn) + xind(ji,jj,jk) * (zw * zslpx(ji,jj,jk+1))
+                  zzwy = ptb(ji,jj,jk  ,jn) + xind(ji,jj,jk) * (zw * zslpx(ji,jj,jk  ))
+                  zwx(ji,jj,jk+1) = pwn(ji,jj,jk+1) * ( zalpha * zzwx + (1.-zalpha) * zzwy )
+               END DO 
+            END DO
+         END DO
+
+         ! Compute & add the vertical advective trend
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1      
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ! vertical advective trends 
+                  ztra = - zbtr * ( zwx(ji,jj,jk) - zwx(ji,jj,jk+1) )
+                  ! add it to the general tracer trends
+                  pta(ji,jj,jk,jn) =  pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+         END DO
+         !                                 ! Save the vertical advective trends for diagnostic
+         IF( l_trd ) CALL trd_tra( kt, cdtype, jn, jptra_trd_zad, zwx, pwn, ptb(:,:,:,jn) )
+         !
+      ENDDO
+      !
+      CALL wrk_dealloc( jpi, jpj, jpk, zslpx, zslpy )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tra_adv_muscl')
+      !
+   END SUBROUTINE tra_adv_muscl
+
+   !!======================================================================
+END MODULE traadv_muscl
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_muscl2.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_muscl2.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_muscl2.F90	(revision 2504)
@@ -0,0 +1,297 @@
+MODULE traadv_muscl2
+   !!======================================================================
+   !!                       ***  MODULE  traadv_muscl2  ***
+   !! Ocean  tracers:  horizontal & vertical advective trend
+   !!======================================================================
+   !! History :  1.0  !  2002-06  (G. Madec) from traadv_muscl
+   !!            3.2  !  2010-05  (C. Ethe, G. Madec)  merge TRC-TRA + switch from velocity to transport
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   tra_adv_muscl2 : update the tracer trend with the horizontal
+   !!                    and vertical advection trends using MUSCL2 scheme
+   !!----------------------------------------------------------------------
+   USE oce             ! ocean dynamics and active tracers
+   USE dom_oce         ! ocean space and time domain
+   USE trdmod_oce      ! tracers trends 
+   USE trdtra          ! tracers trends 
+   USE in_out_manager  ! I/O manager
+   USE dynspg_oce      ! choice/control of key cpp for surface pressure gradient
+   USE trabbl          ! tracers: bottom boundary layer
+   USE lib_mpp         ! distribued memory computing
+   USE lbclnk          ! ocean lateral boundary condition (or mpp link) 
+   USE diaptr_oce          ! poleward transport diagnostics
+   USE trc_oce         ! share passive tracers/Ocean variables
+   USE wrk_nemo        ! Memory Allocation
+   USE timing          ! Timing
+   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_adv_muscl2        ! routine called by step.F90
+
+   LOGICAL  :: l_trd       ! flag to compute trends
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: traadv_muscl2.F90 4499 2014-02-18 15:14:31Z timgraham $ 
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE tra_adv_muscl2( kt, kit000, cdtype, p2dt, pun, pvn, pwn,      &
+      &                                         ptb, ptn, pta, kjpt )
+      !!----------------------------------------------------------------------
+      !!                   ***  ROUTINE tra_adv_muscl2  ***
+      !!
+      !! ** Purpose :   Compute the now trend due to total advection of T and 
+      !!      S using a MUSCL scheme (Monotone Upstream-centered Scheme for
+      !!      Conservation Laws) and add it to the general tracer trend.
+      !!
+      !! ** Method  : MUSCL scheme plus centered scheme at ocean boundaries
+      !!
+      !! ** Action  : - update (pta) with the now advective tracer trends
+      !!              - save trends 
+      !!
+      !! References : Estubier, A., and M. Levy, Notes Techn. Pole de Modelisation
+      !!              IPSL, Sept. 2000 (http://www.lodyc.jussieu.fr/opa)
+      !!----------------------------------------------------------------------
+      USE oce     , ONLY:   zwx   => ua    , zwy   => va         ! (ua,va) used as 3D workspace
+      !!
+      INTEGER                              , INTENT(in   ) ::   kt              ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000          ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
+      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before & now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta             ! tracer trend 
+      !!
+      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
+      REAL(wp) ::   zu, z0u, zzwx, zw         ! local scalars
+      REAL(wp) ::   zv, z0v, zzwy, z0w        !   -      -
+      REAL(wp) ::   ztra, zbtr, zdt, zalpha   !   -      -
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zslpx, zslpy
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tra_adv_muscl2')
+      !
+      CALL wrk_alloc( jpi, jpj, jpk, zslpx, zslpy )
+      !
+
+      IF( kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_adv_muscl2 : MUSCL2 advection scheme on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~'
+      ENDIF
+      !
+      l_trd = .FALSE.
+      IF( ( cdtype == 'TRA' .AND. l_trdtra ) .OR. ( cdtype == 'TRC' .AND. l_trdtrc ) )   l_trd = .TRUE.
+
+      !                                                          ! ===========
+      DO jn = 1, kjpt                                            ! tracer loop
+         !                                                       ! ===========
+         ! I. Horizontal advective fluxes
+         ! ------------------------------
+         ! first guess of the slopes
+         zwx(:,:,jpk) = 0.e0   ;   zwy(:,:,jpk) = 0.e0        ! bottom values
+         ! interior values
+         DO jk = 1, jpkm1
+            DO jj = 1, jpjm1      
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zwx(ji,jj,jk) = umask(ji,jj,jk) * ( ptb(ji+1,jj,jk,jn) - ptb(ji,jj,jk,jn) )
+                  zwy(ji,jj,jk) = vmask(ji,jj,jk) * ( ptb(ji,jj+1,jk,jn) - ptb(ji,jj,jk,jn) )
+               END DO
+           END DO
+         END DO
+         !
+         CALL lbc_lnk( zwx, 'U', -1. )                        ! lateral boundary conditions on zwx, zwy   (changed sign)
+         CALL lbc_lnk( zwy, 'V', -1. )
+         !                                             !-- Slopes of tracer
+         zslpx(:,:,jpk) = 0.e0   ;   zslpy(:,:,jpk) = 0.e0    ! bottom values
+         DO jk = 1, jpkm1                                     ! interior values
+            DO jj = 2, jpj
+               DO ji = fs_2, jpi   ! vector opt.
+                  zslpx(ji,jj,jk) =                    ( zwx(ji,jj,jk) + zwx(ji-1,jj  ,jk) )   &
+                     &            * ( 0.25 + SIGN( 0.25, zwx(ji,jj,jk) * zwx(ji-1,jj  ,jk) ) )
+                  zslpy(ji,jj,jk) =                    ( zwy(ji,jj,jk) + zwy(ji  ,jj-1,jk) )   &
+                     &            * ( 0.25 + SIGN( 0.25, zwy(ji,jj,jk) * zwy(ji  ,jj-1,jk) ) )
+               END DO
+            END DO
+         END DO
+         !
+         DO jk = 1, jpkm1                                     ! Slopes limitation
+            DO jj = 2, jpj
+               DO ji = fs_2, jpi   ! vector opt.
+                  zslpx(ji,jj,jk) = SIGN( 1., zslpx(ji,jj,jk) ) * MIN(    ABS( zslpx(ji  ,jj,jk) ),   &
+                     &                                                 2.*ABS( zwx  (ji-1,jj,jk) ),   &
+                     &                                                 2.*ABS( zwx  (ji  ,jj,jk) ) )
+                  zslpy(ji,jj,jk) = SIGN( 1., zslpy(ji,jj,jk) ) * MIN(    ABS( zslpy(ji,jj  ,jk) ),   &
+                     &                                                 2.*ABS( zwy  (ji,jj-1,jk) ),   &
+                     &                                                 2.*ABS( zwy  (ji,jj  ,jk) ) )
+               END DO
+           END DO
+         END DO             ! interior values
+
+        !                                             !-- MUSCL horizontal advective fluxes
+         DO jk = 1, jpkm1                                     ! interior values
+            zdt  = p2dt(jk)
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  ! MUSCL fluxes
+                  z0u = SIGN( 0.5, pun(ji,jj,jk) )
+                  zalpha = 0.5 - z0u
+                  zu  = z0u - 0.5 * pun(ji,jj,jk) * zdt / ( e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) )
+                  zzwx = ptb(ji+1,jj,jk,jn) + zu * zslpx(ji+1,jj,jk)
+                  zzwy = ptb(ji  ,jj,jk,jn) + zu * zslpx(ji  ,jj,jk)
+                  zwx(ji,jj,jk) = pun(ji,jj,jk) * ( zalpha * zzwx + (1.-zalpha) * zzwy )
+                  !
+                  z0v = SIGN( 0.5, pvn(ji,jj,jk) )
+                  zalpha = 0.5 - z0v
+                  zv  = z0v - 0.5 * pvn(ji,jj,jk) * zdt / ( e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  zzwx = ptb(ji,jj+1,jk,jn) + zv * zslpy(ji,jj+1,jk)
+                  zzwy = ptb(ji,jj  ,jk,jn) + zv * zslpy(ji,jj  ,jk)
+                  zwy(ji,jj,jk) = pvn(ji,jj,jk) * ( zalpha * zzwx + (1.-zalpha) * zzwy )
+               END DO
+            END DO
+         END DO
+
+         !!  centered scheme at lateral b.C. if off-shore velocity
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  IF( umask(ji,jj,jk) == 0. ) THEN
+                     IF( pun(ji+1,jj,jk) > 0. .AND. ji /= jpi ) THEN
+                        zwx(ji+1,jj,jk) = 0.5 * pun(ji+1,jj,jk) * ( ptn(ji+1,jj,jk,jn) + ptn(ji+2,jj,jk,jn) )
+                     ENDIF
+                     IF( pun(ji-1,jj,jk) < 0. ) THEN
+                        zwx(ji-1,jj,jk) = 0.5 * pun(ji-1,jj,jk) * ( ptn(ji-1,jj,jk,jn) + ptn(ji,jj,jk,jn) ) 
+                     ENDIF
+                  ENDIF
+                  IF( vmask(ji,jj,jk) == 0. ) THEN
+                     IF( pvn(ji,jj+1,jk) > 0. .AND. jj /= jpj ) THEN
+                        zwy(ji,jj+1,jk) = 0.5 * pvn(ji,jj+1,jk) * ( ptn(ji,jj+1,jk,jn) + ptn(ji,jj+2,jk,jn) )
+                     ENDIF
+                     IF( pvn(ji,jj-1,jk) < 0. ) THEN
+                        zwy(ji,jj-1,jk) = 0.5 * pvn(ji,jj-1,jk) * ( ptn(ji,jj-1,jk,jn) + ptn(ji,jj,jk,jn) ) 
+                     ENDIF
+                  ENDIF
+               END DO
+            END DO
+         END DO
+         CALL lbc_lnk( zwx, 'U', -1. )   ;   CALL lbc_lnk( zwy, 'V', -1. )   ! lateral boundary condition (changed sign)
+
+         ! Tracer flux divergence at t-point added to the general trend
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ! horizontal advective trends 
+                  ztra = - zbtr * ( zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
+                  &               + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  ) )
+                  ! added to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+           END DO
+         END DO
+         !                                 ! trend diagnostics (contribution of upstream fluxes)
+         IF( l_trd ) THEN
+            CALL trd_tra( kt, cdtype, jn, jptra_trd_xad, zwx, pun, ptb(:,:,:,jn) )
+            CALL trd_tra( kt, cdtype, jn, jptra_trd_yad, zwy, pvn, ptb(:,:,:,jn) )
+         END IF
+
+         !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN
+            IF( jn == jp_tem )  htr_adv(:) = ptr_vj( zwy(:,:,:) )
+            IF( jn == jp_sal )  str_adv(:) = ptr_vj( zwy(:,:,:) )
+         ENDIF
+
+         ! II. Vertical advective fluxes
+         ! -----------------------------
+         !                                             !-- first guess of the slopes
+         zwx (:,:, 1 ) = 0.e0    ;    zwx (:,:,jpk) = 0.e0    ! surface & bottom boundary conditions
+         DO jk = 2, jpkm1                                     ! interior values
+            zwx(:,:,jk) = tmask(:,:,jk) * ( ptb(:,:,jk-1,jn) - ptb(:,:,jk,jn) )
+         END DO
+
+         !                                             !-- Slopes of tracer
+         zslpx(:,:,1) = 0.e0                                  ! surface values
+         DO jk = 2, jpkm1                                     ! interior value
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  zslpx(ji,jj,jk) =                    ( zwx(ji,jj,jk) + zwx(ji,jj,jk+1) )   &
+                     &            * ( 0.25 + SIGN( 0.25, zwx(ji,jj,jk) * zwx(ji,jj,jk+1) ) )
+               END DO
+            END DO
+         END DO
+         !                                             !-- Slopes limitation
+         DO jk = 2, jpkm1                                     ! interior values
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  zslpx(ji,jj,jk) = SIGN( 1., zslpx(ji,jj,jk) ) * MIN(    ABS( zslpx(ji,jj,jk  ) ),   &
+                     &                                                 2.*ABS( zwx  (ji,jj,jk+1) ),   &
+                     &                                                 2.*ABS( zwx  (ji,jj,jk  ) )  )
+               END DO
+            END DO
+         END DO
+         !                                             !-- vertical advective flux
+         !                                                    ! surface values  (bottom already set to zero)
+         IF( lk_vvl ) THEN    ;   zwx(:,:, 1 ) = 0.e0                      !  variable volume
+         ELSE                 ;   zwx(:,:, 1 ) = pwn(:,:,1) * ptb(:,:,1,jn)   ! linear free surface
+         ENDIF
+         !
+         DO jk = 1, jpkm1                                     ! interior values
+            zdt  = p2dt(jk)
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3w(ji,jj,jk+1) )
+                  z0w = SIGN( 0.5, pwn(ji,jj,jk+1) )
+                  zalpha = 0.5 + z0w
+                  zw  = z0w - 0.5 * pwn(ji,jj,jk+1) * zdt * zbtr
+                  zzwx = ptb(ji,jj,jk+1,jn) + zw * zslpx(ji,jj,jk+1)
+                  zzwy = ptb(ji,jj,jk  ,jn) + zw * zslpx(ji,jj,jk  )
+                  zwx(ji,jj,jk+1) = pwn(ji,jj,jk+1) * ( zalpha * zzwx + (1.-zalpha) * zzwy )
+               END DO
+            END DO
+         END DO
+         !
+         DO jk = 2, jpkm1        ! centered near the bottom
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  IF( tmask(ji,jj,jk+1) == 0. ) THEN
+                     IF( pwn(ji,jj,jk) > 0. ) THEN
+                        zwx(ji,jj,jk) = 0.5 * pwn(ji,jj,jk) * ( ptn(ji,jj,jk-1,jn) + ptn(ji,jj,jk,jn) ) 
+                     ENDIF
+                  ENDIF
+               END DO
+            END DO
+         END DO
+         !
+         DO jk = 1, jpkm1        ! Compute & add the vertical advective trend
+            DO jj = 2, jpjm1      
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ! vertical advective trends 
+                  ztra = - zbtr * ( zwx(ji,jj,jk) - zwx(ji,jj,jk+1) )
+                  ! added to the general tracer trends
+                  pta(ji,jj,jk,jn) =  pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+         END DO
+         !                       ! trend diagnostics (contribution of upstream fluxes)
+         IF( l_trd )  CALL trd_tra( kt, cdtype, jn, jptra_trd_zad, zwx, pwn, ptb(:,:,:,jn) )
+         !
+      END DO
+      !
+      CALL wrk_dealloc( jpi, jpj, jpk, zslpx, zslpy )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tra_adv_muscl2')
+      !
+   END SUBROUTINE tra_adv_muscl2
+
+   !!======================================================================
+END MODULE traadv_muscl2
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_qck.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_qck.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_qck.F90	(revision 2504)
@@ -0,0 +1,485 @@
+MODULE traadv_qck
+   !!==============================================================================
+   !!                       ***  MODULE  traadv_qck  ***
+   !! Ocean tracers:  horizontal & vertical advective trend
+   !!==============================================================================
+   !! History :  3.0  !  2008-07  (G. Reffray)  Original code
+   !!            3.3  !  2010-05  (C.Ethe, G. Madec)  merge TRC-TRA + switch from velocity to transport
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   tra_adv_qck    : update the tracer trend with the horizontal advection
+   !!                    trends using a 3rd order finite difference scheme
+   !!   tra_adv_qck_i  : apply QUICK scheme in i-direction
+   !!   tra_adv_qck_j  : apply QUICK scheme in j-direction
+   !!   tra_adv_cen2_k : 2nd centered scheme for the vertical advection
+   !!----------------------------------------------------------------------
+   USE oce             ! ocean dynamics and active tracers
+   USE dom_oce         ! ocean space and time domain
+   USE trdmod_oce      ! ocean space and time domain
+   USE trdtra          ! ocean tracers trends 
+   USE trabbl          ! advective term in the BBL
+   USE lib_mpp         ! distribued memory computing
+   USE lbclnk          ! ocean lateral boundary condition (or mpp link)
+   USE dynspg_oce      ! surface pressure gradient variables
+   USE in_out_manager  ! I/O manager
+   USE diaptr_oce          ! poleward transport diagnostics
+   USE trc_oce         ! share passive tracers/Ocean variables
+   USE wrk_nemo        ! Memory Allocation
+   USE timing          ! Timing
+   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_adv_qck   ! routine called by step.F90
+
+   LOGICAL  :: l_trd           ! flag to compute trends
+   REAL(wp) :: r1_6 = 1./ 6.   ! 1/6 ratio
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: traadv_qck.F90 4499 2014-02-18 15:14:31Z timgraham $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE tra_adv_qck ( kt, kit000, cdtype, p2dt, pun, pvn, pwn,      &
+      &                                       ptb, ptn, pta, kjpt )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE tra_adv_qck  ***
+      !!
+      !! ** Purpose :   Compute the now trend due to the advection of tracers
+      !!      and add it to the general trend of passive tracer equations.
+      !!
+      !! ** Method :   The advection is evaluated by a third order scheme
+      !!             For a positive velocity u :              u(i)>0
+      !!                                          |--FU--|--FC--|--FD--|------|
+      !!                                             i-1    i      i+1   i+2
+      !!
+      !!             For a negative velocity u :              u(i)<0
+      !!                                          |------|--FD--|--FC--|--FU--|
+      !!                                             i-1    i      i+1   i+2
+      !!             where  FU is the second upwind point
+      !!                    FD is the first douwning point
+      !!                    FC is the central point (or the first upwind point)
+      !!
+      !!      Flux(i) = u(i) * { 0.5(FC+FD)  -0.5C(i)(FD-FC)  -((1-C(i))/6)(FU+FD-2FC) }
+      !!                with C(i)=|u(i)|dx(i)/dt (=Courant number)
+      !!
+      !!         dt = 2*rdtra and the scalar values are tb and sb
+      !!
+      !!       On the vertical, the simple centered scheme used ptn
+      !!
+      !!               The fluxes are bounded by the ULTIMATE limiter to
+      !!             guarantee the monotonicity of the solution and to
+      !!            prevent the appearance of spurious numerical oscillations
+      !!
+      !! ** Action : - update (pta) with the now advective tracer trends
+      !!             - save the trends 
+      !!
+      !! ** Reference : Leonard (1979, 1991)
+      !!----------------------------------------------------------------------
+      INTEGER                              , INTENT(in   ) ::   kt              ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000          ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
+      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta             ! tracer trend 
+      !!----------------------------------------------------------------------
+
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tra_adv_qck')
+      !
+      IF( kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_adv_qck : 3rd order quickest advection scheme on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
+         IF(lwp) WRITE(numout,*)
+      ENDIF
+      !
+      l_trd = .FALSE.
+      IF( ( cdtype == 'TRA' .AND. l_trdtra ) .OR. ( cdtype == 'TRC' .AND. l_trdtrc ) ) l_trd = .TRUE.
+
+      ! I. The horizontal fluxes are computed with the QUICKEST + ULTIMATE scheme
+      CALL tra_adv_qck_i( kt, cdtype, p2dt, pun, ptb, ptn, pta, kjpt ) 
+      CALL tra_adv_qck_j( kt, cdtype, p2dt, pvn, ptb, ptn, pta, kjpt ) 
+
+      ! II. The vertical fluxes are computed with the 2nd order centered scheme
+      CALL tra_adv_cen2_k( kt, cdtype, pwn,         ptn, pta, kjpt )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tra_adv_qck')
+      !
+   END SUBROUTINE tra_adv_qck
+
+
+   SUBROUTINE tra_adv_qck_i( kt, cdtype, p2dt, pun,                  &
+      &                                        ptb, ptn, pta, kjpt   )
+      !!----------------------------------------------------------------------
+      !!
+      !!----------------------------------------------------------------------
+      USE oce     , ONLY:   zwx => ua       ! ua used as workspace
+      !
+      INTEGER                              , INTENT(in   ) ::   kt         ! ocean time-step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers
+      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt       ! vertical profile of tracer time-step
+      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun        ! i-velocity components
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn   ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta        ! tracer trend 
+      !!
+      INTEGER  :: ji, jj, jk, jn   ! dummy loop indices
+      REAL(wp) :: ztra, zbtr, zdir, zdx, zdt, zmsk   ! local scalars
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zfu, zfc, zfd
+      !----------------------------------------------------------------------
+      !
+      CALL wrk_alloc( jpi, jpj, jpk, zfu, zfc, zfd )
+      !                                                          ! ===========
+      DO jn = 1, kjpt                                            ! tracer loop
+         !                                                       ! ===========
+         zfu(:,:,:) = 0.0     ;   zfc(:,:,:) = 0.0  
+         zfd(:,:,:) = 0.0     ;   zwx(:,:,:) = 0.0     
+         !                                                  
+         DO jk = 1, jpkm1                                
+            !                                             
+            !--- Computation of the ustream and downstream value of the tracer and the mask
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  ! Upstream in the x-direction for the tracer
+                  zfc(ji,jj,jk) = ptb(ji-1,jj,jk,jn)
+                  ! Downstream in the x-direction for the tracer
+                  zfd(ji,jj,jk) = ptb(ji+1,jj,jk,jn)
+               END DO
+            END DO
+         END DO
+         CALL lbc_lnk( zfc(:,:,:), 'T', 1. )   ;   CALL lbc_lnk( zfd(:,:,:), 'T', 1. )   ! Lateral boundary conditions 
+         
+         !
+         ! Horizontal advective fluxes
+         ! ---------------------------
+         !
+         DO jk = 1, jpkm1                             
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.         
+                  zdir = 0.5 + SIGN( 0.5, pun(ji,jj,jk) )   ! if pun > 0 : zdir = 1 otherwise zdir = 0 
+                  zfu(ji,jj,jk) = zdir * zfc(ji,jj,jk ) + ( 1. - zdir ) * zfd(ji+1,jj,jk)  ! FU in the x-direction for T 
+               END DO
+            END DO
+         END DO
+         !
+         DO jk = 1, jpkm1  
+            zdt =  p2dt(jk)
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.   
+                  zdir = 0.5 + SIGN( 0.5, pun(ji,jj,jk) )   ! if pun > 0 : zdir = 1 otherwise zdir = 0 
+                  zdx = ( zdir * e1t(ji,jj) + ( 1. - zdir ) * e1t(ji+1,jj) ) * e2u(ji,jj) * fse3u(ji,jj,jk)
+                  zwx(ji,jj,jk)  = ABS( pun(ji,jj,jk) ) * zdt / zdx    ! (0<zc_cfl<1 : Courant number on x-direction)
+                  zfc(ji,jj,jk)  = zdir * ptb(ji  ,jj,jk,jn) + ( 1. - zdir ) * ptb(ji+1,jj,jk,jn)  ! FC in the x-direction for T
+                  zfd(ji,jj,jk)  = zdir * ptb(ji+1,jj,jk,jn) + ( 1. - zdir ) * ptb(ji  ,jj,jk,jn)  ! FD in the x-direction for T
+               END DO
+            END DO
+         END DO 
+         !--- Lateral boundary conditions 
+         CALL lbc_lnk( zfu(:,:,:), 'T', 1. )   ;   CALL lbc_lnk( zfd(:,:,:), 'T', 1. )
+         CALL lbc_lnk( zfc(:,:,:), 'T', 1. )   ;   CALL lbc_lnk( zwx(:,:,:), 'T', 1. )
+
+         !--- QUICKEST scheme
+         CALL quickest( zfu, zfd, zfc, zwx )
+         !
+         ! Mask at the T-points in the x-direction (mask=0 or mask=1)
+         DO jk = 1, jpkm1  
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.               
+                  zfu(ji,jj,jk) = tmask(ji-1,jj,jk) + tmask(ji,jj,jk) + tmask(ji+1,jj,jk) - 2.
+               END DO
+            END DO
+         END DO
+         CALL lbc_lnk( zfu(:,:,:), 'T', 1. )      ! Lateral boundary conditions 
+
+         !
+         ! Tracer flux on the x-direction
+         DO jk = 1, jpkm1  
+            !
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.               
+                  zdir = 0.5 + SIGN( 0.5, pun(ji,jj,jk) )   ! if pun > 0 : zdir = 1 otherwise zdir = 0 
+                  !--- If the second ustream point is a land point
+                  !--- the flux is computed by the 1st order UPWIND scheme
+                  zmsk = zdir * zfu(ji,jj,jk) + ( 1. - zdir ) * zfu(ji+1,jj,jk)
+                  zwx(ji,jj,jk) = zmsk * zwx(ji,jj,jk) + ( 1. - zmsk ) * zfc(ji,jj,jk)
+                  zwx(ji,jj,jk) = zwx(ji,jj,jk) * pun(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         !
+         CALL lbc_lnk( zwx(:,:,:), 'T', 1. ) ! Lateral boundary conditions
+         !
+         ! Computation of the trend
+         DO jk = 1, jpkm1  
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.  
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ! horizontal advective trends
+                  ztra = - zbtr * ( zwx(ji,jj,jk) - zwx(ji-1,jj,jk) )
+                  !--- add it to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+         END DO
+         !                                 ! trend diagnostics (contribution of upstream fluxes)
+         IF( l_trd )  CALL trd_tra( kt, cdtype, jn, jptra_trd_xad, zwx, pun, ptn(:,:,:,jn) )
+         !
+      END DO
+      !
+      CALL wrk_dealloc( jpi, jpj, jpk, zfu, zfc, zfd )
+      !
+   END SUBROUTINE tra_adv_qck_i
+
+
+   SUBROUTINE tra_adv_qck_j( kt, cdtype, p2dt, pvn,                &
+      &                                        ptb, ptn, pta, kjpt )
+      !!----------------------------------------------------------------------
+      !!
+      !!----------------------------------------------------------------------
+      USE oce     , ONLY:   zwy => ua       ! ua used as workspace
+      !
+      INTEGER                              , INTENT(in   ) ::   kt         ! ocean time-step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers
+      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt       ! vertical profile of tracer time-step
+      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pvn        ! j-velocity components
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn   ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta        ! tracer trend 
+      !!
+      INTEGER  :: ji, jj, jk, jn   ! dummy loop indices
+      REAL(wp) :: ztra, zbtr, zdir, zdx, zdt, zmsk   ! local scalars
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zfu, zfc, zfd
+      !----------------------------------------------------------------------
+      !
+      CALL wrk_alloc( jpi, jpj, jpk, zfu, zfc, zfd )
+      !
+      !                                                          ! ===========
+      DO jn = 1, kjpt                                            ! tracer loop
+         !                                                       ! ===========
+         zfu(:,:,:) = 0.0     ;   zfc(:,:,:) = 0.0  
+         zfd(:,:,:) = 0.0     ;   zwy(:,:,:) = 0.0     
+         !                                                  
+         DO jk = 1, jpkm1                                
+            !                                             
+            !--- Computation of the ustream and downstream value of the tracer and the mask
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  ! Upstream in the x-direction for the tracer
+                  zfc(ji,jj,jk) = ptb(ji,jj-1,jk,jn)
+                  ! Downstream in the x-direction for the tracer
+                  zfd(ji,jj,jk) = ptb(ji,jj+1,jk,jn)
+               END DO
+            END DO
+         END DO
+         CALL lbc_lnk( zfc(:,:,:), 'T', 1. )   ;   CALL lbc_lnk( zfd(:,:,:), 'T', 1. )   ! Lateral boundary conditions 
+
+         
+         !
+         ! Horizontal advective fluxes
+         ! ---------------------------
+         !
+         DO jk = 1, jpkm1                             
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.         
+                  zdir = 0.5 + SIGN( 0.5, pvn(ji,jj,jk) )   ! if pun > 0 : zdir = 1 otherwise zdir = 0 
+                  zfu(ji,jj,jk) = zdir * zfc(ji,jj,jk ) + ( 1. - zdir ) * zfd(ji,jj+1,jk)  ! FU in the x-direction for T 
+               END DO
+            END DO
+         END DO
+         !
+         DO jk = 1, jpkm1  
+            zdt =  p2dt(jk)
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.   
+                  zdir = 0.5 + SIGN( 0.5, pvn(ji,jj,jk) )   ! if pun > 0 : zdir = 1 otherwise zdir = 0 
+                  zdx = ( zdir * e2t(ji,jj) + ( 1. - zdir ) * e2t(ji,jj+1) ) * e1v(ji,jj) * fse3v(ji,jj,jk)
+                  zwy(ji,jj,jk)  = ABS( pvn(ji,jj,jk) ) * zdt / zdx    ! (0<zc_cfl<1 : Courant number on x-direction)
+                  zfc(ji,jj,jk)  = zdir * ptb(ji,jj  ,jk,jn) + ( 1. - zdir ) * ptb(ji,jj+1,jk,jn)  ! FC in the x-direction for T
+                  zfd(ji,jj,jk)  = zdir * ptb(ji,jj+1,jk,jn) + ( 1. - zdir ) * ptb(ji,jj  ,jk,jn)  ! FD in the x-direction for T
+               END DO
+            END DO
+         END DO
+
+         !--- Lateral boundary conditions 
+         CALL lbc_lnk( zfu(:,:,:), 'T', 1. )      ;     CALL lbc_lnk( zfd(:,:,:), 'T', 1. )
+         CALL lbc_lnk( zfc(:,:,:), 'T', 1. )      ;     CALL lbc_lnk( zwy(:,:,:), 'T', 1. )
+
+         !--- QUICKEST scheme
+         CALL quickest( zfu, zfd, zfc, zwy )
+         !
+         ! Mask at the T-points in the x-direction (mask=0 or mask=1)
+         DO jk = 1, jpkm1  
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.               
+                  zfu(ji,jj,jk) = tmask(ji,jj-1,jk) + tmask(ji,jj,jk) + tmask(ji,jj+1,jk) - 2.
+               END DO
+            END DO
+         END DO
+         !--- Lateral boundary conditions 
+         CALL lbc_lnk( zfu(:,:,:), 'T', 1. ) 
+         !
+         ! Tracer flux on the x-direction
+         DO jk = 1, jpkm1  
+            !
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.               
+                  zdir = 0.5 + SIGN( 0.5, pvn(ji,jj,jk) )   ! if pun > 0 : zdir = 1 otherwise zdir = 0 
+                  !--- If the second ustream point is a land point
+                  !--- the flux is computed by the 1st order UPWIND scheme
+                  zmsk = zdir * zfu(ji,jj,jk) + ( 1. - zdir ) * zfu(ji,jj+1,jk)
+                  zwy(ji,jj,jk) = zmsk * zwy(ji,jj,jk) + ( 1. - zmsk ) * zfc(ji,jj,jk)
+                  zwy(ji,jj,jk) = zwy(ji,jj,jk) * pvn(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         !
+         CALL lbc_lnk( zwy(:,:,:), 'T', 1. ) ! Lateral boundary conditions
+         !
+         ! Computation of the trend
+         DO jk = 1, jpkm1  
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.  
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ! horizontal advective trends
+                  ztra = - zbtr * ( zwy(ji,jj,jk) - zwy(ji,jj-1,jk) )
+                  !--- add it to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+         END DO
+         !                                 ! trend diagnostics (contribution of upstream fluxes)
+         IF( l_trd )  CALL trd_tra( kt, cdtype, jn, jptra_trd_yad, zwy, pvn, ptn(:,:,:,jn) )
+         !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN  
+           IF( jn == jp_tem )  htr_adv(:) = ptr_vj( zwy(:,:,:) )
+           IF( jn == jp_sal )  str_adv(:) = ptr_vj( zwy(:,:,:) )
+         ENDIF
+         !
+      END DO
+      !
+      CALL wrk_dealloc( jpi, jpj, jpk, zfu, zfc, zfd )
+      !
+   END SUBROUTINE tra_adv_qck_j
+
+
+   SUBROUTINE tra_adv_cen2_k( kt, cdtype, pwn,           &
+     &                                    ptn, pta, kjpt )
+      !!----------------------------------------------------------------------
+      !!
+      !!----------------------------------------------------------------------
+      USE oce, ONLY:   zwz => ua   ! ua used as workspace
+      !
+      INTEGER                              , INTENT(in   ) ::   kt       ! ocean time-step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype   ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt     ! number of tracers
+      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pwn      ! vertical velocity 
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptn      ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta      ! tracer trend 
+      !
+      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
+      REAL(wp) ::   zbtr , ztra      ! local scalars
+      !!----------------------------------------------------------------------
+
+      !                                                          ! ===========
+      DO jn = 1, kjpt                                            ! tracer loop
+         !                                                       ! ===========
+         ! 1. Bottom value : flux set to zero
+         zwz(:,:,jpk) = 0.e0             ! Bottom value : flux set to zero
+         !
+         !                                 ! Surface value
+         IF( lk_vvl ) THEN   ;   zwz(:,:, 1 ) = 0.e0                      ! Variable volume : flux set to zero
+         ELSE                ;   zwz(:,:, 1 ) = pwn(:,:,1) * ptn(:,:,1,jn)   ! Constant volume : advective flux through the surface
+         ENDIF
+         !
+         DO jk = 2, jpkm1                  ! Interior point: second order centered tracer flux at w-point
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zwz(ji,jj,jk) = 0.5 * pwn(ji,jj,jk) * ( ptn(ji,jj,jk-1,jn) + ptn(ji,jj,jk,jn) )
+               END DO
+            END DO
+         END DO
+         !
+         DO jk = 1, jpkm1          !==  Tracer flux divergence added to the general trend  ==!
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ! k- vertical advective trends 
+                  ztra = - zbtr * ( zwz(ji,jj,jk) - zwz(ji,jj,jk+1) ) 
+                  ! added to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+         END DO
+         !                                 ! Save the vertical advective trends for diagnostic
+         IF( l_trd )  CALL trd_tra( kt, cdtype, jn, jptra_trd_zad, zwz, pwn, ptn(:,:,:,jn) )
+         !
+      END DO
+      !
+   END SUBROUTINE tra_adv_cen2_k
+
+
+   SUBROUTINE quickest( pfu, pfd, pfc, puc )
+      !!----------------------------------------------------------------------
+      !!
+      !! ** Purpose :  Computation of advective flux with Quickest scheme
+      !!
+      !! ** Method :   
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::   pfu   ! second upwind point
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::   pfd   ! first douwning point
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::   pfc   ! the central point (or the first upwind point)
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   puc   ! input as Courant number ; output as flux
+      !!
+      INTEGER  ::  ji, jj, jk               ! dummy loop indices 
+      REAL(wp) ::  zcoef1, zcoef2, zcoef3   ! local scalars          
+      REAL(wp) ::  zc, zcurv, zfho          !   -      -
+      !----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('quickest')
+      !
+      DO jk = 1, jpkm1
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zc     = puc(ji,jj,jk)                         ! Courant number
+               zcurv  = pfd(ji,jj,jk) + pfu(ji,jj,jk) - 2. * pfc(ji,jj,jk)
+               zcoef1 = 0.5 *      ( pfc(ji,jj,jk) + pfd(ji,jj,jk) )
+               zcoef2 = 0.5 * zc * ( pfd(ji,jj,jk) - pfc(ji,jj,jk) )
+               zcoef3 = ( 1. - ( zc * zc ) ) * r1_6 * zcurv
+               zfho   = zcoef1 - zcoef2 - zcoef3              !  phi_f QUICKEST 
+               !
+               zcoef1 = pfd(ji,jj,jk) - pfu(ji,jj,jk)
+               zcoef2 = ABS( zcoef1 )
+               zcoef3 = ABS( zcurv )
+               IF( zcoef3 >= zcoef2 ) THEN
+                  zfho = pfc(ji,jj,jk) 
+               ELSE
+                  zcoef3 = pfu(ji,jj,jk) + ( ( pfc(ji,jj,jk) - pfu(ji,jj,jk) ) / MAX( zc, 1.e-9 ) )    ! phi_REF
+                  IF( zcoef1 >= 0. ) THEN
+                     zfho = MAX( pfc(ji,jj,jk), zfho ) 
+                     zfho = MIN( zfho, MIN( zcoef3, pfd(ji,jj,jk) ) ) 
+                  ELSE
+                     zfho = MIN( pfc(ji,jj,jk), zfho ) 
+                     zfho = MAX( zfho, MAX( zcoef3, pfd(ji,jj,jk) ) ) 
+                  ENDIF
+               ENDIF
+               puc(ji,jj,jk) = zfho
+            END DO
+         END DO
+      END DO
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('quickest')
+      !
+   END SUBROUTINE quickest
+
+   !!======================================================================
+END MODULE traadv_qck
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_tvd.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_tvd.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_tvd.F90	(revision 2504)
@@ -0,0 +1,364 @@
+MODULE traadv_tvd
+   !!==============================================================================
+   !!                       ***  MODULE  traadv_tvd  ***
+   !! Ocean  tracers:  horizontal & vertical advective trend
+   !!==============================================================================
+   !! History :  OPA  !  1995-12  (L. Mortier)  Original code
+   !!                 !  2000-01  (H. Loukos)  adapted to ORCA 
+   !!                 !  2000-10  (MA Foujols E.Kestenare)  include file not routine
+   !!                 !  2000-12  (E. Kestenare M. Levy)  fix bug in trtrd indexes
+   !!                 !  2001-07  (E. Durand G. Madec)  adaptation to ORCA config
+   !!            8.5  !  2002-06  (G. Madec)  F90: Free form and module
+   !!    NEMO    1.0  !  2004-01  (A. de Miranda, G. Madec, J.M. Molines ): advective bbl
+   !!            2.0  !  2008-04  (S. Cravatte) add the i-, j- & k- trends computation
+   !!             -   !  2009-11  (V. Garnier) Surface pressure gradient organization
+   !!            3.3  !  2010-05  (C. Ethe, G. Madec)  merge TRC-TRA + switch from velocity to transport
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   tra_adv_tvd   : update the tracer trend with the 3D advection trends using a TVD scheme
+   !!   nonosc        : compute monotonic tracer fluxes by a non-oscillatory algorithm 
+   !!----------------------------------------------------------------------
+   USE oce            ! ocean dynamics and active tracers
+   USE dom_oce        ! ocean space and time domain
+   USE trdmod_oce     ! tracers trends
+   USE trdtra         ! tracers trends
+   USE in_out_manager ! I/O manager
+   USE dynspg_oce     ! choice/control of key cpp for surface pressure gradient
+   USE lib_mpp        ! MPP library
+   USE lbclnk         ! ocean lateral boundary condition (or mpp link) 
+   USE diaptr_oce         ! poleward transport diagnostics
+   USE trc_oce        ! share passive tracers/Ocean variables
+   USE wrk_nemo       ! Memory Allocation
+   USE timing         ! Timing
+   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_adv_tvd    ! routine called by step.F90
+
+   LOGICAL ::   l_trd   ! flag to compute trends
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: traadv_tvd.F90 4499 2014-02-18 15:14:31Z timgraham $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE tra_adv_tvd ( kt, kit000, cdtype, p2dt, pun, pvn, pwn,      &
+      &                                       ptb, ptn, pta, kjpt )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE tra_adv_tvd  ***
+      !! 
+      !! **  Purpose :   Compute the now trend due to total advection of 
+      !!       tracers and add it to the general trend of tracer equations
+      !!
+      !! **  Method  :   TVD scheme, i.e. 2nd order centered scheme with
+      !!       corrected flux (monotonic correction)
+      !!       note: - this advection scheme needs a leap-frog time scheme
+      !!
+      !! ** Action : - update (pta) with the now advective tracer trends
+      !!             - save the trends 
+      !!----------------------------------------------------------------------
+      USE oce     , ONLY:   zwx => ua        , zwy => va          ! (ua,va) used as workspace
+      !
+      INTEGER                              , INTENT(in   ) ::   kt              ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000          ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
+      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta             ! tracer trend 
+      !
+      INTEGER  ::   ji, jj, jk, jn           ! dummy loop indices  
+      REAL(wp) ::   z2dtt, zbtr, ztra        ! local scalar
+      REAL(wp) ::   zfp_ui, zfp_vj, zfp_wk   !   -      -
+      REAL(wp) ::   zfm_ui, zfm_vj, zfm_wk   !   -      -
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zwi, zwz
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdx, ztrdy, ztrdz
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tra_adv_tvd')
+      !
+      CALL wrk_alloc( jpi, jpj, jpk, zwi, zwz )
+      !
+      IF( kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_adv_tvd : TVD advection scheme on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+      ENDIF
+      !
+      l_trd = .FALSE.
+      IF( ( cdtype == 'TRA' .AND. l_trdtra ) .OR. ( cdtype == 'TRC' .AND. l_trdtrc ) ) l_trd = .TRUE.
+      !
+      IF( l_trd )  THEN
+         CALL wrk_alloc( jpi, jpj, jpk, ztrdx, ztrdy, ztrdz )
+         ztrdx(:,:,:) = 0.e0   ;    ztrdy(:,:,:) = 0.e0   ;   ztrdz(:,:,:) = 0.e0
+      ENDIF
+      !
+      zwi(:,:,:) = 0.e0
+      !
+      !                                                          ! ===========
+      DO jn = 1, kjpt                                            ! tracer loop
+         !                                                       ! ===========
+         ! 1. Bottom value : flux set to zero
+         ! ----------------------------------
+         zwx(:,:,jpk) = 0.e0    ;    zwz(:,:,jpk) = 0.e0
+         zwy(:,:,jpk) = 0.e0    ;    zwi(:,:,jpk) = 0.e0
+
+         ! 2. upstream advection with initial mass fluxes & intermediate update
+         ! --------------------------------------------------------------------
+         ! upstream tracer flux in the i and j direction
+         DO jk = 1, jpkm1
+            DO jj = 1, jpjm1
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  ! upstream scheme
+                  zfp_ui = pun(ji,jj,jk) + ABS( pun(ji,jj,jk) )
+                  zfm_ui = pun(ji,jj,jk) - ABS( pun(ji,jj,jk) )
+                  zfp_vj = pvn(ji,jj,jk) + ABS( pvn(ji,jj,jk) )
+                  zfm_vj = pvn(ji,jj,jk) - ABS( pvn(ji,jj,jk) )
+                  zwx(ji,jj,jk) = 0.5 * ( zfp_ui * ptb(ji,jj,jk,jn) + zfm_ui * ptb(ji+1,jj  ,jk,jn) )
+                  zwy(ji,jj,jk) = 0.5 * ( zfp_vj * ptb(ji,jj,jk,jn) + zfm_vj * ptb(ji  ,jj+1,jk,jn) )
+               END DO
+            END DO
+         END DO
+
+         ! upstream tracer flux in the k direction
+         ! Surface value
+         IF( lk_vvl ) THEN   ;   zwz(:,:, 1 ) = 0.e0                         ! volume variable
+         ELSE                ;   zwz(:,:, 1 ) = pwn(:,:,1) * ptb(:,:,1,jn)   ! linear free surface 
+         ENDIF
+         ! Interior value
+         DO jk = 2, jpkm1
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  zfp_wk = pwn(ji,jj,jk) + ABS( pwn(ji,jj,jk) )
+                  zfm_wk = pwn(ji,jj,jk) - ABS( pwn(ji,jj,jk) )
+                  zwz(ji,jj,jk) = 0.5 * ( zfp_wk * ptb(ji,jj,jk,jn) + zfm_wk * ptb(ji,jj,jk-1,jn) )
+               END DO
+            END DO
+         END DO
+
+         ! total advective trend
+         DO jk = 1, jpkm1
+            z2dtt = p2dt(jk)
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ! total intermediate advective trends
+                  ztra = - zbtr * (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
+                     &             + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  )   &
+                     &             + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1) )
+                  ! update and guess with monotonic sheme
+                  pta(ji,jj,jk,jn) =   pta(ji,jj,jk,jn)         + ztra
+                  zwi(ji,jj,jk)    = ( ptb(ji,jj,jk,jn) + z2dtt * ztra ) * tmask(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         !                             ! Lateral boundary conditions on zwi  (unchanged sign)
+         CALL lbc_lnk( zwi, 'T', 1. )  
+
+         !                                 ! trend diagnostics (contribution of upstream fluxes)
+         IF( l_trd )  THEN 
+            ! store intermediate advective trends
+            ztrdx(:,:,:) = zwx(:,:,:)   ;    ztrdy(:,:,:) = zwy(:,:,:)  ;   ztrdz(:,:,:) = zwz(:,:,:)
+         END IF
+         !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN  
+           IF( jn == jp_tem )  htr_adv(:) = ptr_vj( zwy(:,:,:) )
+           IF( jn == jp_sal )  str_adv(:) = ptr_vj( zwy(:,:,:) )
+         ENDIF
+
+         ! 3. antidiffusive flux : high order minus low order
+         ! --------------------------------------------------
+         ! antidiffusive flux on i and j
+         DO jk = 1, jpkm1
+            DO jj = 1, jpjm1
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zwx(ji,jj,jk) = 0.5 * pun(ji,jj,jk) * ( ptn(ji,jj,jk,jn) + ptn(ji+1,jj,jk,jn) ) - zwx(ji,jj,jk)
+                  zwy(ji,jj,jk) = 0.5 * pvn(ji,jj,jk) * ( ptn(ji,jj,jk,jn) + ptn(ji,jj+1,jk,jn) ) - zwy(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+      
+         ! antidiffusive flux on k
+         zwz(:,:,1) = 0.e0         ! Surface value
+         !
+         DO jk = 2, jpkm1          ! Interior value
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  zwz(ji,jj,jk) = 0.5 * pwn(ji,jj,jk) * ( ptn(ji,jj,jk,jn) + ptn(ji,jj,jk-1,jn) ) - zwz(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         CALL lbc_lnk( zwx, 'U', -1. )   ;   CALL lbc_lnk( zwy, 'V', -1. )         ! Lateral bondary conditions
+         CALL lbc_lnk( zwz, 'W',  1. )
+
+         ! 4. monotonicity algorithm
+         ! -------------------------
+         CALL nonosc( ptb(:,:,:,jn), zwx, zwy, zwz, zwi, p2dt )
+
+
+         ! 5. final trend with corrected fluxes
+         ! ------------------------------------
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.  
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ! total advective trends
+                  ztra = - zbtr * (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
+                     &             + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  )   &
+                     &             + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1) )
+                  ! add them to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+         END DO
+
+         !                                 ! trend diagnostics (contribution of upstream fluxes)
+         IF( l_trd )  THEN 
+            ztrdx(:,:,:) = ztrdx(:,:,:) + zwx(:,:,:)  ! <<< Add to previously computed
+            ztrdy(:,:,:) = ztrdy(:,:,:) + zwy(:,:,:)  ! <<< Add to previously computed
+            ztrdz(:,:,:) = ztrdz(:,:,:) + zwz(:,:,:)  ! <<< Add to previously computed
+            
+            CALL trd_tra( kt, cdtype, jn, jptra_trd_xad, ztrdx, pun, ptn(:,:,:,jn) )   
+            CALL trd_tra( kt, cdtype, jn, jptra_trd_yad, ztrdy, pvn, ptn(:,:,:,jn) )  
+            CALL trd_tra( kt, cdtype, jn, jptra_trd_zad, ztrdz, pwn, ptn(:,:,:,jn) ) 
+         END IF
+         !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN  
+           IF( jn == jp_tem )  htr_adv(:) = ptr_vj( zwy(:,:,:) ) + htr_adv(:)
+           IF( jn == jp_sal )  str_adv(:) = ptr_vj( zwy(:,:,:) ) + str_adv(:)
+         ENDIF
+         !
+      END DO
+      !
+                   CALL wrk_dealloc( jpi, jpj, jpk, zwi, zwz )
+      IF( l_trd )  CALL wrk_dealloc( jpi, jpj, jpk, ztrdx, ztrdy, ztrdz )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tra_adv_tvd')
+      !
+   END SUBROUTINE tra_adv_tvd
+
+
+   SUBROUTINE nonosc( pbef, paa, pbb, pcc, paft, p2dt )
+      !!---------------------------------------------------------------------
+      !!                    ***  ROUTINE nonosc  ***
+      !!     
+      !! **  Purpose :   compute monotonic tracer fluxes from the upstream 
+      !!       scheme and the before field by a nonoscillatory algorithm 
+      !!
+      !! **  Method  :   ... ???
+      !!       warning : pbef and paft must be masked, but the boundaries
+      !!       conditions on the fluxes are not necessary zalezak (1979)
+      !!       drange (1995) multi-dimensional forward-in-time and upstream-
+      !!       in-space based differencing for fluid
+      !!----------------------------------------------------------------------
+      !
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(jpk)         , INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp), DIMENSION (jpi,jpj,jpk), INTENT(in   ) ::   pbef, paft      ! before & after field
+      REAL(wp), DIMENSION (jpi,jpj,jpk), INTENT(inout) ::   paa, pbb, pcc   ! monotonic fluxes in the 3 directions
+      !
+      INTEGER ::   ji, jj, jk   ! dummy loop indices
+      INTEGER ::   ikm1         ! local integer
+      REAL(wp) ::   zpos, zneg, zbt, za, zb, zc, zbig, zrtrn, z2dtt   ! local scalars
+      REAL(wp) ::   zau, zbu, zcu, zav, zbv, zcv, zup, zdo            !   -      -
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zbetup, zbetdo, zbup, zbdo
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('nonosc')
+      !
+      CALL wrk_alloc( jpi, jpj, jpk, zbetup, zbetdo, zbup, zbdo )
+      !
+
+      zbig  = 1.e+40_wp
+      zrtrn = 1.e-15_wp
+      zbetup(:,:,jpk) = 0._wp   ;   zbetdo(:,:,jpk) = 0._wp
+
+
+      ! Search local extrema
+      ! --------------------
+      ! max/min of pbef & paft with large negative/positive value (-/+zbig) inside land
+      zbup = MAX( pbef * tmask - zbig * ( 1.e0 - tmask ),   &
+         &        paft * tmask - zbig * ( 1.e0 - tmask )  )
+      zbdo = MIN( pbef * tmask + zbig * ( 1.e0 - tmask ),   &
+         &        paft * tmask + zbig * ( 1.e0 - tmask )  )
+
+      DO jk = 1, jpkm1
+         ikm1 = MAX(jk-1,1)
+         z2dtt = p2dt(jk)
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+
+               ! search maximum in neighbourhood
+               zup = MAX(  zbup(ji  ,jj  ,jk  ),   &
+                  &        zbup(ji-1,jj  ,jk  ), zbup(ji+1,jj  ,jk  ),   &
+                  &        zbup(ji  ,jj-1,jk  ), zbup(ji  ,jj+1,jk  ),   &
+                  &        zbup(ji  ,jj  ,ikm1), zbup(ji  ,jj  ,jk+1)  )
+
+               ! search minimum in neighbourhood
+               zdo = MIN(  zbdo(ji  ,jj  ,jk  ),   &
+                  &        zbdo(ji-1,jj  ,jk  ), zbdo(ji+1,jj  ,jk  ),   &
+                  &        zbdo(ji  ,jj-1,jk  ), zbdo(ji  ,jj+1,jk  ),   &
+                  &        zbdo(ji  ,jj  ,ikm1), zbdo(ji  ,jj  ,jk+1)  )
+
+               ! positive part of the flux
+               zpos = MAX( 0., paa(ji-1,jj  ,jk  ) ) - MIN( 0., paa(ji  ,jj  ,jk  ) )   &
+                  & + MAX( 0., pbb(ji  ,jj-1,jk  ) ) - MIN( 0., pbb(ji  ,jj  ,jk  ) )   &
+                  & + MAX( 0., pcc(ji  ,jj  ,jk+1) ) - MIN( 0., pcc(ji  ,jj  ,jk  ) )
+
+               ! negative part of the flux
+               zneg = MAX( 0., paa(ji  ,jj  ,jk  ) ) - MIN( 0., paa(ji-1,jj  ,jk  ) )   &
+                  & + MAX( 0., pbb(ji  ,jj  ,jk  ) ) - MIN( 0., pbb(ji  ,jj-1,jk  ) )   &
+                  & + MAX( 0., pcc(ji  ,jj  ,jk  ) ) - MIN( 0., pcc(ji  ,jj  ,jk+1) )
+
+               ! up & down beta terms
+               zbt = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) / z2dtt
+               zbetup(ji,jj,jk) = ( zup            - paft(ji,jj,jk) ) / ( zpos + zrtrn ) * zbt
+               zbetdo(ji,jj,jk) = ( paft(ji,jj,jk) - zdo            ) / ( zneg + zrtrn ) * zbt
+            END DO
+         END DO
+      END DO
+      CALL lbc_lnk( zbetup, 'T', 1. )   ;   CALL lbc_lnk( zbetdo, 'T', 1. )   ! lateral boundary cond. (unchanged sign)
+
+      ! 3. monotonic flux in the i & j direction (paa & pbb)
+      ! ----------------------------------------
+      DO jk = 1, jpkm1
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               zau = MIN( 1.e0, zbetdo(ji,jj,jk), zbetup(ji+1,jj,jk) )
+               zbu = MIN( 1.e0, zbetup(ji,jj,jk), zbetdo(ji+1,jj,jk) )
+               zcu =       ( 0.5  + SIGN( 0.5 , paa(ji,jj,jk) ) )
+               paa(ji,jj,jk) = paa(ji,jj,jk) * ( zcu * zau + ( 1.e0 - zcu) * zbu )
+
+               zav = MIN( 1.e0, zbetdo(ji,jj,jk), zbetup(ji,jj+1,jk) )
+               zbv = MIN( 1.e0, zbetup(ji,jj,jk), zbetdo(ji,jj+1,jk) )
+               zcv =       ( 0.5  + SIGN( 0.5 , pbb(ji,jj,jk) ) )
+               pbb(ji,jj,jk) = pbb(ji,jj,jk) * ( zcv * zav + ( 1.e0 - zcv) * zbv )
+
+      ! monotonic flux in the k direction, i.e. pcc
+      ! -------------------------------------------
+               za = MIN( 1., zbetdo(ji,jj,jk+1), zbetup(ji,jj,jk) )
+               zb = MIN( 1., zbetup(ji,jj,jk+1), zbetdo(ji,jj,jk) )
+               zc =       ( 0.5  + SIGN( 0.5 , pcc(ji,jj,jk+1) ) )
+               pcc(ji,jj,jk+1) = pcc(ji,jj,jk+1) * ( zc * za + ( 1.e0 - zc) * zb )
+            END DO
+         END DO
+      END DO
+      CALL lbc_lnk( paa, 'U', -1. )   ;   CALL lbc_lnk( pbb, 'V', -1. )   ! lateral boundary condition (changed sign)
+      !
+      CALL wrk_dealloc( jpi, jpj, jpk, zbetup, zbetdo, zbup, zbdo )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('nonosc')
+      !
+   END SUBROUTINE nonosc
+
+   !!======================================================================
+END MODULE traadv_tvd
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_ubs.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_ubs.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traadv_ubs.F90	(revision 2504)
@@ -0,0 +1,386 @@
+MODULE traadv_ubs
+   !!==============================================================================
+   !!                       ***  MODULE  traadv_ubs  ***
+   !! Ocean active tracers:  horizontal & vertical advective trend
+   !!==============================================================================
+   !! History :  1.0  !  2006-08  (L. Debreu, R. Benshila)  Original code
+   !!            3.3  !  2010-05  (C. Ethe, G. Madec)  merge TRC-TRA + switch from velocity to transport
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   tra_adv_ubs : update the tracer trend with the horizontal
+   !!                 advection trends using a third order biaised scheme  
+   !!----------------------------------------------------------------------
+   USE oce            ! ocean dynamics and active tracers
+   USE dom_oce        ! ocean space and time domain
+   USE trdmod_oce     ! ocean space and time domain
+   USE trdtra
+   USE lib_mpp
+   USE lbclnk         ! ocean lateral boundary condition (or mpp link)
+   USE in_out_manager ! I/O manager
+   USE diaptr_oce         ! poleward transport diagnostics
+   USE dynspg_oce     ! choice/control of key cpp for surface pressure gradient
+   USE trc_oce        ! share passive tracers/Ocean variables
+   USE wrk_nemo       ! Memory Allocation
+   USE timing         ! Timing
+   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_adv_ubs   ! routine called by traadv module
+
+   LOGICAL :: l_trd  ! flag to compute trends or not
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: traadv_ubs.F90 4499 2014-02-18 15:14:31Z timgraham $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE tra_adv_ubs ( kt, kit000, cdtype, p2dt, pun, pvn, pwn,      &
+      &                                       ptb, ptn, pta, kjpt )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE tra_adv_ubs  ***
+      !!                 
+      !! ** Purpose :   Compute the now trend due to the advection of tracers
+      !!      and add it to the general trend of passive tracer equations.
+      !!
+      !! ** Method  :   The upstream biased 3rd order scheme (UBS) is based on an
+      !!      upstream-biased parabolic interpolation (Shchepetkin and McWilliams 2005)
+      !!      It is only used in the horizontal direction.
+      !!      For example the i-component of the advective fluxes are given by :
+      !!                !  e2u e3u un ( mi(Tn) - zltu(i  ) )   if un(i) >= 0
+      !!          zwx = !  or 
+      !!                !  e2u e3u un ( mi(Tn) - zltu(i+1) )   if un(i) < 0
+      !!      where zltu is the second derivative of the before temperature field:
+      !!          zltu = 1/e3t di[ e2u e3u / e1u di[Tb] ]
+      !!      This results in a dissipatively dominant (i.e. hyper-diffusive) 
+      !!      truncation error. The overall performance of the advection scheme 
+      !!      is similar to that reported in (Farrow and Stevens, 1995). 
+      !!      For stability reasons, the first term of the fluxes which corresponds
+      !!      to a second order centered scheme is evaluated using the now velocity 
+      !!      (centered in time) while the second term which is the diffusive part 
+      !!      of the scheme, is evaluated using the before velocity (forward in time). 
+      !!      Note that UBS is not positive. Do not use it on passive tracers.
+      !!                On the vertical, the advection is evaluated using a TVD scheme,
+      !!      as the UBS have been found to be too diffusive.
+      !!
+      !! ** Action : - update (pta) with the now advective tracer trends
+      !!
+      !! Reference : Shchepetkin, A. F., J. C. McWilliams, 2005, Ocean Modelling, 9, 347-404. 
+      !!             Farrow, D.E., Stevens, D.P., 1995, J. Phys. Ocean. 25, 1731Ð1741. 
+      !!----------------------------------------------------------------------
+      USE oce     , ONLY:   zwx  => ua       , zwy  => va         ! (ua,va) used as workspace
+      !
+      INTEGER                              , INTENT(in   ) ::   kt              ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000          ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers
+      REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step
+      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean transport components
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta             ! tracer trend 
+      !
+      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
+      REAL(wp) ::   ztra, zbtr, zcoef, z2dtt                       ! local scalars
+      REAL(wp) ::   zfp_ui, zfm_ui, zcenut, ztak, zfp_wk, zfm_wk   !   -      -
+      REAL(wp) ::   zfp_vj, zfm_vj, zcenvt, zeeu, zeev, z_hdivn    !   -      -
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: ztu, ztv, zltu, zltv, zti, ztw
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tra_adv_ubs')
+      !
+      CALL wrk_alloc( jpi, jpj, jpk, ztu, ztv, zltu, zltv, zti, ztw )
+      !
+
+      IF( kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_adv_ubs :  horizontal UBS advection scheme on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
+      ENDIF
+      !
+      l_trd = .FALSE.
+      IF( ( cdtype == 'TRA' .AND. l_trdtra ) .OR. ( cdtype == 'TRC' .AND. l_trdtrc ) ) l_trd = .TRUE.
+      !
+      !                                                          ! ===========
+      DO jn = 1, kjpt                                            ! tracer loop
+         !                                                       ! ===========
+         ! 1. Bottom value : flux set to zero
+         ! ----------------------------------
+         zltu(:,:,jpk) = 0.e0       ;      zltv(:,:,jpk) = 0.e0
+         !                                              
+         DO jk = 1, jpkm1                                 ! Horizontal slab
+            !                                   
+            !  Laplacian
+            DO jj = 1, jpjm1            ! First derivative (gradient)
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zeeu = e2u(ji,jj) * fse3u(ji,jj,jk) / e1u(ji,jj) * umask(ji,jj,jk)
+                  zeev = e1v(ji,jj) * fse3v(ji,jj,jk) / e2v(ji,jj) * vmask(ji,jj,jk)
+                  ztu(ji,jj,jk) = zeeu * ( ptb(ji+1,jj  ,jk,jn) - ptb(ji,jj,jk,jn) )
+                  ztv(ji,jj,jk) = zeev * ( ptb(ji  ,jj+1,jk,jn) - ptb(ji,jj,jk,jn) )
+               END DO
+            END DO
+            DO jj = 2, jpjm1            ! Second derivative (divergence)
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zcoef = 1. / ( 6. * fse3t(ji,jj,jk) )
+                  zltu(ji,jj,jk) = (  ztu(ji,jj,jk) - ztu(ji-1,jj,jk)  ) * zcoef
+                  zltv(ji,jj,jk) = (  ztv(ji,jj,jk) - ztv(ji,jj-1,jk)  ) * zcoef
+               END DO
+            END DO
+            !                                    
+         END DO                                           ! End of slab         
+         CALL lbc_lnk( zltu, 'T', 1. )   ;    CALL lbc_lnk( zltv, 'T', 1. )   ! Lateral boundary cond. (unchanged sgn)
+
+         !    
+         !  Horizontal advective fluxes               
+         DO jk = 1, jpkm1                                 ! Horizontal slab
+            DO jj = 1, jpjm1
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  ! upstream transport (x2)
+                  zfp_ui = pun(ji,jj,jk) + ABS( pun(ji,jj,jk) )
+                  zfm_ui = pun(ji,jj,jk) - ABS( pun(ji,jj,jk) )
+                  zfp_vj = pvn(ji,jj,jk) + ABS( pvn(ji,jj,jk) )
+                  zfm_vj = pvn(ji,jj,jk) - ABS( pvn(ji,jj,jk) )
+                  ! 2nd order centered advective fluxes (x2)
+                  zcenut = pun(ji,jj,jk) * ( ptn(ji,jj,jk,jn) + ptn(ji+1,jj  ,jk,jn) )
+                  zcenvt = pvn(ji,jj,jk) * ( ptn(ji,jj,jk,jn) + ptn(ji  ,jj+1,jk,jn) )
+                  ! UBS advective fluxes
+                  zwx(ji,jj,jk) = 0.5 * ( zcenut - zfp_ui * zltu(ji,jj,jk) - zfm_ui * zltu(ji+1,jj,jk) )
+                  zwy(ji,jj,jk) = 0.5 * ( zcenvt - zfp_vj * zltv(ji,jj,jk) - zfm_vj * zltv(ji,jj+1,jk) )
+               END DO
+            END DO
+         END DO                                           ! End of slab         
+
+         zltu(:,:,:) = pta(:,:,:,jn)      ! store pta trends
+
+         ! Horizontal advective trends
+         DO jk = 1, jpkm1
+            !  Tracer flux divergence at t-point added to the general trend
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ! horizontal advective
+                  ztra = - zbtr * (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk)   &
+                     &             + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk)  )
+                  ! add it to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+            !                                             
+         END DO                                           !   End of slab
+
+         ! Horizontal trend used in tra_adv_ztvd subroutine
+         zltu(:,:,:) = pta(:,:,:,jn) - zltu(:,:,:)
+
+         ! 3. Save the horizontal advective trends for diagnostic
+         ! ------------------------------------------------------
+         !                                 ! trend diagnostics (contribution of upstream fluxes)
+         IF( l_trd ) THEN
+             CALL trd_tra( kt, cdtype, jn, jptra_trd_xad, zwx, pun, ptn(:,:,:,jn) )
+             CALL trd_tra( kt, cdtype, jn, jptra_trd_yad, zwy, pvn, ptn(:,:,:,jn) )
+         END IF
+         !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN  
+            IF( jn == jp_tem )  htr_adv(:) = ptr_vj( zwy(:,:,:) )
+            IF( jn == jp_sal )  str_adv(:) = ptr_vj( zwy(:,:,:) )
+         ENDIF
+         
+         ! TVD scheme for the vertical direction  
+         ! ----------------------
+         IF( l_trd )   zltv(:,:,:) = pta(:,:,:,jn)          ! store pta if trend diag.
+
+         !  Bottom value : flux set to zero
+         ztw(:,:,jpk) = 0.e0   ;   zti(:,:,jpk) = 0.e0
+
+         ! Surface value
+         IF( lk_vvl ) THEN   ;   ztw(:,:,1) = 0.e0                      ! variable volume : flux set to zero
+         ELSE                ;   ztw(:,:,1) = pwn(:,:,1) * ptb(:,:,1,jn)   ! free constant surface 
+         ENDIF
+         !  upstream advection with initial mass fluxes & intermediate update
+         ! -------------------------------------------------------------------
+         ! Interior value
+         DO jk = 2, jpkm1
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                   zfp_wk = pwn(ji,jj,jk) + ABS( pwn(ji,jj,jk) )
+                   zfm_wk = pwn(ji,jj,jk) - ABS( pwn(ji,jj,jk) )
+                   ztw(ji,jj,jk) = 0.5 * (  zfp_wk * ptb(ji,jj,jk,jn) + zfm_wk * ptb(ji,jj,jk-1,jn)  )
+               END DO
+            END DO
+         END DO 
+         ! update and guess with monotonic sheme
+         DO jk = 1, jpkm1
+            z2dtt = p2dt(jk)
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ztak = - ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) ) * zbtr
+                  pta(ji,jj,jk,jn) =   pta(ji,jj,jk,jn) +  ztak 
+                  zti(ji,jj,jk)    = ( ptb(ji,jj,jk,jn) + z2dtt * ( ztak + zltu(ji,jj,jk) ) ) * tmask(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         !
+         CALL lbc_lnk( zti, 'T', 1. )      ! Lateral boundary conditions on zti, zsi   (unchanged sign)
+
+         !  antidiffusive flux : high order minus low order
+         ztw(:,:,1) = 0.e0       ! Surface value
+         DO jk = 2, jpkm1        ! Interior value
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  ztw(ji,jj,jk) = 0.5 * pwn(ji,jj,jk) * ( ptn(ji,jj,jk,jn) + ptn(ji,jj,jk-1,jn) ) - ztw(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         !
+         CALL nonosc_z( ptb(:,:,:,jn), ztw, zti, p2dt )      !  monotonicity algorithm
+
+         !  final trend with corrected fluxes
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1 
+               DO ji = fs_2, fs_jpim1   ! vector opt.   
+                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  ! k- vertical advective trends  
+                  ztra = - zbtr * ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) )
+                  ! added to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+         END DO
+
+         !  Save the final vertical advective trends
+         IF( l_trd )  THEN                        ! vertical advective trend diagnostics
+            DO jk = 1, jpkm1                       ! (compute -w.dk[ptn]= -dk[w.ptn] + ptn.dk[w])
+               DO jj = 2, jpjm1
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     zbtr = 1.e0 / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                     z_hdivn = (  pwn(ji,jj,jk) - pwn(ji,jj,jk+1)  ) * zbtr
+                     zltv(ji,jj,jk) = pta(ji,jj,jk,jn) - zltv(ji,jj,jk) + ptn(ji,jj,jk,jn) * z_hdivn
+                  END DO
+               END DO
+            END DO
+            CALL trd_tra( kt, cdtype, jn, jptra_trd_zad, zltv )
+         ENDIF
+         !
+      ENDDO
+      !
+      CALL wrk_dealloc( jpi, jpj, jpk, ztu, ztv, zltu, zltv, zti, ztw )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tra_adv_ubs')
+      !
+   END SUBROUTINE tra_adv_ubs
+
+
+   SUBROUTINE nonosc_z( pbef, pcc, paft, p2dt )
+      !!---------------------------------------------------------------------
+      !!                    ***  ROUTINE nonosc_z  ***
+      !!     
+      !! **  Purpose :   compute monotonic tracer fluxes from the upstream 
+      !!       scheme and the before field by a nonoscillatory algorithm 
+      !!
+      !! **  Method  :   ... ???
+      !!       warning : pbef and paft must be masked, but the boundaries
+      !!       conditions on the fluxes are not necessary zalezak (1979)
+      !!       drange (1995) multi-dimensional forward-in-time and upstream-
+      !!       in-space based differencing for fluid
+      !!----------------------------------------------------------------------
+      !
+      REAL(wp), INTENT(in   ), DIMENSION(jpk)          ::   p2dt   ! vertical profile of tracer time-step
+      REAL(wp),                DIMENSION (jpi,jpj,jpk) ::   pbef   ! before field
+      REAL(wp), INTENT(inout), DIMENSION (jpi,jpj,jpk) ::   paft   ! after field
+      REAL(wp), INTENT(inout), DIMENSION (jpi,jpj,jpk) ::   pcc    ! monotonic flux in the k direction
+      !
+      INTEGER  ::   ji, jj, jk   ! dummy loop indices
+      INTEGER  ::   ikm1         ! local integer
+      REAL(wp) ::   zpos, zneg, zbt, za, zb, zc, zbig, zrtrn, z2dtt   ! local scalars
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zbetup, zbetdo
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('nonosc_z')
+      !
+      CALL wrk_alloc( jpi, jpj, jpk, zbetup, zbetdo )
+      !
+
+      zbig  = 1.e+40_wp
+      zrtrn = 1.e-15_wp
+      zbetup(:,:,:) = 0._wp   ;   zbetdo(:,:,:) = 0._wp
+
+      ! Search local extrema
+      ! --------------------
+      ! large negative value (-zbig) inside land
+      pbef(:,:,:) = pbef(:,:,:) * tmask(:,:,:) - zbig * ( 1.e0 - tmask(:,:,:) )
+      paft(:,:,:) = paft(:,:,:) * tmask(:,:,:) - zbig * ( 1.e0 - tmask(:,:,:) )
+      ! search maximum in neighbourhood
+      DO jk = 1, jpkm1
+         ikm1 = MAX(jk-1,1)
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               zbetup(ji,jj,jk) = MAX(  pbef(ji  ,jj  ,jk  ), paft(ji  ,jj  ,jk  ),   &
+                  &                     pbef(ji  ,jj  ,ikm1), pbef(ji  ,jj  ,jk+1),   &
+                  &                     paft(ji  ,jj  ,ikm1), paft(ji  ,jj  ,jk+1)  )
+            END DO
+         END DO
+      END DO
+      ! large positive value (+zbig) inside land
+      pbef(:,:,:) = pbef(:,:,:) * tmask(:,:,:) + zbig * ( 1.e0 - tmask(:,:,:) )
+      paft(:,:,:) = paft(:,:,:) * tmask(:,:,:) + zbig * ( 1.e0 - tmask(:,:,:) )
+      ! search minimum in neighbourhood
+      DO jk = 1, jpkm1
+         ikm1 = MAX(jk-1,1)
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               zbetdo(ji,jj,jk) = MIN(  pbef(ji  ,jj  ,jk  ), paft(ji  ,jj  ,jk  ),   &
+                  &                     pbef(ji  ,jj  ,ikm1), pbef(ji  ,jj  ,jk+1),   &
+                  &                     paft(ji  ,jj  ,ikm1), paft(ji  ,jj  ,jk+1)  )
+            END DO
+         END DO
+      END DO
+
+      ! restore masked values to zero
+      pbef(:,:,:) = pbef(:,:,:) * tmask(:,:,:)
+      paft(:,:,:) = paft(:,:,:) * tmask(:,:,:)
+
+
+      ! 2. Positive and negative part of fluxes and beta terms
+      ! ------------------------------------------------------
+
+      DO jk = 1, jpkm1
+         z2dtt = p2dt(jk)
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               ! positive & negative part of the flux
+               zpos = MAX( 0., pcc(ji  ,jj  ,jk+1) ) - MIN( 0., pcc(ji  ,jj  ,jk  ) )
+               zneg = MAX( 0., pcc(ji  ,jj  ,jk  ) ) - MIN( 0., pcc(ji  ,jj  ,jk+1) )
+               ! up & down beta terms
+               zbt = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) / z2dtt
+               zbetup(ji,jj,jk) = ( zbetup(ji,jj,jk) - paft(ji,jj,jk) ) / (zpos+zrtrn) * zbt
+               zbetdo(ji,jj,jk) = ( paft(ji,jj,jk) - zbetdo(ji,jj,jk) ) / (zneg+zrtrn) * zbt
+            END DO
+         END DO
+      END DO
+      ! monotonic flux in the k direction, i.e. pcc
+      ! -------------------------------------------
+      DO jk = 2, jpkm1
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               za = MIN( 1., zbetdo(ji,jj,jk), zbetup(ji,jj,jk-1) )
+               zb = MIN( 1., zbetup(ji,jj,jk), zbetdo(ji,jj,jk-1) )
+               zc = 0.5 * ( 1.e0 + SIGN( 1.e0, pcc(ji,jj,jk) ) )
+               pcc(ji,jj,jk) = pcc(ji,jj,jk) * ( zc * za + ( 1.e0 - zc) * zb )
+            END DO
+         END DO
+      END DO
+      !
+      CALL wrk_dealloc( jpi, jpj, jpk, zbetup, zbetdo )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('nonosc_z')
+      !
+   END SUBROUTINE nonosc_z
+
+   !!======================================================================
+END MODULE traadv_ubs
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_bilap.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_bilap.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_bilap.F90	(revision 2504)
@@ -0,0 +1,177 @@
+MODULE traldf_bilap
+   !!==============================================================================
+   !!                   ***  MODULE  traldf_bilap  ***
+   !! Ocean  tracers:  horizontal component of the lateral tracer mixing trend
+   !!==============================================================================
+   !! History :  OPA  !  1991-11  (G. Madec)  Original code
+   !!                 !  1993-03  (M. Guyon)  symetrical conditions
+   !!                 !  1995-11  (G. Madec)  suppress volumetric scale factors
+   !!                 !  1996-01  (G. Madec)  statement function for e3
+   !!                 !  1996-01  (M. Imbard)  mpp exchange
+   !!                 !  1997-07  (G. Madec)  optimization, and ahtt
+   !!            8.5  !  2002-08  (G. Madec)  F90: Free form and module
+   !!   NEMO     1.0  !  2004-08  (C. Talandier) New trends organization
+   !!             -   !  2005-11  (G. Madec)  zps or sco as default option
+   !!            3.3  !  2010-05  (C. Ethe, G. Madec)  merge TRC-TRA 
+   !!==============================================================================
+
+   !!----------------------------------------------------------------------
+   !!   tra_ldf_bilap : update the tracer trend with the horizontal diffusion
+   !!                   using a iso-level biharmonic operator
+   !!----------------------------------------------------------------------
+   USE oce             ! ocean dynamics and active tracers
+   USE dom_oce         ! ocean space and time domain
+   USE ldftra_oce      ! ocean tracer   lateral physics
+   USE in_out_manager  ! I/O manager
+   USE ldfslp          ! iso-neutral slopes 
+   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+   USE diaptr_oce          ! poleward transport diagnostics
+   USE trc_oce         ! share passive tracers/Ocean variables
+   USE lib_mpp         ! MPP library
+   USE wrk_nemo       ! Memory Allocation
+   USE timing         ! Timing
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_ldf_bilap   ! routine called by step.F90
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "ldftra_substitute.h90"
+#  include "ldfeiv_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: traldf_bilap.F90 4292 2013-11-20 16:28:04Z cetlod $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+ 
+   SUBROUTINE tra_ldf_bilap( kt, kit000, cdtype, pgu, pgv,      &
+      &                                  ptb, pta, kjpt )  
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE tra_ldf_bilap  ***
+      !!
+      !! ** Purpose :   Compute the before horizontal tracer diffusive 
+      !!      trend and add it to the general trend of tracer equation.
+      !!
+      !! ** Method  :   4th order diffusive operator along model level surfaces 
+      !!      evaluated using before fields (forward time scheme). The hor.
+      !!      diffusive trends  is given by:
+      !!      Laplacian of tb:
+      !!         zlt   = 1/(e1t*e2t*e3t) {  di-1[ e2u*e3u/e1u di(tb) ]
+      !!                                  + dj-1[ e1v*e3v/e2v dj(tb) ]  }
+      !!      Multiply by the eddy diffusivity coef. and insure lateral bc:
+      !!        zlt   = ahtt * zlt
+      !!        call to lbc_lnk
+      !!      Bilaplacian (laplacian of zlt):
+      !!         difft = 1/(e1t*e2t*e3t) {  di-1[ e2u*e3u/e1u di(zlt) ]
+      !!                                  + dj-1[ e1v*e3v/e2v dj(zlt) ]  }
+      !!
+      !!      Add this trend to the general trend
+      !!         (pta) = (pta) + ( difft )
+      !!
+      !! ** Action : - Update pta arrays with the before iso-level
+      !!               biharmonic mixing trend.
+      !!----------------------------------------------------------------------
+      USE oce     , ONLY:   ztu  => ua       , ztv  => va                           ! (ua,va) used as workspace
+      !!
+      INTEGER                              , INTENT(in   ) ::   kt         ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000          ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers
+      REAL(wp), DIMENSION(jpi,jpj,    kjpt), INTENT(in   ) ::   pgu, pgv   ! tracer gradient at pstep levels
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb        ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta        ! tracer trend 
+      !!
+      INTEGER  ::  ji, jj, jk, jn   ! dummy loop indices
+      REAL(wp) ::  zbtr, ztra       ! local scalars
+      REAL(wp), POINTER, DIMENSION(:,:) ::  zeeu, zeev, zlt
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start( 'tra_ldf_bilap')
+      !
+      CALL wrk_alloc( jpi, jpj, zeeu, zeev, zlt ) 
+      !
+
+      IF( kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_ldf_bilap : iso-level biharmonic operator on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~'
+      ENDIF
+      !                                                          ! ===========
+      DO jn = 1, kjpt                                            ! tracer loop
+         !                                                       ! ===========
+         !                                               
+         DO jk = 1, jpkm1                                        ! Horizontal slab
+            !                                             
+            !                          !==  Initialization of metric arrays (for z- or s-coordinates)  ==!
+            DO jj = 1, jpjm1
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zeeu(ji,jj) = re2u_e1u(ji,jj) * fse3u_n(ji,jj,jk) * umask(ji,jj,jk)
+                  zeev(ji,jj) = re1v_e2v(ji,jj) * fse3v_n(ji,jj,jk) * vmask(ji,jj,jk)
+               END DO
+            END DO
+
+            !                          !==  Laplacian  ==!
+            !
+            DO jj = 1, jpjm1                 ! First derivative (gradient)
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  ztu(ji,jj,jk) = zeeu(ji,jj) * ( ptb(ji+1,jj  ,jk,jn) - ptb(ji,jj,jk,jn) )
+                  ztv(ji,jj,jk) = zeev(ji,jj) * ( ptb(ji  ,jj+1,jk,jn) - ptb(ji,jj,jk,jn) )
+               END DO
+            END DO
+            IF( ln_zps ) THEN                ! set gradient at partial step level (last ocean level)
+               DO jj = 1, jpjm1
+                  DO ji = 1, jpim1
+                     IF( mbku(ji,jj) == jk )  ztu(ji,jj,jk) = zeeu(ji,jj) * pgu(ji,jj,jn)
+                     IF( mbkv(ji,jj) == jk )  ztv(ji,jj,jk) = zeev(ji,jj) * pgv(ji,jj,jn)
+                  END DO
+               END DO
+            ENDIF
+            DO jj = 2, jpjm1                 ! Second derivative (divergence) time the eddy diffusivity coefficient
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1.0 / ( e12t(ji,jj) * fse3t_n(ji,jj,jk) )
+                  zlt(ji,jj) = fsahtt(ji,jj,jk) * zbtr * (   ztu(ji,jj,jk) - ztu(ji-1,jj,jk)   &
+                     &                                     + ztv(ji,jj,jk) - ztv(ji,jj-1,jk)   )
+               END DO
+            END DO
+            CALL lbc_lnk( zlt, 'T', 1. )     ! Lateral boundary conditions (unchanged sgn)
+
+            !                          !==  Bilaplacian  ==!
+            !
+            DO jj = 1, jpjm1                 ! third derivative (gradient)
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  ztu(ji,jj,jk) = zeeu(ji,jj) * ( zlt(ji+1,jj  ) - zlt(ji,jj) )
+                  ztv(ji,jj,jk) = zeev(ji,jj) * ( zlt(ji  ,jj+1) - zlt(ji,jj) )
+               END DO
+            END DO
+            DO jj = 2, jpjm1                 ! fourth derivative (divergence) and add to the general tracer trend
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  ! horizontal diffusive trends
+                  zbtr = 1.0 / ( e12t(ji,jj) * fse3t_n(ji,jj,jk) )
+                  ztra = zbtr * (  ztu(ji,jj,jk) - ztu(ji-1,jj,jk) + ztv(ji,jj,jk) - ztv(ji,jj-1,jk)  )
+                  ! add it to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+            !                                             
+         END DO                                           ! Horizontal slab
+         !                                                
+         ! "zonal" mean lateral diffusive heat and salt transport
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN  
+           IF( jn == jp_tem )  htr_ldf(:) = ptr_vj( ztv(:,:,:) )
+           IF( jn == jp_sal )  str_ldf(:) = ptr_vj( ztv(:,:,:) )
+         ENDIF
+         !                                                ! ===========
+      END DO                                              ! tracer loop
+      !                                                   ! ===========
+      IF( nn_timing == 1 )  CALL timing_stop( 'tra_ldf_bilap')
+      !
+      CALL wrk_dealloc( jpi, jpj, zeeu, zeev, zlt ) 
+      !
+   END SUBROUTINE tra_ldf_bilap
+
+   !!==============================================================================
+END MODULE traldf_bilap
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_bilapg.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_bilapg.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_bilapg.F90	(revision 2504)
@@ -0,0 +1,363 @@
+MODULE traldf_bilapg
+   !!==============================================================================
+   !!                       ***  MODULE  traldf_bilapg  ***
+   !! Ocean  tracers:  horizontal component of the lateral tracer mixing trend
+   !!==============================================================================
+   !! History : 8.0   ! 1997-07  (G. Madec)  Original code
+   !!   NEMO    1.0   ! 2002-08  (G. Madec)  F90: Free form and module
+   !!           3.3   ! 2010-06  (C. Ethe, G. Madec) Merge TRA-TRC
+   !!==============================================================================
+#if defined key_ldfslp   ||   defined key_esopa
+   !!----------------------------------------------------------------------
+   !!   'key_ldfslp'                  rotation of the lateral mixing tensor
+   !!----------------------------------------------------------------------
+   !!   tra_ldf_bilapg : update the tracer trend with the horizontal diffusion
+   !!                    using an horizontal biharmonic operator in s-coordinate 
+   !!   ldfght         :  ???
+   !!----------------------------------------------------------------------
+   USE oce             ! ocean dynamics and tracers variables
+   USE dom_oce         ! ocean space and time domain variables
+   USE ldftra_oce      ! ocean active tracers: lateral physics
+   USE in_out_manager  ! I/O manager
+   USE ldfslp          ! iso-neutral slopes available
+   USE lbclnk          ! ocean lateral boundary condition (or mpp link)
+   USE diaptr_oce          ! poleward transport diagnostics 
+   USE trc_oce         ! share passive tracers/Ocean variables
+   USE lib_mpp         ! MPP library
+   USE wrk_nemo        ! Memory Allocation
+   USE timing          ! Timing
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_ldf_bilapg   ! routine called by step.F90
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "ldftra_substitute.h90"
+#  include "ldfeiv_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: traldf_bilapg.F90 4292 2013-11-20 16:28:04Z cetlod $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE tra_ldf_bilapg( kt, kit000, cdtype, ptb, pta, kjpt )
+      !!----------------------------------------------------------------------
+      !!                 ***  ROUTINE tra_ldf_bilapg  ***
+      !!                    
+      !! ** Purpose :   Compute the before horizontal tracer diffusive 
+      !!      trend and add it to the general trend of tracer equation.
+      !!
+      !! ** Method  :   The lateral diffusive trends is provided by a 4th order
+      !!      operator rotated along geopotential surfaces. It is computed
+      !!      using before fields (forward in time) and geopotential slopes
+      !!      computed in routine inildf.
+      !!         -1- compute the geopotential harmonic operator applied to
+      !!        ptb and multiply it by the eddy diffusivity coefficient
+      !!       (done by a call to ldfght routine, result in wk1 arrays).
+      !!      Applied the domain lateral boundary conditions by call to lbc_lnk
+      !!         -2- compute the geopotential harmonic operator applied to
+      !!      wk1 by a second call to ldfght routine (result in wk2)
+      !!      arrays).
+      !!         -3- Add this trend to the general trend 
+      !!            pta = pta + wk2
+      !!
+      !! ** Action : - Update pta arrays with the before geopotential 
+      !!               biharmonic mixing trend.
+      !!----------------------------------------------------------------------
+      !
+      INTEGER         , INTENT(in   )                      ::   kt       ! ocean time-step index
+      INTEGER         , INTENT(in   )                      ::   kit000   ! first time step index
+      CHARACTER(len=3), INTENT(in   )                      ::   cdtype   ! =TRA or TRC (tracer indicator)
+      INTEGER         , INTENT(in   )                      ::   kjpt     ! number of tracers
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb      ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta      ! tracer trend 
+      !
+      INTEGER ::   ji, jj, jk, jn   ! dummy loop indices
+      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: zwk1, zwk2 
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tra_ldf_bilapg')
+      !
+      CALL wrk_alloc( jpi, jpj, jpk, kjpt, zwk1, zwk2 ) 
+      !
+      IF( kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_ldf_bilapg : horizontal biharmonic operator in s-coordinate on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~'
+      ENDIF
+
+      ! 1. Laplacian of ptb * aht
+      ! ----------------------------- 
+      CALL ldfght( kt, cdtype, ptb, zwk1, kjpt, 1 )      ! rotated harmonic operator applied to ptb and multiply by aht 
+      !                                                 ! output in wk1 
+      !
+      DO jn = 1, kjpt
+         CALL lbc_lnk( zwk1(:,:,:,jn) , 'T', 1. )        ! Lateral boundary conditions on wk1   (unchanged sign)
+      END DO
+
+      ! 2. Bilaplacian of ptb
+      ! -------------------------
+      CALL ldfght( kt, cdtype, zwk1, zwk2, kjpt, 2 )      ! rotated harmonic operator applied to wk1 ; output in wk2
+
+
+      ! 3. Update the tracer trends                    (j-slab :   2, jpj-1)
+      ! ---------------------------
+      DO jn = 1, kjpt
+         DO jj = 2, jpjm1
+            DO jk = 1, jpkm1
+               DO ji = 2, jpim1
+                  ! add it to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + zwk2(ji,jj,jk,jn)
+               END DO
+            END DO
+         END DO
+      END DO
+      !
+      CALL wrk_dealloc( jpi, jpj, jpk, kjpt, zwk1, zwk2 ) 
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tra_ldf_bilapg')
+      !
+   END SUBROUTINE tra_ldf_bilapg
+
+
+   SUBROUTINE ldfght ( kt, cdtype, pt, plt, kjpt, kaht )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE ldfght  ***
+      !!          
+      !! ** Purpose :   Apply a geopotential harmonic operator to (pt) and 
+      !!      multiply it by the eddy diffusivity coefficient (if kaht=1).
+      !!      Routine only used in s-coordinates (l_sco=T) with bilaplacian
+      !!      operator (ln_traldf_bilap=T) acting along geopotential surfaces
+      !!      (ln_traldf_hor).
+      !!
+      !! ** Method  :   The harmonic operator rotated along geopotential 
+      !!      surfaces is applied to (pt) using the slopes of geopotential
+      !!      surfaces computed in inildf routine. The result is provided in
+      !!      (plt,pls) arrays. It is computed in 2 steps:
+      !!
+      !!      First step: horizontal part of the operator. It is computed on
+      !!      ==========  pt as follows (idem on ps)
+      !!      horizontal fluxes :
+      !!         zftu = e2u*e3u/e1u di[ pt ] - e2u*uslp dk[ mi(mk(pt)) ]
+      !!         zftv = e1v*e3v/e2v dj[ pt ] - e1v*vslp dk[ mj(mk(pt)) ]
+      !!      take the horizontal divergence of the fluxes (no divided by
+      !!      the volume element :
+      !!         plt  = di-1[ zftu ] +  dj-1[ zftv ]
+      !!
+      !!      Second step: vertical part of the operator. It is computed on
+      !!      ===========  pt as follows (idem on ps)
+      !!      vertical fluxes :
+      !!         zftw = e1t*e2t/e3w * (wslpi^2+wslpj^2)  dk-1[ pt ]
+      !!              -     e2t     *       wslpi        di[ mi(mk(pt)) ]
+      !!              -     e1t     *       wslpj        dj[ mj(mk(pt)) ]
+      !!      take the vertical divergence of the fluxes add it to the hori-
+      !!      zontal component, divide the result by the volume element and
+      !!      if kaht=1, multiply by the eddy diffusivity coefficient:
+      !!         plt  = aht / (e1t*e2t*e3t) { plt + dk[ zftw ] }
+      !!      else:
+      !!         plt  =  1  / (e1t*e2t*e3t) { plt + dk[ zftw ] }
+      !!
+      !!----------------------------------------------------------------------
+      USE oce     , ONLY:   zftv => ua       ! ua used as workspace
+      !
+      INTEGER         , INTENT(in )                              ::  kt      ! ocean time-step index
+      CHARACTER(len=3), INTENT(in )                              ::  cdtype  ! =TRA or TRC (tracer indicator) 
+      INTEGER         , INTENT(in )                              ::  kjpt    !: dimension of 
+      REAL(wp)        , INTENT(in ), DIMENSION(jpi,jpj,jpk,kjpt) ::  pt      ! tracer fields ( before for 1st call
+      !                                                         ! and laplacian of these fields for 2nd call. 
+      REAL(wp)        , INTENT(out), DIMENSION(jpi,jpj,jpk,kjpt) ::  plt     !: partial harmonic operator applied to  pt  components except
+      !                                                             !: second order vertical derivative term  
+      INTEGER         , INTENT(in )                              ::  kaht    !: =1 multiply the laplacian by the eddy diffusivity coeff.
+      !                                                             !: =2 no multiplication 
+      !!
+      INTEGER ::   ji, jj, jk,jn          ! dummy loop indices
+      !                                   ! temporary scalars
+      REAL(wp) ::  zabe1, zabe2, zmku, zmkv 
+      REAL(wp) ::  zbtr, ztah, ztav
+      REAL(wp) ::  zcof0, zcof1, zcof2, zcof3, zcof4
+      REAL(wp), POINTER, DIMENSION(:,:) ::  zftu, zdkt, zdk1t
+      REAL(wp), POINTER, DIMENSION(:,:) ::  zftw, zdit, zdjt, zdj1t
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('ldfght')
+      !
+      CALL wrk_alloc( jpi, jpj, zftu, zdkt, zdk1t ) 
+      CALL wrk_alloc( jpi, jpk, zftw, zdit, zdjt, zdj1t ) 
+      !
+      DO jn = 1, kjpt
+         !                               ! ********** !   ! ===============
+         DO jk = 1, jpkm1                ! First step !   ! Horizontal slab
+            !                            ! ********** !   ! ===============
+            
+            ! I.1 Vertical gradient of pt and ps at level jk and jk+1
+            ! -------------------------------------------------------
+            !     surface boundary condition: zdkt(jk=1)=zdkt(jk=2)
+            
+            zdk1t(:,:) = ( pt(:,:,jk,jn) - pt(:,:,jk+1,jn) ) * tmask(:,:,jk+1)
+            IF( jk == 1 ) THEN
+               zdkt(:,:) = zdk1t(:,:)
+            ELSE
+               zdkt(:,:) = ( pt(:,:,jk-1,jn) - pt(:,:,jk,jn) ) * tmask(:,:,jk)
+            ENDIF
+
+
+            ! I.2 Horizontal fluxes
+            ! ---------------------
+            
+            DO jj = 1, jpjm1
+               DO ji = 1, jpim1
+                  zabe1 = re2u_e1u(ji,jj) * fse3u_n(ji,jj,jk)
+                  zabe2 = re1v_e2v(ji,jj) * fse3v_n(ji,jj,jk)
+                  
+                  zmku = 1./MAX( tmask(ji+1,jj,jk  )+tmask(ji,jj,jk+1)   &
+                     &          +tmask(ji+1,jj,jk+1)+tmask(ji,jj,jk  ),1. )
+                  zmkv = 1./MAX( tmask(ji,jj+1,jk  )+tmask(ji,jj,jk+1)   &
+                     &          +tmask(ji,jj+1,jk+1)+tmask(ji,jj,jk  ),1. )
+                  
+                  zcof1 = -e2u(ji,jj) * uslp(ji,jj,jk) * zmku
+                  zcof2 = -e1v(ji,jj) * vslp(ji,jj,jk) * zmkv
+                  
+                  zftu(ji,jj)= umask(ji,jj,jk) *   &
+                     &         (  zabe1 *( pt   (ji+1,jj,jk,jn) - pt(ji,jj,jk,jn) )   &
+                     &          + zcof1 *( zdkt (ji+1,jj) + zdk1t(ji,jj)     &
+                     &                    +zdk1t(ji+1,jj) + zdkt (ji,jj) )  )
+                  
+                  zftv(ji,jj,jk)= vmask(ji,jj,jk) *   &
+                     &         (  zabe2 *( pt(ji,jj+1,jk,jn) - pt(ji,jj,jk,jn) )   &
+                     &          + zcof2 *( zdkt (ji,jj+1) + zdk1t(ji,jj)     &
+                     &                    +zdk1t(ji,jj+1) + zdkt (ji,jj) )  )                  
+               END DO
+            END DO
+
+
+            ! I.3 Second derivative (divergence) (not divided by the volume)
+            ! ---------------------
+            
+            DO jj = 2 , jpjm1
+               DO ji = 2 , jpim1
+                  ztah = zftu(ji,jj) - zftu(ji-1,jj) + zftv(ji,jj,jk) - zftv(ji,jj-1,jk)
+                  plt(ji,jj,jk,jn) = ztah
+               END DO
+            END DO
+            !                                             ! ===============
+         END DO                                           !   End of slab
+         !                                                ! ===============
+         ! "Poleward" diffusive heat or salt transport
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( kaht == 2 ) .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN
+            ! note sign is reversed to give down-gradient diffusive transports (#1043)
+            IF( jn == jp_tem)   htr_ldf(:) = ptr_vj( -zftv(:,:,:) )
+            IF( jn == jp_sal)   str_ldf(:) = ptr_vj( -zftv(:,:,:) )
+         ENDIF
+
+         !                             ! ************ !   ! ===============
+         DO jj = 2, jpjm1              !  Second step !   ! Horizontal slab
+            !                          ! ************ !   ! ===============
+            
+            ! II.1 horizontal tracer gradient
+            ! -------------------------------
+            
+            DO jk = 1, jpk
+               DO ji = 1, jpim1
+                  zdit (ji,jk) = ( pt(ji+1,jj  ,jk,jn) - pt(ji,jj  ,jk,jn) ) * umask(ji,jj  ,jk)
+                  zdjt (ji,jk) = ( pt(ji  ,jj+1,jk,jn) - pt(ji,jj  ,jk,jn) ) * vmask(ji,jj  ,jk)
+                  zdj1t(ji,jk) = ( pt(ji  ,jj  ,jk,jn) - pt(ji,jj-1,jk,jn) ) * vmask(ji,jj-1,jk)
+               END DO
+            END DO
+
+
+            ! II.2 Vertical fluxes
+            ! --------------------
+            
+            ! Surface and bottom vertical fluxes set to zero
+            zftw(:, 1 ) = 0.e0
+            zftw(:,jpk) = 0.e0
+            
+            ! interior (2=<jk=<jpk-1)
+            DO jk = 2, jpkm1
+               DO ji = 2, jpim1
+                  zcof0 = e12t(ji,jj) / fse3w_n(ji,jj,jk)   &
+                     &     * (  wslpi(ji,jj,jk) * wslpi(ji,jj,jk)        &
+                     &        + wslpj(ji,jj,jk) * wslpj(ji,jj,jk)  )
+                  
+                  zmku = 1./MAX(  umask(ji  ,jj,jk-1)+umask(ji-1,jj,jk)   &
+                     &           +umask(ji-1,jj,jk-1)+umask(ji  ,jj,jk), 1. )
+                  
+                  zmkv = 1./MAX(  vmask(ji,jj  ,jk-1)+vmask(ji,jj-1,jk)   &
+                     &           +vmask(ji,jj-1,jk-1)+vmask(ji,jj  ,jk), 1. )
+                  
+                  zcof3 = - e2t(ji,jj) * wslpi (ji,jj,jk) * zmku
+                  zcof4 = - e1t(ji,jj) * wslpj (ji,jj,jk) * zmkv
+                  
+                  zftw(ji,jk) = tmask(ji,jj,jk) *   &
+                     &    (  zcof0 * ( pt   (ji,jj,jk-1,jn) - pt   (ji  ,jj,jk,jn) )   &
+                     &     + zcof3 * ( zdit (ji   ,jk-1   ) + zdit (ji-1,jk      )     &
+                     &                +zdit (ji-1 ,jk-1   ) + zdit (ji  ,jk      ) )   &
+                     &     + zcof4 * ( zdjt (ji   ,jk-1   ) + zdj1t(ji  ,jk)     &
+                     &                +zdj1t(ji   ,jk-1   ) + zdjt (ji  ,jk      ) )  )                 
+               END DO
+            END DO
+
+
+            ! II.3 Divergence of vertical fluxes added to the horizontal divergence
+            ! ---------------------------------------------------------------------
+            
+            IF( kaht == 1 ) THEN
+               ! multiply the laplacian by the eddy diffusivity coefficient
+               DO jk = 1, jpkm1
+                  DO ji = 2, jpim1
+                     ! eddy coef. divided by the volume element
+                     zbtr = 1.0 / ( e12t(ji,jj) * fse3t_n(ji,jj,jk) )
+                     ! vertical divergence
+                     ztav = fsahtt(ji,jj,jk) * ( zftw(ji,jk) - zftw(ji,jk+1) )
+                     ! harmonic operator applied to (pt,ps) and multiply by aht
+                     plt(ji,jj,jk,jn) = ( plt(ji,jj,jk,jn) + ztav ) * zbtr
+                  END DO
+               END DO
+            ELSEIF( kaht == 2 ) THEN
+               ! second call, no multiplication
+               DO jk = 1, jpkm1
+                  DO ji = 2, jpim1
+                     ! inverse of the volume element
+                     zbtr = 1.0 / ( e12t(ji,jj) * fse3t_n(ji,jj,jk) )
+                     ! vertical divergence
+                     ztav = zftw(ji,jk) - zftw(ji,jk+1)
+                     ! harmonic operator applied to (pt,ps) 
+                     plt(ji,jj,jk,jn) = ( plt(ji,jj,jk,jn) + ztav ) * zbtr
+                  END DO
+               END DO
+            ELSE
+               IF(lwp) WRITE(numout,*) ' ldfght: kaht= 1 or 2, here =', kaht
+               IF(lwp) WRITE(numout,*) '         We stop'
+               STOP 'ldfght'
+            ENDIF
+            !                                             ! ===============
+         END DO                                           !   End of slab
+         !                                                ! ===============
+      END DO
+      !
+      CALL wrk_dealloc( jpi, jpj, zftu, zdkt, zdk1t ) 
+      CALL wrk_dealloc( jpi, jpk, zftw, zdit, zdjt, zdj1t ) 
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('ldfght')
+      !
+   END SUBROUTINE ldfght
+
+#else  
+   !!----------------------------------------------------------------------
+   !!   Dummy module :             NO rotation of the lateral mixing tensor
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE tra_ldf_bilapg( kt, kit000, cdtype, ptb, pta, kjpt )      ! Empty routine
+      INTEGER :: kt, kit000
+      CHARACTER(len=3) ::   cdtype
+      REAL, DIMENSION(:,:,:,:) ::   ptb, pta
+      WRITE(*,*) 'tra_ldf_iso: You should not have seen this print! error?', &
+        &         kt, kit000, cdtype, ptb(1,1,1,1), pta(1,1,1,1), kjpt
+   END SUBROUTINE tra_ldf_bilapg
+#endif
+
+   !!==============================================================================
+END MODULE traldf_bilapg
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_iso.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_iso.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_iso.F90	(revision 2504)
@@ -0,0 +1,322 @@
+MODULE traldf_iso
+   !!======================================================================
+   !!                   ***  MODULE  traldf_iso  ***
+   !! Ocean  tracers:  horizontal component of the lateral tracer mixing trend
+   !!======================================================================
+   !! History :  OPA  !  1994-08  (G. Madec, M. Imbard)
+   !!            8.0  !  1997-05  (G. Madec)  split into traldf and trazdf
+   !!            NEMO !  2002-08  (G. Madec)  Free form, F90
+   !!            1.0  !  2005-11  (G. Madec)  merge traldf and trazdf :-)
+   !!            3.3  !  2010-09  (C. Ethe, G. Madec) Merge TRA-TRC
+   !!----------------------------------------------------------------------
+#if   defined key_ldfslp   ||   defined key_esopa
+   !!----------------------------------------------------------------------
+   !!   'key_ldfslp'               slope of the lateral diffusive direction
+   !!----------------------------------------------------------------------
+   !!   tra_ldf_iso  : update the tracer trend with the horizontal 
+   !!                  component of a iso-neutral laplacian operator
+   !!                  and with the vertical part of
+   !!                  the isopycnal or geopotential s-coord. operator 
+   !!----------------------------------------------------------------------
+   USE oce             ! ocean dynamics and active tracers
+   USE dom_oce         ! ocean space and time domain
+   USE trc_oce         ! share passive tracers/Ocean variables
+   USE zdf_oce         ! ocean vertical physics
+   USE ldftra_oce      ! ocean active tracers: lateral physics
+   USE ldfslp          ! iso-neutral slopes
+   USE diaptr_oce          ! poleward transport diagnostics
+   USE in_out_manager  ! I/O manager
+   USE iom             ! I/O library
+#if defined key_diaar5
+   USE phycst          ! physical constants
+   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+#endif
+   USE wrk_nemo        ! Memory Allocation
+   USE timing          ! Timing
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_ldf_iso   ! routine called by step.F90
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "ldftra_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: traldf_iso.F90 4292 2013-11-20 16:28:04Z cetlod $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE tra_ldf_iso( kt, kit000, cdtype, pgu, pgv,              &
+      &                                ptb, pta, kjpt, pahtb0 )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE tra_ldf_iso  ***
+      !!
+      !! ** Purpose :   Compute the before horizontal tracer (t & s) diffusive 
+      !!      trend for a laplacian tensor (ezxcept the dz[ dz[.] ] term) and 
+      !!      add it to the general trend of tracer equation.
+      !!
+      !! ** Method  :   The horizontal component of the lateral diffusive trends 
+      !!      is provided by a 2nd order operator rotated along neural or geopo-
+      !!      tential surfaces to which an eddy induced advection can be added
+      !!      It is computed using before fields (forward in time) and isopyc-
+      !!      nal or geopotential slopes computed in routine ldfslp.
+      !!
+      !!      1st part :  masked horizontal derivative of T  ( di[ t ] )
+      !!      ========    with partial cell update if ln_zps=T.
+      !!
+      !!      2nd part :  horizontal fluxes of the lateral mixing operator
+      !!      ========    
+      !!         zftu = (aht+ahtb0) e2u*e3u/e1u di[ tb ]
+      !!               - aht       e2u*uslp    dk[ mi(mk(tb)) ]
+      !!         zftv = (aht+ahtb0) e1v*e3v/e2v dj[ tb ]
+      !!               - aht       e2u*vslp    dk[ mj(mk(tb)) ]
+      !!      take the horizontal divergence of the fluxes:
+      !!         difft = 1/(e1t*e2t*e3t) {  di-1[ zftu ] +  dj-1[ zftv ]  }
+      !!      Add this trend to the general trend (ta,sa):
+      !!         ta = ta + difft
+      !!
+      !!      3rd part: vertical trends of the lateral mixing operator
+      !!      ========  (excluding the vertical flux proportional to dk[t] )
+      !!      vertical fluxes associated with the rotated lateral mixing:
+      !!         zftw =-aht {  e2t*wslpi di[ mi(mk(tb)) ]
+      !!                     + e1t*wslpj dj[ mj(mk(tb)) ]  }
+      !!      take the horizontal divergence of the fluxes:
+      !!         difft = 1/(e1t*e2t*e3t) dk[ zftw ]
+      !!      Add this trend to the general trend (ta,sa):
+      !!         pta = pta + difft
+      !!
+      !! ** Action :   Update pta arrays with the before rotated diffusion
+      !!----------------------------------------------------------------------
+      USE oce     , ONLY:   zftu => ua       , zftv  => va         ! (ua,va) used as workspace
+      !
+      INTEGER                              , INTENT(in   ) ::   kt         ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000          ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers
+      REAL(wp), DIMENSION(jpi,jpj    ,kjpt), INTENT(in   ) ::   pgu, pgv   ! tracer gradient at pstep levels
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb        ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta        ! tracer trend 
+      REAL(wp)                             , INTENT(in   ) ::   pahtb0     ! background diffusion coef
+      !
+      INTEGER  ::  ji, jj, jk, jn   ! dummy loop indices
+      REAL(wp) ::  zmsku, zabe1, zcof1, zcoef3   ! local scalars
+      REAL(wp) ::  zmskv, zabe2, zcof2, zcoef4   !   -      -
+      REAL(wp) ::  zcoef0, zbtr, ztra            !   -      -
+#if defined key_diaar5
+      REAL(wp)                         ::   zztmp               ! local scalar
+#endif
+      REAL(wp), POINTER, DIMENSION(:,:  ) ::  zdkt, zdk1t, z2d
+      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zdit, zdjt, ztfw 
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tra_ldf_iso')
+      !
+      CALL wrk_alloc( jpi, jpj,      zdkt, zdk1t, z2d ) 
+      CALL wrk_alloc( jpi, jpj, jpk, zdit, zdjt, ztfw  ) 
+      !
+
+      IF( kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_ldf_iso : rotated laplacian diffusion operator on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+      ENDIF
+      !
+      !                                                          ! ===========
+      DO jn = 1, kjpt                                            ! tracer loop
+         !                                                       ! ===========
+         !                                               
+         !!----------------------------------------------------------------------
+         !!   I - masked horizontal derivative 
+         !!----------------------------------------------------------------------
+         !!bug ajout.... why?   ( 1,jpj,:) and (jpi,1,:) should be sufficient....
+         zdit (1,:,:) = 0.e0     ;     zdit (jpi,:,:) = 0.e0
+         zdjt (1,:,:) = 0.e0     ;     zdjt (jpi,:,:) = 0.e0
+         !!end
+
+         ! Horizontal tracer gradient 
+         DO jk = 1, jpkm1
+            DO jj = 1, jpjm1
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zdit(ji,jj,jk) = ( ptb(ji+1,jj  ,jk,jn) - ptb(ji,jj,jk,jn) ) * umask(ji,jj,jk)
+                  zdjt(ji,jj,jk) = ( ptb(ji  ,jj+1,jk,jn) - ptb(ji,jj,jk,jn) ) * vmask(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         IF( ln_zps ) THEN      ! partial steps correction at the last ocean level 
+            DO jj = 1, jpjm1
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zdit(ji,jj,mbku(ji,jj)) = pgu(ji,jj,jn)          
+                  zdjt(ji,jj,mbkv(ji,jj)) = pgv(ji,jj,jn)      
+               END DO
+            END DO
+         ENDIF
+
+         !!----------------------------------------------------------------------
+         !!   II - horizontal trend  (full)
+         !!----------------------------------------------------------------------
+!CDIR PARALLEL DO PRIVATE( zdk1t ) 
+         !                                                ! ===============
+         DO jk = 1, jpkm1                                 ! Horizontal slab
+            !                                             ! ===============
+            ! 1. Vertical tracer gradient at level jk and jk+1
+            ! ------------------------------------------------
+            ! surface boundary condition: zdkt(jk=1)=zdkt(jk=2)
+            zdk1t(:,:) = ( ptb(:,:,jk,jn) - ptb(:,:,jk+1,jn) ) * tmask(:,:,jk+1)
+            !
+            IF( jk == 1 ) THEN   ;   zdkt(:,:) = zdk1t(:,:)
+            ELSE                 ;   zdkt(:,:) = ( ptb(:,:,jk-1,jn) - ptb(:,:,jk,jn) ) * tmask(:,:,jk)
+            ENDIF
+
+            ! 2. Horizontal fluxes
+            ! --------------------   
+            DO jj = 1 , jpjm1
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zabe1 = ( fsahtu(ji,jj,jk) + pahtb0 ) * re2u_e1u(ji,jj) * fse3u_n(ji,jj,jk)
+                  zabe2 = ( fsahtv(ji,jj,jk) + pahtb0 ) * re1v_e2v(ji,jj) * fse3v_n(ji,jj,jk)
+                  !
+                  zmsku = 1. / MAX(  tmask(ji+1,jj,jk  ) + tmask(ji,jj,jk+1)   &
+                     &             + tmask(ji+1,jj,jk+1) + tmask(ji,jj,jk  ), 1. )
+                  !
+                  zmskv = 1. / MAX(  tmask(ji,jj+1,jk  ) + tmask(ji,jj,jk+1)   &
+                     &             + tmask(ji,jj+1,jk+1) + tmask(ji,jj,jk  ), 1. )
+                  !
+                  zcof1 = - fsahtu(ji,jj,jk) * e2u(ji,jj) * uslp(ji,jj,jk) * zmsku
+                  zcof2 = - fsahtv(ji,jj,jk) * e1v(ji,jj) * vslp(ji,jj,jk) * zmskv
+                  !
+                  zftu(ji,jj,jk ) = (  zabe1 * zdit(ji,jj,jk)   &
+                     &              + zcof1 * (  zdkt (ji+1,jj) + zdk1t(ji,jj)      &
+                     &                         + zdk1t(ji+1,jj) + zdkt (ji,jj)  )  ) * umask(ji,jj,jk)
+                  zftv(ji,jj,jk) = (  zabe2 * zdjt(ji,jj,jk)   &
+                     &              + zcof2 * (  zdkt (ji,jj+1) + zdk1t(ji,jj)      &
+                     &                         + zdk1t(ji,jj+1) + zdkt (ji,jj)  )  ) * vmask(ji,jj,jk)                  
+               END DO
+            END DO
+
+            ! II.4 Second derivative (divergence) and add to the general trend
+            ! ----------------------------------------------------------------
+            DO jj = 2 , jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1.0 / ( e12t(ji,jj) * fse3t_n(ji,jj,jk) )
+                  ztra = zbtr * ( zftu(ji,jj,jk) - zftu(ji-1,jj,jk) + zftv(ji,jj,jk) - zftv(ji,jj-1,jk)  )
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+            !                                          ! ===============
+         END DO                                        !   End of slab  
+         !                                             ! ===============
+         !
+         ! "Poleward" diffusive heat or salt transports (T-S case only)
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN
+            ! note sign is reversed to give down-gradient diffusive transports (#1043)
+            IF( jn == jp_tem)   htr_ldf(:) = ptr_vj( -zftv(:,:,:) )
+            IF( jn == jp_sal)   str_ldf(:) = ptr_vj( -zftv(:,:,:) )
+         ENDIF
+ 
+#if defined key_diaar5
+         IF( cdtype == 'TRA' .AND. jn == jp_tem  ) THEN
+            z2d(:,:) = 0._wp 
+            ! note sign is reversed to give down-gradient diffusive transports (#1043)
+            zztmp = -1.0_wp * rau0 * rcp
+            DO jk = 1, jpkm1
+               DO jj = 2, jpjm1
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     z2d(ji,jj) = z2d(ji,jj) + zftu(ji,jj,jk) 
+                  END DO
+               END DO
+            END DO
+            z2d(:,:) = zztmp * z2d(:,:)
+            CALL lbc_lnk( z2d, 'U', -1. )
+            CALL iom_put( "udiff_heattr", z2d )                  ! heat transport in i-direction
+            z2d(:,:) = 0._wp 
+            DO jk = 1, jpkm1
+               DO jj = 2, jpjm1
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     z2d(ji,jj) = z2d(ji,jj) + zftv(ji,jj,jk) 
+                  END DO
+               END DO
+            END DO
+            z2d(:,:) = zztmp * z2d(:,:)
+            CALL lbc_lnk( z2d, 'V', -1. )
+            CALL iom_put( "vdiff_heattr", z2d )                  !  heat transport in i-direction
+         END IF
+#endif
+
+         !!----------------------------------------------------------------------
+         !!   III - vertical trend of T & S (extra diagonal terms only)
+         !!----------------------------------------------------------------------
+         
+         ! Local constant initialization
+         ! -----------------------------
+         ztfw(1,:,:) = 0.e0     ;     ztfw(jpi,:,:) = 0.e0
+         
+         ! Vertical fluxes
+         ! ---------------
+         
+         ! Surface and bottom vertical fluxes set to zero
+         ztfw(:,:, 1 ) = 0.e0      ;      ztfw(:,:,jpk) = 0.e0
+         
+         ! interior (2=<jk=<jpk-1)
+         DO jk = 2, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zcoef0 = - fsahtw(ji,jj,jk) * tmask(ji,jj,jk)
+                  !
+                  zmsku = 1./MAX(   umask(ji  ,jj,jk-1) + umask(ji-1,jj,jk)      &
+                     &            + umask(ji-1,jj,jk-1) + umask(ji  ,jj,jk), 1.  )
+                  zmskv = 1./MAX(   vmask(ji,jj  ,jk-1) + vmask(ji,jj-1,jk)      &
+                     &            + vmask(ji,jj-1,jk-1) + vmask(ji,jj  ,jk), 1.  )
+                  !
+                  zcoef3 = zcoef0 * e2t(ji,jj) * zmsku * wslpi (ji,jj,jk)
+                  zcoef4 = zcoef0 * e1t(ji,jj) * zmskv * wslpj (ji,jj,jk)
+                  !
+                  ztfw(ji,jj,jk) = zcoef3 * (   zdit(ji  ,jj  ,jk-1) + zdit(ji-1,jj  ,jk)      &
+                     &                        + zdit(ji-1,jj  ,jk-1) + zdit(ji  ,jj  ,jk)  )   &
+                     &           + zcoef4 * (   zdjt(ji  ,jj  ,jk-1) + zdjt(ji  ,jj-1,jk)      &
+                     &                        + zdjt(ji  ,jj-1,jk-1) + zdjt(ji  ,jj  ,jk)  )
+               END DO
+            END DO
+         END DO
+         
+         
+         ! I.5 Divergence of vertical fluxes added to the general tracer trend
+         ! -------------------------------------------------------------------
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1.0 / ( e12t(ji,jj) * fse3t_n(ji,jj,jk) )
+                  ztra = (  ztfw(ji,jj,jk) - ztfw(ji,jj,jk+1)  ) * zbtr
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + ztra
+               END DO
+            END DO
+         END DO
+         !
+      END DO
+      !
+      CALL wrk_dealloc( jpi, jpj,      zdkt, zdk1t, z2d ) 
+      CALL wrk_dealloc( jpi, jpj, jpk, zdit, zdjt, ztfw  ) 
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tra_ldf_iso')
+      !
+   END SUBROUTINE tra_ldf_iso
+
+#else
+   !!----------------------------------------------------------------------
+   !!   default option :   Dummy code   NO rotation of the diffusive tensor
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE tra_ldf_iso( kt, kit000,cdtype, pgu, pgv, ptb, pta, kjpt, pahtb0 )      ! Empty routine
+      INTEGER:: kt, kit000
+      CHARACTER(len=3) ::   cdtype
+      REAL, DIMENSION(:,:,:) ::   pgu, pgv   ! tracer gradient at pstep levels
+      REAL, DIMENSION(:,:,:,:) ::   ptb, pta
+      WRITE(*,*) 'tra_ldf_iso: You should not have seen this print! error?', kt, kit000, cdtype,   &
+         &                       pgu(1,1,1), pgv(1,1,1), ptb(1,1,1,1), pta(1,1,1,1), kjpt, pahtb0
+   END SUBROUTINE tra_ldf_iso
+#endif
+
+   !!==============================================================================
+END MODULE traldf_iso
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_iso_grif.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_iso_grif.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_iso_grif.F90	(revision 2504)
@@ -0,0 +1,454 @@
+MODULE traldf_iso_grif
+   !!======================================================================
+   !!                   ***  MODULE  traldf_iso_grif  ***
+   !! Ocean  tracers:  horizontal component of the lateral tracer mixing trend
+   !!======================================================================
+   !! History : 3.3  ! 2010-10  (G. Nurser, C. Harris, G. Madec)
+   !!                !          Griffies operator version adapted from traldf_iso.F90
+   !!----------------------------------------------------------------------
+#if   defined key_ldfslp   ||   defined key_esopa
+   !!----------------------------------------------------------------------
+   !!   'key_ldfslp'               slope of the lateral diffusive direction
+   !!----------------------------------------------------------------------
+   !!   tra_ldf_iso_grif  : update the tracer trend with the horizontal component
+   !!                       of the Griffies iso-neutral laplacian operator
+   !!----------------------------------------------------------------------
+   USE oce             ! ocean dynamics and active tracers
+   USE dom_oce         ! ocean space and time domain
+   USE phycst          ! physical constants
+   USE trc_oce         ! share passive tracers/Ocean variables
+   USE zdf_oce         ! ocean vertical physics
+   USE ldftra_oce      ! ocean active tracers: lateral physics
+   USE ldfslp          ! iso-neutral slopes
+   USE diaptr_oce          ! poleward transport diagnostics
+   USE in_out_manager  ! I/O manager
+   USE iom             ! I/O library
+   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+   USE lib_mpp         ! MPP library
+   USE wrk_nemo        ! Memory Allocation
+   USE timing          ! Timing
+
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_ldf_iso_grif   ! routine called by traldf.F90
+
+   REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE, SAVE ::   psix_eiv, psiy_eiv   !: eiv stream function (diag only)
+   REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE, SAVE ::   ah_wslp2             !: aeiv*w-slope^2
+   REAL(wp),         DIMENSION(:,:,:), ALLOCATABLE, SAVE ::   zdkt3d               !: vertical tracer gradient at 2 levels
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "ldftra_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+#  include "ldfeiv_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: traldf_iso_grif.F90 3632 2012-11-22 15:28:42Z acc $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+  SUBROUTINE tra_ldf_iso_grif( kt, kit000, cdtype, pgu, pgv,              &
+       &                                   ptb, pta, kjpt, pahtb0 )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE tra_ldf_iso_grif  ***
+      !!
+      !! ** Purpose :   Compute the before horizontal tracer (t & s) diffusive
+      !!      trend for a laplacian tensor (ezxcept the dz[ dz[.] ] term) and
+      !!      add it to the general trend of tracer equation.
+      !!
+      !! ** Method  :   The horizontal component of the lateral diffusive trends
+      !!      is provided by a 2nd order operator rotated along neural or geopo-
+      !!      tential surfaces to which an eddy induced advection can be added
+      !!      It is computed using before fields (forward in time) and isopyc-
+      !!      nal or geopotential slopes computed in routine ldfslp.
+      !!
+      !!      1st part :  masked horizontal derivative of T  ( di[ t ] )
+      !!      ========    with partial cell update if ln_zps=T.
+      !!
+      !!      2nd part :  horizontal fluxes of the lateral mixing operator
+      !!      ========
+      !!         zftu = (aht+ahtb0) e2u*e3u/e1u di[ tb ]
+      !!               - aht       e2u*uslp    dk[ mi(mk(tb)) ]
+      !!         zftv = (aht+ahtb0) e1v*e3v/e2v dj[ tb ]
+      !!               - aht       e2u*vslp    dk[ mj(mk(tb)) ]
+      !!      take the horizontal divergence of the fluxes:
+      !!         difft = 1/(e1t*e2t*e3t) {  di-1[ zftu ] +  dj-1[ zftv ]  }
+      !!      Add this trend to the general trend (ta,sa):
+      !!         ta = ta + difft
+      !!
+      !!      3rd part: vertical trends of the lateral mixing operator
+      !!      ========  (excluding the vertical flux proportional to dk[t] )
+      !!      vertical fluxes associated with the rotated lateral mixing:
+      !!         zftw =-aht {  e2t*wslpi di[ mi(mk(tb)) ]
+      !!                     + e1t*wslpj dj[ mj(mk(tb)) ]  }
+      !!      take the horizontal divergence of the fluxes:
+      !!         difft = 1/(e1t*e2t*e3t) dk[ zftw ]
+      !!      Add this trend to the general trend (ta,sa):
+      !!         pta = pta + difft
+      !!
+      !! ** Action :   Update pta arrays with the before rotated diffusion
+      !!----------------------------------------------------------------------
+      USE oce     , ONLY:   zftu => ua       , zftv => va            ! (ua,va) used as 3D workspace
+      !
+      INTEGER                              , INTENT(in   ) ::   kt         ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000     ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers
+      REAL(wp), DIMENSION(jpi,jpj    ,kjpt), INTENT(in   ) ::   pgu, pgv   ! tracer gradient at pstep levels
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb        ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta        ! tracer trend
+      REAL(wp)                             , INTENT(in   ) ::   pahtb0     ! background diffusion coef
+      !
+      INTEGER  ::  ji, jj, jk,jn   ! dummy loop indices
+      INTEGER  ::  ip,jp,kp        ! dummy loop indices
+      INTEGER  ::  ierr            ! temporary integer
+      REAL(wp) ::  zmsku, zabe1, zcof1, zcoef3   ! local scalars
+      REAL(wp) ::  zmskv, zabe2, zcof2, zcoef4   !   -      -
+      REAL(wp) ::  zcoef0, zbtr                  !   -      -
+      !
+      REAL(wp) ::   zslope_skew, zslope_iso, zslope2, zbu, zbv
+      REAL(wp) ::   ze1ur, zdxt, ze2vr, ze3wr, zdyt, zdzt
+      REAL(wp) ::   zah, zah_slp, zaei_slp
+#if defined key_diaar5
+      REAL(wp) ::   zztmp              ! local scalar
+#endif
+      REAL(wp), POINTER, DIMENSION(:,:  ) :: z2d
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zdit, zdjt, ztfw 
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zw3d       ! 3D workspace
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tra_ldf_iso_grif')
+      !
+      CALL wrk_alloc( jpi, jpj,      z2d ) 
+      CALL wrk_alloc( jpi, jpj, jpk, zdit, zdjt, ztfw  ) 
+      !
+
+      IF( kt == kit000 .AND. .NOT.ALLOCATED(ah_wslp2) )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_ldf_iso_grif : rotated laplacian diffusion operator on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         ALLOCATE( ah_wslp2(jpi,jpj,jpk) , zdkt3d(jpi,jpj,0:1), STAT=ierr )
+         IF( lk_mpp   )   CALL mpp_sum ( ierr )
+         IF( ierr > 0 )   CALL ctl_stop('STOP', 'tra_ldf_iso_grif: unable to allocate arrays')
+         IF( ln_traldf_gdia ) THEN
+            IF (.NOT. ALLOCATED(psix_eiv))THEN
+                ALLOCATE( psix_eiv(jpi,jpj,jpk) , psiy_eiv(jpi,jpj,jpk) , STAT=ierr )
+                IF( lk_mpp   )   CALL mpp_sum ( ierr )
+                IF( ierr > 0 )   CALL ctl_stop('STOP', 'tra_ldf_iso_grif: unable to allocate diagnostics')
+            ENDIF
+         ENDIF
+      ENDIF
+
+      !!----------------------------------------------------------------------
+      !!   0 - calculate  ah_wslp2, psix_eiv, psiy_eiv
+      !!----------------------------------------------------------------------
+
+      !!gm Future development: consider using Ah defined at T-points and attached to the 4 t-point triads
+
+      ah_wslp2(:,:,:) = 0._wp
+      IF( ln_traldf_gdia ) THEN
+         psix_eiv(:,:,:) = 0._wp
+         psiy_eiv(:,:,:) = 0._wp
+      ENDIF
+
+      DO ip = 0, 1
+         DO kp = 0, 1
+            DO jk = 1, jpkm1
+               DO jj = 1, jpjm1
+                  DO ji = 1, fs_jpim1
+                     ze1ur = 1._wp / e1u(ji,jj)
+                     ze3wr = 1._wp / fse3w(ji+ip,jj,jk+kp)
+                     zbu   = 0.25_wp * e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk)
+                     zah   = fsahtu(ji,jj,jk)                                  ! fsaht(ji+ip,jj,jk)
+                     zslope_skew = triadi_g(ji+ip,jj,jk,1-ip,kp)
+                     ! Subtract s-coordinate slope at t-points to give slope rel to s surfaces
+                     ! (do this by *adding* gradient of depth)
+                     zslope2 = zslope_skew + ( fsdept(ji+1,jj,jk) - fsdept(ji ,jj ,jk) ) * ze1ur * umask(ji,jj,jk+kp)
+                     zslope2 = zslope2 *zslope2
+                     ah_wslp2(ji+ip,jj,jk+kp) = ah_wslp2(ji+ip,jj,jk+kp)    &
+                        &                     + zah * ( zbu * ze3wr / ( e1t(ji+ip,jj) * e2t(ji+ip,jj) ) ) * zslope2
+                     IF( ln_traldf_gdia ) THEN
+                        zaei_slp = fsaeiw(ji+ip,jj,jk) * zslope_skew           ! fsaeit(ji+ip,jj,jk)*zslope_skew
+                        psix_eiv(ji,jj,jk+kp) = psix_eiv(ji,jj,jk+kp) + 0.25_wp * zaei_slp
+                     ENDIF
+                  END DO
+               END DO
+            END DO
+         END DO
+      END DO
+      !
+      DO jp = 0, 1
+         DO kp = 0, 1
+            DO jk = 1, jpkm1
+               DO jj = 1, jpjm1
+                  DO ji=1,fs_jpim1
+                     ze2vr = 1._wp / e2v(ji,jj)
+                     ze3wr = 1.0_wp / fse3w(ji,jj+jp,jk+kp)
+                     zbv   = 0.25_wp * e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk)
+                     zah   = fsahtv(ji,jj,jk)                                  ! fsaht(ji,jj+jp,jk)
+                     zslope_skew = triadj_g(ji,jj+jp,jk,1-jp,kp)
+                     ! Subtract s-coordinate slope at t-points to give slope rel to s surfaces
+                     !    (do this by *adding* gradient of depth)
+                     zslope2 = zslope_skew + ( fsdept(ji,jj+1,jk) - fsdept(ji,jj,jk) ) * ze2vr * vmask(ji,jj,jk+kp)
+                     zslope2 = zslope2 * zslope2
+                     ah_wslp2(ji,jj+jp,jk+kp) = ah_wslp2(ji,jj+jp,jk+kp)   &
+                        &                     + zah * ( zbv * ze3wr / ( e1t(ji,jj+jp) * e2t(ji,jj+jp) ) ) * zslope2
+                     IF( ln_traldf_gdia ) THEN
+                        zaei_slp = fsaeiw(ji,jj+jp,jk) * zslope_skew           ! fsaeit(ji,jj+jp,jk)*zslope_skew
+                        psiy_eiv(ji,jj,jk+kp) = psiy_eiv(ji,jj,jk+kp) + 0.25_wp * zaei_slp
+                     ENDIF
+                  END DO
+               END DO
+            END DO
+         END DO
+      END DO
+      !
+#if defined key_iomput
+      IF( ln_traldf_gdia .AND. cdtype == 'TRA' ) THEN
+         CALL wrk_alloc( jpi , jpj , jpk  , zw3d )
+         DO jk=1,jpkm1
+            zw3d(:,:,jk) = (psix_eiv(:,:,jk+1) - psix_eiv(:,:,jk))/fse3u(:,:,jk)  ! u_eiv = -dpsix/dz
+         END DO
+         zw3d(:,:,jpk) = 0._wp
+         CALL iom_put( "uoce_eiv", zw3d )    ! i-eiv current
+
+         DO jk=1,jpk-1
+            zw3d(:,:,jk) = (psiy_eiv(:,:,jk+1) - psiy_eiv(:,:,jk))/fse3v(:,:,jk)  ! v_eiv = -dpsiy/dz
+         END DO
+         zw3d(:,:,jpk) = 0._wp
+         CALL iom_put( "voce_eiv", zw3d )    ! j-eiv current
+
+         DO jk=1,jpk-1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1  ! vector opt.
+                  zw3d(ji,jj,jk) = (psiy_eiv(ji,jj,jk) - psiy_eiv(ji,jj-1,jk))/e2t(ji,jj) + &
+                       &    (psix_eiv(ji,jj,jk) - psix_eiv(ji-1,jj,jk))/e1t(ji,jj) ! w_eiv = dpsiy/dy + dpsiy/dx
+               END DO
+            END DO
+         END DO
+         zw3d(:,:,jpk) = 0._wp
+         CALL iom_put( "woce_eiv", zw3d )    ! vert. eiv current
+         CALL wrk_dealloc( jpi , jpj , jpk  , zw3d )
+      ENDIF
+#endif
+      !                                                          ! ===========
+      DO jn = 1, kjpt                                            ! tracer loop
+         !                                                       ! ===========
+         ! Zero fluxes for each tracer
+         ztfw(:,:,:) = 0._wp
+         zftu(:,:,:) = 0._wp
+         zftv(:,:,:) = 0._wp
+         !
+         DO jk = 1, jpkm1                          !==  before lateral T & S gradients at T-level jk  ==!
+            DO jj = 1, jpjm1
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zdit(ji,jj,jk) = ( ptb(ji+1,jj  ,jk,jn) - ptb(ji,jj,jk,jn) ) * umask(ji,jj,jk)
+                  zdjt(ji,jj,jk) = ( ptb(ji  ,jj+1,jk,jn) - ptb(ji,jj,jk,jn) ) * vmask(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         IF( ln_zps.and.l_grad_zps ) THEN              ! partial steps: correction at the last level
+# if defined key_vectopt_loop
+            DO jj = 1, 1
+               DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
+# else
+            DO jj = 1, jpjm1
+               DO ji = 1, jpim1
+# endif
+                  zdit(ji,jj,mbku(ji,jj)) = pgu(ji,jj,jn)
+                  zdjt(ji,jj,mbkv(ji,jj)) = pgv(ji,jj,jn)
+               END DO
+            END DO
+         ENDIF
+
+         !!----------------------------------------------------------------------
+         !!   II - horizontal trend  (full)
+         !!----------------------------------------------------------------------
+         !
+         DO jk = 1, jpkm1
+            !
+            !                    !==  Vertical tracer gradient at level jk and jk+1
+            zdkt3d(:,:,1) = ( ptb(:,:,jk,jn) - ptb(:,:,jk+1,jn) ) * tmask(:,:,jk+1)
+            !
+            !                    ! surface boundary condition: zdkt3d(jk=0)=zdkt3d(jk=1)
+            IF( jk == 1 ) THEN   ;   zdkt3d(:,:,0) = zdkt3d(:,:,1)
+            ELSE                 ;   zdkt3d(:,:,0) = ( ptb(:,:,jk-1,jn) - ptb(:,:,jk,jn) ) * tmask(:,:,jk)
+            ENDIF
+
+
+            IF (ln_botmix_grif) THEN
+               DO ip = 0, 1              !==  Horizontal & vertical fluxes
+                  DO kp = 0, 1
+                     DO jj = 1, jpjm1
+                        DO ji = 1, fs_jpim1
+                           ze1ur = 1._wp / e1u(ji,jj)
+                           zdxt  = zdit(ji,jj,jk) * ze1ur
+                           ze3wr = 1._wp / fse3w(ji+ip,jj,jk+kp)
+                           zdzt  = zdkt3d(ji+ip,jj,kp) * ze3wr
+                           zslope_skew = triadi_g(ji+ip,jj,jk,1-ip,kp)
+                           zslope_iso  = triadi(ji+ip,jj,jk,1-ip,kp)
+
+                           zbu = 0.25_wp * e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk)
+                           ! ln_botmix_grif is .T. don't mask zah for bottom half cells
+                           zah = fsahtu(ji,jj,jk)   !*umask(ji,jj,jk+kp)         !fsaht(ji+ip,jj,jk)           ===>>  ????
+                           zah_slp  = zah * zslope_iso
+                           zaei_slp = fsaeiw(ji+ip,jj,jk) * zslope_skew    !fsaeit(ji+ip,jj,jk)*zslope_skew
+                           zftu(ji,jj,jk) = zftu(ji,jj,jk) - ( zah * zdxt + (zah_slp - zaei_slp) * zdzt ) * zbu * ze1ur
+                           ztfw(ji+ip,jj,jk+kp) = ztfw(ji+ip,jj,jk+kp) - (zah_slp + zaei_slp) * zdxt * zbu * ze3wr
+                        END DO
+                     END DO
+                  END DO
+               END DO
+
+               DO jp = 0, 1
+                  DO kp = 0, 1
+                     DO jj = 1, jpjm1
+                        DO ji = 1, fs_jpim1
+                           ze2vr = 1._wp / e2v(ji,jj)
+                           zdyt  = zdjt(ji,jj,jk) * ze2vr
+                           ze3wr = 1._wp / fse3w(ji,jj+jp,jk+kp)
+                           zdzt  = zdkt3d(ji,jj+jp,kp) * ze3wr
+                           zslope_skew = triadj_g(ji,jj+jp,jk,1-jp,kp)
+                           zslope_iso  = triadj(ji,jj+jp,jk,1-jp,kp)
+                           zbv = 0.25_wp * e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk)
+                           ! ln_botmix_grif is .T. don't mask zah for bottom half cells
+                           zah = fsahtv(ji,jj,jk)        !*vmask(ji,jj,jk+kp)  ! fsaht(ji,jj+jp,jk)
+                           zah_slp = zah * zslope_iso
+                           zaei_slp = fsaeiw(ji,jj+jp,jk) * zslope_skew        ! fsaeit(ji,jj+jp,jk)*zslope_skew
+                           zftv(ji,jj,jk) = zftv(ji,jj,jk) - ( zah * zdyt + (zah_slp - zaei_slp) * zdzt ) * zbv * ze2vr
+                           ztfw(ji,jj+jp,jk+kp) = ztfw(ji,jj+jp,jk+kp) - (zah_slp + zaei_slp) * zdyt * zbv * ze3wr
+                        END DO
+                     END DO
+                  END DO
+               END DO
+            ELSE
+               DO ip = 0, 1              !==  Horizontal & vertical fluxes
+                  DO kp = 0, 1
+                     DO jj = 1, jpjm1
+                        DO ji = 1, fs_jpim1
+                           ze1ur = 1._wp / e1u(ji,jj)
+                           zdxt  = zdit(ji,jj,jk) * ze1ur
+                           ze3wr = 1._wp / fse3w(ji+ip,jj,jk+kp)
+                           zdzt  = zdkt3d(ji+ip,jj,kp) * ze3wr
+                           zslope_skew = triadi_g(ji+ip,jj,jk,1-ip,kp)
+                           zslope_iso  = triadi(ji+ip,jj,jk,1-ip,kp)
+
+                           zbu = 0.25_wp * e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk)
+                           ! ln_botmix_grif is .F. mask zah for bottom half cells
+                           zah = fsahtu(ji,jj,jk) * umask(ji,jj,jk+kp)         ! fsaht(ji+ip,jj,jk)   ===>>  ????
+                           zah_slp  = zah * zslope_iso
+                           zaei_slp = fsaeiw(ji+ip,jj,jk) * zslope_skew        ! fsaeit(ji+ip,jj,jk)*zslope_skew
+                           zftu(ji,jj,jk) = zftu(ji,jj,jk) - ( zah * zdxt + (zah_slp - zaei_slp) * zdzt ) * zbu * ze1ur
+                           ztfw(ji+ip,jj,jk+kp) = ztfw(ji+ip,jj,jk+kp) - (zah_slp + zaei_slp) * zdxt * zbu * ze3wr
+                        END DO
+                     END DO
+                  END DO
+               END DO
+
+               DO jp = 0, 1
+                  DO kp = 0, 1
+                     DO jj = 1, jpjm1
+                        DO ji = 1, fs_jpim1
+                           ze2vr = 1._wp / e2v(ji,jj)
+                           zdyt  = zdjt(ji,jj,jk) * ze2vr
+                           ze3wr = 1._wp / fse3w(ji,jj+jp,jk+kp)
+                           zdzt  = zdkt3d(ji,jj+jp,kp) * ze3wr
+                           zslope_skew = triadj_g(ji,jj+jp,jk,1-jp,kp)
+                           zslope_iso  = triadj(ji,jj+jp,jk,1-jp,kp)
+                           zbv = 0.25_wp * e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk)
+                           ! ln_botmix_grif is .F. mask zah for bottom half cells
+                           zah = fsahtv(ji,jj,jk) * vmask(ji,jj,jk+kp)         ! fsaht(ji,jj+jp,jk)
+                           zah_slp = zah * zslope_iso
+                           zaei_slp = fsaeiw(ji,jj+jp,jk) * zslope_skew        ! fsaeit(ji,jj+jp,jk)*zslope_skew
+                           zftv(ji,jj,jk) = zftv(ji,jj,jk) - ( zah * zdyt + (zah_slp - zaei_slp) * zdzt ) * zbv * ze2vr
+                           ztfw(ji,jj+jp,jk+kp) = ztfw(ji,jj+jp,jk+kp) - (zah_slp + zaei_slp) * zdyt * zbv * ze3wr
+                        END DO
+                     END DO
+                  END DO
+               END DO
+            END IF
+            !                          !==  divergence and add to the general trend  ==!
+            DO jj = 2 , jpjm1
+               DO ji = fs_2, fs_jpim1  ! vector opt.
+                  zbtr = 1._wp / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + zbtr * (   zftu(ji-1,jj,jk) - zftu(ji,jj,jk)   &
+                     &                                           + zftv(ji,jj-1,jk) - zftv(ji,jj,jk)   )
+               END DO
+            END DO
+            !
+         END DO
+         !
+         DO jk = 1, jpkm1              !== Divergence of vertical fluxes added to the general tracer trend
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1  ! vector opt.
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + (  ztfw(ji,jj,jk+1) - ztfw(ji,jj,jk)  )   &
+                     &                                / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+               END DO
+            END DO
+         END DO
+         !
+         !                             ! "Poleward" diffusive heat or salt transports (T-S case only)
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN
+            IF( jn == jp_tem)   htr_ldf(:) = ptr_vj( zftv(:,:,:) )        ! 3.3  names
+            IF( jn == jp_sal)   str_ldf(:) = ptr_vj( zftv(:,:,:) )
+         ENDIF
+
+#if defined key_diaar5
+         IF( cdtype == 'TRA' .AND. jn == jp_tem  ) THEN
+            z2d(:,:) = 0._wp
+            zztmp = rau0 * rcp
+            DO jk = 1, jpkm1
+               DO jj = 2, jpjm1
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     z2d(ji,jj) = z2d(ji,jj) + zftu(ji,jj,jk)
+                  END DO
+               END DO
+            END DO
+            z2d(:,:) = zztmp * z2d(:,:)
+            CALL lbc_lnk( z2d, 'U', -1. )
+            CALL iom_put( "udiff_heattr", z2d )                  ! heat transport in i-direction
+            z2d(:,:) = 0._wp
+            DO jk = 1, jpkm1
+               DO jj = 2, jpjm1
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     z2d(ji,jj) = z2d(ji,jj) + zftv(ji,jj,jk)
+                  END DO
+               END DO
+            END DO
+            z2d(:,:) = zztmp * z2d(:,:)
+            CALL lbc_lnk( z2d, 'V', -1. )
+            CALL iom_put( "vdiff_heattr", z2d )                  !  heat transport in j-direction
+         END IF
+#endif
+         !
+      END DO
+      !
+      CALL wrk_dealloc( jpi, jpj,      z2d ) 
+      CALL wrk_dealloc( jpi, jpj, jpk, zdit, zdjt, ztfw  ) 
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tra_ldf_iso_grif')
+      !
+  END SUBROUTINE tra_ldf_iso_grif
+
+#else
+   !!----------------------------------------------------------------------
+   !!   default option :   Dummy code   NO rotation of the diffusive tensor
+   !!----------------------------------------------------------------------
+   REAL, PUBLIC, DIMENSION(:,:,:), ALLOCATABLE, SAVE ::   psix_eiv, psiy_eiv   !: eiv stream function (diag only)
+CONTAINS
+   SUBROUTINE tra_ldf_iso_grif( kt, kit000, cdtype, pgu, pgv,              &
+       &                                   ptb, pta, kjpt, pahtb0 )
+      CHARACTER(len=3) ::   cdtype
+      INTEGER          ::   kit000     ! first time step index
+      REAL, DIMENSION(:,:,:) ::   pgu, pgv   ! tracer gradient at pstep levels
+      REAL, DIMENSION(:,:,:,:) ::   ptb, pta
+      WRITE(*,*) 'tra_ldf_iso_grif: You should not have seen this print! error?', kt, cdtype,    &
+         &                  pgu(1,1,1), pgv(1,1,1), ptb(1,1,1,1), pta(1,1,1,1), kjpt, pahtb0
+   END SUBROUTINE tra_ldf_iso_grif
+#endif
+
+   !!==============================================================================
+END MODULE traldf_iso_grif
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_lap.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_lap.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/traldf_lap.F90	(revision 2504)
@@ -0,0 +1,147 @@
+MODULE traldf_lap
+   !!==============================================================================
+   !!                       ***  MODULE  traldf_lap  ***
+   !! Ocean  tracers:  horizontal component of the lateral tracer mixing trend
+   !!==============================================================================
+   !! History :  OPA  !  87-06  (P. Andrich, D. L Hostis)  Original code
+   !!                 !  91-11  (G. Madec)
+   !!                 !  95-11  (G. Madec)  suppress volumetric scale factors
+   !!                 !  96-01  (G. Madec)  statement function for e3
+   !!            NEMO !  02-06  (G. Madec)  F90: Free form and module
+   !!            1.0  !  04-08  (C. Talandier) New trends organization
+   !!                 !  05-11  (G. Madec)  add zps case
+   !!            3.0  !  10-06  (C. Ethe, G. Madec) Merge TRA-TRC
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   tra_ldf_lap  : update the tracer trend with the horizontal diffusion
+   !!                 using a iso-level harmonic (laplacien) operator.
+   !!----------------------------------------------------------------------
+   USE oce             ! ocean dynamics and active tracers
+   USE dom_oce         ! ocean space and time domain
+   USE ldftra_oce      ! ocean active tracers: lateral physics
+   USE in_out_manager  ! I/O manager
+   USE diaptr_oce          ! poleward transport diagnostics
+   USE trc_oce         ! share passive tracers/Ocean variables
+   USE lib_mpp         ! MPP library
+   USE timing          ! Timing
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_ldf_lap   ! routine called by step.F90
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "ldftra_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: traldf_lap.F90 4364 2014-01-22 13:46:03Z jchanut $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE tra_ldf_lap( kt, kit000, cdtype, pgu, pgv,      &
+      &                                ptb, pta, kjpt ) 
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE tra_ldf_lap  ***
+      !!                   
+      !! ** Purpose :   Compute the before horizontal tracer (t & s) diffusive 
+      !!      trend and add it to the general trend of tracer equation.
+      !!
+      !! ** Method  :   Second order diffusive operator evaluated using before
+      !!      fields (forward time scheme). The horizontal diffusive trends of 
+      !!      the tracer is given by:
+      !!          difft = 1/(e1t*e2t*e3t) {  di-1[ aht e2u*e3u/e1u di(tb) ]
+      !!                                   + dj-1[ aht e1v*e3v/e2v dj(tb) ] }
+      !!      Add this trend to the general tracer trend pta :
+      !!          pta = pta + difft
+      !!
+      !! ** Action  : - Update pta arrays with the before iso-level 
+      !!                harmonic mixing trend.
+      !!----------------------------------------------------------------------
+      USE oce, ONLY:   ztu => ua , ztv => va  ! (ua,va) used as workspace
+      !
+      INTEGER                              , INTENT(in   ) ::   kt         ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000          ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers
+      REAL(wp), DIMENSION(jpi,jpj    ,kjpt), INTENT(in   ) ::   pgu, pgv   ! tracer gradient at pstep levels
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb        ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta        ! tracer trend 
+      !
+      INTEGER  ::   ji, jj, jk, jn       ! dummy loop indices
+      INTEGER  ::   iku, ikv, ierr       ! local integers
+      REAL(wp) ::   zabe1, zabe2, zbtr   ! local scalars
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 ) CALL timing_start('tra_ldf_lap')
+      !
+      IF( kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_ldf_lap : iso-level laplacian diffusion on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ '
+      ENDIF
+
+      !                                                          ! =========== !
+      DO jn = 1, kjpt                                            ! tracer loop !
+         !                                                       ! =========== !    
+         DO jk = 1, jpkm1                                            ! slab loop
+            !                                           
+            ! 1. First derivative (gradient)
+            ! -------------------
+            DO jj = 1, jpjm1
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zabe1 = fsahtu(ji,jj,jk) * umask(ji,jj,jk) * re2u_e1u(ji,jj) * fse3u_n(ji,jj,jk)
+                  zabe2 = fsahtv(ji,jj,jk) * vmask(ji,jj,jk) * re1v_e2v(ji,jj) * fse3v_n(ji,jj,jk)
+                  ztu(ji,jj,jk) = zabe1 * ( ptb(ji+1,jj  ,jk,jn) - ptb(ji,jj,jk,jn) )
+                  ztv(ji,jj,jk) = zabe2 * ( ptb(ji  ,jj+1,jk,jn) - ptb(ji,jj,jk,jn) )
+               END DO
+            END DO
+            IF( ln_zps ) THEN      ! set gradient at partial step level
+               DO jj = 1, jpjm1
+                  DO ji = 1, fs_jpim1   ! vector opt.
+                     ! last level
+                     iku = mbku(ji,jj)
+                     ikv = mbkv(ji,jj)
+                     IF( iku == jk ) THEN
+                        zabe1 = fsahtu(ji,jj,iku) * umask(ji,jj,iku) * re2u_e1u(ji,jj) * fse3u_n(ji,jj,iku)
+                        ztu(ji,jj,jk) = zabe1 * pgu(ji,jj,jn)
+                     ENDIF
+                     IF( ikv == jk ) THEN
+                        zabe2 = fsahtv(ji,jj,ikv) * vmask(ji,jj,ikv) * re1v_e2v(ji,jj) * fse3v_n(ji,jj,ikv)
+                        ztv(ji,jj,jk) = zabe2 * pgv(ji,jj,jn)
+                     ENDIF
+                  END DO
+               END DO
+            ENDIF
+         
+         
+            ! 2. Second derivative (divergence) added to the general tracer trends
+            ! ---------------------------------------------------------------------
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zbtr = 1._wp / ( e12t(ji,jj) * fse3t_n(ji,jj,jk) )
+                  ! horizontal diffusive trends added to the general tracer trends
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + zbtr * (  ztu(ji,jj,jk) - ztu(ji-1,jj,jk)   &
+                     &                                          + ztv(ji,jj,jk) - ztv(ji,jj-1,jk)  )
+               END DO
+            END DO
+            !
+         END DO                                             !  End of slab  
+         !
+         ! "Poleward" diffusive heat or salt transports
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN
+            IF( jn  == jp_tem)   htr_ldf(:) = ptr_vj( ztv(:,:,:) )
+            IF( jn  == jp_sal)   str_ldf(:) = ptr_vj( ztv(:,:,:) )
+         ENDIF
+         !                                                  ! ==================
+      END DO                                                ! end of tracer loop
+      !                                                     ! ==================
+      IF( nn_timing == 1 ) CALL timing_stop('tra_ldf_lap')
+      !
+   END SUBROUTINE tra_ldf_lap
+
+   !!==============================================================================
+END MODULE traldf_lap
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/trc_oce.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/trc_oce.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/trc_oce.F90	(revision 2504)
@@ -0,0 +1,290 @@
+MODULE trc_oce
+   !!======================================================================
+   !!                      ***  MODULE  trc_oce  ***
+   !! Ocean passive tracer  :  share SMS/Ocean variables
+   !!======================================================================
+   !! History :  1.0  !  2004-03  (C. Ethe)  Original code
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   trc_oce_rgb : tabulated attenuation coefficients for RGB light penetration         
+   !!----------------------------------------------------------------------
+   USE par_oce
+   USE in_out_manager  ! I/O manager
+   USE dom_oce         ! ocean space and time domain
+   USE lib_mpp         ! MPP library
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   trc_oce_rgb        ! routine called by traqsr.F90
+   PUBLIC   trc_oce_rgb_read   ! routine called by traqsr.F90
+   PUBLIC   trc_oce_ext_lev    ! function called by traqsr.F90 at least
+   PUBLIC   trc_oce_alloc      ! function called by nemogcm.F90
+
+   INTEGER , PUBLIC                                      ::   nn_dttrc      !: frequency of step on passive tracers
+   REAL(wp), PUBLIC                                      ::   r_si2         !: largest depth of extinction (blue & 0.01 mg.m-3)  (RGB)
+   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   etot3         !: light absortion coefficient
+   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   facvol        !: volume for degraded regions
+
+#if defined key_top 
+   !!----------------------------------------------------------------------
+   !!   'key_top'                                                 bio-model          
+   !!----------------------------------------------------------------------
+   LOGICAL, PUBLIC, PARAMETER ::   lk_qsr_bio = .TRUE.   !: bio-model light absorption flag
+#else
+   !!----------------------------------------------------------------------
+   !! Default option                          No bio-model light absorption      
+   !!----------------------------------------------------------------------
+   LOGICAL, PUBLIC, PARAMETER ::   lk_qsr_bio = .FALSE.   !: bio-model light absorption flag
+#endif
+
+#if defined key_offline
+   !!----------------------------------------------------------------------
+   !!   'key_offline'                                     OFFLINE mode          
+   !!----------------------------------------------------------------------
+   LOGICAL, PUBLIC, PARAMETER ::   lk_offline = .TRUE.   !: offline flag
+#else
+   !!----------------------------------------------------------------------
+   !!   Default option                                   NO  OFFLINE mode          
+   !!----------------------------------------------------------------------
+   LOGICAL, PUBLIC, PARAMETER ::   lk_offline = .FALSE.   !: offline flag
+#endif
+#if defined key_degrad
+   !!----------------------------------------------------------------------
+   !!   'key_degrad'                                     Degradation mode          
+   !!----------------------------------------------------------------------
+   LOGICAL, PUBLIC, PARAMETER ::   lk_degrad = .TRUE.   !: degradation flag
+#else
+   !!----------------------------------------------------------------------
+   !!   Default option                                   NO  Degradation mode          
+   !!----------------------------------------------------------------------
+   LOGICAL, PUBLIC, PARAMETER ::   lk_degrad = .FALSE.   !: degradation flag
+#endif
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! $Id: trc_oce.F90 4623 2014-04-22 15:21:41Z acc $ 
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   INTEGER FUNCTION trc_oce_alloc()
+      !!----------------------------------------------------------------------
+      !!                  ***  trc_oce_alloc  ***
+      !!----------------------------------------------------------------------
+      INTEGER ::   ierr(2)        ! Local variables
+      !!----------------------------------------------------------------------
+      ierr(:) = 0
+                     ALLOCATE( etot3 (jpi,jpj,jpk), STAT=ierr(1) )
+      IF( lk_degrad) ALLOCATE( facvol(jpi,jpj,jpk), STAT=ierr(2) )
+      trc_oce_alloc  = MAXVAL( ierr )
+      !
+      IF( trc_oce_alloc /= 0 )   CALL ctl_warn('trc_oce_alloc: failed to allocate etot3 array')
+   END FUNCTION trc_oce_alloc
+
+
+   SUBROUTINE trc_oce_rgb( prgb )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE p4z_opt_init  ***
+      !!
+      !! ** Purpose :   Initialization of of the optical scheme
+      !!
+      !! ** Method  :   Set a look up table for the optical coefficients
+      !!                i.e. the attenuation coefficient for R-G-B light 
+      !!                tabulated in Chlorophyll class (from JM Andre)
+      !!
+      !! ** Action  :   prgb(3,61) tabulated R-G-B attenuation coef. 
+      !!
+      !! Reference  : Lengaigne et al. 2007, Clim. Dyn., V28, 5, 503-516.
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(3,61), INTENT(out) ::   prgb   ! tabulated attenuation coefficient
+      !!
+      INTEGER  ::   jc     ! dummy loop indice
+      INTEGER  ::   irgb   ! temporary integer
+      REAL(wp) ::   zchl   ! temporary scalar
+      REAL(wp), DIMENSION(4,61) ::   zrgb   ! tabulated attenuation coefficient (formerly read in 'kRGB61.txt')
+      !!----------------------------------------------------------------------
+      !
+      IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) 'trc_oce_rgb : Initialisation of the optical look-up table'
+         WRITE(numout,*) '~~~~~~~~~~~ '
+      ENDIF
+      !
+      !  Chlorophyll        !     Blue attenuation     !     Green attenuation    !     Red attenuation      !
+      zrgb(1, 1) =  0.010   ;   zrgb(2, 1) = 0.01618   ;   zrgb(3, 1) = 0.07464   ;   zrgb(4, 1) = 0.37807
+      zrgb(1, 2) =  0.011   ;   zrgb(2, 2) = 0.01654   ;   zrgb(3, 2) = 0.07480   ;   zrgb(4, 2) = 0.37823
+      zrgb(1, 3) =  0.013   ;   zrgb(2, 3) = 0.01693   ;   zrgb(3, 3) = 0.07499   ;   zrgb(4, 3) = 0.37840
+      zrgb(1, 4) =  0.014   ;   zrgb(2, 4) = 0.01736   ;   zrgb(3, 4) = 0.07518   ;   zrgb(4, 4) = 0.37859
+      zrgb(1, 5) =  0.016   ;   zrgb(2, 5) = 0.01782   ;   zrgb(3, 5) = 0.07539   ;   zrgb(4, 5) = 0.37879
+      zrgb(1, 6) =  0.018   ;   zrgb(2, 6) = 0.01831   ;   zrgb(3, 6) = 0.07562   ;   zrgb(4, 6) = 0.37900
+      zrgb(1, 7) =  0.020   ;   zrgb(2, 7) = 0.01885   ;   zrgb(3, 7) = 0.07586   ;   zrgb(4, 7) = 0.37923
+      zrgb(1, 8) =  0.022   ;   zrgb(2, 8) = 0.01943   ;   zrgb(3, 8) = 0.07613   ;   zrgb(4, 8) = 0.37948
+      zrgb(1, 9) =  0.025   ;   zrgb(2, 9) = 0.02005   ;   zrgb(3, 9) = 0.07641   ;   zrgb(4, 9) = 0.37976
+      zrgb(1,10) =  0.028   ;   zrgb(2,10) = 0.02073   ;   zrgb(3,10) = 0.07672   ;   zrgb(4,10) = 0.38005
+      zrgb(1,11) =  0.032   ;   zrgb(2,11) = 0.02146   ;   zrgb(3,11) = 0.07705   ;   zrgb(4,11) = 0.38036
+      zrgb(1,12) =  0.035   ;   zrgb(2,12) = 0.02224   ;   zrgb(3,12) = 0.07741   ;   zrgb(4,12) = 0.38070
+      zrgb(1,13) =  0.040   ;   zrgb(2,13) = 0.02310   ;   zrgb(3,13) = 0.07780   ;   zrgb(4,13) = 0.38107
+      zrgb(1,14) =  0.045   ;   zrgb(2,14) = 0.02402   ;   zrgb(3,14) = 0.07821   ;   zrgb(4,14) = 0.38146
+      zrgb(1,15) =  0.050   ;   zrgb(2,15) = 0.02501   ;   zrgb(3,15) = 0.07866   ;   zrgb(4,15) = 0.38189
+      zrgb(1,16) =  0.056   ;   zrgb(2,16) = 0.02608   ;   zrgb(3,16) = 0.07914   ;   zrgb(4,16) = 0.38235
+      zrgb(1,17) =  0.063   ;   zrgb(2,17) = 0.02724   ;   zrgb(3,17) = 0.07967   ;   zrgb(4,17) = 0.38285
+      zrgb(1,18) =  0.071   ;   zrgb(2,18) = 0.02849   ;   zrgb(3,18) = 0.08023   ;   zrgb(4,18) = 0.38338
+      zrgb(1,19) =  0.079   ;   zrgb(2,19) = 0.02984   ;   zrgb(3,19) = 0.08083   ;   zrgb(4,19) = 0.38396
+      zrgb(1,20) =  0.089   ;   zrgb(2,20) = 0.03131   ;   zrgb(3,20) = 0.08149   ;   zrgb(4,20) = 0.38458
+      zrgb(1,21) =  0.100   ;   zrgb(2,21) = 0.03288   ;   zrgb(3,21) = 0.08219   ;   zrgb(4,21) = 0.38526
+      zrgb(1,22) =  0.112   ;   zrgb(2,22) = 0.03459   ;   zrgb(3,22) = 0.08295   ;   zrgb(4,22) = 0.38598
+      zrgb(1,23) =  0.126   ;   zrgb(2,23) = 0.03643   ;   zrgb(3,23) = 0.08377   ;   zrgb(4,23) = 0.38676
+      zrgb(1,24) =  0.141   ;   zrgb(2,24) = 0.03842   ;   zrgb(3,24) = 0.08466   ;   zrgb(4,24) = 0.38761
+      zrgb(1,25) =  0.158   ;   zrgb(2,25) = 0.04057   ;   zrgb(3,25) = 0.08561   ;   zrgb(4,25) = 0.38852
+      zrgb(1,26) =  0.178   ;   zrgb(2,26) = 0.04289   ;   zrgb(3,26) = 0.08664   ;   zrgb(4,26) = 0.38950
+      zrgb(1,27) =  0.200   ;   zrgb(2,27) = 0.04540   ;   zrgb(3,27) = 0.08775   ;   zrgb(4,27) = 0.39056
+      zrgb(1,28) =  0.224   ;   zrgb(2,28) = 0.04811   ;   zrgb(3,28) = 0.08894   ;   zrgb(4,28) = 0.39171
+      zrgb(1,29) =  0.251   ;   zrgb(2,29) = 0.05103   ;   zrgb(3,29) = 0.09023   ;   zrgb(4,29) = 0.39294
+      zrgb(1,30) =  0.282   ;   zrgb(2,30) = 0.05420   ;   zrgb(3,30) = 0.09162   ;   zrgb(4,30) = 0.39428
+      zrgb(1,31) =  0.316   ;   zrgb(2,31) = 0.05761   ;   zrgb(3,31) = 0.09312   ;   zrgb(4,31) = 0.39572
+      zrgb(1,32) =  0.355   ;   zrgb(2,32) = 0.06130   ;   zrgb(3,32) = 0.09474   ;   zrgb(4,32) = 0.39727
+      zrgb(1,33) =  0.398   ;   zrgb(2,33) = 0.06529   ;   zrgb(3,33) = 0.09649   ;   zrgb(4,33) = 0.39894
+      zrgb(1,34) =  0.447   ;   zrgb(2,34) = 0.06959   ;   zrgb(3,34) = 0.09837   ;   zrgb(4,34) = 0.40075
+      zrgb(1,35) =  0.501   ;   zrgb(2,35) = 0.07424   ;   zrgb(3,35) = 0.10040   ;   zrgb(4,35) = 0.40270
+      zrgb(1,36) =  0.562   ;   zrgb(2,36) = 0.07927   ;   zrgb(3,36) = 0.10259   ;   zrgb(4,36) = 0.40480
+      zrgb(1,37) =  0.631   ;   zrgb(2,37) = 0.08470   ;   zrgb(3,37) = 0.10495   ;   zrgb(4,37) = 0.40707
+      zrgb(1,38) =  0.708   ;   zrgb(2,38) = 0.09056   ;   zrgb(3,38) = 0.10749   ;   zrgb(4,38) = 0.40952
+      zrgb(1,39) =  0.794   ;   zrgb(2,39) = 0.09690   ;   zrgb(3,39) = 0.11024   ;   zrgb(4,39) = 0.41216
+      zrgb(1,40) =  0.891   ;   zrgb(2,40) = 0.10374   ;   zrgb(3,40) = 0.11320   ;   zrgb(4,40) = 0.41502
+      zrgb(1,41) =  1.000   ;   zrgb(2,41) = 0.11114   ;   zrgb(3,41) = 0.11639   ;   zrgb(4,41) = 0.41809
+      zrgb(1,42) =  1.122   ;   zrgb(2,42) = 0.11912   ;   zrgb(3,42) = 0.11984   ;   zrgb(4,42) = 0.42142
+      zrgb(1,43) =  1.259   ;   zrgb(2,43) = 0.12775   ;   zrgb(3,43) = 0.12356   ;   zrgb(4,43) = 0.42500
+      zrgb(1,44) =  1.413   ;   zrgb(2,44) = 0.13707   ;   zrgb(3,44) = 0.12757   ;   zrgb(4,44) = 0.42887
+      zrgb(1,45) =  1.585   ;   zrgb(2,45) = 0.14715   ;   zrgb(3,45) = 0.13189   ;   zrgb(4,45) = 0.43304
+      zrgb(1,46) =  1.778   ;   zrgb(2,46) = 0.15803   ;   zrgb(3,46) = 0.13655   ;   zrgb(4,46) = 0.43754
+      zrgb(1,47) =  1.995   ;   zrgb(2,47) = 0.16978   ;   zrgb(3,47) = 0.14158   ;   zrgb(4,47) = 0.44240
+      zrgb(1,48) =  2.239   ;   zrgb(2,48) = 0.18248   ;   zrgb(3,48) = 0.14701   ;   zrgb(4,48) = 0.44765
+      zrgb(1,49) =  2.512   ;   zrgb(2,49) = 0.19620   ;   zrgb(3,49) = 0.15286   ;   zrgb(4,49) = 0.45331
+      zrgb(1,50) =  2.818   ;   zrgb(2,50) = 0.21102   ;   zrgb(3,50) = 0.15918   ;   zrgb(4,50) = 0.45942
+      zrgb(1,51) =  3.162   ;   zrgb(2,51) = 0.22703   ;   zrgb(3,51) = 0.16599   ;   zrgb(4,51) = 0.46601
+      zrgb(1,52) =  3.548   ;   zrgb(2,52) = 0.24433   ;   zrgb(3,52) = 0.17334   ;   zrgb(4,52) = 0.47313
+      zrgb(1,53) =  3.981   ;   zrgb(2,53) = 0.26301   ;   zrgb(3,53) = 0.18126   ;   zrgb(4,53) = 0.48080
+      zrgb(1,54) =  4.467   ;   zrgb(2,54) = 0.28320   ;   zrgb(3,54) = 0.18981   ;   zrgb(4,54) = 0.48909
+      zrgb(1,55) =  5.012   ;   zrgb(2,55) = 0.30502   ;   zrgb(3,55) = 0.19903   ;   zrgb(4,55) = 0.49803
+      zrgb(1,56) =  5.623   ;   zrgb(2,56) = 0.32858   ;   zrgb(3,56) = 0.20898   ;   zrgb(4,56) = 0.50768
+      zrgb(1,57) =  6.310   ;   zrgb(2,57) = 0.35404   ;   zrgb(3,57) = 0.21971   ;   zrgb(4,57) = 0.51810
+      zrgb(1,58) =  7.079   ;   zrgb(2,58) = 0.38154   ;   zrgb(3,58) = 0.23129   ;   zrgb(4,58) = 0.52934
+      zrgb(1,59) =  7.943   ;   zrgb(2,59) = 0.41125   ;   zrgb(3,59) = 0.24378   ;   zrgb(4,59) = 0.54147
+      zrgb(1,60) =  8.912   ;   zrgb(2,60) = 0.44336   ;   zrgb(3,60) = 0.25725   ;   zrgb(4,60) = 0.55457
+      zrgb(1,61) = 10.000   ;   zrgb(2,61) = 0.47804   ;   zrgb(3,61) = 0.27178   ;   zrgb(4,61) = 0.56870
+      !
+      !
+      prgb(:,:) = zrgb(2:4,:)
+      !
+      r_si2 = 1.e0 / zrgb(2, 1)        ! blue with the smallest chlorophyll concentration)
+      !!! O.M : essai type NEMO 3.2
+      IF(lwp) WRITE(numout,*) '     RGB longest depth of extinction    r_si2 set back to NEMO 3.2 value'
+      r_si2 = 62.0
+      IF(lwp) WRITE(numout,*) '      RGB longest depth of extinction    r_si2 = ', r_si2
+      !
+      DO jc = 1, 61                         ! check
+         zchl = zrgb(1,jc)
+         irgb = NINT( 41 + 20.* LOG10( zchl ) + 1.e-15 )
+         IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  irgb = ', irgb
+         IF( irgb /= jc ) THEN
+            IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  Chl class = ', irgb
+            CALL ctl_stop( 'trc_oce_rgb : inconsistency in Chl tabulated attenuation coeff.' )
+         ENDIF
+      END DO
+      !
+   END SUBROUTINE trc_oce_rgb
+
+
+   SUBROUTINE trc_oce_rgb_read( prgb )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE p4z_opt_init  ***
+      !!
+      !! ** Purpose :   Initialization of of the optical scheme
+      !!
+      !! ** Method  :   read the look up table for the optical coefficients
+      !!
+      !! ** input   :   xkrgb(61) precomputed array corresponding to the  
+      !!                          attenuation coefficient (from JM Andre)
+      !!----------------------------------------------------------------------
+      REAL(wp), DIMENSION(3,61), INTENT(out) ::   prgb   ! tabulated attenuation coefficient
+      !!
+      INTEGER  ::   jc, jb ! dummy loop indice
+      INTEGER  ::   irgb   ! temporary integer
+      REAL(wp) ::   zchl   ! temporary scalar
+      INTEGER  ::   numlight
+      !!----------------------------------------------------------------------
+      !
+      IF(lwp) THEN                         ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' trc_oce_rgb_read : optical look-up table read in kRGB61.txt file'
+         WRITE(numout,*) ' ~~~~~~~~~~~~~~~~'
+         WRITE(numout,*) 
+      ENDIF
+      !
+      CALL ctl_opn( numlight, 'kRGB61.txt', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp )
+      DO jc = 1, 61
+         READ(numlight,*) zchl, ( prgb(jb,jc), jb = 1, 3 )
+         irgb = NINT( 41 + 20.* LOG10( zchl ) + 1.e-15 )   
+         IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  irgb = ', irgb  
+         IF( irgb /= jc ) THEN  
+            IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  Chl class = ', irgb
+            CALL ctl_stop( 'trc_oce_rgb_read : inconsistency in Chl tabulated attenuation coeff.' )
+         ENDIF
+      END DO
+      CLOSE( numlight )
+      !
+      r_si2 = 1.e0 / prgb(1, 1)      ! blue with the smallest chlorophyll concentration)
+      IF(lwp) WRITE(numout,*) '      RGB longest depth of extinction    r_si2 = ', r_si2
+      !
+   END SUBROUTINE trc_oce_rgb_read
+
+
+   FUNCTION trc_oce_ext_lev( prldex, pqsr_frc ) RESULT( pjl )
+      !!----------------------------------------------------------------------
+      !!                 ***  ROUTINE trc_oce_ext_lev  ***
+      !!       
+      !! ** Purpose :   compute max. level for light penetration
+      !!          
+      !! ** Method  :   the function provides the level at which irradiance 
+      !!                becomes negligible (i.e. = 1.e-15 W/m2) for 3 or 2 bands light
+      !!                penetration: I(z) = pqsr_frc * EXP(hext/prldex) = 1.e-15 W/m2
+      !!                # prldex is the longest depth of extinction:
+      !!                   - prldex = 23 m (2 bands case)
+      !!                   - prldex = 62 m (3 bands case: blue waveband & 0.01 mg/m2 for the chlorophyll)
+      !!                # pqsr_frc is the fraction of solar radiation which penetrates,
+      !!                considering Qsr=240 W/m2 and rn_abs = 0.58:
+      !!                   - pqsr_frc = Qsr * (1-rn_abs)   = 1.00e2 W/m2 (2 bands case)
+      !!                   - pqsr_frc = Qsr * (1-rn_abs)/3 = 0.33e2 W/m2 (3 bands case & equi-partition)
+      !!
+      !!----------------------------------------------------------------------
+      REAL(wp), INTENT(in) ::   prldex    ! longest depth of extinction
+      REAL(wp), INTENT(in) ::   pqsr_frc  ! frac. solar radiation which penetrates 
+      !!
+      INTEGER  ::   jk, pjl            ! levels
+      REAL(wp) ::   zhext              ! deepest level till which light penetrates
+      REAL(wp) ::   zprec = 15._wp     ! precision to reach -LOG10(1.e-15)
+      REAL(wp) ::   zem                ! temporary scalar 
+      !!----------------------------------------------------------------------
+      !
+      ! It is not necessary to compute anything below the following depth
+      zhext = prldex * ( LOG(10._wp) * zprec + LOG(pqsr_frc) )
+      !
+      ! Level of light extinction
+      pjl = jpkm1
+      DO jk = jpkm1, 1, -1
+         IF(SUM(tmask(:,:,jk)) > 0 ) THEN
+            zem = MAXVAL( fsdepw(:,:,jk+1) * tmask(:,:,jk) )
+            IF( zem >= zhext )   pjl = jk                       ! last T-level reached by Qsr
+         ELSE
+            pjl = jk                                            ! or regional sea-bed depth 
+         ENDIF
+      END DO
+      !
+   END FUNCTION trc_oce_ext_lev
+
+   !!======================================================================
+END MODULE trc_oce
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/zdftke.F90
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/zdftke.F90	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/NEMO/zdftke.F90	(revision 2504)
@@ -0,0 +1,868 @@
+MODULE zdftke
+   !!======================================================================
+   !!                       ***  MODULE  zdftke  ***
+   !! Ocean physics:  vertical mixing coefficient computed from the tke 
+   !!                 turbulent closure parameterization
+   !!=====================================================================
+   !! History :  OPA  !  1991-03  (b. blanke)  Original code
+   !!            7.0  !  1991-11  (G. Madec)   bug fix
+   !!            7.1  !  1992-10  (G. Madec)   new mixing length and eav
+   !!            7.2  !  1993-03  (M. Guyon)   symetrical conditions
+   !!            7.3  !  1994-08  (G. Madec, M. Imbard)  nn_pdl flag
+   !!            7.5  !  1996-01  (G. Madec)   s-coordinates
+   !!            8.0  !  1997-07  (G. Madec)   lbc
+   !!            8.1  !  1999-01  (E. Stretta) new option for the mixing length
+   !!  NEMO      1.0  !  2002-06  (G. Madec) add tke_init routine
+   !!             -   !  2004-10  (C. Ethe )  1D configuration
+   !!            2.0  !  2006-07  (S. Masson)  distributed restart using iom
+   !!            3.0  !  2008-05  (C. Ethe,  G.Madec) : update TKE physics:
+   !!                 !           - tke penetration (wind steering)
+   !!                 !           - suface condition for tke & mixing length
+   !!                 !           - Langmuir cells
+   !!             -   !  2008-05  (J.-M. Molines, G. Madec)  2D form of avtb
+   !!             -   !  2008-06  (G. Madec)  style + DOCTOR name for namelist parameters
+   !!             -   !  2008-12  (G. Reffray) stable discretization of the production term 
+   !!            3.2  !  2009-06  (G. Madec, S. Masson) TKE restart compatible with key_cpl 
+   !!                 !                                + cleaning of the parameters + bugs correction
+   !!            3.3  !  2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase
+   !!----------------------------------------------------------------------
+#if defined key_zdftke   ||   defined key_esopa
+   !!----------------------------------------------------------------------
+   !!   'key_zdftke'                                   TKE vertical physics
+   !!----------------------------------------------------------------------
+   !!   zdf_tke       : update momentum and tracer Kz from a tke scheme
+   !!   tke_tke       : tke time stepping: update tke at now time step (en)
+   !!   tke_avn       : compute mixing length scale and deduce avm and avt
+   !!   zdf_tke_init  : initialization, namelist read, and parameters control
+   !!   tke_rst       : read/write tke restart in ocean restart file
+   !!----------------------------------------------------------------------
+   USE oce            ! ocean: dynamics and active tracers variables
+   USE phycst         ! physical constants
+   USE dom_oce        ! domain: ocean
+   USE domvvl         ! domain: variable volume layer
+   USE sbc_oce        ! surface boundary condition: ocean
+   USE zdf_oce        ! vertical physics: ocean variables
+   USE zdfmxl         ! vertical physics: mixed layer
+   USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
+   USE prtctl         ! Print control
+   USE in_out_manager ! I/O manager
+   USE iom            ! I/O manager library
+   USE lib_mpp        ! MPP library
+   USE wrk_nemo       ! work arrays
+   USE timing         ! Timing
+   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   zdf_tke        ! routine called in step module
+   PUBLIC   zdf_tke_init   ! routine called in opa module
+   PUBLIC   tke_rst        ! routine called in step module
+
+   LOGICAL , PUBLIC, PARAMETER ::   lk_zdftke = .TRUE.  !: TKE vertical mixing flag
+
+   !                      !!** Namelist  namzdf_tke  **
+   LOGICAL  ::   ln_mxl0   ! mixing length scale surface value as function of wind stress or not
+   INTEGER  ::   nn_mxl    ! type of mixing length (=0/1/2/3)
+   REAL(wp) ::   rn_mxl0   ! surface  min value of mixing length (kappa*z_o=0.4*0.1 m)  [m]
+   INTEGER  ::   nn_pdl    ! Prandtl number or not (ratio avt/avm) (=0/1)
+   REAL(wp) ::   rn_ediff  ! coefficient for avt: avt=rn_ediff*mxl*sqrt(e)
+   REAL(wp) ::   rn_ediss  ! coefficient of the Kolmogoroff dissipation 
+   REAL(wp) ::   rn_ebb    ! coefficient of the surface input of tke
+   REAL(wp) ::   rn_emin   ! minimum value of tke           [m2/s2]
+   REAL(wp) ::   rn_emin0  ! surface minimum value of tke   [m2/s2]
+   REAL(wp) ::   rn_bshear ! background shear (>0) currently a numerical threshold (do not change it)
+   INTEGER  ::   nn_etau   ! type of depth penetration of surface tke (=0/1/2/3)
+   INTEGER  ::   nn_htau   ! type of tke profile of penetration (=0/1)
+   REAL(wp) ::   rn_efr    ! fraction of TKE surface value which penetrates in the ocean
+   LOGICAL  ::   ln_lc     ! Langmuir cells (LC) as a source term of TKE or not
+   REAL(wp) ::   rn_lc     ! coef to compute vertical velocity of Langmuir cells
+
+   REAL(wp) ::   ri_cri    ! critic Richardson number (deduced from rn_ediff and rn_ediss values)
+   REAL(wp) ::   rmxl_min  ! minimum mixing length value (deduced from rn_ediff and rn_emin values)  [m]
+   REAL(wp) ::   rhftau_add = 1.e-3_wp     ! add offset   applied to HF part of taum  (nn_etau=3)
+   REAL(wp) ::   rhftau_scl = 1.0_wp       ! scale factor applied to HF part of taum  (nn_etau=3)
+
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   en             !: now turbulent kinetic energy   [m2/s2]
+   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   htau           ! depth of tke penetration (nn_htau)
+   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   dissl          ! now mixing lenght of dissipation
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   avt_k , avm_k  ! not enhanced Kz
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   avmu_k, avmv_k ! not enhanced Kz
+#if defined key_c1d
+   !                                                                        !!** 1D cfg only  **   ('key_c1d')
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e_dis, e_mix   !: dissipation and mixing turbulent lengh scales
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e_pdl, e_ric   !: prandl and local Richardson numbers
+#endif
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
+   !! $Id: zdftke.F90 4147 2013-11-04 11:51:55Z cetlod $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   INTEGER FUNCTION zdf_tke_alloc()
+      !!----------------------------------------------------------------------
+      !!                ***  FUNCTION zdf_tke_alloc  ***
+      !!----------------------------------------------------------------------
+      ALLOCATE(                                                                    &
+#if defined key_c1d
+         &      e_dis(jpi,jpj,jpk) , e_mix(jpi,jpj,jpk) ,                          &
+         &      e_pdl(jpi,jpj,jpk) , e_ric(jpi,jpj,jpk) ,                          &
+#endif
+         &      en    (jpi,jpj,jpk) , htau  (jpi,jpj)    , dissl(jpi,jpj,jpk) ,     & 
+         &      avt_k (jpi,jpj,jpk) , avm_k (jpi,jpj,jpk),                          &
+         &      avmu_k(jpi,jpj,jpk) , avmv_k(jpi,jpj,jpk), STAT= zdf_tke_alloc      )
+         !
+      IF( lk_mpp             )   CALL mpp_sum ( zdf_tke_alloc )
+      IF( zdf_tke_alloc /= 0 )   CALL ctl_warn('zdf_tke_alloc: failed to allocate arrays')
+      !
+   END FUNCTION zdf_tke_alloc
+
+
+   SUBROUTINE zdf_tke( kt )
+      !!----------------------------------------------------------------------
+      !!                   ***  ROUTINE zdf_tke  ***
+      !!
+      !! ** Purpose :   Compute the vertical eddy viscosity and diffusivity
+      !!              coefficients using a turbulent closure scheme (TKE).
+      !!
+      !! ** Method  :   The time evolution of the turbulent kinetic energy (tke)
+      !!              is computed from a prognostic equation :
+      !!         d(en)/dt = avm (d(u)/dz)**2             ! shear production
+      !!                  + d( avm d(en)/dz )/dz         ! diffusion of tke
+      !!                  + avt N^2                      ! stratif. destruc.
+      !!                  - rn_ediss / emxl en**(2/3)    ! Kolmogoroff dissipation
+      !!      with the boundary conditions:
+      !!         surface: en = max( rn_emin0, rn_ebb * taum )
+      !!         bottom : en = rn_emin
+      !!      The associated critical Richardson number is: ri_cri = 2/(2+rn_ediss/rn_ediff) 
+      !!
+      !!        The now Turbulent kinetic energy is computed using the following 
+      !!      time stepping: implicit for vertical diffusion term, linearized semi
+      !!      implicit for kolmogoroff dissipation term, and explicit forward for 
+      !!      both buoyancy and shear production terms. Therefore a tridiagonal 
+      !!      linear system is solved. Note that buoyancy and shear terms are
+      !!      discretized in a energy conserving form (Bruchard 2002).
+      !!
+      !!        The dissipative and mixing length scale are computed from en and
+      !!      the stratification (see tke_avn)
+      !!
+      !!        The now vertical eddy vicosity and diffusivity coefficients are
+      !!      given by: 
+      !!              avm = max( avtb, rn_ediff * zmxlm * en^1/2 )
+      !!              avt = max( avmb, pdl * avm                 )  
+      !!              eav = max( avmb, avm )
+      !!      where pdl, the inverse of the Prandtl number is 1 if nn_pdl=0 and
+      !!      given by an empirical funtion of the localRichardson number if nn_pdl=1 
+      !!
+      !! ** Action  :   compute en (now turbulent kinetic energy)
+      !!                update avt, avmu, avmv (before vertical eddy coef.)
+      !!
+      !! References : Gaspar et al., JGR, 1990,
+      !!              Blanke and Delecluse, JPO, 1991
+      !!              Mellor and Blumberg, JPO 2004
+      !!              Axell, JGR, 2002
+      !!              Bruchard OM 2002
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   kt   ! ocean time step
+      !!----------------------------------------------------------------------
+      !
+      IF( kt /= nit000 ) THEN   ! restore before value to compute tke
+         avt (:,:,:) = avt_k (:,:,:) 
+         avm (:,:,:) = avm_k (:,:,:) 
+         avmu(:,:,:) = avmu_k(:,:,:) 
+         avmv(:,:,:) = avmv_k(:,:,:) 
+      ENDIF 
+      !
+      CALL tke_tke      ! now tke (en)
+      !
+      CALL tke_avn      ! now avt, avm, avmu, avmv
+      !
+      avt_k (:,:,:) = avt (:,:,:) 
+      avm_k (:,:,:) = avm (:,:,:) 
+      avmu_k(:,:,:) = avmu(:,:,:) 
+      avmv_k(:,:,:) = avmv(:,:,:) 
+      !
+   END SUBROUTINE zdf_tke
+
+
+   SUBROUTINE tke_tke
+      !!----------------------------------------------------------------------
+      !!                   ***  ROUTINE tke_tke  ***
+      !!
+      !! ** Purpose :   Compute the now Turbulente Kinetic Energy (TKE)
+      !!
+      !! ** Method  : - TKE surface boundary condition
+      !!              - source term due to Langmuir cells (Axell JGR 2002) (ln_lc=T)
+      !!              - source term due to shear (saved in avmu, avmv arrays)
+      !!              - Now TKE : resolution of the TKE equation by inverting
+      !!                a tridiagonal linear system by a "methode de chasse"
+      !!              - increase TKE due to surface and internal wave breaking
+      !!
+      !! ** Action  : - en : now turbulent kinetic energy)
+      !!              - avmu, avmv : production of TKE by shear at u and v-points
+      !!                (= Kz dz[Ub] * dz[Un] )
+      !! ---------------------------------------------------------------------
+      INTEGER  ::   ji, jj, jk                      ! dummy loop arguments
+!!bfr      INTEGER  ::   ikbu, ikbv, ikbum1, ikbvm1      ! temporary scalar
+!!bfr      INTEGER  ::   ikbt, ikbumm1, ikbvmm1          ! temporary scalar
+      REAL(wp) ::   zrhoa  = 1.22                   ! Air density kg/m3
+      REAL(wp) ::   zcdrag = 1.5e-3                 ! drag coefficient
+      REAL(wp) ::   zbbrau, zesh2                   ! temporary scalars
+      REAL(wp) ::   zfact1, zfact2, zfact3          !    -         -
+      REAL(wp) ::   ztx2  , zty2  , zcof            !    -         -
+      REAL(wp) ::   ztau  , zdif                    !    -         -
+      REAL(wp) ::   zus   , zwlc  , zind            !    -         -
+      REAL(wp) ::   zzd_up, zzd_lw                  !    -         -
+!!bfr      REAL(wp) ::   zebot                           !    -         -
+      INTEGER , POINTER, DIMENSION(:,:  ) :: imlc
+      REAL(wp), POINTER, DIMENSION(:,:  ) :: zhlc
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zpelc, zdiag, zd_up, zd_lw
+      !!--------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tke_tke')
+      !
+      CALL wrk_alloc( jpi,jpj, imlc )    ! integer
+      CALL wrk_alloc( jpi,jpj, zhlc ) 
+      CALL wrk_alloc( jpi,jpj,jpk, zpelc, zdiag, zd_up, zd_lw ) 
+      !
+      zbbrau = rn_ebb / rau0       ! Local constant initialisation
+      zfact1 = -.5_wp * rdt 
+      zfact2 = 1.5_wp * rdt * rn_ediss
+      zfact3 = 0.5_wp       * rn_ediss
+      !
+      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !                     !  Surface boundary condition on tke
+      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      DO jj = 2, jpjm1            ! en(1)   = rn_ebb taum / rau0  (min value rn_emin0)
+         DO ji = fs_2, fs_jpim1   ! vector opt.
+            en(ji,jj,1) = MAX( rn_emin0, zbbrau * taum(ji,jj) ) * tmask(ji,jj,1)
+         END DO
+      END DO
+      
+!!bfr   - start commented area
+      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !                     !  Bottom boundary condition on tke
+      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !
+      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      ! Tests to date have found the bottom boundary condition on tke to have very little effect.
+      ! The condition is coded here for completion but commented out until there is proof that the
+      ! computational cost is justified
+      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !                     en(bot)   = (rn_ebb0/rau0)*0.5*sqrt(u_botfr^2+v_botfr^2) (min value rn_emin)
+!CDIR NOVERRCHK
+!!    DO jj = 2, jpjm1
+!CDIR NOVERRCHK
+!!       DO ji = fs_2, fs_jpim1   ! vector opt.
+!!          ztx2 = bfrua(ji-1,jj) * ub(ji-1,jj,mbku(ji-1,jj)) + &
+!!                 bfrua(ji  ,jj) * ub(ji  ,jj,mbku(ji  ,jj) )
+!!          zty2 = bfrva(ji,jj  ) * vb(ji,jj  ,mbkv(ji,jj  )) + &
+!!                 bfrva(ji,jj-1) * vb(ji,jj-1,mbkv(ji,jj-1) )
+!!          zebot = 0.001875_wp * SQRT( ztx2 * ztx2 + zty2 * zty2 )   !  where 0.001875 = (rn_ebb0/rau0) * 0.5 = 3.75*0.5/1000.
+!!          en (ji,jj,mbkt(ji,jj)+1) = MAX( zebot, rn_emin ) * tmask(ji,jj,1)
+!!       END DO
+!!    END DO
+!!bfr   - end commented area
+      !
+      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      IF( ln_lc ) THEN      !  Langmuir circulation source term added to tke       (Axell JGR 2002)
+         !                  !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+         !
+         !                        !* total energy produce by LC : cumulative sum over jk
+         zpelc(:,:,1) =  MAX( rn2b(:,:,1), 0._wp ) * fsdepw(:,:,1) * fse3w(:,:,1)
+         DO jk = 2, jpk
+            zpelc(:,:,jk)  = zpelc(:,:,jk-1) + MAX( rn2b(:,:,jk), 0._wp ) * fsdepw(:,:,jk) * fse3w(:,:,jk)
+         END DO
+         !                        !* finite Langmuir Circulation depth
+         zcof = 0.5 * 0.016 * 0.016 / ( zrhoa * zcdrag )
+         imlc(:,:) = mbkt(:,:) + 1       ! Initialization to the number of w ocean point (=2 over land)
+         DO jk = jpkm1, 2, -1
+            DO jj = 1, jpj               ! Last w-level at which zpelc>=0.5*us*us 
+               DO ji = 1, jpi            !      with us=0.016*wind(starting from jpk-1)
+                  zus  = zcof * taum(ji,jj)
+                  IF( zpelc(ji,jj,jk) > zus )   imlc(ji,jj) = jk
+               END DO
+            END DO
+         END DO
+         !                               ! finite LC depth
+# if defined key_vectopt_loop
+         DO jj = 1, 1
+            DO ji = 1, jpij   ! vector opt. (forced unrolling)
+# else
+         DO jj = 1, jpj 
+            DO ji = 1, jpi
+# endif
+               zhlc(ji,jj) = fsdepw(ji,jj,imlc(ji,jj))
+            END DO
+         END DO
+         zcof = 0.016 / SQRT( zrhoa * zcdrag )
+!CDIR NOVERRCHK
+         DO jk = 2, jpkm1         !* TKE Langmuir circulation source term added to en
+!CDIR NOVERRCHK
+            DO jj = 2, jpjm1
+!CDIR NOVERRCHK
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zus  = zcof * SQRT( taum(ji,jj) )           ! Stokes drift
+                  !                                           ! vertical velocity due to LC
+                  zind = 0.5 - SIGN( 0.5, fsdepw(ji,jj,jk) - zhlc(ji,jj) )
+                  zwlc = zind * rn_lc * zus * SIN( rpi * fsdepw(ji,jj,jk) / zhlc(ji,jj) )
+                  !                                           ! TKE Langmuir circulation source term
+                  en(ji,jj,jk) = en(ji,jj,jk) + rdt * ( zwlc * zwlc * zwlc ) / zhlc(ji,jj) * tmask(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         !
+      ENDIF
+      !
+      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !                     !  Now Turbulent kinetic energy (output in en)
+      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !                     ! Resolution of a tridiagonal linear system by a "methode de chasse"
+      !                     ! computation from level 2 to jpkm1  (e(1) already computed and e(jpk)=0 ).
+      !                     ! zdiag : diagonal zd_up : upper diagonal zd_lw : lower diagonal
+      !
+      DO jk = 2, jpkm1           !* Shear production at uw- and vw-points (energy conserving form)
+         DO jj = 1, jpj                 ! here avmu, avmv used as workspace
+            DO ji = 1, jpi
+               avmu(ji,jj,jk) = avmu(ji,jj,jk) * ( un(ji,jj,jk-1) - un(ji,jj,jk) )   &
+                  &                            * ( ub(ji,jj,jk-1) - ub(ji,jj,jk) )   & 
+                  &           / (  fse3uw_n(ji,jj,jk)         &
+                  &              * fse3uw_b(ji,jj,jk) )
+               avmv(ji,jj,jk) = avmv(ji,jj,jk) * ( vn(ji,jj,jk-1) - vn(ji,jj,jk) )   &
+                  &                            * ( vb(ji,jj,jk-1) - vb(ji,jj,jk) )   &
+                  &                            / (  fse3vw_n(ji,jj,jk)               &
+                  &                              *  fse3vw_b(ji,jj,jk)  )
+            END DO
+         END DO
+      END DO
+      !
+      DO jk = 2, jpkm1           !* Matrix and right hand side in en
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               zcof   = zfact1 * tmask(ji,jj,jk)
+               zzd_up = zcof * ( avm  (ji,jj,jk+1) + avm  (ji,jj,jk  ) )   &  ! upper diagonal
+                  &          / ( fse3t(ji,jj,jk  ) * fse3w(ji,jj,jk  ) )
+               zzd_lw = zcof * ( avm  (ji,jj,jk  ) + avm  (ji,jj,jk-1) )   &  ! lower diagonal
+                  &          / ( fse3t(ji,jj,jk-1) * fse3w(ji,jj,jk  ) )
+                  !                                                           ! shear prod. at w-point weightened by mask
+               zesh2  =  ( avmu(ji-1,jj,jk) + avmu(ji,jj,jk) ) / MAX( 1._wp , umask(ji-1,jj,jk) + umask(ji,jj,jk) )   &
+                  &    + ( avmv(ji,jj-1,jk) + avmv(ji,jj,jk) ) / MAX( 1._wp , vmask(ji,jj-1,jk) + vmask(ji,jj,jk) )    
+                  !
+               zd_up(ji,jj,jk) = zzd_up            ! Matrix (zdiag, zd_up, zd_lw)
+               zd_lw(ji,jj,jk) = zzd_lw
+               zdiag(ji,jj,jk) = 1._wp - zzd_lw - zzd_up + zfact2 * dissl(ji,jj,jk) * tmask(ji,jj,jk)
+               !
+               !                                   ! right hand side in en
+               en(ji,jj,jk) = en(ji,jj,jk) + rdt * (  zesh2  -   avt(ji,jj,jk) * rn2(ji,jj,jk)    &
+                  &                                 + zfact3 * dissl(ji,jj,jk) * en (ji,jj,jk)  ) * tmask(ji,jj,jk)
+            END DO
+         END DO
+      END DO
+      !                          !* Matrix inversion from level 2 (tke prescribed at level 1)
+      DO jk = 3, jpkm1                             ! First recurrence : Dk = Dk - Lk * Uk-1 / Dk-1
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1    ! vector opt.
+               zdiag(ji,jj,jk) = zdiag(ji,jj,jk) - zd_lw(ji,jj,jk) * zd_up(ji,jj,jk-1) / zdiag(ji,jj,jk-1)
+            END DO
+         END DO
+      END DO
+      DO jj = 2, jpjm1                             ! Second recurrence : Lk = RHSk - Lk / Dk-1 * Lk-1
+         DO ji = fs_2, fs_jpim1    ! vector opt.
+            zd_lw(ji,jj,2) = en(ji,jj,2) - zd_lw(ji,jj,2) * en(ji,jj,1)    ! Surface boudary conditions on tke
+         END DO
+      END DO
+      DO jk = 3, jpkm1
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1    ! vector opt.
+               zd_lw(ji,jj,jk) = en(ji,jj,jk) - zd_lw(ji,jj,jk) / zdiag(ji,jj,jk-1) *zd_lw(ji,jj,jk-1)
+            END DO
+         END DO
+      END DO
+      DO jj = 2, jpjm1                             ! thrid recurrence : Ek = ( Lk - Uk * Ek+1 ) / Dk
+         DO ji = fs_2, fs_jpim1    ! vector opt.
+            en(ji,jj,jpkm1) = zd_lw(ji,jj,jpkm1) / zdiag(ji,jj,jpkm1)
+         END DO
+      END DO
+      DO jk = jpk-2, 2, -1
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1    ! vector opt.
+               en(ji,jj,jk) = ( zd_lw(ji,jj,jk) - zd_up(ji,jj,jk) * en(ji,jj,jk+1) ) / zdiag(ji,jj,jk)
+            END DO
+         END DO
+      END DO
+      DO jk = 2, jpkm1                             ! set the minimum value of tke
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               en(ji,jj,jk) = MAX( en(ji,jj,jk), rn_emin ) * tmask(ji,jj,jk)
+            END DO
+         END DO
+      END DO
+
+      !                            !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !                            !  TKE due to surface and internal wave breaking
+      !                            !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      IF( nn_etau == 1 ) THEN           !* penetration below the mixed layer (rn_efr fraction)
+         DO jk = 2, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  en(ji,jj,jk) = en(ji,jj,jk) + rn_efr * en(ji,jj,1) * EXP( -fsdepw(ji,jj,jk) / htau(ji,jj) )   &
+                     &                                               * ( 1._wp - fr_i(ji,jj) )  * tmask(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+      ELSEIF( nn_etau == 2 ) THEN       !* act only at the base of the mixed layer (jk=nmln)  (rn_efr fraction)
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               jk = nmln(ji,jj)
+               en(ji,jj,jk) = en(ji,jj,jk) + rn_efr * en(ji,jj,1) * EXP( -fsdepw(ji,jj,jk) / htau(ji,jj) )   &
+                  &                                               * ( 1._wp - fr_i(ji,jj) )  * tmask(ji,jj,jk)
+            END DO
+         END DO
+      ELSEIF( nn_etau == 3 ) THEN       !* penetration belox the mixed layer (HF variability)
+!CDIR NOVERRCHK
+         DO jk = 2, jpkm1
+!CDIR NOVERRCHK
+            DO jj = 2, jpjm1
+!CDIR NOVERRCHK
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  ztx2 = utau(ji-1,jj  ) + utau(ji,jj)
+                  zty2 = vtau(ji  ,jj-1) + vtau(ji,jj)
+                  ztau = 0.5_wp * SQRT( ztx2 * ztx2 + zty2 * zty2 )    ! module of the mean stress 
+                  zdif = taum(ji,jj) - ztau                            ! mean of modulus - modulus of the mean 
+                  zdif = rhftau_scl * MAX( 0._wp, zdif + rhftau_add )  ! apply some modifications...
+                  en(ji,jj,jk) = en(ji,jj,jk) + zbbrau * zdif * EXP( -fsdepw(ji,jj,jk) / htau(ji,jj) )   &
+                     &                                        * ( 1._wp - fr_i(ji,jj) ) * tmask(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+      ENDIF
+      CALL lbc_lnk( en, 'W', 1. )      ! Lateral boundary conditions (sign unchanged)
+      !
+      CALL wrk_dealloc( jpi,jpj, imlc )    ! integer
+      CALL wrk_dealloc( jpi,jpj, zhlc ) 
+      CALL wrk_dealloc( jpi,jpj,jpk, zpelc, zdiag, zd_up, zd_lw ) 
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tke_tke')
+      !
+   END SUBROUTINE tke_tke
+
+
+   SUBROUTINE tke_avn
+      !!----------------------------------------------------------------------
+      !!                   ***  ROUTINE tke_avn  ***
+      !!
+      !! ** Purpose :   Compute the vertical eddy viscosity and diffusivity
+      !!
+      !! ** Method  :   At this stage, en, the now TKE, is known (computed in 
+      !!              the tke_tke routine). First, the now mixing lenth is 
+      !!      computed from en and the strafification (N^2), then the mixings
+      !!      coefficients are computed.
+      !!              - Mixing length : a first evaluation of the mixing lengh
+      !!      scales is:
+      !!                      mxl = sqrt(2*en) / N  
+      !!      where N is the brunt-vaisala frequency, with a minimum value set
+      !!      to rmxl_min (rn_mxl0) in the interior (surface) ocean.
+      !!        The mixing and dissipative length scale are bound as follow : 
+      !!         nn_mxl=0 : mxl bounded by the distance to surface and bottom.
+      !!                        zmxld = zmxlm = mxl
+      !!         nn_mxl=1 : mxl bounded by the e3w and zmxld = zmxlm = mxl
+      !!         nn_mxl=2 : mxl bounded such that the vertical derivative of mxl is 
+      !!                    less than 1 (|d/dz(mxl)|<1) and zmxld = zmxlm = mxl
+      !!         nn_mxl=3 : mxl is bounded from the surface to the bottom usings
+      !!                    |d/dz(xml)|<1 to obtain lup, and from the bottom to 
+      !!                    the surface to obtain ldown. the resulting length 
+      !!                    scales are:
+      !!                        zmxld = sqrt( lup * ldown ) 
+      !!                        zmxlm = min ( lup , ldown )
+      !!              - Vertical eddy viscosity and diffusivity:
+      !!                      avm = max( avtb, rn_ediff * zmxlm * en^1/2 )
+      !!                      avt = max( avmb, pdlr * avm )  
+      !!      with pdlr=1 if nn_pdl=0, pdlr=1/pdl=F(Ri) otherwise.
+      !!
+      !! ** Action  : - avt : now vertical eddy diffusivity (w-point)
+      !!              - avmu, avmv : now vertical eddy viscosity at uw- and vw-points
+      !!----------------------------------------------------------------------
+      INTEGER  ::   ji, jj, jk   ! dummy loop indices
+      REAL(wp) ::   zrn2, zraug, zcoef, zav     ! local scalars
+      REAL(wp) ::   zdku, zpdlr, zri, zsqen     !   -      -
+      REAL(wp) ::   zdkv, zemxl, zemlm, zemlp   !   -      -
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zmpdl, zmxlm, zmxld
+      !!--------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tke_avn')
+
+      CALL wrk_alloc( jpi,jpj,jpk, zmpdl, zmxlm, zmxld ) 
+
+      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !                     !  Mixing length
+      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !
+      !                     !* Buoyancy length scale: l=sqrt(2*e/n**2)
+      !
+      IF( ln_mxl0 ) THEN            ! surface mixing length = F(stress) : l=vkarmn*2.e5*taum/(rau0*g)
+         zraug = vkarmn * 2.e5_wp / ( rau0 * grav )
+         zmxlm(:,:,1) = MAX(  rn_mxl0,  zraug * taum(:,:)  )
+      ELSE                          ! surface set to the minimum value
+         zmxlm(:,:,1) = rn_mxl0
+      ENDIF
+      zmxlm(:,:,jpk)  = rmxl_min     ! last level set to the interior minium value
+      !
+!CDIR NOVERRCHK
+      DO jk = 2, jpkm1              ! interior value : l=sqrt(2*e/n^2)
+!CDIR NOVERRCHK
+         DO jj = 2, jpjm1
+!CDIR NOVERRCHK
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               zrn2 = MAX( rn2(ji,jj,jk), rsmall )
+               zmxlm(ji,jj,jk) = MAX(  rmxl_min,  SQRT( 2._wp * en(ji,jj,jk) / zrn2 )  )
+            END DO
+         END DO
+      END DO
+      !
+      !                     !* Physical limits for the mixing length
+      !
+      zmxld(:,:, 1 ) = zmxlm(:,:,1)   ! surface set to the zmxlm   value
+      zmxld(:,:,jpk) = rmxl_min       ! last level  set to the minimum value
+      !
+      SELECT CASE ( nn_mxl )
+      !
+      CASE ( 0 )           ! bounded by the distance to surface and bottom
+         DO jk = 2, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zemxl = MIN( fsdepw(ji,jj,jk), zmxlm(ji,jj,jk),   &
+                  &            fsdepw(ji,jj,mbkt(ji,jj)+1) - fsdepw(ji,jj,jk) )
+                  zmxlm(ji,jj,jk) = zemxl
+                  zmxld(ji,jj,jk) = zemxl
+               END DO
+            END DO
+         END DO
+         !
+      CASE ( 1 )           ! bounded by the vertical scale factor
+         DO jk = 2, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zemxl = MIN( fse3w(ji,jj,jk), zmxlm(ji,jj,jk) )
+                  zmxlm(ji,jj,jk) = zemxl
+                  zmxld(ji,jj,jk) = zemxl
+               END DO
+            END DO
+         END DO
+         !
+      CASE ( 2 )           ! |dk[xml]| bounded by e3t :
+         DO jk = 2, jpkm1         ! from the surface to the bottom :
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zmxlm(ji,jj,jk) = MIN( zmxlm(ji,jj,jk-1) + fse3t(ji,jj,jk-1), zmxlm(ji,jj,jk) )
+               END DO
+            END DO
+         END DO
+         DO jk = jpkm1, 2, -1     ! from the bottom to the surface :
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zemxl = MIN( zmxlm(ji,jj,jk+1) + fse3t(ji,jj,jk+1), zmxlm(ji,jj,jk) )
+                  zmxlm(ji,jj,jk) = zemxl
+                  zmxld(ji,jj,jk) = zemxl
+               END DO
+            END DO
+         END DO
+         !
+      CASE ( 3 )           ! lup and ldown, |dk[xml]| bounded by e3t :
+         DO jk = 2, jpkm1         ! from the surface to the bottom : lup
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zmxld(ji,jj,jk) = MIN( zmxld(ji,jj,jk-1) + fse3t(ji,jj,jk-1), zmxlm(ji,jj,jk) )
+               END DO
+            END DO
+         END DO
+         DO jk = jpkm1, 2, -1     ! from the bottom to the surface : ldown
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zmxlm(ji,jj,jk) = MIN( zmxlm(ji,jj,jk+1) + fse3t(ji,jj,jk+1), zmxlm(ji,jj,jk) )
+               END DO
+            END DO
+         END DO
+!CDIR NOVERRCHK
+         DO jk = 2, jpkm1
+!CDIR NOVERRCHK
+            DO jj = 2, jpjm1
+!CDIR NOVERRCHK
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zemlm = MIN ( zmxld(ji,jj,jk),  zmxlm(ji,jj,jk) )
+                  zemlp = SQRT( zmxld(ji,jj,jk) * zmxlm(ji,jj,jk) )
+                  zmxlm(ji,jj,jk) = zemlm
+                  zmxld(ji,jj,jk) = zemlp
+               END DO
+            END DO
+         END DO
+         !
+      END SELECT
+      !
+# if defined key_c1d
+      e_dis(:,:,:) = zmxld(:,:,:)      ! c1d configuration : save mixing and dissipation turbulent length scales
+      e_mix(:,:,:) = zmxlm(:,:,:)
+# endif
+
+      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !                     !  Vertical eddy viscosity and diffusivity  (avmu, avmv, avt)
+      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+!CDIR NOVERRCHK
+      DO jk = 1, jpkm1            !* vertical eddy viscosity & diffivity at w-points
+!CDIR NOVERRCHK
+         DO jj = 2, jpjm1
+!CDIR NOVERRCHK
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               zsqen = SQRT( en(ji,jj,jk) )
+               zav   = rn_ediff * zmxlm(ji,jj,jk) * zsqen
+               avm  (ji,jj,jk) = MAX( zav,                  avmb(jk) ) * tmask(ji,jj,jk)
+               avt  (ji,jj,jk) = MAX( zav, avtb_2d(ji,jj) * avtb(jk) ) * tmask(ji,jj,jk)
+               dissl(ji,jj,jk) = zsqen / zmxld(ji,jj,jk)
+            END DO
+         END DO
+      END DO
+      CALL lbc_lnk( avm, 'W', 1. )      ! Lateral boundary conditions (sign unchanged)
+      !
+      DO jk = 2, jpkm1            !* vertical eddy viscosity at u- and v-points
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               avmu(ji,jj,jk) = 0.5 * ( avm(ji,jj,jk) + avm(ji+1,jj  ,jk) ) * umask(ji,jj,jk)
+               avmv(ji,jj,jk) = 0.5 * ( avm(ji,jj,jk) + avm(ji  ,jj+1,jk) ) * vmask(ji,jj,jk)
+            END DO
+         END DO
+      END DO
+      CALL lbc_lnk( avmu, 'U', 1. )   ;   CALL lbc_lnk( avmv, 'V', 1. )      ! Lateral boundary conditions
+      !
+      IF( nn_pdl == 1 ) THEN      !* Prandtl number case: update avt
+         DO jk = 2, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zcoef = avm(ji,jj,jk) * 2._wp * fse3w(ji,jj,jk) * fse3w(ji,jj,jk)
+                  !                                          ! shear
+                  zdku = avmu(ji-1,jj,jk) * ( un(ji-1,jj,jk-1) - un(ji-1,jj,jk) ) * ( ub(ji-1,jj,jk-1) - ub(ji-1,jj,jk) )   &
+                    &  + avmu(ji  ,jj,jk) * ( un(ji  ,jj,jk-1) - un(ji  ,jj,jk) ) * ( ub(ji  ,jj,jk-1) - ub(ji  ,jj,jk) )
+                  zdkv = avmv(ji,jj-1,jk) * ( vn(ji,jj-1,jk-1) - vn(ji,jj-1,jk) ) * ( vb(ji,jj-1,jk-1) - vb(ji,jj-1,jk) )   &
+                    &  + avmv(ji,jj  ,jk) * ( vn(ji,jj  ,jk-1) - vn(ji,jj  ,jk) ) * ( vb(ji,jj  ,jk-1) - vb(ji,jj  ,jk) )
+                  !                                          ! local Richardson number
+                  zri   = MAX( rn2b(ji,jj,jk), 0._wp ) * zcoef / (zdku + zdkv + rn_bshear )
+                  zpdlr = MAX(  0.1_wp,  0.2 / MAX( 0.2 , zri )  )
+!!gm and even better with the use of the "true" ri_crit=0.22222...  (this change the results!)
+!!gm              zpdlr = MAX(  0.1_wp,  ri_crit / MAX( ri_crit , zri )  )
+                  avt(ji,jj,jk)   = MAX( zpdlr * avt(ji,jj,jk), avtb_2d(ji,jj) * avtb(jk) ) * tmask(ji,jj,jk)
+# if defined key_c1d
+                  e_pdl(ji,jj,jk) = zpdlr * tmask(ji,jj,jk)    ! c1d configuration : save masked Prandlt number
+                  e_ric(ji,jj,jk) = zri * tmask(ji,jj,jk)                            ! c1d config. : save Ri
+# endif
+              END DO
+            END DO
+         END DO
+      ENDIF
+      CALL lbc_lnk( avt, 'W', 1. )                      ! Lateral boundary conditions on avt  (sign unchanged)
+
+      IF(ln_ctl) THEN
+         CALL prt_ctl( tab3d_1=en  , clinfo1=' tke  - e: ', tab3d_2=avt, clinfo2=' t: ', ovlap=1, kdim=jpk)
+         CALL prt_ctl( tab3d_1=avmu, clinfo1=' tke  - u: ', mask1=umask,                   &
+            &          tab3d_2=avmv, clinfo2=       ' v: ', mask2=vmask, ovlap=1, kdim=jpk )
+      ENDIF
+      !
+      CALL wrk_dealloc( jpi,jpj,jpk, zmpdl, zmxlm, zmxld ) 
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tke_avn')
+      !
+   END SUBROUTINE tke_avn
+
+
+   SUBROUTINE zdf_tke_init
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE zdf_tke_init  ***
+      !!                     
+      !! ** Purpose :   Initialization of the vertical eddy diffivity and 
+      !!              viscosity when using a tke turbulent closure scheme
+      !!
+      !! ** Method  :   Read the namzdf_tke namelist and check the parameters
+      !!              called at the first timestep (nit000)
+      !!
+      !! ** input   :   Namlist namzdf_tke
+      !!
+      !! ** Action  :   Increase by 1 the nstop flag is setting problem encounter
+      !!----------------------------------------------------------------------
+      INTEGER ::   ji, jj, jk   ! dummy loop indices
+      INTEGER ::   ios
+      !!
+      NAMELIST/namzdf_tke/ rn_ediff, rn_ediss , rn_ebb , rn_emin  ,   &
+         &                 rn_emin0, rn_bshear, nn_mxl , ln_mxl0  ,   &
+         &                 rn_mxl0 , nn_pdl   , ln_lc  , rn_lc    ,   &
+         &                 nn_etau , nn_htau  , rn_efr   
+      !!----------------------------------------------------------------------
+      !
+      REWIND( numnam_ref )              ! Namelist namzdf_tke in reference namelist : Turbulent Kinetic Energy
+      READ  ( numnam_ref, namzdf_tke, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tke in reference namelist', lwp )
+
+      REWIND( numnam_cfg )              ! Namelist namzdf_tke in configuration namelist : Turbulent Kinetic Energy
+      READ  ( numnam_cfg, namzdf_tke, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tke in configuration namelist', lwp )
+      IF(lwm) WRITE ( numond, namzdf_tke )
+      !
+      ri_cri   = 2._wp    / ( 2._wp + rn_ediss / rn_ediff )   ! resulting critical Richardson number
+      rmxl_min = 1.e-6_wp / ( rn_ediff * SQRT( rn_emin ) )    ! resulting minimum length to recover molecular viscosity
+      !!! O.M. 
+      rmxl_min = 1.0E-3
+      WRITE(numout,*) 'Set rmxl_min to IPSLCM5 value : ', rmxl_min
+      !
+      IF(lwp) THEN                    !* Control print
+         WRITE(numout,*)
+         WRITE(numout,*) 'zdf_tke_init : tke turbulent closure scheme - initialisation'
+         WRITE(numout,*) '~~~~~~~~~~~~'
+         WRITE(numout,*) '   Namelist namzdf_tke : set tke mixing parameters'
+         WRITE(numout,*) '      coef. to compute avt                        rn_ediff  = ', rn_ediff
+         WRITE(numout,*) '      Kolmogoroff dissipation coef.               rn_ediss  = ', rn_ediss
+         WRITE(numout,*) '      tke surface input coef.                     rn_ebb    = ', rn_ebb
+         WRITE(numout,*) '      minimum value of tke                        rn_emin   = ', rn_emin
+         WRITE(numout,*) '      surface minimum value of tke                rn_emin0  = ', rn_emin0
+         WRITE(numout,*) '      background shear (>0)                       rn_bshear = ', rn_bshear
+         WRITE(numout,*) '      mixing length type                          nn_mxl    = ', nn_mxl
+         WRITE(numout,*) '      prandl number flag                          nn_pdl    = ', nn_pdl
+         WRITE(numout,*) '      surface mixing length = F(stress) or not    ln_mxl0   = ', ln_mxl0
+         WRITE(numout,*) '      surface  mixing length minimum value        rn_mxl0   = ', rn_mxl0
+         WRITE(numout,*) '      flag to take into acc.  Langmuir circ.      ln_lc     = ', ln_lc
+         WRITE(numout,*) '      coef to compute verticla velocity of LC     rn_lc     = ', rn_lc
+         WRITE(numout,*) '      test param. to add tke induced by wind      nn_etau   = ', nn_etau
+         WRITE(numout,*) '      flag for computation of exp. tke profile    nn_htau   = ', nn_htau
+         WRITE(numout,*) '      fraction of en which pene. the thermocline  rn_efr    = ', rn_efr
+         WRITE(numout,*)
+         WRITE(numout,*) '      critical Richardson nb with your parameters  ri_cri = ', ri_cri
+      ENDIF
+      !
+      !                              ! allocate tke arrays
+      IF( zdf_tke_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'zdf_tke_init : unable to allocate arrays' )
+      !
+      !                               !* Check of some namelist values
+      IF( nn_mxl  < 0  .OR.  nn_mxl  > 3 )   CALL ctl_stop( 'bad flag: nn_mxl is  0, 1 or 2 ' )
+      IF( nn_pdl  < 0  .OR.  nn_pdl  > 1 )   CALL ctl_stop( 'bad flag: nn_pdl is  0 or 1    ' )
+      IF( nn_htau < 0  .OR.  nn_htau > 1 )   CALL ctl_stop( 'bad flag: nn_htau is 0, 1 or 2 ' )
+#if ! key_coupled
+      IF( nn_etau == 3 )   CALL ctl_stop( 'nn_etau == 3 : HF taum only known in coupled mode' )
+#endif
+
+      IF( ln_mxl0 ) THEN
+         IF(lwp) WRITE(numout,*) '   use a surface mixing length = F(stress) :   set rn_mxl0 = rmxl_min'
+         rn_mxl0 = rmxl_min
+      ENDIF
+      
+      IF( nn_etau == 2  )   CALL zdf_mxl( nit000 )      ! Initialization of nmln 
+
+      !                               !* depth of penetration of surface tke
+      IF( nn_etau /= 0 ) THEN      
+         SELECT CASE( nn_htau )             ! Choice of the depth of penetration
+         CASE( 0 )                                 ! constant depth penetration (here 10 meters)
+            htau(:,:) = 10._wp
+         CASE( 1 )                                 ! F(latitude) : 0.5m to 30m poleward of 40 degrees
+            htau(:,:) = MAX(  0.5_wp, MIN( 30._wp, 45._wp* ABS( SIN( rpi/180._wp * gphit(:,:) ) ) )   )            
+         END SELECT
+      ENDIF
+      !                               !* set vertical eddy coef. to the background value
+      DO jk = 1, jpk
+         avt (:,:,jk) = avtb(jk) * tmask(:,:,jk)
+         avm (:,:,jk) = avmb(jk) * tmask(:,:,jk)
+         avmu(:,:,jk) = avmb(jk) * umask(:,:,jk)
+         avmv(:,:,jk) = avmb(jk) * vmask(:,:,jk)
+      END DO
+      dissl(:,:,:) = 1.e-12_wp
+      !                              
+      CALL tke_rst( nit000, 'READ' )  !* read or initialize all required files
+      !
+   END SUBROUTINE zdf_tke_init
+
+
+   SUBROUTINE tke_rst( kt, cdrw )
+     !!---------------------------------------------------------------------
+     !!                   ***  ROUTINE tke_rst  ***
+     !!                     
+     !! ** Purpose :   Read or write TKE file (en) in restart file
+     !!
+     !! ** Method  :   use of IOM library
+     !!                if the restart does not contain TKE, en is either 
+     !!                set to rn_emin or recomputed 
+     !!----------------------------------------------------------------------
+     INTEGER         , INTENT(in) ::   kt     ! ocean time-step
+     CHARACTER(len=*), INTENT(in) ::   cdrw   ! "READ"/"WRITE" flag
+     !
+     INTEGER ::   jit, jk   ! dummy loop indices
+     INTEGER ::   id1, id2, id3, id4, id5, id6   ! local integers
+     !!----------------------------------------------------------------------
+     !
+     IF( TRIM(cdrw) == 'READ' ) THEN        ! Read/initialise 
+        !                                   ! ---------------
+        IF( ln_rstart ) THEN                   !* Read the restart file
+           id1 = iom_varid( numror, 'en'   , ldstop = .FALSE. )
+           id2 = iom_varid( numror, 'avt'  , ldstop = .FALSE. )
+           id3 = iom_varid( numror, 'avm'  , ldstop = .FALSE. )
+           id4 = iom_varid( numror, 'avmu' , ldstop = .FALSE. )
+           id5 = iom_varid( numror, 'avmv' , ldstop = .FALSE. )
+           id6 = iom_varid( numror, 'dissl', ldstop = .FALSE. )
+           !
+           IF( id1 > 0 ) THEN                       ! 'en' exists
+              CALL iom_get( numror, jpdom_autoglo, 'en', en )
+              IF( MIN( id2, id3, id4, id5, id6 ) > 0 ) THEN        ! all required arrays exist
+                 CALL iom_get( numror, jpdom_autoglo, 'avt'  , avt   )
+                 CALL iom_get( numror, jpdom_autoglo, 'avm'  , avm   )
+                 CALL iom_get( numror, jpdom_autoglo, 'avmu' , avmu  )
+                 CALL iom_get( numror, jpdom_autoglo, 'avmv' , avmv  )
+                 CALL iom_get( numror, jpdom_autoglo, 'dissl', dissl )
+              ELSE                                                 ! one at least array is missing
+                 CALL tke_avn                                          ! compute avt, avm, avmu, avmv and dissl (approximation)
+              ENDIF
+           ELSE                                     ! No TKE array found: initialisation
+              IF(lwp) WRITE(numout,*) ' ===>>>> : previous run without tke scheme, en computed by iterative loop'
+              en (:,:,:) = rn_emin * tmask(:,:,:)
+              CALL tke_avn                               ! recompute avt, avm, avmu, avmv and dissl (approximation)
+              DO jit = nit000 + 1, nit000 + 10   ;   CALL zdf_tke( jit )   ;   END DO
+           ENDIF
+        ELSE                                   !* Start from rest
+           en(:,:,:) = rn_emin * tmask(:,:,:)
+           DO jk = 1, jpk                           ! set the Kz to the background value
+              avt (:,:,jk) = avtb(jk) * tmask(:,:,jk)
+              avm (:,:,jk) = avmb(jk) * tmask(:,:,jk)
+              avmu(:,:,jk) = avmb(jk) * umask(:,:,jk)
+              avmv(:,:,jk) = avmb(jk) * vmask(:,:,jk)
+           END DO
+        ENDIF
+        !
+     ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN   ! Create restart file
+        !                                   ! -------------------
+        IF(lwp) WRITE(numout,*) '---- tke-rst ----'
+        CALL iom_rstput( kt, nitrst, numrow, 'en'   , en     )
+        CALL iom_rstput( kt, nitrst, numrow, 'avt'  , avt_k  )
+        CALL iom_rstput( kt, nitrst, numrow, 'avm'  , avm_k  )
+        CALL iom_rstput( kt, nitrst, numrow, 'avmu' , avmu_k )
+        CALL iom_rstput( kt, nitrst, numrow, 'avmv' , avmv_k )
+        CALL iom_rstput( kt, nitrst, numrow, 'dissl', dissl  )
+        !
+     ENDIF
+     !
+   END SUBROUTINE tke_rst
+
+#else
+   !!----------------------------------------------------------------------
+   !!   Dummy module :                                        NO TKE scheme
+   !!----------------------------------------------------------------------
+   LOGICAL, PUBLIC, PARAMETER ::   lk_zdftke = .FALSE.   !: TKE flag
+CONTAINS
+   SUBROUTINE zdf_tke_init           ! Dummy routine
+   END SUBROUTINE zdf_tke_init
+   SUBROUTINE zdf_tke( kt )          ! Dummy routine
+      WRITE(*,*) 'zdf_tke: You should not have seen this print! error?', kt
+   END SUBROUTINE zdf_tke
+   SUBROUTINE tke_rst( kt, cdrw )
+     CHARACTER(len=*) ::   cdrw
+     WRITE(*,*) 'tke_rst: You should not have seen this print! error?', kt, cdwr
+   END SUBROUTINE tke_rst
+#endif
+
+   !!======================================================================
+END MODULE zdftke
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/OASIS3-MCT/make_X64_ADA
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/OASIS3-MCT/make_X64_ADA	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/OASIS3-MCT/make_X64_ADA	(revision 2504)
@@ -0,0 +1,72 @@
+#
+# Include file for OASIS3 Makefile for a Linux system using 
+# Intel Fortran Compiler
+#
+###############################################################################
+#
+# CHAN	: communication technique used in OASIS3 (MPI1/MPI2/NONE)
+CHAN            = MPI1
+#
+# Paths for libraries, object files and binaries
+#
+# COUPLE	: path for oasis3-mct main directory. Filled with ins_make.
+COUPLE          = 
+#
+# ARCHDIR       : directory created when compiling
+ARCHDIR         = $(COUPLE)/BLD
+#
+# MPI library
+# not required on ada
+#MPIDIR      = /opt/mpi/bullxmpi/1.1.16.5
+#MPIBIN      = $(MPIDIR)/bin
+#MPI_INCLUDE = $(MPIDIR)/include
+#MPILIB      = -L$(MPIDIR)/lib
+#
+# NETCDF library : 4.1.3 and HDF5 library : 1.8.9 forced
+NETCDF_INCLUDE  = /smplocal/pub/NetCDF/4.1.3/mpi/include
+NETCDF_LIBRARY  = -L/smplocal/pub/NetCDF/4.1.3/mpi/lib -lnetcdff -lnetcdf -lnetcdf_c++ -L/smplocal/pub/HDF5/1.8.9/par/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -Bdynamic -lz
+#
+# Compiling and other commands
+MAKE        = gmake
+F90         = mpiifort
+F           = $(F90)
+f90         = $(F90)
+f           = $(F90)
+CC          = mpiicc
+LD          = mpiifort
+AR          = ar
+ARFLAGS     = -ruv
+#
+# CPP keys and compiler options
+# 
+#CPPDEF    = -Duse_libMPI -Duse_netCDF -Duse_comm_$(CHAN) -DDEBUG -D__VERBOSE -DTMG_PERF
+CPPDEF    = -Duse_libMPI -Duse_netCDF -Duse_comm_$(CHAN) -DTMG_PERF
+#
+# -g is necessary in F90FLAGS and LDFLAGS for pgf90 versions lower than 6.1
+# 
+F90FLAGS_1  = -O2 -I.
+f90FLAGS_1  = $(F90FLAGS_1)
+FFLAGS_1    = $(F90FLAGS_1)
+fFLAGS_1    = $(F90FLAGS_1)
+CCFLAGS_1   = -O2 -xAVX
+LDFLAGS     = 
+#
+###################
+#
+# Additional definitions that should not be changed
+#
+FLIBS		= $(NETCDF_LIBRARY)
+# BINDIR        : directory for executables
+BINDIR          = $(ARCHDIR)/bin
+# LIBBUILD      : contains a directory for each library
+LIBBUILD        = $(ARCHDIR)/build/lib
+# INCPSMILE     : includes all *o and *mod for each library
+INCPSMILE       = -I$(LIBBUILD)/psmile.$(CHAN) -I$(LIBBUILD)/mct -I$(LIBBUILD)/scrip
+#
+F90FLAGS  = $(F90FLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE)
+f90FLAGS  = $(f90FLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE)
+FFLAGS    = $(FFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE)
+fFLAGS    = $(fFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE)
+CCFLAGS   = $(CCFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE)
+#
+#############################################################################
Index: /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/OASIS3-MCT/make_X64_CURIE
===================================================================
--- /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/OASIS3-MCT/make_X64_CURIE	(revision 2504)
+++ /CONFIG/UNIFORM/v6_rc0/IPSLCM6/SOURCES/OASIS3-MCT/make_X64_CURIE	(revision 2504)
@@ -0,0 +1,73 @@
+#
+# Include file for OASIS3 Makefile for a Linux system using 
+# Portland Group Fortran Compiler and MPICH
+#
+###############################################################################
+#
+# CHAN	: communication technique used in OASIS3 (MPI1/MPI2/NONE)
+CHAN            = MPI1
+#
+# Paths for libraries, object files and binaries
+#
+# COUPLE	: path for oasis3-mct main directory
+COUPLE          = 
+#
+# ARCHDIR       : directory created when compiling
+ARCHDIR         = $(COUPLE)/BLD
+#
+# MPI library
+#For machines in training room, put MPIDIR      = /usr/local/pgi/linux86-64/9.0/mpi/mpich/
+#MPIDIR      = /opt/mpi/bullxmpi/1.1.16.5
+#MPIBIN      = $(MPIDIR)/bin
+#MPI_INCLUDE = $(MPIDIR)/include
+#MPILIB      = -L$(MPIDIR)/lib
+#
+# NETCDF library
+NETCDF_INCLUDE  = ${NETCDF_INC_DIR}
+NETCDF_LIBRARY  = -L${NETCDF_LIB_DIR} -lnetcdff -lnetcdf 
+#
+# Compiling and other commands
+MAKE        = gmake
+F90         = mpif90
+F           = $(F90)
+f90         = $(F90)
+f           = $(F90)
+CC          = mpicc
+LD          = mpif90
+AR          = ar
+ARFLAGS     = -ruv
+#
+# CPP keys and compiler options
+# 
+#CPPDEF    = -Duse_libMPI -Duse_netCDF -Duse_comm_$(CHAN) -DDEBUG -D__VERBOSE -DTMG_PERF
+CPPDEF    = -Duse_libMPI -Duse_netCDF -Duse_comm_$(CHAN) -DTMG_PERF
+#
+# -g is necessary in F90FLAGS and LDFLAGS for pgf90 versions lower than 6.1
+# 
+F90FLAGS_1  = -O2 -xAVX -I.
+#F90FLAGS_1  = -O3 -xAVX -I. -fp-model precise
+f90FLAGS_1  = $(F90FLAGS_1)
+FFLAGS_1    = $(F90FLAGS_1)
+fFLAGS_1    = $(F90FLAGS_1)
+CCFLAGS_1   = -O2 -xAVX
+LDFLAGS     = 
+#
+###################
+#
+# Additional definitions that should not be changed
+#
+FLIBS		= $(NETCDF_LIBRARY)
+# BINDIR        : directory for executables
+BINDIR          = $(ARCHDIR)/bin
+# LIBBUILD      : contains a directory for each library
+LIBBUILD        = $(ARCHDIR)/build/lib
+# INCPSMILE     : includes all *o and *mod for each library
+INCPSMILE       = -I$(LIBBUILD)/psmile.$(CHAN) -I$(LIBBUILD)/mct -I$(LIBBUILD)/scrip
+#
+F90FLAGS  = $(F90FLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE)
+f90FLAGS  = $(f90FLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE)
+FFLAGS    = $(FFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE)
+fFLAGS    = $(fFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE)
+CCFLAGS   = $(CCFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE)
+#
+#############################################################################
