Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 3122)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 3182)
@@ -19,4 +19,6 @@
    !!    bdy_dta_init   : initialise arrays etc for reading of external data
    !!----------------------------------------------------------------------
+   USE wrk_nemo_2      ! Memory Allocation
+   USE timing          ! Timing
    USE oce             ! ocean dynamics and tracers
    USE dom_oce         ! ocean space and time domain
@@ -64,6 +66,4 @@
       !!                
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY: wrk_2d_22, wrk_2d_23   ! 2D workspace
       !!
       INTEGER, INTENT( in )           ::   kt    ! ocean time-step index 
@@ -81,8 +81,6 @@
       !!
       !!---------------------------------------------------------------------------
-
-      IF(wrk_in_use(2, 22,23) ) THEN
-         CALL ctl_stop('bdy_dta: ERROR: requested workspace arrays are unavailable.')   ;   RETURN
-      END IF
+      !!
+      IF( nn_timing == 1 ) CALL timing_start('bdy_dta')
 
       ! Initialise data arrays once for all from initial conditions where required
@@ -92,6 +90,5 @@
          ! Calculate depth-mean currents
          !-----------------------------
-         pu2d => wrk_2d_22
-         pv2d => wrk_2d_23
+         CALL wrk_alloc(jpi,jpj,pu2d,pv2d) 
 
          pu2d(:,:) = 0.e0
@@ -196,4 +193,6 @@
 
          ENDDO ! ib_bdy
+
+         CALL wrk_dealloc(jpi,jpj,pu2d,pv2d) 
 
       ENDIF ! kt .eq. nit000
@@ -281,5 +280,5 @@
       END DO  ! ib_bdy
 
-      IF(wrk_not_released(2, 22,23) )    CALL ctl_stop('bdy_dta: ERROR: failed to release workspace arrays.')
+      IF( nn_timing == 1 ) CALL timing_stop('bdy_dta')
 
       END SUBROUTINE bdy_dta
@@ -322,4 +321,6 @@
       NAMELIST/nambdy_dta/ ln_full_vel
       !!---------------------------------------------------------------------------
+
+      IF( nn_timing == 1 ) CALL timing_start('bdy_dta_init')
 
       ! Set nn_dta
@@ -671,4 +672,6 @@
       ENDDO ! ib_bdy 
 
+      IF( nn_timing == 1 ) CALL timing_stop('bdy_dta_init')
+
       END SUBROUTINE bdy_dta_init
 
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 3122)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 3182)
@@ -18,4 +18,6 @@
    !!   bdy_dyn3d_frs    : apply Flow Relaxation Scheme
    !!----------------------------------------------------------------------
+   USE wrk_nemo_2      ! Memory Allocation
+   USE timing          ! Timing
    USE oce             ! ocean dynamics and tracers 
    USE dom_oce         ! ocean space and time domain
@@ -48,6 +50,4 @@
       !!
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY: wrk_2d_7, wrk_2d_8      ! 2D workspace
       !!
       INTEGER, INTENT( in )           :: kt               ! Main time step counter
@@ -58,7 +58,5 @@
       !!
 
-      IF(wrk_in_use(2, 7,8) ) THEN
-         CALL ctl_stop('bdy_dyn: ERROR: requested workspace arrays are unavailable.')   ;   RETURN
-      END IF
+      IF( nn_timing == 1 ) CALL timing_start('bdy_dyn')
 
       ll_dyn2d = .true.
@@ -76,6 +74,5 @@
       phur => hur
       phvr => hvr
-      pu2d => wrk_2d_7
-      pv2d => wrk_2d_8
+      CALL wrk_alloc(jpi,jpj,pu2d,pv2d) 
 
       !-------------------------------------------------------
@@ -114,5 +111,7 @@
       END DO
 
-      IF(wrk_not_released(2, 7,8) )    CALL ctl_stop('bdy_dyn: ERROR: failed to release workspace arrays.')
+      CALL wrk_dealloc(jpi,jpj,pu2d,pv2d) 
+
+      IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn')
 
    END SUBROUTINE bdy_dyn
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90	(revision 3122)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90	(revision 3182)
@@ -18,4 +18,5 @@
    !!   bdy_dyn2d_fla    : Apply Flather condition
    !!----------------------------------------------------------------------
+   USE timing          ! Timing
    USE oce             ! ocean dynamics and tracers 
    USE dom_oce         ! ocean space and time domain
@@ -84,4 +85,5 @@
       !!----------------------------------------------------------------------
       !
+      IF( nn_timing == 1 ) CALL timing_start('bdy_dyn2d_frs')
       !
       igrd = 2                      ! Relaxation of zonal velocity
@@ -103,4 +105,6 @@
       CALL lbc_lnk( pv2d, 'V', -1. )   ! Boundary points should be updated
       !
+      IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn2d_frs')
+      !
 
    END SUBROUTINE bdy_dyn2d_frs
@@ -134,4 +138,6 @@
       REAL(wp) ::   zforc                            ! temporary scalar
       !!----------------------------------------------------------------------
+
+      IF( nn_timing == 1 ) CALL timing_start('bdy_dyn2d_fla')
 
       ! ---------------------------------!
@@ -179,4 +185,5 @@
       CALL lbc_lnk( pv2d, 'V', -1. )   !
       !
+      IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn2d_fla')
       !
    END SUBROUTINE bdy_dyn2d_fla
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn3d.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn3d.F90	(revision 3122)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn3d.F90	(revision 3182)
@@ -1,5 +1,5 @@
 MODULE bdydyn3d
    !!======================================================================
