Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_pisces_cfg
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_pisces_cfg	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_pisces_cfg	(revision 7068)
@@ -1,4 +1,95 @@
 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-!! GYRE_PISCES: Configuration namelist used to overwrite SHARED/namelist_pisces_ref
+!! 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)
+!!              11 - Damping                                  (nampisdmp)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismod     !  Model used 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+    ln_p4z = .false.
+    ln_p2z = .true.
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisext     !   air-sea exchange
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisatm     !  Atmospheric prrssure 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&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
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisice      !  Prescribed sea ice tracers
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdmp     !  Damping 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismass     !  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)
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 !'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 &namlobphy     !   biological parameters for phytoplankton
@@ -15,5 +106,5 @@
 !'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 &namlobdet     !   biological parameters for detritus
-!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,       
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
 /
 !'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg	(revision 7068)
@@ -1,35 +1,43 @@
 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-!! NEMO-TOP Configuration namelist for GYRE_PISCES configuration used to overwrite SHARED/namelist_top_ref
+!! NEMO/TOP1 :  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_top_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 !-----------------------------------------------------------------------
 &namtrc_run     !   run information
 !-----------------------------------------------------------------------
-   nn_writetrc   =  60     !  time step frequency for sn_tracer outputs
 /
 !-----------------------------------------------------------------------
 &namtrc     !   tracers definition
 !-----------------------------------------------------------------------
-   ln_trcdta     =   .false.    !  Initialisation from data input file (T) or not (F)
+   jptra        =  6
 !
-!                ! name  !     title of the field          !   units       ! initial data ! save   !
-!                !       !                                 !               ! from file    ! or not !
-!                !       !                                 !               ! or not       !        !
-   sn_tracer(1)   = 'DET'   , 'Detritus                   ',  'mmole-N/m3' ,  .false.     ,  .false.
-   sn_tracer(2)   = 'ZOO'   , 'Zooplankton concentration  ',  'mmole-N/m3' ,  .false.     ,  .false.
-   sn_tracer(3)   = 'PHY'   , 'Phytoplankton concentration',  'mmole-N/m3' ,  .false.     ,  .false.
-   sn_tracer(4)   = 'NO3'   , 'Nitrate concentration      ',  'mmole-N/m3' ,  .false.     ,  .true.
-   sn_tracer(5)   = 'NH4'   , 'Ammonium concentration     ',  'mmole-N/m3' ,  .false.     ,  .false.
-   sn_tracer(6)   = 'DOM'   , 'Dissolved organic matter   ',  'mmole-N/m3' ,  .false.     ,  .false.
+   ln_pisces     =  .true.
+   ln_age        =  .false.
+   ln_cfc11      =  .false.
+   ln_cfc12      =  .false.
+   ln_c14        =  .false.
+   ln_my_trc     =  .false.
+!
+!                 !           !                             !               !
+!                 !    name   !   title of the field        !   units       ! initial data from file or not !
+!                 !           !                                             !                               !
+   sn_tracer(1)   = 'DET'     , 'Detritus                   ',  'mmole-N/m3' ,  .false.    
+   sn_tracer(2)   = 'ZOO'     , 'Zooplankton concentration  ',  'mmole-N/m3' ,  .false.   
+   sn_tracer(3)   = 'PHY'     , 'Phytoplankton concentration',  'mmole-N/m3' ,  .false.  
+   sn_tracer(4)   = 'NO3'     , 'Nitrate concentration      ',  'mmole-N/m3' ,  .false. 
+   sn_tracer(5)   = 'NH4'     , 'Ammonium concentration     ',  'mmole-N/m3' ,  .false.   
+   sn_tracer(6)   = 'DOM'     , 'Dissolved organic matter   ',  'mmole-N/m3' ,  .false.  
 /
 !-----------------------------------------------------------------------
-&namtrc_adv    !   advection scheme for passive tracer 
-!-----------------------------------------------------------------------   
+&namtrc_dta      !    Initialisation from data input file
+!-----------------------------------------------------------------------
+/
    ln_trcadv_fct =  .true.   !  FCT scheme
-      nn_fct_h   =  2               !  =2/4, horizontal 2nd / 4th order 
-      nn_fct_v   =  2               !  =2/4, vertical   2nd / COMPACT 4th order 
+      nn_fct_h   =  2               !  =2/4, horizontal 2nd / 4th order
+      nn_fct_v   =  2               !  =2/4, vertical   2nd / COMPACT 4th order
       nn_fct_zts =  0               !  >=1,  2nd order FCT scheme with vertical sub-timestepping
       !                             !        (number of sub-timestep = nn_fct_zts)
 /
 !-----------------------------------------------------------------------
-&namtrc_ldf    !   lateral diffusion scheme for passive tracer 
+&namtrc_ldf    !   lateral diffusion scheme for passive tracer
 !-----------------------------------------------------------------------
    rn_ahtrc_0       =  1000.    !  horizontal eddy diffusivity for tracers [m2/s]
@@ -40,15 +48,27 @@
 /
 !-----------------------------------------------------------------------
-&namtrc_rad        !  treatment of negative concentrations 
+&namtrc_rad        !  treatment of negative concentrations
 !-----------------------------------------------------------------------
    ln_trcrad   =  .false.  !  artificially correct negative concentrations (T) or not (F)
 /
 !-----------------------------------------------------------------------
-&namtrc_dia       !   parameters for passive tracer additional diagnostics
+&namtrc_dmp      !   passive tracer newtonian damping
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_ice      !    Representation of sea ice growth & melt effects
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_trd      !   diagnostics on tracer trends                       ('key_trdtrc')
+!                          or mixed-layer trends                        ('key_trdmld_trc')
 !----------------------------------------------------------------------
-   nn_writedia   =  60     !  time step frequency for diagnostics
 /
 !----------------------------------------------------------------------
-&namtrc_bc        !   data for boundary conditions
+&namtrc_bc       !   data for boundary conditions
 !-----------------------------------------------------------------------
 /
+!----------------------------------------------------------------------
+&namtrc_bdy      !   Setup of tracer boundary conditions
+!-----------------------------------------------------------------------
+/
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm	(revision 7068)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_zdftke key_top key_pisces_reduced key_mpp_mpi
+bld::tool::fppkeys key_zdftke key_top key_mpp_mpi
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/EXP00/iodef.xml
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/EXP00/iodef.xml	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/EXP00/iodef.xml	(revision 7068)
@@ -35,21 +35,119 @@
       <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
 
-      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files -->
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files -->
+      
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->
+      
+      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
+	
 	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="e3t"      />
+	  <field field_ref="toce"         name="thetao"                                                                      operation="instant" freq_op="5d" > @toce_e3t / @e3t </field>
+	  <field field_ref="soce"         name="so"                                                                          operation="instant" freq_op="5d" > @soce_e3t / @e3t </field>
 	  <field field_ref="sst"          name="tos"   />
 	  <field field_ref="sss"          name="sos"   />
 	  <field field_ref="ssh"          name="zos"   />
-	</file>
-
-        <file id="file2" name_suffix="_ptrc_T" description="passive tracers variables" >
+	  <field field_ref="sst"          name="tosstd"       long_name="sea surface temperature standard deviation"         operation="instant" freq_op="5d" > sqrt( @sst2 - @sst * @sst ) </field>
+	  <field field_ref="ssh"          name="zosstd"       long_name="sea surface height above geoid standard deviation"  operation="instant" freq_op="5d" > sqrt( @ssh2 - @ssh * @ssh ) </field>
+	  <field field_ref="sst"          name="sstdcy"       long_name="amplitude of sst diurnal cycle"                     operation="average" freq_op="1d" > @sstmax - @sstmin </field>
+	  <field field_ref="mldkz5"   />
+	  <field field_ref="mldr10_1" />
+	  <field field_ref="mldr10_1"     name="mldr10_1dcy"  long_name="amplitude of mldr10_1 diurnal cycle"                operation="average" freq_op="1d" > @mldr10_1max - @mldr10_1min </field>
+	  <field field_ref="sbt"      />
+	  <field field_ref="heatc"        name="heatc" />
+	  <field field_ref="saltc"        name="saltc" />
+	</file>
+
+	<file id="file2" name_suffix="_SBC" description="surface fluxes variables" > <!-- time step automaticaly defined based on nn_fsbc -->
+	  <field field_ref="empmr"        name="wfo"      />
+	  <field field_ref="qsr_oce"      name="qsr_oce"  />
+	  <field field_ref="qns_oce"      name="qns_oce"  />
+	  <field field_ref="qt_oce"       name="qt_oce"   />
+	  <field field_ref="qsr_ice"      name="qsr_ice"  />
+	  <field field_ref="qns_ice"      name="qns_ice"  />
+	  <field field_ref="qtr_ice"      name="qtr_ice"  />
+	  <field field_ref="qt_ice"       name="qt_ice"   />
+	  <field field_ref="saltflx"      name="sfx"      />
+	  <field field_ref="taum"         name="taum"     />
+	  <field field_ref="wspd"         name="windsp"   />
+	  <field field_ref="precip"       name="precip"   />
+	  <!-- ice and snow -->
+	  <field field_ref="snowpre" />
+	  <field field_ref="utau_ice"     name="utau_ice" />
+	  <field field_ref="vtau_ice"     name="vtau_ice" />
+	</file>
+
+	<file id="file3" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="e3u" />
+	  <field field_ref="ssu"          name="uos"      />
+	  <field field_ref="uoce"         name="uo"       operation="instant" freq_op="5d" > @uoce_e3u / @e3u </field>
+	  <field field_ref="utau"         name="tauuo"    />
+          <!-- available with key_diaar5 -->
+	  <field field_ref="u_masstr"     name="vozomatr" />
+	  <field field_ref="u_heattr"     name="sozohetr" />
+      <field field_ref="u_salttr"     name="sozosatr" />
+	</file>
+	
+	<file id="file4" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="e3v" />
+	  <field field_ref="ssv"          name="vos"      />
+	  <field field_ref="voce"         name="vo"       operation="instant" freq_op="5d" > @voce_e3v / @e3v </field>
+	  <field field_ref="vtau"         name="tauvo"    />
+          <!-- available with key_diaar5 -->
+	  <field field_ref="v_masstr"     name="vomematr" />
+	  <field field_ref="v_heattr"     name="somehetr" />
+      <field field_ref="v_salttr"     name="somesatr" />
+	</file>
+	
+	<file id="file5" name_suffix="_grid_W" description="ocean W grid variables" >
+	  <field field_ref="e3w" />
+	  <field field_ref="woce"         name="wo"       />
+	  <field field_ref="avt"          name="difvho"   />
+	  <field field_ref="w_masstr"     name="vovematr" />
+	</file>
+
+	<file id="file6" name_suffix="_icemod" description="ice variables" enabled=".true." >
+          <field field_ref="snowthic_cea"    name="snthic" />
+          <field field_ref="icethic_cea"     name="sithic" />
+          <field field_ref="icevolu"         name="sivolu" />
+          <field field_ref="snowvol"         name="snvolu" />
+          <field field_ref="iceconc"         name="siconc" />
+
+          <field field_ref="isst"            name="sst"    />
+          <field field_ref="isss"            name="sss"    />
+          <field field_ref="micesalt"        name="sisali" />
+          <field field_ref="micet"           name="sitemp" />
+          <field field_ref="icest"           name="sistem" />
+          <field field_ref="icehc"           name="siheco" />
+          <field field_ref="isnowhc"         name="snheco" />
+          <field field_ref="miceage"         name="siages" />
+
+          <field field_ref="uice_ipa"        name="sivelu" />
+          <field field_ref="vice_ipa"        name="sivelv" />
+          <field field_ref="icevel"          name="sivelo" />
+          <field field_ref="idive"           name="sidive" />
+          <field field_ref="ishear"          name="sishea" />
+          <field field_ref="icestr"          name="sistre" />
+
+          <field field_ref="ibrinv"          name="sibrin" />
+          <field field_ref="icecolf"         name="sicolf" />
+
+          <field field_ref="iceage_cat"      name="siagecat" />
+          <field field_ref="iceconc_cat"     name="siconcat" />
+          <field field_ref="icethic_cat"     name="sithicat" />
+          <field field_ref="snowthic_cat"    name="snthicat" />
+          <field field_ref="salinity_cat"    name="salincat" />
+          <field field_ref="brinevol_cat"    name="sibricat" />
+	  <field field_ref="icetemp_cat"     name="sitemcat" />
+	  <field field_ref="snwtemp_cat"     name="sntemcat" />
+
+	</file>
+
+        <file id="file9" name_suffix="_ptrc_T" description="passive tracers variables" >
            <field field_ref="Age"    operation="average" freq_op="1d" > @Age_e3t / @e3t </field>
            <field field_ref="CFC11"  operation="average" freq_op="1d" > @CFC11_e3t / @e3t </field>
            <field field_ref="RC14"   operation="average" freq_op="1d" > @RC14_e3t / @e3t </field>
          </file>
-      </file_group>
-      
-      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->
-      
-      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
+
       </file_group>
 
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/EXP00/namelist_trc_cfg
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/EXP00/namelist_trc_cfg	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/EXP00/namelist_trc_cfg	(revision 7068)
@@ -10,5 +10,5 @@
 /
 !'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-&namcfcdate     !   CFC 
+&namcfc     !   CFC 
 !,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
 /
@@ -25,30 +25,8 @@
 !
 !'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-&namc14_dia     !  additional diagnostics
-!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
-      ln_c14dia=.true.                                   !                ! 
-      c14dia3d(1)  = 'DeltaC14'            ! Delta C14 (permil)
-      c14dia3d(2)  = 'C14Age'              ! Radioage (yr)
-      c14dia2d(1)  = 'qtr_c14'             ! Air-sea flux  (1/m2/s)
-      c14dia2d(2)  = 'qint_c14'            ! Cumulative air-sea flux (1/m2)
-      c14dia2d(3)  = 'RAge'                ! Reservoir Age (yr)
-      c14dia0d(1)  = 'AtmCO2'              ! Global atmospheric CO2 (ppm)
-      c14dia0d(2)  = 'AtmC14'              ! Global atmospheric Delta-C14 (permil)
-      c14dia0d(3)  = 'K_C14'               ! Global 14C/C exchange velocity (m/yr)
-      c14dia0d(4)  = 'K_CO2'               ! Global CO2 piston velocity (cm/h)
-      c14dia0d(5)  = 'C14Inv'              ! Radiocarbon ocean inventory (10^26 atoms)
-/
-!
-!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 &namc14_fcg     !  files & dates
 !               !  For Paleo-historical: specify tyrc14_beg in yr BP
 !               !  For Bomb: tyrc14_beg=0
 !,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
-   cfileco2    = 'splco2.dat'  !  atmospheric co2 - Bomb
-   cfilec14    = 'atmc14.dat'  !  atmospheric c14 - Bomb
-   tyrc14_beg  = 0.00          !  starting year of experiment - Bomb
-!   cfileco2    = 'ByrdEdcCO2.txt' !  atmospheric co2 - Paleo
-!   cfilec14    = 'intcal13.14c'   !  atmospheric c14 - Paleo
-!   tyrc14_beg  =  35000.00        !  starting year of experiment - Paleo (yr BP)
 /
 !
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/cpp_ORCA2_LIM3_TRC.fcm
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/cpp_ORCA2_LIM3_TRC.fcm	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/cpp_ORCA2_LIM3_TRC.fcm	(revision 7068)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_lim3 key_zdftke key_zdfddm key_zdftmx key_top key_iomput key_mpp_mpi key_nosignedzero
+bld::tool::fppkeys key_trabbl key_lim3 key_zdftke key_zdfddm key_zdftmx key_top key_iomput key_mpp_mpi
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_top_cfg
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_top_cfg	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_top_cfg	(revision 7068)
@@ -5,5 +5,4 @@
 &namtrc_run     !   run information
 !-----------------------------------------------------------------------
