Index: CONFIG/UNIFORM/v6/NEMO_v6.5/GENERAL/DRIVER/opa9.driver
===================================================================
--- CONFIG/UNIFORM/v6/NEMO_v6.5/GENERAL/DRIVER/opa9.driver	(revision 6230)
+++ CONFIG/UNIFORM/v6/NEMO_v6.5/GENERAL/DRIVER/opa9.driver	(revision 6601)
@@ -25,5 +25,5 @@
 }
 
-    OPA_RDT=$( supergrep rn_rdt ${SUBMIT_DIR}/PARAM/NAMELIST/${RESOL_OCE}/namelist_${opa9_UserChoices_forcing}_${exptype}_cfg | sed 's/ *rn_rdt *=//' | sed 's/\. *,//' )
+    OPA_RDT=$( supergrep rn_Dt ${SUBMIT_DIR}/PARAM/NAMELIST/${RESOL_OCE}/namelist_${opa9_UserChoices_forcing}_${exptype}_cfg | sed 's/ *rn_Dt *=//' | sed 's/\. *,//' )
 
     # Period Length In Days between DateBegin and first day of calendar 0001 01 01
Index: CONFIG/UNIFORM/v6/NEMO_v6.5/GENERAL/DRIVER/pisces.driver
===================================================================
--- CONFIG/UNIFORM/v6/NEMO_v6.5/GENERAL/DRIVER/pisces.driver	(revision 6230)
+++ CONFIG/UNIFORM/v6/NEMO_v6.5/GENERAL/DRIVER/pisces.driver	(revision 6601)
@@ -28,5 +28,5 @@
 
 
-       OPA_RDT=$( supergrep rn_rdt  ${SUBMIT_DIR}/PARAM/NAMELIST/${RESOL_OCE}/namelist_offline_${exptype}_cfg | sed 's/ *rn_rdt *=//' | sed 's/\. *,//' )
+       OPA_RDT=$( supergrep rn_Dt  ${SUBMIT_DIR}/PARAM/NAMELIST/${RESOL_OCE}/namelist_offline_${exptype}_cfg | sed 's/ *rn_Dt *=//' | sed 's/\. *,//' )
        # Period Length In Days between DateBegin and first day of calendar 0001 01 01
        # /!\ Needed by OPA namelist to compute file names /!\
@@ -41,5 +41,4 @@
        IGCM_debug_Print 1 "OPA_NPDT_DAY   ${OPA_NPDT_DAY}"
        IGCM_debug_Print 1 "OPA_NPDT_YEAR  ${OPA_NPDT_YEAR}"
-
      fi
 
@@ -141,12 +140,5 @@
        fi
     fi
-    
-    if [ X"${pisces_UserChoices_Offline_Mode}" = X"y" ] ; then
-       if [ X"${pisces_UserChoices_Offline_DynTrp}" = X"y" ] ; then
-          OFF_DYNTRP=.TRUE.
-       else
-          OFF_DYNTRP=.FALSE.
-       fi
-    fi
+
     ##-- Restart configuration
     if ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_MBG_Restart}" = "n" ] ) ; then
@@ -177,5 +169,4 @@
       IGCM_comp_modifyNamelist blocker    namelist_cfg nn_date0  ${PeriodDateBegin}
       IGCM_comp_modifyNamelist blocker    namelist_cfg nn_leapy  ${OPA_NLEAPY}
-      IGCM_comp_modifyNamelist blocker    namelist_cfg ln_dyntrp ${OFF_DYNTRP}
 
 # update domain_def.xml file 
@@ -190,11 +181,13 @@
    fi
 
-   if [ X"${pisces_UserChoices_pis}" = X"n" ] ; then
+   if [ X"${pisces_UserChoices_pis}" = X"y" ] ; then
       echo "DeActivate pisces outputs"
-      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file33 enabled .FALSE.
-      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file34 enabled .FALSE.
-      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file35 enabled .FALSE.
-      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file36 enabled .FALSE.
-      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file37 enabled .FALSE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file31 enabled .TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file32 enabled .TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file33 enabled .TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file34 enabled .TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file35 enabled .TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file36 enabled .TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file37 enabled .TRUE.
    fi
 
@@ -210,5 +203,5 @@
       echo "Activate CFC11  tracer"
       TOP_CFC11=.TRUE.
-      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file39 enabled .FALSE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file39 enabled .TRUE.
    else
       TOP_CFC11=.FALSE.
@@ -223,9 +216,60 @@
    fi
 ##
