Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 5839)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 5845)
@@ -288,4 +288,5 @@
    END SUBROUTINE bdytide_init
 
+
    SUBROUTINE bdytide_update ( kt, idx, dta, td, jit, time_offset )
       !!----------------------------------------------------------------------
@@ -295,19 +296,19 @@
       !!                
       !!----------------------------------------------------------------------
-      INTEGER, INTENT( in )            ::   kt          ! Main timestep counter
-      TYPE(OBC_INDEX), INTENT( in )    ::   idx         ! OBC indices
-      TYPE(OBC_DATA),  INTENT(inout)   ::   dta         ! OBC external data
-      TYPE(TIDES_DATA),INTENT( inout ) ::   td          ! tidal harmonics data
-      INTEGER,INTENT(in),OPTIONAL      ::   jit         ! Barotropic timestep counter (for timesplitting option)
-      INTEGER,INTENT( in ), OPTIONAL   ::   time_offset ! time offset in units of timesteps. NB. if jit
-                                                        ! is present then units = subcycle timesteps.
-                                                        ! time_offset = 0  => get data at "now"    time level
-                                                        ! time_offset = -1 => get data at "before" time level
-                                                        ! time_offset = +1 => get data at "after"  time level
-                                                        ! etc.
-      !!
-      INTEGER, DIMENSION(3)            ::   ilen0       !: length of boundary data (from OBC arrays)
+      INTEGER          , INTENT(in   ) ::   kt          ! Main timestep counter
+      TYPE(OBC_INDEX)  , INTENT(in   ) ::   idx         ! OBC indices
+      TYPE(OBC_DATA)   , INTENT(inout) ::   dta         ! OBC external data
+      TYPE(TIDES_DATA) , INTENT(inout) ::   td          ! tidal harmonics data
+      INTEGER, OPTIONAL, INTENT(in   ) ::   jit         ! Barotropic timestep counter (for timesplitting option)
+      INTEGER, OPTIONAL, INTENT(in   ) ::   time_offset ! time offset in units of timesteps. NB. if jit
+      !                                                 ! is present then units = subcycle timesteps.
+      !                                                 ! time_offset = 0  => get data at "now"    time level
+      !                                                 ! time_offset = -1 => get data at "before" time level
+      !                                                 ! time_offset = +1 => get data at "after"  time level
+      !                                                 ! etc.
+      !
       INTEGER                          :: itide, igrd, ib   ! dummy loop indices
       INTEGER                          :: time_add          ! time offset in units of timesteps
+      INTEGER, DIMENSION(3)            ::   ilen0       !: length of boundary data (from OBC arrays)
       REAL(wp)                         :: z_arg, z_sarg, zflag, zramp      
       REAL(wp), DIMENSION(jpmax_harmo) :: z_sist, z_cost
@@ -380,4 +381,5 @@
    END SUBROUTINE bdytide_update
 
+
    SUBROUTINE bdy_dta_tides( kt, kit, time_offset )
       !!----------------------------------------------------------------------
@@ -387,18 +389,18 @@
       !!                
       !!----------------------------------------------------------------------
-      INTEGER, INTENT( in )            ::   kt          ! Main timestep counter
-      INTEGER, INTENT( in ),OPTIONAL   ::   kit         ! Barotropic timestep counter (for timesplitting option)
-      INTEGER, INTENT( in ),OPTIONAL   ::   time_offset ! time offset in units of timesteps. NB. if kit
-                                                        ! is present then units = subcycle timesteps.
-                                                        ! time_offset = 0  => get data at "now"    time level
-                                                        ! time_offset = -1 => get data at "before" time level
-                                                        ! time_offset = +1 => get data at "after"  time level
-                                                        ! etc.
-      !!
-      LOGICAL  :: lk_first_btstp  ! =.TRUE. if time splitting and first barotropic step
-      INTEGER,          DIMENSION(jpbgrd) :: ilen0 
+      INTEGER,           INTENT(in) ::   kt          ! Main timestep counter
+      INTEGER, OPTIONAL, INTENT(in) ::   kit         ! Barotropic timestep counter (for timesplitting option)
+      INTEGER, OPTIONAL, INTENT(in) ::   time_offset ! time offset in units of timesteps. NB. if kit
+      !                                              ! is present then units = subcycle timesteps.
+      !                                              ! time_offset = 0  => get data at "now"    time level
+      !                                              ! time_offset = -1 => get data at "before" time level
+      !                                              ! time_offset = +1 => get data at "after"  time level
+      !                                              ! etc.
+      !
+      LOGICAL  :: lk_first_btstp            ! =.TRUE. if time splitting and first barotropic step
+      INTEGER  :: itide, ib_bdy, ib, igrd   ! loop indices
+      INTEGER  :: time_add                  ! time offset in units of timesteps
+      INTEGER, DIMENSION(jpbgrd) :: ilen0 
       INTEGER, DIMENSION(1:jpbgrd) :: nblen, nblenrim  ! short cuts