-   jptra         =  24        ! Total number of tracers
    ln_top_euler  = .true.
 /
@@ -11,8 +10,13 @@
 &namtrc     !   tracers definition
 !-----------------------------------------------------------------------
+   jptra        =  24
+!
+   ln_pisces     =  .true.
    ln_age        =  .false.
    ln_cfc11      =  .false.
    ln_cfc12      =  .false.
    ln_c14        =  .false.
+   ln_my_trc     =  .false.
+!
    ln_trcdta     =  .true.  !  Initialisation from data input file (T) or not (F)
 !                 !           !                                          !             !
@@ -85,9 +89,21 @@
 /
 !-----------------------------------------------------------------------
-&namtrc_dia       !   parameters for passive tracer additional diagnostics
+&namtrc_dmp      !   passive tracer newtonian damping
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_ice      !    Representation of sea ice growth & melt effects
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_trd      !   diagnostics on tracer trends                       ('key_trdtrc')
+!                          or mixed-layer trends                        ('key_trdmld_trc')
 !----------------------------------------------------------------------
 /
 !----------------------------------------------------------------------
-&namtrc_bc        !   data for boundary conditions
+&namtrc_bc       !   data for boundary conditions
 !-----------------------------------------------------------------------
 /
+!----------------------------------------------------------------------
+&namtrc_bdy      !   Setup of tracer boundary conditions
+!-----------------------------------------------------------------------
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 7068)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_lim2 key_zdftke key_zdfddm key_zdftmx key_top key_pisces key_mpp_mpi key_iomput
+bld::tool::fppkeys key_trabbl key_lim2 key_zdftke key_zdfddm key_zdftmx key_top key_mpp_mpi key_iomput
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_top_cfg
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_top_cfg	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_top_cfg	(revision 7068)
@@ -5,5 +5,4 @@
 &namtrc_run     !   run information
 !-----------------------------------------------------------------------
-   jptra         =  24        ! Total number of tracers
    ln_top_euler  = .true.
 /
@@ -11,8 +10,13 @@
 &namtrc     !   tracers definition
 !-----------------------------------------------------------------------
+   jptra        =  24
+!
+   ln_pisces     =  .true.
    ln_age        =  .false.
    ln_cfc11      =  .false.
    ln_cfc12      =  .false.
    ln_c14        =  .false.
+   ln_my_trc     =  .false.
+!
    ln_trcdta     =  .true.  !  Initialisation from data input file (T) or not (F)
 !                 !           !                                          !             !
@@ -85,9 +89,21 @@
 /
 !-----------------------------------------------------------------------
-&namtrc_dia       !   parameters for passive tracer additional diagnostics
+&namtrc_dmp      !   passive tracer newtonian damping
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_ice      !    Representation of sea ice growth & melt effects
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_trd      !   diagnostics on tracer trends                       ('key_trdtrc')
+!                          or mixed-layer trends                        ('key_trdmld_trc')
 !----------------------------------------------------------------------
 /
 !----------------------------------------------------------------------
-&namtrc_bc        !   data for boundary conditions
+&namtrc_bc       !   data for boundary conditions
 !-----------------------------------------------------------------------
 /
+!----------------------------------------------------------------------
+&namtrc_bdy      !   Setup of tracer boundary conditions
+!-----------------------------------------------------------------------
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/cpp_ORCA2_OFF_PISCES.fcm
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/cpp_ORCA2_OFF_PISCES.fcm	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/cpp_ORCA2_OFF_PISCES.fcm	(revision 7068)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_top key_offline key_pisces key_iomput key_mpp_mpi
+bld::tool::fppkeys key_trabbl key_top key_offline key_iomput key_mpp_mpi
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/SHARED/namelist_top_ref
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/SHARED/namelist_top_ref	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/SHARED/namelist_top_ref	(revision 7068)
@@ -12,5 +12,4 @@
 &namtrc_run      !   run information
 !-----------------------------------------------------------------------
-   jptra         =  3        ! Total number of tracers
    nn_dttrc      =  1        !  time step frequency for passive sn_tracers
    ln_top_euler  = .false.   !  use Euler time-stepping for TOP
@@ -27,16 +26,19 @@
 &namtrc          !   tracers definition
 !-----------------------------------------------------------------------
-   ln_age        =  .true.
-   ln_cfc11      =  .true.
-   ln_cfc12      =  .false.
-   ln_c14        =  .true.
+   jptra         =  1           !  Number of passive tracers of the BGC model
+!
+   ln_pisces     =  .false.     !  Run PISCES BGC model 
+   ln_age        =  .true.      !  Run the sea water age tracer
+   ln_cfc11      =  .true.      !  Run the CFC11 passive tracer
+   ln_cfc12      =  .false.     !  Run the CFC12 passive tracer
+   ln_c14        =  .true.      !  Run the Radiocarbon passive tracer
+   ln_my_trc     =  .false.     !  Run MY_TRC BGC model
+!
    ln_trcdta     =  .false.  !  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
-!
-!              !    name   !           title of the field              !   units    ! initial data from file or not !
-   sn_tracer(1)  = 'Age   ' , 'Sea water age since surface contact     ',  'yr'     ,      .false. 
-   sn_tracer(2)  = 'CFC11 ' , 'CFC11 Concentration                     ',  'umolC/L',      .false.
-   sn_tracer(3)  = 'RC14  ' , 'Radiocarbon ratio                       ',  '-'      ,      .false. 
+!                !           !                                         !            !                               !
+!                !    name   !           title of the field            !   units    ! initial data from file or not ! 
+   sn_tracer(1)  = 'tracer  ' , 'Tracer  Concentration                 ',   ' - '    ,           .false.
 /
 !-----------------------------------------------------------------------
@@ -44,4 +46,7 @@
 !-----------------------------------------------------------------------
    cn_dir        =  './'     !  root directory for the location of the data files
+!          !  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_TRC_nomask'        ,        -12        ,  'TRC'     ,    .false.   , .true. , 'yearly'  , ''       , ''   , ''
 /
 !-----------------------------------------------------------------------
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/cfg.txt
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/cfg.txt	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/cfg.txt	(revision 7068)
@@ -11,4 +11,5 @@
 GYRE OPA_SRC
 ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC
+ORCA2_LIM3_PISCES OPA_SRC LIM_SRC_3 NST_SRC TOP_SRC
+ORCA2_LIM3_TRC_N OPA_SRC LIM_SRC_3 NST_SRC TOP_SRC
 ORCA2_LIM3_TRC OPA_SRC LIM_SRC_3 NST_SRC TOP_SRC
-ORCA2_LIM3_PISCES OPA_SRC LIM_SRC_3 NST_SRC TOP_SRC
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 7068)
@@ -120,7 +120,5 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sprecip           !: solid precipitation                          [Kg/m2/s]
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fr_i              !: ice fraction = 1 - lead fraction      (between 0 to 1)
-#if defined key_cpl_carbon_cycle
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   atm_co2           !: atmospheric pCO2                             [ppm]
-#endif
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xcplmask          !: coupling mask for ln_mixcpl (warning: allocated in sbccpl)
 
@@ -166,7 +164,5 @@
          !
       ALLOCATE( tprecip(jpi,jpj) , sprecip(jpi,jpj) , fr_i(jpi,jpj) ,     &
-#if defined key_cpl_carbon_cycle
          &      atm_co2(jpi,jpj) ,                                        &
-#endif
          &      ssu_m  (jpi,jpj) , sst_m(jpi,jpj) , frq_m(jpi,jpj) ,      &
          &      ssv_m  (jpi,jpj) , sss_m(jpi,jpj) , ssh_m(jpi,jpj) , STAT=ierr(4) )
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/par_age.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/par_age.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/par_age.F90	(revision 7068)
@@ -13,7 +13,4 @@
 
    INTEGER, PUBLIC  :: jp_age    !: number of passive tracers in PISCES
-   INTEGER, PUBLIC  :: jp_age0   !: index of AGE passive tracers
-
-   LOGICAL, PUBLIC  :: ln_age
 
    !!======================================================================
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcini_age.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcini_age.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcini_age.F90	(revision 7068)
@@ -39,17 +39,4 @@
       IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
 
-      jp_age   = 1
-      DO jn = 1, jptra
-        cltra = ctrcnm(jn) 
-        IF( cltra == 'AGE' .OR. cltra == 'Age' .OR. cltra == 'age' )   jp_age0 = jn     
-      ENDDO
-
-      IF( lwp ) THEN
-        WRITE(numout,*) ''
-        WRITE(numout,*) ' Index of age tracer in the passive tracer array   jp_age0 = ', jp_age0
-        WRITE(numout,*) 
-      ENDIF
-
-
       rryear  = 1._wp / ( nyear_len(1) * rday )    ! recip number of seconds in one year
 
@@ -66,5 +53,5 @@
 
       
-      IF( .NOT. ln_rsttr ) trn(:,:,:,jp_age0) = 0.
+      IF( .NOT. ln_rsttr ) trn(:,:,:,jp_age) = 0.
       !
    END SUBROUTINE trc_ini_age
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcnam_age.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcnam_age.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcnam_age.F90	(revision 7068)
@@ -38,4 +38,14 @@
       !!----------------------------------------------------------------------
 
+      ctrcnm    (jp_age) = 'Age'
+      ctrcln    (jp_age) = 'Sea water age since surface contact'
+      ctrcun    (jp_age) = 'year'
+      ln_trc_ini(jp_age) = .false. 
+      !
+      ln_trc_sbc(jp_age) =  ''
+      ln_trc_cbc(jp_age) =  ''
+      ln_trc_obc(jp_age) =  ''
+      !
+
       REWIND( numtrc_ref )              ! Namelist namagedate in reference namelist : AGE parameters
       READ  ( numtrc_ref, namage, IOSTAT = ios, ERR = 901)
@@ -48,4 +58,7 @@
 
       IF(lwp) THEN                  ! control print
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' Sea Age Tracer'
+         WRITE(numout,*) '  tracer nb : ', jp_age, '    short name : ', TRIM( ctrcnm(jp_age) )
          WRITE(numout,*)
          WRITE(numout,*) ' trc_nam_age: Read namage, namelist for Age passive tracer'
@@ -53,4 +66,5 @@
          WRITE(numout,*) '  depth over which age tracer reset to zero                              rn_age_depth      = ', rn_age_depth 
          WRITE(numout,*) '  recip of relax. timescale (s) for age tracer shallower than age_depth  rn_age_kill_rate  = ', rn_age_kill_rate 
+         WRITE(numout,*) ''
       ENDIF
 
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcsms_age.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcsms_age.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcsms_age.F90	(revision 7068)
@@ -58,15 +58,15 @@
 
       DO jk = 1, nla_age
-         tra(:,:,jk,jp_age0) = rn_age_kill_rate * trb(:,:,jk,jp_age0)
+         tra(:,:,jk,jp_age) = rn_age_kill_rate * trb(:,:,jk,jp_age)
       ENDDO
       !
-      tra(:,:,nl_age,jp_age0) = frac_kill_age * rn_age_kill_rate * trb(:,:,nl_age,jp_age0)  &
+      tra(:,:,nl_age,jp_age) = frac_kill_age * rn_age_kill_rate * trb(:,:,nl_age,jp_age)  &
           &                   + frac_add_age  * rryear * tmask(:,:,nl_age)
       !
       DO jk = nlb_age, jpk
-         tra(:,:,jk,jp_age0) = tmask(:,:,jk) * rryear
+         tra(:,:,jk,jp_age) = tmask(:,:,jk) * rryear
       ENDDO
       !
-      IF( l_trdtrc ) CALL trd_trc( tra(:,:,:,jp_age0), jn, jptra_sms, kt )   ! save trends
+      IF( l_trdtrc ) CALL trd_trc( tra(:,:,:,jp_age), jn, jptra_sms, kt )   ! save trends
       !
       IF( nn_timing == 1 )  CALL timing_stop('trc_sms_age')
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcwri_age.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcwri_age.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcwri_age.F90	(revision 7068)
@@ -33,6 +33,6 @@
       ! write the tracer concentrations in the file
 
-      cltra = TRIM( ctrcnm(jp_age0) )                  ! short title for tracer
-      CALL iom_put( cltra, trn(:,:,:,jp_age0) )
+      cltra = TRIM( ctrcnm(jp_age) )                  ! short title for tracer
+      CALL iom_put( cltra, trn(:,:,:,jp_age) )
 
       !
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/par_c14.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/par_c14.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/par_c14.F90	(revision 7068)
@@ -9,9 +9,5 @@
 
    IMPLICIT NONE
-
    INTEGER, PUBLIC ::  jp_c14    !: number of c14 tracer
-   INTEGER, PUBLIC ::  jp_c140   !: First index of C14 tracer
-
-   LOGICAL, PUBLIC ::  ln_c14
 
 END MODULE par_c14
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcini_c14.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcini_c14.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcini_c14.F90	(revision 7068)
@@ -51,17 +51,4 @@
       IF(lwp) WRITE(numout,*) ' trc_ini_c14: initialisation of C14 model'
       !
-      jp_c14  = 1
-      DO jn = 1, jptra
-        cltra = ctrcnm(jn) 
-        IF( cltra == 'C14' .OR. cltra == 'RC14' .OR. cltra == 'C14b' )   jp_c140 = jn     
-      ENDDO
-
-      IF( lwp ) THEN
-        WRITE(numout,*) ''
-        WRITE(numout,*) ' Index of c14 tracer in the passive tracer array   jp_c140 = ', jp_c140
-        WRITE(numout,*) 
-      ENDIF
-
-      !
       IF( .NOT. ln_rsttr )  THEN
          !
@@ -69,5 +56,5 @@
          IF(lwp) WRITE(numout,*) '                      ==>    Ocean C14/C :', rc14init 
          !
-         trn(:,:,:,jp_c140) = rc14init * tmask(:,:,:)
+         trn(:,:,:,jp_c14) = rc14init * tmask(:,:,:)
          !
          qtr_c14(:,:) = 0._wp           ! Init of air-sea BC
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcnam_c14.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcnam_c14.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcnam_c14.F90	(revision 7068)
@@ -43,4 +43,10 @@
       NAMELIST/namc14_fcg/ cfileco2, cfilec14, tyrc14_beg  ! for transient exps; atm forcing
       !!-------------------------------------------------------------------
+      !
+      ctrcnm    (jp_c14) = 'RC14'
+      ctrcln    (jp_c14) = 'Radiocarbon ratio'
+      ctrcun    (jp_c14) = '-'
+      ln_trc_ini(jp_c14) = .false.
+      !
 
       REWIND( numtrc_ref )              ! Namelist namc14_typ in reference namelist :
@@ -54,4 +60,8 @@
 
       IF(lwp) THEN                  ! control print
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' Radiocarbon C14'
+         WRITE(numout,*) '  tracer nb : ', jp_c14, '    short name : ', TRIM( ctrcnm(jp_c14) )
+         WRITE(numout,*) ' '
          WRITE(numout,*) ' Namelist namc14_typ'
          WRITE(numout,*)
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcsms_c14.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcsms_c14.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcsms_c14.F90	(revision 7068)
@@ -46,5 +46,5 @@
       !            freshwater fluxes which should not impact the C14/C ratio
       !
