Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/CONFIG/SHARED/field_def_bgc.xml
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/CONFIG/SHARED/field_def_bgc.xml	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/CONFIG/SHARED/field_def_bgc.xml	(revision 6164)
@@ -226,4 +226,9 @@
        <field id="qintC14b"    long_name="Cumulative air-sea flux of Bomb C14"     unit="mol/m2"     />
        <field id="fdecay"      long_name="Radiactive decay of Bomb C14"            unit="mol/m3"  grid_ref="grid_T_3D"  />
+
+       <!-- IDTRA : variables available with key_idtra -->
+       <field id="qtrIDTRA"    long_name="Air-sea flux of Ideal Tracer"             unit="mol/m2/s"   />
+       <field id="qintIDTRA"   long_name="Cumulative air-sea flux of Ideal Tracer"  unit="mol/m2"     />
+       <field id="invIDTRA"    long_name="Vertical inventory"                       unit="mol/m2"     />
 
        <!-- MEDUSA additional diagnostics on T grid  -->
@@ -504,4 +509,19 @@
     </field_group>
 
+    <field_group id="groupIDTRA_dia" >
+       <field field_ref="qtrIDTRA"    name="qtrIDTRA"  />
+       <field field_ref="qintIDTRA"   name="qintIDTRA" />
+       <field field_ref="invIDTRA"    name="invIDTRA"  />
+    </field_group>
+
+    <field_group id="groupCFC" >
+       <field field_ref="CFC11"       name="CFC11"      />
+    </field_group>
+
+    <field_group id="groupCFC_dia" >
+       <field field_ref="qtrCFC11"    name="qtrCFC11"  />
+       <field field_ref="qintCFC11"   name="qintCFC11" />
+    </field_group>
+
     <field_group id="groupMEDUSA_dia" >
       <field field_ref= "INVTN"      name="INVTN"      />
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/CONFIG/SHARED/iodef_medusa_idtra.xml
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/CONFIG/SHARED/iodef_medusa_idtra.xml	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/CONFIG/SHARED/iodef_medusa_idtra.xml	(revision 6164)
@@ -37,4 +37,5 @@
           <field_group group_ref="groupMEDUSA" />
           <field_group group_ref="groupIDTRA" />
+          <field_group group_ref="groupCFC" />
         </file>
 
@@ -44,4 +45,6 @@
           <field_group group_ref="groupMEDUSA_dms" /> 
           <field_group group_ref="groupMEDUSA_bas" /> 
+          <field_group group_ref="groupIDTRA_dia" />
+          <field_group group_ref="groupCFC_dia" />
         </file>
 
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/CONFIG/SHARED/namelist_top_medusa_idtra_cfg
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/CONFIG/SHARED/namelist_top_medusa_idtra_cfg	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/CONFIG/SHARED/namelist_top_medusa_idtra_cfg	(revision 6164)
@@ -30,5 +30,6 @@
    sn_tracer(14)  = 'ALK' , 'alkalinity                                      ',  'meq/m3'    ,  .false. ,  .true.
    sn_tracer(15)  = 'OXY' , 'dissolved oxygen                                ',  'mmolO2/m3' ,  .false. ,  .true.
-   sn_tracer(16)  = 'IDTRA','Ideal traceur concentration                     ',  'mmol/m3'   ,  .false. ,  .true.  !! if key_idtra else coment this line
+   sn_tracer(16)  = 'IDTRA','Ideal traceur concentration                     ',  'mmol/m3'   ,  .false. ,  .true.
+   sn_tracer(17)  = 'CFC11','CFC-11 Concentration                            ',  'umol/m3'   ,  .false. ,  .true.
 /
 !-----------------------------------------------------------------------
@@ -74,5 +75,4 @@
 &namtrc_dia       !   parameters for passive tracer additional diagnostics
 !----------------------------------------------------------------------
-   ln_diatrc     =  .false.   !  save additional diag. (T) or not (F)
    nn_writedia   =  1460     !  time step frequency for diagnostics
 /
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/C14b/par_c14b.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/C14b/par_c14b.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/C14b/par_c14b.F90	(revision 6164)
@@ -11,4 +11,14 @@
    USE par_pisces , ONLY : jp_pisces_trd   !: number of biological diag in PISCES
 
+   USE par_medusa , ONLY : jp_medusa       !: number of tracers in MEDUSA
+   USE par_medusa , ONLY : jp_medusa_2d    !: number of 2D diag in MEDUSA
+   USE par_medusa , ONLY : jp_medusa_3d    !: number of 3D diag in MEDUSA
+   USE par_medusa , ONLY : jp_medusa_trd   !: number of biological diag in MEDUSA
+
+   USE par_idtra  , ONLY : jp_idtra        !: number of tracers in MEDUSA
+   USE par_idtra  , ONLY : jp_idtra_2d     !: number of tracers in MEDUSA
+   USE par_idtra  , ONLY : jp_idtra_3d     !: number of tracers in MEDUSA
+   USE par_idtra  , ONLY : jp_idtra_trd    !: number of tracers in MEDUSA
+
    USE par_cfc    , ONLY : jp_cfc          !: number of tracers in CFC
    USE par_cfc    , ONLY : jp_cfc_2d       !: number of 2D diag in CFC
@@ -19,8 +29,12 @@
    IMPLICIT NONE
 
