Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 6864)
@@ -189,6 +189,7 @@
 /
 !-----------------------------------------------------------------------
-&nam_tide      !   tide parameters (#ifdef key_tide)
-!-----------------------------------------------------------------------
+&nam_tide      !   tide parameters
+!-----------------------------------------------------------------------
+   ln_tide     = .true.
    clname(1)     =   'Q1'   !  name of constituent
    clname(2)     =   'O1'
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm	(revision 6864)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_tide key_zdfgls key_diainstant key_mpp_mpi key_iomput
+ bld::tool::fppkeys key_zdfgls key_diainstant key_mpp_mpi key_iomput
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 6864)
@@ -611,6 +611,7 @@
 /
 !-----------------------------------------------------------------------
-&nam_tide      !   tide parameters                                      ("key_tide")
-!-----------------------------------------------------------------------
+&nam_tide      !   tide parameters
+!-----------------------------------------------------------------------
+   ln_tide     = .false.
    ln_tide_pot = .true.    !  use tidal potential forcing
    ln_tide_ramp= .false.   !
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 6864)
@@ -32,4 +32,5 @@
 #endif
    USE sbcapr
+   USE sbctide  , ONLY: ln_tide ! Tidal forcing or not
 
    IMPLICIT NONE
@@ -377,21 +378,21 @@
       END DO  ! ib_bdy
 
-#if defined key_tide
-      IF (ln_dynspg_ts) THEN      ! Fill temporary arrays with slow-varying bdy data                           
-         DO ib_bdy = 1, nb_bdy    ! Tidal component added in ts loop
-            IF ( nn_dyn2d_dta(ib_bdy) .ge. 2 ) THEN
-               nblen => idx_bdy(ib_bdy)%nblen
-               nblenrim => idx_bdy(ib_bdy)%nblenrim
-               IF( cn_dyn2d(ib_bdy) == 'frs' ) THEN; ilen1(:)=nblen(:) ; ELSE ; ilen1(:)=nblenrim(:) ; ENDIF 
-               IF ( dta_bdy(ib_bdy)%ll_ssh ) dta_bdy_s(ib_bdy)%ssh(1:ilen1(1)) = dta_bdy(ib_bdy)%ssh(1:ilen1(1))
-               IF ( dta_bdy(ib_bdy)%ll_u2d ) dta_bdy_s(ib_bdy)%u2d(1:ilen1(2)) = dta_bdy(ib_bdy)%u2d(1:ilen1(2))
-               IF ( dta_bdy(ib_bdy)%ll_v2d ) dta_bdy_s(ib_bdy)%v2d(1:ilen1(3)) = dta_bdy(ib_bdy)%v2d(1:ilen1(3))
-            ENDIF
-         END DO
-      ELSE ! Add tides if not split-explicit free surface else this is done in ts loop
-         !
-         CALL bdy_dta_tides( kt=kt, time_offset=time_offset )
+      IF ( ln_tide ) THEN
+         IF (ln_dynspg_ts) THEN      ! Fill temporary arrays with slow-varying bdy data                           
+            DO ib_bdy = 1, nb_bdy    ! Tidal component added in ts loop
+               IF ( nn_dyn2d_dta(ib_bdy) .ge. 2 ) THEN
+                  nblen => idx_bdy(ib_bdy)%nblen
+                  nblenrim => idx_bdy(ib_bdy)%nblenrim
+                  IF( cn_dyn2d(ib_bdy) == 'frs' ) THEN; ilen1(:)=nblen(:) ; ELSE ; ilen1(:)=nblenrim(:) ; ENDIF 
+                  IF ( dta_bdy(ib_bdy)%ll_ssh ) dta_bdy_s(ib_bdy)%ssh(1:ilen1(1)) = dta_bdy(ib_bdy)%ssh(1:ilen1(1))
+                  IF ( dta_bdy(ib_bdy)%ll_u2d ) dta_bdy_s(ib_bdy)%u2d(1:ilen1(2)) = dta_bdy(ib_bdy)%u2d(1:ilen1(2))
+                  IF ( dta_bdy(ib_bdy)%ll_v2d ) dta_bdy_s(ib_bdy)%v2d(1:ilen1(3)) = dta_bdy(ib_bdy)%v2d(1:ilen1(3))
+               ENDIF
+            END DO
+         ELSE ! Add tides if not split-explicit free surface else this is done in ts loop
+            !
+            CALL bdy_dta_tides( kt=kt, time_offset=time_offset )
+         ENDIF
       ENDIF