-      !        =>   Delta-C14= ( trn(...jp_c140) -1)*1000.
+      !        =>   Delta-C14= ( trn(...jp_c14) -1)*1000.
       !!
       !!----------------------------------------------------------------------
@@ -121,22 +121,22 @@
       ! Flux of C-14 from air-to-sea; units: (C14/C ratio) x m/s
       !                               already masked
-      qtr_c14(:,:) = exch_c14(:,:) * ( c14sbc(:,:) - trb(:,:,1,jp_c140) )
+      qtr_c14(:,:) = exch_c14(:,:) * ( c14sbc(:,:) - trb(:,:,1,jp_c14) )
             
       ! cumulation of air-to-sea flux at each time step
       qint_c14(:,:) = qint_c14(:,:) + qtr_c14(:,:) * rdttrc
       !
-      ! Add the surface flux to the trend of jp_c140
+      ! Add the surface flux to the trend of jp_c14
       DO jj = 1, jpj
          DO ji = 1, jpi
-            tra(ji,jj,1,jp_c140) = tra(ji,jj,1,jp_c140) + qtr_c14(ji,jj) / e3t_n(ji,jj,1) 
+            tra(ji,jj,1,jp_c14) = tra(ji,jj,1,jp_c14) + qtr_c14(ji,jj) / e3t_n(ji,jj,1) 
          END DO
       END DO
       !
-      ! Computation of decay effects on jp_c140
+      ! Computation of decay effects on jp_c14
       DO jk = 1, jpk
          DO jj = 1, jpj
             DO ji = 1, jpi
                !
-               tra(ji,jj,jk,jp_c140) = tra(ji,jj,jk,jp_c140) - rlam14 * trb(ji,jj,jk,jp_c140) * tmask(ji,jj,jk) 
+               tra(ji,jj,jk,jp_c14) = tra(ji,jj,jk,jp_c14) - rlam14 * trb(ji,jj,jk,jp_c14) * tmask(ji,jj,jk) 
                !
             END DO
@@ -159,5 +159,5 @@
       ENDIF
 
-      IF( l_trdtrc )  CALL trd_trc( tra(:,:,:,jp_c140), jp_c14, jptra_sms, kt )   ! save trends
+      IF( l_trdtrc )  CALL trd_trc( tra(:,:,:,jp_c14), 1, jptra_sms, kt )   ! save trends
       !
       IF( nn_timing == 1 )  CALL timing_stop('trc_sms_c14')
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcwri_c14.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcwri_c14.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcwri_c14.F90	(revision 7068)
@@ -42,6 +42,6 @@
       ! write the tracer concentrations in the file
       ! ---------------------------------------
-      cltra = TRIM( ctrcnm(jp_c140) )                  ! short title for tracer
-      CALL iom_put( cltra, trn(:,:,:,jp_c140) )
+      cltra = TRIM( ctrcnm(jp_c14) )                  ! short title for tracer
+      CALL iom_put( cltra, trn(:,:,:,jp_c14) )
 
       ! compute and write the tracer diagnostic in the file
@@ -61,5 +61,5 @@
                DO ji = 1, jpi
                   IF( tmask(ji,jj,jk) > 0._wp) THEN
-                     z3d (ji,jj,jk) = trn(ji,jj,jk,jp_c140)
+                     z3d (ji,jj,jk) = trn(ji,jj,jk,jp_c14)
                      zz3d(ji,jj,jk) = LOG( z3d(ji,jj,jk) )
                   ENDIF
@@ -114,5 +114,5 @@
       ENDIF
       IF( iom_use("C14Inv") ) THEN
-         ztemp = glob_sum( trn(:,:,:,jp_c140) * cvol(:,:,:) )
+         ztemp = glob_sum( trn(:,:,:,jp_c14) * cvol(:,:,:) )
          ztemp = atomc14 * xdicsur * ztemp
          CALL iom_put( "C14Inv", ztemp )  !  Radiocarbon ocean inventory [10^26 atoms]
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/CFC/par_cfc.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/CFC/par_cfc.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/CFC/par_cfc.F90	(revision 7068)
@@ -12,10 +12,5 @@
 
    IMPLICIT NONE
-
-   INTEGER, PUBLIC  :: jp_cfc            !:  number of CFC passive tracers
-   INTEGER, PUBLIC  :: jpc11, jpc12      !:  index of CFC tracers
    INTEGER, PUBLIC  :: jp_cfc0, jp_cfc1  !:  First/last index of CFC tracers
-
-   LOGICAL, PUBLIC  :: ln_cfc11, ln_cfc12, ll_cfc
 
    !!======================================================================
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/CFC/trcini_cfc.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/CFC/trcini_cfc.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/CFC/trcini_cfc.F90	(revision 7068)
@@ -49,31 +49,4 @@
       IF(lwp) WRITE(numout,*) ' trc_ini_cfc: initialisation of CFC chemical model'
       IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~'
-
-      
-      ! assign an index in trc arrays for each CFC prognostic variables
-      jp_cfc = 1 
-      IF( ln_cfc11 .AND. ln_cfc12 )  jp_cfc = 2
-
-      ! assign an index in trc arrays for each prognostic variables
-      DO jn = 1, jptra
-        cltra = ctrcnm(jn) 
-        IF( cltra == 'CFC11'  .OR. cltra == 'cfc11' )   jpc11 = jn 
-        IF( cltra == 'CFC12'  .OR. cltra == 'cfc12' )   jpc12 = jn 
-      ENDDO
-   
-      IF( jp_cfc == 1 ) THEN
-        IF( ln_cfc11 )  jp_cfc0  = jpc11
-        IF( ln_cfc12 )  jp_cfc0  = jpc12
-      ELSE
-        jp_cfc0 = MIN( jpc11, jpc12 ) 
-      ENDIF
-      jp_cfc1 = jp_cfc0 + jp_cfc - 1
-
-      IF( lwp ) THEN
-        WRITE(numout,*) ''
-        WRITE(numout,*) ' First index of CFC tracer in the passive tracer array   jp_cfc0 = ', jp_cfc0
-        WRITE(numout,*) ' Last  index of CFC tracer in the passive tracer array   jp_cfc1 = ', jp_cfc1
-        WRITE(numout,*) 
-      ENDIF
 
       IF(lwp) WRITE(numout,*) 'read of formatted file cfc1112atm'
@@ -142,5 +115,4 @@
       p_cfc(38,1:2,1) = 8.e-3
       p_cfc(39,1:2,1) = 1.e-2
-      
       IF(lwp) THEN        ! Control print
          WRITE(numout,*)
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/CFC/trcnam_cfc.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/CFC/trcnam_cfc.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/CFC/trcnam_cfc.F90	(revision 7068)
@@ -42,4 +42,21 @@
       !!----------------------------------------------------------------------
 
+      IF( ln_cfc11 ) THEN
+         ctrcnm    (jp_cfc0) = 'CFC11'
+         ctrcln    (jp_cfc0) = 'Chlorofluoro carbon 11 Concentration'
+         ctrcun    (jp_cfc0) = 'umolC/L'
+         ln_trc_ini(jp_cfc0) = .false.
+      ENDIF
+      !
+      IF( ln_cfc12 ) THEN
+         ctrcnm    (jp_cfc1) = 'CFC12'
+         ctrcln    (jp_cfc1) = 'Chlorofluoro carbon 12 Concentration'
+         ctrcun    (jp_cfc1) = 'umolC/L'
+         ln_trc_ini(jp_cfc1) = .false.
+      ENDIF
+      !
+      IF(lwp) THEN                   ! control print
+      ENDIF
+
       REWIND( numtrc_ref )              ! Namelist namcfcdate in reference namelist : CFC parameters
       READ  ( numtrc_ref, namcfc, IOSTAT = ios, ERR = 901)
@@ -52,5 +69,9 @@
 
       IF(lwp) THEN                  ! control print
-         WRITE(numout,*)
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' CFCs'
+         IF( ln_cfc11 )  WRITE(numout,*) '  tracer nb : ', jp_cfc0, '    short name : ', TRIM( ctrcnm(jp_cfc0) )
+         IF( ln_cfc12 )  WRITE(numout,*) '  tracer nb : ', jp_cfc1, '    short name : ', TRIM( ctrcnm(jp_cfc1) )
+         WRITE(numout,*) ' '
          WRITE(numout,*) ' trc_nam: Read namdates, namelist for CFC chemical model'
          WRITE(numout,*) ' ~~~~~~~'
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 7068)
@@ -8,8 +8,4 @@
    !!              -   !  2001-03  (M. Levy)  LNO3 + dia2d 
    !!             2.0  !  2007-12  (C. Deltel, G. Madec)  F90
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                     LOBSTER bio-model
    !!----------------------------------------------------------------------
    !!   p2z_bio        :  
@@ -506,15 +502,4 @@
    END SUBROUTINE p2z_bio_init
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p2z_bio( kt )                   ! Empty routine
-      INTEGER, INTENT( in ) ::   kt
-      WRITE(*,*) 'p2z_bio: You should not have seen this print! error?', kt
-   END SUBROUTINE p2z_bio
-#endif 
-
    !!======================================================================
 END MODULE p2zbio
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90	(revision 7068)
@@ -9,8 +9,4 @@
    !!             2.0  !  2007-12  (C. Deltel, G. Madec)  F90
    !!             3.5  !  2012-03  (C. Ethe)  Merge PISCES-LOBSTER
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                     LOBSTER bio-model
    !!----------------------------------------------------------------------
    !!   p2z_exp        :  Compute loss of organic matter in the sediments
@@ -265,15 +261,4 @@
    END FUNCTION p2z_exp_alloc
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p2z_exp( kt )                   ! Empty routine
-      INTEGER, INTENT( in ) ::   kt
-      WRITE(*,*) 'p2z_exp: You should not have seen this print! error?', kt
-   END SUBROUTINE p2z_exp
-#endif 
-
    !!======================================================================
 END MODULE  p2zexp
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 7068)
@@ -10,8 +10,4 @@
    !!   NEMO      2.0  !  2007-12  (C. Deltel, G. Madec)  F90
    !!             3.2  !  2009-04  (C. Ethe, G. Madec)  minor optimisation + style
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                     LOBSTER bio-model
    !!----------------------------------------------------------------------
    !!   p2z_opt        :   Compute the light availability in the water column
@@ -208,15 +204,4 @@
    END SUBROUTINE p2z_opt_init
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p2z_opt( kt )                   ! Empty routine
-      INTEGER, INTENT( in ) ::   kt
-      WRITE(*,*) 'p2z_opt: You should not have seen this print! error?', kt
-   END SUBROUTINE p2z_opt
-#endif 
-
    !!======================================================================
 END MODULE  p2zopt
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 7068)
@@ -7,8 +7,4 @@
    !!              -   !  2000-12 (E. Kestenare)  clean up
    !!             2.0  !  2007-12  (C. Deltel, G. Madec)  F90 + simplifications
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                     LOBSTER bio-model
    !!----------------------------------------------------------------------
    !!   p2z_sed        :  Compute loss of organic matter in the sediments
@@ -159,15 +155,4 @@
    END SUBROUTINE p2z_sed_init
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p2z_sed( kt )                   ! Empty routine
-      INTEGER, INTENT( in ) ::   kt
-      WRITE(*,*) 'p2z_sed: You should not have seen this print! error?', kt
-   END SUBROUTINE p2z_sed
-#endif 
-
    !!======================================================================
 END MODULE  p2zsed
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsms.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsms.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsms.F90	(revision 7068)
@@ -6,8 +6,4 @@
    !! History :   1.0  !            M. Levy
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  revised architecture
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                              LOBSTER bio-model
    !!----------------------------------------------------------------------
    !!   p2zsms        :  Time loop of passive tracers sms
@@ -72,15 +68,4 @@
    END SUBROUTINE p2z_sms
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                     No passive tracer
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p2z_sms( kt )                   ! Empty routine
-      INTEGER, INTENT( in ) ::   kt
-      WRITE(*,*) 'p2z_sms: You should not have seen this print! error?', kt
-   END SUBROUTINE p2z_sms
-#endif 
-
    !!======================================================================
 END MODULE p2zsms
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 7068)
@@ -6,8 +6,4 @@
    !! History :   1.0  !  2004     (O. Aumont) Original code
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_bio        :   computes the interactions between the different
@@ -96,13 +92,4 @@
    END SUBROUTINE p4z_bio
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_bio                         ! Empty routine
-   END SUBROUTINE p4z_bio
-#endif 
-
    !!======================================================================
 END MODULE p4zbio
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90	(revision 7068)
@@ -11,8 +11,4 @@
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
    !!                  !  2011-02  (J. Simeon, J.Orr ) update O2 solubility constants
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_che      :  Sea water chemistry computed following OCMIP protocol
@@ -333,15 +329,4 @@
    END FUNCTION p4z_che_alloc
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_che( kt )                   ! Empty routine
-      INTEGER, INTENT(in) ::   kt
-      WRITE(*,*) 'p4z_che: You should not have seen this print! error?', kt
-   END SUBROUTINE p4z_che
-#endif 
-
    !!======================================================================
 END MODULE p4zche
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 7068)
@@ -5,9 +5,4 @@
    !!======================================================================
    !! History :   3.5  !  2012-07 (O. Aumont, A. Tagliabue, C. Ethe) Original code
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_top'       and                                      TOP models
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_fechem       :  Compute remineralization/scavenging of iron
@@ -359,13 +354,4 @@
    END SUBROUTINE p4z_fechem_init
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_fechem                    ! Empty routine
-   END SUBROUTINE p4z_fechem
-#endif 
-
    !!======================================================================
 END MODULE p4zfechem
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 7068)
@@ -11,8 +11,4 @@
    !!                  !  2011-02  (J. Simeon, J. Orr) Include total atm P correction 
    !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
-   !!----------------------------------------------------------------------
    !!   p4z_flx       :   CALCULATES GAS EXCHANGE AND CHEMISTRY AT SEA SURFACE
    !!   p4z_flx_init  :   Read the namelist
@@ -26,7 +22,5 @@
    USE iom                          !  I/O manager
    USE fldread                      !  read input fields
-#if defined key_cpl_carbon_cycle
    USE sbc_oce, ONLY :  atm_co2     !  atmospheric pCO2               
-#endif
 
    IMPLICIT NONE
@@ -116,7 +110,5 @@
       ENDIF
 
-#if defined key_cpl_carbon_cycle
-      satmco2(:,:) = atm_co2(:,:)
-#endif
+ !    IF( ln_cpl_carbon_cycle )   satmco2(:,:) = atm_co2(:,:)
 
       DO jm = 1, 10
