Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/AGE/trcsms_age.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/AGE/trcsms_age.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/AGE/trcsms_age.F90	(revision 9124)
@@ -45,10 +45,9 @@
       !! ** Method  : -
       !!----------------------------------------------------------------------
-      !
       INTEGER, INTENT(in) ::   kt   ! ocean time-step index
       INTEGER ::   jn, jk   ! dummy loop index
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_sms_age')
+      IF( ln_timing )   CALL timing_start('trc_sms_age')
       !
       IF(lwp) WRITE(numout,*)
@@ -59,5 +58,5 @@
       DO jk = 1, nla_age
          tra(:,:,jk,jp_age) = rn_age_kill_rate * trb(:,:,jk,jp_age)
-      ENDDO
+      END DO
       !
       tra(:,:,nl_age,jp_age) = frac_kill_age * rn_age_kill_rate * trb(:,:,nl_age,jp_age)  &
@@ -66,9 +65,9 @@
       DO jk = nlb_age, jpk
          tra(:,:,jk,jp_age) = tmask(:,:,jk) * rryear
-      ENDDO
+      END DO
       !
       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')
+      IF( ln_timing )   CALL timing_stop('trc_sms_age')
       !
    END SUBROUTINE trc_sms_age
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcatm_c14.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcatm_c14.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcatm_c14.F90	(revision 9124)
@@ -49,5 +49,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_atm_c14_ini')
+      IF( ln_timing )   CALL timing_start('trc_atm_c14_ini')
       !
       
@@ -192,5 +192,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_atm_c14_ini')
+      IF( ln_timing )   CALL timing_stop('trc_atm_c14_ini')
       !
    END SUBROUTINE trc_atm_c14_ini
@@ -216,5 +216,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_atm_c14')
+      IF( ln_timing )   CALL timing_start('trc_atm_c14')
       !
       IF( kc14typ == 0) THEN
@@ -297,5 +297,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_atm_c14')
+      IF( ln_timing )   CALL timing_stop('trc_atm_c14')
       !
    END SUBROUTINE trc_atm_c14
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcsms_c14.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcsms_c14.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcsms_c14.F90	(revision 9124)
@@ -28,5 +28,5 @@
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
-   !! $                                                                    $ 
+   !! $Id:$ 
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
@@ -60,5 +60,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_sms_c14')
+      IF( ln_timing )   CALL timing_start('trc_sms_c14')
       !
       IF( kt ==  nittrc000 ) THEN
@@ -68,5 +68,4 @@
       ENDIF
       !
- 
       ! Get co2sbc & c14sbc(ji,jj): at 1st iter for all, at each time step for transient
       IF( kc14typ >= 1 .OR.  kt ==  nittrc000 )   CALL trc_atm_c14( kt, co2sbc, c14sbc ) 
@@ -80,8 +79,8 @@
       DO jj = 1, jpj
          DO ji = 1, jpi  
-            IF( tmask(ji,jj,1) >  0.) THEN
-
-               zt   = MIN( 40., tsn(ji,jj,1,jp_tem))
-
+            IF( tmask(ji,jj,1) >  0. ) THEN
+               !
+               zt   = MIN( 40. , tsn(ji,jj,1,jp_tem) )
+               !
                !  Computation of solubility zsol in [mol/(L * atm)]
                !   after Wanninkhof (2014) referencing Weiss (1974)
@@ -143,5 +142,4 @@
          END DO
       END DO
-
       !
       IF( lrst_trc ) THEN
@@ -149,5 +147,5 @@
          IF(lwp) WRITE(numout,*) ' trc_rst_wri_c14 : Write specific variables from c14 model '
          IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
-      !
+         !
          CALL iom_rstput( kt, nitrst, numrtw, 'co2sbc', co2sbc )       ! These five need      &
          CALL iom_rstput( kt, nitrst, numrtw, 'c14sbc', c14sbc )     ! &    to be written   &
@@ -156,14 +154,13 @@
          CALL iom_rstput( kt, nitrst, numrtw, 'qtr_c14', qtr_c14 )   ! &    to be coherent.
          CALL iom_rstput( kt, nitrst, numrtw, 'qint_c14', qint_c14 ) ! Cumulative
-      !
+         !
       ENDIF
 
       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')
+      IF( ln_timing )   CALL timing_stop('trc_sms_c14')
       !
    END SUBROUTINE trc_sms_c14
 
-
   !!======================================================================
 END MODULE trcsms_c14
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 9124)
@@ -85,6 +85,5 @@
       !!----------------------------------------------------------------------
       !
-      !
-      IF( nn_timing == 1 )  CALL timing_start('trc_sms_cfc')
+      IF( ln_timing )   CALL timing_start('trc_sms_cfc')
       !
       ALLOCATE( zpatm(jphem,jp_cfc), STAT=ierr )
@@ -194,5 +193,5 @@
       END IF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_sms_cfc')
+      IF( ln_timing )   CALL timing_stop('trc_sms_cfc')
       !
    END SUBROUTINE trc_sms_cfc
@@ -205,5 +204,5 @@
       !! ** Purpose : sets constants for CFC model
       !!---------------------------------------------------------------------
-      INTEGER :: jn
+      INTEGER ::   jn   !
       !!----------------------------------------------------------------------
       !
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90	(revision 9124)
@@ -46,5 +46,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_sms_my_trc')
+      IF( ln_timing )   CALL timing_start('trc_sms_my_trc')
       !
       IF(lwp) WRITE(numout,*)
@@ -67,7 +67,8 @@
       END IF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_sms_my_trc')
+      IF( ln_timing )   CALL timing_stop('trc_sms_my_trc')
       !
    END SUBROUTINE trc_sms_my_trc
+
 
    INTEGER FUNCTION trc_sms_my_trc_alloc()
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 9124)
@@ -101,5 +101,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p2z_bio')
+      IF( ln_timing )   CALL timing_start('p2z_bio')
       !
       IF( lk_iomput ) THEN
@@ -382,7 +382,8 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p2z_bio')
+      IF( ln_timing )  CALL timing_stop('p2z_bio')
       !
    END SUBROUTINE p2z_bio
+
 
    SUBROUTINE p2z_bio_init
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90	(revision 9124)
@@ -68,5 +68,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p2z_exp')
+      IF( ln_timing )   CALL timing_start('p2z_exp')
       !
       IF( kt == nittrc000 )   CALL p2z_exp_init
@@ -155,7 +155,8 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p2z_exp')
+      IF( ln_timing )  CALL timing_stop('p2z_exp')
       !
    END SUBROUTINE p2z_exp
+
 
    SUBROUTINE p2z_exp_init
@@ -166,8 +167,8 @@
       INTEGER  ::   ji, jj, jk
       REAL(wp) ::   zmaskt, zfluo, zfluu
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zrro
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zdm0
-      !!---------------------------------------------------------------------
-
+      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zrro
+      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zdm0
+      !!---------------------------------------------------------------------
+      !
       IF(lwp) THEN
          WRITE(numout,*)
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 9124)
@@ -11,4 +11,6 @@
    !!             3.2  !  2009-04  (C. Ethe, G. Madec)  minor optimisation + style
    !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
    !!   p2z_opt        :   Compute the light availability in the water column
    !!----------------------------------------------------------------------
@@ -69,5 +71,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p2z_opt')
+      IF( ln_timing )   CALL timing_start('p2z_opt')
       !
       ! Allocate temporary workspace
@@ -143,5 +145,5 @@
       CALL wrk_dealloc( jpi, jpj, jpk, zparr, zparg    )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p2z_opt')
+      IF( ln_timing )   CALL timing_stop('p2z_opt')
       !
    END SUBROUTINE p2z_opt
@@ -157,7 +159,8 @@
       !!
       !!----------------------------------------------------------------------
+      INTEGER ::   ios   ! Local integer
+      !!
       NAMELIST/namlobopt/ xkg0, xkr0, xkgp, xkrp, xlg, xlr, rpig
       NAMELIST/namlobrat/ rcchl, redf, reddom
-      INTEGER :: ios                 ! Local integer output status for namelist read
       !!----------------------------------------------------------------------
 
@@ -168,5 +171,5 @@
       REWIND( numnatp_cfg )              ! Namelist namlobopt in configuration namelist : Lobster options
       READ  ( numnatp_cfg, namlobopt, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobopt in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namlobopt in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namlobopt )
 
@@ -190,5 +193,5 @@
       REWIND( numnatp_cfg )              ! Namelist namlobrat in configuration namelist : Lobster ratios
       READ  ( numnatp_cfg, namlobrat, IOSTAT = ios, ERR = 904 )
-904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobrat in configuration namelist', lwp )
+904   IF( ios >  0 ) CALL ctl_nam ( ios , 'namlobrat in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namlobrat )
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 9124)
@@ -35,5 +35,4 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -56,7 +55,6 @@
       !!              trend of passive tracers is saved for futher diagnostics.
       !!---------------------------------------------------------------------
-      !!
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index      
-      !!
+      !
       INTEGER  ::   ji, jj, jk, jl, ierr
       CHARACTER (len=25) :: charout
@@ -65,5 +63,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p2z_sed')
+      IF( ln_timing )   CALL timing_start('p2z_sed')
       !
       IF( kt == nittrc000 ) THEN
@@ -119,7 +117,8 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p2z_sed')
+      IF( ln_timing )   CALL timing_stop('p2z_sed')
       !
    END SUBROUTINE p2z_sed
+
 
    SUBROUTINE p2z_sed_init
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsms.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsms.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsms.F90	(revision 9124)
@@ -6,4 +6,6 @@
    !! History :   1.0  !            M. Levy
    !!             2.0  !  2007-12  (C. Ethe, G. Madec)  revised architecture