-   INTEGER, PARAMETER ::   jp_lb      =  jp_pisces     + jp_cfc     !: cum. number of pass. tracers
-   INTEGER, PARAMETER ::   jp_lb_2d   =  jp_pisces_2d  + jp_cfc_2d  !:
-   INTEGER, PARAMETER ::   jp_lb_3d   =  jp_pisces_3d  + jp_cfc_3d  !:
-   INTEGER, PARAMETER ::   jp_lb_trd  =  jp_pisces_trd + jp_cfc_trd !:
+   INTEGER, PARAMETER ::   jp_lb      =  jp_pisces     + jp_medusa     +   &
+                      jp_idtra      + jp_cfc                               !: cum. number of pass. tracers
+   INTEGER, PARAMETER ::   jp_lb_2d   =  jp_pisces_2d  + jp_medusa_2d  +   &
+                      jp_idtra_2d   + jp_cfc_2d  !:
+   INTEGER, PARAMETER ::   jp_lb_3d   =  jp_pisces_3d  + jp_medusa_3d  +   &
+                      jp_idtra_3d   + jp_cfc_3d  !:
+   INTEGER, PARAMETER ::   jp_lb_trd  =  jp_pisces_trd + jp_medusa_trd +   &
+                      jp_idtra_trd  + jp_cfc_trd !:
    
 #if defined key_c14b
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/CFC/par_cfc.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/CFC/par_cfc.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/CFC/par_cfc.F90	(revision 6164)
@@ -15,15 +15,24 @@
    USE par_pisces , ONLY : jp_pisces_trd   !: number of biological diag in PISCES
 
-   USE par_medusa , ONLY : jp_medusa       !: number of tracers in PISCES
-   USE par_medusa , ONLY : jp_medusa_2d    !: number of 2D diag in PISCES
-   USE par_medusa , ONLY : jp_medusa_3d    !: number of 3D diag in PISCES
-   USE par_medusa , ONLY : jp_medusa_trd   !: number of biological diag in PISCES
+   USE par_medusa , ONLY : jp_medusa       !: number of tracers in MEDUSA
+   USE par_medusa , ONLY : jp_medusa_2d    !: number of 2D diag in MEDUSA
+   USE par_medusa , ONLY : jp_medusa_3d    !: number of 3D diag in MEDUSA
+   USE par_medusa , ONLY : jp_medusa_trd   !: number of biological diag in MEDUSA
+
+   USE par_idtra  , ONLY : jp_idtra        !: number of tracers in MEDUSA
+   USE par_idtra  , ONLY : jp_idtra_2d     !: number of tracers in MEDUSA
+   USE par_idtra  , ONLY : jp_idtra_3d     !: number of tracers in MEDUSA
+   USE par_idtra  , ONLY : jp_idtra_trd    !: number of tracers in MEDUSA
 
    IMPLICIT NONE
 
-   INTEGER, PARAMETER ::   jp_lc      =  jp_pisces     !: cumulative number of passive tracers
-   INTEGER, PARAMETER ::   jp_lc_2d   =  jp_pisces_2d  !:
-   INTEGER, PARAMETER ::   jp_lc_3d   =  jp_pisces_3d  !:
-   INTEGER, PARAMETER ::   jp_lc_trd  =  jp_pisces_trd !:
+   INTEGER, PARAMETER ::   jp_lc      =  jp_pisces     + jp_medusa     + &
+                      jp_idtra     !: cumulative number of passive tracers
+   INTEGER, PARAMETER ::   jp_lc_2d   =  jp_pisces_2d  + jp_medusa_2d  + &
+                      jp_idtra_2d !:
+   INTEGER, PARAMETER ::   jp_lc_3d   =  jp_pisces_3d  + jp_medusa_3d  + &
+                      jp_idtra_3d !:
+   INTEGER, PARAMETER ::   jp_lc_trd  =  jp_pisces_trd + jp_medusa_trd + &
+                      jp_idtra_trd !:
    
 #if defined key_cfc
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 6164)
@@ -15,4 +15,5 @@
    !!   cfc_init     :  sets constants for CFC surface forcing computation
    !!----------------------------------------------------------------------
+   USE dom_oce       ! ocean space and time domain
    USE oce_trc       ! Ocean variables
    USE par_trc       ! TOP parameters
@@ -176,5 +177,29 @@
          !                                                  !----------------!
       END DO                                                !  end CFC loop  !
-      !
+         !
+      IF( kt == nittrc000 ) THEN
+         DO jl = 1, jp_cfc   
+             WRITE(NUMOUT,*) ' '
+             WRITE(NUMOUT,*) 'CFC interpolation verification '  !! Jpalm  
+             WRITE(NUMOUT,*) '################################## '
+             WRITE(NUMOUT,*) ' '
+               if (jl.EQ.1) then
+                   WRITE(NUMOUT,*) 'Traceur = CFC11: '
+               elseif (jl.EQ.2) then
+                   WRITE(NUMOUT,*) 'Traceur = CFC12: '
+               endif
+             WRITE(NUMOUT,*) 'nyear    = ', nyear
+             WRITE(NUMOUT,*) 'nmonth   = ', nmonth
+             WRITE(NUMOUT,*) 'iyear_beg= ', iyear_beg
+             WRITE(NUMOUT,*) 'iyear_end= ', iyear_end
+             WRITE(NUMOUT,*) 'p_cfc(iyear_beg)= ',p_cfc(iyear_beg, 1, jl)
+             WRITE(NUMOUT,*) 'p_cfc(iyear_end)= ',p_cfc(iyear_end, 1, jl)
+             WRITE(NUMOUT,*) 'Im1= ',im1
+             WRITE(NUMOUT,*) 'Im2= ',im2
+             WRITE(NUMOUT,*) 'zpp_cfc = ',zpp_cfc
+             WRITE(NUMOUT,*) ' '
+         END DO  
+      ENDIF
+        !
       IF( lrst_trc ) THEN
          IF(lwp) WRITE(numout,*)
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/IDTRA/par_idtra.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/IDTRA/par_idtra.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/IDTRA/par_idtra.F90	(revision 6164)
@@ -21,12 +21,10 @@
    USE par_medusa , ONLY : jp_medusa_trd   !: number of biological diag in MEDUSA
 