@@ -384,15 +376,4 @@
    END FUNCTION p4z_flx_alloc
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_flx( kt )                   ! Empty routine
-      INTEGER, INTENT( in ) ::   kt
-      WRITE(*,*) 'p4z_flx: You should not have seen this print! error?', kt
-   END SUBROUTINE p4z_flx
-#endif 
-
    !!======================================================================
 END MODULE p4zflx
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zint.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zint.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zint.F90	(revision 7068)
@@ -6,8 +6,4 @@
    !! History :   1.0  !  2004-03 (O. Aumont) Original code
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_int        :  interpolation and computation of various accessory fields
@@ -70,14 +66,4 @@
    END SUBROUTINE p4z_int
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_int                   ! Empty routine
-      WRITE(*,*) 'p4z_int: You should not have seen this print! error?'
-   END SUBROUTINE p4z_int
-#endif 
-
    !!======================================================================
 END MODULE p4zint
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90	(revision 7068)
@@ -7,8 +7,4 @@
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
    !!             3.4  !  2011-04  (O. Aumont, C. Ethe) Limitation for iron modelled in quota 
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_lim        :   Compute the nutrients limitation terms 
@@ -268,13 +264,4 @@
    END SUBROUTINE p4z_lim_init
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_lim                   ! Empty routine
-   END SUBROUTINE p4z_lim
-#endif 
-
    !!======================================================================
 END MODULE p4zlim
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90	(revision 7068)
@@ -11,8 +11,4 @@
    !!                  !  2011-02  (J. Simeon, J. Orr)  Calcon salinity dependence
    !!             3.4  !  2011-06  (O. Aumont, C. Ethe) Improvment of calcite dissolution
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_lys        :   Compute the CaCO3 dissolution 
@@ -204,14 +200,4 @@
    END SUBROUTINE p4z_lys_init
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_lys( kt )                   ! Empty routine
-      INTEGER, INTENT( in ) ::   kt
-      WRITE(*,*) 'p4z_lys: You should not have seen this print! error?', kt
-   END SUBROUTINE p4z_lys
-#endif 
    !!======================================================================
 END MODULE p4zlys
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90	(revision 7068)
@@ -7,8 +7,4 @@
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
    !!             3.4  !  2011-06  (O. Aumont, C. Ethe) Quota model for iron
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_meso       :   Compute the sources/sinks for mesozooplankton
@@ -297,14 +293,4 @@
    END SUBROUTINE p4z_meso_init
 
-
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_meso                    ! Empty routine
-   END SUBROUTINE p4z_meso
-#endif 
-
    !!======================================================================
 END MODULE p4zmeso
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 7068)
@@ -7,8 +7,4 @@
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
    !!             3.4  !  2011-06  (O. Aumont, C. Ethe) Quota model for iron
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_micro       :   Compute the sources/sinks for microzooplankton
@@ -250,13 +246,4 @@
    END SUBROUTINE p4z_micro_init
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_micro                    ! Empty routine
-   END SUBROUTINE p4z_micro
-#endif 
-
    !!======================================================================
 END MODULE p4zmicro
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90	(revision 7068)
@@ -6,8 +6,4 @@
    !! History :   1.0  !  2002     (O. Aumont)  Original code
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_mort       :   Compute the mortality terms for phytoplankton
@@ -245,13 +241,4 @@
    END SUBROUTINE p4z_mort_init
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_mort                    ! Empty routine
-   END SUBROUTINE p4z_mort
-#endif 
-
    !!======================================================================
 END MODULE p4zmort
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 7068)
@@ -8,8 +8,4 @@
    !!             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
@@ -421,13 +417,4 @@
    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: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 7068)
@@ -7,8 +7,4 @@
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
    !!             3.4  !  2011-05  (O. Aumont, C. Ethe) New parameterization of light limitation
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_prod       :   Compute the growth Rate of the two phytoplanktons groups
@@ -563,13 +559,4 @@
    END FUNCTION p4z_prod_alloc
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_prod                    ! Empty routine
-   END SUBROUTINE p4z_prod
-#endif 
-
    !!======================================================================
 END MODULE p4zprod
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 7068)
@@ -7,9 +7,4 @@
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
    !!             3.4  !  2011-06  (O. Aumont, C. Ethe) Quota model for iron
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_top'       and                                      TOP models
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_rem       :  Compute remineralization/dissolution of organic compounds
@@ -350,13 +345,4 @@
    END FUNCTION p4z_rem_alloc
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_rem                    ! Empty routine
-   END SUBROUTINE p4z_rem
-#endif 
-
    !!======================================================================
 END MODULE p4zrem
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 7068)
@@ -5,8 +5,4 @@
    !!======================================================================
    !! History :   3.5  !  2012-07 (O. Aumont, C. Ethe) Original code
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_sbc        :  Read and interpolate time-varying nutrients fluxes
@@ -508,13 +504,4 @@
    END SUBROUTINE p4z_sbc_init
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_sbc                         ! Empty routine
-   END SUBROUTINE p4z_sbc
-#endif 
-
    !!======================================================================
 END MODULE p4zsbc
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 7068)
@@ -8,8 +8,4 @@
    !!             3.4  !  2011-06 (C. Ethe) USE of fldread
    !!             3.5  !  2012-07 (O. Aumont) improvment of river input of nutrients 
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4z_sed        :  Compute loss of organic matter in the sediments
@@ -56,8 +52,6 @@
       INTEGER, INTENT(in) ::   kt, knt ! ocean time step
       INTEGER  ::   ji, jj, jk, ikt
-#if ! defined key_sed
       REAL(wp) ::   zsumsedsi, zsumsedpo4, zsumsedcal
       REAL(wp) ::   zrivalk, zrivsil, zrivno3
-#endif
       REAL(wp) ::  zwflux, zfminus, zfplus
       REAL(wp) ::  zlim, zfact, zfactcal
@@ -205,57 +199,56 @@
       END DO
 
-#if ! defined key_sed
-      ! Computation of the sediment denitrification proportion: The metamodel from midlleburg (2006) is being used
-      ! Computation of the fraction of organic matter that is permanently buried from Dunne's model
-      ! -------------------------------------------------------
-      DO jj = 1, jpj
-         DO ji = 1, jpi
-           IF( tmask(ji,jj,1) == 1 ) THEN
-              ikt = mbkt(ji,jj)
-              zflx = (  trb(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj)   &
-                &     + trb(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) )  * 1E3 * 1E6 / 1E4
-              zflx  = LOG10( MAX( 1E-3, zflx ) )
-              zo2   = LOG10( MAX( 10. , trb(ji,jj,ikt,jpoxy) * 1E6 ) )
-              zno3  = LOG10( MAX( 1.  , trb(ji,jj,ikt,jpno3) * 1E6 * rno3 ) )
-              zdep  = LOG10( gdepw_n(ji,jj,ikt+1) )
-              zdenit2d(ji,jj) = -2.2567 - 1.185 * zflx - 0.221 * zflx**2 - 0.3995 * zno3 * zo2 + 1.25 * zno3    &
-              &                + 0.4721 * zo2 - 0.0996 * zdep + 0.4256 * zflx * zo2
-              zdenit2d(ji,jj) = 10.0**( zdenit2d(ji,jj) )
-              !
-              zflx = (  trb(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj)   &
-                &     + trb(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) ) * 1E6
-              zbureff(ji,jj) = 0.013 + 0.53 * zflx**2 / ( 7.0 + zflx )**2
-           ENDIF
-         END DO
-      END DO 
-
-      ! Loss of biogenic silicon, Caco3 organic carbon in the sediments. 
-      ! First, the total loss is computed.
-      ! The factor for calcite comes from the alkalinity effect
-      ! -------------------------------------------------------------
-      DO jj = 1, jpj
-         DO ji = 1, jpi
-            IF( tmask(ji,jj,1) == 1 ) THEN
-               ikt = mbkt(ji,jj) 
-               zwork1(ji,jj) = trb(ji,jj,ikt,jpgsi) * zwsbio4(ji,jj)
-               zwork2(ji,jj) = trb(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj) + trb(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) 
-               ! For calcite, burial efficiency is made a function of saturation
-               zfactcal      = MIN( excess(ji,jj,ikt), 0.2 )
-               zfactcal      = MIN( 1., 1.3 * ( 0.2 - zfactcal ) / ( 0.4 - zfactcal ) )
-               zwork3(ji,jj) = trb(ji,jj,ikt,jpcal) * zwscal(ji,jj) * 2.e0 * zfactcal
-            ENDIF
-         END DO
-      END DO
-      zsumsedsi  = glob_sum( zwork1(:,:) * e1e2t(:,:) ) * r1_rday
-      zsumsedpo4 = glob_sum( zwork2(:,:) * e1e2t(:,:) ) * r1_rday
-      zsumsedcal = glob_sum( zwork3(:,:) * e1e2t(:,:) ) * r1_rday
-#endif
+      IF( .NOT.lk_sed ) THEN
+         ! Computation of the sediment denitrification proportion: The metamodel from midlleburg (2006) is being used
+         ! Computation of the fraction of organic matter that is permanently buried from Dunne's model
+         ! -------------------------------------------------------
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+              IF( tmask(ji,jj,1) == 1 ) THEN
+                 ikt = mbkt(ji,jj)
+                 zflx = (  trb(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj)   &
+                   &     + trb(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) )  * 1E3 * 1E6 / 1E4
+                 zflx  = LOG10( MAX( 1E-3, zflx ) )
+                 zo2   = LOG10( MAX( 10. , trb(ji,jj,ikt,jpoxy) * 1E6 ) )
+                 zno3  = LOG10( MAX( 1.  , trb(ji,jj,ikt,jpno3) * 1E6 * rno3 ) )
+                 zdep  = LOG10( gdepw_n(ji,jj,ikt+1) )
+                 zdenit2d(ji,jj) = -2.2567 - 1.185 * zflx - 0.221 * zflx**2 - 0.3995 * zno3 * zo2 + 1.25 * zno3    &
+                   &                + 0.4721 * zo2 - 0.0996 * zdep + 0.4256 * zflx * zo2
+                   zdenit2d(ji,jj) = 10.0**( zdenit2d(ji,jj) )
+                   !
+                   zflx = (  trb(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj)   &
+                     &     + trb(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) ) * 1E6
+                   zbureff(ji,jj) = 0.013 + 0.53 * zflx**2 / ( 7.0 + zflx )**2
+                ENDIF
+              END DO
+           END DO 
+
+           ! Loss of biogenic silicon, Caco3 organic carbon in the sediments. 
+           ! First, the total loss is computed.
+           ! The factor for calcite comes from the alkalinity effect
+           ! -------------------------------------------------------------
+           DO jj = 1, jpj
+              DO ji = 1, jpi
+                 IF( tmask(ji,jj,1) == 1 ) THEN
+                    ikt = mbkt(ji,jj) 
+                    zwork1(ji,jj) = trb(ji,jj,ikt,jpgsi) * zwsbio4(ji,jj)
+                    zwork2(ji,jj) = trb(ji,jj,ikt,jpgoc) * zwsbio4(ji,jj) + trb(ji,jj,ikt,jppoc) * zwsbio3(ji,jj) 
+                    ! For calcite, burial efficiency is made a function of saturation
+                    zfactcal      = MIN( excess(ji,jj,ikt), 0.2 )
+                    zfactcal      = MIN( 1., 1.3 * ( 0.2 - zfactcal ) / ( 0.4 - zfactcal ) )
+                   zwork3(ji,jj) = trb(ji,jj,ikt,jpcal) * zwscal(ji,jj) * 2.e0 * zfactcal
+                ENDIF
+            END DO
+         END DO
+         zsumsedsi  = glob_sum( zwork1(:,:) * e1e2t(:,:) ) * r1_rday
+         zsumsedpo4 = glob_sum( zwork2(:,:) * e1e2t(:,:) ) * r1_rday
+         zsumsedcal = glob_sum( zwork3(:,:) * e1e2t(:,:) ) * r1_rday
+         !
+      ENDIF
 
       ! This loss is scaled at each bottom grid cell for equilibrating the total budget of silica in the ocean.
       ! Thus, the amount of silica lost in the sediments equal the supply at the surface (dust+rivers)
       ! ------------------------------------------------------
-#if ! defined key_sed
-      zrivsil =  1._wp - ( sumdepsi + rivdsiinput * r1_ryyss ) / ( zsumsedsi + rtrn )
-#endif
+      IF( .NOT.lk_sed )    zrivsil =  1._wp - ( sumdepsi + rivdsiinput * r1_ryyss ) / ( zsumsedsi + rtrn )
 
       DO jj = 1, jpj
@@ -270,12 +263,12 @@
             tra(ji,jj,ikt,jpgsi) = tra(ji,jj,ikt,jpgsi) - zsiloss
             tra(ji,jj,ikt,jpcal) = tra(ji,jj,ikt,jpcal) - zcaloss
-#if ! defined key_sed
-            tra(ji,jj,ikt,jpsil) = tra(ji,jj,ikt,jpsil) + zsiloss * zrivsil 
-            zfactcal = MIN( excess(ji,jj,ikt), 0.2 )
-            zfactcal = MIN( 1., 1.3 * ( 0.2 - zfactcal ) / ( 0.4 - zfactcal ) )
-            zrivalk  =  1._wp - ( rivalkinput * r1_ryyss ) * zfactcal / ( zsumsedcal + rtrn )
-            tra(ji,jj,ikt,jptal) =  tra(ji,jj,ikt,jptal) + zcaloss * zrivalk * 2.0
-            tra(ji,jj,ikt,jpdic) =  tra(ji,jj,ikt,jpdic) + zcaloss * zrivalk
-#endif
+            IF( .NOT.lk_sed ) THEN
+               tra(ji,jj,ikt,jpsil) = tra(ji,jj,ikt,jpsil) + zsiloss * zrivsil 
+               zfactcal = MIN( excess(ji,jj,ikt), 0.2 )
+               zfactcal = MIN( 1., 1.3 * ( 0.2 - zfactcal ) / ( 0.4 - zfactcal ) )
+               zrivalk  =  1._wp - ( rivalkinput * r1_ryyss ) * zfactcal / ( zsumsedcal + rtrn )
+               tra(ji,jj,ikt,jptal) =  tra(ji,jj,ikt,jptal) + zcaloss * zrivalk * 2.0
+               tra(ji,jj,ikt,jpdic) =  tra(ji,jj,ikt,jpdic) + zcaloss * zrivalk
+            ENDIF
          END DO
       END DO
@@ -294,20 +287,20 @@
             zwstpoc              = trb(ji,jj,ikt,jpgoc) * zws4 + trb(ji,jj,ikt,jppoc) * zws3
 