+   !!----------------------------------------------------------------------
+
    !!----------------------------------------------------------------------
    !!   p2zsms        :  Time loop of passive tracers sms
@@ -42,11 +44,10 @@
       !! ** Method  : - ???
       !! --------------------------------------------------------------------
-      !!
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index      
       !
-      INTEGER :: jn
+      INTEGER ::   jn   ! dummy loop index
       !! --------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p2z_sms')
+      IF( ln_timing )   CALL timing_start('p2z_sms')
       !
       CALL p2z_opt( kt )      ! optical model
@@ -54,5 +55,5 @@
       CALL p2z_sed( kt )      ! sedimentation model
       CALL p2z_exp( kt )      ! export
-
+      !
       IF( l_trdtrc ) THEN
          DO jn = jp_pcs0, jp_pcs1
@@ -60,8 +61,7 @@
          END DO
       END IF
-
       !
       IF ( lwm .AND. kt == nittrc000 ) CALL FLUSH    ( numonp )     ! flush output namelist PISCES
-      IF( nn_timing == 1 )  CALL timing_stop('p2z_sms')
+      IF( ln_timing )   CALL timing_stop('p2z_sms')
       !
    END SUBROUTINE p2z_sms
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zagg.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zagg.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zagg.F90	(revision 9124)
@@ -10,4 +10,5 @@
    !!             3.6  !  2015-05  (O. Aumont) PISCES quota
    !!----------------------------------------------------------------------
+
    !!----------------------------------------------------------------------
    !!   p4z_agg       :  Compute aggregation of particles
@@ -38,5 +39,6 @@
       !! ** Method  : - ???
       !!---------------------------------------------------------------------
-      INTEGER, INTENT(in) :: kt, knt
+      INTEGER, INTENT(in) ::   kt, knt   !
+      !
       INTEGER  ::   ji, jj, jk
       REAL(wp) ::   zagg, zagg1, zagg2, zagg3, zagg4
@@ -49,6 +51,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_agg')
-
+      IF( ln_timing )   CALL timing_start('p4z_agg')
       !
       !  Exchange between organic matter compartments due to coagulation/disaggregation
@@ -178,5 +179,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_agg')
+      IF( ln_timing )   CALL timing_stop('p4z_agg')
       !
    END SUBROUTINE p4z_agg
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 9124)
@@ -56,10 +56,10 @@
       !!---------------------------------------------------------------------
       INTEGER, INTENT(in) :: kt, knt
+      !
       INTEGER             :: ji, jj, jk, jn
       CHARACTER (len=25) :: charout
-
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_bio')
+      IF( ln_timing )   CALL timing_start('p4z_bio')
       !
       !     ASSIGN THE SHEAR RATE THAT IS USED FOR AGGREGATION
@@ -112,5 +112,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_bio')
+      IF( ln_timing )   CALL timing_stop('p4z_bio')
       !
    END SUBROUTINE p4z_bio
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90	(revision 9124)
@@ -155,8 +155,7 @@
       REAL(wp) ::   zst  , zft  , zcks  , zckf  , zaksp1
       REAL(wp) ::   total2free, free2SWS, total2SWS, SWS2total
-
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_che')
+      IF( ln_timing )   CALL timing_start('p4z_che')
       !
       ! Computation of chemical constants require practical salinity
@@ -447,7 +446,8 @@
       END DO
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_che')
+      IF( ln_timing )  CALL timing_stop('p4z_che')
       !
    END SUBROUTINE p4z_che
+
 
    SUBROUTINE ahini_for_at(p_hini)
@@ -470,6 +470,7 @@
       REAL(wp)  ::  za2, za1, za0
       REAL(wp)  ::  p_dictot, p_bortot, p_alkcb 
-
-      IF( nn_timing == 1 )  CALL timing_start('ahini_for_at')
+      !!---------------------------------------------------------------------
+
+      IF( ln_timing )  CALL timing_start('ahini_for_at')
       !
       DO jk = 1, jpk
@@ -512,9 +513,10 @@
       END DO
       !
-      IF( nn_timing == 1 )  CALL timing_stop('ahini_for_at')
+      IF( ln_timing )  CALL timing_stop('ahini_for_at')
       !
    END SUBROUTINE ahini_for_at
 
    !===============================================================================
+
    SUBROUTINE anw_infsup( p_alknw_inf, p_alknw_sup )
 
@@ -564,5 +566,5 @@
    REAL(wp), POINTER, DIMENSION(:,:,:) :: zalknw_inf, zalknw_sup, rmask, zh_min, zh_max, zeqn_absmin
 
-   IF( nn_timing == 1 )  CALL timing_start('solve_at_general')
+   IF( ln_timing )  CALL timing_start('solve_at_general')
       !  Allocate temporary workspace
    CALL wrk_alloc( jpi, jpj, jpk, zalknw_inf, zalknw_sup, rmask )
@@ -801,8 +803,8 @@
 
 
-   IF( nn_timing == 1 )  CALL timing_stop('solve_at_general')
-
-
+      IF( ln_timing )   CALL timing_stop('solve_at_general')
+      !
    END SUBROUTINE solve_at_general
+
 
    INTEGER FUNCTION p4z_che_alloc()
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 9124)
@@ -79,5 +79,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_fechem')
+      IF( ln_timing )   CALL timing_start('p4z_fechem')
       !
       ! Allocate temporary workspace
@@ -366,5 +366,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_fechem')
+      IF( ln_timing )   CALL timing_stop('p4z_fechem')
       !
    END SUBROUTINE p4z_fechem
@@ -383,6 +383,8 @@
       !!
       !!----------------------------------------------------------------------
+      INTEGER ::   ios   ! Local integer 
+      !!
       NAMELIST/nampisfer/ ln_fechem, ln_ligvar, ln_fecolloid, xlam1, xlamdust, ligand, kfep 
-      INTEGER :: ios                 ! Local integer output status for namelist read
+      !!----------------------------------------------------------------------
 
       REWIND( numnatp_ref )              ! Namelist nampisfer in reference namelist : Pisces iron chemistry
@@ -392,5 +394,5 @@
       REWIND( numnatp_cfg )              ! Namelist nampisfer in configuration namelist : Pisces iron chemistry
       READ  ( numnatp_cfg, nampisfer, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisfer in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampisfer in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, nampisfer )
 
@@ -434,4 +436,5 @@
       !
    END SUBROUTINE p4z_fechem_init
+   
    !!======================================================================
 END MODULE p4zfechem
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 9124)
@@ -83,5 +83,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_flx')
+      IF( ln_timing )   CALL timing_start('p4z_flx')
       !
       CALL wrk_alloc( jpi, jpj, zkgco2, zkgo2, zh2co3, zoflx, zpco2atm )
@@ -216,5 +216,5 @@
       CALL wrk_dealloc( jpi, jpj, zkgco2, zkgo2, zh2co3, zoflx, zpco2atm )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_flx')
+      IF( ln_timing )   CALL timing_stop('p4z_flx')
       !
    END SUBROUTINE p4z_flx
@@ -231,7 +231,8 @@
       !! ** input   :   Namelist nampisext
       !!----------------------------------------------------------------------
+      INTEGER ::   jm
+      INTEGER ::   ios   ! Local integer 
+      !
       NAMELIST/nampisext/ln_co2int, atcco2, clname, nn_offset
-      INTEGER :: jm
-      INTEGER :: ios                 ! Local integer output status for namelist read
       !!----------------------------------------------------------------------
       !
@@ -243,5 +244,5 @@
       REWIND( numnatp_cfg )              ! Namelist nampisext in configuration namelist : Pisces atm. conditions
       READ  ( numnatp_cfg, nampisext, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisext in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampisext in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, nampisext )
       !
@@ -292,5 +293,4 @@
          ENDIF
       ENDIF
-
       !
       oce_co2(:,:)  = 0._wp                ! Initialization of Flux of Carbon
@@ -302,6 +302,6 @@
    END SUBROUTINE p4z_flx_init
 
+
    SUBROUTINE p4z_patm( kt )
-
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE p4z_atm  ***
@@ -311,5 +311,4 @@
       !!
       !!----------------------------------------------------------------------
-      !! * arguments
       INTEGER, INTENT( in  ) ::   kt   ! ocean time step
       !
@@ -321,4 +320,5 @@
       !!
       NAMELIST/nampisatm/ ln_presatm, ln_presatmco2, sn_patm, sn_atmco2, cn_dir
+      !!----------------------------------------------------------------------
 
       !                                         ! ----------------------- !
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zint.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zint.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zint.F90	(revision 9124)
@@ -33,5 +33,4 @@
       !!
       !!---------------------------------------------------------------------
-      !
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
       !
@@ -40,5 +39,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_int')
+      IF( ln_timing )   CALL timing_start('p4z_int')
       !
       ! Computation of phyto and zoo metabolic rate
@@ -61,5 +60,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_int')
+      IF( ln_timing )   CALL timing_stop('p4z_int')
       !
    END SUBROUTINE p4z_int
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zligand.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zligand.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zligand.F90	(revision 9124)
@@ -50,5 +50,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_ligand')
+      IF( ln_timing )   CALL timing_start('p4z_ligand')
       !
       ! ------------------------------------------------------------------
@@ -75,5 +75,4 @@
       ! Dissolution of nanoparticle Fe
       ! ----------------------------------------------------------
-
       DO jk = 1, jpkm1
          DO jj = 1, jpj
@@ -97,5 +96,5 @@
        ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_ligand')
+      IF( ln_timing )   CALL timing_stop('p4z_ligand')
       !
    END SUBROUTINE p4z_ligand
@@ -114,6 +113,8 @@
       !!
       !!----------------------------------------------------------------------