-#endif
 
       IF ( ln_apr_obc ) THEN
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 6864)
@@ -22,5 +22,5 @@
    USE bdydta         ! open boundary cond. setting   (bdy_dta_init routine)
    USE bdytides       ! open boundary cond. setting   (bdytide_init routine)
-   USE sbctide  , ONLY: lk_tide ! Tidal forcing or not
+   USE sbctide  , ONLY: ln_tide ! Tidal forcing or not
    USE phycst   , ONLY: rday
    !
@@ -105,5 +105,5 @@
          !
          ! Open boundaries initialisation of tidal harmonic forcing
-         IF( lk_tide ) CALL bdytide_init
+         IF( ln_tide ) CALL bdytide_init
          !
       ELSE
@@ -224,6 +224,6 @@
               CASE DEFAULT   ;   CALL ctl_stop( 'nn_dyn2d_dta must be between 0 and 3' )
            END SELECT
-           IF (( nn_dyn2d_dta(ib_bdy) .ge. 2 ).AND.(.NOT.lk_tide)) THEN
-             CALL ctl_stop( 'You must activate key_tide to add tidal forcing at open boundaries' )
+           IF (( nn_dyn2d_dta(ib_bdy) .ge. 2 ).AND.(.NOT.ln_tide)) THEN
+             CALL ctl_stop( 'You must activate with ln_tide to add tidal forcing at open boundaries' )
            ENDIF
         ENDIF
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 6864)
@@ -6,8 +6,7 @@
    !! History :  3.1  !  2007  (O. Le Galloudec, J. Chanut)  Original code
    !!----------------------------------------------------------------------
-#if defined key_diaharm && defined key_tide
+#if defined key_diaharm
    !!----------------------------------------------------------------------
    !!   'key_diaharm'
-   !!   'key_tide'
    !!----------------------------------------------------------------------
    USE oce             ! ocean dynamics and tracers variables
@@ -16,4 +15,5 @@
    USE daymod
    USE tide_mod
+   USE sbctide  , ONLY: ln_tide ! Tidal forcing or not
    !
    USE in_out_manager  ! I/O units
@@ -82,4 +82,6 @@
          WRITE(numout,*) '~~~~~~~ '
       ENDIF
+      !
+      IF( .NOT. ln_tyde )   CALL ctl_stop( 'dia_harm_init : ln_tyde must be true for harmonic analysis')
       !
       CALL tide_init_Wave
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 6864)
@@ -88,5 +88,5 @@
       !
       IF(      ln_apr_dyn                                                &   ! atmos. pressure
-         .OR.  ( .NOT.ln_dynspg_ts .AND. (ln_tide_pot .AND. lk_tide) )   &   ! tide potential (no time slitting)
+         .OR.  ( .NOT.ln_dynspg_ts .AND. (ln_tide_pot .AND. ln_tide) )   &   ! tide potential (no time slitting)
          .OR.  nn_ice_embd == 2  ) THEN                                      ! embedded sea-ice
          !
@@ -111,5 +111,5 @@
          !
          !                                    !==  tide potential forcing term  ==!
-         IF( .NOT.ln_dynspg_ts .AND. ( ln_tide_pot .AND. lk_tide )  ) THEN   ! N.B. added directly at sub-time-step in ts-case
+         IF( .NOT.ln_dynspg_ts .AND. ( ln_tide_pot .AND. ln_tide )  ) THEN   ! N.B. added directly at sub-time-step in ts-case
             !
             CALL upd_tide( kt )                      ! update tide potential
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 6864)
@@ -607,8 +607,6 @@
          !                                                !  ------------------
          ! Update only tidal forcing at open boundaries