-   if [ X"${pisces_UserChoices_Co2Anthr}" = X"y" ] ; then
-      LCO2INT=.TRUE.
-   else
-      LCO2INT=.FALSE.
-   fi
+   if [ X"${pisces_UserChoices_sf6}" = X"y" ] ; then
+      echo "Activate SF6  tracer"
+      TOP_SF6=.TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file41 enabled .TRUE.
+   else
+      TOP_SF6=.FALSE.
+   fi
+##
+  if [ X"${pisces_UserChoices_c14}" = X"y" ] ; then
+      echo "Activate RC14  tracer"
+      TOP_C14=.TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file42 enabled .TRUE.
+   else
+      TOP_C14=.FALSE.
+   fi
+
+   if [ X"${pisces_UserChoices_gas}" = X"n" ] ; then
+      LGAS=.FALSE.
+      cp namelist_top_p4z_cfg  namelist_top_cfg
+   else
+      echo "Activate  gas tracer"
+      LGAS=.TRUE.
+      cp namelist_top_p4z_gas_cfg  namelist_top_cfg
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file50 enabled .TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file51 enabled .TRUE.
+   fi
+##
+   if [ X"${pisces_UserChoices_AnthrGas}" = X"y" ] ; then
+      # Read value for co2_ppm from file CO2.txt. If file not existing, take DEFAULT. 
+      if [ -f atmco2.txt ] ; then
+         line_year=`awk '/'${year}'/{print NR}' atmco2.txt`
+         PisCo2=`awk 'NR == '$line_year' {print $2 }' atmco2.txt`
+      else
+         PisCo2=${pisces_UserChoices_AtmCo2}
+      fi
+    else
+         PisCo2=${pisces_UserChoices_AtmCo2}
+    fi
+
+   if [ X"${pisces_UserChoices_AnthrGas}" = X"y" ] && [ X"${pisces_UserChoices_gas}" = X"y" ] ; then
+      if [ -f atmn2o.txt ] ; then
+         line_year=`awk '/'${year}'/{print NR}' atmn2o.txt`
+         PisNo2=`awk 'NR == '$line_year' {print $2 }' atmn2o.txt`
+      else
+         PisN2o=${pisces_UserChoices_AtmN2o}
+      fi
+      if [ -f atmcos.txt ] ; then
+         line_year=`awk '/'${year}'/{print NR}' atmcos.txt`
+         PisCos=`awk 'NR == '$line_year' {print $2 }' atmcos.txt`
+      else
+         PisCos=${pisces_UserChoices_AtmCos}
+      fi
+    else
+         PisN2o=${pisces_UserChoices_AtmN2o}
+         PisCos=${pisces_UserChoices_AtmCos}
+    fi
    ##-- Update namelist_top_cfg and namelist_pisces_cfg
     IGCM_comp_modifyNamelist blocker    namelist_top_cfg     ln_rsttr  ${TOP_LRSTTR}
@@ -234,9 +278,15 @@
     IGCM_comp_modifyNamelist blocker    namelist_top_cfg     ln_cfc11  ${TOP_CFC11}
     IGCM_comp_modifyNamelist blocker    namelist_top_cfg     ln_cfc12  ${TOP_CFC12}
+    IGCM_comp_modifyNamelist blocker    namelist_top_cfg     ln_sf6    ${TOP_SF6}
+    IGCM_comp_modifyNamelist blocker    namelist_top_cfg     ln_c14    ${TOP_C14}
     if [ X"${pisces_UserChoices_pis}" = X"y" ] ; then
-       IGCM_comp_modifyNamelist blocker    namelist_pisces_cfg  ln_co2int ${LCO2INT}
-       IGCM_comp_modifyNamelist blocker    namelist_pisces_cfg  atcco2    ${pisces_UserChoices_AtmCo2}
+       IGCM_comp_modifyNamelist blocker    namelist_pisces_cfg  atcco2    ${PisCo2}
        IGCM_comp_modifyNamelist blocker    namelist_pisces_cfg  nrdttrc   ${pisces_UserChoices_PisFreq}
        IGCM_comp_modifyNamelist blocker    namelist_pisces_cfg  nn_pisdmp ${OPA_NPDT_YEAR}
+       IGCM_comp_modifyNamelist blocker    namelist_pisces_cfg  ln_dms     ${LGAS}
+       IGCM_comp_modifyNamelist blocker    namelist_pisces_cfg  ln_n2o     ${LGAS}
+       IGCM_comp_modifyNamelist blocker    namelist_pisces_cfg  ln_bvocs   ${LGAS}
+       IGCM_comp_modifyNamelist blocker    namelist_pisces_cfg  atcn2o     ${PisN2o}
+       IGCM_comp_modifyNamelist blocker    namelist_pisces_cfg  atccos     ${PisCos}
     fi
  