+      INTEGER ::   ios   ! Local integer 
+      !
       NAMELIST/nampislig/ rlgw, prlgw, rlgs, rfep, rlig
-      INTEGER :: ios                 ! Local integer output status for namelist read
+      !!----------------------------------------------------------------------
 
       REWIND( numnatp_ref )              ! Namelist nampislig in reference namelist : Pisces remineralization
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90	(revision 9124)
@@ -72,5 +72,4 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -84,5 +83,4 @@
       !! ** Method  : - ???
       !!---------------------------------------------------------------------
-      !
       INTEGER, INTENT(in)  :: kt, knt
       !
@@ -95,5 +93,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_lim')
+      IF( ln_timing )   CALL timing_start('p4z_lim')
       !
       DO jk = 1, jpkm1
@@ -224,10 +222,10 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_lim')
+      IF( ln_timing )   CALL timing_stop('p4z_lim')
       !
    END SUBROUTINE p4z_lim
 
+
    SUBROUTINE p4z_lim_init
-
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE p4z_lim_init  ***
@@ -241,19 +239,20 @@
       !!
       !!----------------------------------------------------------------------
-
+      INTEGER ::   ios   ! Local integer
+      !
       NAMELIST/namp4zlim/ concnno3, concdno3, concnnh4, concdnh4, concnfer, concdfer, concbfe,   &
          &                concbno3, concbnh4, xsizedia, xsizephy, xsizern, xsizerd,          & 
          &                xksi1, xksi2, xkdoc, qnfelim, qdfelim, caco3r, oxymin
-      INTEGER :: ios                 ! Local integer output status for namelist read
-
+      !!----------------------------------------------------------------------
+      !
       REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters
       READ  ( numnatp_ref, namp4zlim, IOSTAT = ios, ERR = 901)
 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zlim in reference namelist', lwp )
-
+      !
       REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters 
       READ  ( numnatp_cfg, namp4zlim, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zlim in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp4zlim in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namp4zlim )
-
+      !
       IF(lwp) THEN                         ! control print
          WRITE(numout,*) ' '
@@ -286,4 +285,5 @@
    END SUBROUTINE p4z_lim_init
 
+
    INTEGER FUNCTION p4z_lim_alloc()
       !!----------------------------------------------------------------------
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90	(revision 9124)
@@ -65,5 +65,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_lys')
+      IF( ln_timing )  CALL timing_start('p4z_lys')
       !
       CALL wrk_alloc( jpi, jpj, jpk, zco3, zcaldiss, zhinit, zhi, zco3sat )
@@ -141,10 +141,10 @@
       CALL wrk_dealloc( jpi, jpj, jpk, zco3, zcaldiss, zhinit, zhi, zco3sat )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_lys')
+      IF( ln_timing )   CALL timing_stop('p4z_lys')
       !
    END SUBROUTINE p4z_lys
 
+
    SUBROUTINE p4z_lys_init
-
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE p4z_lys_init  ***
@@ -158,18 +158,18 @@
       !!
       !!----------------------------------------------------------------------
-      INTEGER  ::  ios                 ! Local integer output status for namelist read
-
+      INTEGER ::   ios   ! Local integer
+      !
       NAMELIST/nampiscal/ kdca, nca
       !!----------------------------------------------------------------------
-
+      !
       REWIND( numnatp_ref )              ! Namelist nampiscal in reference namelist : Pisces CaCO3 dissolution
       READ  ( numnatp_ref, nampiscal, IOSTAT = ios, ERR = 901)
 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiscal in reference namelist', lwp )
-
+      !
       REWIND( numnatp_cfg )              ! Namelist nampiscal in configuration namelist : Pisces CaCO3 dissolution
       READ  ( numnatp_cfg, nampiscal, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiscal in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampiscal in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, nampiscal )
-
+      !
       IF(lwp) THEN                         ! control print
          WRITE(numout,*) ' '
@@ -179,5 +179,5 @@
          WRITE(numout,*) '    order of reaction for calcite dissolution nca       =', nca
       ENDIF
-
+      !
       ! Number of seconds per month 
       rmtss =  nyear_len(1) * rday / raamo
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90	(revision 9124)
@@ -76,5 +76,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_meso')
+      IF( ln_timing )   CALL timing_start('p4z_meso')
       !
       CALL wrk_alloc( jpi, jpj, jpk, zgrazing )
@@ -240,10 +240,10 @@
       CALL wrk_dealloc( jpi, jpj, jpk, zgrazing )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_meso')
+      IF( ln_timing )   CALL timing_stop('p4z_meso')
       !
    END SUBROUTINE p4z_meso
 
+
    SUBROUTINE p4z_meso_init
-
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE p4z_meso_init  ***
@@ -257,20 +257,20 @@
       !!
       !!----------------------------------------------------------------------
-
+      INTEGER ::   ios   ! Local integer
+      !
       NAMELIST/namp4zmes/ part2, grazrat2, resrat2, mzrat2, xprefc, xprefp, xprefz,   &
          &                xprefpoc, xthresh2dia, xthresh2phy, xthresh2zoo, xthresh2poc, &
          &                xthresh2, xkgraz2, epsher2, sigma2, unass2, grazflux
-      INTEGER :: ios                 ! Local integer output status for namelist read
-
+      !!----------------------------------------------------------------------
+      !
       REWIND( numnatp_ref )              ! Namelist nampismes in reference namelist : Pisces mesozooplankton
       READ  ( numnatp_ref, namp4zmes, IOSTAT = ios, ERR = 901)
 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zmes in reference namelist', lwp )
-
+      !
       REWIND( numnatp_cfg )              ! Namelist nampismes in configuration namelist : Pisces mesozooplankton
       READ  ( numnatp_cfg, namp4zmes, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zmes in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp4zmes in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namp4zmes )
-
-
+      !
       IF(lwp) THEN                         ! control print
          WRITE(numout,*) ' ' 
@@ -296,6 +296,5 @@
          WRITE(numout,*) '    half sturation constant for grazing 2          xkgraz2      =', xkgraz2
       ENDIF
-
-
+      !
    END SUBROUTINE p4z_meso_init
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 9124)
@@ -42,5 +42,4 @@
    REAL(wp), PUBLIC ::  epsher      !: half sturation constant for grazing 1 
 
-
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -48,5 +47,4 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -75,5 +73,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_micro')
+      IF( ln_timing )   CALL timing_start('p4z_micro')
       !
       CALL wrk_alloc( jpi, jpj, jpk, zgrazing )
@@ -196,5 +194,5 @@
       CALL wrk_dealloc( jpi, jpj, jpk, zgrazing )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_micro')
+      IF( ln_timing )   CALL timing_stop('p4z_micro')
       !
    END SUBROUTINE p4z_micro
@@ -202,5 +200,4 @@
 
    SUBROUTINE p4z_micro_init
-
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE p4z_micro_init  ***
@@ -214,19 +211,20 @@
       !!
       !!----------------------------------------------------------------------
-
+      INTEGER ::   ios   ! Local integer
+      !
       NAMELIST/namp4zzoo/ part, grazrat, resrat, mzrat, xpref2c, xpref2p, &
          &                xpref2d,  xthreshdia,  xthreshphy,  xthreshpoc, &
          &                xthresh, xkgraz, epsher, sigma1, unass
-      INTEGER :: ios                 ! Local integer output status for namelist read
-
+      !!----------------------------------------------------------------------
+      !
       REWIND( numnatp_ref )              ! Namelist nampiszoo in reference namelist : Pisces microzooplankton
       READ  ( numnatp_ref, namp4zzoo, IOSTAT = ios, ERR = 901)
 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zzoo in reference namelist', lwp )
-
+      !
       REWIND( numnatp_cfg )              ! Namelist nampiszoo in configuration namelist : Pisces microzooplankton
       READ  ( numnatp_cfg, namp4zzoo, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zzoo in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp4zzoo in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namp4zzoo )
-
+      !
       IF(lwp) THEN                         ! control print
          WRITE(numout,*) ' '
@@ -249,5 +247,5 @@
          WRITE(numout,*) '    half sturation constant for grazing 1           xkgraz      =', xkgraz
       ENDIF
-
+      !
    END SUBROUTINE p4z_micro_init
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90	(revision 9124)
@@ -72,5 +72,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_nano')
+      IF( ln_timing )   CALL timing_start('p4z_nano')
       !
       prodcal(:,:,:) = 0.  !: calcite production variable set to zero
@@ -126,7 +126,8 @@
        ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_nano')
+      IF( ln_timing )   CALL timing_stop('p4z_nano')
       !
    END SUBROUTINE p4z_nano
+
 
    SUBROUTINE p4z_diat
@@ -145,5 +146,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_diat')
+      IF( ln_timing )   CALL timing_start('p4z_diat')
       !
 
@@ -201,10 +202,10 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_diat')
+      IF( ln_timing )   CALL timing_stop('p4z_diat')
       !
    END SUBROUTINE p4z_diat
 
+
    SUBROUTINE p4z_mort_init
-
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE p4z_mort_init  ***
@@ -218,17 +219,18 @@
       !!
       !!----------------------------------------------------------------------
-
+      INTEGER ::   ios   ! Local integer
+      !
       NAMELIST/namp4zmort/ wchl, wchld, wchldm, mprat, mprat2
-      INTEGER :: ios                 ! Local integer output status for namelist read
-
+      !!----------------------------------------------------------------------
+      !
       REWIND( numnatp_ref )              ! Namelist nampismort in reference namelist : Pisces phytoplankton
       READ  ( numnatp_ref, namp4zmort, IOSTAT = ios, ERR = 901)
 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zmort in reference namelist', lwp )
-
+      !
       REWIND( numnatp_cfg )              ! Namelist nampismort in configuration namelist : Pisces phytoplankton
       READ  ( numnatp_cfg, namp4zmort, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zmort in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp4zmort in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namp4zmort )