-   !!                       ***  MODULE  bdydyn  ***
+   !!                       ***  MODULE  bdydyn3d  ***
    !! Unstructured Open Boundary Cond. :   Flow relaxation scheme on velocities
    !!======================================================================
@@ -18,4 +18,5 @@
    !!   bdy_dyn3d_frs    : apply Flow Relaxation Scheme
    !!----------------------------------------------------------------------
+   USE timing          ! Timing
    USE oce             ! ocean dynamics and tracers 
    USE dom_oce         ! ocean space and time domain
@@ -86,4 +87,5 @@
       !!----------------------------------------------------------------------
       !
+      IF( nn_timing == 1 ) CALL timing_start('bdy_dyn3d_frs')
       !
       igrd = 2                      ! Relaxation of zonal velocity
@@ -110,4 +112,6 @@
       IF( kt .eq. nit000 ) CLOSE( unit = 102 )
 
+      IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn3d_frs')
+
    END SUBROUTINE bdy_dyn3d_frs
 
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim2.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim2.F90	(revision 3122)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim2.F90	(revision 3182)
@@ -14,4 +14,5 @@
    !!   bdy_ice_frs        : Application of Flow Relaxation Scheme
    !!----------------------------------------------------------------------
+   USE timing          ! Timing
    USE oce             ! ocean dynamics and tracers variables
    USE ice_2           ! LIM_2 ice variables
@@ -77,4 +78,6 @@
       !!------------------------------------------------------------------------------
       !
+      IF( nn_timing == 1 ) CALL timing_start('bdy_ice_frs')
+      !
       jgrd = 1      ! Everything is at T-points here
       !
@@ -93,4 +96,6 @@
       CALL lbc_lnk( hicif, 'T', 1. )   ;   CALL lbc_lnk( hsnif, 'T', 1. )
       !      
+      IF( nn_timing == 1 ) CALL timing_stop('bdy_ice_frs')
+      !
    END SUBROUTINE bdy_ice_frs
 #else
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 3122)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 3182)
@@ -19,4 +19,5 @@
    !!   bdy_init       : Initialization of unstructured open boundaries
    !!----------------------------------------------------------------------
+   USE timing          ! Timing
    USE oce             ! ocean dynamics and tracers variables
    USE dom_oce         ! ocean space and time domain
@@ -94,4 +95,6 @@
       !!----------------------------------------------------------------------
 
+      IF( nn_timing == 1 ) CALL timing_start('bdy_init')
+
       IF( bdy_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'bdy_init : unable to allocate oce arrays' )
 
@@ -806,4 +809,6 @@
       DEALLOCATE(nbidta, nbjdta, nbrdta)
 
+      IF( nn_timing == 1 ) CALL timing_stop('bdy_init')
+
    END SUBROUTINE bdy_init
 
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 3122)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 3182)
@@ -23,4 +23,5 @@
    !!      vset          :/
    !!----------------------------------------------------------------------
+   USE timing          ! Timing
    USE oce             ! ocean dynamics and tracers 
    USE dom_oce         ! ocean space and time domain
@@ -87,4 +88,6 @@
       NAMELIST/nambdy_tide/ln_tide_date, filtide, tide_cpt, tide_speed
       !!----------------------------------------------------------------------
+
+      IF( nn_timing == 1 ) CALL timing_start('tide_init')
 
       IF(lwp) WRITE(numout,*)
@@ -264,4 +267,6 @@
       END DO ! loop on ib_bdy
 
+      IF( nn_timing == 1 ) CALL timing_stop('tide_init')
+
    END SUBROUTINE tide_init
 
@@ -292,4 +297,6 @@
       REAL(wp), DIMENSION(jptides_max) :: z_sist, z_cost
       !!----------------------------------------------------------------------
+
+      IF( nn_timing == 1 ) CALL timing_start('tide_update')
 
       time_add = 0
@@ -329,4 +336,6 @@
          END DO
       END DO
+      !
+      IF( nn_timing == 1 ) CALL timing_stop('tide_update')
       !
    END SUBROUTINE tide_update
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdytra.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdytra.F90	(revision 3122)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdytra.F90	(revision 3182)
@@ -14,4 +14,5 @@
    !!   bdy_tra_frs        : Apply Flow Relaxation Scheme
    !!----------------------------------------------------------------------
+   USE timing          ! Timing
    USE oce             ! ocean dynamics and tracers variables
    USE dom_oce         ! ocean space and time domain variables 
@@ -75,4 +76,5 @@
       !!----------------------------------------------------------------------
       !
+      IF( nn_timing == 1 ) CALL timing_start('bdy_tra_frs')
       !
       igrd = 1                       ! Everything is at T-points here
@@ -90,5 +92,7 @@
       !
       IF( kt .eq. nit000 ) CLOSE( unit = 102 )
-   !
+      !
+      IF( nn_timing == 1 ) CALL timing_stop('bdy_tra_frs')
+      !
    END SUBROUTINE bdy_tra_frs
    
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 3122)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 3182)
@@ -14,4 +14,5 @@
    !!   'key_dynspg_flt'                              filtered free surface
    !!----------------------------------------------------------------------
+   USE timing          ! Timing
    USE oce             ! ocean dynamics and tracers 
    USE dom_oce         ! ocean space and time domain 
@@ -75,4 +76,6 @@
       TYPE(OBC_INDEX), POINTER :: idx
       !!-----------------------------------------------------------------------------
+
+      IF( nn_timing == 1 ) CALL timing_start('bdy_vol')
 
       IF( ln_vol ) THEN
@@ -161,4 +164,6 @@
       END IF 
       !
+      IF( nn_timing == 1 ) CALL timing_stop('bdy_vol')
+      !
       END IF ! ln_vol
 