-#if ! defined key_sed
-            ! The 0.5 factor in zpdenit and zdenitt is to avoid negative NO3 concentration after both denitrification
-            ! in the sediments and just above the sediments. Not very clever, but simpliest option.
-            zpdenit  = MIN( 0.5 * ( trb(ji,jj,ikt,jpno3) - rtrn ) / rdenit, zdenit2d(ji,jj) * zwstpoc * zrivno3 )
-            z1pdenit = zwstpoc * zrivno3 - zpdenit
-            zolimit = MIN( ( trb(ji,jj,ikt,jpoxy) - rtrn ) / o2ut, z1pdenit * ( 1.- nitrfac(ji,jj,ikt) ) )
-            zdenitt = MIN(  0.5 * ( trb(ji,jj,ikt,jpno3) - rtrn ) / rdenit, z1pdenit * nitrfac(ji,jj,ikt) )
-            tra(ji,jj,ikt,jpdoc) = tra(ji,jj,ikt,jpdoc) + z1pdenit - zolimit - zdenitt
-            tra(ji,jj,ikt,jppo4) = tra(ji,jj,ikt,jppo4) + zpdenit + zolimit + zdenitt
-            tra(ji,jj,ikt,jpnh4) = tra(ji,jj,ikt,jpnh4) + zpdenit + zolimit + zdenitt
-            tra(ji,jj,ikt,jpno3) = tra(ji,jj,ikt,jpno3) - rdenit * (zpdenit + zdenitt)
-            tra(ji,jj,ikt,jpoxy) = tra(ji,jj,ikt,jpoxy) - zolimit * o2ut
-            tra(ji,jj,ikt,jptal) = tra(ji,jj,ikt,jptal) + rno3 * (zolimit + (1.+rdenit) * (zpdenit + zdenitt) )
-            tra(ji,jj,ikt,jpdic) = tra(ji,jj,ikt,jpdic) + zpdenit + zolimit + zdenitt
-            sdenit(ji,jj) = rdenit * zpdenit * e3t_n(ji,jj,ikt)
-#endif
+            IF( .NOT.lk_sed ) THEN
+               ! The 0.5 factor in zpdenit and zdenitt is to avoid negative NO3 concentration after both denitrification
+               ! in the sediments and just above the sediments. Not very clever, but simpliest option.
+               zpdenit  = MIN( 0.5 * ( trb(ji,jj,ikt,jpno3) - rtrn ) / rdenit, zdenit2d(ji,jj) * zwstpoc * zrivno3 )
+               z1pdenit = zwstpoc * zrivno3 - zpdenit
+               zolimit = MIN( ( trb(ji,jj,ikt,jpoxy) - rtrn ) / o2ut, z1pdenit * ( 1.- nitrfac(ji,jj,ikt) ) )
+               zdenitt = MIN(  0.5 * ( trb(ji,jj,ikt,jpno3) - rtrn ) / rdenit, z1pdenit * nitrfac(ji,jj,ikt) )
+               tra(ji,jj,ikt,jpdoc) = tra(ji,jj,ikt,jpdoc) + z1pdenit - zolimit - zdenitt
+               tra(ji,jj,ikt,jppo4) = tra(ji,jj,ikt,jppo4) + zpdenit + zolimit + zdenitt
+               tra(ji,jj,ikt,jpnh4) = tra(ji,jj,ikt,jpnh4) + zpdenit + zolimit + zdenitt
+               tra(ji,jj,ikt,jpno3) = tra(ji,jj,ikt,jpno3) - rdenit * (zpdenit + zdenitt)
+               tra(ji,jj,ikt,jpoxy) = tra(ji,jj,ikt,jpoxy) - zolimit * o2ut
+               tra(ji,jj,ikt,jptal) = tra(ji,jj,ikt,jptal) + rno3 * (zolimit + (1.+rdenit) * (zpdenit + zdenitt) )
+               tra(ji,jj,ikt,jpdic) = tra(ji,jj,ikt,jpdic) + zpdenit + zolimit + zdenitt
+               sdenit(ji,jj) = rdenit * zpdenit * e3t_n(ji,jj,ikt)
+            ENDIF
          END DO
       END DO
@@ -392,13 +385,4 @@
 
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_sed                         ! Empty routine
-   END SUBROUTINE p4z_sed
-#endif 
-
    !!======================================================================
 END MODULE p4zsed
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 7068)
@@ -8,6 +8,4 @@
    !!             3.4  !  2011-06  (O. Aumont, C. Ethe) Change aggregation formula
    !!             3.5  !  2012-07  (O. Aumont) Introduce potential time-splitting
-   !!----------------------------------------------------------------------
-#if defined key_pisces
    !!----------------------------------------------------------------------
    !!   p4z_sink       :  Compute vertical flux of particulate matter due to gravitational sinking
@@ -409,13 +407,4 @@
    END FUNCTION p4z_sink_alloc
    
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_sink                    ! Empty routine
-   END SUBROUTINE p4z_sink
-#endif 
-
    !!======================================================================
 END MODULE p4zsink
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 7068)
@@ -6,8 +6,4 @@
    !! History :   1.0  !  2004-03 (O. Aumont) Original code
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   p4zsms         :  Time loop of passive tracers sms
@@ -546,15 +542,4 @@
    END SUBROUTINE p4z_chk_mass
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE p4z_sms( kt )                   ! Empty routine
-      INTEGER, INTENT( in ) ::   kt
-      WRITE(*,*) 'p4z_sms: You should not have seen this print! error?', kt
-   END SUBROUTINE p4z_sms
-#endif 
-
    !!======================================================================
 END MODULE p4zsms 
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedmodel.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedmodel.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedmodel.F90	(revision 7068)
@@ -15,7 +15,4 @@
    PUBLIC sed_model  ! called by step.F90
 
-   LOGICAL, PUBLIC, PARAMETER ::   lk_sed = .TRUE.     !: sediment flag
-
-   !! $Id$
 CONTAINS
 
@@ -47,6 +44,4 @@
    !! MODULE sedmodel  :   Dummy module 
    !!======================================================================
-   LOGICAL, PUBLIC, PARAMETER ::   lk_sed = .FALSE.     !: sediment flag
-   !! $Id$
 CONTAINS
    SUBROUTINE sed_model( kt )         ! Empty routine
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/par_pisces.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/par_pisces.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/par_pisces.F90	(revision 7068)
@@ -13,19 +13,7 @@
    IMPLICIT NONE
 
-   INTEGER, PUBLIC    ::   jp_pisces   !: number of passive tracers in PISCES
-
-#if defined key_pisces
-   !!---------------------------------------------------------------------
-   !!   'key_pisces   :                                PISCES bio-model
-   !!---------------------------------------------------------------------
-   LOGICAL, PUBLIC, PARAMETER ::   lk_pisces     = .TRUE.  !: PISCES flag 
    ! productive layer depth
-   INTEGER, PUBLIC ::   jpkb     !: first vertical layers where biology is active
-   INTEGER, PUBLIC ::   jpkbm1   !: first vertical layers where biology is active
-
-#else
-   !!---------------------------------------------------------------------
-   LOGICAL, PUBLIC, PARAMETER ::   lk_pisces     = .FALSE.  !: PISCES flag 
-#endif
+   INTEGER, PUBLIC ::   jpkb       !: first vertical layers where biology is active
+   INTEGER, PUBLIC ::   jpkbm1     !: first vertical layers where biology is active
 
    ! assign an index in trc arrays for each LOBSTER prognostic variables
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90	(revision 7068)
@@ -6,8 +6,4 @@
    !! History :   1.0  !  2000-02 (O. Aumont) original code
    !!             3.2  !  2009-04 (C. Ethe & NEMO team) style
-   !!----------------------------------------------------------------------
-#if defined key_pisces 
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                         PISCES model
    !!----------------------------------------------------------------------
    USE par_oce
@@ -112,4 +108,9 @@
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tgfunc2   !: Temp. dependancy of mesozooplankton rates
 
+#if defined key_sed
+   LOGICAL, PUBLIC, PARAMETER ::   lk_sed = .TRUE.     !: sediment flag
+#else
+   LOGICAL, PUBLIC, PARAMETER ::   lk_sed = .FALSE.     !: sediment flag
+#endif
 
    !!----------------------------------------------------------------------
@@ -165,10 +166,4 @@
    END FUNCTION sms_pisces_alloc
 
-#else
-   !!----------------------------------------------------------------------   
-   !!  Empty module :                                     NO PISCES model
-   !!----------------------------------------------------------------------
-#endif
-   
    !!======================================================================   
 END MODULE sms_pisces    
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcice_pisces.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcice_pisces.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcice_pisces.F90	(revision 7068)
@@ -5,8 +5,4 @@
    !!======================================================================
    !! History :  3.5  ! 2013    (M. Vancoppenolle, O. Aumont, G. Madec), original code
-   !!----------------------------------------------------------------------
-#if defined key_pisces 
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !! trc_ice_pisces   : PISCES fake sea ice model setting
@@ -276,13 +272,4 @@
 
 
-#else
-   !!----------------------------------------------------------------------
-   !!   Dummy module                            No PISCES biochemical model
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_ice_ini_pisces         ! Empty routine
-   END SUBROUTINE trc_ice_ini_pisces
-#endif
-
    !!======================================================================
 END MODULE trcice_pisces
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90	(revision 7068)
@@ -10,8 +10,4 @@
    !!             2.0  !  2007-12  (C. Ethe, G. Madec) from trcini.pisces.h90
    !!             3.5  !  2012-05  (C. Ethe) Merge PISCES-LOBSTER
-   !!----------------------------------------------------------------------
-#if defined key_pisces 
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !! trc_ini_pisces   : PISCES biochemical model initialisation
@@ -135,21 +131,4 @@
       ENDDO
 
-      jp_pisces = 24
-      jp_pcs0 = MIN( jpdic, jptal, jpoxy, jpcal, jppo4, jppoc, jpsil, &
-         &           jpphy, jpzoo, jpdoc, jpdia, jpmes, jpdsi, jpfer, &
-         &           jpbfe, jpgoc, jpsfe, jpdfe, jpgsi, jpnfe, jpnch, &
-         &           jpdch, jpno3, jpnh4 )
-
-      jp_pcs1     =  jp_pcs0 + jp_pisces - 1
-
-
-      IF( lwp ) THEN
-        WRITE(numout,*) ''
-        WRITE(numout,*) ' First index of PISCES model in the passive tracer array   jp_pcs0 = ', jp_pcs0
-        WRITE(numout,*) ' Last  index of PISCES model in the passive tracer array   jp_pcs1 = ', jp_pcs1
-        WRITE(numout,*) 
-      ENDIF
-      
-
       CALL p4z_sms_init       !  Maint routine
       !                                            ! Time-step
@@ -257,17 +236,4 @@
       ENDDO
 
-
-      jp_pcs0 = MIN( jpdet, jpzoo, jpphy, jpno3, jpnh4, jpdom )
-      jp_pcs1 =  jp_pcs0 + jp_pisces - 1
-
-
-      IF( lwp ) THEN
-        WRITE(numout,*) ''
-        WRITE(numout,*) ' First index of LOBSTER model in the passive tracer array   jp_pcs0 = ', jp_pcs0
-        WRITE(numout,*) ' Last  index of LOBSTER model in the passive tracer array   jp_pcs1 = ', jp_pcs1
-        WRITE(numout,*) 
-      ENDIF
-
-
       jpkb = 10        !  last level where depth less than 200 m
       DO jk = jpkm1, 1, -1
@@ -304,12 +270,4 @@
       !
    END SUBROUTINE p2z_ini
-#else
-   !!----------------------------------------------------------------------
-   !!   Dummy module                            No PISCES biochemical model
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_ini_pisces             ! Empty routine
-   END SUBROUTINE trc_ini_pisces
-#endif
 
    !!======================================================================
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90	(revision 7068)
@@ -8,8 +8,4 @@
    !!             1.0  !  2003-08 (C. Ethe)  module F90
    !!             2.0  !  2007-12  (C. Ethe, G. Madec) from trcnam.pisces.h90
-   !!----------------------------------------------------------------------
-#if defined key_pisces 
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'   :                                   PISCES bio-model
    !!----------------------------------------------------------------------
    !! trc_nam_pisces       : PISCES model namelist read
@@ -74,7 +70,8 @@
 
       IF(lwp) THEN                         ! control print
-         WRITE(numout,*) ' Namelist : nampismod'
-         WRITE(numout,*) '    PISCES   model                 ln_p4z  =', ln_p4z
-         WRITE(numout,*) '    LOBSTER  model                 ln_p2z  =', ln_p2z
+         WRITE(numout,*) ' '
+         IF( ln_p4z )  WRITE(numout,*) '          PISCES  model is used'
+         IF( ln_p2z )  WRITE(numout,*) '          LOBSTER model is used'
+         WRITE(numout,*) ' '
       ENDIF
     
@@ -87,13 +84,4 @@
    END SUBROUTINE trc_nam_pisces
 
-#else
-   !!----------------------------------------------------------------------
-   !!  Dummy module :                                   No PISCES bio-model
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_nam_pisces                      ! Empty routine
-   END  SUBROUTINE  trc_nam_pisces
-#endif  
-
    !!======================================================================
 END MODULE trcnam_pisces
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90	(revision 7068)
@@ -6,8 +6,4 @@
    !! History :   1.0  !  2004-03 (O. Aumont) Original code
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
-   !!----------------------------------------------------------------------
-#if defined key_pisces 
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'                                       PISCES bio-model
    !!----------------------------------------------------------------------
    !!   trcsms_pisces        :  Time loop of passive tracers sms
@@ -56,15 +52,4 @@
    END SUBROUTINE trc_sms_pisces
 
-#else
-   !!======================================================================
-   !!  Dummy module :                                   No PISCES bio-model
-   !!======================================================================
-CONTAINS
-   SUBROUTINE trc_sms_pisces( kt )                   ! Empty routine
-      INTEGER, INTENT( in ) ::   kt
-      WRITE(*,*) 'trc_sms_pisces: You should not have seen this print! error?', kt
-   END SUBROUTINE trc_sms_pisces
-#endif 
-
    !!======================================================================
 END MODULE trcsms_pisces 
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90	(revision 7068)
@@ -6,7 +6,5 @@
    !! History :   1.0  !  2009-05 (C. Ethe)  Original code
    !!----------------------------------------------------------------------
-#if defined key_top && defined key_pisces && defined key_iomput 
-   !!----------------------------------------------------------------------
-   !!   'key_pisces                           PISCES model
+#if defined key_top && defined key_iomput 
    !!----------------------------------------------------------------------
    !! trc_wri_pisces   :  outputs of concentration fields
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90	(revision 7068)
@@ -62,9 +62,9 @@
       ENDIF
 
-      IF( ln_age     )   CALL trc_rad_sms( kt, trb, trn, jp_age0, jp_age0               )  !  AGE
+      IF( ln_age     )   CALL trc_rad_sms( kt, trb, trn, jp_age , jp_age               )  !  AGE
       IF( ll_cfc     )   CALL trc_rad_sms( kt, trb, trn, jp_cfc0, jp_cfc1               )  !  CFC model
-      IF( ln_c14     )   CALL trc_rad_sms( kt, trb, trn, jp_c140, jp_c140               )  !  C14
-      IF( lk_pisces  )   CALL trc_rad_sms( kt, trb, trn, jp_pcs0, jp_pcs1, cpreserv='Y' )  !  PISCES model
-      IF( lk_my_trc  )   CALL trc_rad_sms( kt, trb, trn, jp_myt0, jp_myt1               )  !  MY_TRC model
+      IF( ln_c14     )   CALL trc_rad_sms( kt, trb, trn, jp_c14 , jp_c14               )  !  C14
+      IF( ln_pisces  )   CALL trc_rad_sms( kt, trb, trn, jp_pcs0, jp_pcs1, cpreserv='Y' )  !  PISCES model
+      IF( ln_my_trc  )   CALL trc_rad_sms( kt, trb, trn, jp_myt0, jp_myt1               )  !  MY_TRC model
 
       !
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 7068)
@@ -41,27 +41,16 @@
    PUBLIC trd_mxl_trc
    PUBLIC trd_mxl_trc_alloc
-   PUBLIC trd_mxl_bio
    PUBLIC trd_mxl_trc_init
    PUBLIC trd_mxl_trc_zint
-   PUBLIC trd_mxl_bio_zint
 
    CHARACTER (LEN=40) ::  clhstnam                                ! name of the trends NetCDF file
    INTEGER ::   nmoymltrd