-
+      !
       IF(lwp) THEN                         ! control print
          WRITE(numout,*) ' '
@@ -241,5 +243,5 @@
          WRITE(numout,*) '    Diatoms mortality rate                    mprat2    =', mprat2
       ENDIF
-
+      !
    END SUBROUTINE p4z_mort_init
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 9124)
@@ -18,5 +18,4 @@
    USE prtctl_trc      !  print control for debugging
 
-
    IMPLICIT NONE
    PRIVATE
@@ -59,5 +58,4 @@
       !! ** Method  : - ???
       !!---------------------------------------------------------------------
-      !
       INTEGER, INTENT(in) ::   kt, knt   ! ocean time step
       !
@@ -72,5 +70,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_opt')
+      IF( ln_timing )  CALL timing_start('p4z_opt')
       !
       ! Allocate temporary workspace
@@ -250,7 +248,8 @@
                    CALL wrk_dealloc( jpi, jpj, jpk, zpar   ,  ze0, ze1, ze2, ze3, zchl3d )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_opt')
+      IF( ln_timing )  CALL timing_stop('p4z_opt')
       !
    END SUBROUTINE p4z_opt
+
 
    SUBROUTINE p4z_opt_par( kt, pqsr, pe1, pe2, pe3, pe0, pqsr100 ) 
@@ -334,13 +333,11 @@
       !!
       !!----------------------------------------------------------------------
-      !! * arguments
       INTEGER ,                INTENT(in) ::   kt     ! ocean time step
-
-      !! * local declarations
+      !
       INTEGER  :: ji,jj
       REAL(wp) :: zcoef
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_optsbc')
+      IF( ln_timing )  CALL timing_start('p4z_optsbc')
       !
       ! Compute par_varsw at nit000 or only if there is more than 1 time record in par coefficient file
@@ -352,7 +349,8 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_optsbc')
+      IF( ln_timing )  CALL timing_stop('p4z_optsbc')
       !
    END SUBROUTINE p4z_opt_sbc
+
 
    SUBROUTINE p4z_opt_init
@@ -365,5 +363,4 @@
       !! ** Input   :   external ascii and netcdf files
       !!----------------------------------------------------------------------
-      !
       INTEGER :: numpar
       INTEGER :: ierr
@@ -375,8 +372,5 @@
       !
       NAMELIST/nampisopt/cn_dir, sn_par, ln_varpar, parlux
-
-      !!----------------------------------------------------------------------
-
-      IF( nn_timing == 1 )  CALL timing_start('p4z_opt_init')
+      !!----------------------------------------------------------------------
 
       REWIND( numnatp_ref )              ! Namelist nampisopt in reference namelist : Pisces attenuation coef. and PAR
@@ -434,6 +428,4 @@
       IF( ln_qsr_bio )   etot3    (:,:,:) = 0._wp
       ! 
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_opt_init')
-      !
    END SUBROUTINE p4z_opt_init
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zpoc.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zpoc.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zpoc.F90	(revision 9124)
@@ -17,5 +17,4 @@
    USE prtctl_trc      !  print control for debugging
    USE iom             !  I/O manager
-
 
    IMPLICIT NONE
@@ -69,5 +68,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_poc')
+      IF( ln_timing )  CALL timing_start('p4z_poc')
       !
       ! Allocate temporary workspace
@@ -470,5 +469,5 @@
       DEALLOCATE( alphag )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_poc')
+      IF( ln_timing )   CALL timing_stop('p4z_poc')
       !
    END SUBROUTINE p4z_poc
@@ -487,13 +486,11 @@
       !!
       !!----------------------------------------------------------------------
-      INTEGER :: jn
+      INTEGER ::   ios, ifault   ! Local integer
+      INTEGER ::   jn
       REAL(wp) :: remindelta, reminup, remindown
-      INTEGER  :: ifault
-
-      NAMELIST/nampispoc/ xremip, jcpoc, rshape,  &
-         &     xremipc, xremipn, xremipp
-
-
-      INTEGER :: ios                 ! Local integer output status for namelist read
+      !!
+      NAMELIST/nampispoc/ xremip , jcpoc  , rshape,  &
+         &                xremipc, xremipn, xremipp
+      !!----------------------------------------------------------------------
 
       REWIND( numnatp_ref )              ! Namelist nampisrem in reference namelist : Pisces remineralization
@@ -503,5 +500,5 @@
       REWIND( numnatp_cfg )              ! Namelist nampisrem in configuration namelist : Pisces remineralization
       READ  ( numnatp_cfg, nampispoc, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampispoc in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampispoc in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, nampispoc )
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 9124)
@@ -65,5 +65,4 @@
       !! ** Method  : - ???
       !!---------------------------------------------------------------------
-      !
       INTEGER, INTENT(in) :: kt, knt
       !
@@ -85,5 +84,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_prod')
+      IF( ln_timing )   CALL timing_start('p4z_prod')
       !
       !  Allocate temporary workspace
@@ -486,5 +485,5 @@
      CALL wrk_dealloc( jpi, jpj, jpk, zprorcan, zprorcad, zprofed, zprofen, zpronewn, zpronewd )
      !
-     IF( nn_timing == 1 )  CALL timing_stop('p4z_prod')
+     IF( ln_timing )  CALL timing_stop('p4z_prod')
      !
    END SUBROUTINE p4z_prod
@@ -502,8 +501,8 @@
       !! ** input   :   Namelist nampisprod
       !!----------------------------------------------------------------------
+      INTEGER :: ios                 ! Local integer output status for namelist read
       !
       NAMELIST/namp4zprod/ pislopen, pisloped, xadap, ln_newprod, bresp, excretn, excretd,  &
          &                 chlcnm, chlcdm, chlcmin, fecnm, fecdm, grosip
-      INTEGER :: ios                 ! Local integer output status for namelist read
       !!----------------------------------------------------------------------
 
@@ -514,5 +513,5 @@
       REWIND( numnatp_cfg )              ! Namelist nampisprod in configuration namelist : Pisces phytoplankton production
       READ  ( numnatp_cfg, namp4zprod, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp4zprod in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp4zprod in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namp4zprod )
 
@@ -555,4 +554,5 @@
       !
    END FUNCTION p4z_prod_alloc
+
    !!======================================================================
 END MODULE p4zprod
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 9124)
@@ -58,5 +58,4 @@
       !! ** Method  : - ???
       !!---------------------------------------------------------------------
-      !
       INTEGER, INTENT(in) ::   kt, knt ! ocean time step
       !
@@ -72,5 +71,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_rem')
+      IF( ln_timing )   CALL timing_start('p4z_rem')
       !
       ! Allocate temporary workspace
@@ -289,5 +288,5 @@
       CALL wrk_dealloc( jpi, jpj, jpk, zdepbac, zdepprod, zolimi, zfacsi, zfacsib )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_rem')
+      IF( ln_timing )   CALL timing_stop('p4z_rem')
       !
    END SUBROUTINE p4z_rem
@@ -309,4 +308,5 @@
          &                xremikc, xremikn, xremikp
       INTEGER :: ios                 ! Local integer output status for namelist read
+      !!----------------------------------------------------------------------
 
       REWIND( numnatp_ref )              ! Namelist nampisrem in reference namelist : Pisces remineralization
@@ -316,5 +316,5 @@
       REWIND( numnatp_cfg )              ! Namelist nampisrem in configuration namelist : Pisces remineralization
       READ  ( numnatp_cfg, nampisrem, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisrem in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampisrem in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, nampisrem )
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 9124)
@@ -108,6 +108,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_sbc')
-
+      IF( ln_timing )  CALL timing_start('p4z_sbc')
       !
       ! Compute dust at nit000 or only if there is more than 1 time record in dust file
@@ -189,10 +188,10 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_sbc')
+      IF( ln_timing )  CALL timing_stop('p4z_sbc')
       !
    END SUBROUTINE p4z_sbc
 
+
    SUBROUTINE p4z_sbc_init
-
       !!----------------------------------------------------------------------
       !!                  ***  routine p4z_sbc_init  ***
@@ -232,6 +231,4 @@
         &                hratio, fep_rats, fep_rath, lgw_rath
       !!----------------------------------------------------------------------
-      !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_sbc_init')
       !
       !                            !* set file information
@@ -535,6 +532,4 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_sbc_init')
-      !
    END SUBROUTINE p4z_sbc_init
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 9124)
@@ -68,8 +68,7 @@
       REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrpo4, ztrdop, zirondep, zsoufer, zpdep, zlight
       REAL(wp), POINTER, DIMENSION(:,:  ) :: zwsfep
-
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_sed')
+      IF( ln_timing )  CALL timing_start('p4z_sed')
       !
       IF( kt == nittrc000 .AND. knt == 1 )   r1_rday  = 1. / rday
@@ -522,5 +521,5 @@
       IF( ln_ligand ) CALL wrk_dealloc( jpi, jpj, zwsfep )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_sed')
+      IF( ln_timing )  CALL timing_stop('p4z_sed')
       !
    END SUBROUTINE p4z_sed
@@ -537,5 +536,4 @@
    END FUNCTION p4z_sed_alloc
 
-
    !!======================================================================
 END MODULE p4zsed
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 9124)
@@ -69,5 +69,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_sink')
+      IF( ln_timing )   CALL timing_start('p4z_sink')
 
 
@@ -261,8 +261,9 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_sink')
+      IF( ln_timing )   CALL timing_stop('p4z_sink')
       !
    END SUBROUTINE p4z_sink
 
+
    SUBROUTINE p4z_sink_init
       !!----------------------------------------------------------------------
