Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 3163)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 3164)
@@ -72,6 +72,4 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('day_init')
-      !
       ! all calendar staff is based on the fact that MOD( rday, rdttra(1) ) == 0
       IF( MOD( rday     , rdttra(1) ) /= 0. )   CALL ctl_stop( 'the time step must devide the number of second of in a day' )
@@ -130,6 +128,4 @@
       ! call day to set the calendar parameters at the begining of the current simulaton. needed by iom_init
       CALL day( nit000 )
-      !
-      IF( nn_timing == 1 )  CALL timing_stop('day_init')
       !
    END SUBROUTINE day_init
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 3163)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 3164)
@@ -23,4 +23,5 @@
    USE lib_mpp         ! distribued memory computing library
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+   USE wrk_nemo_2      ! Memory Allocation
 
    IMPLICIT NONE
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c2d.h90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c2d.h90	(revision 3163)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c2d.h90	(revision 3164)
@@ -140,6 +140,4 @@
       !!----------------------------------------------------------------------
       USE ldftra_oce, ONLY:   aht0
-      USE wrk_nemo  , ONLY:   iwrk_in_use, iwrk_not_released
-      USE wrk_nemo  , ONLY:   icof => iwrk_2d_1
       !
       LOGICAL, INTENT (in) ::   ld_print   ! If true, output arrays on numout
@@ -150,11 +148,11 @@
       REAL(wp) ::   zahmeq, zcoft, zcoff, zmsk
       CHARACTER (len=15) ::   clexp
-      INTEGER, DIMENSION(jpidta,jpidta) ::   idata
-      !!----------------------------------------------------------------------
-
-      IF( iwrk_in_use(2, 1) )THEN
-         CALL ctl_stop('ldf_dyn_c2d_orca: requested workspace array is unavailable')   ;   RETURN
-      ENDIF
-
+      INTEGER, POINTER, DIMENSION(:,:)  :: icof
+      INTEGER, POINTER, DIMENSION(:,:)  :: idata
+      !!----------------------------------------------------------------------
+      !                                
+      CALL wrk_alloc( jpi   , jpj   , icof  )
+      CALL wrk_alloc( jpidta, jpjdta, idata )
+      !
       IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*) 'inildf: 2d eddy viscosity coefficient'