-   INTEGER, ALLOCATABLE, SAVE, DIMENSION(:) ::   ndextrd1
-   INTEGER, DIMENSION(jptra) ::   nidtrd, nh_t
+   INTEGER, ALLOCATABLE, SAVE, DIMENSION(:) ::   ndextrd1, nidtrd, nh_t
    INTEGER ::   ndimtrd1                        
    INTEGER, SAVE ::  ionce, icount
-#if defined key_pisces_reduced
-   INTEGER ::   nidtrdbio, nh_tb
-   INTEGER, SAVE ::  ioncebio, icountbio
-   INTEGER, SAVE ::   nmoymltrdbio
-#endif
    LOGICAL :: llwarn  = .TRUE.                                    ! this should always be .TRUE.
    LOGICAL :: lldebug = .TRUE.
 
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::  ztmltrd2   !
-#if defined key_pisces_reduced
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  ztmltrdbio2  ! only needed for mean diagnostics in trd_mxl_bio()
-#endif
 
    !! * Substitutions
@@ -79,8 +68,5 @@
       !!----------------------------------------------------------------------
       ALLOCATE( ztmltrd2(jpi,jpj,jpltrd_trc,jptra) ,      &
-#if defined key_pisces_reduced
-         &      ztmltrdbio2(jpi,jpj,jpdiabio)      ,      &
-#endif
-         &      ndextrd1(jpi*jpj)                  ,  STAT=trd_mxl_trc_alloc)
+         &      ndextrd1(jpi*jpj), nidtrd(jptra), nh_t(jptra),  STAT=trd_mxl_trc_alloc)
          !
       IF( lk_mpp                )   CALL mpp_sum ( trd_mxl_trc_alloc )
@@ -131,7 +117,5 @@
          SELECT CASE ( nn_ctls_trc )                                ! choice of the control surface
             CASE ( -2  )   ;   STOP 'trdmxl_trc : not ready '     !     -> isopycnal surface (see ???)
-#if defined key_pisces || defined key_pisces_reduced
             CASE ( -1  )   ;   nmld_trc(:,:) = neln(:,:)          !     -> euphotic layer with light criterion
-#endif
             CASE (  0  )   ;   nmld_trc(:,:) = nmln(:,:)          !     -> ML with density criterion (see zdfmxl)
             CASE (  1  )   ;   nmld_trc(:,:) = nbol_trc(:,:)          !     -> read index from file
@@ -207,119 +191,4 @@
       !
    END SUBROUTINE trd_mxl_trc_zint