@@ -270,5 +271,6 @@
       !!----------------------------------------------------------------------
       INTEGER :: jk
-
+      !!----------------------------------------------------------------------
+      !
       ik100 = 10        !  last level where depth less than 100 m
       DO jk = jpkm1, 1, -1
@@ -282,4 +284,5 @@
       !
    END SUBROUTINE p4z_sink_init
+
 
    SUBROUTINE p4z_sink2( pwsink, psinkflx, jp_tra, kiter )
@@ -294,10 +297,9 @@
       !!      transport term, i.e.  div(u*tra).
       !!---------------------------------------------------------------------
-      !
       INTEGER , INTENT(in   )                         ::   jp_tra    ! tracer index index      
       INTEGER , INTENT(in   )                         ::   kiter     ! number of iterations for time-splitting 
       REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj,jpk) ::   pwsink    ! sinking speed
       REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) ::   psinkflx  ! sinking fluxe
-      !!
+      !
       INTEGER  ::   ji, jj, jk, jn
       REAL(wp) ::   zigma,zew,zign, zflx, zstep
@@ -305,5 +307,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_sink2')
+      IF( ln_timing )   CALL timing_start('p4z_sink2')
       !
       ! Allocate temporary workspace
@@ -391,5 +393,5 @@
       CALL wrk_dealloc( jpi, jpj, jpk, ztraz, zakz, zwsink2, ztrb )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_sink2')
+      IF( ln_timing )  CALL timing_stop('p4z_sink2')
       !
    END SUBROUTINE p4z_sink2
@@ -401,5 +403,6 @@
       !!----------------------------------------------------------------------
       INTEGER :: ierr(3)
-
+      !!----------------------------------------------------------------------
+      !
       ierr(:) = 0
       !
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 9124)
@@ -40,5 +40,4 @@
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   xnegtr     !: ???
 
-
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -68,5 +67,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p4z_sms')
+      IF( ln_timing )   CALL timing_start('p4z_sms')
       !
       IF( kt == nittrc000 ) THEN
@@ -171,11 +170,12 @@
       !
 
-      IF( lk_iomput .OR. ln_check_mass )  CALL p4z_chk_mass( kt ) ! Mass conservation checking
-
-      IF ( lwm .AND. kt == nittrc000 ) CALL FLUSH    ( numonp )     ! flush output namelist PISCES
-      IF( nn_timing == 1 )  CALL timing_stop('p4z_sms')
-      !
+      IF( lk_iomput .OR. ln_check_mass )  CALL p4z_chk_mass( kt )    ! Mass conservation checking
+
+      IF( lwm .AND. kt == nittrc000    )  CALL FLUSH( numonp )       ! flush output namelist PISCES
+      !
+      IF( ln_timing )  CALL timing_stop('p4z_sms')
       !
    END SUBROUTINE p4z_sms
+
 
    SUBROUTINE p4z_sms_init
@@ -188,11 +188,12 @@
       !!             namelist: natext, natbio, natsms
       !!----------------------------------------------------------------------
+      INTEGER :: ios                 ! Local integer output status for namelist read
+      !!
       NAMELIST/nampisbio/ nrdttrc, wsbio, xkmort, ferat3, wsbio2, wsbio2max, wsbio2scale,    &
          &                   niter1max, niter2max, wfep, ldocp, ldocz, lthet,  &
          &                   no3rat3, po4rat3
-
+         !
       NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp
       NAMELIST/nampismass/ ln_check_mass
-      INTEGER :: ios                 ! Local integer output status for namelist read
       !!----------------------------------------------------------------------
 
@@ -203,5 +204,5 @@
       REWIND( numnatp_cfg )              ! Namelist nampisbio in configuration namelist : Pisces variables
       READ  ( numnatp_cfg, nampisbio, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisbio in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampisbio in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, nampisbio )
 
@@ -238,5 +239,5 @@
       REWIND( numnatp_cfg )              ! Namelist nampisdmp in configuration namelist : Pisces damping
       READ  ( numnatp_cfg, nampisdmp, IOSTAT = ios, ERR = 906 )
-906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisdmp in configuration namelist', lwp )
+906   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampisdmp in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, nampisdmp )
 
@@ -255,5 +256,5 @@
       REWIND( numnatp_cfg )              ! Namelist nampismass in configuration namelist : Pisces mass conservation check 
       READ  ( numnatp_cfg, nampismass, IOSTAT = ios, ERR = 908 )
-908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismass in configuration namelist', lwp )
+908   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampismass in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, nampismass )
 
@@ -264,6 +265,7 @@
          WRITE(numout,*) '    Flag to check mass conservation of NO3/Si/TALK ln_check_mass = ', ln_check_mass
       ENDIF
-
+      !
    END SUBROUTINE p4z_sms_init
+
 
    SUBROUTINE p4z_rst( kt, cdrw )
@@ -279,7 +281,6 @@
       INTEGER         , INTENT(in) ::   kt         ! ocean time-step
       CHARACTER(len=*), INTENT(in) ::   cdrw       ! "READ"/"WRITE" flag
-      !
-      !!---------------------------------------------------------------------
-
+      !!---------------------------------------------------------------------
+      !
       IF( TRIM(cdrw) == 'READ' ) THEN
          !
@@ -337,4 +338,5 @@
    END SUBROUTINE p4z_rst
 
+
    SUBROUTINE p4z_dmp( kt )
       !!----------------------------------------------------------------------
@@ -354,5 +356,4 @@
       REAL(wp) :: zalksumb, zpo4sumb, zno3sumb, zsilsumb
       !!---------------------------------------------------------------------
-
 
       IF(lwp)  WRITE(numout,*)
@@ -415,5 +416,4 @@
       !!
       !!---------------------------------------------------------------------
-      !
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index      
       REAL(wp)             ::  zrdenittot, zsdenittot, znitrpottot
@@ -422,8 +422,5 @@
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zwork
       !!----------------------------------------------------------------------
-
-      !
-      !!---------------------------------------------------------------------
-
+      !
       IF( kt == nittrc000 ) THEN 
          xfact1 = rfact2r * 12. / 1.e15 * ryyss    ! conversion molC/kt --> PgC/yr
@@ -535,7 +532,6 @@
          !
          IF( lwp ) WRITE(numnit,9200) ndastp, znitrpottot * xfact2  , &
-         &                             zrdenittot  * xfact2  , &
-         &                             zsdenittot  * xfact2
-
+            &                             zrdenittot  * xfact2  , &
+            &                             zsdenittot  * xfact2
       ENDIF
       !
@@ -543,5 +539,4 @@
  9100  FORMAT(i8,5e18.10)
  9200  FORMAT(i8,3f10.5)
-
        !
    END SUBROUTINE p4z_chk_mass
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zlim.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zlim.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zlim.F90	(revision 9124)
@@ -154,5 +154,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p5z_lim')
+      IF( ln_timing )   CALL timing_start('p5z_lim')
       !
       zratchl = 6.0
@@ -448,10 +448,10 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p5z_lim')
+      IF( ln_timing )  CALL timing_stop('p5z_lim')
       !
    END SUBROUTINE p5z_lim
 
+
    SUBROUTINE p5z_lim_init
-
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE p5z_lim_init  ***
@@ -465,5 +465,6 @@
       !!
       !!----------------------------------------------------------------------
-
+      INTEGER :: ios                 ! Local integer output status for namelist read
+      !!
       NAMELIST/namp5zlim/ concnno3, concpno3, concdno3, concnnh4, concpnh4, concdnh4,  &
          &                concnfer, concpfer, concdfer, concbfe, concnpo4, concppo4,   &
@@ -471,21 +472,19 @@
          &                xsizephy, xsizern, xsizerp, xsizerd, xksi1, xksi2, xkdoc,    &
          &                caco3r, oxymin
-
+         !
       NAMELIST/namp5zquota/ qnnmin, qnnmax, qpnmin, qpnmax, qnpmin, qnpmax, qppmin,      &
          &                  qppmax, qndmin, qndmax, qpdmin, qpdmax, qfnmax, qfpmax, qfdmax,  &
          &                  qfnopt, qfpopt, qfdopt
- 
-
-      INTEGER :: ios                 ! Local integer output status for namelist read
-
+      !!----------------------------------------------------------------------
+      !
       REWIND( numnatp_ref )              ! Namelist nampislim in reference namelist : Pisces nutrient limitation parameters
       READ  ( numnatp_ref, namp5zlim, IOSTAT = ios, ERR = 901)
 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislim in reference namelist', lwp )
-
+      !
       REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters 
       READ  ( numnatp_cfg, namp5zlim, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislim in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampislim in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namp5zlim )
-
+      !
       IF(lwp) THEN                         ! control print
          WRITE(numout,*) ' '
@@ -523,10 +522,10 @@
       READ  ( numnatp_ref, namp5zquota, IOSTAT = ios, ERR = 903)
 903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisquota in reference namelist', lwp )
-
+      !
       REWIND( numnatp_cfg )              ! Namelist nampislim in configuration namelist : Pisces nutrient limitation parameters 
       READ  ( numnatp_cfg, namp5zquota, IOSTAT = ios, ERR = 904 )
-904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisquota in configuration namelist', lwp )
+904   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampisquota in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namp5zquota )
-
+      !
       IF(lwp) THEN                         ! control print
          WRITE(numout,*) ' '
@@ -552,5 +551,5 @@
          WRITE(numout,*) '    Maximal Fe quota for diatoms             qfdmax    = ', qfdmax
       ENDIF
-
+      !
       zpsino3 = 2.3 * rno3
       zpsinh4 = 1.8 * rno3
@@ -560,4 +559,5 @@
       !
    END SUBROUTINE p5z_lim_init
+
 
    INTEGER FUNCTION p5z_lim_alloc()