+   IMPLICIT NONE
 
-   IMPLICIT NONE
-   PUBLIC
-
-   INTEGER, PUBLIC, PARAMETER ::   jp_lp      =  jp_pisces     + jp_medusa     !: cumulative number of passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_lp_2d   =  jp_pisces_2d  + jp_medusa_2d  !:
-   INTEGER, PUBLIC, PARAMETER ::   jp_lp_3d   =  jp_pisces_3d  + jp_medusa_3d  !:
-   INTEGER, PUBLIC, PARAMETER ::   jp_lp_trd  =  jp_pisces_trd + jp_medusa_trd !:
+   INTEGER, PARAMETER ::   jp_lp      =  jp_pisces     +  jp_medusa     !: cumulative number of passive tracers
+   INTEGER, PARAMETER ::   jp_lp_2d   =  jp_pisces_2d  +  jp_medusa_2d  !:
+   INTEGER, PARAMETER ::   jp_lp_3d   =  jp_pisces_3d  +  jp_medusa_3d  !:
+   INTEGER, PARAMETER ::   jp_lp_trd  =  jp_pisces_trd +  jp_medusa_trd !:
 
 #if defined key_idtra
@@ -36,5 +34,5 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_idtra     = .TRUE.      !: IDEAL-TRACER flag
    INTEGER, PUBLIC, PARAMETER ::   jp_idtra     =  1          !: number of passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_idtra_2d  =  0          !: additional 2d output arrays ('key_trc_diaadd')
+   INTEGER, PUBLIC, PARAMETER ::   jp_idtra_2d  =  3          !: additional 2d output arrays ('key_trc_diaadd')
    INTEGER, PUBLIC, PARAMETER ::   jp_idtra_3d  =  0          !: additional 3d output arrays ('key_trc_diaadd')
    INTEGER, PUBLIC, PARAMETER ::   jp_idtra_trd =  0          !: number of sms trends for IDEAL-TRACER
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/IDTRA/trcini_idtra.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/IDTRA/trcini_idtra.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/IDTRA/trcini_idtra.F90	(revision 6164)
@@ -46,13 +46,23 @@
       !!----------------------------------------------------------------------
 
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' trc_ini_idtra: initialisation of Ideal Tracers model'
+      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~'
+
+      IF( trc_sms_idtra_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'trc_ini_idtra:unable to allocate CFC arrays' )
+
 
       ! Initialization of trn in case of  no restart
       !----------------------------------------------
+      qtr_idtra(:,:,:) = 0._wp
+      inv_idtra(:,:,:) = 0._wp
       IF( .NOT. ln_rsttr ) THEN
          IF(lwp) THEN
             WRITE(numout,*)
-            WRITE(numout,*) 'Initialization de id-tracers ; No restart : '
+            WRITE(numout,*) 'Initialization of id-tracers ; No restart : '
             WRITE(numout,*) '                             ; Init field equal 1 at surface - zero elsewhere'
+            WRITE(numout,*) '                             ; qint idtra equal 0 '
          ENDIF
+         qint_idtra(:,:,:) = 0._wp
          DO jn = jp_idtra0, jp_idtra1
              trn(:,:,:,jn) = 0.e0
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/IDTRA/trcsms_idtra.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/IDTRA/trcsms_idtra.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/IDTRA/trcsms_idtra.F90	(revision 6164)
@@ -25,9 +25,15 @@
    PRIVATE
 
-   PUBLIC   trc_sms_idtra       ! called in ???
-
+   PUBLIC   trc_sms_idtra        ! called in ???
+   PUBLIC   trc_sms_idtra_alloc  ! called in ???
+   !
    INTEGER , PUBLIC    ::   nyear_res      ! restoring time constant (year)
    INTEGER , PUBLIC    ::   numnatm
    REAL(wp), PUBLIC    ::   FDEC
+   !
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qtr_idtra  ! flux at surface
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qint_idtra ! cumulative flux 
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   inv_idtra  ! vertic. inventory
+
    !                          ! coefficients for conversion
    REAL(wp) ::  WTEMP
@@ -75,21 +81,32 @@
 
       !!----------------------------------------------------------------------