-      INTEGER  :: itide, ib_bdy, ib, igrd                     ! loop indices
-      INTEGER  :: time_add                                    ! time offset in units of timesteps
       REAL(wp) :: z_arg, z_sarg, zramp, zoff, z_cost, z_sist      
       !!----------------------------------------------------------------------
@@ -511,14 +513,16 @@
    END SUBROUTINE bdy_dta_tides
 
+
    SUBROUTINE tide_init_elevation( idx, td )
       !!----------------------------------------------------------------------
       !!                 ***  ROUTINE tide_init_elevation  ***
       !!----------------------------------------------------------------------
-      TYPE(OBC_INDEX), INTENT( in )      ::   idx     ! OBC indices
-      TYPE(TIDES_DATA),INTENT( inout )   ::   td      ! tidal harmonics data
-      !! * Local declarations
-      INTEGER, DIMENSION(1)            ::   ilen0       !: length of boundary data (from OBC arrays)
+      TYPE(OBC_INDEX) , INTENT(in   ) ::   idx   ! OBC indices
+      TYPE(TIDES_DATA), INTENT(inout) ::   td    ! tidal harmonics data
+      !
+      INTEGER ::   itide, igrd, ib       ! dummy loop indices
+      INTEGER, DIMENSION(1) ::   ilen0   ! length of boundary data (from OBC arrays)
       REAL(wp),ALLOCATABLE, DIMENSION(:) ::   mod_tide, phi_tide
-      INTEGER                            ::   itide, igrd, ib      ! dummy loop indices
+      !!----------------------------------------------------------------------
 
       igrd=1   
@@ -544,18 +548,20 @@
       END DO
 
-      DEALLOCATE(mod_tide,phi_tide)
-
+      DEALLOCATE( mod_tide, phi_tide )
+      !
    END SUBROUTINE tide_init_elevation
 
+
    SUBROUTINE tide_init_velocities( idx, td )
       !!----------------------------------------------------------------------
       !!                 ***  ROUTINE tide_init_elevation  ***
       !!----------------------------------------------------------------------
-      TYPE(OBC_INDEX), INTENT( in )      ::   idx     ! OBC indices
-      TYPE(TIDES_DATA),INTENT( inout )      ::   td      ! tidal harmonics data
-      !! * Local declarations
-      INTEGER, DIMENSION(3)            ::   ilen0       !: length of boundary data (from OBC arrays)
+      TYPE(OBC_INDEX) , INTENT(in   ) ::   idx   ! OBC indices
+      TYPE(TIDES_DATA), INTENT(inout) ::   td    ! tidal harmonics data
+      !
+      INTEGER ::   itide, igrd, ib       ! dummy loop indices
+      INTEGER, DIMENSION(3) ::   ilen0   ! length of boundary data (from OBC arrays)
       REAL(wp),ALLOCATABLE, DIMENSION(:) ::   mod_tide, phi_tide
-      INTEGER                            ::   itide, igrd, ib      ! dummy loop indices
+      !!----------------------------------------------------------------------
 
       ilen0(2) =  SIZE(td%u0(:,1,1))
@@ -564,5 +570,5 @@
       igrd=2                                 ! U grid.
 
-      ALLOCATE(mod_tide(ilen0(igrd)),phi_tide(ilen0(igrd)))
+      ALLOCATE( mod_tide(ilen0(igrd)) , phi_tide(ilen0(igrd)) )
 
       DO itide = 1, nb_harmo
@@ -581,9 +587,9 @@
       END DO
 
-      DEALLOCATE(mod_tide,phi_tide)
+      DEALLOCATE( mod_tide , phi_tide )
 
       igrd=3                                 ! V grid.
 
-      ALLOCATE(mod_tide(ilen0(igrd)),phi_tide(ilen0(igrd)))
+      ALLOCATE( mod_tide(ilen0(igrd)) , phi_tide(ilen0(igrd)) )
 
       DO itide = 1, nb_harmo
@@ -601,8 +607,9 @@
          ENDDO
       END DO
-
+      !
       DEALLOCATE(mod_tide,phi_tide)
-
+      !
   END SUBROUTINE tide_init_velocities
+
 #else
    !!----------------------------------------------------------------------
