Index: NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcadv.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcadv.F90	(revision 11207)
+++ NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcadv.F90	(revision 12149)
@@ -166,8 +166,8 @@
       REWIND( numnat_ref )                   !  namtrc_adv in reference namelist 
       READ  ( numnat_ref, namtrc_adv, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_adv in reference namelist', lwp )
+901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_adv in reference namelist' )
       REWIND( numnat_cfg )                   ! namtrc_adv in configuration namelist
       READ  ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 )
-902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist', lwp )
+902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist' )
       IF(lwm) WRITE ( numont, namtrc_adv )
       !
Index: NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcdmp.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcdmp.F90	(revision 11207)
+++ NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcdmp.F90	(revision 12149)
@@ -183,8 +183,8 @@
       REWIND( numnat_ref )              ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping
       READ  ( numnat_ref, namtrc_dmp, IOSTAT = ios, ERR = 909)
-909   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_dmp in reference namelist', lwp )
+909   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_dmp in reference namelist' )
       REWIND( numnat_cfg )              ! Namelist namtrc_dmp in configuration namelist : Passive tracers newtonian damping
       READ  ( numnat_cfg, namtrc_dmp, IOSTAT = ios, ERR = 910)
-910   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist', lwp )
+910   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist' )
       IF(lwm) WRITE ( numont, namtrc_dmp )
 
Index: NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcldf.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcldf.F90	(revision 11207)
+++ NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcldf.F90	(revision 12149)
@@ -145,9 +145,9 @@
       REWIND( numnat_ref )             !  namtrc_ldf in reference namelist 
       READ  ( numnat_ref, namtrc_ldf, IOSTAT = ios, ERR = 903)
-903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist', lwp )
+903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist' )
       !
       REWIND( numnat_cfg )             !  namtrc_ldf in configuration namelist 
       READ  ( numnat_cfg, namtrc_ldf, IOSTAT = ios, ERR = 904 )
-904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist', lwp )
+904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist' )
       IF(lwm) WRITE ( numont, namtrc_ldf )
       !
Index: NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcnxt.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcnxt.F90	(revision 11207)
+++ NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcnxt.F90	(revision 12149)
@@ -139,5 +139,14 @@
       ENDIF
       !                                ! Leap-Frog + Asselin filter time stepping
-      IF( (neuler == 0 .AND. kt == nittrc000) .OR. ln_top_euler ) THEN    ! Euler time-stepping (only swap)
+      IF( (neuler == 0 .AND. kt == nittrc000) ) THEN
+         ! set up for leapfrog on second timestep
+         DO jn = 1, jptra
+            DO jk = 1, jpkm1
+               trb(:,:,jk,jn) = trn(:,:,jk,jn)  
+               trn(:,:,jk,jn) = tra(:,:,jk,jn)
+            END DO
+         END DO
+      ELSE IF( ln_top_euler ) THEN
+         ! always doing euler timestepping
          DO jn = 1, jptra
             DO jk = 1, jpkm1
@@ -146,4 +155,6 @@
             END DO
          END DO
+      ENDIF
+      IF( (neuler == 0 .AND. kt == nittrc000) .OR. ln_top_euler ) THEN    ! Euler time-stepping (only swap)
          IF (l_trdtrc .AND. .NOT. ln_linssh ) THEN   ! Zero Asselin filter contribution must be explicitly written out since for vvl
             !                                        ! Asselin filter is output by tra_nxt_vvl that is not called on this time step
Index: NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcrad.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcrad.F90	(revision 11207)
+++ NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcrad.F90	(revision 12149)
@@ -89,8 +89,8 @@
       REWIND( numnat_ref )              ! namtrc_rad in reference namelist 
       READ  ( numnat_ref, namtrc_rad, IOSTAT = ios, ERR = 907)
-907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_rad in reference namelist', lwp )
+907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_rad in reference namelist' )
       REWIND( numnat_cfg )              ! namtrc_rad in configuration namelist 
       READ  ( numnat_cfg, namtrc_rad, IOSTAT = ios, ERR = 908 )