-      IF(lwp) WRITE(numout,*) '   - JPALM - verif :'
-      IF(lwp) WRITE(numout,*) '   ~~~~~~~~~~~~~~~~~'
-      IF(lwp) WRITE(numout,*) '   - idtra decay factor : ', FDEC
+      IF (kt == nittrc000) THEN
+         IF(lwp) WRITE(numout,*) '   - JPALM - verif :'
+         IF(lwp) WRITE(numout,*) '   ~~~~~~~~~~~~~~~~~'
+         IF(lwp) WRITE(numout,*) '   - idtra decay factor : ', FDEC
+      ENDIF
+
+         !
+      inv_idtra(:,:,:) = 0.0                                        !! init the inventory
+      DO jl = 1, jp_idtra
+         jn = jp_idtra0 + jl - 1
+
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+         !! First, a crude version. will be much inproved later.
+             qtr_idtra(ji,jj,jl)  = (1. - trb(ji,jj,1,jn)) * tmask(ji,jj,1) *   & 
+                                  fse3t(ji,jj,1) / rdt             !! Air-sea Flux
+           ENDDO
+         ENDDO
+         tra(:,:,1,jn)      = tra(:,:,1,jn) + ( qtr_idtra(:,:,jl) *  &
+                            tmask(:,:,1) / fse3t(:,:,1) )
+         qint_idtra(:,:,jl) = qint_idtra(:,:,jl) +                   &           
+                              qtr_idtra(:,:,jl) * rdt              !! Cumulative Air-sea Flux
 
 
-         !
-DO jn = jp_idtra0, jp_idtra1
-
-        ! DO jj = 1, jpj
-        !    DO ji = 1, jpi
-               ! Surface concentrarion fixed to 1 (ideal tracer concentration unit)
-               trn(:,:,1,jn) = 1.
-               trb(:,:,1,jn) = 1.
-               !
-        !    ENDDO
-        ! ENDDO
-
+         DO jk =1,jpk
+            inv_idtra(:,:,jl) = inv_idtra(:,:,jl) +                  &
+                     (trn(:,:,jk,jn) * fse3t(:,:,jk) * tmask(:,:,jk))  !! vertical inventory
+         ENDDO
 !
 !DECAY of OUR IDEALIZED TRACER
@@ -101,5 +118,6 @@
                !  IF (trn(ji,jj,jk,jn) > 0.0) THEN
                     WTEMP = trn(ji,jj,jk,jn) * (1. - FDEC )
-                    tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) - WTEMP/rdt
+                    tra(ji,jj,jk,jn) = (tra(ji,jj,jk,jn) - WTEMP/rdt ) * &
+                                     tmask(ji,jj,jk)
                !  ENDIF 
               ENDDO 
@@ -107,32 +125,53 @@
          ENDDO
 
-ENDDO
+      ENDDO
     !! jn loop
 !
 
-!!!!!! No added diagnostics to save here for idealize tracers...
-!!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-!! #if defined key_trc_diaadd
-!!       ! Save diagnostics , just for TRI111
-!! # if ! defined key_iomput
-!!       trc2d(:,:,jp_idtra0_2d    ) = zpp_idtra(:,:)
-!! # else
-!! !           WRITE(NUMOUT,*) 'Iomput idtrasurf '
-!!       CALL iom_put( "TRISURF"  , zpp_idtra(:,:) )
-!! !      CALL iom_put( "TRISURF"  , xphem(:,:) )
-!! !           WRITE(NUMOUT,*) 'Iomputage '
-!!        CALL iom_put( "AGE"  , zage(:,:,:) )
-!! # endif
-!! #endif
-!!
+        !
+      IF( lrst_trc ) THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'trc_sms_idtra : cumulated input function fields written in ocean restart file ',   &
+            &                    'at it= ', kt,' date= ', ndastp
+         IF(lwp) WRITE(numout,*) '~~~~'
+         DO jn = jp_idtra0, jp_idtra1
+            CALL iom_rstput( kt, nitrst, numrtw, 'qint_IDTRA', qint_idtra(:,:,jn) )
+         END DO
+      ENDIF
+      !
+      IF( lk_iomput ) THEN
+         CALL iom_put( "qtrIDTRA"  , qtr_idtra (:,:,1) )
+         CALL iom_put( "qintIDTRA" , qint_idtra(:,:,1) )
+         CALL iom_put( "invIDTRA" , inv_idtra(:,:,1) )
+      ELSE
+         IF( ln_diatrc ) THEN
+            trc2d(:,:,jp_idtra0_2d    ) = qtr_idtra (:,:,1)
+            trc2d(:,:,jp_idtra0_2d + 1) = qint_idtra(:,:,1)
+            trc2d(:,:,jp_idtra0_2d + 2) = inv_idtra(:,:,1)
+         END IF
+      END IF
+      !
+      IF( l_trdtrc ) THEN
+          DO jn = jp_idtra0, jp_idtra1
+            CALL trd_trc( tra(:,:,:,jn), jn, jptra_sms, kt )   ! save trends
+          END DO
+      END IF
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('trc_sms_idtra')
+      !
+   END SUBROUTINE trc_sms_idtra
 
-!!      IF( l_trdtrc ) THEN
-!!          DO jn = jp_idtra0, jp_idtra1
-!!            zidtradtra(:,:,:) = tra(:,:,:,jn)
-!!            CALL trd_mod_trc( zidtradtra, jn, jptrc_trd_sms, kt )   ! save trends
-!!          END DO
-!!      END IF
+   INTEGER FUNCTION trc_sms_idtra_alloc()
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_sms_idtra_alloc  ***
+      !!----------------------------------------------------------------------
+      ALLOCATE( qtr_idtra (jpi,jpj,jp_idtra) ,     &
+         &      inv_idtra(jpi,jpj,jp_idtra)  ,     &
+         &      qint_idtra(jpi,jpj,jp_idtra) , STAT=trc_sms_idtra_alloc )
+         !
+      IF( trc_sms_idtra_alloc /= 0 ) CALL ctl_warn('trc_sms_idtra_alloc : failed to allocate arrays.')
+      !
+   END FUNCTION trc_sms_idtra_alloc
 
-   END SUBROUTINE trc_sms_idtra
 #else
    !!----------------------------------------------------------------------
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/par_medusa.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/par_medusa.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/par_medusa.F90	(revision 6164)
@@ -15,6 +15,15 @@
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
+   USE par_pisces , ONLY : jp_pisces       !: number of tracers in PISCES
+   USE par_pisces , ONLY : jp_pisces_2d    !: number of 2D diag in PISCES
+   USE par_pisces , ONLY : jp_pisces_3d    !: number of 3D diag in PISCES
+   USE par_pisces , ONLY : jp_pisces_trd   !: number of biological diag in PISCES
 
    IMPLICIT NONE