-
-
-   SUBROUTINE trd_mxl_bio_zint( ptrc_trdmxl, ktrd )
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE trd_mxl_bio_zint  ***
-      !!
-      !! ** Purpose :   Compute the vertical average of the 3D fields given as arguments
-      !!                to the subroutine. This vertical average is performed from ocean
-      !!                surface down to a chosen control surface.
-      !!
-      !! ** Method/usage :
-      !!      The control surface can be either a mixed layer depth (time varying)
-      !!      or a fixed surface (jk level or bowl).
-      !!      Choose control surface with nctls in namelist NAMTRD :
-      !!        nctls_trc = 0  : use mixed layer with density criterion
-      !!        nctls_trc = 1  : read index from file 'ctlsurf_idx'
-      !!        nctls_trc > 1  : use fixed level surface jk = nctls_trc
-      !!      Note: in the remainder of the routine, the volume between the
-      !!            surface and the control surface is called "mixed-layer"
-      !!----------------------------------------------------------------------
-      !!
-      INTEGER                         , INTENT(in) ::   ktrd          ! bio trend index
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in) ::   ptrc_trdmxl   ! passive trc trend
-#if defined key_pisces_reduced
-      !
-      INTEGER ::   ji, jj, jk, isum
-      REAL(wp), POINTER, DIMENSION(:,:) :: zvlmsk
-      !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, zvlmsk )
-
-      ! I. Definition of control surface and integration weights
-      ! --------------------------------------------------------
-      !            ==> only once per time step <==
-
-      IF( icountbio == 1 ) THEN
-         !
-         tmltrd_bio(:,:,:) = 0.e0    ! <<< reset trend arrays to zero
-         ! ... Set nmld(ji,jj) = index of first T point below control surf. or outside mixed-layer
-         SELECT CASE ( nn_ctls_trc )                                    ! choice of the control surface
-            CASE ( -2  )   ;   STOP 'trdmxl_trc : not ready '     !     -> isopycnal surface (see ???)
-            CASE ( -1  )   ;   nmld_trc(:,:) = neln(:,:)          !     -> euphotic layer with light criterion
-            CASE (  0  )   ;   nmld_trc(:,:) = nmln(:,:)          !     -> ML with density criterion (see zdfmxl)
-            CASE (  1  )   ;   nmld_trc(:,:) = nbol_trc(:,:)          !     -> read index from file
-            CASE (  2: )   ;   nn_ctls_trc = MIN( nn_ctls_trc, jpktrd_trc - 1 )
-                               nmld_trc(:,:) = nn_ctls_trc + 1          !     -> model level
-         END SELECT
-
-         ! ... Compute ndextrd1 and ndimtrd1 only once
-         IF( ioncebio == 1 ) THEN
-            !
-            ! Check of validity : nmld_trc(ji,jj) <= jpktrd_trc
-            isum        = 0
-            zvlmsk(:,:) = 0.e0
-
-            IF( jpktrd_trc < jpk ) THEN
-               DO jj = 1, jpj
-                  DO ji = 1, jpi
-                     IF( nmld_trc(ji,jj) <= jpktrd_trc ) THEN
-                        zvlmsk(ji,jj) = tmask(ji,jj,1)
-                     ELSE
-                        isum = isum + 1
-                        zvlmsk(ji,jj) = 0.
-                     END IF
-                  END DO
-               END DO
-            END IF
-
-            ! Index of ocean points (2D only)
-            IF( isum > 0 ) THEN
-               WRITE(numout,*)' tmltrd_trc : Number of invalid points nmld_trc > jpktrd', isum
-               CALL wheneq( jpi*jpj, zvlmsk(:,:) , 1, 1., ndextrd1, ndimtrd1 )
-            ELSE
-               CALL wheneq( jpi*jpj, tmask(:,:,1), 1, 1., ndextrd1, ndimtrd1 )
-            END IF
-
-            ioncebio = 0                  ! no more pass here
-            !
-         END IF !  ( ioncebio == 1 )
-
-         ! ... Weights for vertical averaging
-         wkx_trc(:,:,:) = 0.e0
-         DO jk = 1, jpktrd_trc         ! initialize wkx_trc with vertical scale factor in mixed-layer
-            DO jj = 1,jpj
-              DO ji = 1,jpi
-                  IF( jk - nmld_trc(ji,jj) < 0. )   wkx_trc(ji,jj,jk) = e3t_n(ji,jj,jk) * tmask(ji,jj,jk)
-               END DO
-            END DO
-         END DO
-
-         rmld_trc(:,:) = 0.
-         DO jk = 1, jpktrd_trc         ! compute mixed-layer depth : rmld_trc
-            rmld_trc(:,:) = rmld_trc(:,:) + wkx_trc(:,:,jk)
-         END DO
-
-         DO jk = 1, jpktrd_trc         ! compute integration weights
-            wkx_trc(:,:,jk) = wkx_trc(:,:,jk) / MAX( 1., rmld_trc(:,:) )
-         END DO
-
-         icountbio = 0                    ! <<< flag = off : control surface & integr. weights
-         !                             !     computed only once per time step
-      END IF ! ( icountbio == 1 )
-
-      ! II. Vertical integration of trends in the mixed-layer
-      ! -----------------------------------------------------
-
-
-      DO jk = 1, jpktrd_trc
-         tmltrd_bio(:,:,ktrd) = tmltrd_bio(:,:,ktrd) + ptrc_trdmxl(:,:,jk) * wkx_trc(:,:,jk)
-      END DO
-
-      CALL wrk_dealloc( jpi, jpj, zvlmsk )
-#endif
-      !
-   END SUBROUTINE trd_mxl_bio_zint
 
 
@@ -877,229 +746,4 @@
 
 
-   SUBROUTINE trd_mxl_bio( kt )
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE trd_mld  ***
-      !!
-      !! ** Purpose :  Compute and cumulate the mixed layer biological trends over an analysis
-      !!               period, and write NetCDF outputs.
-      !!
-      !! ** Method/usage :
-      !!          The stored trends can be chosen twofold (according to the ln_trdmxl_trc_instant
-      !!          logical namelist variable) :
-      !!          1) to explain the difference between initial and final
-      !!             mixed-layer T & S (where initial and final relate to the
-      !!             current analysis window, defined by ntrd in the namelist)
-      !!          2) to explain the difference between the current and previous
-      !!             TIME-AVERAGED mixed-layer T & S (where time-averaging is
-      !!             performed over each analysis window).
-      !!
-      !! ** Consistency check :
-      !!        If the control surface is fixed ( nctls > 1 ), the residual term (dh/dt
-      !!        entrainment) should be zero, at machine accuracy. Note that in the case
-      !!        of time-averaged mixed-layer fields, this residual WILL NOT BE ZERO
-      !!        over the first two analysis windows (except if restart).
-      !!        N.B. For ORCA2_LIM, use e.g. ntrd=5, ucf=1., nctls=8
-      !!             for checking residuals.
-      !!             On a NEC-SX5 computer, this typically leads to:
-      !!                   O(1.e-20) temp. residuals (tml_res) when ln_trdmxl_trc_instant=.false.
-      !!                   O(1.e-21) temp. residuals (tml_res) when ln_trdmxl_trc_instant=.true.
-      !!
-      !! ** Action :
-      !!       At each time step, mixed-layer averaged trends are stored in the
-      !!       tmltrd(:,:,jpmxl_xxx) array (see trdmxl_oce.F90 for definitions of jpmxl_xxx).
-      !!       This array is known when trd_mld is called, at the end of the stp subroutine,
-      !!       except for the purely vertical K_z diffusion term, which is embedded in the
-      !!       lateral diffusion trend.
-      !!
-      !!       In I), this K_z term is diagnosed and stored, thus its contribution is removed
-      !!       from the lateral diffusion trend.
-      !!       In II), the instantaneous mixed-layer T & S are computed, and misc. cumulative
-      !!       arrays are updated.
-      !!       In III), called only once per analysis window, we compute the total trends,
-      !!       along with the residuals and the Asselin correction terms.
-      !!       In IV), the appropriate trends are written in the trends NetCDF file.
-      !!
-      !! References :
-      !!       - Vialard & al.
-      !!       - See NEMO documentation (in preparation)
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   kt                       ! ocean time-step index
-#if defined key_pisces_reduced
-      INTEGER  ::  jl, it, itmod
-      LOGICAL  :: llwarn  = .TRUE., lldebug = .TRUE.
-      REAL(wp) :: zfn, zfn2
-      !!----------------------------------------------------------------------
-      ! ... Warnings
-      IF( nn_dttrc  /= 1  ) CALL ctl_stop( " Be careful, trends diags never validated " )
-
-      ! ======================================================================
-      ! II. Cumulate the trends over the analysis window
-      ! ======================================================================
-
-      ztmltrdbio2(:,:,:) = 0.e0  ! <<< reset arrays to zero
-
-      ! II.3 Initialize mixed-layer "before" arrays for the 1rst analysis window
-      ! ------------------------------------------------------------------------
-      IF( kt == nittrc000 + nn_dttrc ) THEN  !  i.e. ( .NOT. ln_rstart ).AND.( kt == nit000 + 1)
-         !
-         tmltrd_csum_ub_bio (:,:,:) = 0.e0
-         !
-      END IF
-
-      ! II.4 Cumulated trends over the analysis period
-      ! ----------------------------------------------
-      !
-      !         [  1rst analysis window ] [     2nd analysis window     ]
-      !
-      !
-      !     o---[--o-----o-----o-----o--]-[--o-----o-----o-----o-----o--]---o-----o--> time steps
-      !                            ntrd                             2*ntrd       etc.
-      !     1      2     3     4    =5 e.g.                          =10
-      !
-      IF( ( kt >= 2 ).OR.( ln_rsttr ) ) THEN
-         !
-         nmoymltrdbio = nmoymltrdbio + 1
-
-         ! ... Trends associated with the time mean of the ML passive tracers
-         tmltrd_sum_bio    (:,:,:) = tmltrd_sum_bio    (:,:,:) + tmltrd_bio    (:,:,:)
-         tmltrd_csum_ln_bio(:,:,:) = tmltrd_csum_ln_bio(:,:,:) + tmltrd_sum_bio(:,:,:)
-         !
-      END IF
-
-      ! ======================================================================
-      ! III. Prepare fields for output (get here ONCE PER ANALYSIS PERIOD)
-      ! ======================================================================
-
-      ! Convert to appropriate physical units
-      tmltrd_bio(:,:,:) = tmltrd_bio(:,:,:) * rn_ucf_trc
-
-      MODULO_NTRD : IF( MOD( kt, nn_trd_trc ) == 0 ) THEN      ! nitend MUST be multiple of ntrd
-         !
-         zfn  = float(nmoymltrdbio)    ;    zfn2 = zfn * zfn
-
-         ! III.1 Prepare fields for output ("instantaneous" diagnostics)
-         ! -------------------------------------------------------------
-
-#if defined key_diainstant
-         STOP 'tmltrd_bio : key_diainstant was never checked within trdmxl. Comment this to proceed.'
-#endif
-         ! III.2 Prepare fields for output ("mean" diagnostics)
-         ! ----------------------------------------------------
-
-         ztmltrdbio2(:,:,:) = tmltrd_csum_ub_bio(:,:,:) + tmltrd_csum_ln_bio(:,:,:)
-
-         !-- Lateral boundary conditions
-         IF ( cp_cfg .NE. 'gyre' ) THEN            ! other than GYRE configuration 
-            ! ES_B27_CD_WARN : lbc inutile GYRE, cf. + haut
-            DO jn = 1, jpdiabio
-              CALL lbc_lnk( ztmltrdbio2(:,:,jn), 'T', 1. )
-            ENDDO
-         ENDIF
-
-         IF( lldebug ) THEN
-            !
-            WRITE(numout,*) 'trd_mxl_bio : write trends in the Mixed Layer for debugging process:'
-            WRITE(numout,*) '~~~~~~~~~~~  '
-            WRITE(numout,*) 'TRC kt = ', kt, 'nmoymltrdbio = ', nmoymltrdbio
-            WRITE(numout,*)
-
-            DO jl = 1, jpdiabio
-              IF( ln_trdmxl_trc_instant ) THEN
-                  WRITE(numout,97) 'TRC jl =', jl, ' bio TREND INDEX  = ', jl, &
-                     & ' SUM tmltrd_bio : ', SUM2D(tmltrd_bio(:,:,jl))
-              ELSE
-                  WRITE(numout,97) 'TRC jl =', jl, ' bio TREND INDEX  = ', jl, &
-                     & ' SUM ztmltrdbio2 : ', SUM2D(ztmltrdbio2(:,:,jl))
-              endif
-            END DO
-
-97          FORMAT(a10, i3, 2x, a30, i3, a20, 2x, g20.10)
-98          FORMAT(a10, i3, 2x, a30, 2x, g20.10)
-99          FORMAT('TRC jj =', i3,' : ', 10(g10.3,2x))
-            WRITE(numout,*)
-            !
-         ENDIF
-
-         ! III.3 Time evolution array swap
-         ! -------------------------------
-
-         ! For passive tracer mean diagnostics
-         tmltrd_csum_ub_bio (:,:,:) = zfn * tmltrd_sum_bio(:,:,:) - tmltrd_csum_ln_bio(:,:,:)
-
-         ! III.4 Convert to appropriate physical units
-         ! -------------------------------------------
-         ztmltrdbio2    (:,:,:) = ztmltrdbio2    (:,:,:) * rn_ucf_trc/zfn2
-
-      END IF MODULO_NTRD
-
-      ! ======================================================================
-      ! IV. Write trends in the NetCDF file
-      ! ======================================================================
-
-      ! IV.1 Code for IOIPSL/NetCDF output
-      ! ----------------------------------
-
-      ! define time axis
-      itmod = kt - nittrc000 + 1
-      it    = kt
-
-      IF( lwp .AND. MOD( itmod , nn_trd_trc ) == 0 ) THEN
-         WRITE(numout,*) ' '
-         WRITE(numout,*) 'trd_mxl_bio : write ML bio trends in the NetCDF file :'
-         WRITE(numout,*) '~~~~~~~~~~~ '
-         WRITE(numout,*) '          ', TRIM(clhstnam), ' at kt = ', kt
-         WRITE(numout,*) '          N.B. nmoymltrdbio = ', nmoymltrdbio
-         WRITE(numout,*) ' '
-      END IF
-
-
-      ! 2. Start writing data
-      ! ---------------------
-
-      NETCDF_OUTPUT : IF( ln_trdmxl_trc_instant ) THEN    ! <<< write the trends for passive tracer instant. diags
-         !
-            DO jl = 1, jpdiabio
-               CALL histwrite( nidtrdbio,TRIM("ML_"//ctrd_bio(jl,2)) ,            &
-                    &          it, tmltrd_bio(:,:,jl), ndimtrd1, ndextrd1 )
-            END DO
-
-
-         IF( kt == nitend )   CALL histclo( nidtrdbio )
-
-      ELSE    ! <<< write the trends for passive tracer mean diagnostics
-
-            DO jl = 1, jpdiabio
-               CALL histwrite( nidtrdbio, TRIM("ML_"//ctrd_bio(jl,2)) ,            &
-                    &          it, ztmltrdbio2(:,:,jl), ndimtrd1, ndextrd1 )
-            END DO
-
-            IF( kt == nitend )   CALL histclo( nidtrdbio )
-            !
-      END IF NETCDF_OUTPUT
-
-      ! Compute the control surface (for next time step) : flag = on
-      icountbio = 1
-
-
-
-      IF( MOD( itmod, nn_trd_trc ) == 0 ) THEN
-         !
-         ! III.5 Reset cumulative arrays to zero
-         ! -------------------------------------
-         nmoymltrdbio = 0
-         tmltrd_csum_ln_bio (:,:,:) = 0.e0
-         tmltrd_sum_bio     (:,:,:) = 0.e0
-      END IF
-
-      ! ======================================================================
-      ! Write restart file
-      ! ======================================================================
-
-! restart write is done in trd_mxl_trc_write which is called by trd_mxl_bio (Marina)
-!
-#endif
-   END SUBROUTINE trd_mxl_bio
-
-
    REAL FUNCTION sum2d( ztab )
       !!----------------------------------------------------------------------
@@ -1191,13 +835,4 @@
       tmltrd_csum_ln_trc (:,:,:,:) = 0.e0   ;   rmld_sum_trc       (:,:)     = 0.e0
 
-#if defined key_pisces_reduced
-      nmoymltrdbio   = 0
-      tmltrd_sum_bio     (:,:,:) = 0.e0     ;   tmltrd_csum_ln_bio (:,:,:) = 0.e0
-      DO jl = 1, jp_pisces_trd
-          ctrd_bio(jl,1) = ctrbil(jl)   ! long name
-          ctrd_bio(jl,2) = ctrbio(jl)   ! short name
-       ENDDO
-#endif
-
       IF( ln_rsttr .AND. ln_trdmxl_trc_restart ) THEN
          CALL trd_mxl_trc_rst_read
@@ -1208,7 +843,4 @@
          tml_sumb_trc       (:,:,:)   = 0.e0   ;   tmltrd_csum_ub_trc (:,:,:,:) = 0.e0     ! mean
          tmltrd_atf_sumb_trc(:,:,:)   = 0.e0   ;   tmltrd_rad_sumb_trc(:,:,:)   = 0.e0 
-#if defined key_pisces_reduced
-         tmltrd_csum_ub_bio (:,:,:) = 0.e0
-#endif
 
        ENDIF
@@ -1216,7 +848,4 @@
       icount = 1   ;   ionce  = 1  ! open specifier   
 
-#if defined key_pisces_reduced
-      icountbio = 1   ;   ioncebio  = 1  ! open specifier
-#endif
 
       ! I.3 Read control surface from file ctlsurf_idx
@@ -1308,11 +937,4 @@
       END DO
 
-#if defined key_pisces_reduced
-          !-- Create a NetCDF file and enter the define mode
-          CALL dia_nam( clhstnam, nn_trd_trc, 'trdbio' )
-          CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,                                            &
-             &             1, jpi, 1, jpj, iiter, zjulian, rdt, nh_tb, nidtrdbio, domain_id=nidom, snc4chunks=snc4set )
-#endif
-
       !-- Define physical units
       IF( rn_ucf_trc == 1. ) THEN
@@ -1354,11 +976,4 @@
       END DO
 
-#if defined key_pisces_reduced
-      DO jl = 1, jp_pisces_trd
-         CALL histdef(nidtrdbio, TRIM("ML_"//ctrd_bio(jl,2)), TRIM(clmxl//" ML_"//ctrd_bio(jl,1))   ,            &
-             &    cltrcu, jpi, jpj, nh_tb, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) ! IOIPSL: time mean
-      END DO                                                                         ! if zsto=rdt above
-#endif
-
       !-- Leave IOIPSL/NetCDF define mode
       DO jn = 1, jptra
@@ -1366,11 +981,5 @@
       END DO
 
-#if defined key_pisces_reduced
-      !-- Leave IOIPSL/NetCDF define mode
-      CALL histend( nidtrdbio, snc4set )
-
       IF(lwp) WRITE(numout,*)
-       IF(lwp) WRITE(numout,*) 'End of NetCDF Initialization for ML bio trends'
-#endif
 
    END SUBROUTINE trd_mxl_trc_init
@@ -1385,8 +994,4 @@
       WRITE(*,*) 'trd_mxl_trc: You should not have seen this print! error?', kt
    END SUBROUTINE trd_mxl_trc
-   SUBROUTINE trd_mxl_bio( kt )
-      INTEGER, INTENT( in) ::   kt
-      WRITE(*,*) 'trd_mxl_bio: You should not have seen this print! error?', kt
-   END SUBROUTINE trd_mxl_bio
    SUBROUTINE trd_mxl_trc_zint( ptrc_trdmxl, ktrd, ctype, kjn )
       INTEGER               , INTENT( in ) ::  ktrd, kjn              ! ocean trend index and passive tracer rank
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90	(revision 7068)
@@ -107,10 +107,4 @@
             END DO                                                     ! tracer loop
             !                                                          ! ===========
-#if defined key_pisces_reduced
-            DO jl = 1, jp_pisces_trd
-               CALL iom_rstput( kt, nitrst, nummldw_trc, 'tmltrd_csum_ub_bio'//ctrd_bio(jl,2), tmltrd_csum_ub_bio(:,:,jl) )
-            ENDDO
-#endif
-
          ENDIF
          
@@ -188,10 +182,4 @@
          !                                                          ! ===========
 
-#if defined key_pisces_reduced
-         DO jl = 1, jp_pisces_trd
-            CALL iom_get( inum, jpdom_autoglo, 'tmltrd_csum_ub_bio'//ctrd_bio(jl,2), tmltrd_csum_ub_bio(:,:,jl) )
-         ENDDO
-#endif
-         
          CALL iom_close( inum )
       ENDIF
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trdtrc_oce.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trdtrc_oce.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/TRP/trdtrc_oce.F90	(revision 7068)
@@ -106,14 +106,4 @@
 # endif
 
-# if defined key_pisces_reduced
-   CHARACTER(LEN=80) :: clname_bio, ctrd_bio(jpdiabio,2)
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  &
-      tmltrd_bio,                         &      !: \ biological contributions to the total trend ,
-                                                 !: / cumulated over the current analysis window
-      tmltrd_sum_bio,                     &      !: sum of these trends over the analysis period
-      tmltrd_csum_ln_bio,                 &      !: now cumulated sum of trends over the "lower triangle"
-      tmltrd_csum_ub_bio                         !: before (prev. analysis period) cumulated sum over the
-                                                 !: upper triangle
-#endif
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -154,11 +144,4 @@
 #endif
       !
-# if defined key_pisces_reduced
-      ALLOCATE( tmltrd_bio        (jpi,jpj,jpdiabio) ,     &
-         &      tmltrd_sum_bio    (jpi,jpj,jpdiabio) ,     &
-         &      tmltrd_csum_ln_bio(jpi,jpj,jpdiabio) ,     &
-         &      tmltrd_csum_ub_bio(jpi,jpj,jpdiabio) , STAT=ierr(2) )
-# endif
-      !
       trd_trc_oce_alloc = MAXVAL(ierr)
       !
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/par_trc.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/par_trc.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/par_trc.F90	(revision 7068)
@@ -10,17 +10,30 @@
    !!----------------------------------------------------------------------
    USE par_kind          ! kind parameters
+   USE par_pisces        ! PISCES model  parameters
+   USE par_cfc           ! CFCs  tracers parameters
+   USE par_c14           ! C14 tracer    parameters
+   USE par_age           ! AGE tracer    parameters
+   USE par_my_trc        ! MY_TRC model  parameters
    !
-   !
-   USE par_pisces
-   USE par_c14  
-   USE par_cfc
-   USE par_age 
-   USE par_my_trc
 
    IMPLICIT NONE
 
    INTEGER, PUBLIC,  PARAMETER :: jpmaxtrc = 100  ! Maximum number of tracers
+
    INTEGER, PUBLIC             :: jptra           ! Total number of tracers
-   INTEGER, PUBLIC             :: jp_lc           ! Total number of tracers
+   INTEGER, PUBLIC             :: jp_pisces       !: number of passive tracers in PISCES model
+   INTEGER, PUBLIC             :: jp_cfc          !: number of CFC passive tracers 
+   INTEGER, PUBLIC             :: jp_my_trc       !: number of passive tracers in MY_TRC model
+
+   LOGICAL, PUBLIC             :: ln_pisces       !: PISCES flag 
+   LOGICAL, PUBLIC             :: ln_age          !: AGE flag 
+   LOGICAL, PUBLIC             :: ln_cfc11        !: CFC11 flag 
+   LOGICAL, PUBLIC             :: ln_cfc12        !: CFC12 flag 
+   LOGICAL, PUBLIC             :: ll_cfc          !: CFC flag 
+   LOGICAL, PUBLIC             :: ln_c14          !: C14 flag 
+   LOGICAL, PUBLIC             :: ln_my_trc       !: MY_TRC flag 
+
+
+   INTEGER, PUBLIC             :: jp_bgc          !: number of passive tracers for the BGC model
 
    REAL(wp), PUBLIC            :: rtrn  = 0.5 * EPSILON( 1.e0 )    !: truncation value
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trc.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trc.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trc.F90	(revision 7068)
@@ -98,10 +98,15 @@
        CHARACTER(len = 20)  :: clunit   !: unit
        LOGICAL              :: llinit   !: read in a file or not
-#if defined  key_my_trc
        LOGICAL              :: llsbc   !: read in a file or not
        LOGICAL              :: llcbc   !: read in a file or not
        LOGICAL              :: llobc   !: read in a file or not
-#endif
    END TYPE PTRACER
+
+   TYPE, PUBLIC :: STRACER                                                            !: Passive tracer type
+       LOGICAL              :: llsbc   !: read in a file or not
+       LOGICAL              :: llcbc   !: read in a file or not
+       LOGICAL              :: llobc   !: read in a file or not
+   END TYPE STRACER
+
    CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ctrcnm         !: tracer name 
    CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ctrcln         !: trccer field long name
@@ -116,8 +121,8 @@
    !! information for inputs
    !! --------------------------------------------------
-   LOGICAL            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_ini     !: Initialisation from data input file
-   LOGICAL            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_obc     !: Use open boundary condition data
-   LOGICAL            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_sbc     !: Use surface boundary condition data
-   LOGICAL            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_cbc     !: Use coastal boundary condition data
+   LOGICAL   , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_ini     !: Initialisation from data input file
+   LOGICAL   , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_obc     !: Use open boundary condition data
+   LOGICAL   , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_sbc     !: Use surface boundary condition data
+   LOGICAL   , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_cbc     !: Use coastal boundary condition data
 
 
@@ -199,14 +204,4 @@
          &      sbc_trc_b(jpi,jpj,jptra), sbc_trc(jpi,jpj,jptra)                      ,       &  
          &      cvol(jpi,jpj,jpk)     , trai(jptra)           ,  qsr_mean(jpi,jpj)    ,       &
-         &      ctrcnm(jptra)         , ctrcln(jptra)         , ctrcun(jptra)         ,       & 
-         &      ln_trc_ini(jptra)     ,                                                       &
-         &      trc_ice_ratio(jptra)  , trc_ice_prescr(jptra) , cn_trc_o(jptra)       ,       & 
-#if defined key_my_trc
-         &      ln_trc_sbc(jptra)     , ln_trc_cbc(jptra)     , ln_trc_obc(jptra)     ,       &
-#endif
-#if defined key_bdy
-         &      cn_trc_dflt(nb_bdy)   , cn_trc(nb_bdy)        , nn_trcdmp_bdy(nb_bdy) ,       &
-         &      trcdta_bdy(jptra,nb_bdy)                                              ,       &
-#endif
          &      STAT = trc_alloc  )
 
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcice.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcice.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcice.F90	(revision 7068)
@@ -52,9 +52,9 @@
 
       IF ( nn_ice_tr == 1 ) THEN
-         IF( lk_pisces  )    CALL trc_ice_ini_pisces       ! PISCES  bio-model
+         IF( ln_pisces  )    CALL trc_ice_ini_pisces       ! PISCES  bio-model
          IF( ll_cfc     )    CALL trc_ice_ini_cfc          ! CFC     tracers
          IF( ln_c14     )    CALL trc_ice_ini_c14          ! C14     tracer
          IF( ln_age     )    CALL trc_ice_ini_age          ! AGE     tracer
-         IF( lk_my_trc  )    CALL trc_ice_ini_my_trc       ! MY_TRC  tracers
+         IF( ln_my_trc  )    CALL trc_ice_ini_my_trc       ! MY_TRC  tracers
       ENDIF
 
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 7068)
@@ -59,10 +59,9 @@
       IF(lwp) WRITE(numout,*) '~~~~~~~'
 
-      IF( .NOT.lk_offline )   CALL trc_nam_run     ! Parameters of the run 
-      !
-      CALL top_alloc()   ! allocate TOP arrays
+      !
       !
       CALL trc_ini_ctl   ! control 
       CALL trc_nam       ! read passive tracers namelists
+      CALL top_alloc()   ! allocate TOP arrays
       !
       !
@@ -152,5 +151,4 @@
       !! ** Purpose :   SMS initialisation
       !!----------------------------------------------------------------------
-      USE par_trc
       USE trcini_pisces  ! PISCES   initialisation
       USE trcini_cfc     ! CFC      initialisation
@@ -159,49 +157,10 @@
       USE trcini_my_trc  ! MY_TRC   initialisation
       !!----------------------------------------------------------------------
-      jp_lc = 0
-      IF( lk_pisces  )  THEN       ! PISCES bio-model
-         CALL trc_ini_pisces    
-         jp_lc       = jp_pisces 
-      ELSE
-         jp_pisces   = 0
-         jp_pcs0     = 0              
-         jp_pcs1     = 0         
-      ENDIF
-      IF( lk_my_trc )  THEN      ! MY_TRC
-         CALL trc_ini_my_trc
-         jp_lc       = jp_lc + jp_my_trc  
-      ELSE
-         jp_my_trc   = 0
-         jp_myt0     = 0       
-         jp_myt1     = 0      
-      ENDIF
-      IF( ll_cfc    )  THEN          ! CFC
-         CALL trc_ini_cfc    
-         jp_lc       = jp_lc + jp_cfc
-      ELSE
-         jp_cfc      = 0
-         jp_cfc0     = 0       
-         jp_cfc1     = 0      
-      ENDIF
-      IF( ln_c14    )  THEN      ! C14
-         CALL trc_ini_c14
-         jp_lc       = jp_lc + jp_c14
-      ELSE
-         jp_c14      = 0
-         jp_c140     = 0       
-      ENDIF
-      IF( ln_age    )  THEN      ! AGE
-         CALL trc_ini_age
-         jp_lc       = jp_lc + jp_age
-      ELSE
-         jp_age      = 0
-         jp_age0     = 0       
-      ENDIF
-      !
-      IF( jp_lc /= jptra ) THEN
-        IF( lwp ) WRITE(numout,*) ' The total number of tracers in namelist_top jptra = ', jptra
-        IF( lwp ) WRITE(numout,*) ' The total number of tracers to be used by the model is jp_lc = ', jp_lc
-        CALL ctl_stop( " Change the value of total number of tracers in namelist " )
-      ENDIF
+      !    
+      IF( ln_pisces  )   CALL trc_ini_pisces     !  PISCES model
+      IF( ln_my_trc  )   CALL trc_ini_my_trc     !  MY_TRC model
+      IF( ll_cfc     )   CALL trc_ini_cfc        !  CFC's
+      IF( ln_c14     )   CALL trc_ini_c14        !  C14 model
+      IF( ln_age     )   CALL trc_ini_age        !  AGE
       !
    END SUBROUTINE trc_ini_sms
@@ -247,5 +206,5 @@
 
       ! Initialisation of tracers Boundary Conditions
-      IF( lk_my_trc )     CALL trc_bc_init(jptra)
+      IF( ln_my_trc )     CALL trc_bc_init(jptra)
 
       IF( ln_rsttr ) THEN
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 7068)
@@ -53,5 +53,6 @@
       !!---------------------------------------------------------------------
       INTEGER  ::   jn                  ! dummy loop indice
-      !                                  
+      !
+      IF( .NOT.lk_offline )   CALL trc_nam_run     ! Parameters of the run                                  
       !               
       CALL trc_nam_trc     ! passive tracer informations
@@ -111,10 +112,10 @@
       ENDIF
 
-      IF( lk_pisces  ) THEN   ;   CALL trc_nam_pisces      ! PISCES  bio-model
+      IF( ln_pisces  ) THEN   ;   CALL trc_nam_pisces      ! PISCES  bio-model
       ELSE                    ;   IF(lwp) WRITE(numout,*) '          PISCES not used'
       ENDIF
 
 
-      IF( lk_my_trc  ) THEN   ;   CALL trc_nam_my_trc      ! MY_TRC  tracers
+      IF( ln_my_trc  ) THEN   ;   CALL trc_nam_my_trc      ! MY_TRC  tracers
       ELSE                    ;   IF(lwp) WRITE(numout,*) '          MY_TRC not used'
       ENDIF
@@ -130,5 +131,5 @@
       !!
       !!---------------------------------------------------------------------
-      NAMELIST/namtrc_run/ jptra, nn_dttrc, ln_rsttr, nn_rsttr, ln_top_euler, &
+      NAMELIST/namtrc_run/ nn_dttrc, ln_rsttr, nn_rsttr, ln_top_euler, &
         &                  cn_trcrst_indir, cn_trcrst_outdir, cn_trcrst_in, cn_trcrst_out
       !
@@ -158,5 +159,4 @@
          WRITE(numout,*)
          WRITE(numout,*) ' Namelist : namtrc_run'
-         WRITE(numout,*) '   Total number of passive tracers              jptra         = ', jptra
          WRITE(numout,*) '   time step freq. for passive tracer           nn_dttrc      = ', nn_dttrc
          WRITE(numout,*) '   restart  for passive tracer                  ln_rsttr      = ', ln_rsttr
@@ -176,10 +176,12 @@
       !!
       !!---------------------------------------------------------------------
-      INTEGER  ::   ios, ierr                 ! Local integer output status for namelist read
+      INTEGER  ::   ios, ierr, ioptio, icfc     ! Local integer output status for namelist read
       INTEGER  ::   jn                    ! dummy loop indice
       !
       TYPE(PTRACER), DIMENSION(jpmaxtrc) :: sn_tracer  ! type of tracer for saving if not key_iomput
-      !!
-      NAMELIST/namtrc/ln_age, ln_cfc11, ln_cfc12, ln_c14, sn_tracer, ln_trcdta, ln_trcdmp, ln_trcdmp_clo
+      TYPE(STRACER), DIMENSION(jpmaxtrc) :: bc_tracer  ! type of tracer for saving if not key_iomput
+      !!
+      NAMELIST/namtrc/jptra, ln_pisces, ln_my_trc, ln_age, ln_cfc11, ln_cfc12, ln_c14, &
+         &            sn_tracer, ln_trcdta, ln_trcdmp, ln_trcdmp_clo
       !!---------------------------------------------------------------------
       IF(lwp) WRITE(numout,*)
@@ -197,35 +199,94 @@
       IF(lwm) WRITE ( numont, namtrc )
 
-
-      DO jn = 1, jptra
+      ioptio = 0
+      IF( ln_pisces )    ioptio = ioptio + 1
+      IF( ln_my_trc )    ioptio = ioptio + 1
+      !
+      IF( ioptio == 2 )   CALL ctl_stop( 'Choose only ONE BGC model - PISCES or MY_TRC' )
+      IF( ioptio == 0 )   jptra = 0
+
+      ll_cfc = ln_cfc11 .OR. ln_cfc12
+  
+      !
+      jp_pisces   =  0    ;   jp_pcs0  =  0    ;   jp_pcs1  = 0
+      jp_my_trc   =  0    ;   jp_myt0  =  0    ;   jp_myt1  = 0
+      jp_cfc      =  0    ;   jp_cfc0  =  0    ;   jp_cfc1  = 0
+      jp_age      =  0    ;   jp_c14   = 0
+      IF( ln_pisces )  THEN
+         jp_pisces = jptra
+         jp_pcs0   = 1
+         jp_pcs1   = jp_pisces
+      ENDIF
+      IF( ln_my_trc )  THEN
+          jp_my_trc = jptra
+          jp_myt0   = 1
+          jp_myt1   = jp_my_trc
+      ENDIF
+      !
+      jp_bgc  =   jptra
+      !
+      IF( ln_age )    THEN
+         jptra     = jptra + 1
+         jp_age    = jptra
+      ENDIF
+      IF( ln_cfc11 )  jp_cfc = jp_cfc + 1
+      IF( ln_cfc12 )  jp_cfc = jp_cfc + 1
+      IF( ll_cfc )    THEN
+          jptra     = jptra + jp_cfc
+          jp_cfc0   = jptra - jp_cfc + 1
+          jp_cfc1   = jptra
+      ENDIF
+      IF( ln_c14 )    THEN
+           jptra     = jptra + 1
+           jp_c14    = jptra
+      ENDIF
+
+      IF(lwp) THEN                   ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : namtrc'
+         WRITE(numout,*) '   Total number of passive tracers              jptra         = ', jptra
+         WRITE(numout,*) '   Simulating PISCES model                      ln_pisces     = ', ln_pisces
+         WRITE(numout,*) '   Simulating water mass age                    ln_age        = ', ln_age
+         WRITE(numout,*) '   Simulating CFC11 passive tracer              ln_cfc11      = ', ln_cfc11
+         WRITE(numout,*) '   Simulating CFC12 passive tracer              ln_cfc12      = ', ln_cfc12
+         WRITE(numout,*) '   Simulating C14   passive tracer              ln_c14        = ', ln_c14
+         WRITE(numout,*) '   Simulating MY_TRC  model                     ln_my_trc     = ', ln_my_trc
+         WRITE(numout,*) '   Read inputs data from file (y/n)             ln_trcdta     = ', ln_trcdta
+         WRITE(numout,*) '   Damping of passive tracer (y/n)              ln_trcdmp     = ', ln_trcdmp
+         WRITE(numout,*) '   Restoring of tracer on closed seas           ln_trcdmp_clo = ', ln_trcdmp_clo
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' '
+      ENDIF
+      !
+      ALLOCATE( ctrcnm(jptra)      , ctrcln(jptra) , ctrcun(jptra)       , ln_trc_ini(jptra),          &
+#if defined key_bdy
+         &      cn_trc_dflt(nb_bdy), cn_trc(nb_bdy), nn_trcdmp_bdy(nb_bdy), trcdta_bdy(jptra,nb_bdy),  &
+#endif
+         &      ln_trc_sbc(jptra), ln_trc_cbc(jptra), ln_trc_obc(jptra), STAT = ierr  )
+      !
+      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'trc_nam_ice: unable to allocate arrays' )
+      !
+      DO jn = 1, jp_bgc
          ctrcnm    (jn) = TRIM( sn_tracer(jn)%clsname )
          ctrcln    (jn) = TRIM( sn_tracer(jn)%cllname )
          ctrcun    (jn) = TRIM( sn_tracer(jn)%clunit  )
          ln_trc_ini(jn) =       sn_tracer(jn)%llinit