-#if defined key_tide
-         IF( ln_bdy      .AND. lk_tide )   CALL bdy_dta_tides( kt, kit=jn, time_offset= noffset+1 )
-         IF( ln_tide_pot .AND. lk_tide )   CALL upd_tide     ( kt, kit=jn, time_offset= noffset   )
-#endif
+         IF( ln_bdy      .AND. ln_tide )   CALL bdy_dta_tides( kt, kit=jn, time_offset= noffset+1 )
+         IF( ln_tide_pot .AND. ln_tide )   CALL upd_tide     ( kt, kit=jn, time_offset= noffset   )
          !
          ! Set extrapolation coefficients for predictor step:
@@ -860,5 +858,5 @@
          !
          ! Add tidal astronomical forcing if defined
-         IF ( lk_tide.AND.ln_tide_pot ) THEN
+         IF ( ln_tide.AND.ln_tide_pot ) THEN
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 6864)
@@ -22,7 +22,6 @@
    REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) ::   pot_astro   !
 
-#if defined key_tide
    !!----------------------------------------------------------------------
-   !!   'key_tide' :                                        tidal potential
+   !!   tidal potential
    !!----------------------------------------------------------------------
    !!   sbc_tide            : 
@@ -30,5 +29,4 @@
    !!----------------------------------------------------------------------
 
-   LOGICAL, PUBLIC, PARAMETER ::   lk_tide  = .TRUE.
    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   amp_pot, phi_pot
 
@@ -125,16 +123,4 @@
    END SUBROUTINE tide_init_potential
 
-#else
-  !!----------------------------------------------------------------------
-  !!   Default case :   Empty module
-  !!----------------------------------------------------------------------
-  LOGICAL, PUBLIC, PARAMETER ::   lk_tide = .FALSE.
-CONTAINS
-  SUBROUTINE sbc_tide( kt )      ! Empty routine
-    INTEGER         , INTENT(in) ::   kt         ! ocean time-step
-    WRITE(*,*) 'sbc_tide: You should not have seen this print! error?', kt
-  END SUBROUTINE sbc_tide
-#endif
-
   !!======================================================================
 END MODULE sbctide
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 6864)
@@ -25,4 +25,5 @@
    REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:) ::   ftide        !:
 
+   LOGICAL , PUBLIC ::   ln_tide         !:
    LOGICAL , PUBLIC ::   ln_tide_pot     !:
    LOGICAL , PUBLIC ::   ln_tide_ramp    !:
@@ -48,14 +49,6 @@
       INTEGER  ::   ios                 ! Local integer output status for namelist read
       !
-      NAMELIST/nam_tide/ln_tide_pot, ln_tide_ramp, rdttideramp, clname
+      NAMELIST/nam_tide/ln_tide, ln_tide_pot, ln_tide_ramp, rdttideramp, clname
       !!----------------------------------------------------------------------
-      !
-      IF(lwp) THEN
-         WRITE(numout,*)
-         WRITE(numout,*) 'tide_init : Initialization of the tidal components'
-         WRITE(numout,*) '~~~~~~~~~ '
-      ENDIF
-      !
-      CALL tide_init_Wave
       !
       ! Read Namelist nam_tide
@@ -69,4 +62,25 @@
       IF(lwm) WRITE ( numond, nam_tide )
       !
+      IF (ln_tide) THEN
+         IF (lwp) THEN
+            WRITE(numout,*)
+            WRITE(numout,*) 'tide_init : Initialization of the tidal components'
+            WRITE(numout,*) '~~~~~~~~~ '
+            WRITE(numout,*) '   Namelist nam_tide'
+            WRITE(numout,*) '              Use tidal components : ln_tide      = ', ln_tide
+            WRITE(numout,*) '      Apply astronomical potential : ln_tide_pot  = ', ln_tide_pot
+            WRITE(numout,*) '                                     nb_harmo     = ', nb_harmo
+            WRITE(numout,*) '                                     ln_tide_ramp = ', ln_tide_ramp
+            WRITE(numout,*) '                                     rdttideramp  = ', rdttideramp
+         ENDIF
+      ELSE
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tide_init : tidal components not used (ln_tide = F)'
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~ '
+         RETURN
+      ENDIF
+      !
+      CALL tide_init_Wave
+      !
       nb_harmo=0
       DO jk = 1, jpmax_harmo