+
+   INTEGER, PARAMETER ::   jp_lm      =  jp_pisces      !: 
+   INTEGER, PARAMETER ::   jp_lm_2d   =  jp_pisces_2d   !:
+   INTEGER, PARAMETER ::   jp_lm_3d   =  jp_pisces_3d   !:
+   INTEGER, PARAMETER ::   jp_lm_trd  =  jp_pisces_trd  !:
 
 #if defined key_medusa
@@ -36,20 +45,20 @@
 
    ! assign an index in trc arrays for each PTS prognostic variables
-   INTEGER, PUBLIC, PARAMETER ::   jpchn  =  1              !: non-diatom chlorophyll concentration
-   INTEGER, PUBLIC, PARAMETER ::   jpchd  =  2              !: diatom     chlorophyll concentration
-   INTEGER, PUBLIC, PARAMETER ::   jpphn  =  3              !: non-diatom concentration
-   INTEGER, PUBLIC, PARAMETER ::   jpphd  =  4              !: diatom     concentration
-   INTEGER, PUBLIC, PARAMETER ::   jpzmi  =  5              !: microzooplankton concentration
-   INTEGER, PUBLIC, PARAMETER ::   jpzme  =  6              !: mesozooplankton  concentration
-   INTEGER, PUBLIC, PARAMETER ::   jpdin  =  7              !: dissolved inorganic nitrogen concentration
-   INTEGER, PUBLIC, PARAMETER ::   jpsil  =  8              !: silicic acid concentration
-   INTEGER, PUBLIC, PARAMETER ::   jpfer  =  9              !: total iron concentration
-   INTEGER, PUBLIC, PARAMETER ::   jpdet  = 10              !: slow-sinking detritus concentration
-   INTEGER, PUBLIC, PARAMETER ::   jppds  = 11              !: diatom silicon concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpchn  =  jp_lm + 1      !: non-diatom chlorophyll concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpchd  =  jp_lm + 2      !: diatom     chlorophyll concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpphn  =  jp_lm + 3      !: non-diatom concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpphd  =  jp_lm + 4      !: diatom     concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpzmi  =  jp_lm + 5      !: microzooplankton concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpzme  =  jp_lm + 6      !: mesozooplankton  concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpdin  =  jp_lm + 7      !: dissolved inorganic nitrogen concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpsil  =  jp_lm + 8      !: silicic acid concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpfer  =  jp_lm + 9      !: total iron concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpdet  =  jp_lm + 10     !: slow-sinking detritus concentration
+   INTEGER, PUBLIC, PARAMETER ::   jppds  =  jp_lm + 11     !: diatom silicon concentration
 # if defined key_roam
-   INTEGER, PUBLIC, PARAMETER ::   jpdtc  = 12              !: slow-sinking detritus carbon concentration
-   INTEGER, PUBLIC, PARAMETER ::   jpdic  = 13              !: dissolved inorganic carbon concentration
-   INTEGER, PUBLIC, PARAMETER ::   jpalk  = 14              !: alkalinity
-   INTEGER, PUBLIC, PARAMETER ::   jpoxy  = 15              !: dissolved oxygen concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpdtc  =  jp_lm + 12     !: slow-sinking detritus carbon concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpdic  =  jp_lm + 13     !: dissolved inorganic carbon concentration
+   INTEGER, PUBLIC, PARAMETER ::   jpalk  =  jp_lm + 14     !: alkalinity
+   INTEGER, PUBLIC, PARAMETER ::   jpoxy  =  jp_lm + 15     !: dissolved oxygen concentration
 # endif
 
@@ -66,12 +75,12 @@
 
    ! Starting/ending PISCES do-loop indices (N.B. no PISCES : jpl_pcs < jpf_pcs the do-loop are never done)
-   INTEGER, PUBLIC, PARAMETER ::   jp_msa0     = 1              !: First index of MEDUSA passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_msa1     = jp_medusa      !: Last  index of MEDUSA passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_msa0_2d  = 1              !: First index of MEDUSA passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_msa1_2d  = jp_medusa_2d   !: Last  index of MEDUSA passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_msa0_3d  = 1              !: First index of MEDUSA passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_msa1_3d  = jp_medusa_3d   !: Last  index of MEDUSA passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_msa0_trd = 1              !: First index of MEDUSA passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_msa1_trd = jp_medusa_trd  !: Last  index of MEDUSA passive tracers
+   INTEGER, PUBLIC, PARAMETER ::   jp_msa0     = jp_lm     + 1              !: First index of MEDUSA passive tracers
+   INTEGER, PUBLIC, PARAMETER ::   jp_msa1     = jp_lm     + jp_medusa      !: Last  index of MEDUSA passive tracers
+   INTEGER, PUBLIC, PARAMETER ::   jp_msa0_2d  = jp_lm_2d  + 1              !: First index of MEDUSA passive tracers
+   INTEGER, PUBLIC, PARAMETER ::   jp_msa1_2d  = jp_lm_2d  + jp_medusa_2d   !: Last  index of MEDUSA passive tracers
+   INTEGER, PUBLIC, PARAMETER ::   jp_msa0_3d  = jp_lm_3d  + 1              !: First index of MEDUSA passive tracers
+   INTEGER, PUBLIC, PARAMETER ::   jp_msa1_3d  = jp_lm_3d  + jp_medusa_3d   !: Last  index of MEDUSA passive tracers
+   INTEGER, PUBLIC, PARAMETER ::   jp_msa0_trd = jp_lm_trd + 1              !: First index of MEDUSA passive tracers
+   INTEGER, PUBLIC, PARAMETER ::   jp_msa1_trd = jp_lm_trd + jp_medusa_trd  !: Last  index of MEDUSA passive tracers
 
    !!======================================================================
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcini_medusa.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcini_medusa.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcini_medusa.F90	(revision 6164)
@@ -38,5 +38,5 @@
    !! JPALM (14/09/15)
    LOGICAL, PUBLIC ::                  &