@@ -569,5 +569,5 @@
       !!----------------------------------------------------------------------
       ierr(:) = 0
-
+      !
       !*  Biological arrays for phytoplankton growth
       ALLOCATE( xpicono3(jpi,jpj,jpk), xpiconh4(jpi,jpj,jpk),       &
@@ -585,5 +585,5 @@
          &      fvpuptk (jpi,jpj,jpk), xlimpic (jpi,jpj,jpk),       &
          &      xlimsi  (jpi,jpj,jpk), STAT=ierr(1) )
-
+         !
       !*  Minimum/maximum quotas of phytoplankton
       ALLOCATE( xqnnmin (jpi,jpj,jpk), xqnnmax(jpi,jpj,jpk),       &
@@ -593,5 +593,5 @@
          &      xqndmin (jpi,jpj,jpk), xqndmax(jpi,jpj,jpk),       &
          &      xqpdmin (jpi,jpj,jpk), xqpdmax(jpi,jpj,jpk),     STAT=ierr(2) )
-      !
+         !
       p5z_lim_alloc = MAXVAL( ierr )
       !
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmeso.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmeso.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmeso.F90	(revision 9124)
@@ -89,5 +89,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p5z_meso')
+      IF( ln_timing )   CALL timing_start('p5z_meso')
       !
       CALL wrk_alloc( jpi, jpj, jpk, zgrazing )
@@ -362,10 +362,10 @@
       CALL wrk_dealloc( jpi, jpj, jpk, zgrazing )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p5z_meso')
+      IF( ln_timing )   CALL timing_stop('p5z_meso')
       !
    END SUBROUTINE p5z_meso
 
+
    SUBROUTINE p5z_meso_init
-
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE p5z_meso_init  ***
@@ -379,22 +379,21 @@
       !!
       !!----------------------------------------------------------------------
-
+      INTEGER :: ios                 ! Local integer output status for namelist read
+      !!
       NAMELIST/namp5zmes/part2, bmetexc2, grazrat2, resrat2, mzrat2, xpref2c, xpref2p, xpref2z, &
          &                xpref2m, xpref2d, xthresh2dia, xthresh2phy, xthresh2zoo, xthresh2poc, &
          &                xthresh2mes, xthresh2, xkgraz2, epsher2, ssigma2, unass2c, &
-      &                   unass2n, unass2p, srespir2, grazflux
-
-      INTEGER :: ios                 ! Local integer output status for namelist read
-
+         &                unass2n, unass2p, srespir2, grazflux
+      !!----------------------------------------------------------------------
+      !
       REWIND( numnatp_ref )              ! Namelist nampismes in reference namelist : Pisces mesozooplankton
       READ  ( numnatp_ref, namp5zmes, IOSTAT = ios, ERR = 901)
 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismes in reference namelist', lwp )
-
+      !
       REWIND( numnatp_cfg )              ! Namelist nampismes in configuration namelist : Pisces mesozooplankton
       READ  ( numnatp_cfg, namp5zmes, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismes in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nampismes in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namp5zmes )
-
-
+      !
       IF(lwp) THEN                         ! control print
          WRITE(numout,*) ' ' 
@@ -426,6 +425,5 @@
          WRITE(numout,*) '    Use excess carbon for respiration              bmetexc2    = ', bmetexc2
       ENDIF
-
-
+      !
    END SUBROUTINE p5z_meso_init
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmicro.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmicro.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmicro.F90	(revision 9124)
@@ -86,5 +86,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p5z_micro')
+      IF( ln_timing )   CALL timing_start('p5z_micro')
       !
       CALL wrk_alloc( jpi, jpj, jpk, zgrazing )
@@ -306,5 +306,5 @@
       CALL wrk_dealloc( jpi, jpj, jpk, zgrazing )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p5z_micro')
+      IF( ln_timing )   CALL timing_stop('p5z_micro')
       !
    END SUBROUTINE p5z_micro
@@ -312,5 +312,4 @@
 
    SUBROUTINE p5z_micro_init
-
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE p5z_micro_init  ***
@@ -324,21 +323,21 @@
       !!
       !!----------------------------------------------------------------------
-
+      INTEGER ::   ios   ! Local integer
+      !!
       NAMELIST/namp5zzoo/ part, grazrat, bmetexc, resrat, mzrat, xprefc, xprefn, &
          &                xprefp, xprefd, xprefz, xthreshdia, xthreshphy, &
          &                xthreshpic, xthreshpoc, xthreshzoo, xthresh, xkgraz, &
          &                epsher, ssigma, srespir, unassc, unassn, unassp
-
-      INTEGER :: ios                 ! Local integer output status for namelist read
-
+      !!----------------------------------------------------------------------
+      !
       REWIND( numnatp_ref )              ! Namelist nampiszoo in reference namelist : Pisces microzooplankton
       READ  ( numnatp_ref, namp5zzoo, IOSTAT = ios, ERR = 901)
 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zzoo in reference namelist', lwp )
-
+      !
       REWIND( numnatp_cfg )              ! Namelist nampiszoo in configuration namelist : Pisces microzooplankton
       READ  ( numnatp_cfg, namp5zzoo, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zzoo in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zzoo in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namp5zzoo )
-
+      !
       IF(lwp) THEN                         ! control print
          WRITE(numout,*) ' '
@@ -369,5 +368,5 @@
          WRITE(numout,*) '    Use of excess carbon for respiration            bmetexc     =', bmetexc
       ENDIF
-
+      !
    END SUBROUTINE p5z_micro_init
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmort.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmort.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmort.F90	(revision 9124)
@@ -74,5 +74,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p5z_nano')
+      IF( ln_timing )   CALL timing_start('p5z_nano')
       !
       prodcal(:,:,:) = 0.  !: calcite production variable set to zero
@@ -124,7 +124,8 @@
        ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p5z_nano')
+      IF( ln_timing )   CALL timing_stop('p5z_nano')
       !
    END SUBROUTINE p5z_nano
+
 
    SUBROUTINE p5z_pico
@@ -143,5 +144,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p5z_pico')
+      IF( ln_timing )   CALL timing_start('p5z_pico')
       !
       DO jk = 1, jpkm1
@@ -184,5 +185,5 @@
        ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p5z_pico')
+      IF( ln_timing )   CALL timing_stop('p5z_pico')
       !
    END SUBROUTINE p5z_pico
@@ -204,5 +205,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p5z_diat')
+      IF( ln_timing )   CALL timing_start('p5z_diat')
       !
 
@@ -262,10 +263,10 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p5z_diat')
+      IF( ln_timing )   CALL timing_stop('p5z_diat')
       !
    END SUBROUTINE p5z_diat
 
+
    SUBROUTINE p5z_mort_init
-
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE p5z_mort_init  ***
@@ -279,7 +280,8 @@
       !!
       !!----------------------------------------------------------------------
-
+      INTEGER :: ios                 ! Local integer output status for namelist read
+      !!
       NAMELIST/namp5zmort/ wchln, wchlp, wchld, wchldm, mpratn, mpratp, mpratd
-      INTEGER :: ios                 ! Local integer output status for namelist read
+      !!----------------------------------------------------------------------
 
       REWIND( numnatp_ref )              ! Namelist nampismort in reference namelist : Pisces phytoplankton
@@ -289,5 +291,5 @@
       REWIND( numnatp_cfg )              ! Namelist nampismort in configuration namelist : Pisces phytoplankton
       READ  ( numnatp_cfg, namp5zmort, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zmort in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zmort in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namp5zmort )
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zprod.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zprod.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zprod.F90	(revision 9124)
@@ -98,5 +98,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('p5z_prod')
+      IF( ln_timing )   CALL timing_start('p5z_prod')
       !
       !  Allocate temporary workspace
@@ -571,5 +571,5 @@
       CALL wrk_dealloc( jpi, jpj, jpk, zcroissp, zcroissn, zcroissd )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('p5z_prod')
+      IF( ln_timing )   CALL timing_stop('p5z_prod')
       !
    END SUBROUTINE p5z_prod
@@ -587,9 +587,8 @@
       !! ** input   :   Namelist nampisprod
       !!----------------------------------------------------------------------
-      !
+      INTEGER :: ios                 ! Local integer output status for namelist read
+      !!
       NAMELIST/namp5zprod/ pislopen, pislopep, pisloped, excretn, excretp, excretd,     &
          &                 thetannm, thetanpm, thetandm, chlcmin, grosip, bresp, xadap
-
-      INTEGER :: ios                 ! Local integer output status for namelist read
       !!----------------------------------------------------------------------
 
@@ -600,5 +599,5 @@
       REWIND( numnatp_cfg )              ! Namelist nampisprod in configuration namelist : Pisces phytoplankton production
       READ  ( numnatp_cfg, namp5zprod, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namp5zprod in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namp5zprod in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, namp5zprod )
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/par_sed.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/par_sed.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/par_sed.F90	(revision 9124)
@@ -7,6 +7,9 @@
    !!        !  06-12  (C. Ethe)  Orignal
    !!----------------------------------------------------------------------
-   !! $Id$
 #if defined key_sed
+   !!----------------------------------------------------------------------
+   !!   'key_sed'                                                  Sediment 
+   !!----------------------------------------------------------------------
+
    !! Domain characteristics
    USE par_kind
@@ -37,5 +40,4 @@
       jpwat = 7,         &   !: number of pore water component
       jpwatp1 = jpwat + 1
-
    
    ! pore water components       
@@ -61,3 +63,9 @@
       jpdia2dsed = 7
 #endif
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 4.0 , NEMO Consortium (2017)
+   !! $Id$ 
+   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !!======================================================================
 END MODULE par_sed
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sed.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sed.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sed.F90	(revision 9124)
@@ -4,7 +4,10 @@
    !! Sediment :   set sediment global variables
    !!======================================================================