Index: CONFIG/UNIFORM/v6/NEMO_v6.5/GENERAL/DRIVER/trc.driver
===================================================================
--- CONFIG/UNIFORM/v6/NEMO_v6.5/GENERAL/DRIVER/trc.driver	(revision 6601)
+++ CONFIG/UNIFORM/v6/NEMO_v6.5/GENERAL/DRIVER/trc.driver	(revision 6601)
@@ -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% *\!.*%%"
+}
+
+    IGCM_debug_PopStack "MBG_Initialize"
+}
+
+#-----------------------------------
+function MBG_Update
+{
+    IGCM_debug_PushStack "MBG_Update"
+
+    
+    ##--Write Frequency for iomput
+    ## Differents frequencies are allowed for MBG files
+
+    VT1D_ENABLE=".FALSE."
+    VT5D_ENABLE=".FALSE."
+    VT1M_ENABLE=".FALSE."
+    VT1Y_ENABLE=".FALSE."
+
+    for frequency in ${config_MBG_WriteFrequency} ; do
+        case ${frequency} in
+            ( 1D|1d ) VT1D_ENABLE=".TRUE." ;;
+            ( 5D|5d ) VT5D_ENABLE=".TRUE." ;;
+            ( 1M|1m ) VT1M_ENABLE=".TRUE." ;;
+            ( *[yY] ) VT1Y_ENABLE=".TRUE." ;;
+        esac
+    done
+
+    ##-- Restart configuration
+    if ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_MBG_Restart}" = "n" ] ) ; then
+
+        #echo "NO RESTART FOR TOP"
+        TOP_LRSTTR=.FALSE.
+        TOP_NRSTTR=0
+
+    elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_MBG_Restart}" = "y" ] ) ; then
+
+        #echo "RESTART TOP"
+        TOP_LRSTTR=.TRUE.
+        TOP_NRSTTR=0
+
+    else
+
+        #echo "RESTART TOP"
+        TOP_LRSTTR=.TRUE.
+        TOP_NRSTTR=2
+    fi
+
+   if [ X"${trc_UserChoices_age}" = X"y" ] ; then
+      echo "Activate age tracer"
+      TOP_AGE=.TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file38 enabled .TRUE.
+   else
+      TOP_AGE=.FALSE.
+   fi
+##
+   if [ X"${trc_UserChoices_cfc11}" = X"y" ] ; then
+      echo "Activate CFC11  tracer"
+      TOP_CFC11=.TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file39 enabled .TRUE.
+   else
+      TOP_CFC11=.FALSE.
+   fi
+##
+   if [ X"${trc_UserChoices_cfc12}" = X"y" ] ; then
+      echo "Activate CFC12  tracer"
+      TOP_CFC12=.TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file40 enabled .TRUE.
+   else
+      TOP_CFC12=.FALSE.
+   fi
+##
+   if [ X"${trc_UserChoices_sf6}" = X"y" ] ; then
+      echo "Activate SF6  tracer"
+      TOP_SF6=.TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file41 enabled .TRUE.
+   else
+      TOP_SF6=.FALSE.
+   fi
+##
+  if [ X"${trc_UserChoices_c14}" = X"y" ] ; then
+      echo "Activate RC14  tracer"
+      TOP_C14=.TRUE.
+      IGCM_comp_modifyXmlFile force file_def_nemo-top.xml file42 enabled .TRUE.
+   else
+      TOP_C14=.FALSE.
+   fi
+
+##
+   ##-- Update namelist_top_cfg and namelist_trc_cfg
+    IGCM_comp_modifyNamelist blocker    namelist_top_cfg     ln_rsttr  ${TOP_LRSTTR}
+    IGCM_comp_modifyNamelist blocker    namelist_top_cfg     nn_rsttr  ${TOP_NRSTTR}
+    IGCM_comp_modifyNamelist blocker    namelist_top_cfg     ln_age    ${TOP_AGE}
+    IGCM_comp_modifyNamelist blocker    namelist_top_cfg     ln_cfc11  ${TOP_CFC11}
+    IGCM_comp_modifyNamelist blocker    namelist_top_cfg     ln_cfc12  ${TOP_CFC12}
+    IGCM_comp_modifyNamelist blocker    namelist_top_cfg     ln_sf6    ${TOP_SF6}
+    IGCM_comp_modifyNamelist blocker    namelist_top_cfg     ln_c14    ${TOP_C14}
+ 
+    # Update iodef.xml
+
+    IGCM_debug_Print 1 'Informations into iodef.xml : VT1D_ENABLE VT5D_ENABLE VT1M_ENABLE VT1Y_ENABLE '
+    IGCM_debug_Print 1 ${VT1D_ENABLE}  ${VT5D_ENABLE} ${VT1M_ENABLE} ${VT1Y_ENABLE}
+
+    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-top.xml 1d_pis enabled ${VT1D_ENABLE}
+    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-top.xml 5d_pis enabled ${VT5D_ENABLE}
+    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-top.xml 1m_pis enabled ${VT1M_ENABLE}
+    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-top.xml 1y_pis enabled ${VT1Y_ENABLE}
+
+    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-top.xml 1d_pis output_level ${trc_UserChoices_OutputLevel}
+    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-top.xml 5d_pis output_level ${trc_UserChoices_OutputLevel}
+    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-top.xml 1m_pis output_level ${trc_UserChoices_OutputLevel}
+    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-top.xml 1y_pis output_level ${trc_UserChoices_OutputLevel}
+
+
+
+   IGCM_debug_PopStack "MBG_Update"
+}
+
+#-----------------------------------
+function MBG_Finalize
+{
+    IGCM_debug_PushStack "MBG_Finalize"
+
+    echo FINALIZE MBG !!!
+
+    IGCM_debug_PopStack "MBG_Finalize"
+}
+
