Index: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 8280)
+++ branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 8442)
@@ -25,8 +25,8 @@
    USE trcnam_cfc        ! CFC SMS namelist
    USE trcnam_c14b       ! C14 SMS namelist
+   USE trcnam_age        ! AGE SMS namelist
    USE trcnam_my_trc     ! MY_TRC SMS namelist
+   USE trcnam_idtra      ! Idealise tracer namelist
    USE trcnam_medusa     ! MEDUSA namelist
-   USE trcnam_idtra      ! Idealise tracer namelist
-   USE trcnam_age        ! AGE SMS namelist
    USE trd_oce       
    USE trdtrc_oce
@@ -65,49 +65,11 @@
       
       !                                        !  passive tracer informations
-# if defined key_debug_medusa
-      CALL flush(numout)
-      IF (lwp) write (numout,*) '------------------------------'
-      IF (lwp) write (numout,*) 'Jpalm - debug'
-      IF (lwp) write (numout,*) 'in trc_nam - just before CALL trc_nam_trc'
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
       CALL trc_nam_trc
       
       !                                        !   Parameters of additional diagnostics
-# 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_trc -- OK'
-      IF (lwp) write (numout,*) 'in trc_nam - just before CALL trc_nam_dia'
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
-
       CALL trc_nam_dia
 
       !                                        !   namelist of transport
-# 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_dia -- OK'
-      IF (lwp) write (numout,*) 'in trc_nam - just before CALL trc_nam_trp'
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
       CALL trc_nam_trp
-      !
-# 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_trp -- OK'
-      IF (lwp) write (numout,*) 'continue trc_nam '
-      IF (lwp) write (numout,*) ' '
-      CALL flush(numout)
-# endif
-      !
 
 
@@ -131,7 +93,4 @@
          END DO
          WRITE(numout,*) ' '
-# if defined key_debug_medusa
-      CALL flush(numout)
-# endif
       ENDIF
 
@@ -152,7 +111,4 @@
             WRITE(numout,*)
          ENDIF
-# if defined key_debug_medusa
-      CALL flush(numout)
-# endif
       ENDIF
 
@@ -170,7 +126,4 @@
         WRITE(numout,*) '    Passive Tracer  time step    rdttrc  = ', rdttrc(1)
         WRITE(numout,*) 
-# if defined key_debug_medusa
-      CALL flush(numout)
-# endif
       ENDIF
 
@@ -200,30 +153,11 @@
                IF( ln_trdtrc(jn) ) WRITE(numout,*) '    compute ML trends for tracer number :', jn
             END DO
-         WRITE(numout,*) ' '
-         CALL flush(numout)
          ENDIF
 #endif
 
-# if defined key_debug_medusa
-      CALL flush(numout)
-      IF (lwp) write (numout,*) '------------------------------'
-      IF (lwp) write (numout,*) 'Jpalm - debug'
-      IF (lwp) write (numout,*) 'just before ice module for tracers call : '
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
 
       ! Call the ice module for tracers
       ! -------------------------------
       CALL trc_nam_ice
-
-# if defined key_debug_medusa
-      CALL flush(numout)
-      IF (lwp) write (numout,*) '------------------------------'
-      IF (lwp) write (numout,*) 'Jpalm - debug'
-      IF (lwp) write (numout,*) 'Will now read SMS namelists : '
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
 
       ! namelist of SMS
@@ -232,84 +166,29 @@
       ELSE                    ;   IF(lwp) WRITE(numout,*) '          PISCES 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  -- OK'
-      IF (lwp) write (numout,*) 'in trc_nam - just before CALL trc_nam_medusa'
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
+
+      IF( lk_cfc     ) THEN   ;   CALL trc_nam_cfc         ! CFC     tracers
+      ELSE                    ;   IF(lwp) WRITE(numout,*) '          CFC not used'
+      ENDIF
+
+      IF( lk_c14b     ) THEN   ;   CALL trc_nam_c14b         ! C14 bomb     tracers
+      ELSE                    ;   IF(lwp) WRITE(numout,*) '          C14 not used'
+      ENDIF
+
+      IF( lk_age     ) THEN  ;   CALL trc_nam_age         ! AGE     tracer
+      ELSE                   ;   IF(lwp) WRITE(numout,*) '          AGE not used'
+      ENDIF
+
+      IF( lk_my_trc  ) THEN   ;   CALL trc_nam_my_trc      ! MY_TRC  tracers
+      ELSE                    ;   IF(lwp) WRITE(numout,*) '          MY_TRC not used'
+      ENDIF
+
+      IF( lk_idtra   ) THEN   ;   CALL trc_nam_idtra       ! Idealize tracers
+      ELSE                    ;   IF(lwp) WRITE(numout,*) '          Idealize tracers not used'
+      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'
-      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_cfc -- OK'
-      IF (lwp) write (numout,*) 'in trc_nam - just before CALL trc_nam_c14'
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
-      IF( lk_c14b     ) THEN   ;   CALL trc_nam_c14b         ! C14 bomb     tracers
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          C14 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_c14 -- OK'
-      IF (lwp) write (numout,*) 'in trc_nam - just before CALL trc_nam_age'
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
-      IF( lk_age     ) THEN  ;   CALL trc_nam_age         ! AGE     tracer
-      ELSE                   ;   IF(lwp) WRITE(numout,*) '          AGE 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_age -- OK'
-      IF (lwp) write (numout,*) 'in trc_nam - CALL trc_nam -- OK'
-      IF (lwp) write (numout,*) ' '
-# endif
-      !
-      IF( lk_my_trc  ) THEN   ;   CALL trc_nam_my_trc      ! MY_TRC  tracers
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          MY_TRC not used'
-      ENDIF
-       
-      IF(lwp)   CALL flush(numout)
    END SUBROUTINE trc_nam
 
@@ -450,6 +329,5 @@
          ln_trc_wri(jn) =       sn_tracer(jn)%llsave
       END DO
-      IF(lwp)  CALL flush(numout)      
-
+      
     END SUBROUTINE trc_nam_trc
 
@@ -504,13 +382,5 @@
          CALL flush(numout)
       ENDIF
-!!
-!! JPALM -- 17-07-2015 --
-!! MEDUSA is not yet up-to-date with the iom server.
-!! we use it for the main tracer, but not fully with diagnostics.
-!! will have to adapt it properly when visiting Christian Ethee
-!! for now, we change 
-!! IF( ln_diatrc .AND. .NOT. lk_iomput ) THEN
-!! to :
-!!
+
       IF( ( ln_diatrc .AND. .NOT. lk_iomput ) .OR. ( ln_diatrc .AND. lk_medusa ) ) THEN 
          ALLOCATE( trc2d(jpi,jpj,jpdia2d), trc3d(jpi,jpj,jpk,jpdia3d),  &
@@ -522,6 +392,4 @@
          trc3d(:,:,:,:) = 0._wp  ;   ctrc3d(:) = ' '   ;   ctrc3l(:) = ' '    ;    ctrc3u(:) = ' ' 
          !
-      !! ELSE IF  ( lk_iomput .AND. lk_medusa .AND. .NOT. ln_diatrc) THEN
-      !!    CALL trc_nam_iom_medusa
       ENDIF
 