-#if defined key_sed
    !! History :
    !!        !  06-12  (C. Ethe)  Orignal
+   !!----------------------------------------------------------------------
+#if defined key_sed
+   !!----------------------------------------------------------------------
+   !!   'key_sed'                                                  Sediment 
    !!----------------------------------------------------------------------
    USE par_sed
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedadv.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedadv.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/SED/sedadv.F90	(revision 9124)
@@ -1,9 +1,10 @@
 MODULE sedadv
-#if defined key_sed
    !!======================================================================
    !!              ***  MODULE  sedadv  ***
    !!    Sediment : vertical advection and burial
    !!=====================================================================
-   !! * Modules used
+#if defined key_sed
+   !!----------------------------------------------------------------------
+   !!   'key_sed'                                                  Sediment 
    !!----------------------------------------------------------------------
    !!   sed_adv :
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/par_pisces.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/par_pisces.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/par_pisces.F90	(revision 9124)
@@ -5,8 +5,4 @@
    !!======================================================================
    !! History :   2.0  !  2007-12  (C. Ethe, G. Madec)  revised architecture
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -68,4 +64,8 @@
    INTEGER, PUBLIC  ::   jp_pcs1  !: Last  index of PISCES tracers
 
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
+   !! $Id$ 
+   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!======================================================================
 END MODULE par_pisces
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90	(revision 9124)
@@ -137,5 +137,4 @@
 CONTAINS
 
-
    INTEGER FUNCTION sms_pisces_alloc()
       !!----------------------------------------------------------------------
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcice_pisces.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcice_pisces.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcice_pisces.F90	(revision 9124)
@@ -20,7 +20,11 @@
    PUBLIC   trc_ice_ini_pisces ! called by trcini.F90 module
 
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 4.0 , NEMO Consortium (2017)
+   !! $Id: trcsub.F90 9019 2017-12-13 14:58:53Z timgraham $ 
+   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
 
-
    SUBROUTINE trc_ice_ini_pisces
       !!----------------------------------------------------------------------
@@ -29,9 +33,9 @@
       !! ** Purpose :   Initialisation of the PISCES biochemical model
       !!----------------------------------------------------------------------
-
+      !
       IF( ln_p4z .OR. ln_p5z ) THEN  ;   CALL p4z_ice_ini   !  PISCES
       ELSE                           ;   CALL p2z_ice_ini   !  LOBSTER
       ENDIF
-
+      !
    END SUBROUTINE trc_ice_ini_pisces
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90	(revision 9124)
@@ -18,10 +18,8 @@
    USE iom             ! I/O manager
 
-
    IMPLICIT NONE
    PRIVATE
 
    PUBLIC   trc_nam_pisces   ! called by trcnam.F90 module
-
 
    !!----------------------------------------------------------------------
@@ -30,5 +28,4 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -42,5 +39,4 @@
       !!             namelist: natext, natbio, natsms
       !!----------------------------------------------------------------------
-      !!
       INTEGER :: jl, jn
       INTEGER :: ios, ioptio                 ! Local integer output status for namelist read
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90	(revision 9124)
@@ -23,13 +23,5 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
-
-      !!----------------------------------------------------------------------
-      !!                   ***  ROUTINE trc_ini_pisces ***
-      !!
-      !! ** Purpose :   Initialisation of the PISCES biochemical model
-      !!----------------------------------------------------------------------
-
 
    SUBROUTINE trc_sms_pisces( kt )
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90	(revision 9124)
@@ -50,5 +50,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_bbl')
+      IF( ln_timing )   CALL timing_start('trc_bbl')
       !
       IF( .NOT. l_offline .AND. nn_dttrc == 1 ) THEN
@@ -92,5 +92,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 ) CALL timing_stop('trc_bbl')
+      IF( ln_timing )   CALL timing_stop('trc_bbl')
       !
    END SUBROUTINE trc_bbl
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90	(revision 9124)
@@ -89,5 +89,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_dmp')
+      IF( ln_timing )   CALL timing_start('trc_dmp')
       !
       IF( l_trdtrc )   CALL wrk_alloc( jpi, jpj, jpk, ztrtrd )   ! temporary save of trends
@@ -161,5 +161,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_dmp')
+      IF( ln_timing )   CALL timing_stop('trc_dmp')
       !
    END SUBROUTINE trc_dmp
@@ -179,6 +179,4 @@
       NAMELIST/namtrc_dmp/ nn_zdmp_tr , cn_resto_tr
       !!----------------------------------------------------------------------
-      !
-      IF( nn_timing == 1 )  CALL timing_start('trc_dmp_ini')
       !
       REWIND( numnat_ref )              ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping
@@ -222,5 +220,4 @@
          !
       ENDIF
-      IF( nn_timing == 1 )  CALL timing_stop('trc_dmp_ini')
       !
    END SUBROUTINE trc_dmp_ini
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90	(revision 9124)
@@ -74,5 +74,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )   CALL timing_start('trc_ldf')
+      IF( ln_timing )   CALL timing_start('trc_ldf')
       !
       IF( l_trdtrc )  THEN
@@ -124,5 +124,5 @@
       CALL wrk_dealloc( jpi,jpj,jpk,   zahu, zahv )
       !
-      IF( nn_timing == 1 )   CALL timing_stop('trc_ldf')
+      IF( ln_timing )   CALL timing_stop('trc_ldf')
       !
    END SUBROUTINE trc_ldf
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90	(revision 9124)
@@ -86,5 +86,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_nxt')
+      IF( ln_timing )   CALL timing_start('trc_nxt')
       !
       IF( kt == nittrc000 .AND. lwp ) THEN
@@ -143,5 +143,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_nxt')
+      IF( ln_timing )   CALL timing_stop('trc_nxt')
       !
    END SUBROUTINE trc_nxt
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90	(revision 9124)
@@ -54,5 +54,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_rad')
+      IF( ln_timing )   CALL timing_start('trc_rad')
       !
       IF( kt == nittrc000 ) THEN
@@ -75,5 +75,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_rad')
+      IF( ln_timing )   CALL timing_stop('trc_rad')
       !
    END SUBROUTINE trc_rad
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 9124)
@@ -68,5 +68,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_sbc')
+      IF( ln_timing )   CALL timing_start('trc_sbc')
       !
       ! Allocate temporary workspace
@@ -182,5 +182,5 @@
       IF( l_trdtrc )  CALL wrk_dealloc( jpi,jpj,jpk,   ztrtrd )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_sbc')
+      IF( ln_timing )   CALL timing_stop('trc_sbc')
       !
    END SUBROUTINE trc_sbc
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90	(revision 9124)
@@ -56,5 +56,5 @@
       !! ---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )   CALL timing_start('trc_trp')
+      IF( ln_timing )   CALL timing_start('trc_trp')
       !
       IF( .NOT. lk_c1d ) THEN
@@ -91,5 +91,5 @@
       END IF
       !
-      IF( nn_timing == 1 )   CALL timing_stop('trc_trp')
+      IF( ln_timing )   CALL timing_stop('trc_trp')
       !
    END SUBROUTINE trc_trp
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90	(revision 9124)
@@ -50,5 +50,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_zdf')
+      IF( ln_timing )   CALL timing_start('trc_zdf')
       !
       IF( l_trdtrc )   ztrtrd(:,:,:,:)  = tra(:,:,:,:)
@@ -71,5 +71,5 @@
       END IF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_zdf')
+      IF( ln_timing )  CALL timing_stop('trc_zdf')
       !
    END SUBROUTINE trc_zdf
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcbc.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcbc.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcbc.F90	(revision 9124)
@@ -60,5 +60,4 @@
       !!              - allocates passive tracer BC data structure 
       !!----------------------------------------------------------------------
-      !
       INTEGER,INTENT(IN) :: ntrc                           ! number of tracers
       INTEGER            :: jl, jn , ib, ibd, ii, ij, ik   ! dummy loop indices
@@ -81,7 +80,5 @@
                         & cn_dir_cbc, sn_trccbc, rn_trcfac, ln_rnf_ctl, rn_bc_time
       NAMELIST/namtrc_bdy/ cn_trc_dflt, cn_trc, nn_trcdmp_bdy
-
       !!----------------------------------------------------------------------
-      IF( nn_timing == 1 )  CALL timing_start('trc_bc_ini')
       !
       IF( lwp ) THEN
@@ -332,5 +329,4 @@
       !
       DEALLOCATE( slf_i )          ! deallocate local field structure
-      IF( nn_timing == 1 )  CALL timing_stop('trc_bc_ini')
       !
    END SUBROUTINE trc_bc_ini
@@ -348,6 +344,5 @@
       !!----------------------------------------------------------------------
       USE fldread
-      
-      !! * Arguments
+      !!      
       INTEGER, INTENT( in ) ::   kt              ! ocean time-step index
       INTEGER, INTENT( in ), OPTIONAL ::   jit   ! subcycle time-step index (for timesplitting option)
@@ -357,5 +352,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_bc')
+      IF( ln_timing )   CALL timing_start('trc_bc')
 
       IF( kt == nit000 .AND. lwp) THEN
@@ -452,6 +447,5 @@
       END DO                                                     ! tracer loop
       !                                                          ! ===========
-      !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_bc')
+      IF( ln_timing )   CALL timing_stop('trc_bc')
       !
    END SUBROUTINE trc_bc
@@ -462,5 +456,4 @@
    !!----------------------------------------------------------------------
 CONTAINS
-
    SUBROUTINE trc_bc_ini( ntrc )        ! Empty routine
       INTEGER,INTENT(IN) :: ntrc                           ! number of tracers
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcbdy.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcbdy.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcbdy.F90	(revision 9124)
@@ -51,5 +51,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 ) CALL timing_start('trc_bdy')
+      IF( ln_timing )   CALL timing_start('trc_bdy')
       !
       igrd = 1 