-908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist', lwp )
+908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist' )
       IF(lwm) WRITE( numont, namtrc_rad )
 
Index: NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcsink.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcsink.F90	(revision 11207)
+++ NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trcsink.F90	(revision 12149)
@@ -87,7 +87,10 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               IF( tmask(ji,jj,jk) == 1 ) THEN
+               IF( tmask(ji,jj,jk) == 1.0 ) THEN
                  zwsmax = 0.5 * e3t_n(ji,jj,jk) * rday / rsfact
                  zwsink(ji,jj,jk) = MIN( pwsink(ji,jj,jk), zwsmax * REAL( iiter(ji,jj), wp ) )
+               ELSE
+                 ! provide a default value so there is no use of undefinite value in trc_sink2 for zwsink2 initialization
+                 zwsink(ji,jj,jk) = 0.
                ENDIF
             END DO
@@ -215,8 +218,8 @@
       REWIND( numnat_ref )              ! namtrc_rad in reference namelist 
       READ  ( numnat_ref, namtrc_snk, IOSTAT = ios, ERR = 907)
-907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_snk in reference namelist', lwp )
+907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_snk in reference namelist' )
       REWIND( numnat_cfg )              ! namtrc_rad in configuration namelist 
       READ  ( numnat_cfg, namtrc_snk, IOSTAT = ios, ERR = 908 )
-908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_snk in configuration namelist', lwp )
+908   IF( ios > 0 )   CALL ctl_nam ( ios , 'namtrc_snk in configuration namelist' )
       IF(lwm) WRITE( numont, namtrc_snk )
 
Index: NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trdmxl_trc.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trdmxl_trc.F90	(revision 11207)
+++ NEMO/branches/2019/ENHANCE-03_closea/src/TOP/TRP/trdmxl_trc.F90	(revision 12149)
@@ -108,5 +108,5 @@
          ! ... Set nmld(ji,jj) = index of first T point below control surf. or outside mixed-layer
          SELECT CASE ( nn_ctls_trc )                                ! choice of the control surface
-            CASE ( -2  )   ;   STOP 'trdmxl_trc : not ready '     !     -> isopycnal surface (see ???)
+            CASE ( -2  )   ;   CALL ctl_stop( 'STOP', 'trdmxl_trc : not ready ' )     !     -> isopycnal surface (see ???)
             CASE ( -1  )   ;   nmld_trc(:,:) = neln(:,:)          !     -> euphotic layer with light criterion
             CASE (  0  )   ;   nmld_trc(:,:) = nmln(:,:)          !     -> ML with density criterion (see zdfmxl)
@@ -431,5 +431,5 @@
 
 #if defined key_diainstant
-               STOP 'tmltrd_trc : key_diainstant was never checked within trdmxl. Comment this to proceed.'
+               CALL ctl_stop( 'STOP', 'tmltrd_trc : key_diainstant was never checked within trdmxl. Comment this to proceed.' )
 #endif
             ENDIF
@@ -857,5 +857,5 @@
 #  if defined key_diainstant
       IF( .NOT. ln_trdmxl_trc_instant ) THEN
-         STOP 'trd_mxl_trc : this was never checked. Comment this line to proceed...'
+         CALL ctl_stop( 'STOP', 'trd_mxl_trc : this was never checked. Comment this line to proceed...' )
       ENDIF
       zsto = nn_trd_trc * rdt
@@ -928,5 +928,5 @@
       !-- Define miscellaneous passive tracer mixed-layer variables 
       IF( jpltrd_trc /= jpmxl_trc_atf .OR.  jpltrd_trc - 1 /= jpmxl_trc_radb ) THEN
-         STOP 'Error : jpltrd_trc /= jpmxl_trc_atf .OR.  jpltrd_trc - 1 /= jpmxl_trc_radb'  ! see below
+         CALL ctl_stop( 'STOP', 'Error : jpltrd_trc /= jpmxl_trc_atf .OR.  jpltrd_trc - 1 /= jpmxl_trc_radb' ) ! see below
       ENDIF
 