@@ -79,11 +93,4 @@
       IF( nb_harmo == 0 )   CALL ctl_stop( 'tide_init : No tidal components set in nam_tide' )
       !
-      IF(lwp) THEN
-         WRITE(numout,*) '   Namelist nam_tide'
-         WRITE(numout,*) '      Apply astronomical potential : ln_tide_pot  =', ln_tide_pot
-         WRITE(numout,*) '                                     nb_harmo     = ', nb_harmo
-         WRITE(numout,*) '                                     ln_tide_ramp = ', ln_tide_ramp 
-         WRITE(numout,*) '                                     rdttideramp  = ', rdttideramp
-      ENDIF
       IF( ln_tide_ramp.AND.((nitend-nit000+1)*rdt/rday < rdttideramp) )   &
          &   CALL ctl_stop('rdttideramp must be lower than run duration')
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90	(revision 6864)
@@ -5,8 +5,4 @@
    !!======================================================================
    !! History :  9.0  !  07  (O. Le Galloudec)  Original code
-   !!----------------------------------------------------------------------
-#if defined key_tide
-   !!----------------------------------------------------------------------
-   !!   'key_tide' :                                        tidal potential
    !!----------------------------------------------------------------------
    !!   upd_tide       : update tidal potential
@@ -81,18 +77,4 @@
    END SUBROUTINE upd_tide
 
-#else
-  !!----------------------------------------------------------------------
-  !!   Dummy module :                                        NO TIDE
-  !!----------------------------------------------------------------------
-CONTAINS
-  SUBROUTINE upd_tide( kt, kit, time_offset )  ! Empty routine
-    INTEGER, INTENT(in)           ::   kt      !  integer  arg, dummy routine
-    INTEGER, INTENT(in), OPTIONAL ::   kit     !  optional arg, dummy routine
-    INTEGER, INTENT(in), OPTIONAL ::   time_offset !  optional arg, dummy routine
-    WRITE(*,*) 'upd_tide: You should not have seen this print! error?', kt
-  END SUBROUTINE upd_tide
-
-#endif
-
   !!======================================================================
 
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 6864)
@@ -52,7 +52,6 @@
 #endif
    USE tideini        ! tidal components initialization   (tide_ini routine)
-   USE bdy_oce   , ONLY: ln_bdy
+   USE bdy_oce,   ONLY: ln_bdy
    USE bdyini         ! open boundary cond. setting       (bdy_init routine)
-   USE sbctide, ONLY  : lk_tide
    USE istate         ! initial state setting          (istate_init routine)
    USE ldfdyn         ! lateral viscosity setting      (ldfdyn_init routine)
@@ -432,5 +431,5 @@
       !                                      ! external forcing 
 !!gm to be added : creation and call of sbc_apr_init
-      IF( lk_tide       )   CALL    tide_init   ! tidal harmonics
+                            CALL    tide_init   ! tidal harmonics
                             CALL     sbc_init   ! surface boundary conditions (including sea-ice)
                             CALL     bdy_init   ! Open boundaries initialisation
Index: branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 6863)
+++ branches/2016/dev_r6522_SIMPLIF_3/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 6864)
@@ -104,5 +104,5 @@
       ! Update external forcing (tides, open boundaries, and surface boundary condition (including sea-ice)
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      IF( lk_tide    )   CALL sbc_tide( kstp )                   ! update tide potential
+      IF( ln_tide    )   CALL sbc_tide( kstp )                   ! update tide potential
       IF( ln_apr_dyn )   CALL sbc_apr ( kstp )                   ! atmospheric pressure (NB: call before bdy_dta which needs ssh_ib) 
       IF( ln_bdy     )   CALL bdy_dta ( kstp, time_offset=+1 )   ! update dynamic & tracer data at open boundaries