@@ -76,7 +76,8 @@
       END DO
       !
-      IF( nn_timing == 1 ) CALL timing_stop('trc_bdy')
+      IF( ln_timing )   CALL timing_stop('trc_bdy')
 
    END SUBROUTINE trc_bdy
+
 
    SUBROUTINE trc_bdy_dmp( kt )
@@ -98,9 +99,9 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 ) CALL timing_start('trc_bdy_dmp')
+      IF( ln_timing )   CALL timing_start('trc_bdy_dmp')
       !
       DO jn = 1, jptra
          DO ib_bdy=1, nb_bdy
-            IF ( trcdta_bdy(jn, ib_bdy)%dmp ) THEN
+            IF( trcdta_bdy(jn, ib_bdy)%dmp ) THEN
                igrd = 1                       ! Everything is at T-points here
                DO ib = 1, idx_bdy(ib_bdy)%nblen(igrd)
@@ -114,8 +115,8 @@
                END DO
             ENDIF
-         ENDDO
-      ENDDO
+         END DO
+      END DO
       !
-      IF( nn_timing == 1 ) CALL timing_stop('trc_bdy_dmp')
+      IF( ln_timing )   CALL timing_stop('trc_bdy_dmp')
       !
    END SUBROUTINE trc_bdy_dmp
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcdta.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcdta.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcdta.F90	(revision 9124)
@@ -20,4 +20,5 @@
    USE oce_trc       !  shared variables between ocean and passive tracers
    USE trc           !  passive tracers common variables
+   !
    USE iom           !  I/O manager
    USE lib_mpp       !  MPP library
@@ -69,6 +70,4 @@
       NAMELIST/namtrc_dta/ sn_trcdta, cn_dir, rn_trfac 
       !!----------------------------------------------------------------------
-      !
-      IF( nn_timing == 1 )  CALL timing_start('trc_dta_ini')
       !
       IF( lwp ) THEN
@@ -154,5 +153,4 @@
       !
       DEALLOCATE( slf_i )          ! deallocate local field structure
-      IF( nn_timing == 1 )  CALL timing_stop('trc_dta_ini')
       !
    END SUBROUTINE trc_dta_ini
@@ -182,5 +180,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_dta')
+      IF( ln_timing )   CALL timing_start('trc_dta')
       !
       IF( nb_trcdta > 0 ) THEN
@@ -246,5 +244,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_dta')
+      IF( ln_timing )  CALL timing_stop('trc_dta')
       !
    END SUBROUTINE trc_dta
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcice.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcice.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcice.F90	(revision 9124)
@@ -12,5 +12,4 @@
    !!   trc_ice   :  Call the appropriate sea ice tracer subroutine
    !!----------------------------------------------------------------------
-
    USE oce_trc         ! shared variables between ocean and passive tracers
    USE trc             ! passive tracers common variables
@@ -24,6 +23,11 @@
    PRIVATE
    
-   PUBLIC   trc_ice_ini ! called by trc_nam
+   PUBLIC   trc_ice_ini   ! called by trc_nam
 
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 4.0 , NEMO Consortium (2011)
+   !! $Id: trcini.F90 9019 2017-12-13 14:58:53Z timgraham $ 
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
    
@@ -37,6 +41,5 @@
       !!            
       !!---------------------------------------------------------------------
-      ! --- Variable declarations --- !
-
+      !
       IF(lwp) THEN
          WRITE(numout,*)
@@ -44,12 +47,10 @@
          WRITE(numout,*) '~~~~~~~~~~~~~'
       ENDIF
-
-      IF( nn_timing == 1 )  CALL timing_start('trc_ice_ini')
       !
       CALL trc_nam_ice
       !
-      trc_i(:,:,:) = 0.0d0 ! by default
-      trc_o(:,:,:) = 0.0d0 ! by default
-
+      trc_i(:,:,:) = 0._wp   ! by default
+      trc_o(:,:,:) = 0._wp   ! by default
+      !
       IF ( nn_ice_tr == 1 ) THEN
          IF( ln_pisces  )    CALL trc_ice_ini_pisces       ! PISCES  bio-model
@@ -59,8 +60,7 @@
          IF( ln_my_trc  )    CALL trc_ice_ini_my_trc       ! MY_TRC  tracers
       ENDIF
-
-      IF( nn_timing == 1 )   CALL timing_stop('trc_ice_ini')
       !
    END SUBROUTINE trc_ice_ini
+
 
    SUBROUTINE trc_nam_ice
@@ -86,7 +86,4 @@
          WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
       ENDIF
-
-      IF( nn_timing == 1 )  CALL timing_start('trc_nam_ice')
-
       !
       REWIND( numnat_ref )              ! Namelist namtrc_ice in reference namelist : Passive tracer input data
@@ -110,6 +107,4 @@
          cn_trc_o      (jn) = sn_tri_tracer(jn)%ctrc_o
       END DO
-
-      IF( nn_timing == 1 )   CALL timing_stop('trc_nam_ice')
       !
    END SUBROUTINE trc_nam_ice
@@ -122,8 +117,6 @@
    SUBROUTINE trc_ice_ini                   ! Dummy routine   
    END SUBROUTINE trc_ice_ini
-
    SUBROUTINE trc_nam_ice
    END SUBROUTINE trc_nam_ice
-
 #endif
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 9124)
@@ -52,5 +52,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )   CALL timing_start('trc_init')
+      IF( ln_timing )   CALL timing_start('trc_init')
       !
       IF(lwp) WRITE(numout,*)
@@ -80,5 +80,5 @@
       CALL trc_ini_inv   ! Inventories
       !
-      IF( nn_timing == 1 )   CALL timing_stop('trc_init')
+      IF( ln_timing )   CALL timing_stop('trc_init')
       !
    END SUBROUTINE trc_init
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcsms.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcsms.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcsms.F90	(revision 9124)
@@ -47,5 +47,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )   CALL timing_start('trc_sms')
+      IF( ln_timing )   CALL timing_start('trc_sms')
       !
       IF( ln_pisces  )   CALL trc_sms_pisces ( kt )    ! main program of PISCES 
@@ -61,5 +61,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )   CALL timing_stop('trc_sms')
+      IF( ln_timing )   CALL timing_stop('trc_sms')
       !
    END SUBROUTINE trc_sms
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcstp.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcstp.F90	(revision 9124)
@@ -59,5 +59,5 @@
       !!-------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )   CALL timing_start('trc_stp')
+      IF( ln_timing )   CALL timing_start('trc_stp')
       !
       IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000
@@ -112,5 +112,5 @@
 9300  FORMAT(i10,D23.16)
       !
-      IF( nn_timing == 1 )   CALL timing_stop('trc_stp')
+      IF( ln_timing )   CALL timing_stop('trc_stp')
       !
    END SUBROUTINE trc_stp
@@ -136,4 +136,6 @@
       CHARACTER(len=2) ::   cl2   ! 2 characters
       !!----------------------------------------------------------------------
+      !
+      IF( ln_timing )   CALL timing_start('trc_mean_qsr')
       !
       IF( kt == nittrc000 ) THEN
@@ -227,4 +229,6 @@
       ENDIF
       !
+      IF( ln_timing )   CALL timing_stop('trc_mean_qsr')
+      !
    END SUBROUTINE trc_mean_qsr
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcsub.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 9124)
@@ -97,5 +97,5 @@
       !!-------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_sub_stp')
+      IF( ln_timing )   CALL timing_start('trc_sub_stp')
       !
       IF( kt == nit000 ) THEN
@@ -286,5 +286,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_sub_stp')
+      IF( ln_timing )   CALL timing_stop('trc_sub_stp')
       !
    END SUBROUTINE trc_sub_stp
@@ -302,6 +302,4 @@
       INTEGER ::   ierr
       !!-------------------------------------------------------------------
-      !
-      IF( nn_timing == 1 )  CALL timing_start('trc_sub_ini')
       !
       IF(lwp) WRITE(numout,*)
@@ -348,7 +346,6 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_sub_ini')
-      !
    END SUBROUTINE trc_sub_ini
+
 
    SUBROUTINE trc_sub_reset( kt )
@@ -365,5 +362,5 @@
       !!-------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_sub_reset')
+      IF( ln_timing )   CALL timing_start('trc_sub_reset')
       !
       !   restore physics variables
@@ -443,5 +440,5 @@
       !
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_sub_reset')
+      IF( ln_timing )   CALL timing_stop('trc_sub_reset')
       !
    END SUBROUTINE trc_sub_reset
@@ -473,5 +470,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_sub_ssh')
+      IF( ln_timing )   CALL timing_start('trc_sub_ssh')
       !
       ! Allocate temporary workspace
@@ -533,5 +530,5 @@
       CALL wrk_dealloc( jpi,jpj,   zhdiv )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_sub_ssh')
+      IF( ln_timing )   CALL timing_stop('trc_sub_ssh')
       !
    END SUBROUTINE trc_sub_ssh
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcwri.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcwri.F90	(revision 9119)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcwri.F90	(revision 9124)
@@ -44,5 +44,5 @@
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_wri')
+      IF( ln_timing )   CALL timing_start('trc_wri')
       !
       IF( l_offline .AND. kt == nittrc000 .AND. lwp ) THEN    ! WRITE root name in date.file for use by postpro
@@ -60,5 +60,5 @@
       IF( ln_my_trc  )   CALL trc_wri_my_trc     ! MY_TRC  tracers
       !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_wri')
+      IF( ln_timing )   CALL timing_stop('trc_wri')
       !
    END SUBROUTINE trc_wri