-      ln_ccd = .TRUE.
+      ln_ccd = .FALSE.
 
    INTEGER ::                          &
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcsed_medusa.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcsed_medusa.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcsed_medusa.F90	(revision 6164)
@@ -42,5 +42,5 @@
    !! AXY (10/02/09)
    LOGICAL, PUBLIC ::                  &
-      bdustfer = .TRUE.
+      bdustfer = .FALSE.
    REAL(wp), PUBLIC ::                 &
       sedfeinput = 1.e-9_wp  ,         &
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 6164)
@@ -103,9 +103,9 @@
 
       IF( lk_pisces  )       CALL trc_ini_pisces       ! PISCES  bio-model
+      IF( lk_medusa  )       CALL trc_ini_medusa       ! MEDUSA  tracers
+      IF( lk_idtra   )       CALL trc_ini_idtra        ! Idealize tracers
       IF( lk_cfc     )       CALL trc_ini_cfc          ! CFC     tracers
       IF( lk_c14b    )       CALL trc_ini_c14b         ! C14 bomb  tracer
       IF( lk_my_trc  )       CALL trc_ini_my_trc       ! MY_TRC  tracers
-      IF( lk_medusa  )       CALL trc_ini_medusa       ! MEDUSA  tracers
-      IF( lk_idtra   )       CALL trc_ini_idtra        ! Idealize tracers
 
       CALL trc_ice_ini                                 ! Tracers in sea ice
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 6164)
@@ -232,5 +232,39 @@
       ENDIF
       !
-
+# if defined key_debug_medusa
+      CALL flush(numout)
+      IF (lwp) write (numout,*) '------------------------------'
+      IF (lwp) write (numout,*) 'Jpalm - debug'
+      IF (lwp) write (numout,*) 'CALL trc_nam_pisces  -- OK'
+      IF (lwp) write (numout,*) 'in trc_nam - just before CALL trc_nam_medusa'
+      IF (lwp) write (numout,*) ' '
+# endif
+      !
+      IF( lk_medusa  ) THEN   ;   CALL trc_nam_medusa      ! MEDUSA  tracers
+      ELSE                    ;   IF(lwp) WRITE(numout,*) '          MEDUSA not used'
+      ENDIF
+      !
+# if defined key_debug_medusa
+      CALL flush(numout)
+      IF (lwp) write (numout,*) '------------------------------'
+      IF (lwp) write (numout,*) 'Jpalm - debug'
+      IF (lwp) write (numout,*) 'CALL trc_nam_medusa -- OK'
+      IF (lwp) write (numout,*) 'in trc_nam - just before CALL trc_nam_idtra'
+      IF (lwp) write (numout,*) ' '
+# endif
+      !
+      IF( lk_idtra   ) THEN   ;   CALL trc_nam_idtra       ! Idealize tracers
+      ELSE                    ;   IF(lwp) WRITE(numout,*) '          Idealize tracers not used'
+      ENDIF
+      !
+# if defined key_debug_medusa
+      CALL flush(numout)
+      IF (lwp) write (numout,*) '------------------------------'
+      IF (lwp) write (numout,*) 'Jpalm - debug'
+      IF (lwp) write (numout,*) 'CALL trc_nam_idtra -- OK'
+      IF (lwp) write (numout,*) 'in trc_nam - just before CALL trc_nam_cfc'
+      IF (lwp) write (numout,*) ' '
+# endif
+      !
       IF( lk_cfc     ) THEN   ;   CALL trc_nam_cfc         ! CFC     tracers
       ELSE                    ;   IF(lwp) WRITE(numout,*) '          CFC not used'
@@ -244,40 +278,5 @@
       ELSE                    ;   IF(lwp) WRITE(numout,*) '          MY_TRC not used'
       ENDIF