-#if defined key_my_trc
-         ln_trc_sbc(jn) =       sn_tracer(jn)%llsbc
-         ln_trc_cbc(jn) =       sn_tracer(jn)%llcbc
-         ln_trc_obc(jn) =       sn_tracer(jn)%llobc
-#endif
       END DO
       !
-      ll_cfc = ln_cfc11 .OR. ln_cfc12
+      IF( ln_my_trc ) THEN
+         DO jn = 1, jp_bgc
+           ln_trc_sbc(jn) =  bc_tracer(jn)%llsbc
+           ln_trc_cbc(jn) =  bc_tracer(jn)%llcbc
+           ln_trc_obc(jn) =  bc_tracer(jn)%llobc
+         END DO
+      ENDIF
       !
       IF(lwp) THEN                   ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' Namelist : namtrc'
-         WRITE(numout,*) '   Simulating water mass age                    ln_age        = ', ln_age
-         WRITE(numout,*) '   Simulating CFC11 passive tracer              ln_cfc11      = ', ln_cfc11
-         WRITE(numout,*) '   Simulating CFC12 passive tracer              ln_cfc12      = ', ln_cfc12
-         WRITE(numout,*) '   Simulating C14   passive tracer              ln_c14        = ', ln_c14
-         WRITE(numout,*) '   Read inputs data from file (y/n)             ln_trcdta     = ', ln_trcdta
-         WRITE(numout,*) '   Damping of passive tracer (y/n)              ln_trcdmp     = ', ln_trcdmp
-         WRITE(numout,*) '   Restoring of tracer on closed seas           ln_trcdmp_clo = ', ln_trcdmp_clo
-         WRITE(numout,*) ' '
-         DO jn = 1, jptra
+         DO jn = 1, jp_bgc
             WRITE(numout,*) '  tracer nb : ', jn, '    short name : ', ctrcnm(jn)
          END DO
          WRITE(numout,*) ' '
       ENDIF
+      !
       !
       IF( ln_age .OR. ll_cfc .OR. ln_c14 ) THEN
@@ -252,5 +313,5 @@
       INTEGER :: ios, ierr     ! Local integer output status for namelist read
       !
-      TYPE(TRC_I_NML), ALLOCATABLE, DIMENSION(:) :: sn_tri_tracer  ! type of tracer for saving if not key_iomput
+      TYPE(TRC_I_NML), DIMENSION(jpmaxtrc) :: sn_tri_tracer  ! type of tracer for saving if not key_iomput
       !!
       NAMELIST/namtrc_ice/ nn_ice_tr, sn_tri_tracer
@@ -265,5 +326,4 @@
       IF( nn_timing == 1 )  CALL timing_start('trc_nam_ice')
 
-      ALLOCATE( sn_tri_tracer(jptra),  STAT = ierr )
       !
       REWIND( numnat_ref )              ! Namelist namtrc_ice in reference namelist : Passive tracer input data
@@ -281,7 +341,10 @@
       ENDIF
 
+      ALLOCATE( trc_ice_ratio(jptra), trc_ice_prescr(jptra), cn_trc_o(jptra), STAT = ierr  )
+      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'trc_nam_ice: unable to allocate arrays' )
+      !
       ! Assign namelist stuff
       DO jn = 1, jptra
-         trc_ice_ratio(jn)  = sn_tri_tracer(jn)%trc_ratio
+         trc_ice_ratio (jn) = sn_tri_tracer(jn)%trc_ratio
          trc_ice_prescr(jn) = sn_tri_tracer(jn)%trc_prescr
          cn_trc_o      (jn) = sn_tri_tracer(jn)%ctrc_o
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcsms.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcsms.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcsms.F90	(revision 7068)
@@ -49,9 +49,9 @@
       IF( nn_timing == 1 )   CALL timing_start('trc_sms')
       !
-      IF( lk_pisces  )   CALL trc_sms_pisces ( kt )    ! main program of PISCES 
+      IF( ln_pisces  )   CALL trc_sms_pisces ( kt )    ! main program of PISCES 
       IF( ll_cfc     )   CALL trc_sms_cfc    ( kt )    ! surface fluxes of CFC
       IF( ln_c14     )   CALL trc_sms_c14    ( kt )    ! surface fluxes of C14
       IF( ln_age     )   CALL trc_sms_age    ( kt )    ! Age tracer
-      IF( lk_my_trc  )   CALL trc_sms_my_trc ( kt )    ! MY_TRC  tracers
+      IF( ln_my_trc  )   CALL trc_sms_my_trc ( kt )    ! MY_TRC  tracers
 
       IF(ln_ctl) THEN      ! print mean trends (used for debugging)
Index: /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcwri.F90
===================================================================
--- /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcwri.F90	(revision 7067)
+++ /branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcwri.F90	(revision 7068)
@@ -54,9 +54,9 @@
       ! write the tracer concentrations in the file
       ! ---------------------------------------
-      IF( lk_pisces  )   CALL trc_wri_pisces     ! PISCES 
+      IF( ln_pisces  )   CALL trc_wri_pisces     ! PISCES 
       IF( ll_cfc     )   CALL trc_wri_cfc        ! surface fluxes of CFC
       IF( ln_c14     )   CALL trc_wri_c14        ! surface fluxes of C14
       IF( ln_age     )   CALL trc_wri_age        ! AGE tracer
-      IF( lk_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers
+      IF( ln_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers
       !
       IF( nn_timing == 1 )  CALL timing_stop('trc_wri')