@@ -280,6 +278,7 @@
          CALL prihre(ahm2,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
       ENDIF
-
-      IF( iwrk_not_released(2, 1) )   CALL ctl_stop('ldf_dyn_c2d_orca: failed to release workspace array')
+      !
+      CALL wrk_dealloc( jpi   , jpj   , icof  )
+      CALL wrk_dealloc( jpidta, jpjdta, idata )
       !
    END SUBROUTINE ldf_dyn_c2d_orca
@@ -302,6 +301,4 @@
       !!----------------------------------------------------------------------
       USE ldftra_oce, ONLY:   aht0
-      USE wrk_nemo  , ONLY:   iwrk_in_use, iwrk_not_released
-      USE wrk_nemo  , ONLY:   icof => iwrk_2d_1
       !
       LOGICAL, INTENT (in) ::   ld_print   ! If true, output arrays on numout
@@ -313,10 +310,11 @@
       REAL(wp) ::   zahmeq, zcoft, zcoff, zmsk, zam20s
       CHARACTER (len=15) ::   clexp
-      INTEGER, DIMENSION(jpidta,jpidta) ::   idata
-      !!----------------------------------------------------------------------
-
-      IF( iwrk_in_use(2, 1) ) THEN
-         CALL ctl_stop('ldf_dyn_c2d_orca_R1: requested workspace array is unavailable')   ;   RETURN
-      ENDIF
+      INTEGER, POINTER, DIMENSION(:,:)  :: icof
+      INTEGER, POINTER, DIMENSION(:,:)  :: idata
+      !!----------------------------------------------------------------------
+      !                                
+      CALL wrk_alloc( jpi   , jpj   , icof  )
+      CALL wrk_alloc( jpidta, jpjdta, idata )
+      !                                
 
       IF(lwp) WRITE(numout,*)
@@ -450,6 +448,7 @@
          CALL prihre(ahm2,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
       ENDIF
-
-      IF( iwrk_not_released(2, 1) )   CALL ctl_stop('ldf_dyn_c2d_orca_R1: failed to release workspace array')
+      !
+      CALL wrk_dealloc( jpi   , jpj   , icof  )
+      CALL wrk_dealloc( jpidta, jpjdta, idata )
       !
    END SUBROUTINE ldf_dyn_c2d_orca_R1
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90	(revision 3163)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90	(revision 3164)
@@ -27,6 +27,4 @@
       !!----------------------------------------------------------------------
       USE ldftra_oce, ONLY :   aht0
-      USE wrk_nemo  , ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo  , ONLY:   zcoef => wrk_1d_2
       !!
       LOGICAL, INTENT (in) ::   ld_print   ! If true, output arrays on numout
@@ -37,10 +35,9 @@
       REAL(wp) ::   zd_max       ! maximum grid spacing over the global domain
       REAL(wp) ::   za00, zc, zd, zetmax, zefmax, zeumax, zevmax   ! local scalars
-      !!----------------------------------------------------------------------
-
-      IF( wrk_in_use(1,2) ) THEN
-         CALL ctl_stop('ldf_dyn_c3d: requested workspace array unavailable')   ;   RETURN
-      ENDIF
-
+      REAL(wp), POINTER, DIMENSION(:) :: zcoef   
+      !!----------------------------------------------------------------------
+      !
+      CALL wrk_alloc( jpk, zcoef )
+      !
       IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*) 'ldf_dyn_c3d : 3D lateral eddy viscosity coefficient'
@@ -182,5 +179,5 @@
       ENDIF
       !
-      IF( wrk_not_released(1,2) )   CALL ctl_stop('ldf_dyn_c3d: failed to release workspace array')
+      CALL wrk_dealloc( jpk, zcoef )
       !
    END SUBROUTINE ldf_dyn_c3d
@@ -196,8 +193,4 @@
       !!----------------------------------------------------------------------
       USE ldftra_oce, ONLY:   aht0
-      USE wrk_nemo  , ONLY:   wrk_in_use, wrk_not_released, iwrk_in_use, iwrk_not_released
-      USE wrk_nemo  , ONLY:   icof  => iwrk_2d_1
-      USE wrk_nemo  , ONLY:   zahm0 =>  wrk_2d_1
-      USE wrk_nemo  , ONLY:   zcoef =>  wrk_1d_1
       !!
       LOGICAL, INTENT(in) ::   ld_print   ! If true, output arrays on numout
@@ -207,15 +200,18 @@
       INTEGER ::   inum, iim, ijm      ! 
       INTEGER ::   ifreq, il1, il2, ij, ii
-      INTEGER, DIMENSION(jpidta, jpjdta) ::   idata
-
       REAL(wp) ::   zahmeq, zcoff, zcoft, zmsk   ! local scalars
       REAL(wp) ::   zemax , zemin, zeref, zahmm
       CHARACTER (len=15) ::   clexp
-      !!----------------------------------------------------------------------
-
-      IF( iwrk_in_use(2,1) .OR. wrk_in_use(2,1) .OR. wrk_in_use(1,1) ) THEN
-         CALL ctl_stop('ldf_dyn_c3d_orca: requested workspace arrays are unavailable')   ;   RETURN
-      ENDIF
-
+      INTEGER , POINTER, DIMENSION(:,:)  :: icof
+      INTEGER , POINTER, DIMENSION(:,:)  :: idata
+      REAL(wp), POINTER, DIMENSION(:  )  :: zcoef   
+      REAL(wp), POINTER, DIMENSION(:,:)  :: zahm0
+      !!----------------------------------------------------------------------
+      !
+      CALL wrk_alloc( jpi   , jpj   , icof  )
+      CALL wrk_alloc( jpidta, jpjdta, idata )
+      CALL wrk_alloc( jpk   ,         zcoef )
+      CALL wrk_alloc( jpi   , jpj   , zahm0 )
+      !
       IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*) 'ldfdyn_c3d_orca : 3D eddy viscosity coefficient'
@@ -457,8 +453,9 @@
          CALL prihre(ahm4(:,:,1),jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
       ENDIF
-
-      IF( iwrk_not_released(2,1) .OR.   &
-           wrk_not_released(2,1) .OR.   &
-           wrk_not_released(1,1)   ) CALL ctl_stop('ldf_dyn_c3d_orca: failed to release workspace arrays')
+      !
+      CALL wrk_dealloc( jpi   , jpj   , icof  )
+      CALL wrk_dealloc( jpidta, jpjdta, idata )
+      CALL wrk_dealloc( jpk   ,         zcoef )
+      CALL wrk_dealloc( jpi   , jpj   , zahm0 )
       !
    END SUBROUTINE ldf_dyn_c3d_orca