-      !
-# if defined key_debug_medusa
-      CALL flush(numout)
-      IF (lwp) write (numout,*) '------------------------------'
-      IF (lwp) write (numout,*) 'Jpalm - debug'
-      IF (lwp) write (numout,*) 'CALL trc_nam_pisces - CFC - C14 - my_trc -- OK'
-      IF (lwp) write (numout,*) 'in trc_nam - just before CALL trc_nam_medusa'
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
-      IF( lk_medusa  ) THEN   ;   CALL trc_nam_medusa      ! MEDUSA  tracers
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          MEDUSA not used'
-      ENDIF
-      !
-# if defined key_debug_medusa
-      CALL flush(numout)
-      IF (lwp) write (numout,*) '------------------------------'
-      IF (lwp) write (numout,*) 'Jpalm - debug'
-      IF (lwp) write (numout,*) 'CALL trc_nam_medusa -- OK'
-      IF (lwp) write (numout,*) 'in trc_nam - just before CALL trc_nam_idtra'
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
-      IF( lk_idtra   ) THEN   ;   CALL trc_nam_idtra       ! Idealize tracers
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          Idealize tracers not used'
-      ENDIF
-      !
-# if defined key_debug_medusa
-      CALL flush(numout)
-      IF (lwp) write (numout,*) '------------------------------'
-      IF (lwp) write (numout,*) 'Jpalm - debug'
-      IF (lwp) write (numout,*) 'CALL trc_nam_idtra -- OK'
-      IF (lwp) write (numout,*) 'in trc_nam - CALL trc_nam OK'
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
+       
       IF(lwp)   CALL flush(numout)
    END SUBROUTINE trc_nam
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 6164)
@@ -85,24 +85,13 @@
       ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1
       IF( kt == nitrst - 2*nn_dttrc .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN
-         IF ( ln_rstdate ) THEN
-            !! JPALM -- 22-12-2015 -- modif to get the good date on restart trc file name
-            !!                     -- the condition to open the rst file is not the same than for the dynamic rst.
-            !!                     -- here it - for an obscure reason - is open 2 time-step before the restart writing process
-            !!                     instead of 1.
-            !!                     -- i am not sure if someone forgot +1 in the if loop condition as
-            !!                     it is writen in all comments nitrst - 2*nn_dttrc + 1 and the condition is nitrst - 2*nn_dttrc
-            !!                     -- nevertheless we didn't wanted to broke something already working 
-            !!                     and just adapted the part we added.
-            !!                     -- So instead of calling ju2ymds( fjulday + (rdttra(1)) ....
-            !!                     we call ju2ymds( fjulday + (2*rdttra(1)) .....
-            !!--------------------------------------------------------------------      
-            CALL ju2ymds( fjulday + (2*rdttra(1)) / rday, iyear, imonth, iday, zsec )
-            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
-         ELSE
+        ! IF ( ln_rstdate ) THEN
+        !    CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec )
+        !    WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
+        ! ELSE
             ! beware of the format used to write kt (default is i8.8, that should be large enough)
             IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst
             ELSE                        ;   WRITE(clkt,'(i8.8)') nitrst
             ENDIF
-         ENDIF
+        ! ENDIF
          ! create the file
          IF(lwp) WRITE(numout,*)
@@ -211,61 +200,4 @@
       if (lwp) write (numout,'(a,3f15.5)') 'Sediment Ca ', &
          &        fq0, fq1, fq2
-      !!
-      !! AXY (07/07/15): read in temporally averaged fields for DMS
-      !!                 calculations
-      !!
-      IF( iom_varid( numrtr, 'B_DMS_CHN', ldstop = .FALSE. ) > 0 ) THEN
-         !! YES; in which case read them
-         !!
-         IF(lwp) WRITE(numout,*) ' MEDUSA averaged properties for DMS present - reading in ...'
-         CALL iom_get( numrtr, jpdom_autoglo, 'B_DMS_CHN',  zb_dms_chn(:,:)  )
-         CALL iom_get( numrtr, jpdom_autoglo, 'N_DMS_CHN',  zn_dms_chn(:,:)  )
-         CALL iom_get( numrtr, jpdom_autoglo, 'B_DMS_CHD',  zb_dms_chd(:,:)  )
-         CALL iom_get( numrtr, jpdom_autoglo, 'N_DMS_CHD',  zn_dms_chd(:,:)  )
-         CALL iom_get( numrtr, jpdom_autoglo, 'B_DMS_MLD',  zb_dms_mld(:,:)  )
-         CALL iom_get( numrtr, jpdom_autoglo, 'N_DMS_MLD',  zn_dms_mld(:,:)  )
-         CALL iom_get( numrtr, jpdom_autoglo, 'B_DMS_QSR',  zb_dms_qsr(:,:)  )
-         CALL iom_get( numrtr, jpdom_autoglo, 'N_DMS_QSR',  zn_dms_qsr(:,:)  )
-         CALL iom_get( numrtr, jpdom_autoglo, 'B_DMS_DIN',  zb_dms_din(:,:)  )
-         CALL iom_get( numrtr, jpdom_autoglo, 'N_DMS_DIN',  zn_dms_din(:,:)  )
-      ELSE
-         !! NO; in which case set them to zero
-         !!
-         IF(lwp) WRITE(numout,*) ' MEDUSA averaged properties for DMS absent - setting to zero ...'
-         zb_dms_chn(:,:)  = 0.0   !! CHN
-         zn_dms_chn(:,:)  = 0.0
-         zb_dms_chd(:,:)  = 0.0   !! CHD
-         zn_dms_chd(:,:)  = 0.0
-         zb_dms_mld(:,:)  = 0.0   !! MLD
-         zn_dms_mld(:,:)  = 0.0
-         zb_dms_qsr(:,:)  = 0.0   !! QSR
-         zn_dms_qsr(:,:)  = 0.0
-         zb_dms_din(:,:)  = 0.0   !! DIN
-         zn_dms_din(:,:)  = 0.0
-      ENDIF
-      !!
-      !! calculate stats on these fields
-      IF(lwp) WRITE(numout,*) ' MEDUSA averaged properties for DMS stats (min, max, sum) ...'
-      fq0 = MINVAL(zn_dms_chn(:,:))
-      fq1 = MAXVAL(zn_dms_chn(:,:))
-      fq2 = SUM(zn_dms_chn(:,:))
-      if (lwp) write (numout,'(a,3f15.5)') 'DMS, CHN ', fq0, fq1, fq2
-      fq0 = MINVAL(zn_dms_chd(:,:))
-      fq1 = MAXVAL(zn_dms_chd(:,:))
-      fq2 = SUM(zn_dms_chd(:,:))
-      if (lwp) write (numout,'(a,3f15.5)') 'DMS, CHD ', fq0, fq1, fq2
-      fq0 = MINVAL(zn_dms_mld(:,:))
-      fq1 = MAXVAL(zn_dms_mld(:,:))
-      fq2 = SUM(zn_dms_mld(:,:))
-      if (lwp) write (numout,'(a,3f15.5)') 'DMS, MLD ', fq0, fq1, fq2
-      fq0 = MINVAL(zn_dms_qsr(:,:))
-      fq1 = MAXVAL(zn_dms_qsr(:,:))
-      fq2 = SUM(zn_dms_qsr(:,:))
-      if (lwp) write (numout,'(a,3f15.5)') 'DMS, QSR ', fq0, fq1, fq2
-      fq0 = MINVAL(zn_dms_din(:,:))
-      fq1 = MAXVAL(zn_dms_din(:,:))
-      fq2 = SUM(zn_dms_din(:,:))
-      if (lwp) write (numout,'(a,3f15.5)') 'DMS, DIN ', fq0, fq1, fq2
-
 #endif
  
@@ -349,43 +281,4 @@
       if (lwp) write (numout,'(a,3f15.5)') 'Sediment Ca ', &
          &        fq0, fq1, fq2
-      !!
-      !! AXY (07/07/15): write out temporally averaged fields for DMS
-      !!                 calculations
-      !!
-      IF(lwp) WRITE(numout,*) ' MEDUSA averaged properties for DMS - writing out ...'
-      CALL iom_rstput( kt, nitrst, numrtw, 'B_DMS_CHN',  zb_dms_chn(:,:)  )
-      CALL iom_rstput( kt, nitrst, numrtw, 'N_DMS_CHN',  zn_dms_chn(:,:)  )
-      CALL iom_rstput( kt, nitrst, numrtw, 'B_DMS_CHD',  zb_dms_chd(:,:)  )
-      CALL iom_rstput( kt, nitrst, numrtw, 'N_DMS_CHD',  zn_dms_chd(:,:)  )
-      CALL iom_rstput( kt, nitrst, numrtw, 'B_DMS_MLD',  zb_dms_mld(:,:)  )
-      CALL iom_rstput( kt, nitrst, numrtw, 'N_DMS_MLD',  zn_dms_mld(:,:)  )
-      CALL iom_rstput( kt, nitrst, numrtw, 'B_DMS_QSR',  zb_dms_qsr(:,:)  )
-      CALL iom_rstput( kt, nitrst, numrtw, 'N_DMS_QSR',  zn_dms_qsr(:,:)  )
-      CALL iom_rstput( kt, nitrst, numrtw, 'B_DMS_DIN',  zb_dms_din(:,:)  )
-      CALL iom_rstput( kt, nitrst, numrtw, 'N_DMS_DIN',  zn_dms_din(:,:)  )
-      !!
-      !! calculate stats on these fields
-      IF(lwp) WRITE(numout,*) ' MEDUSA averaged properties for DMS stats (min, max, sum) ...'
-      fq0 = MINVAL(zn_dms_chn(:,:))
-      fq1 = MAXVAL(zn_dms_chn(:,:))
-      fq2 = SUM(zn_dms_chn(:,:))
-      if (lwp) write (numout,'(a,3f15.5)') 'DMS, CHN ', fq0, fq1, fq2
-      fq0 = MINVAL(zn_dms_chd(:,:))
-      fq1 = MAXVAL(zn_dms_chd(:,:))
-      fq2 = SUM(zn_dms_chd(:,:))
-      if (lwp) write (numout,'(a,3f15.5)') 'DMS, CHD ', fq0, fq1, fq2
-      fq0 = MINVAL(zn_dms_mld(:,:))
-      fq1 = MAXVAL(zn_dms_mld(:,:))
-      fq2 = SUM(zn_dms_mld(:,:))
-      if (lwp) write (numout,'(a,3f15.5)') 'DMS, MLD ', fq0, fq1, fq2
-      fq0 = MINVAL(zn_dms_qsr(:,:))
-      fq1 = MAXVAL(zn_dms_qsr(:,:))
-      fq2 = SUM(zn_dms_qsr(:,:))
-      if (lwp) write (numout,'(a,3f15.5)') 'DMS, QSR ', fq0, fq1, fq2
-      fq0 = MINVAL(zn_dms_din(:,:))
-      fq1 = MAXVAL(zn_dms_din(:,:))
-      fq2 = SUM(zn_dms_din(:,:))
-      if (lwp) write (numout,'(a,3f15.5)') 'DMS, DIN ', fq0, fq1, fq2
-      !! 
 #endif
 
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcsms.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcsms.F90	(revision 6163)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcsms.F90	(revision 6164)
@@ -51,9 +51,9 @@
       !
       IF( lk_pisces  )   CALL trc_sms_pisces ( kt )    ! main program of PISCES 
+      IF( lk_medusa  )   CALL trc_sms_medusa ( kt )    ! MEDUSA  tracers
+      IF( lk_idtra   )   CALL trc_sms_idtra  ( kt )    ! radioactive decay of Id. tracer
       IF( lk_cfc     )   CALL trc_sms_cfc    ( kt )    ! surface fluxes of CFC
       IF( lk_c14b    )   CALL trc_sms_c14b   ( kt )    ! surface fluxes of C14
       IF( lk_my_trc  )   CALL trc_sms_my_trc ( kt )    ! MY_TRC  tracers
-      IF( lk_medusa  )   CALL trc_sms_medusa ( kt )    ! MEDUSA  tracers
-      IF( lk_idtra   )   CALL trc_sms_idtra  ( kt )    ! radioactive decay of Id. tracer
 
       IF(ln_ctl) THEN      ! print mean trends (used for debugging)
