Index: /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/MY_SRC/usrdef_zgr.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/MY_SRC/usrdef_zgr.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/MY_SRC/usrdef_zgr.F90	(revision 9125)
@@ -24,5 +24,4 @@
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp        ! distributed memory computing library
-   USE wrk_nemo       ! Memory allocation
    USE timing         ! Timing
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90	(revision 9125)
@@ -21,5 +21,4 @@
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp        ! distributed memory computing library
-   USE wrk_nemo       ! Memory allocation
    USE timing         ! Timing
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/MY_SRC/usrdef_zgr.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/MY_SRC/usrdef_zgr.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/OVERFLOW/MY_SRC/usrdef_zgr.F90	(revision 9125)
@@ -23,5 +23,4 @@
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp        ! distributed memory computing library
-   USE wrk_nemo       ! Memory allocation
    USE timing         ! Timing
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/VORTEX/MY_SRC/usrdef_zgr.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/VORTEX/MY_SRC/usrdef_zgr.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/VORTEX/MY_SRC/usrdef_zgr.F90	(revision 9125)
@@ -23,5 +23,4 @@
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp        ! distributed memory computing library
-   USE wrk_nemo       ! Memory allocation
 
    IMPLICIT NONE
Index: /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/bdyini.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/bdyini.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/bdyini.F90	(revision 9125)
@@ -29,5 +29,4 @@
    USE lib_mpp        ! for mpp_sum  
    USE iom            ! I/O
-   USE wrk_nemo       ! Memory Allocation
 
    IMPLICIT NONE
@@ -148,5 +147,5 @@
       INTEGER :: com_east_b, com_west_b, com_south_b, com_north_b  ! Flags for boundaries receiving
       INTEGER :: iw_b(4), ie_b(4), is_b(4), in_b(4)                ! Arrays for neighbours coordinates
-      REAL(wp), POINTER, DIMENSION(:,:)       ::   zfmask  ! temporary fmask array excluding coastal boundary condition (shlat)
+      REAL(wp), DIMENSION(jpi,jpj)       ::   zfmask  ! temporary fmask array excluding coastal boundary condition (shlat)
       !!
       CHARACTER(LEN=1)                     ::   ctypebdy   !     -        - 
@@ -1189,5 +1188,4 @@
       ! For the flagu/flagv calculation below we require a version of fmask without
       ! the land boundary condition (shlat) included:
-      CALL wrk_alloc(jpi,jpj,  zfmask ) 
       DO ij = 2, jpjm1
          DO ii = 2, jpim1
@@ -1318,5 +1316,4 @@
       IF( nb_bdy>0 )   DEALLOCATE( nbidta, nbjdta, nbrdta )
       !
-      CALL wrk_dealloc(jpi,jpj,   zfmask ) 
       !
    END SUBROUTINE bdy_segs
Index: /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/domain.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/domain.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/domain.F90	(revision 9125)
@@ -45,5 +45,4 @@
    USE lbclnk         ! ocean lateral boundary condition (or mpp link)
    USE lib_mpp        ! distributed memory computing library
-   USE wrk_nemo       ! Memory Allocation
 
    IMPLICIT NONE
Index: /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/usrdef_zgr.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/usrdef_zgr.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/WAD/MY_SRC/usrdef_zgr.F90	(revision 9125)
@@ -24,5 +24,4 @@
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp        ! distributed memory computing library
-   USE wrk_nemo       ! Memory allocation
 
    IMPLICIT NONE
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 9125)
@@ -40,5 +40,4 @@
    USE prtctl          ! print control
    USE fldread         ! read input fields 
-   USE wrk_nemo        ! Memory allocation 
    USE timing          ! Timing
    USE trc, ONLY : ln_rsttr, numrtr, numrtw, lrst_trc
@@ -108,5 +107,5 @@
       INTEGER, INTENT(in) ::   kt   ! ocean time-step index
       INTEGER             ::   ji, jj, jk
-      REAL(wp), POINTER, DIMENSION(:,:)   :: zemp
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:)   :: zemp
       !!----------------------------------------------------------------------
       !
@@ -139,10 +138,10 @@
       !
       IF( .NOT.ln_linssh ) THEN
-         CALL wrk_alloc(jpi, jpj, zemp )
+         ALLOCATE( zemp(jpi,jpj) )
          zhdivtr(:,:,:) = sf_dyn(jf_div)%fnow(:,:,:) * tmask(:,:,:)    ! effective u-transport
          emp_b (:,:)    = sf_dyn(jf_empb)%fnow(:,:,1) * tmask(:,:,1)    ! E-P
          zemp   (:,:)   = 0.5_wp * ( emp(:,:) + emp_b(:,:) ) + rnf(:,:) + fwbcorr * tmask(:,:,1)
          CALL dta_dyn_ssh( kt, zhdivtr, sshb, zemp, ssha, e3t_a(:,:,:) )  !=  ssh, vertical scale factor & vertical transport
-         CALL wrk_dealloc(jpi, jpj, zemp )
+         DEALLOCATE( zemp )
          !                                           Write in the tracer restart file
          !                                          *******************************
@@ -587,8 +586,6 @@
       REAL(wp) ::   ztintb     ! ratio applied to before records when doing time interpolation
       INTEGER  ::   iswap 
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zuslp, zvslp, zwslpi, zwslpj
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zuslp, zvslp, zwslpi, zwslpj
       !!---------------------------------------------------------------------
-      !
-      CALL wrk_alloc(jpi, jpj, jpk, zuslp, zvslp, zwslpi, zwslpj )
       !
       IF( sf_dyn(jf_tem)%ln_tint ) THEN    ! Computes slopes (here avt is used as workspace)                       
@@ -660,6 +657,4 @@
       ENDIF
       !
-      CALL wrk_dealloc(jpi, jpj, jpk, zuslp, zvslp, zwslpi, zwslpj )
-      !
    END SUBROUTINE dta_dyn_slp
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 9125)
@@ -16,5 +16,4 @@
    !!                    conditions
    !!----------------------------------------------------------------------
-   USE wrk_nemo        ! Memory Allocation
    USE oce             ! ocean dynamics and tracers 
    USE dom_oce         ! ocean space and time domain
@@ -50,5 +49,5 @@
       INTEGER ::   jk, ii, ij, ib_bdy, ib, igrd     ! Loop counter
       LOGICAL ::   ll_dyn2d, ll_dyn3d, ll_orlanski
-      REAL(wp), POINTER, DIMENSION(:,:) :: pua2d, pva2d     ! after barotropic velocities
+      REAL(wp), DIMENSION(jpi,jpj) :: pua2d, pva2d     ! after barotropic velocities
       !!----------------------------------------------------------------------
       !
@@ -65,10 +64,4 @@
      &   .OR. cn_dyn3d(ib_bdy) == 'orlanski' .OR. cn_dyn3d(ib_bdy) == 'orlanski_npo')   ll_orlanski = .true.
       END DO
-
-      !-------------------------------------------------------
-      ! Set pointers
-      !-------------------------------------------------------
-
-      CALL wrk_alloc( jpi,jpj,   pua2d, pva2d ) 
 
       !-------------------------------------------------------
@@ -124,6 +117,4 @@
       END IF
       !
-      CALL wrk_dealloc( jpi,jpj,  pua2d, pva2d ) 
-      !
    END SUBROUTINE bdy_dyn
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 9125)
@@ -25,5 +25,4 @@
    USE fldread        !
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
-   USE wrk_nemo       ! Memory allocation
 
    IMPLICIT NONE
@@ -75,5 +74,5 @@
       CHARACTER(len=80)                         ::   clfile              !: full file name for tidal input file 
       REAL(wp),ALLOCATABLE, DIMENSION(:,:,:)    ::   dta_read            !: work space to read in tidal harmonics data
-      REAL(wp), POINTER, DIMENSION(:,:)         ::   ztr, zti            !:  "     "    "   "   "   "        "      " 
+      REAL(wp),ALLOCATABLE, DIMENSION(:,:)      ::   ztr, zti            !:  "     "    "   "   "   "        "      " 
       !!
       TYPE(TIDES_DATA),  POINTER                ::   td                  !: local short cut   
@@ -150,5 +149,5 @@
                ! given on the global domain (ie global, jpiglo x jpjglo)
                !
-               CALL wrk_alloc( jpi,jpj,   zti, ztr )
+               ALLOCATE( zti(jpi,jpj), ztr(jpi,jpj) )
                !
                ! SSH fields
@@ -200,5 +199,5 @@
                CALL iom_close( inum )
                !
-               CALL wrk_dealloc( jpi,jpj,   ztr, zti ) 
+               DEALLOCATE( ztr, zti ) 
                !
             ELSE            
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90	(revision 9125)
@@ -17,5 +17,4 @@
    USE iom            ! I/O library (iom_get)
    USE in_out_manager ! I/O manager (ctmp1)
-   USE wrk_nemo                      ! Memory allocation
 
    IMPLICIT NONE
@@ -58,5 +57,5 @@
       REAL(wp) ::  zlam1, zcos_alpha, ze1, ze1deg  ! Case 5 local scalars
       REAL(wp) ::  zphi1, zsin_alpha, zim05, zjm05 !          
-      REAL(wp) , POINTER, DIMENSION(:,:) ::  gphidta, glamdta, zdist ! Global lat/lon
+      REAL(wp) , DIMENSION(jpidta,jpjdta) ::  gphidta, glamdta, zdist ! Global lat/lon
       !!
       NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,   &
@@ -75,5 +74,4 @@
 902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp )
 
-      CALL wrk_alloc( jpidta,jpjdta,   gphidta, glamdta, zdist )
 
       ! ============================= !
@@ -183,6 +181,4 @@
       jpizoom = iloc(1) + nimpp - 2  ! Minloc index - 1; want the bottom-left
       jpjzoom = iloc(2) + njmpp - 2  ! corner index of the zoom domain.
-
-      CALL wrk_dealloc( jpidta,jpjdta,   gphidta, glamdta, zdist )
 
       IF (lwp) THEN
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90	(revision 9125)
@@ -18,5 +18,4 @@
    USE fldread        ! read input fields
    USE lib_mpp        ! MPP library
-   USE wrk_nemo       ! Memory allocation
    USE timing         ! Timing
 
@@ -139,5 +138,5 @@
       INTEGER ::   ik, il0, il1, ii0, ii1, ij0, ij1  ! local integers
       REAL(wp)::   zl, zi                            ! local floats
-      REAL(wp), POINTER, DIMENSION(:) ::  zup, zvp   ! 1D workspace
+      REAL(wp), ALLOCATABLE, DIMENSION(:) ::  zup, zvp   ! 1D workspace
       !!----------------------------------------------------------------------
       !
@@ -151,5 +150,5 @@
       IF( ln_sco ) THEN                   !==   s- or mixed s-zps-coordinate   ==!
          !
-         CALL wrk_alloc( jpk,   zup, zvp )
+         ALLOCATE( zup(jpk), zvp(jpk) )
          !
          IF( kt == nit000 .AND. lwp )THEN
@@ -187,5 +186,5 @@
          END DO
          ! 
-         CALL wrk_dealloc( jpk,   zup, zvp )
+         DEALLOCATE( zup, zvp )
          ! 
       ELSE                                !==   z- or zps- coordinate   ==!
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90	(revision 9125)
@@ -27,5 +27,4 @@
    USE lib_mpp        ! MPP library
    USE prtctl         ! Print control
-   USE wrk_nemo       ! Memory allocation
    USE timing         ! Timing
    USE iom            ! I/O manager
@@ -154,10 +153,9 @@
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
       REAL(wp) ::   zua, zva     ! local scalars
-      REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   zuv_dta   ! Read in data 
+      REAL(wp), DIMENSION(jpi,jpj,jpk,2) ::   zuv_dta   ! Read in data 
       !!----------------------------------------------------------------------
       !
       IF( ln_timing )   CALL timing_start( 'dyn_dmp' )
       !
-      CALL wrk_alloc( jpi,jpj,jpk,2,   zuv_dta )
       !
       !                           !==   read and interpolate U & V current data at kt   ==!
@@ -225,5 +223,4 @@
          &                           tab3d_2=va(:,:,:), clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      CALL wrk_dealloc( jpi,jpj,jpk,2,   zuv_dta )
       !
       IF( ln_timing )   CALL timing_stop( 'dyn_dmp')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90	(revision 9125)
@@ -36,5 +36,4 @@
    USE par_kind
    USE crslbclnk
-   USE wrk_nemo       ! work arrays
    USE lib_mpp
 
@@ -352,8 +351,7 @@
       INTEGER  ::   ji, jj, jk , ii, ij, je_2
       REAL(wp) ::   zdAm
-      REAL(wp), DIMENSION(:,:,:), POINTER ::   zvol, zmask      
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zvol, zmask      
       !!----------------------------------------------------------------  
       !
-      CALL wrk_alloc( jpi,jpj,jpk,   zvol, zmask )
       !
       p_fld1_crs(:,:,:) = 0._wp
@@ -445,5 +443,4 @@
       CALL crs_lbc_lnk( p_fld2_crs, cd_type, 1.0 ) 
       !
-      CALL wrk_dealloc( jpi, jpj, jpk, zvol, zmask )
       !
    END SUBROUTINE crs_dom_facvol
@@ -487,5 +484,5 @@
       INTEGER  ::   ii, ij, ijie, ijje, je_2
       REAL(wp) ::   zflcrs, zsfcrs   
-      REAL(wp), DIMENSION(:,:,:), POINTER ::   zsurf, zsurfmsk, zmask  
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   zsurf, zsurfmsk, zmask  
       !!----------------------------------------------------------------  
       !
@@ -496,5 +493,5 @@
       CASE ( 'VOL' )
          !
-         CALL wrk_alloc( jpi,jpj,jpk,   zsurf, zsurfmsk )
+         ALLOCATE( zsurf(jpi,jpj,jpk), zsurfmsk(jpi,jpj,jpk) )
          !   
          SELECT CASE ( cd_type )
@@ -585,9 +582,9 @@
                END SELECT
 
-              CALL wrk_dealloc( jpi, jpj, jpk, zsurf, zsurfmsk )
+              DEALLOCATE( zsurf, zsurfmsk )
 
          CASE ( 'SUM' )
          
-            CALL wrk_alloc( jpi, jpj, jpk, zsurfmsk )
+            ALLOCATE( zsurfmsk(jpi,jpj,jpk) )
 
             SELECT CASE ( cd_type )
@@ -763,9 +760,9 @@
               ENDIF
 
-              CALL wrk_dealloc( jpi, jpj, jpk, zsurfmsk )
+              DEALLOCATE( zsurfmsk )
 
          CASE ( 'MAX' )    !  search the max of unmasked grid cells
 
-            CALL wrk_alloc( jpi, jpj, jpk, zmask )
+            ALLOCATE( zmask(jpi,jpj,jpk) )
 
             SELECT CASE ( cd_type )
@@ -934,9 +931,9 @@
               END SELECT
 
-              CALL wrk_dealloc( jpi, jpj, jpk, zmask )
+              DEALLOCATE( zmask )
 
          CASE ( 'MIN' )      !   Search the min of unmasked grid cells
 
-            CALL wrk_alloc( jpi, jpj, jpk, zmask )
+            ALLOCATE( zmask(jpi,jpj,jpk) )
 
             SELECT CASE ( cd_type )
@@ -1104,5 +1101,5 @@
             END SELECT
             !
-            CALL wrk_dealloc( jpi, jpj, jpk, zmask )
+            DEALLOCATE( zmask )
             !
          END SELECT
@@ -1149,5 +1146,5 @@
       INTEGER  :: ijie, ijje, ii, ij, je_2
       REAL(wp) :: zflcrs, zsfcrs   
-      REAL(wp), DIMENSION(:,:), POINTER :: zsurfmsk   
+      REAL(wp), DIMENSION(:,:), ALLOCATABLE :: zsurfmsk   
       !!----------------------------------------------------------------  
       !
@@ -1158,5 +1155,5 @@
         CASE ( 'VOL' )
       
-            CALL wrk_alloc( jpi, jpj, zsurfmsk )
+            ALLOCATE( zsurfmsk(jpi,jpj) )
             zsurfmsk(:,:) =  p_e12(:,:) * p_e3(:,:,1) * p_mask(:,:,1)
 
@@ -1222,9 +1219,9 @@
             ENDDO
 
-            CALL wrk_dealloc( jpi, jpj, zsurfmsk )
+            DEALLOCATE( zsurfmsk )
 
          CASE ( 'SUM' )
          
-            CALL wrk_alloc( jpi, jpj, zsurfmsk )
+            ALLOCATE( zsurfmsk(jpi,jpj) )
             IF( PRESENT( p_e3 ) ) THEN
                zsurfmsk(:,:) =  p_e12(:,:) * p_e3(:,:,1) * p_mask(:,:,1)
@@ -1364,5 +1361,5 @@
               ENDIF
 
-              CALL wrk_dealloc( jpi, jpj, zsurfmsk )
+              DEALLOCATE( zsurfmsk )
 
          CASE ( 'MAX' )
@@ -1644,5 +1641,5 @@
       INTEGER ::  ijie, ijje, ii, ij, je_2
       REAL(wp) :: ze3crs  
-      REAL(wp), DIMENSION(:,:,:), POINTER :: zmask, zsurf   
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmask, zsurf   
 
       !!----------------------------------------------------------------  
@@ -1651,6 +1648,4 @@
        p_e3_max_crs(:,:,:) = 1.
    
-
-       CALL wrk_alloc( jpi, jpj, jpk, zmask, zsurf )
 
        SELECT CASE ( cd_type )
@@ -1756,5 +1751,4 @@
        CALL crs_lbc_lnk( p_e3_max_crs, cd_type, 1.0, pval=1.0 )  
        !              
-       CALL wrk_dealloc( jpi, jpj, jpk, zsurf, zmask )
        !
    END SUBROUTINE crs_dom_e3
@@ -1773,10 +1767,8 @@
       INTEGER  :: ji, jj, jk                   ! dummy loop indices
       INTEGER  :: ii, ij, je_2
-      REAL(wp), DIMENSION(:,:,:), POINTER :: zsurf, zsurfmsk   
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zsurf, zsurfmsk   
       !!----------------------------------------------------------------  
       ! Initialize
 
-
-      CALL wrk_alloc( jpi, jpj, jpk, zsurf, zsurfmsk )
       !
       SELECT CASE ( cd_type )
@@ -1867,6 +1859,4 @@
       CALL crs_lbc_lnk( p_surf_crs    , cd_type, 1.0, pval=1.0 )
       CALL crs_lbc_lnk( p_surf_crs_msk, cd_type, 1.0, pval=1.0 )
-
-      CALL wrk_dealloc( jpi, jpj, jpk, zsurfmsk, zsurf )
 
    END SUBROUTINE crs_dom_sfc
@@ -2236,8 +2226,6 @@
       !!  local variables
       INTEGER  :: ji,jj,jk      ! dummy indices
-      REAL(wp), DIMENSION(:,:)  , POINTER :: zmbk
+      REAL(wp), DIMENSION(jpi_crs, jpj_crs) :: zmbk
       !!----------------------------------------------------------------
-   
-      CALL wrk_alloc( jpi_crs, jpj_crs, zmbk )
    
       mbathy_crs(:,:) = jpkm1
@@ -2281,6 +2269,4 @@
       zmbk(:,:) = REAL( mbkv_crs(:,:), wp )   ;   CALL crs_lbc_lnk(zmbk,'V',1.0) ; mbkv_crs  (:,:) = MAX( INT( zmbk(:,:) ), 1 ) 
       !
-      CALL wrk_dealloc( jpi_crs, jpj_crs, zmbk )
-      !
    END SUBROUTINE crs_dom_bat
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsdomwri.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsdomwri.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsdomwri.F90	(revision 9125)
@@ -19,5 +19,4 @@
    USE crsdom         ! coarse grid domain
    USE crslbclnk       ! crs mediator to lbclnk
-   USE wrk_nemo        ! Working array
 
    IMPLICIT NONE
@@ -63,13 +62,9 @@
       INTEGER           ::   ji, jj, jk   ! dummy loop indices
       !                                   !  workspaces
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zprt, zprw 
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zdepu, zdepv
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: ze3tp, ze3wp
-      !!----------------------------------------------------------------------
-      !
-      CALL wrk_alloc( jpi_crs, jpj_crs,      zprt , zprw  )
-      CALL wrk_alloc( jpi_crs, jpj_crs,      ze3tp, ze3wp )
-      CALL wrk_alloc( jpi_crs, jpj_crs, jpk, zdepu, zdepv )
-
+      REAL(wp), DIMENSION(jpi_crs,jpj_crs    ) :: zprt, zprw 
+      REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk) :: zdepu, zdepv
+      REAL(wp), DIMENSION(jpi_crs,jpj_crs    ) :: ze3tp, ze3wp
+      !!----------------------------------------------------------------------
+      !
       ze3tp(:,:) = 0.0
       ze3wp(:,:) = 0.0
@@ -289,8 +284,4 @@
       END SELECT
       !
-      CALL wrk_dealloc( jpi_crs, jpj_crs,      zprt , zprw  )
-      CALL wrk_dealloc( jpi_crs, jpj_crs,      ze3tp, ze3wp )
-      CALL wrk_dealloc( jpi_crs, jpj_crs, jpk, zdepu, zdepv )
-      !
    END SUBROUTINE crs_dom_wri
 
@@ -312,8 +303,6 @@
       INTEGER  ::  ji       ! dummy loop indices
       LOGICAL, DIMENSION(SIZE(puniq,1),SIZE(puniq,2),1) ::  lldbl  ! store whether each point is unique or not
-      REAL(wp), POINTER, DIMENSION(:,:) :: ztstref
-      !!----------------------------------------------------------------------
-      !
-      CALL wrk_alloc( jpi_crs, jpj_crs, ztstref )
+      REAL(wp), DIMENSION(jpi_crs,jpj_crs) :: ztstref
+      !!----------------------------------------------------------------------
       !
       ! build an array with different values for each element 
@@ -331,6 +320,4 @@
       puniq(nldi_crs:nlei_crs,nldj_crs:nlej_crs) = REAL( COUNT( lldbl(nldi_crs:nlei_crs,nldj_crs:nlej_crs,:), dim = 3 ) , wp )
       !
-      CALL wrk_dealloc( jpi_crs, jpj_crs, ztstref )
-      !
    END SUBROUTINE dom_uniq_crs
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90	(revision 9125)
@@ -22,5 +22,4 @@
    USE in_out_manager
    USE lib_mpp
-   USE wrk_nemo 
 
    IMPLICIT NONE
@@ -72,5 +71,5 @@
       INTEGER  :: ierr                                ! allocation error status
       INTEGER  ::   ios                 ! Local integer output status for namelist read
-      REAL(wp), DIMENSION(:,:,:), POINTER :: ze3t, ze3u, ze3v, ze3w
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t, ze3u, ze3v, ze3w
 
       NAMELIST/namcrs/ nn_factx, nn_facty, nn_binref, nn_msh_crs, nn_crs_kz, ln_crs_wn
@@ -180,6 +179,4 @@
      
      !
-     CALL wrk_alloc( jpi,jpj,jpk,   ze3t, ze3u, ze3v, ze3w )
-     !
      ze3t(:,:,:) = e3t_n(:,:,:)
      ze3u(:,:,:) = e3u_n(:,:,:)
@@ -245,5 +242,4 @@
       ! 7. Finish and clean-up
       !---------------------------------------------------------
-      CALL wrk_dealloc( jpi,jpj,jpk,   ze3t, ze3u, ze3v, ze3w )
       !
    END SUBROUTINE crs_init
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 9125)
@@ -22,5 +22,4 @@
    USE fldread        ! type FLD_N
    USE timing         ! preformance summary
-   USE wrk_nemo       ! working arrays
 
    IMPLICIT NONE
@@ -76,8 +75,9 @@
       REAL(wp) ::   zaw, zbw, zrw
       !
-      REAL(wp), POINTER, DIMENSION(:,:)     :: zarea_ssh , zbotpres       ! 2D workspace 
-      REAL(wp), POINTER, DIMENSION(:,:)     :: zpe                         ! 2D workspace 
-      REAL(wp), POINTER, DIMENSION(:,:,:)   :: zrhd , zrhop               ! 3D workspace
-      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztsn                       ! 4D workspace
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     :: zarea_ssh , zbotpres       ! 2D workspace 
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     :: zpe                         ! 2D workspace 
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)   :: zrhd , zrhop               ! 3D workspace
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: ztsn                       ! 4D workspace
+
       !!--------------------------------------------------------------------
       IF( ln_timing )   CALL timing_start('dia_ar5')
@@ -85,8 +85,8 @@
       IF( kt == nit000 )     CALL dia_ar5_init
 
-      IF( l_ar5 ) THEN
-         CALL wrk_alloc( jpi , jpj              , zarea_ssh , zbotpres )
-         CALL wrk_alloc( jpi , jpj , jpk        , zrhd      , zrhop    )
-         CALL wrk_alloc( jpi , jpj , jpk , jpts , ztsn                 )
+      IF( l_ar5 ) THEN 
+         ALLOCATE( zarea_ssh(jpi,jpj) , zbotpres(jpi,jpj) )
+         ALLOCATE( zrhd(jpi,jpj,jpk) , zrhop(jpi,jpj,jpk) )
+         ALLOCATE( ztsn(jpi,jpj,jpk,jpts) )
          zarea_ssh(:,:) = area(:,:) * sshn(:,:)
       ENDIF
@@ -212,5 +212,5 @@
       ! Exclude points where rn2 is negative as convection kicks in here and
       ! work is not being done against stratification
-         CALL wrk_alloc( jpi, jpj, zpe )
+         ALLOCATE( zpe(jpi,jpj) )
          zpe(:,:) = 0._wp
          IF( ln_zdfddm ) THEN
@@ -247,11 +247,11 @@
 !!gm           CALL lbc_lnk( zpe, 'T', 1._wp)         
           CALL iom_put( 'tnpeo', zpe )
-          CALL wrk_dealloc( jpi, jpj, zpe )
-      ENDIF
-      !
+          DEALLOCATE( zpe )
+      ENDIF
+
       IF( l_ar5 ) THEN
-        CALL wrk_dealloc( jpi , jpj              , zarea_ssh , zbotpres )
-        CALL wrk_dealloc( jpi , jpj , jpk        , zrhd      , zrhop    )
-        CALL wrk_dealloc( jpi , jpj , jpk , jpts , ztsn                 )
+        DEALLOCATE( zarea_ssh , zbotpres )
+        DEALLOCATE( zrhd      , zrhop    )
+        DEALLOCATE( ztsn                 )
       ENDIF
       !
@@ -274,9 +274,7 @@
       !
       INTEGER    ::  ji, jj, jk
-      REAL(wp), POINTER, DIMENSION(:,:)  :: z2d
+      REAL(wp), DIMENSION(jpi,jpj)  :: z2d
 
     
-
-      CALL wrk_alloc( jpi, jpj, z2d )
       z2d(:,:) = pua(:,:,1) 
       DO jk = 1, jpkm1
@@ -315,6 +313,4 @@
        ENDIF
           
-       CALL wrk_dealloc( jpi, jpj, z2d )
-
    END SUBROUTINE dia_ar5_hst
 
@@ -330,5 +326,5 @@
       INTEGER  ::   ji, jj, jk  ! dummy loop indices
       REAL(wp) ::   zztmp  
-      REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   zsaldta   ! Jan/Dec levitus salinity
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   zsaldta   ! Jan/Dec levitus salinity
       !
       !!----------------------------------------------------------------------
@@ -341,5 +337,4 @@
       IF( l_ar5 ) THEN
          !
-         CALL wrk_alloc( jpi , jpj , jpk, jpts, zsaldta )
          !                                      ! allocate dia_ar5 arrays
          IF( dia_ar5_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dia_ar5_init : unable to allocate arrays' )
@@ -357,24 +352,27 @@
          IF( lk_mpp )   CALL mpp_sum( vol0 )
 
-         CALL iom_open ( 'sali_ref_clim_monthly', inum )
-         CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,1), 1  )
-         CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,2), 12 )
-         CALL iom_close( inum )
-
-         sn0(:,:,:) = 0.5_wp * ( zsaldta(:,:,:,1) + zsaldta(:,:,:,2) )        
-         sn0(:,:,:) = sn0(:,:,:) * tmask(:,:,:)
-         IF( ln_zps ) THEN               ! z-coord. partial steps
-            DO jj = 1, jpj               ! interpolation of salinity at the last ocean level (i.e. the partial step)
-               DO ji = 1, jpi
-                  ik = mbkt(ji,jj)
-                  IF( ik > 1 ) THEN
-                     zztmp = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) )
-                     sn0(ji,jj,ik) = ( 1._wp - zztmp ) * sn0(ji,jj,ik) + zztmp * sn0(ji,jj,ik-1)
-                  ENDIF
-               END DO
-            END DO
+         IF( iom_use( 'sshthster' ) ) THEN
+            ALLOCATE( zsaldta(jpi,jpj,jpj,jpts) )
+            CALL iom_open ( 'sali_ref_clim_monthly', inum )
+            CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,1), 1  )
+            CALL iom_get  ( inum, jpdom_data, 'vosaline' , zsaldta(:,:,:,2), 12 )
+            CALL iom_close( inum )
+
+            sn0(:,:,:) = 0.5_wp * ( zsaldta(:,:,:,1) + zsaldta(:,:,:,2) )        
+            sn0(:,:,:) = sn0(:,:,:) * tmask(:,:,:)
+            IF( ln_zps ) THEN               ! z-coord. partial steps
+               DO jj = 1, jpj               ! interpolation of salinity at the last ocean level (i.e. the partial step)
+                  DO ji = 1, jpi
+                     ik = mbkt(ji,jj)
+                     IF( ik > 1 ) THEN
+                        zztmp = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) )
+                        sn0(ji,jj,ik) = ( 1._wp - zztmp ) * sn0(ji,jj,ik) + zztmp * sn0(ji,jj,ik-1)
+                     ENDIF
+                  END DO
+               END DO
+            ENDIF
+            !
+            DEALLOCATE( zsaldta )
          ENDIF
-         !
-         CALL wrk_dealloc( jpi , jpj , jpk, jpts, zsaldta )
          !
       ENDIF
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 9125)
@@ -506,8 +506,8 @@
                 istart,iend      !first and last points selected in listpoint
      INTEGER :: jpoint           !loop on list points
-     INTEGER, POINTER, DIMENSION(nb_point_max)   :: idirec !contains temporary sec%direction
-     INTEGER, POINTER, DIMENSION(2,nb_point_max) :: icoord !contains temporary sec%listpoint
+     INTEGER, DIMENSION(nb_point_max)   :: idirec !contains temporary sec%direction
+     INTEGER, DIMENSION(2,nb_point_max) :: icoord !contains temporary sec%listpoint
      !----------------------------------------------------------------------------
-      !
+     !
      IF( ld_debug )WRITE(numout,*)'      -------------------------'
      IF( ld_debug )WRITE(numout,*)'      removepoints in listpoint'
@@ -559,4 +559,5 @@
       !
    END SUBROUTINE removepoints
+
 
    SUBROUTINE transport(sec,ld_debug,jsec)
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90	(revision 9125)
@@ -103,5 +103,5 @@
       !!--------------------------------------------------------------------
       REAL(wp) ::   zmdi =1.e+20     ! land value
-      REAL(wp), DIMENSION(jpi,jpj,3) ::   zwtmb   ! workspace 
+      REAL(wp), DIMENSION(jpi,jpj,3) :: zwtmb    ! workspace 
       !!--------------------------------------------------------------------
       !
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/FLO/flo4rk.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/FLO/flo4rk.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/FLO/flo4rk.F90	(revision 9125)
@@ -15,5 +15,4 @@
    USE dom_oce         ! ocean space and time domain
    USE in_out_manager  ! I/O manager
-   USE wrk_nemo        ! working array
 
    IMPLICIT NONE
@@ -53,10 +52,8 @@
       INTEGER ::  ierror              ! error value
 
-      REAL(wp), POINTER, DIMENSION(:)   ::   zgifl , zgjfl , zgkfl    ! index RK  positions
-      REAL(wp), POINTER, DIMENSION(:)   ::   zufl  , zvfl  , zwfl     ! interpolated velocity at the float position 
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zrkxfl, zrkyfl, zrkzfl   ! RK coefficients
+      REAL(wp), DIMENSION(jpnfl)   ::   zgifl , zgjfl , zgkfl    ! index RK  positions
+      REAL(wp), DIMENSION(jpnfl)   ::   zufl  , zvfl  , zwfl     ! interpolated velocity at the float position 
+      REAL(wp), DIMENSION(jpnfl,4) ::   zrkxfl, zrkyfl, zrkzfl   ! RK coefficients
       !!---------------------------------------------------------------------
-      CALL wrk_alloc( jpnfl,    zgifl , zgjfl , zgkfl  , zufl, zvfl, zwfl)
-      CALL wrk_alloc( jpnfl, 4, zrkxfl, zrkyfl, zrkzfl )
       !
       IF( ierror /= 0 ) THEN
@@ -154,6 +151,4 @@
       END DO
       !
-      CALL wrk_dealloc( jpnfl,    zgifl , zgjfl , zgkfl  , zufl, zvfl, zwfl)
-      CALL wrk_dealloc( jpnfl, 4, zrkxfl, zrkyfl, zrkzfl )
       !
    END SUBROUTINE flo_4rk
@@ -178,19 +173,15 @@
       INTEGER  ::   jfl, jind1, jind2, jind3   ! dummy loop indices
       REAL(wp) ::   zsumu, zsumv, zsumw        ! local scalar
-      INTEGER  , POINTER, DIMENSION(:)       ::   iilu, ijlu, iklu   ! nearest neighbour INDEX-u
-      INTEGER  , POINTER, DIMENSION(:)       ::   iilv, ijlv, iklv   ! nearest neighbour INDEX-v
-      INTEGER  , POINTER, DIMENSION(:)       ::   iilw, ijlw, iklw   ! nearest neighbour INDEX-w
-      INTEGER  , POINTER, DIMENSION(:,:)     ::   iidu, ijdu, ikdu   ! 64 nearest neighbour INDEX-u
-      INTEGER  , POINTER, DIMENSION(:,:)     ::   iidv, ijdv, ikdv   ! 64 nearest neighbour INDEX-v
-      INTEGER  , POINTER, DIMENSION(:,:)     ::   iidw, ijdw, ikdw   ! 64 nearest neighbour INDEX-w
-      REAL(wp) , POINTER, DIMENSION(:,:)     ::   zlagxu, zlagyu, zlagzu   ! Lagrange  coefficients
-      REAL(wp) , POINTER, DIMENSION(:,:)     ::   zlagxv, zlagyv, zlagzv   !    -           -
-      REAL(wp) , POINTER, DIMENSION(:,:)     ::   zlagxw, zlagyw, zlagzw   !    -           -
-      REAL(wp) , POINTER, DIMENSION(:,:,:,:) ::   ztufl , ztvfl , ztwfl   ! velocity at choosen time step
+      INTEGER  , DIMENSION(jpnfl)       ::   iilu, ijlu, iklu   ! nearest neighbour INDEX-u
+      INTEGER  , DIMENSION(jpnfl)       ::   iilv, ijlv, iklv   ! nearest neighbour INDEX-v
+      INTEGER  , DIMENSION(jpnfl)       ::   iilw, ijlw, iklw   ! nearest neighbour INDEX-w
+      INTEGER  , DIMENSION(jpnfl,4)     ::   iidu, ijdu, ikdu   ! 64 nearest neighbour INDEX-u
+      INTEGER  , DIMENSION(jpnfl,4)     ::   iidv, ijdv, ikdv   ! 64 nearest neighbour INDEX-v
+      INTEGER  , DIMENSION(jpnfl,4)     ::   iidw, ijdw, ikdw   ! 64 nearest neighbour INDEX-w
+      REAL(wp) , DIMENSION(jpnfl,4)     ::   zlagxu, zlagyu, zlagzu   ! Lagrange  coefficients
+      REAL(wp) , DIMENSION(jpnfl,4)     ::   zlagxv, zlagyv, zlagzv   !    -           -
+      REAL(wp) , DIMENSION(jpnfl,4)     ::   zlagxw, zlagyw, zlagzw   !    -           -
+      REAL(wp) , DIMENSION(jpnfl,4,4,4) ::   ztufl , ztvfl , ztwfl   ! velocity at choosen time step
       !!---------------------------------------------------------------------
-      CALL wrk_alloc( jpnfl,    iilu, ijlu, iklu, iilv, ijlv, iklv, iilw, ijlw, iklw )
-      CALL wrk_alloc( jpnfl, 4, iidu, ijdu, ikdu, iidv, ijdv, ikdv, iidw, ijdw, ikdw )
-      CALL wrk_alloc( jpnfl, 4, zlagxu, zlagyu, zlagzu, zlagxv, zlagyv, zlagzv, zlagxw, zlagyw, zlagzw )
-      CALL wrk_alloc( jpnfl, 4, 4, 4, ztufl , ztvfl , ztwfl )
  
       ! Interpolation of U velocity
@@ -451,8 +442,4 @@
       END DO
       !   
-      CALL wrk_dealloc( jpnfl,    iilu, ijlu, iklu, iilv, ijlv, iklv, iilw, ijlw, iklw )
-      CALL wrk_dealloc( jpnfl, 4, iidu, ijdu, ikdu, iidv, ijdv, ikdv, iidw, ijdw, ikdw )
-      CALL wrk_dealloc( jpnfl, 4, zlagxu, zlagyu, zlagzu, zlagxv, zlagyv, zlagzv, zlagxw, zlagyw, zlagzw )
-      CALL wrk_dealloc( jpnfl, 4, 4, 4, ztufl , ztvfl , ztwfl )
       !   
    END SUBROUTINE flo_interp
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90	(revision 9125)
@@ -16,5 +16,4 @@
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distribued memory computing library
-   USE wrk_nemo        ! working array
 
    IMPLICIT NONE
@@ -54,25 +53,21 @@
       REAL(wp), DIMENSION ( 2 )  ::   zsurfx, zsurfy   ! surface of the face of the mesh
 
-      INTEGER  , POINTER, DIMENSION ( : )  ::   iil, ijl, ikl                   ! index of nearest mesh
-      INTEGER  , POINTER, DIMENSION ( : )  ::   iiloc , ijloc              
-      INTEGER  , POINTER, DIMENSION ( : )  ::   iiinfl, ijinfl, ikinfl          ! index of input mesh of the float.
-      INTEGER  , POINTER, DIMENSION ( : )  ::   iioutfl, ijoutfl, ikoutfl       ! index of output mesh of the float.
-      REAL(wp) , POINTER, DIMENSION ( : )  ::   zgifl, zgjfl, zgkfl             ! position of floats, index on 
+      INTEGER  , DIMENSION ( jpnfl )  ::   iil, ijl, ikl                   ! index of nearest mesh
+      INTEGER  , DIMENSION ( jpnfl )  ::   iiloc , ijloc              
+      INTEGER  , DIMENSION ( jpnfl )  ::   iiinfl, ijinfl, ikinfl          ! index of input mesh of the float.
+      INTEGER  , DIMENSION ( jpnfl )  ::   iioutfl, ijoutfl, ikoutfl       ! index of output mesh of the float.
+      REAL(wp) , DIMENSION ( jpnfl )  ::   zgifl, zgjfl, zgkfl             ! position of floats, index on 
       !                                                                         ! velocity mesh.
-      REAL(wp) , POINTER, DIMENSION ( : )  ::    ztxfl, ztyfl, ztzfl            ! time for a float to quit the mesh
+      REAL(wp) , DIMENSION ( jpnfl )  ::    ztxfl, ztyfl, ztzfl            ! time for a float to quit the mesh
       !                                                                         ! across one of the face x,y and z 
-      REAL(wp) , POINTER, DIMENSION ( : )  ::    zttfl                          ! time for a float to quit the mesh 
-      REAL(wp) , POINTER, DIMENSION ( : )  ::    zagefl                         ! time during which, trajectorie of 
+      REAL(wp) , DIMENSION ( jpnfl )  ::    zttfl                          ! time for a float to quit the mesh 
+      REAL(wp) , DIMENSION ( jpnfl )  ::    zagefl                         ! time during which, trajectorie of 
       !                                                                         ! the float has been computed
-      REAL(wp) , POINTER, DIMENSION ( : )  ::   zagenewfl                       ! new age of float after calculation 
+      REAL(wp) , DIMENSION ( jpnfl )  ::   zagenewfl                       ! new age of float after calculation 
       !                                                                         ! of new position
-      REAL(wp) , POINTER, DIMENSION ( : )  ::   zufl, zvfl, zwfl                ! interpolated vel. at float position
-      REAL(wp) , POINTER, DIMENSION ( : )  ::   zudfl, zvdfl, zwdfl             ! velocity diff input/output of mesh
-      REAL(wp) , POINTER, DIMENSION ( : )  ::   zgidfl, zgjdfl, zgkdfl          ! direction index of float
+      REAL(wp) , DIMENSION ( jpnfl )  ::   zufl, zvfl, zwfl                ! interpolated vel. at float position
+      REAL(wp) , DIMENSION ( jpnfl )  ::   zudfl, zvdfl, zwdfl             ! velocity diff input/output of mesh
+      REAL(wp) , DIMENSION ( jpnfl )  ::   zgidfl, zgjdfl, zgkdfl          ! direction index of float
       !!---------------------------------------------------------------------
-      CALL wrk_alloc( jpnfl , iil   , ijl   , ikl   , iiloc  ,  ijloc           )
-      CALL wrk_alloc( jpnfl , iiinfl, ijinfl, ikinfl, iioutfl, ijoutfl, ikoutfl )
-      CALL wrk_alloc( jpnfl , zgifl , zgjfl , zgkfl , ztxfl  , ztyfl  , ztzfl   , zttfl , zagefl, zagenewfl) 
-      CALL wrk_alloc( jpnfl , zufl  , zvfl  , zwfl  , zudfl  , zvdfl  , zwdfl   , zgidfl, zgjdfl, zgkdfl   )
 
       IF( kt == nit000 ) THEN
@@ -371,8 +366,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpnfl , iil   , ijl   , ikl   , iiloc  ,  ijloc           )
-      CALL wrk_dealloc( jpnfl , iiinfl, ijinfl, ikinfl, iioutfl, ijoutfl, ikoutfl )
-      CALL wrk_dealloc( jpnfl , zgifl , zgjfl , zgkfl , ztxfl  , ztyfl  , ztzfl   , zttfl , zagefl, zagenewfl) 
-      CALL wrk_dealloc( jpnfl , zufl  , zvfl  , zwfl  , zudfl  , zvdfl  , zwdfl   , zgidfl, zgjdfl, zgkdfl   )
       !
    END SUBROUTINE flo_blk
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/FLO/flowri.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/FLO/flowri.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/FLO/flowri.F90	(revision 9125)
@@ -34,7 +34,4 @@
    CHARACTER (len=80)  :: clname             ! netcdf output filename
 
-   ! Following are only workspace arrays but shape is not (jpi,jpj) and
-   ! therefore make them module arrays rather than replacing with wrk_nemo
-   ! member arrays.
    REAL(wp), ALLOCATABLE, DIMENSION(:) ::   zlon , zlat, zdep   ! 2D workspace
    REAL(wp), ALLOCATABLE, DIMENSION(:) ::   ztem , zsal, zrho   ! 2D workspace
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90	(revision 9125)
@@ -13,5 +13,4 @@
    USE in_out_manager   ! I/O manager
    USE lib_mpp          ! distributed memory computing
-   USE wrk_nemo         ! work arrays
 
    IMPLICIT NONE
@@ -94,10 +93,7 @@
       INTEGER ::   overlap, jn, sind, eind, kdir,j_id
       REAL(wp) :: zsum1, zsum2, zvctl1, zvctl2
-      REAL(wp), POINTER, DIMENSION(:,:)   :: ztab2d_1, ztab2d_2
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zmask1, zmask2, ztab3d_1, ztab3d_2
-      !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi,jpj, ztab2d_1, ztab2d_2 )
-      CALL wrk_alloc( jpi,jpj,jpk, zmask1, zmask2, ztab3d_1, ztab3d_2 )
+      REAL(wp), DIMENSION(jpi,jpj)     :: ztab2d_1, ztab2d_2
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmask1, zmask2, ztab3d_1, ztab3d_2
+      !!----------------------------------------------------------------------
 
       ! Arrays, scalars initialization 
@@ -207,7 +203,4 @@
 
       ENDDO
-
-      CALL wrk_dealloc( jpi,jpj, ztab2d_1, ztab2d_2 )
-      CALL wrk_dealloc( jpi,jpj,jpk, zmask1, zmask2, ztab3d_1, ztab3d_2 )
       !
    END SUBROUTINE prt_ctl
@@ -425,10 +418,9 @@
          nrecil, nrecjl, nldil, nleil, nldjl, nlejl
 
-      INTEGER, POINTER, DIMENSION(:,:) ::   iimpptl, ijmpptl, ilcitl, ilcjtl   ! workspace
+      INTEGER, DIMENSION(jpi,jpj) ::   iimpptl, ijmpptl, ilcitl, ilcjtl   ! workspace
       REAL(wp) ::   zidom, zjdom            ! temporary scalars
       !!----------------------------------------------------------------------
 
       !
-      CALL wrk_alloc( isplt, jsplt, ilcitl, ilcjtl, iimpptl, ijmpptl )
       !
       !  1. Dimension arrays for subdomains
@@ -578,6 +570,4 @@
       !
       !
-      CALL wrk_dealloc( isplt, jsplt, ilcitl, ilcjtl, iimpptl, ijmpptl )
-      !
       !
    END SUBROUTINE sub_dom
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 9125)
@@ -59,5 +59,4 @@
    USE lbcnfd         ! north fold treatment
    USE in_out_manager ! I/O manager
-   USE wrk_nemo       ! work arrays
 
    IMPLICIT NONE
@@ -1033,6 +1032,4 @@
       !!----------------------------------------------------------------------
       !
-      ! Since this is just an init routine and these arrays are of length jpnij
-      ! then don't use wrk_nemo module - just allocate and deallocate.
       ALLOCATE( kice(jpnij), zwork(jpnij), STAT=ierr )
       IF( ierr /= 0 ) THEN
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 9125)
@@ -14,5 +14,4 @@
    !!   fin_date     : Compute the final date YYYYMMDD.HHMMSS
    !!----------------------------------------------------------------------
-   USE wrk_nemo                 ! Memory Allocation
    USE par_kind                 ! Precision variables
    USE in_out_manager           ! I/O manager
@@ -159,11 +158,11 @@
       REAL(dp) :: rn_dobsini     ! Obs window start date YYYYMMDD.HHMMSS
       REAL(dp) :: rn_dobsend     ! Obs window end date   YYYYMMDD.HHMMSS
-      REAL(wp), POINTER, DIMENSION(:,:) :: &
+      REAL(wp), DIMENSION(jpi,jpj) :: &
          & zglam1, &             ! Model longitudes for profile variable 1
          & zglam2                ! Model longitudes for profile variable 2
-      REAL(wp), POINTER, DIMENSION(:,:) :: &
+      REAL(wp), DIMENSION(jpi,jpj) :: &
          & zgphi1, &             ! Model latitudes for profile variable 1
          & zgphi2                ! Model latitudes for profile variable 2
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: &
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: &
          & zmask1, &             ! Model land/sea mask associated with variable 1
          & zmask2                ! Model land/sea mask associated with variable 2
@@ -194,10 +193,4 @@
 
       INTEGER :: jnumsstbias
-      CALL wrk_alloc( jpi, jpj, zglam1 )
-      CALL wrk_alloc( jpi, jpj, zglam2 )
-      CALL wrk_alloc( jpi, jpj, zgphi1 )
-      CALL wrk_alloc( jpi, jpj, zgphi2 )
-      CALL wrk_alloc( jpi, jpj, jpk, zmask1 )
-      CALL wrk_alloc( jpi, jpj, jpk, zmask2 )
 
       !-----------------------------------------------------------------------
@@ -513,11 +506,4 @@
       ENDIF
 
-      CALL wrk_dealloc( jpi, jpj, zglam1 )
-      CALL wrk_dealloc( jpi, jpj, zglam2 )
-      CALL wrk_dealloc( jpi, jpj, zgphi1 )
-      CALL wrk_dealloc( jpi, jpj, zgphi2 )
-      CALL wrk_dealloc( jpi, jpj, jpk, zmask1 )
-      CALL wrk_dealloc( jpi, jpj, jpk, zmask2 )
-
    END SUBROUTINE dia_obs_init
 
@@ -567,14 +553,14 @@
       INTEGER :: jvar              ! Variable number
       INTEGER :: ji, jj            ! Loop counters
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: &
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: &
          & zprofvar1, &            ! Model values for 1st variable in a prof ob
          & zprofvar2               ! Model values for 2nd variable in a prof ob
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: &
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: &
          & zprofmask1, &           ! Mask associated with zprofvar1
          & zprofmask2              ! Mask associated with zprofvar2
-      REAL(wp), POINTER, DIMENSION(:,:) :: &
+      REAL(wp), DIMENSION(jpi,jpj) :: &
          & zsurfvar, &             ! Model values equivalent to surface ob.
          & zsurfmask               ! Mask associated with surface variable
-      REAL(wp), POINTER, DIMENSION(:,:) :: &
+      REAL(wp), DIMENSION(jpi,jpj) :: &
          & zglam1,    &            ! Model longitudes for prof variable 1
          & zglam2,    &            ! Model longitudes for prof variable 2
@@ -582,15 +568,4 @@
          & zgphi2                  ! Model latitudes for prof variable 2
 
-      !Allocate local work arrays
-      CALL wrk_alloc( jpi, jpj, jpk, zprofvar1 )
-      CALL wrk_alloc( jpi, jpj, jpk, zprofvar2 )
-      CALL wrk_alloc( jpi, jpj, jpk, zprofmask1 )
-      CALL wrk_alloc( jpi, jpj, jpk, zprofmask2 )
-      CALL wrk_alloc( jpi, jpj, zsurfvar )
-      CALL wrk_alloc( jpi, jpj, zsurfmask )
-      CALL wrk_alloc( jpi, jpj, zglam1 )
-      CALL wrk_alloc( jpi, jpj, zglam2 )
-      CALL wrk_alloc( jpi, jpj, zgphi1 )
-      CALL wrk_alloc( jpi, jpj, zgphi2 )
       !-----------------------------------------------------------------------
 
@@ -692,15 +667,4 @@
       ENDIF
 
-      CALL wrk_dealloc( jpi, jpj, jpk, zprofvar1 )
-      CALL wrk_dealloc( jpi, jpj, jpk, zprofvar2 )
-      CALL wrk_dealloc( jpi, jpj, jpk, zprofmask1 )
-      CALL wrk_dealloc( jpi, jpj, jpk, zprofmask2 )
-      CALL wrk_dealloc( jpi, jpj, zsurfvar )
-      CALL wrk_dealloc( jpi, jpj, zsurfmask )
-      CALL wrk_dealloc( jpi, jpj, zglam1 )
-      CALL wrk_dealloc( jpi, jpj, zglam2 )
-      CALL wrk_dealloc( jpi, jpj, zgphi1 )
-      CALL wrk_dealloc( jpi, jpj, zgphi2 )
-
    END SUBROUTINE dia_obs
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90	(revision 9125)
@@ -10,5 +10,4 @@
    !!---------------------------------------------------------------------
    !! * Modules used
-   USE wrk_nemo        ! Memory Allocation
    USE par_kind        ! Precision variables
    USE dom_oce         ! Domain variables
@@ -125,10 +124,7 @@
          & pgval            ! Stencil at each point
       !! * Local declarations
-      REAL(KIND=wp), POINTER, DIMENSION(:,:,:) ::   zval
+      REAL(KIND=wp), DIMENSION(jpi,jpj,1) ::   zval
       REAL(KIND=wp), DIMENSION(kptsi,kptsj,1,kobs) ::&
          & zgval 
-
-      ! Check workspace array and set-up pointer
-      CALL wrk_alloc(jpi,jpj,1,zval) 
 
       ! Set up local "3D" buffer
@@ -152,7 +148,4 @@
 
       pgval(:,:,:) = zgval(:,:,1,:)
-
-      ! 'Release' workspace array back to pool
-      CALL wrk_dealloc(jpi,jpj,1,zval) 
 
    END SUBROUTINE obs_int_comm_2d
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_altbias.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_altbias.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_altbias.F90	(revision 9125)
@@ -33,5 +33,4 @@
    USE obs_utils               ! Various observation tools
    USE obs_inter_sup
-   USE wrk_nemo                ! Memory Allocation
 
    IMPLICIT NONE
@@ -99,5 +98,5 @@
          & zglam, &
          & zgphi
-      REAL(wp), POINTER, DIMENSION(:,:) ::   z_altbias
+      REAL(wp), DIMENSION(jpi,jpj) ::   z_altbias
       REAL(wp) :: zlam
       REAL(wp) :: zphi
@@ -106,6 +105,4 @@
          & igrdj
       INTEGER :: numaltbias
-
-      CALL wrk_alloc(jpi,jpj,z_altbias) 
 
       IF(lwp)WRITE(numout,*) 
@@ -201,6 +198,4 @@
          & )
          
-      CALL wrk_dealloc(jpi,jpj,z_altbias) 
-
    END SUBROUTINE obs_rea_altbias
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90	(revision 9125)
@@ -12,5 +12,4 @@
    !!   obs_offset_mdt : Remove the offset between the model MDT and the used one
    !!----------------------------------------------------------------------
-   USE wrk_nemo         ! Memory Allocation
    USE par_kind         ! Precision variables
    USE par_oce          ! Domain parameters
@@ -76,10 +75,8 @@
       INTEGER , DIMENSION(:,:,:), ALLOCATABLE ::   igrdi, igrdj
       !
-      REAL(wp), POINTER, DIMENSION(:,:) ::  z_mdt, mdtmask
+      REAL(wp), DIMENSION(jpi,jpj) ::  z_mdt, mdtmask
          
       REAL(wp) :: zlam, zphi, zfill, zinfill    ! local scalar
       !!----------------------------------------------------------------------
-
-      CALL wrk_alloc(jpi,jpj,z_mdt,mdtmask) 
 
       IF(lwp)WRITE(numout,*) 
@@ -167,5 +164,4 @@
          & )
 
-      CALL wrk_dealloc(jpi,jpj,z_mdt,mdtmask) 
       IF(lwp)WRITE(numout,*) ' ------------- '
       !
@@ -192,9 +188,7 @@
       INTEGER  :: ji, jj
       REAL(wp) :: zdxdy, zarea, zeta1, zeta2, zcorr_mdt, zcorr_bcketa, zcorr     ! local scalar
-      REAL(wp), POINTER, DIMENSION(:,:) :: zpromsk
+      REAL(wp), DIMENSION(jpi,jpj) :: zpromsk
       CHARACTER(LEN=14), PARAMETER ::   cpname = 'obs_offset_mdt'
       !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi,jpj, zpromsk )
 
       !  Initialize the local mask, for domain projection 
@@ -258,5 +252,4 @@
       IF ( nn_msshc == 2 ) WRITE(numout,*) '           User defined MSSH correction' 
 
-      CALL wrk_dealloc( jpi,jpj, zpromsk )
       !
    END SUBROUTINE obs_offset_mdt
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_rot_vel.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_rot_vel.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_rot_vel.F90	(revision 9125)
@@ -9,5 +9,4 @@
    !!----------------------------------------------------------------------
    !! * Modules used   
-   USE wrk_nemo                 ! Memory Allocation
    USE par_kind                 ! Precision variables
    USE par_oce                  ! Ocean parameters
@@ -83,5 +82,5 @@
       REAL(wp) :: zcos
       REAL(wp), DIMENSION(1) :: zobsmask
-      REAL(wp), POINTER, DIMENSION(:,:) :: zsingu,zcosgu,zsingv,zcosgv
+      REAL(wp), DIMENSION(jpi,jpj) :: zsingu,zcosgu,zsingv,zcosgv
       INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: &
          & igrdiu, &
@@ -92,5 +91,4 @@
       INTEGER :: jk
 
-      CALL wrk_alloc(jpi,jpj,zsingu,zcosgu,zsingv,zcosgv) 
 
       !-----------------------------------------------------------------------
@@ -226,6 +224,4 @@
          & )
 
-      CALL wrk_dealloc(jpi,jpj,zsingu,zcosgu,zsingv,zcosgv) 
-
    END SUBROUTINE obs_rotvel
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/cyclone.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/cyclone.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/cyclone.F90	(revision 9125)
@@ -21,5 +21,4 @@
    USE in_out_manager  ! I/O manager
    USE geo2ocean       ! tools for projection on ORCA grid
-   USE wrk_nemo        ! work arrays
    USE lib_mpp       
 
@@ -81,5 +80,5 @@
       REAL(wp) ::   zvmax               ! timestep interpolated vmax
       REAL(wp) ::   zrlon, zrlat        ! temporary 
-      REAL(wp), DIMENSION(:,:), POINTER ::   zwnd_x, zwnd_y   ! zonal and meridional components of the wind
+      REAL(wp), DIMENSION(jpi,jpj) ::   zwnd_x, zwnd_y   ! zonal and meridional components of the wind
       REAL(wp), DIMENSION(14,5)    ::   ztct                ! tropical cyclone track data at kt
       !
@@ -88,6 +87,4 @@
       TYPE(FLD_N) ::   sn_tc                   ! informations about the fields to be read
       !!--------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi,jpj, zwnd_x, zwnd_y )
 
       !                                         ! ====================== !
@@ -271,6 +268,4 @@
       CALL rot_rep ( zwnd_x, zwnd_y, 'T', 'en->j', pwnd_j ) !rotation of components on ORCA grid
 
-      CALL wrk_dealloc( jpi,jpj, zwnd_x, zwnd_y )
-
    END SUBROUTINE wnd_cyc
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 9125)
@@ -37,5 +37,4 @@
    USE ioipsl  , ONLY : ymds2ju, ju2ymds   ! for calendar
    USE lib_mpp        ! MPP library
-   USE wrk_nemo       ! work arrays
    USE lbclnk         ! ocean lateral boundary conditions (C1D case)
    
@@ -1144,9 +1143,7 @@
       INTEGER ::   ill             ! character length
       INTEGER ::   iv              ! indice of V component
-      CHARACTER (LEN=100)               ::   clcomp       ! dummy weight name
-      REAL(wp), POINTER, DIMENSION(:,:) ::   utmp, vtmp   ! temporary arrays for vector rotation
-      !!---------------------------------------------------------------------
-      !
-      CALL wrk_alloc( jpi,jpj,   utmp, vtmp )
+      CHARACTER (LEN=100)          ::   clcomp       ! dummy weight name
+      REAL(wp), DIMENSION(jpi,jpj) ::   utmp, vtmp   ! temporary arrays for vector rotation
+      !!---------------------------------------------------------------------
       !
       !! (sga: following code should be modified so that pairs arent searched for each time
@@ -1185,6 +1182,4 @@
        END DO
       !
-      CALL wrk_dealloc( jpi,jpj,   utmp, vtmp )
-      !
    END SUBROUTINE fld_rot
 
@@ -1438,10 +1433,7 @@
       CHARACTER (len=5) ::   aname   !
       INTEGER , DIMENSION(:), ALLOCATABLE ::   ddims
-      INTEGER , POINTER, DIMENSION(:,:) ::   data_src
-      REAL(wp), POINTER, DIMENSION(:,:) ::   data_tmp
+      INTEGER,  DIMENSION(jpi,jpj) ::   data_src
+      REAL(wp), DIMENSION(jpi,jpj) ::   data_tmp
       !!----------------------------------------------------------------------
-      !
-      CALL wrk_alloc( jpi,jpj,   data_src )   ! integer
-      CALL wrk_alloc( jpi,jpj,   data_tmp )
       !
       IF( nxt_wgt > tot_wgts ) THEN
@@ -1561,7 +1553,4 @@
 
       DEALLOCATE (ddims )
-
-      CALL wrk_dealloc( jpi,jpj, data_src )   ! integer
-      CALL wrk_dealloc( jpi,jpj, data_tmp )
       !
    END SUBROUTINE fld_weight
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/ocealb.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/ocealb.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/ocealb.F90	(revision 9125)
@@ -12,5 +12,4 @@
    USE in_out_manager ! I/O manager
    USE lib_mpp        ! MPP library
-   USE wrk_nemo       ! work arrays
    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_coare.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_coare.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_coare.F90	(revision 9125)
@@ -39,5 +39,4 @@
    USE iom            ! I/O manager library
    USE lib_mpp        ! distribued memory computing library
-   USE wrk_nemo       ! work arrays
    USE prtctl         ! Print control
    USE lib_fortran    ! to use key_nosignedzero
@@ -110,21 +109,18 @@
       INTEGER , PARAMETER ::   nb_itt = 4       ! number of itterations
 
-      REAL(wp), DIMENSION(:,:), POINTER  ::  &
+      REAL(wp), DIMENSION(jpi,jpj) ::  &
          &  u_star, t_star, q_star, &
          &  dt_zu, dq_zu,    &
          &  znu_a,           & !: Nu_air, Viscosity of air
          &  z0, z0t
-      REAL(wp), DIMENSION(:,:), POINTER ::   zeta_u        ! stability parameter at height zu
-      REAL(wp), DIMENSION(:,:), POINTER ::   zeta_t        ! stability parameter at height zt
-      REAL(wp), DIMENSION(:,:), POINTER ::   ztmp0, ztmp1, ztmp2
+      REAL(wp), DIMENSION(jpi,jpj) ::   zeta_u        ! stability parameter at height zu
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztmp0, ztmp1, ztmp2
+      REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   zeta_t        ! stability parameter at height zt
       !!----------------------------------------------------------------------
       !
-      CALL wrk_alloc( jpi,jpj,   u_star, t_star, q_star, zeta_u, dt_zu, dq_zu)
-      CALL wrk_alloc( jpi,jpj,   znu_a, z0, z0t, ztmp0, ztmp1, ztmp2 )
-
       l_zt_equal_zu = .FALSE.
       IF( ABS(zu - zt) < 0.01 ) l_zt_equal_zu = .TRUE.    ! testing "zu == zt" is risky with double precision
 
-      IF( .NOT. l_zt_equal_zu )   CALL wrk_alloc( jpi,jpj, zeta_t )
+      IF( .NOT. l_zt_equal_zu )  ALLOCATE( zeta_t(jpi,jpj) )
 
       !! First guess of temperature and humidity at height zu:
@@ -248,7 +244,5 @@
       Cen = Chn
       !
-      CALL wrk_dealloc( jpi,jpj, u_star, t_star, q_star, zeta_u, dt_zu, dq_zu )
-      CALL wrk_dealloc( jpi,jpj, znu_a, z0, z0t, ztmp0, ztmp1, ztmp2 )
-      IF( .NOT. l_zt_equal_zu ) CALL wrk_dealloc( jpi,jpj, zeta_t )
+      IF( .NOT. l_zt_equal_zu ) DEALLOCATE( zeta_t )
       !
    END SUBROUTINE turb_coare
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_coare3p5.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_coare3p5.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_coare3p5.F90	(revision 9125)
@@ -38,5 +38,4 @@
    USE iom             ! I/O manager library
    USE lib_mpp         ! distribued memory computing library
-   USE wrk_nemo        ! work arrays
    USE in_out_manager  ! I/O manager
    USE prtctl          ! Print control
@@ -111,21 +110,18 @@
       INTEGER , PARAMETER ::   nb_itt = 4       ! number of itterations
       !
-      REAL(wp), DIMENSION(:,:), POINTER  ::  &
+      REAL(wp), DIMENSION(jpi,jpj) ::  &
          &  u_star, t_star, q_star, &
          &  dt_zu, dq_zu,    &
          &  znu_a,           & !: Nu_air, Viscosity of air
          &  z0, z0t
-      REAL(wp), DIMENSION(:,:), POINTER ::   zeta_u        ! stability parameter at height zu
-      REAL(wp), DIMENSION(:,:), POINTER ::   zeta_t        ! stability parameter at height zt
-      REAL(wp), DIMENSION(:,:), POINTER ::   ztmp0, ztmp1, ztmp2
-      !!----------------------------------------------------------------------------------
-      !
-      CALL wrk_alloc( jpi,jpj, u_star, t_star, q_star, zeta_u, dt_zu, dq_zu)
-      CALL wrk_alloc( jpi,jpj, znu_a, z0, z0t, ztmp0, ztmp1, ztmp2 )
-
+      REAL(wp), DIMENSION(jpi,jpj) ::   zeta_u        ! stability parameter at height zu
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztmp0, ztmp1, ztmp2
+      REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   zeta_t        ! stability parameter at height zt
+      !!----------------------------------------------------------------------------------
+      !
       l_zt_equal_zu = .FALSE.
       IF( ABS(zu - zt) < 0.01 ) l_zt_equal_zu = .TRUE.    ! testing "zu == zt" is risky with double precision
 
-      IF( .NOT. l_zt_equal_zu )   CALL wrk_alloc( jpi,jpj, zeta_t )
+      IF( .NOT. l_zt_equal_zu )   ALLOCATE( zeta_t(jpi,jpj) )
 
       !! First guess of temperature and humidity at height zu:
@@ -256,7 +252,5 @@
       Cen = Chn
       !
-      CALL wrk_dealloc( jpi,jpj, u_star, t_star, q_star, zeta_u, dt_zu, dq_zu )
-      CALL wrk_dealloc( jpi,jpj, znu_a, z0, z0t, ztmp0, ztmp1, ztmp2 )
-      IF( .NOT. l_zt_equal_zu ) CALL wrk_dealloc( jpi,jpj, zeta_t )
+      IF( .NOT. l_zt_equal_zu ) DEALLOCATE( zeta_t )
       !
    END SUBROUTINE turb_coare3p5
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_ecmwf.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_ecmwf.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_ecmwf.F90	(revision 9125)
@@ -32,5 +32,4 @@
    USE iom             ! I/O manager library
    USE lib_mpp         ! distribued memory computing library
-   USE wrk_nemo        ! work arrays
    USE in_out_manager  ! I/O manager
    USE prtctl          ! Print control
@@ -118,15 +117,12 @@
       INTEGER , PARAMETER ::   nb_itt = 4       ! number of itterations
       !
-      REAL(wp), DIMENSION(:,:), POINTER  ::   u_star, t_star, q_star,   &
+      REAL(wp), DIMENSION(jpi,jpj) ::   u_star, t_star, q_star,   &
          &  dt_zu, dq_zu,    &
          &  znu_a,           & !: Nu_air, Viscosity of air
          &  Linv,            & !: 1/L (inverse of Monin Obukhov length...
          &  z0, z0t, z0q
-      REAL(wp), DIMENSION(:,:), POINTER ::   func_m, func_h
-      REAL(wp), DIMENSION(:,:), POINTER ::   ztmp0, ztmp1, ztmp2
-      !!----------------------------------------------------------------------------------
-      !
-      CALL wrk_alloc( jpi,jpj,   u_star, t_star, q_star, func_m, func_h, dt_zu, dq_zu, Linv )
-      CALL wrk_alloc( jpi,jpj,   znu_a, z0, z0t, z0q, ztmp0, ztmp1, ztmp2 )
+      REAL(wp), DIMENSION(jpi,jpj) ::   func_m, func_h
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztmp0, ztmp1, ztmp2
+      !!----------------------------------------------------------------------------------
       !
       ! Identical first gess as in COARE, with IFS parameter values though
@@ -286,7 +282,4 @@
       Cen = vkarmn*vkarmn / (log(ztmp1/z0q)*log(ztmp1/z0q))
 
-      CALL wrk_dealloc( jpi,jpj,   u_star, t_star, q_star, func_m, func_h, dt_zu, dq_zu, Linv )
-      CALL wrk_dealloc( jpi,jpj,   znu_a, z0, z0t, z0q, ztmp0, ztmp1, ztmp2 )
-      !
    END SUBROUTINE TURB_ECMWF
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_ncar.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_ncar.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_algo_ncar.F90	(revision 9125)
@@ -34,5 +34,4 @@
    USE iom             ! I/O manager library
    USE lib_mpp         ! distribued memory computing library
-   USE wrk_nemo        ! work arrays
    USE in_out_manager  ! I/O manager
    USE prtctl          ! Print control
@@ -118,14 +117,11 @@
       INTEGER , PARAMETER ::   nb_itt = 4       ! number of itterations
       !
-      REAL(wp), DIMENSION(:,:), POINTER ::   Cx_n10        ! 10m neutral latent/sensible coefficient
-      REAL(wp), DIMENSION(:,:), POINTER ::   sqrt_Cd_n10   ! root square of Cd_n10
-      REAL(wp), DIMENSION(:,:), POINTER ::   zeta_u        ! stability parameter at height zu
-      REAL(wp), DIMENSION(:,:), POINTER ::   zpsi_h_u
-      REAL(wp), DIMENSION(:,:), POINTER ::   ztmp0, ztmp1, ztmp2
-      REAL(wp), DIMENSION(:,:), POINTER ::   stab          ! stability test integer
-      !!----------------------------------------------------------------------------------
-      !
-      CALL wrk_alloc( jpi,jpj,   Cx_n10, sqrt_Cd_n10, zeta_u, stab )
-      CALL wrk_alloc( jpi,jpj,   zpsi_h_u, ztmp0, ztmp1, ztmp2 )
+      REAL(wp), DIMENSION(jpi,jpj) ::   Cx_n10        ! 10m neutral latent/sensible coefficient
+      REAL(wp), DIMENSION(jpi,jpj) ::   sqrt_Cd_n10   ! root square of Cd_n10
+      REAL(wp), DIMENSION(jpi,jpj) ::   zeta_u        ! stability parameter at height zu
+      REAL(wp), DIMENSION(jpi,jpj) ::   zpsi_h_u
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztmp0, ztmp1, ztmp2
+      REAL(wp), DIMENSION(jpi,jpj) ::   stab          ! stability test integer
+      !!----------------------------------------------------------------------------------
       !
       l_zt_equal_zu = .FALSE.
@@ -223,7 +219,4 @@
       END DO
       !
-      CALL wrk_dealloc( jpi,jpj,   Cx_n10, sqrt_Cd_n10, zeta_u, stab )
-      CALL wrk_dealloc( jpi,jpj,   zpsi_h_u, ztmp0, ztmp1, ztmp2 )
-      !
    END SUBROUTINE turb_ncar
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 9125)
@@ -25,4 +25,5 @@
    USE in_out_manager ! I/O manager
    USE lib_mpp        ! distribued memory computing library
+   USE timing         ! Timing
    USE lbclnk         ! ocean lateral boundary conditions
    USE lib_fortran    ! 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 9125)
@@ -18,5 +18,4 @@
    USE lib_mpp         ! distributed memory computing library
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE wrk_nemo        ! work arrays
    USE daymod          ! calendar
    USE fldread         ! read input fields
@@ -155,10 +154,8 @@
       !!---------------------------------------------------------------------
       INTEGER, INTENT( in  ) ::   ksbc                ! surface forcing type
-      REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2
+      REAL(wp), DIMENSION(jpi,jpj) :: ztmp1, ztmp2
       REAL(wp) ::   zcoefu, zcoefv, zcoeff            ! local scalar
       INTEGER  ::   ji, jj, jl, jk                    ! dummy loop indices
       !!---------------------------------------------------------------------
-      !
-      CALL wrk_alloc( jpi,jpj, ztmp1, ztmp2 )
       !
       IF(lwp) WRITE(numout,*)'cice_sbc_init'
@@ -272,6 +269,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 )
-      !
    END SUBROUTINE cice_sbc_init
 
@@ -286,12 +281,9 @@
       !
       INTEGER  ::   ji, jj, jl                   ! dummy loop indices      
-      REAL(wp), DIMENSION(:,:), POINTER :: ztmp, zpice
-      REAL(wp), DIMENSION(:,:,:), POINTER :: ztmpn
+      REAL(wp), DIMENSION(jpi,jpj) :: ztmp, zpice
+      REAL(wp), DIMENSION(jpi,jpj,ncat) :: ztmpn
       REAL(wp) ::   zintb, zintn  ! dummy argument
       !!---------------------------------------------------------------------
       !
-      CALL wrk_alloc( jpi,jpj, ztmp, zpice )
-      CALL wrk_alloc( jpi,jpj,ncat, ztmpn )
-
       IF( kt == nit000 )  THEN
          IF(lwp) WRITE(numout,*)'cice_sbc_in'
@@ -492,7 +484,4 @@
       END DO
       CALL nemo2cice(ztmp,ss_tlty,'F', -1. )
-
-      CALL wrk_dealloc( jpi,jpj, ztmp, zpice )
-      CALL wrk_dealloc( jpi,jpj,ncat, ztmpn )
       !
    END SUBROUTINE cice_sbc_in
@@ -508,9 +497,7 @@
       
       INTEGER  ::   ji, jj, jl                 ! dummy loop indices
-      REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2
-      !!---------------------------------------------------------------------
-      !
-      CALL wrk_alloc( jpi,jpj, ztmp1, ztmp2 )
-      
+      REAL(wp), DIMENSION(jpi,jpj) :: ztmp1, ztmp2
+      !!---------------------------------------------------------------------
+      !
       IF( kt == nit000 )  THEN
          IF(lwp) WRITE(numout,*)'cice_sbc_out'
@@ -660,8 +647,4 @@
       snwice_mass_b(:,:) = snwice_mass(:,:)
       snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) / dt
-
-! Release work space
-
-      CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 )
       !
    END SUBROUTINE cice_sbc_out
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 9125)
@@ -27,5 +27,4 @@
    USE iom            ! I/O module
    USE lib_mpp        ! MPP library
-   USE wrk_nemo       ! Memory allocation
 
    IMPLICIT NONE
@@ -106,7 +105,6 @@
       INTEGER  ::   z_err = 0 ! dummy integer for error handling
       !!----------------------------------------------------------------------
-      REAL(wp), DIMENSION(:,:), POINTER       ::   ztfrz   ! freezing point used for temperature correction
-      !
-      CALL wrk_alloc( jpi,jpj, ztfrz)
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztfrz   ! freezing point used for temperature correction
+      !
       !
       !                                            !-------------------!
@@ -169,6 +167,4 @@
          CALL iom_rstput( kt, nitrst, numrow, 'rnf_sc_b', rnf_tsc(:,:,jp_sal) )
       ENDIF
-      !
-      CALL wrk_dealloc( jpi,jpj, ztfrz)
       !
    END SUBROUTINE sbc_rnf
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 9125)
@@ -16,5 +16,4 @@
    USE ioipsl         ! NetCDF IPSL library
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
-   USE wrk_nemo       !
 
    IMPLICIT NONE
@@ -140,5 +139,5 @@
       INTEGER :: inum                 ! Logical unit of input file
       INTEGER :: ji, jj, itide        ! dummy loop indices
-      REAL(wp), POINTER, DIMENSION(:,:) ::   ztr, zti   !: workspace to read in tidal harmonics data 
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztr, zti   !: workspace to read in tidal harmonics data 
       !!----------------------------------------------------------------------
       IF(lwp) THEN
@@ -147,6 +146,4 @@
          WRITE(numout,*) '~~~~~~~~~~~~~~ '
       ENDIF
-      !
-      CALL wrk_alloc( jpi, jpj, zti, ztr )
       !
       CALL iom_open ( cn_tide_load , inum )
@@ -166,6 +163,4 @@
       CALL iom_close( inum )
       !
-      CALL wrk_dealloc( jpi, jpj, zti, ztr )
-      !
    END SUBROUTINE tide_init_load
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90	(revision 9125)
@@ -27,5 +27,4 @@
    USE lib_mpp        ! distribued memory computing library
    USE fldread	       ! read input fields
-   USE wrk_nemo       !
 
    IMPLICIT NONE
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90	(revision 9125)
@@ -37,5 +37,4 @@
    USE restart         ! for lrst_oce
    USE lib_mpp         ! MPP library
-   USE wrk_nemo        ! Memory allocation
    USE iom
 
@@ -253,8 +252,6 @@
       !
       INTEGER ::   ji, jj, jk, isum
-      REAL(wp), POINTER, DIMENSION(:,:)  :: zvlmsk 
-      !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, zvlmsk ) 
+      REAL(wp), DIMENSION(jpi,jpj)  :: zvlmsk 
+      !!----------------------------------------------------------------------
 
       ! I. Definition of control surface and associated fields
@@ -280,6 +277,4 @@
 
       END IF
-      !
-      CALL wrk_dealloc( jpi, jpj, zvlmsk ) 
       !
    END SUBROUTINE trd_mxl_zint
@@ -339,13 +334,9 @@
       !                                              ! z(ts)mltot : dT/dt over the anlysis window (including Asselin)
       !                                              ! z(ts)mlres : residual = dh/dt entrainment term
-      REAL(wp), POINTER, DIMENSION(:,:  ) ::  ztmltot , zsmltot , ztmlres , zsmlres , ztmlatf , zsmlatf
-      REAL(wp), POINTER, DIMENSION(:,:  ) ::  ztmltot2, zsmltot2, ztmlres2, zsmlres2, ztmlatf2, zsmlatf2, ztmltrdm2, zsmltrdm2  
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztmltrd2, zsmltrd2   ! only needed for mean diagnostics
+      REAL(wp), DIMENSION(jpi,jpj  )   ::  ztmltot , zsmltot , ztmlres , zsmlres , ztmlatf , zsmlatf
+      REAL(wp), DIMENSION(jpi,jpj  )   ::  ztmltot2, zsmltot2, ztmlres2, zsmlres2, ztmlatf2, zsmlatf2, ztmltrdm2, zsmltrdm2  
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::  ztmltrd2, zsmltrd2   ! only needed for mean diagnostics
       !!----------------------------------------------------------------------
   
-      CALL wrk_alloc( jpi, jpj,         ztmltot , zsmltot , ztmlres , zsmlres , ztmlatf , zsmlatf                        )
-      CALL wrk_alloc( jpi, jpj,         ztmltot2, zsmltot2, ztmlres2, zsmlres2, ztmlatf2, zsmlatf2, ztmltrdm2, zsmltrdm2 )  
-      CALL wrk_alloc( jpi, jpj, jpltrd, ztmltrd2, zsmltrd2                                                               )
-
       ! ======================================================================
       ! II. Cumulate the trends over the analysis window
@@ -719,7 +710,4 @@
       IF( lrst_oce )   CALL trd_mxl_rst_write( kt ) 
 
-      CALL wrk_dealloc( jpi, jpj,         ztmltot , zsmltot , ztmlres , zsmlres , ztmlatf , zsmlatf                        )
-      CALL wrk_dealloc( jpi, jpj,         ztmltot2, zsmltot2, ztmlres2, zsmlres2, ztmlatf2, zsmlatf2, ztmltrdm2, zsmltrdm2 )  
-      CALL wrk_dealloc( jpi, jpj, jpltrd, ztmltrd2, zsmltrd2                                                               )
       !
    END SUBROUTINE trd_mxl
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90	(revision 9125)
@@ -24,5 +24,4 @@
    USE iom            ! I/O manager library
    USE lib_mpp        ! MPP library
-   USE wrk_nemo       ! Memory allocation
 
    IMPLICIT NONE
@@ -70,9 +69,8 @@
       !
       INTEGER ::   jk                                            ! dummy loop indices
-      REAL(wp), POINTER, DIMENSION(:,:)      ::   z2d            ! 2D workspace 
-      REAL(wp), POINTER, DIMENSION(:,:,:)    ::   zpe            ! 3D workspace 
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:)      ::   z2d            ! 2D workspace 
+      REAL(wp), DIMENSION(jpi,jpj,jpk)           ::   zpe            ! 3D workspace 
       !!----------------------------------------------------------------------
       !
-      CALL wrk_alloc( jpi, jpj, jpk, zpe )
       zpe(:,:,:) = 0._wp
       !
@@ -96,5 +94,5 @@
       CASE ( jptra_zad  )   ;   CALL iom_put( "petrd_zad", zpe )   ! vertical advection
                                 IF( ln_linssh ) THEN                   ! cst volume : adv flux through z=0 surface
-                                   CALL wrk_alloc( jpi, jpj, z2d )
+                                   ALLOCATE( z2d(jpi,jpj) )
                                    z2d(:,:) = wn(:,:,1) * ( &
                                      &   - ( rab_n(:,:,1,jp_tem) + rab_pe(:,:,1,jp_tem) ) * tsn(:,:,1,jp_tem)    &
@@ -102,5 +100,5 @@
                                      & ) / e3t_n(:,:,1)
                                    CALL iom_put( "petrd_sad" , z2d )
-                                   CALL wrk_dealloc( jpi, jpj, z2d )
+                                   DEALLOCATE( z2d )
                                 ENDIF
       CASE ( jptra_ldf  )   ;   CALL iom_put( "petrd_ldf" , zpe )   ! lateral  diffusion
@@ -115,15 +113,14 @@
       CASE ( jptra_atf  )   ;   CALL iom_put( "petrd_atf" , zpe )   ! asselin time filter (last trend)
                                 !IF( ln_linssh ) THEN                   ! cst volume : ssh term (otherwise include in e3t variation)
-                                !   CALL wrk_alloc( jpi, jpj, z2d )
+                                !   ALLOCATE( z2d(jpi,jpj) )
                                 !   z2d(:,:) = ( ssha(:,:) - sshb(:,:) )                 &
                                 !      &     * (   dPE_dt(:,:,1) * tsn(:,:,1,jp_tem)    &
                                 !      &         + dPE_ds(:,:,1) * tsn(:,:,1,jp_sal)  ) / ( e3t_n(:,:,1) * pdt )
                                 !   CALL iom_put( "petrd_sad" , z2d )
-                                !   CALL wrk_dealloc( jpi, jpj, z2d )
+                                !   DEALLOCATE( z2d )
                                 !ENDIF
          !
       END SELECT
       !
-      CALL wrk_dealloc( jpi, jpj, jpk, zpe )
       !
    END SUBROUTINE trd_pen
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 9125)
@@ -28,5 +28,4 @@
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp         ! MPP library
-   USE wrk_nemo        ! Memory allocation
 
    IMPLICIT NONE
@@ -91,8 +90,6 @@
       !
       INTEGER ::   ji, jj   ! dummy loop indices
-      REAL(wp), POINTER, DIMENSION(:,:) ::   ztswu, ztswv    ! 2D workspace 
-      !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, ztswu, ztswv )
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztswu, ztswv    ! 2D workspace 
+      !!----------------------------------------------------------------------
 
       SELECT CASE( ktrd ) 
@@ -122,6 +119,4 @@
       END SELECT
       !
-      CALL wrk_dealloc( jpi, jpj, ztswu, ztswv )
-      !
    END SUBROUTINE trd_vor
 
@@ -160,9 +155,7 @@
       INTEGER ::   ji, jj       ! dummy loop indices
       INTEGER ::   ikbu, ikbv   ! local integers
-      REAL(wp), POINTER, DIMENSION(:,:) :: zudpvor, zvdpvor  ! total cmulative trends
-      !!----------------------------------------------------------------------
-
-      !
-      CALL wrk_alloc( jpi, jpj, zudpvor, zvdpvor )                                     ! Memory allocation
+      REAL(wp), DIMENSION(jpi,jpj) :: zudpvor, zvdpvor  ! total cmulative trends
+      !!----------------------------------------------------------------------
+
       !
 
@@ -210,6 +203,4 @@
          CALL FLUSH(numout)
       ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj, zudpvor, zvdpvor )                                   
       !
    END SUBROUTINE trd_vor_zint_2d
@@ -249,10 +240,8 @@
       !
       INTEGER ::   ji, jj, jk   ! dummy loop indices
-      REAL(wp), POINTER, DIMENSION(:,:) :: zubet  , zvbet    ! Beta.V   
-      REAL(wp), POINTER, DIMENSION(:,:) :: zudpvor, zvdpvor  ! total cmulative trends
+      REAL(wp), DIMENSION(jpi,jpj) :: zubet  , zvbet    ! Beta.V   
+      REAL(wp), DIMENSION(jpi,jpj) :: zudpvor, zvdpvor  ! total cmulative trends
       !!----------------------------------------------------------------------
      
-      CALL wrk_alloc( jpi,jpj, zubet, zvbet, zudpvor, zvdpvor )                                   
-
       ! Initialization
       zubet  (:,:) = 0._wp
@@ -306,6 +295,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi,jpj, zubet, zvbet, zudpvor, zvdpvor )                                   
-      !
    END SUBROUTINE trd_vor_zint_3d
 
@@ -323,8 +310,6 @@
       INTEGER  ::   it, itmod        ! local integers
       REAL(wp) ::   zmean            ! local scalars
-      REAL(wp), POINTER, DIMENSION(:,:) :: zun, zvn
-      !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, zun, zvn )                                   
+      REAL(wp), DIMENSION(jpi,jpj) :: zun, zvn
+      !!----------------------------------------------------------------------
 
       !  =================
@@ -458,6 +443,4 @@
       IF( kt == nitend )   CALL histclo( nidvor )
       !
-      CALL wrk_dealloc( jpi, jpj, zun, zvn )                                   
-      !
    END SUBROUTINE trd_vor_iom
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_zgr.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_zgr.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_zgr.F90	(revision 9125)
@@ -23,5 +23,4 @@
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp        ! distributed memory computing library
-   USE wrk_nemo       ! Memory allocation
 
    IMPLICIT NONE
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfiwm.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfiwm.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfiwm.F90	(revision 9125)
@@ -27,5 +27,4 @@
    USE iom            ! I/O Manager
    USE lib_mpp        ! MPP library
-   USE wrk_nemo       ! work arrays
    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
 
Index: anches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90	(revision 9124)
+++ 	(revision )
@@ -1,599 +1,0 @@
-MODULE wrk_nemo
-   !!======================================================================
-   !!                       ***  MODULE  wrk_nemo  ***
-   !! NEMO work space:  define and allocate work-space arrays used in 
-   !! all components of NEMO
-   !!======================================================================
-   !! History :  4.0  !  2011-01  (A Porter)  Original code
-   !!----------------------------------------------------------------------
-
-   !!----------------------------------------------------------------------
-   !!   wrk_alloc         : get work space arrays
-   !!   wrk_dealloc       : release work space arrays
-   !!
-   !! 1d arrays:
-   !!   REAL(wp), POINTER, DIMENSION(:) :: arr1, arr2, ... arr10
-   !!    or
-   !!   INTEGER, POINTER, DIMENSION(:) :: arr1, arr2, ... arr10
-   !!   ...
-   !!   CALL wrk_alloc( nx, arr1, arr2, ... arr10, kistart = kistart )
-   !!   ...
-   !!   CALL wrk_dealloc( nx, arr1, arr2, ... arr10, kistart = kistart)
-   !!   with:
-   !!     - arr*: 1d arrays. real or (not and) integer
-   !!     - nx: size of the 1d arr* arrays
-   !!     - arr2, ..., arr10: optional parameters
-   !!     - kistart: optional parameter to lower bound of the 1st dimension (default = 1)
-   !!
-   !! 2d arrays:
-   !!   REAL(wp), POINTER, DIMENSION(:,:) :: arr1, arr2, ... arr10
-   !!    or
-   !!   INTEGER, POINTER, DIMENSION(:,:) :: arr1, arr2, ... arr10
-   !!   ...
-   !!   CALL wrk_alloc( nx, ny, arr1, arr2, ... arr10, kistart = kistart, kjstart = kjstart )
-   !!   ...
-   !!   CALL wrk_dealloc( nx, ny, arr1, arr2, ... arr10, kistart = kistart, kjstart = kjstart )
-   !!   with:
-   !!     - arr* 2d arrays. real or (not and) integer
-   !!     - nx, ny: size of the 2d arr* arrays
-   !!     - arr2, ..., arr10: optional parameters
-   !!     - kistart, kjstart: optional parameters to lower bound of the 1st/2nd dimension (default = 1)
-   !!
-   !! 3d arrays:
-   !!   REAL(wp), POINTER, DIMENSION(:,:,:) :: arr1, arr2, ... arr10
-   !!    or
-   !!   INTEGER, POINTER, DIMENSION(:,:,:) :: arr1, arr2, ... arr10
-   !!   ...
-   !!   CALL wrk_alloc( nx, ny, nz, arr1, arr2, ... arr10, kistart = kistart, kjstart = kjstart, kkstart = kkstart )
-   !!   ...
-   !!   CALL wrk_dealloc( nx, ny, nz, arr1, arr2, ... arr10, kistart = kistart, kjstart = kjstart, kkstart = kkstart )
-   !!   with:
-   !!     - arr* 3d arrays. real or (not and) integer
-   !!     - nx, ny, nz: size of the 3d arr* arrays
-   !!     - arr2, ..., arr10: optional parameters
-   !!     - kistart, kjstart, kkstart: optional parameters to lower bound of the 1st/2nd/3rd dimension (default = 1)
-   !!
-   !! 4d arrays:
-   !!   REAL(wp), POINTER, DIMENSION(:,:,:,:) :: arr1, arr2, ... arr10
-   !!    or
-   !!   INTEGER, POINTER, DIMENSION(:,:,:,:) :: arr1, arr2, ... arr10
-   !!   ...
-   !!   CALL wrk_alloc( nx, ny, nz, nl, arr1, arr2, ... arr10, &
-   !!      &            kistart = kistart, kjstart = kjstart, kkstart = kkstart, klstart = klstart )
-   !!   ...
-   !!   CALL wrk_dealloc( nx, ny, nz, nl, arr1, arr2, ... arr10, &
-   !!      &            kistart = kistart, kjstart = kjstart, kkstart = kkstart, klstart = klstart )
-   !!   with:
-   !!     - arr* 3d arrays. real or (not and) integer
-   !!     - nx, ny, nz, nl: size of the 4d arr* arrays
-   !!     - arr2, ..., arr10: optional parameters
-   !!     - kistart, kjstart, kkstart, klstart: optional parameters to lower bound of the 1st/2nd/3rd/4th dimension (default = 1)
-   !!   
-   !!----------------------------------------------------------------------
-   USE par_oce        ! ocean parameters
-
-   IMPLICIT NONE
-   PRIVATE
-   
-   PUBLIC wrk_alloc, wrk_dealloc, wrk_list
-
-   INTERFACE wrk_alloc
-      MODULE PROCEDURE wrk_alloc_1dr, wrk_alloc_2dr, wrk_alloc_3dr, wrk_alloc_4dr,   &
-         &             wrk_alloc_1di, wrk_alloc_2di, wrk_alloc_3di, wrk_alloc_4di
-   END INTERFACE
-
-   INTERFACE wrk_dealloc
-      MODULE PROCEDURE wrk_dealloc_1dr, wrk_dealloc_2dr, wrk_dealloc_3dr, wrk_dealloc_4dr,   &
-         &             wrk_dealloc_1di, wrk_dealloc_2di, wrk_dealloc_3di, wrk_dealloc_4di
-   END INTERFACE
-
-
-   INTEGER, PARAMETER :: jparray = 1000
-   INTEGER, PARAMETER :: jpmaxdim = 4
-
-   INTEGER, PARAMETER :: jpnotdefined = 0
-   INTEGER, PARAMETER :: jpinteger = 1
-   INTEGER, PARAMETER :: jpreal = 2
-  
-   TYPE leaf
-      LOGICAL :: in_use
-      INTEGER :: indic
-      INTEGER , DIMENSION(:)      , POINTER :: iwrk1d => NULL()    
-      INTEGER , DIMENSION(:,:)    , POINTER :: iwrk2d => NULL()    
-      INTEGER , DIMENSION(:,:,:)  , POINTER :: iwrk3d => NULL()    
-      INTEGER , DIMENSION(:,:,:,:), POINTER :: iwrk4d => NULL()    
-      REAL(wp), DIMENSION(:)      , POINTER :: zwrk1d => NULL()    
-      REAL(wp), DIMENSION(:,:)    , POINTER :: zwrk2d => NULL()    
-      REAL(wp), DIMENSION(:,:,:)  , POINTER :: zwrk3d => NULL()    
-      REAL(wp), DIMENSION(:,:,:,:), POINTER :: zwrk4d => NULL()    
-      TYPE (leaf), POINTER :: next => NULL() 
-      TYPE (leaf), POINTER :: prev => NULL() 
-   END TYPE leaf
-   
-   TYPE branch
-      INTEGER :: itype
-      INTEGER, DIMENSION(jpmaxdim) :: ishape, istart
-      TYPE(leaf), POINTER :: start => NULL()     
-      TYPE(leaf), POINTER :: current => NULL()      
-   END TYPE branch
-
-   TYPE(branch), SAVE, DIMENSION(jparray) :: tree
-
-   LOGICAL ::   linit = .FALSE.
-   LOGICAL ::   ldebug = .FALSE.
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
-   !! $Id$
-   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-CONTAINS
-
-   SUBROUTINE wrk_list
-      ! to list 3d arrays in use, to be duplicated for all cases 
-      WRITE(*,*) 'Arrays in use :'
-      !      CALL listage(tree_3d(1)%s_wrk_3d_start)
-      WRITE(*,*) ''
-      
-   END SUBROUTINE wrk_list
-   
-   
-   RECURSIVE SUBROUTINE listage(ptr)
-      
-      TYPE(leaf), POINTER, INTENT(in) :: ptr
-      !
-      IF( ASSOCIATED(ptr%next) ) CALL listage(ptr%next)
-      WRITE(*,*) ptr%in_use, ptr%indic   
-      
-   END SUBROUTINE listage
-
-
-   SUBROUTINE wrk_alloc_1dr( kidim, p1d01, p1d02, p1d03, p1d04, p1d05, p1d06, p1d07, p1d08, p1d09, p1d10, kistart )
-      INTEGER                        , INTENT(in   )           ::   kidim   ! dimensions size
-      REAL(wp), POINTER, DIMENSION(:), INTENT(inout)           ::   p1d01
-      REAL(wp), POINTER, DIMENSION(:), INTENT(inout), OPTIONAL ::   p1d02,p1d03,p1d04,p1d05,p1d06,p1d07,p1d08,p1d09,p1d10
-      INTEGER                        , INTENT(in   ), OPTIONAL ::   kistart
-      !
-      CALL wrk_alloc_xd( kidim, 0, 0, 0, kistart, 1, 1, 1,                                            &
-         &               p1d01 = p1d01, p1d02 = p1d02, p1d03 = p1d03, p1d04 = p1d04, p1d05 = p1d05,   &
-         &               p1d06 = p1d06, p1d07 = p1d07, p1d08 = p1d08, p1d09 = p1d09, p1d10 = p1d10    )
-      !
-   END SUBROUTINE wrk_alloc_1dr
-
-
-   SUBROUTINE wrk_alloc_1di( kidim, k1d01, k1d02, k1d03, k1d04, k1d05, k1d06, k1d07, k1d08, k1d09, k1d10, kistart )
-      INTEGER                        , INTENT(in   )           ::   kidim   ! dimensions size
-      INTEGER , POINTER, DIMENSION(:), INTENT(inout)           ::   k1d01
-      INTEGER , POINTER, DIMENSION(:), INTENT(inout), OPTIONAL ::   k1d02,k1d03,k1d04,k1d05,k1d06,k1d07,k1d08,k1d09,k1d10
-      INTEGER                        , INTENT(in   ), OPTIONAL ::   kistart
-      !
-      CALL wrk_alloc_xd( kidim, 0, 0, 0, kistart, 1, 1, 1,                                            &
-         &               k1d01 = k1d01, k1d02 = k1d02, k1d03 = k1d03, k1d04 = k1d04, k1d05 = k1d05,   &
-         &               k1d06 = k1d06, k1d07 = k1d07, k1d08 = k1d08, k1d09 = k1d09, k1d10 = k1d10    )
-      !
-   END SUBROUTINE wrk_alloc_1di
-
-
-   SUBROUTINE wrk_alloc_2dr( kidim, kjdim, p2d01, p2d02, p2d03, p2d04, p2d05, p2d06, p2d07, p2d08, p2d09, p2d10, kistart, kjstart )
-      INTEGER                          , INTENT(in   )           ::   kidim, kjdim   ! dimensions size
-      REAL(wp), POINTER, DIMENSION(:,:), INTENT(inout)           ::   p2d01
-      REAL(wp), POINTER, DIMENSION(:,:), INTENT(inout), OPTIONAL ::   p2d02,p2d03,p2d04,p2d05,p2d06,p2d07,p2d08,p2d09,p2d10
-      INTEGER                          , INTENT(in   ), OPTIONAL ::   kistart, kjstart
-      !
-      CALL wrk_alloc_xd( kidim, kjdim, 0, 0, kistart, kjstart, 1, 1,                                  &
-         &               p2d01 = p2d01, p2d02 = p2d02, p2d03 = p2d03, p2d04 = p2d04, p2d05 = p2d05,   &
-         &               p2d06 = p2d06, p2d07 = p2d07, p2d08 = p2d08, p2d09 = p2d09, p2d10 = p2d10    )
-      !
-   END SUBROUTINE wrk_alloc_2dr
-
-
-   SUBROUTINE wrk_alloc_2di( kidim, kjdim, k2d01, k2d02, k2d03, k2d04, k2d05, k2d06, k2d07, k2d08, k2d09, k2d10, kistart, kjstart )
-      INTEGER                          , INTENT(in   )           ::   kidim, kjdim   ! dimensions size
-      INTEGER , POINTER, DIMENSION(:,:), INTENT(inout)           ::   k2d01
-      INTEGER , POINTER, DIMENSION(:,:), INTENT(inout), OPTIONAL ::   k2d02,k2d03,k2d04,k2d05,k2d06,k2d07,k2d08,k2d09,k2d10
-      INTEGER                          , INTENT(in   ), OPTIONAL ::   kistart, kjstart
-      !
-      CALL wrk_alloc_xd( kidim, kjdim, 0, 0, kistart, kjstart, 1, 1,                                  &
-         &               k2d01 = k2d01, k2d02 = k2d02, k2d03 = k2d03, k2d04 = k2d04, k2d05 = k2d05,   &
-         &               k2d06 = k2d06, k2d07 = k2d07, k2d08 = k2d08, k2d09 = k2d09, k2d10 = k2d10    )
-      !
-   END SUBROUTINE wrk_alloc_2di
-
-
-   SUBROUTINE wrk_alloc_3dr( kidim, kjdim, kkdim, p3d01, p3d02, p3d03, p3d04, p3d05, p3d06, p3d07, p3d08, p3d09, p3d10,   &
-      &                      kistart, kjstart, kkstart )
-      INTEGER                            , INTENT(in   )           ::   kidim, kjdim, kkdim   ! dimensions size
-      REAL(wp), POINTER, DIMENSION(:,:,:), INTENT(inout)           ::   p3d01
-      REAL(wp), POINTER, DIMENSION(:,:,:), INTENT(inout), OPTIONAL ::   p3d02,p3d03,p3d04,p3d05,p3d06,p3d07,p3d08,p3d09,p3d10
-      INTEGER                            , INTENT(in   ), OPTIONAL ::   kistart, kjstart, kkstart
-      !
-      CALL wrk_alloc_xd( kidim, kjdim, kkdim, 0, kistart, kjstart, kkstart, 1,                        &
-         &               p3d01 = p3d01, p3d02 = p3d02, p3d03 = p3d03, p3d04 = p3d04, p3d05 = p3d05,   &
-         &               p3d06 = p3d06, p3d07 = p3d07, p3d08 = p3d08, p3d09 = p3d09, p3d10 = p3d10    )
-      !
-   END SUBROUTINE wrk_alloc_3dr
-
-
-   SUBROUTINE wrk_alloc_3di( kidim, kjdim, kkdim, k3d01, k3d02, k3d03, k3d04, k3d05, k3d06, k3d07, k3d08, k3d09, k3d10,   &
-      &                      kistart, kjstart, kkstart )
-      INTEGER                            , INTENT(in   )           ::   kidim, kjdim, kkdim   ! dimensions size
-      INTEGER , POINTER, DIMENSION(:,:,:), INTENT(inout)           ::   k3d01
-      INTEGER , POINTER, DIMENSION(:,:,:), INTENT(inout), OPTIONAL ::   k3d02,k3d03,k3d04,k3d05,k3d06,k3d07,k3d08,k3d09,k3d10
-      INTEGER                            , INTENT(in   ), OPTIONAL ::   kistart, kjstart, kkstart
-      !
-      CALL wrk_alloc_xd( kidim, kjdim, kkdim, 0, kistart, kjstart, kkstart, 1,                        &
-         &               k3d01 = k3d01, k3d02 = k3d02, k3d03 = k3d03, k3d04 = k3d04, k3d05 = k3d05,   &
-         &               k3d06 = k3d06, k3d07 = k3d07, k3d08 = k3d08, k3d09 = k3d09, k3d10 = k3d10    )
-      !
-   END SUBROUTINE wrk_alloc_3di
-
-
-   SUBROUTINE wrk_alloc_4dr( kidim, kjdim, kkdim, kldim, p4d01, p4d02, p4d03, p4d04, p4d05, p4d06, p4d07, p4d08, p4d09, p4d10,   &
-      &                      kistart, kjstart, kkstart, klstart )
-      INTEGER                              , INTENT(in   )           ::   kidim, kjdim, kkdim, kldim   ! dimensions size
-      REAL(wp), POINTER, DIMENSION(:,:,:,:), INTENT(inout)           ::   p4d01
-      REAL(wp), POINTER, DIMENSION(:,:,:,:), INTENT(inout), OPTIONAL ::   p4d02,p4d03,p4d04,p4d05,p4d06,p4d07,p4d08,p4d09,p4d10
-      INTEGER                              , INTENT(in   ), OPTIONAL ::   kistart, kjstart, kkstart, klstart
-      !
-      CALL wrk_alloc_xd( kidim, kjdim, kkdim, kldim, kistart, kjstart, kkstart, klstart,              &
-         &               p4d01 = p4d01, p4d02 = p4d02, p4d03 = p4d03, p4d04 = p4d04, p4d05 = p4d05,   &
-         &               p4d06 = p4d06, p4d07 = p4d07, p4d08 = p4d08, p4d09 = p4d09, p4d10 = p4d10    )
-      !
-   END SUBROUTINE wrk_alloc_4dr
-
-
-   SUBROUTINE wrk_alloc_4di( kidim, kjdim, kkdim, kldim, k4d01, k4d02, k4d03, k4d04, k4d05, k4d06, k4d07, k4d08, k4d09, k4d10,   &
-      &                      kistart, kjstart, kkstart, klstart )
-      INTEGER                              , INTENT(in   )           ::   kidim, kjdim, kkdim, kldim   ! dimensions size
-      INTEGER , POINTER, DIMENSION(:,:,:,:), INTENT(inout)           ::   k4d01
-      INTEGER , POINTER, DIMENSION(:,:,:,:), INTENT(inout), OPTIONAL ::   k4d02,k4d03,k4d04,k4d05,k4d06,k4d07,k4d08,k4d09,k4d10
-      INTEGER                              , INTENT(in   ), OPTIONAL ::   kistart, kjstart, kkstart, klstart
-      !
-      CALL wrk_alloc_xd( kidim, kjdim, kkdim, kldim, kistart, kjstart, kkstart, klstart,              &
-         &               k4d01 = k4d01, k4d02 = k4d02, k4d03 = k4d03, k4d04 = k4d04, k4d05 = k4d05,   &
-         &               k4d06 = k4d06, k4d07 = k4d07, k4d08 = k4d08, k4d09 = k4d09, k4d10 = k4d10    )
-      !
-   END SUBROUTINE wrk_alloc_4di
-
-
-   SUBROUTINE wrk_dealloc_1dr( kidim, p1d01, p1d02, p1d03, p1d04, p1d05, p1d06, p1d07, p1d08, p1d09, p1d10, kistart )
-      INTEGER                        , INTENT(in   )           ::   kidim   ! dimensions size
-      REAL(wp), POINTER, DIMENSION(:), INTENT(inout)           ::   p1d01
-      REAL(wp), POINTER, DIMENSION(:), INTENT(inout), OPTIONAL ::   p1d02,p1d03,p1d04,p1d05,p1d06,p1d07,p1d08,p1d09,p1d10
-      INTEGER                        , INTENT(in   ), OPTIONAL ::   kistart
-      !
-      INTEGER :: icnt, jn
-      icnt = 1 + COUNT( (/                PRESENT(p1d02),PRESENT(p1d03),PRESENT(p1d04),PRESENT(p1d05),   &
-         &                 PRESENT(p1d06),PRESENT(p1d07),PRESENT(p1d08),PRESENT(p1d09),PRESENT(p1d10) /) )
-      DO jn = 1, icnt   ;   CALL wrk_deallocbase( jpreal, kidim, 0, 0, 0, kistart, 1, 1, 1)   ;   END DO
-      !
-   END SUBROUTINE wrk_dealloc_1dr
-
-
-   SUBROUTINE wrk_dealloc_1di( kidim, k1d01, k1d02, k1d03, k1d04, k1d05, k1d06, k1d07, k1d08, k1d09, k1d10, kistart )
-      INTEGER                        , INTENT(in   )           ::   kidim   ! dimensions size
-      INTEGER , POINTER, DIMENSION(:), INTENT(inout)           ::   k1d01
-      INTEGER , POINTER, DIMENSION(:), INTENT(inout), OPTIONAL ::   k1d02,k1d03,k1d04,k1d05,k1d06,k1d07,k1d08,k1d09,k1d10
-      INTEGER                        , INTENT(in   ), OPTIONAL ::   kistart
-      !
-      INTEGER :: icnt, jn
-      icnt = 1 + COUNT( (/                PRESENT(k1d02),PRESENT(k1d03),PRESENT(k1d04),PRESENT(k1d05),   &
-         &                 PRESENT(k1d06),PRESENT(k1d07),PRESENT(k1d08),PRESENT(k1d09),PRESENT(k1d10) /) )
-      DO jn = 1, icnt   ;   CALL wrk_deallocbase( jpinteger, kidim, 0, 0, 0, kistart, 1, 1, 1 )   ;   END DO
-      !
-   END SUBROUTINE wrk_dealloc_1di
-
-
-   SUBROUTINE wrk_dealloc_2dr( kidim, kjdim, p2d01, p2d02, p2d03, p2d04, p2d05, p2d06, p2d07, p2d08, p2d09, p2d10, kistart,kjstart )
-      INTEGER                          , INTENT(in   )           ::   kidim, kjdim   ! dimensions size
-      REAL(wp), POINTER, DIMENSION(:,:), INTENT(inout)           ::   p2d01
-      REAL(wp), POINTER, DIMENSION(:,:), INTENT(inout), OPTIONAL ::   p2d02,p2d03,p2d04,p2d05,p2d06,p2d07,p2d08,p2d09,p2d10
-      INTEGER                          , INTENT(in   ), OPTIONAL ::   kistart, kjstart
-      !
-      INTEGER :: icnt, jn
-      icnt = 1 + COUNT( (/                PRESENT(p2d02),PRESENT(p2d03),PRESENT(p2d04),PRESENT(p2d05),   &
-         &                 PRESENT(p2d06),PRESENT(p2d07),PRESENT(p2d08),PRESENT(p2d09),PRESENT(p2d10) /) )
-      DO jn = 1, icnt   ;   CALL wrk_deallocbase( jpreal, kidim, kjdim, 0, 0, kistart, kjstart, 1, 1 )   ;   END DO
-      !
-   END SUBROUTINE wrk_dealloc_2dr
-
-
-   SUBROUTINE wrk_dealloc_2di( kidim, kjdim, k2d01, k2d02, k2d03, k2d04, k2d05, k2d06, k2d07, k2d08, k2d09, k2d10, kistart,kjstart )
-      INTEGER                          , INTENT(in   )           ::   kidim, kjdim   ! dimensions size
-      INTEGER , POINTER, DIMENSION(:,:), INTENT(inout)           ::   k2d01
-      INTEGER , POINTER, DIMENSION(:,:), INTENT(inout), OPTIONAL ::   k2d02,k2d03,k2d04,k2d05,k2d06,k2d07,k2d08,k2d09,k2d10
-      INTEGER                          , INTENT(in   ), OPTIONAL ::   kistart, kjstart
-      !
-      INTEGER :: icnt, jn
-      icnt = 1 + COUNT( (/                PRESENT(k2d02),PRESENT(k2d03),PRESENT(k2d04),PRESENT(k2d05),   &
-         &                 PRESENT(k2d06),PRESENT(k2d07),PRESENT(k2d08),PRESENT(k2d09),PRESENT(k2d10) /) )
-      DO jn = 1, icnt   ;   CALL wrk_deallocbase( jpinteger, kidim, kjdim, 0, 0, kistart, kjstart, 1, 1 )   ;   END DO
-      !
-   END SUBROUTINE wrk_dealloc_2di
-
-
-   SUBROUTINE wrk_dealloc_3dr( kidim, kjdim, kkdim, p3d01, p3d02, p3d03, p3d04, p3d05, p3d06, p3d07, p3d08, p3d09, p3d10,   &
-      &                        kistart, kjstart, kkstart )
-      INTEGER                            , INTENT(in   )           ::   kidim, kjdim, kkdim   ! dimensions size
-      REAL(wp), POINTER, DIMENSION(:,:,:), INTENT(inout)           ::   p3d01
-      REAL(wp), POINTER, DIMENSION(:,:,:), INTENT(inout), OPTIONAL ::   p3d02,p3d03,p3d04,p3d05,p3d06,p3d07,p3d08,p3d09,p3d10
-      INTEGER                            , INTENT(in   ), OPTIONAL ::   kistart, kjstart, kkstart
-      !
-      INTEGER :: icnt, jn
-      icnt = 1 + COUNT( (/                PRESENT(p3d02),PRESENT(p3d03),PRESENT(p3d04),PRESENT(p3d05),   &
-         &                 PRESENT(p3d06),PRESENT(p3d07),PRESENT(p3d08),PRESENT(p3d09),PRESENT(p3d10) /) )
-      DO jn = 1, icnt   ;   CALL wrk_deallocbase( jpreal, kidim, kjdim, kkdim, 0, kistart, kjstart, kkstart, 1 )   ;   END DO
-      !
-   END SUBROUTINE wrk_dealloc_3dr
-
-
-   SUBROUTINE wrk_dealloc_3di( kidim, kjdim, kkdim, k3d01, k3d02, k3d03, k3d04, k3d05, k3d06, k3d07, k3d08, k3d09, k3d10,   &
-      &                        kistart, kjstart, kkstart )
-      INTEGER                            , INTENT(in   )           ::   kidim, kjdim, kkdim   ! dimensions size
-      INTEGER , POINTER, DIMENSION(:,:,:), INTENT(inout)           ::   k3d01
-      INTEGER , POINTER, DIMENSION(:,:,:), INTENT(inout), OPTIONAL ::   k3d02,k3d03,k3d04,k3d05,k3d06,k3d07,k3d08,k3d09,k3d10
-      INTEGER                            , INTENT(in   ), OPTIONAL ::   kistart, kjstart, kkstart
-      !
-      INTEGER :: icnt, jn
-      icnt = 1 + COUNT( (/                PRESENT(k3d02),PRESENT(k3d03),PRESENT(k3d04),PRESENT(k3d05),   &
-         &                 PRESENT(k3d06),PRESENT(k3d07),PRESENT(k3d08),PRESENT(k3d09),PRESENT(k3d10) /) )
-      DO jn = 1, icnt   ;   CALL wrk_deallocbase( jpinteger, kidim, kjdim, kkdim, 0, kistart, kjstart, kkstart, 1 )   ;   END DO
-      !
-   END SUBROUTINE wrk_dealloc_3di
-
-
-   SUBROUTINE wrk_dealloc_4dr( kidim, kjdim, kkdim, kldim, p4d01, p4d02, p4d03, p4d04, p4d05, p4d06, p4d07, p4d08, p4d09, p4d10,   &
-      &                        kistart, kjstart, kkstart, klstart )
-      INTEGER                              , INTENT(in   )           ::   kidim, kjdim, kkdim, kldim   ! dimensions size
-      REAL(wp), POINTER, DIMENSION(:,:,:,:), INTENT(inout)           ::   p4d01
-      REAL(wp), POINTER, DIMENSION(:,:,:,:), INTENT(inout), OPTIONAL ::   p4d02,p4d03,p4d04,p4d05,p4d06,p4d07,p4d08,p4d09,p4d10
-      INTEGER                              , INTENT(in   ), OPTIONAL ::   kistart, kjstart, kkstart, klstart
-      !
-      INTEGER :: icnt, jn
-      icnt = 1 + COUNT( (/                PRESENT(p4d02),PRESENT(p4d03),PRESENT(p4d04),PRESENT(p4d05),   &
-         &                 PRESENT(p4d06),PRESENT(p4d07),PRESENT(p4d08),PRESENT(p4d09),PRESENT(p4d10) /) )
-      DO jn = 1, icnt ; CALL wrk_deallocbase( jpreal, kidim, kjdim, kkdim, kldim, kistart, kjstart, kkstart, klstart ) ; END DO
-      !
-   END SUBROUTINE wrk_dealloc_4dr
-
-
-   SUBROUTINE wrk_dealloc_4di( kidim, kjdim, kkdim, kldim, k4d01, k4d02, k4d03, k4d04, k4d05, k4d06, k4d07, k4d08, k4d09, k4d10,   &
-      &                        kistart, kjstart, kkstart, klstart )
-      INTEGER                              , INTENT(in   )           ::   kidim, kjdim, kkdim, kldim   ! dimensions size
-      INTEGER , POINTER, DIMENSION(:,:,:,:), INTENT(inout)           ::   k4d01
-      INTEGER , POINTER, DIMENSION(:,:,:,:), INTENT(inout), OPTIONAL ::   k4d02,k4d03,k4d04,k4d05,k4d06,k4d07,k4d08,k4d09,k4d10
-      INTEGER                              , INTENT(in   ), OPTIONAL ::   kistart, kjstart, kkstart, klstart
-      !
-      INTEGER :: icnt, jn
-      icnt = 1 + COUNT( (/                PRESENT(k4d02),PRESENT(k4d03),PRESENT(k4d04),PRESENT(k4d05),   &
-         &                 PRESENT(k4d06),PRESENT(k4d07),PRESENT(k4d08),PRESENT(k4d09),PRESENT(k4d10) /) )
-      DO jn = 1, icnt ; CALL wrk_deallocbase( jpinteger, kidim, kjdim, kkdim, kldim, kistart, kjstart, kkstart, klstart ) ; END DO
-      !
-   END SUBROUTINE wrk_dealloc_4di
-
-
-   SUBROUTINE wrk_alloc_xd( kidim, kjdim, kkdim, kldim,                                             &
-      &                     kisrt, kjsrt, kksrt, klsrt,                                             &
-      &                     k1d01, k1d02, k1d03, k1d04, k1d05, k1d06, k1d07, k1d08, k1d09, k1d10,   &
-      &                     k2d01, k2d02, k2d03, k2d04, k2d05, k2d06, k2d07, k2d08, k2d09, k2d10,   &
-      &                     k3d01, k3d02, k3d03, k3d04, k3d05, k3d06, k3d07, k3d08, k3d09, k3d10,   &
-      &                     k4d01, k4d02, k4d03, k4d04, k4d05, k4d06, k4d07, k4d08, k4d09, k4d10,   &
-      &                     p1d01, p1d02, p1d03, p1d04, p1d05, p1d06, p1d07, p1d08, p1d09, p1d10,   &
-      &                     p2d01, p2d02, p2d03, p2d04, p2d05, p2d06, p2d07, p2d08, p2d09, p2d10,   &
-      &                     p3d01, p3d02, p3d03, p3d04, p3d05, p3d06, p3d07, p3d08, p3d09, p3d10,   &
-      &                     p4d01, p4d02, p4d03, p4d04, p4d05, p4d06, p4d07, p4d08, p4d09, p4d10    )
-      INTEGER                              ,INTENT(in   )         ::   kidim, kjdim, kkdim, kldim   ! dimensions size
-      INTEGER                              ,INTENT(in   ),OPTIONAL::   kisrt, kjsrt, kksrt, klsrt
-      INTEGER , POINTER, DIMENSION(:      ),INTENT(inout),OPTIONAL::   k1d01,k1d02,k1d03,k1d04,k1d05,k1d06,k1d07,k1d08,k1d09,k1d10
-      INTEGER , POINTER, DIMENSION(:,:    ),INTENT(inout),OPTIONAL::   k2d01,k2d02,k2d03,k2d04,k2d05,k2d06,k2d07,k2d08,k2d09,k2d10
-      INTEGER , POINTER, DIMENSION(:,:,:  ),INTENT(inout),OPTIONAL::   k3d01,k3d02,k3d03,k3d04,k3d05,k3d06,k3d07,k3d08,k3d09,k3d10
-      INTEGER , POINTER, DIMENSION(:,:,:,:),INTENT(inout),OPTIONAL::   k4d01,k4d02,k4d03,k4d04,k4d05,k4d06,k4d07,k4d08,k4d09,k4d10
-      REAL(wp), POINTER, DIMENSION(:      ),INTENT(inout),OPTIONAL::   p1d01,p1d02,p1d03,p1d04,p1d05,p1d06,p1d07,p1d08,p1d09,p1d10
-      REAL(wp), POINTER, DIMENSION(:,:    ),INTENT(inout),OPTIONAL::   p2d01,p2d02,p2d03,p2d04,p2d05,p2d06,p2d07,p2d08,p2d09,p2d10
-      REAL(wp), POINTER, DIMENSION(:,:,:  ),INTENT(inout),OPTIONAL::   p3d01,p3d02,p3d03,p3d04,p3d05,p3d06,p3d07,p3d08,p3d09,p3d10
-      REAL(wp), POINTER, DIMENSION(:,:,:,:),INTENT(inout),OPTIONAL::   p4d01,p4d02,p4d03,p4d04,p4d05,p4d06,p4d07,p4d08,p4d09,p4d10
-      !
-      LOGICAL ::   llpres
-      INTEGER ::   jn, iisrt, ijsrt, iksrt, ilsrt
-      !
-      IF( .NOT. linit ) THEN
-         tree(:)%itype = jpnotdefined
-         DO jn = 1, jparray   ;   tree(jn)%ishape(:) = 0   ;   tree(jn)%istart(:) = 0   ;   END DO
-         linit = .TRUE.
-      ENDIF
-
-      IF( PRESENT(kisrt) ) THEN   ;   iisrt =  kisrt   ;   ELSE   ;   iisrt = 1   ;   ENDIF 
-      IF( PRESENT(kjsrt) ) THEN   ;   ijsrt =  kjsrt   ;   ELSE   ;   ijsrt = 1   ;   ENDIF 
-      IF( PRESENT(kksrt) ) THEN   ;   iksrt =  kksrt   ;   ELSE   ;   iksrt = 1   ;   ENDIF 
-      IF( PRESENT(klsrt) ) THEN   ;   ilsrt =  klsrt   ;   ELSE   ;   ilsrt = 1   ;   ENDIF 
-
-      llpres =  PRESENT(k1d01) .OR. PRESENT(k2d01) .OR. PRESENT(k3d01) .OR. PRESENT(k4d01)   &
-         & .OR. PRESENT(p1d01) .OR. PRESENT(p2d01) .OR. PRESENT(p3d01) .OR. PRESENT(p4d01)
-      IF( llpres ) CALL wrk_allocbase( kidim, kjdim, kkdim, kldim, iisrt, ijsrt, iksrt, ilsrt,   &
-         &                             k1d01, k2d01, k3d01, k4d01, p1d01, p2d01, p3d01, p4d01    )
-      llpres =  PRESENT(k1d02) .OR. PRESENT(k2d02) .OR. PRESENT(k3d02) .OR. PRESENT(k4d02)   &
-         & .OR. PRESENT(p1d02) .OR. PRESENT(p2d02) .OR. PRESENT(p3d02) .OR. PRESENT(p4d02)
-      IF( llpres ) CALL wrk_allocbase( kidim, kjdim, kkdim, kldim, iisrt, ijsrt, iksrt, ilsrt,   &
-         &                             k1d02, k2d02, k3d02, k4d02, p1d02, p2d02, p3d02, p4d02    )
-      llpres =  PRESENT(k1d03) .OR. PRESENT(k2d03) .OR. PRESENT(k3d03) .OR. PRESENT(k4d03)   &
-         & .OR. PRESENT(p1d03) .OR. PRESENT(p2d03) .OR. PRESENT(p3d03) .OR. PRESENT(p4d03)
-      IF( llpres ) CALL wrk_allocbase( kidim, kjdim, kkdim, kldim, iisrt, ijsrt, iksrt, ilsrt,   &
-         &                             k1d03, k2d03, k3d03, k4d03, p1d03, p2d03, p3d03, p4d03    )
-      llpres =  PRESENT(k1d04) .OR. PRESENT(k2d04) .OR. PRESENT(k3d04) .OR. PRESENT(k4d04)   &
-         & .OR. PRESENT(p1d04) .OR. PRESENT(p2d04) .OR. PRESENT(p3d04) .OR. PRESENT(p4d04)
-      IF( llpres ) CALL wrk_allocbase( kidim, kjdim, kkdim, kldim, iisrt, ijsrt, iksrt, ilsrt,   &
-         &                             k1d04, k2d04, k3d04, k4d04, p1d04, p2d04, p3d04, p4d04    )
-      llpres =  PRESENT(k1d05) .OR. PRESENT(k2d05) .OR. PRESENT(k3d05) .OR. PRESENT(k4d05)   &
-         & .OR. PRESENT(p1d05) .OR. PRESENT(p2d05) .OR. PRESENT(p3d05) .OR. PRESENT(p4d05)
-      IF( llpres ) CALL wrk_allocbase( kidim, kjdim, kkdim, kldim, iisrt, ijsrt, iksrt, ilsrt,   &
-         &                             k1d05, k2d05, k3d05, k4d05, p1d05, p2d05, p3d05, p4d05    )
-      llpres =  PRESENT(k1d06) .OR. PRESENT(k2d06) .OR. PRESENT(k3d06) .OR. PRESENT(k4d06)   &
-         & .OR. PRESENT(p1d06) .OR. PRESENT(p2d06) .OR. PRESENT(p3d06) .OR. PRESENT(p4d06)
-      IF( llpres ) CALL wrk_allocbase( kidim, kjdim, kkdim, kldim, iisrt, ijsrt, iksrt, ilsrt,   &
-         &                             k1d06, k2d06, k3d06, k4d06, p1d06, p2d06, p3d06, p4d06    )
-      llpres =  PRESENT(k1d07) .OR. PRESENT(k2d07) .OR. PRESENT(k3d07) .OR. PRESENT(k4d07)   &
-         & .OR. PRESENT(p1d07) .OR. PRESENT(p2d07) .OR. PRESENT(p3d07) .OR. PRESENT(p4d07)
-      IF( llpres ) CALL wrk_allocbase( kidim, kjdim, kkdim, kldim, iisrt, ijsrt, iksrt, ilsrt,   &
-         &                             k1d07, k2d07, k3d07, k4d07, p1d07, p2d07, p3d07, p4d07    )
-      llpres =  PRESENT(k1d08) .OR. PRESENT(k2d08) .OR. PRESENT(k3d08) .OR. PRESENT(k4d08)   &
-         & .OR. PRESENT(p1d08) .OR. PRESENT(p2d08) .OR. PRESENT(p3d08) .OR. PRESENT(p4d08)
-      IF( llpres ) CALL wrk_allocbase( kidim, kjdim, kkdim, kldim, iisrt, ijsrt, iksrt, ilsrt,   &
-         &                             k1d08, k2d08, k3d08, k4d08, p1d08, p2d08, p3d08, p4d08    )
-      llpres =  PRESENT(k1d09) .OR. PRESENT(k2d09) .OR. PRESENT(k3d09) .OR. PRESENT(k4d09)   &
-         & .OR. PRESENT(p1d09) .OR. PRESENT(p2d09) .OR. PRESENT(p3d09) .OR. PRESENT(p4d09)
-      IF( llpres ) CALL wrk_allocbase( kidim, kjdim, kkdim, kldim, iisrt, ijsrt, iksrt, ilsrt,   &
-         &                             k1d09, k2d09, k3d09, k4d09, p1d09, p2d09, p3d09, p4d09    )
-      llpres =  PRESENT(k1d10) .OR. PRESENT(k2d10) .OR. PRESENT(k3d10) .OR. PRESENT(k4d10)   &
-         & .OR. PRESENT(p1d10) .OR. PRESENT(p2d10) .OR. PRESENT(p3d10) .OR. PRESENT(p4d10)
-      IF( llpres ) CALL wrk_allocbase( kidim, kjdim, kkdim, kldim, iisrt, ijsrt, iksrt, ilsrt,   &
-         &                             k1d10, k2d10, k3d10, k4d10, p1d10, p2d10, p3d10, p4d10    )
-
-   END SUBROUTINE wrk_alloc_xd
-
-
-   SUBROUTINE wrk_allocbase( kidim , kjdim , kkdim , kldim , kisrt , kjsrt , kksrt , klsrt ,   &
-      &                      kwrk1d, kwrk2d, kwrk3d, kwrk4d, pwrk1d, pwrk2d, pwrk3d, pwrk4d    )
-      INTEGER                              , INTENT(in   )           :: kidim, kjdim, kkdim, kldim
-      INTEGER                              , INTENT(in   )           :: kisrt, kjsrt, kksrt, klsrt
-      INTEGER , POINTER, DIMENSION(:)      , INTENT(inout), OPTIONAL :: kwrk1d  
-      INTEGER , POINTER, DIMENSION(:,:)    , INTENT(inout), OPTIONAL :: kwrk2d  
-      INTEGER , POINTER, DIMENSION(:,:,:)  , INTENT(inout), OPTIONAL :: kwrk3d  
-      INTEGER , POINTER, DIMENSION(:,:,:,:), INTENT(inout), OPTIONAL :: kwrk4d  
-      REAL(wp), POINTER, DIMENSION(:)      , INTENT(inout), OPTIONAL :: pwrk1d  
-      REAL(wp), POINTER, DIMENSION(:,:)    , INTENT(inout), OPTIONAL :: pwrk2d  
-      REAL(wp), POINTER, DIMENSION(:,:,:)  , INTENT(inout), OPTIONAL :: pwrk3d  
-      REAL(wp), POINTER, DIMENSION(:,:,:,:), INTENT(inout), OPTIONAL :: pwrk4d  
-      !
-      INTEGER, DIMENSION(jpmaxdim) :: ishape, isrt, iend
-      INTEGER :: itype
-      INTEGER :: ii
-
-      ! define the shape to be given to the work array
-      ishape(:) = (/ kidim, kjdim, kkdim, kldim /)
-      ! define the starting index of the dimension shape to be given to the work array
-      isrt  (:) = (/ kisrt, kjsrt, kksrt, klsrt /)
-      iend  (:) = ishape(:) + isrt(:) - 1
-
-      ! is it integer or real array?
-      IF( PRESENT(kwrk1d) .OR. PRESENT(kwrk2d) .OR. PRESENT(kwrk3d) .OR. PRESENT(kwrk4d) )   itype = jpinteger   
-      IF( PRESENT(pwrk1d) .OR. PRESENT(pwrk2d) .OR. PRESENT(pwrk3d) .OR. PRESENT(pwrk4d) )   itype = jpreal         
-
-      ! find the branch with the matching shape, staring index and type or get the first "free" branch 
-      ii = 1                          
-      DO WHILE(       ( ANY( tree(ii)%ishape /= ishape ) .OR. ANY( tree(ii)%istart /= isrt ) .OR. tree(ii)%itype /= itype )   &
-         &      .AND. SUM( tree(ii)%ishape ) /= 0 )
-         ii = ii + 1
-         IF (ii > jparray) STOP   ! increase the value of jparray (should not be needed as already very big!)
-      END DO
-      
-      IF( SUM( tree(ii)%ishape ) == 0 ) THEN                    ! create a new branch 
-         IF(ldebug) PRINT *, 'create new branch ', ii,ishape, isrt, itype
-         tree(ii)%itype = itype                                        ! define the type of this branch 
-         tree(ii)%ishape(:) = ishape(:)                                ! define the shape of this branch 
-         tree(ii)%istart(:) = isrt(:)                                  ! define the lower bounds of this branch 
-         ALLOCATE( tree(ii)%start )                                    ! allocate its start
-         ALLOCATE( tree(ii)%current)                                   ! allocate the current leaf (the first leaf)
-
-         tree(ii)%start%in_use = .FALSE.                               ! Never use the start as work array
-         tree(ii)%start%indic = 0
-         tree(ii)%start%prev => NULL()                                 ! nothing before the start
-         tree(ii)%start%next => tree(ii)%current                       ! first leaf link to the start
-         
-         tree(ii)%current%in_use = .FALSE.                             ! first leaf is not yet used
-         tree(ii)%current%indic = 1                                    ! first leaf
-         tree(ii)%current%prev => tree(ii)%start                       ! previous leaf is the start
-         tree(ii)%current%next => NULL()                               ! next leaf is not yet defined
-         ! allocate the array of the first leaf
-         IF( PRESENT(kwrk1d) ) ALLOCATE( tree(ii)%current%iwrk1d(isrt(1):iend(1)                                                ) )
-         IF( PRESENT(kwrk2d) ) ALLOCATE( tree(ii)%current%iwrk2d(isrt(1):iend(1),isrt(2):iend(2)                                ) )
-         IF( PRESENT(kwrk3d) ) ALLOCATE( tree(ii)%current%iwrk3d(isrt(1):iend(1),isrt(2):iend(2),isrt(3):iend(3)                ) )
-         IF( PRESENT(kwrk4d) ) ALLOCATE( tree(ii)%current%iwrk4d(isrt(1):iend(1),isrt(2):iend(2),isrt(3):iend(3),isrt(4):iend(4)) )
-         IF( PRESENT(pwrk1d) ) ALLOCATE( tree(ii)%current%zwrk1d(isrt(1):iend(1)                                                ) )
-         IF( PRESENT(pwrk2d) ) ALLOCATE( tree(ii)%current%zwrk2d(isrt(1):iend(1),isrt(2):iend(2)                                ) )
-         IF( PRESENT(pwrk3d) ) ALLOCATE( tree(ii)%current%zwrk3d(isrt(1):iend(1),isrt(2):iend(2),isrt(3):iend(3)                ) )
-         IF( PRESENT(pwrk4d) ) ALLOCATE( tree(ii)%current%zwrk4d(isrt(1):iend(1),isrt(2):iend(2),isrt(3):iend(3),isrt(4):iend(4)) )
-                  
-      ELSE IF( .NOT. ASSOCIATED(tree(ii)%current%next) ) THEN   ! all leafs used -> define a new one
-         ALLOCATE( tree(ii)%current%next )                             ! allocate the new leaf
-         tree(ii)%current%next%in_use = .FALSE.                        ! this leaf is not yet used
-         tree(ii)%current%next%indic = tree(ii)%current%indic + 1      ! number of this leaf
-         IF(ldebug) PRINT *, 'add a leaf ', ii, tree(ii)%current%indic
-         tree(ii)%current%next%prev => tree(ii)%current                ! previous leaf of the new leaf is the current leaf
-         tree(ii)%current%next%next => NULL()                          ! next leaf is not yet defined
-
-         tree(ii)%current => tree(ii)%current%next                     ! the current leaf becomes the new one 
- 
-         ! allocate the array of the new leaf
-         IF( PRESENT(kwrk1d) ) ALLOCATE( tree(ii)%current%iwrk1d(isrt(1):iend(1)                                                ) )
-         IF( PRESENT(kwrk2d) ) ALLOCATE( tree(ii)%current%iwrk2d(isrt(1):iend(1),isrt(2):iend(2)                                ) )
-         IF( PRESENT(kwrk3d) ) ALLOCATE( tree(ii)%current%iwrk3d(isrt(1):iend(1),isrt(2):iend(2),isrt(3):iend(3)                ) )
-         IF( PRESENT(kwrk4d) ) ALLOCATE( tree(ii)%current%iwrk4d(isrt(1):iend(1),isrt(2):iend(2),isrt(3):iend(3),isrt(4):iend(4)) )
-         IF( PRESENT(pwrk1d) ) ALLOCATE( tree(ii)%current%zwrk1d(isrt(1):iend(1)                                                ) )
-         IF( PRESENT(pwrk2d) ) ALLOCATE( tree(ii)%current%zwrk2d(isrt(1):iend(1),isrt(2):iend(2)                                ) )
-         IF( PRESENT(pwrk3d) ) ALLOCATE( tree(ii)%current%zwrk3d(isrt(1):iend(1),isrt(2):iend(2),isrt(3):iend(3)                ) )
-         IF( PRESENT(pwrk4d) ) ALLOCATE( tree(ii)%current%zwrk4d(isrt(1):iend(1),isrt(2):iend(2),isrt(3):iend(3),isrt(4):iend(4)) )
-         
-      ELSE 
-         tree(ii)%current => tree(ii)%current%next                     ! the current leaf becomes the next one 
-      ENDIF   
-      !       
-      ! use the array of the current leaf as a work array
-      IF( PRESENT(kwrk1d) ) kwrk1d => tree(ii)%current%iwrk1d   
-      IF( PRESENT(kwrk2d) ) kwrk2d => tree(ii)%current%iwrk2d   
-      IF( PRESENT(kwrk3d) ) kwrk3d => tree(ii)%current%iwrk3d   
-      IF( PRESENT(kwrk4d) ) kwrk4d => tree(ii)%current%iwrk4d   
-      IF( PRESENT(pwrk1d) ) pwrk1d => tree(ii)%current%zwrk1d   
-      IF( PRESENT(pwrk2d) ) pwrk2d => tree(ii)%current%zwrk2d   
-      IF( PRESENT(pwrk3d) ) pwrk3d => tree(ii)%current%zwrk3d   
-      IF( PRESENT(pwrk4d) ) pwrk4d => tree(ii)%current%zwrk4d   
-      tree(ii)%current%in_use = .TRUE.   ! this leaf is now used
-      !      
-   END SUBROUTINE wrk_allocbase
-
-
-   SUBROUTINE wrk_deallocbase( ktype, kidim, kjdim, kkdim, kldim, kisrt, kjsrt, kksrt, klsrt )
-      INTEGER, INTENT(in   )           :: ktype
-      INTEGER, INTENT(in   )           :: kidim, kjdim, kkdim, kldim
-      INTEGER, INTENT(in   ), OPTIONAL :: kisrt, kjsrt, kksrt, klsrt
-      !
-      INTEGER, DIMENSION(jpmaxdim) :: ishape, istart
-      INTEGER :: ii
-
-      ishape(:) = (/ kidim, kjdim, kkdim, kldim /)
-      IF( PRESENT(kisrt) ) THEN   ;   istart(1) =  kisrt   ;   ELSE   ;   istart(1) = 1   ;   ENDIF 
-      IF( PRESENT(kjsrt) ) THEN   ;   istart(2) =  kjsrt   ;   ELSE   ;   istart(2) = 1   ;   ENDIF 
-      IF( PRESENT(kksrt) ) THEN   ;   istart(3) =  kksrt   ;   ELSE   ;   istart(3) = 1   ;   ENDIF 
-      IF( PRESENT(klsrt) ) THEN   ;   istart(4) =  klsrt   ;   ELSE   ;   istart(4) = 1   ;   ENDIF 
-
-      ! find the branch with the matcing shape and type or get the first "free" branch 
-      ii = 1                          
-      DO WHILE( ANY( tree(ii)%ishape /= ishape ) .OR. ANY( tree(ii)%istart /= istart ) .OR. tree(ii)%itype /= ktype )
-         ii = ii + 1
-      END DO
-      !
-      tree(ii)%current%in_use = .FALSE.           ! current leaf is no more used
-      tree(ii)%current => tree(ii)%current%prev   ! move back toward previous leaf   
-      ! 
-   END SUBROUTINE wrk_deallocbase
-
-
-   SUBROUTINE wrk_stop(cmsg)
-      !!----------------------------------------------------------------------
-      !!               ***  ROUTINE wrk_stop  ***
-      !! ** Purpose :   to act as local alternative to ctl_stop. 
-      !!                Avoids dependency on in_out_manager module.
-      !!----------------------------------------------------------------------
-      CHARACTER(LEN=*), INTENT(in) :: cmsg
-      !!----------------------------------------------------------------------
-      !
-!      WRITE(kumout, cform_err2)
-      WRITE(*,*) TRIM(cmsg)
-      ! ARPDBG - would like to CALL mppstop here to force a stop but that
-      ! introduces a dependency on lib_mpp. Could CALL mpi_abort() directly
-      ! but that's fairly brutal. Better to rely on CALLing routine to
-      ! deal with the error passed back from the wrk_X routine?
-      !CALL mppstop
-      !
-   END SUBROUTINE wrk_stop
-
-   !!=====================================================================
-END MODULE wrk_nemo
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/diawri.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 9125)
@@ -43,5 +43,4 @@
    USE lib_mpp         ! MPP library
    USE timing          ! preformance summary
-   USE wrk_nemo        ! working array
 
    IMPLICIT NONE
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcatm_c14.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcatm_c14.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcatm_c14.F90	(revision 9125)
@@ -45,5 +45,5 @@
       REAL(wp) ::   yn20 =  20.     ! 20 degrees north
       REAL(wp) ::   yn40 =  40.     ! 40 degrees north
-      REAL(wp), POINTER, DIMENSION(:)   :: zco2, zyrco2  ! temporary arrays for swap
+      REAL(wp), ALLOCATABLE, DIMENSION(:)   :: zco2, zyrco2  ! temporary arrays for swap
       !
       !!----------------------------------------------------------------------
@@ -78,6 +78,5 @@
       !
          IF(kc14typ==2) THEN
-            CALL wrk_alloc( nrecco2,zco2)
-            CALL wrk_alloc( nrecco2,zyrco2)
+            ALLOCATE( zco2(nrecco2), zyrco2(nrecco2) )
             zco2(:)=spco2(:)
             zyrco2(:)=tyrco2(:)
@@ -88,6 +87,5 @@
                tyrco2(izco2)=1950._wp-zyrco2(jn)         ! BP to AD dates
             END DO
-            CALL wrk_dealloc(nrecco2,zco2)
-            CALL wrk_dealloc(nrecco2,zyrco2)
+            DEALLOCATE( zco2,zyrco2 )
          ENDIF
       !
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcwri_c14.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcwri_c14.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/C14/trcwri_c14.F90	(revision 9125)
@@ -36,6 +36,6 @@
       INTEGER              :: ji,jj,jk,jn   ! dummy loop indexes
       REAL(wp)             :: zage,zarea,ztemp   ! temporary
-      REAL(wp), POINTER, DIMENSION(:,:)   :: zres, z2d ! temporary storage 2D
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: z3d , zz3d ! temporary storage 3D
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:)   :: zres, z2d ! temporary storage 2D
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: z3d , zz3d ! temporary storage 3D
       !!---------------------------------------------------------------------
  
@@ -50,6 +50,6 @@
       IF( iom_use("DeltaC14") .OR. iom_use("C14Age") .OR. iom_use("RAge")   ) THEN
          !
-         CALL wrk_alloc( jpi, jpj     , z2d, zres )
-         CALL wrk_alloc( jpi, jpj, jpk, z3d, zz3d )
+         ALLOCATE( z2d(jpi,jpj), zres(jpi,jpj) )
+         ALLOCATE( z3d(jpi,jpj,jpk), zz3d(jpi,jpj,jpk) )
          !
          zage = -1._wp / rlam14 / rsiyea  ! factor for radioages in year
@@ -87,6 +87,5 @@
          CALL iom_put( "RAge" , zage * z2d(:,:) )                     ! Reservoir age [yr]
          !
-         CALL wrk_dealloc( jpi, jpj     , z2d, zres )
-         CALL wrk_dealloc( jpi, jpj, jpk, z3d, zz3d )
+         DEALLOCATE( z2d, zres, z3d, zz3d )
          !
       ENDIF
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90	(revision 9125)
@@ -43,5 +43,5 @@
       INTEGER, INTENT(in) ::   kt   ! ocean time-step index
       INTEGER ::   jn   ! dummy loop index
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrmyt
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrmyt
       !!----------------------------------------------------------------------
       !
@@ -52,5 +52,5 @@
       IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
 
-      IF( l_trdtrc )  CALL wrk_alloc( jpi, jpj, jpk, ztrmyt )
+      IF( l_trdtrc )  ALLOCATE( ztrmyt(jpi,jpj,jpk) )
 
       CALL trc_bc ( kt )       ! tracers: surface and lateral Boundary Conditions
@@ -64,5 +64,5 @@
             CALL trd_trc( ztrmyt, jn, jptra_sms, kt )   ! save trends
           END DO
-          CALL wrk_dealloc( jpi, jpj, jpk, ztrmyt )
+          DEALLOCATE( ztrmyt )
       END IF
       !
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 9125)
@@ -96,6 +96,6 @@
       REAL(wp) ::   znh4a, zdeta, zdoma, zzoobod, zboddet, zdomaju
       REAL(wp) ::   ze3t
-      REAL(wp), POINTER,   DIMENSION(:,:,:) :: zw2d
-      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: zw3d
+      REAL(wp), ALLOCATABLE,   DIMENSION(:,:,:) :: zw2d
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: zw3d
       CHARACTER (len=25) :: charout
       !!---------------------------------------------------------------------
@@ -103,8 +103,5 @@
       IF( ln_timing )   CALL timing_start('p2z_bio')
       !
-      IF( lk_iomput ) THEN
-         CALL wrk_alloc( jpi, jpj,     17, zw2d )
-         CALL wrk_alloc( jpi, jpj, jpk, 3, zw3d )
-      ENDIF
+      IF( lk_iomput ) ALLOCATE( zw2d(jpi,jpj,17), zw3d(jpi,jpj,jpk,3) )
 
       IF( kt == nittrc000 ) THEN
@@ -377,8 +374,5 @@
       ENDIF
       !
-      IF( lk_iomput ) THEN
-         CALL wrk_dealloc( jpi, jpj,     17, zw2d )
-         CALL wrk_dealloc( jpi, jpj, jpk, 3, zw3d )
-      ENDIF
+      IF( lk_iomput ) DEALLOCATE( zw2d, zw3d )
       !
       IF( ln_timing )  CALL timing_stop('p2z_bio')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90	(revision 9125)
@@ -64,5 +64,5 @@
       INTEGER  ::   ji, jj, jk, jl, ikt
       REAL(wp) ::   zgeolpoc, zfact, zwork, ze3t, zsedpocd, zmaskt
-      REAL(wp), POINTER, DIMENSION(:,:)   ::  zsedpoca
+      REAL(wp), DIMENSION(jpi,jpj)   ::  zsedpoca
       CHARACTER (len=25) :: charout
       !!---------------------------------------------------------------------
@@ -72,5 +72,4 @@
       IF( kt == nittrc000 )   CALL p2z_exp_init
 
-      CALL wrk_alloc( jpi, jpj, zsedpoca ) 
       zsedpoca(:,:) = 0.
 
@@ -147,6 +146,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi, jpj, zsedpoca)   ! temporary save of trends
-
       IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
          WRITE(charout, FMT="('exp')")
@@ -167,6 +164,6 @@
       INTEGER  ::   ji, jj, jk
       REAL(wp) ::   zmaskt, zfluo, zfluu
-      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zrro
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zdm0
+      REAL(wp), DIMENSION(jpi,jpj    ) :: zrro
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zdm0
       !!---------------------------------------------------------------------
       !
@@ -178,8 +175,4 @@
       ENDIF
       !
-      ! Allocate temporary workspace
-      CALL wrk_alloc( jpi, jpj,      zrro )
-      CALL wrk_alloc( jpi, jpj, jpk, zdm0 )
-
 
       ! Calculate vertical distribution of newly formed biogenic poc
@@ -247,7 +240,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi, jpj,      zrro )
-      CALL wrk_dealloc( jpi, jpj, jpk, zdm0 )
-      !
    END SUBROUTINE p2z_exp_init
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 9125)
@@ -67,13 +67,10 @@
       REAL(wp) ::   zkr, zkg            ! total absorption coefficient in red and green
       REAL(wp) ::   zcoef               ! temporary scalar
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zpar100, zpar0m
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zparr, zparg
+      REAL(wp), DIMENSION(jpi,jpj    ) :: zpar100, zpar0m
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zparr, zparg
       !!---------------------------------------------------------------------
       !
       IF( ln_timing )   CALL timing_start('p2z_opt')
       !
-      ! Allocate temporary workspace
-      CALL wrk_alloc( jpi, jpj,      zpar100, zpar0m )
-      CALL wrk_alloc( jpi, jpj, jpk, zparr, zparg    )
 
       IF( kt == nittrc000 ) THEN
@@ -142,7 +139,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi, jpj,      zpar100, zpar0m )
-      CALL wrk_dealloc( jpi, jpj, jpk, zparr, zparg    )
-      !
       IF( ln_timing )   CALL timing_stop('p2z_opt')
       !
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 9125)
@@ -59,6 +59,6 @@
       INTEGER  ::   ji, jj, jk, jl, ierr
       CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zw2d
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zwork, ztra
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zw2d
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zwork, ztra
       !!---------------------------------------------------------------------
       !
@@ -70,7 +70,4 @@
          IF(lwp) WRITE(numout,*) ' ~~~~~~~'
       ENDIF
-
-      ! Allocate temporary workspace
-      CALL wrk_alloc( jpi, jpj, jpk, zwork, ztra )
 
       ! sedimentation of detritus  : upstream scheme
@@ -98,5 +95,5 @@
       IF( lk_iomput )  THEN
          IF( iom_use( "TDETSED" ) ) THEN
-            CALL wrk_alloc( jpi, jpj, zw2d )
+            ALLOCATE( zw2d(jpi,jpj) )
             zw2d(:,:) =  ztra(:,:,1) * e3t_n(:,:,1) * 86400._wp
             DO jk = 2, jpkm1
@@ -104,9 +101,7 @@
             END DO
             CALL iom_put( "TDETSED", zw2d )
-            CALL wrk_dealloc( jpi, jpj, zw2d )
+            DEALLOCATE( zw2d )
          ENDIF
       ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj, jpk, zwork, ztra )
       !
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90	(revision 9125)
@@ -564,10 +564,7 @@
    LOGICAL   ::  l_exitnow
    REAL(wp), PARAMETER :: pz_exp_threshold = 1.0
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: zalknw_inf, zalknw_sup, rmask, zh_min, zh_max, zeqn_absmin
+   REAL(wp), DIMENSION(jpi,jpj,jpk) :: zalknw_inf, zalknw_sup, rmask, zh_min, zh_max, zeqn_absmin
 
    IF( ln_timing )  CALL timing_start('solve_at_general')
-      !  Allocate temporary workspace
-   CALL wrk_alloc( jpi, jpj, jpk, zalknw_inf, zalknw_sup, rmask )
-   CALL wrk_alloc( jpi, jpj, jpk, zh_min, zh_max, zeqn_absmin )
 
    CALL anw_infsup( zalknw_inf, zalknw_sup )
@@ -799,7 +796,4 @@
    END DO
    !
-   CALL wrk_dealloc( jpi, jpj, jpk, zalknw_inf, zalknw_sup, rmask )
-   CALL wrk_dealloc( jpi, jpj, jpk, zh_min, zh_max, zeqn_absmin )
-
 
       IF( ln_timing )   CALL timing_stop('solve_at_general')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 9125)
@@ -74,19 +74,17 @@
       REAL(wp) :: dissol, zligco
       CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zTL1, zFe3, ztotlig, precip
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zFeL1, zFeL2, zTL2, zFe2, zFeP
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zstrn, zstrn2
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zTL1, zFe3, ztotlig, precip, zFeL1
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zFeL2, zTL2, zFe2, zFeP
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:  ) :: zstrn, zstrn2
       !!---------------------------------------------------------------------
       !
       IF( ln_timing )   CALL timing_start('p4z_fechem')
       !
-      ! Allocate temporary workspace
-      CALL wrk_alloc( jpi, jpj, jpk, zFe3, zFeL1, zTL1, ztotlig, precip )
       zFe3 (:,:,:) = 0.
       zFeL1(:,:,:) = 0.
       zTL1 (:,:,:) = 0.
       IF( ln_fechem ) THEN
-         CALL wrk_alloc( jpi, jpj,      zstrn, zstrn2 )
-         CALL wrk_alloc( jpi, jpj, jpk, zFe2, zFeL2, zTL2, zFeP )
+         ALLOCATE( zstrn(jpi,jpj), zstrn2(jpi,jpj) )
+         ALLOCATE( zFe2(jpi,jpj,jpk), zFeL2(jpi,jpj,jpk), zTL2(jpi,jpj,jpk), zFeP(jpi,jpj,jpk) )
          zFe2 (:,:,:) = 0.
          zFeL2(:,:,:) = 0.
@@ -360,8 +358,7 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi, jpj, jpk, zFe3, zFeL1, zTL1, ztotlig, precip )
       IF( ln_fechem )  THEN
-         CALL wrk_dealloc( jpi, jpj,      zstrn, zstrn2 )
-         CALL wrk_dealloc( jpi, jpj, jpk, zFe2, zFeL2, zTL2, zFeP )
+         DEALLOCATE( zstrn, zstrn2 )
+         DEALLOCATE( zFe2, zFeL2, zTL2, zFeP )
       ENDIF
       !
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 9125)
@@ -80,10 +80,9 @@
       REAL(wp) ::   zyr_dec, zdco2dt
       CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:) :: zkgco2, zkgo2, zh2co3, zoflx, zw2d, zpco2atm  
+      REAL(wp), DIMENSION(jpi,jpj) :: zkgco2, zkgo2, zh2co3, zoflx,  zpco2atm  
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zw2d
       !!---------------------------------------------------------------------
       !
       IF( ln_timing )   CALL timing_start('p4z_flx')
-      !
-      CALL wrk_alloc( jpi, jpj, zkgco2, zkgo2, zh2co3, zoflx, zpco2atm )
       !
 
@@ -187,5 +186,5 @@
 
       IF( lk_iomput .AND. knt == nrdttrc ) THEN
-         CALL wrk_alloc( jpi, jpj, zw2d )  
+         ALLOCATE( zw2d(jpi,jpj) )  
          IF( iom_use( "Cflx"  ) )  THEN
             zw2d(:,:) = oce_co2(:,:) / e1e2t(:,:) * rfact2r
@@ -211,8 +210,6 @@
          CALL iom_put( "tcflxcum" , t_oce_co2_flx_cum )      ! molC
          !
-         CALL wrk_dealloc( jpi, jpj, zw2d )
-      ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj, zkgco2, zkgo2, zh2co3, zoflx, zpco2atm )
+         DEALLOCATE( zw2d )
+      ENDIF
       !
       IF( ln_timing )   CALL timing_stop('p4z_flx')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90	(revision 9125)
@@ -62,10 +62,8 @@
       REAL(wp) ::   zomegaca, zexcess, zexcess0
       CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zco3, zcaldiss, zhinit, zhi, zco3sat
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zco3, zcaldiss, zhinit, zhi, zco3sat
       !!---------------------------------------------------------------------
       !
       IF( ln_timing )  CALL timing_start('p4z_lys')
-      !
-      CALL wrk_alloc( jpi, jpj, jpk, zco3, zcaldiss, zhinit, zhi, zco3sat )
       !
       zco3    (:,:,:) = 0.
@@ -139,6 +137,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi, jpj, jpk, zco3, zcaldiss, zhinit, zhi, zco3sat )
-      !
       IF( ln_timing )   CALL timing_stop('p4z_lys')
       !
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90	(revision 9125)
@@ -72,5 +72,6 @@
       REAL(wp) :: zgrazfffp, zgrazfffg, zgrazffep, zgrazffeg
       CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zgrazing, zw3d
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zgrazing
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zw3d
 
       !!---------------------------------------------------------------------
@@ -78,5 +79,4 @@
       IF( ln_timing )   CALL timing_start('p4z_meso')
       !
-      CALL wrk_alloc( jpi, jpj, jpk, zgrazing )
       zgrazing(:,:,:) = 0._wp
 
@@ -220,5 +220,5 @@
       !
       IF( lk_iomput .AND. knt == nrdttrc ) THEN
-         CALL wrk_alloc( jpi, jpj, jpk, zw3d )
+         ALLOCATE( zw3d(jpi,jpj,jpk) )
          IF( iom_use( "GRAZ2" ) ) THEN
             zw3d(:,:,:) = zgrazing(:,:,:) * 1.e+3 * rfact2r * tmask(:,:,:)  !   Total grazing of phyto by zooplankton
@@ -229,5 +229,5 @@
             CALL iom_put( "PCAL", zw3d )  
          ENDIF
-         CALL wrk_dealloc( jpi, jpj, jpk, zw3d )
+         DEALLOCATE( zw3d )
       ENDIF
       !
@@ -237,6 +237,4 @@
         CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
       ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj, jpk, zgrazing )
       !
       IF( ln_timing )   CALL timing_stop('p4z_meso')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 9125)
@@ -69,11 +69,10 @@
       REAL(wp) :: zgrazp, zgrazm, zgrazsd
       REAL(wp) :: zgrazmf, zgrazsf, zgrazpf
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zgrazing, zw3d
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zgrazing 
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zw3d
       CHARACTER (len=25) :: charout
       !!---------------------------------------------------------------------
       !
       IF( ln_timing )   CALL timing_start('p4z_micro')
-      !
-      CALL wrk_alloc( jpi, jpj, jpk, zgrazing )
       !
       DO jk = 1, jpkm1
@@ -177,10 +176,10 @@
       IF( lk_iomput ) THEN
          IF( knt == nrdttrc ) THEN
-           CALL wrk_alloc( jpi, jpj, jpk, zw3d )
+           ALLOCATE( zw3d(jpi,jpj,jpk) )
            IF( iom_use( "GRAZ1" ) ) THEN
               zw3d(:,:,:) = zgrazing(:,:,:) * 1.e+3 * rfact2r * tmask(:,:,:)  !  Total grazing of phyto by zooplankton
               CALL iom_put( "GRAZ1", zw3d )
            ENDIF
-           CALL wrk_dealloc( jpi, jpj, jpk, zw3d )
+           DEALLOCATE( zw3d )
          ENDIF
       ENDIF
@@ -191,6 +190,4 @@
          CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
       ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj, jpk, zgrazing )
       !
       IF( ln_timing )   CALL timing_stop('p4z_micro')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 9125)
@@ -64,8 +64,8 @@
       REAL(wp) ::   zchl
       REAL(wp) ::   zc0 , zc1 , zc2, zc3, z1_dep
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zdepmoy, zetmp1, zetmp2, zetmp3, zetmp4
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zetmp5
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zqsr100, zqsr_corr
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zpar, ze0, ze1, ze2, ze3, zchl3d
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:  ) :: zetmp5
+      REAL(wp), DIMENSION(jpi,jpj    ) :: zdepmoy, zetmp1, zetmp2, zetmp3, zetmp4
+      REAL(wp), DIMENSION(jpi,jpj    ) :: zqsr100, zqsr_corr
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zpar, ze0, ze1, ze2, ze3, zchl3d
       !!---------------------------------------------------------------------
       !
@@ -73,8 +73,5 @@
       !
       ! Allocate temporary workspace
-                   CALL wrk_alloc( jpi, jpj,      zdepmoy, zetmp1, zetmp2, zetmp3, zetmp4 )
-                   CALL wrk_alloc( jpi, jpj,      zqsr100, zqsr_corr )
-      IF( ln_p5z ) CALL wrk_alloc( jpi, jpj,      zetmp5 )
-                   CALL wrk_alloc( jpi, jpj, jpk, zpar   , ze0, ze1, ze2, ze3, zchl3d )
+      IF( ln_p5z ) ALLOCATE( zetmp5(jpi,jpj) )
 
       IF( knt == 1 .AND. ln_varpar ) CALL p4z_opt_sbc( kt )
@@ -243,8 +240,5 @@
       ENDIF
       !
-                   CALL wrk_dealloc( jpi, jpj,      zdepmoy, zetmp1, zetmp2, zetmp3, zetmp4 )
-                   CALL wrk_dealloc( jpi, jpj,      zqsr100, zqsr_corr )
-      IF( ln_p5z ) CALL wrk_dealloc( jpi, jpj,      zetmp5 )
-                   CALL wrk_dealloc( jpi, jpj, jpk, zpar   ,  ze0, ze1, ze2, ze3, zchl3d )
+      IF( ln_p5z ) DEALLOCATE( zetmp5 )
       !
       IF( ln_timing )  CALL timing_stop('p4z_opt')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zpoc.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zpoc.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zpoc.F90	(revision 9125)
@@ -63,16 +63,11 @@
       REAL(wp) ::   zrfact2
       CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:  )   :: totprod, totthick, totcons 
-      REAL(wp), POINTER, DIMENSION(:,:,:)   :: zremipoc, zremigoc, zorem3, ztremint
-      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: alphag
+      REAL(wp), DIMENSION(jpi,jpj  )   :: totprod, totthick, totcons 
+      REAL(wp), DIMENSION(jpi,jpj,jpk)   :: zremipoc, zremigoc, zorem3, ztremint
+      REAL(wp), DIMENSION(jpi,jpj,jpk,jcpoc) :: alphag
       !!---------------------------------------------------------------------
       !
       IF( ln_timing )  CALL timing_start('p4z_poc')
       !
-      ! Allocate temporary workspace
-      CALL wrk_alloc( jpi, jpj,      totprod,  totthick, totcons )
-      CALL wrk_alloc( jpi, jpj, jpk, zremipoc, zremigoc, zorem3, ztremint )
-      ALLOCATE( alphag(jpi,jpj,jpk,jcpoc) )
-
       ! Initialization of local variables
       ! ---------------------------------
@@ -465,7 +460,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi, jpj,      totprod,  totthick, totcons )
-      CALL wrk_dealloc( jpi, jpj, jpk, zremipoc, zremigoc, zorem3, ztremint )
-      DEALLOCATE( alphag )
       !
       IF( ln_timing )   CALL timing_stop('p4z_poc')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 9125)
@@ -76,10 +76,12 @@
       REAL(wp) ::   zfact
       CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zstrn, zw2d, zmixnano, zmixdiat
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zpislopeadn, zpislopeadd, zysopt, zw3d   
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zprdia, zprbio, zprdch, zprnch   
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zprorcan, zprorcad, zprofed, zprofen
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zpronewn, zpronewd
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zmxl_fac, zmxl_chl
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zw2d
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zw3d
+      REAL(wp), DIMENSION(jpi,jpj    ) :: zstrn, zmixnano, zmixdiat
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zpislopeadn, zpislopeadd, zysopt  
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zprdia, zprbio, zprdch, zprnch   
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zprorcan, zprorcad, zprofed, zprofen
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zpronewn, zpronewd
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmxl_fac, zmxl_chl
       !!---------------------------------------------------------------------
       !
@@ -87,8 +89,4 @@
       !
       !  Allocate temporary workspace
-      CALL wrk_alloc( jpi, jpj,      zmixnano, zmixdiat, zstrn )
-      CALL wrk_alloc( jpi, jpj, jpk, zpislopeadn, zpislopeadd, zprdia, zprbio, zprdch, zprnch, zysopt ) 
-      CALL wrk_alloc( jpi, jpj, jpk, zmxl_fac, zmxl_chl )
-      CALL wrk_alloc( jpi, jpj, jpk, zprorcan, zprorcad, zprofed, zprofen, zpronewn, zpronewd )
       !
       zprorcan(:,:,:) = 0._wp ; zprorcad(:,:,:) = 0._wp ; zprofed (:,:,:) = 0._wp
@@ -367,6 +365,5 @@
     IF( lk_iomput ) THEN
        IF( knt == nrdttrc ) THEN
-          CALL wrk_alloc( jpi, jpj,      zw2d )
-          CALL wrk_alloc( jpi, jpj, jpk, zw3d )
+          ALLOCATE( zw2d(jpi,jpj), zw3d(jpi,jpj,jpk) )
           zfact = 1.e+3 * rfact2r  !  conversion from mol/l/kt to  mol/m3/s
           !
@@ -469,6 +466,5 @@
           IF( iom_use( "tintpp" ) )  CALL iom_put( "tintpp" , tpp * zfact )  !  global total integrated primary production molC/s
           !
-          CALL wrk_dealloc( jpi, jpj,      zw2d )
-          CALL wrk_dealloc( jpi, jpj, jpk, zw3d )
+          DEALLOCATE( zw2d, zw3d )
        ENDIF
      ENDIF
@@ -479,9 +475,4 @@
          CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
      ENDIF
-     !
-     CALL wrk_dealloc( jpi, jpj,  zmixnano, zmixdiat,    zstrn )
-     CALL wrk_dealloc( jpi, jpj, jpk, zpislopeadn, zpislopeadd, zprdia, zprbio, zprdch, zprnch, zysopt ) 
-     CALL wrk_dealloc( jpi, jpj, jpk, zmxl_fac, zmxl_chl )
-     CALL wrk_dealloc( jpi, jpj, jpk, zprorcan, zprorcad, zprofed, zprofen, zpronewn, zpronewd )
      !
      IF( ln_timing )  CALL timing_stop('p4z_prod')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 9125)
@@ -67,15 +67,12 @@
       REAL(wp) ::   zosil, ztem, zdenitnh4, zolimic, zolimin, zolimip, zdenitrn, zdenitrp
       CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: ztempbac
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zdepbac, zolimi, zdepprod, zfacsi, zw3d, zfacsib
+      REAL(wp), DIMENSION(jpi,jpj    ) :: ztempbac
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zdepbac, zolimi, zdepprod, zfacsi, zfacsib
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zw3d
       !!---------------------------------------------------------------------
       !
       IF( ln_timing )   CALL timing_start('p4z_rem')
       !
-      ! Allocate temporary workspace
-      CALL wrk_alloc( jpi, jpj,      ztempbac                  )
-      CALL wrk_alloc( jpi, jpj, jpk, zdepbac, zdepprod, zolimi, zfacsi, zfacsib )
-
-      ! Initialisation of temprary arrys
+      ! Initialisation of arrys
       zdepprod(:,:,:) = 1._wp
       ztempbac(:,:)   = 0._wp
@@ -270,5 +267,5 @@
 
       IF( knt == nrdttrc ) THEN
-          CALL wrk_alloc( jpi, jpj, jpk, zw3d )
+          ALLOCATE( zw3d(jpi,jpj,jpk) )
           zfact = 1.e+3 * rfact2r  !  conversion from mol/l/kt to  mol/m3/s
           !
@@ -282,9 +279,6 @@
           ENDIF
           !
-          CALL wrk_dealloc( jpi, jpj, jpk, zw3d )
+          DEALLOCATE( zw3d )
        ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj,      ztempbac                  )
-      CALL wrk_dealloc( jpi, jpj, jpk, zdepbac, zdepprod, zolimi, zfacsi, zfacsib )
       !
       IF( ln_timing )   CALL timing_stop('p4z_rem')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 9125)
@@ -62,10 +62,11 @@
       !
       CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zsidep, zwork1, zwork2, zwork3
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zdenit2d, zironice, zbureff
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zwsbio3, zwsbio4, zwscal
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zsedcal, zsedsi, zsedc
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrpo4, ztrdop, zirondep, zsoufer, zpdep, zlight
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zwsfep
+      REAL(wp), DIMENSION(jpi,jpj    ) :: zwork1, zwork2, zwork3
+      REAL(wp), DIMENSION(jpi,jpj    ) :: zdenit2d, zbureff
+      REAL(wp), DIMENSION(jpi,jpj    ) :: zwsbio3, zwsbio4, zwscal
+      REAL(wp), DIMENSION(jpi,jpj    ) :: zsedcal, zsedsi, zsedc
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zsoufer, zlight
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrpo4, ztrdop, zirondep, zpdep
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:  ) :: zsidep, zwsfep, zironice
       !!---------------------------------------------------------------------
       !
@@ -75,10 +76,6 @@
       !
       ! Allocate temporary workspace
-                      CALL wrk_alloc( jpi, jpj, zdenit2d, zwork1, zwork2, zwork3, zbureff )
-                      CALL wrk_alloc( jpi, jpj, zwsbio3, zwsbio4, zwscal )
-                      CALL wrk_alloc( jpi, jpj, zsedcal,  zsedsi, zsedc )
-                      CALL wrk_alloc( jpi, jpj, jpk, zlight, zsoufer )
-      IF( ln_p5z )    CALL wrk_alloc( jpi, jpj, jpk, ztrpo4, ztrdop )
-      IF( ln_ligand ) CALL wrk_alloc( jpi, jpj, zwsfep )
+      IF( ln_p5z )    ALLOCATE( ztrpo4(jpi,jpj,jpk), ztrdop(jpi,jpj,jpk) )
+      IF( ln_ligand ) ALLOCATE( zwsfep(jpi,jpj) )
 
 
@@ -97,5 +94,5 @@
       IF( ln_ironice ) THEN  
          !                                              
-         CALL wrk_alloc( jpi, jpj, zironice )
+         ALLOCATE( zironice(jpi,jpj) )
          !                                              
          DO jj = 1, jpj
@@ -114,5 +111,5 @@
             &   CALL iom_put( "Ironice", zironice(:,:) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1) ) ! iron flux from ice
          !
-         CALL wrk_dealloc( jpi, jpj, zironice )
+         DEALLOCATE( zironice )
          !                                              
       ENDIF
@@ -122,6 +119,6 @@
       IF( ln_dust ) THEN
          !                                              
-         CALL wrk_alloc( jpi, jpj,      zsidep )
-         CALL wrk_alloc( jpi, jpj, jpk, zpdep, zirondep      )
+         ALLOCATE( zsidep(jpi,jpj) )
+         ALLOCATE( zpdep(jpi,jpj,jpk), zirondep(jpi,jpj,jpk) )
          !                                              ! Iron and Si deposition at the surface
          IF( ln_solub ) THEN
@@ -152,6 +149,6 @@
             ENDIF
          ENDIF
-         CALL wrk_dealloc( jpi, jpj,      zsidep )
-         CALL wrk_dealloc( jpi, jpj, jpk, zpdep, zirondep      )
+         DEALLOCATE( zsidep )
+         DEALLOCATE( zpdep, zirondep )
          !                                              
       ENDIF
@@ -514,10 +511,6 @@
       ENDIF
       !
-                      CALL wrk_dealloc( jpi, jpj, zdenit2d, zwork1, zwork2, zwork3, zbureff )
-                      CALL wrk_dealloc( jpi, jpj, zwsbio3, zwsbio4, zwscal )
-                      CALL wrk_dealloc( jpi, jpj, zsedcal,  zsedsi, zsedc )
-                      CALL wrk_dealloc( jpi, jpj, jpk, zlight, zsoufer )
-      IF( ln_p5z )    CALL wrk_dealloc( jpi, jpj, jpk, ztrpo4, ztrdop )
-      IF( ln_ligand ) CALL wrk_dealloc( jpi, jpj, zwsfep )
+      IF( ln_p5z )    DEALLOCATE( ztrpo4, ztrdop )
+      IF( ln_ligand ) DEALLOCATE( zwsfep )
       !
       IF( ln_timing )  CALL timing_stop('p4z_sed')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 9125)
@@ -65,6 +65,6 @@
       REAL(wp) ::   zfact, zwsmax, zmax
       CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zw3d
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zw2d
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zw3d
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:  ) :: zw2d
       !!---------------------------------------------------------------------
       !
@@ -212,6 +212,5 @@
      IF( lk_iomput ) THEN
        IF( knt == nrdttrc ) THEN
-          CALL wrk_alloc( jpi, jpj,      zw2d )
-          CALL wrk_alloc( jpi, jpj, jpk, zw3d )
+          ALLOCATE( zw2d(jpi,jpj), zw3d(jpi,jpj,jpk) )
           zfact = 1.e+3 * rfact2r  !  conversion from mol/l/kt to  mol/m3/s
           !
@@ -250,6 +249,5 @@
           IF( iom_use( "tcexp" ) )  CALL iom_put( "tcexp" , t_oce_co2_exp * zfact )   ! molC/s
           ! 
-          CALL wrk_dealloc( jpi, jpj,      zw2d )
-          CALL wrk_dealloc( jpi, jpj, jpk, zw3d )
+          DEALLOCATE( zw2d, zw3d )
         ENDIF
       ENDIF
@@ -304,12 +302,9 @@
       INTEGER  ::   ji, jj, jk, jn
       REAL(wp) ::   zigma,zew,zign, zflx, zstep
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: ztraz, zakz, zwsink2, ztrb 
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: ztraz, zakz, zwsink2, ztrb 
       !!---------------------------------------------------------------------
       !
       IF( ln_timing )   CALL timing_start('p4z_sink2')
       !
-      ! Allocate temporary workspace
-      CALL wrk_alloc( jpi, jpj, jpk, ztraz, zakz, zwsink2, ztrb )
-
       zstep = rfact2 / REAL( kiter, wp ) / 2.
 
@@ -391,6 +386,4 @@
       psinkflx(:,:,:)   = 2. * psinkflx(:,:,:)
       !
-      CALL wrk_dealloc( jpi, jpj, jpk, ztraz, zakz, zwsink2, ztrb )
-      !
       IF( ln_timing )  CALL timing_stop('p4z_sink2')
       !
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 9125)
@@ -420,5 +420,5 @@
       CHARACTER(LEN=100)   ::   cltxt
       INTEGER :: jk
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zwork
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zwork
       !!----------------------------------------------------------------------
       !
@@ -437,6 +437,4 @@
       ENDIF
 
-      CALL wrk_alloc( jpi, jpj, jpk, zwork )
-      !
       IF( iom_use( "pno3tot" ) .OR. ( ln_check_mass .AND. kt == nitend )  ) THEN
          !   Compute the budget of NO3, ALK, Si, Fer
@@ -503,6 +501,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi, jpj, jpk, zwork )
-      !
       ! Global budget of N SMS : denitrification in the water column and in the sediment
       !                          nitrogen fixation by the diazotrophs
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmeso.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmeso.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmeso.F90	(revision 9125)
@@ -85,5 +85,6 @@
       CHARACTER (len=25) :: charout
       REAL(wp) :: zrfact2, zmetexcess
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zgrazing, zw3d
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zgrazing
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zw3d
 
       !!---------------------------------------------------------------------
@@ -91,5 +92,4 @@
       IF( ln_timing )   CALL timing_start('p5z_meso')
       !
-      CALL wrk_alloc( jpi, jpj, jpk, zgrazing )
       zgrazing(:,:,:) = 0._wp
 
@@ -342,5 +342,5 @@
       !
       IF( lk_iomput .AND. knt == nrdttrc ) THEN
-         CALL wrk_alloc( jpi, jpj, jpk, zw3d )
+         ALLOCATE( zw3d(jpi,jpj,jpk) )
          IF( iom_use( "GRAZ2" ) ) THEN
             zw3d(:,:,:) = zgrazing(:,:,:) * 1.e+3 * rfact2r * tmask(:,:,:)  !   Total grazing of phyto by zooplankton
@@ -351,5 +351,5 @@
             CALL iom_put( "PCAL", zw3d )
          ENDIF
-         CALL wrk_dealloc( jpi, jpj, jpk, zw3d )
+         DEALLOCATE( zw3d )
       ENDIF
       !
@@ -359,6 +359,4 @@
         CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
       ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj, jpk, zgrazing )
       !
       IF( ln_timing )   CALL timing_stop('p5z_meso')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmicro.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmicro.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zmicro.F90	(revision 9125)
@@ -82,11 +82,10 @@
       REAL(wp) :: zgrazdc, zgrazdn, zgrazdp, zgrazdf, zgraznf, zgrazz
       REAL(wp) :: zgrazpc, zgrazpn, zgrazpp, zgrazpf, zbeta, zrfact2, zmetexcess
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zgrazing, zw3d
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zgrazing
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zw3d
       CHARACTER (len=25) :: charout
       !!---------------------------------------------------------------------
       !
       IF( ln_timing )   CALL timing_start('p5z_micro')
-      !
-      CALL wrk_alloc( jpi, jpj, jpk, zgrazing )
       !
       zmetexcess = 0.0
@@ -290,10 +289,10 @@
       !
       IF( lk_iomput .AND. knt == nrdttrc ) THEN
-         CALL wrk_alloc( jpi, jpj, jpk, zw3d )
+         ALLOCATE( zw3d(jpi,jpj,jpk) )
          IF( iom_use( "GRAZ1" ) ) THEN
             zw3d(:,:,:) = zgrazing(:,:,:) * 1.e+3 * rfact2r * tmask(:,:,:)  !  Total grazing of phyto by zooplankton
             CALL iom_put( "GRAZ1", zw3d )
          ENDIF
-         CALL wrk_dealloc( jpi, jpj, jpk, zw3d )
+         DEALLOCATE( zw3d )
       ENDIF
       !
@@ -303,6 +302,4 @@
          CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
       ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj, jpk, zgrazing )
       !
       IF( ln_timing )   CALL timing_stop('p5z_micro')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zprod.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zprod.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zprod.F90	(revision 9125)
@@ -81,33 +81,22 @@
       REAL(wp) ::   zfact, zrfact2
       CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zmixnano, zmixpico, zmixdiat, zstrn
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zpislopeadn, zpislopeadp, zpislopeadd
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zprbio, zprpic, zprdia, zysopt
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zprchln, zprchlp, zprchld
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zprorcan, zprorcap, zprorcad 
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zprofed, zprofep, zprofen
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zpronewn, zpronewp, zpronewd
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zproregn, zproregp, zproregd
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zpropo4n, zpropo4p, zpropo4d
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zprodopn, zprodopp, zprodopd
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zrespn, zrespp, zrespd, zprnut
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zcroissn, zcroissp, zcroissd
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zmxl_fac, zmxl_chl
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zw3d
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zw2d
+      REAL(wp), DIMENSION(jpi,jpj    ) :: zmixnano, zmixpico, zmixdiat, zstrn
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zpislopeadn, zpislopeadp, zpislopeadd
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zprbio, zprpic, zprdia, zysopt
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zprchln, zprchlp, zprchld
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zprorcan, zprorcap, zprorcad 
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zprofed, zprofep, zprofen
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zpronewn, zpronewp, zpronewd
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zproregn, zproregp, zproregd
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zpropo4n, zpropo4p, zpropo4d
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zprodopn, zprodopp, zprodopd
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zrespn, zrespp, zrespd, zprnut
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zcroissn, zcroissp, zcroissd
+      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmxl_fac, zmxl_chl
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zw3d
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:  ) :: zw2d
       !!---------------------------------------------------------------------
       !
       IF( ln_timing )   CALL timing_start('p5z_prod')
-      !
-      !  Allocate temporary workspace
-      CALL wrk_alloc( jpi, jpj,      zmixnano, zmixpico, zmixdiat, zstrn )
-      CALL wrk_alloc( jpi, jpj, jpk, zmxl_fac, zmxl_chl )
-      CALL wrk_alloc( jpi, jpj, jpk, zpislopeadn, zpislopeadp, zpislopeadd, zysopt ) 
-      CALL wrk_alloc( jpi, jpj, jpk, zprdia, zprpic, zprbio, zprorcan, zprorcap, zprorcad )
-      CALL wrk_alloc( jpi, jpj, jpk, zprofed, zprofep, zprofen )
-      CALL wrk_alloc( jpi, jpj, jpk, zpronewn, zpronewp, zpronewd, zproregn, zproregp, zproregd )
-      CALL wrk_alloc( jpi, jpj, jpk, zpropo4n, zpropo4p, zpropo4d, zrespn, zrespp, zrespd, zprnut )
-      CALL wrk_alloc( jpi, jpj, jpk, zprchln, zprchlp, zprchld, zprodopn, zprodopp, zprodopd )
-      CALL wrk_alloc( jpi, jpj, jpk, zcroissp, zcroissn, zcroissd )
       !
       zprorcan(:,:,:) = 0._wp ; zprorcap(:,:,:) = 0._wp ; zprorcad(:,:,:) = 0._wp
@@ -474,6 +463,5 @@
     IF( lk_iomput ) THEN
        IF( knt == nrdttrc ) THEN
-          CALL wrk_alloc( jpi, jpj,      zw2d )
-          CALL wrk_alloc( jpi, jpj, jpk, zw3d )
+          ALLOCATE( zw2d(jpi,jpj), zw3d(jpi,jpj,jpk) )
           zfact = 1.e+3 * rfact2r  !  conversion from mol/l/kt to  mol/m3/s
           !
@@ -550,6 +538,5 @@
           IF( iom_use( "tintpp" ) )  CALL iom_put( "tintpp" , tpp * zfact )  !  global total integrated primary production molC/s
           !
-          CALL wrk_dealloc( jpi, jpj,      zw2d )
-          CALL wrk_dealloc( jpi, jpj, jpk, zw3d )
+          DEALLOCATE( zw2d, zw3d )
        ENDIF
      ENDIF
@@ -560,14 +547,4 @@
          CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
       ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj,      zmixnano, zmixpico, zmixdiat, zstrn )
-      CALL wrk_dealloc( jpi, jpj, jpk, zmxl_fac, zmxl_chl )
-      CALL wrk_dealloc( jpi, jpj, jpk, zpislopeadn, zpislopeadp, zpislopeadd, zysopt )                           
-      CALL wrk_dealloc( jpi, jpj, jpk, zprdia, zprpic, zprbio, zprorcan, zprorcap, zprorcad )
-      CALL wrk_dealloc( jpi, jpj, jpk, zprofed, zprofep, zprofen ) 
-      CALL wrk_dealloc( jpi, jpj, jpk, zpronewn, zpronewp, zpronewd, zproregn, zproregp, zproregd )
-      CALL wrk_dealloc( jpi, jpj, jpk, zpropo4n, zpropo4p, zpropo4d, zrespn, zrespp, zrespd, zprnut )
-      CALL wrk_dealloc( jpi, jpj, jpk, zprchln, zprchlp, zprchld, zprodopn, zprodopp, zprodopd )
-      CALL wrk_dealloc( jpi, jpj, jpk, zcroissp, zcroissn, zcroissd )
       !
       IF( ln_timing )   CALL timing_stop('p5z_prod')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90	(revision 9125)
@@ -47,5 +47,5 @@
       INTEGER, INTENT( in ) ::   kt   ! ocean time-step 
       CHARACTER (len=22) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   ztrtrd
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   ztrtrd
       !!----------------------------------------------------------------------
       !
@@ -58,5 +58,5 @@
 
       IF( l_trdtrc )  THEN
-         CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrtrd ) ! temporary save of trends
+         ALLOCATE( ztrtrd(jpi,jpj,jpk,jptra) ) ! temporary save of trends
          ztrtrd(:,:,:,:)  = tra(:,:,:,:)
       ENDIF
@@ -89,5 +89,5 @@
            CALL trd_tra( kt, 'TRC', jn, jptra_bbl, ztrtrd(:,:,:,jn) )
         END DO
-        CALL wrk_dealloc( jpi, jpj, jpk, jptra, ztrtrd ) ! temporary save of trends
+        DEALLOCATE( ztrtrd ) ! temporary save of trends
       ENDIF
       !
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90	(revision 9125)
@@ -85,15 +85,15 @@
       INTEGER ::   ji, jj, jk, jn, jl   ! dummy loop indices
       CHARACTER (len=22) ::   charout
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztrtrd
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztrcdta   ! 3D  workspace
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrtrd
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrcdta   ! 3D  workspace
       !!----------------------------------------------------------------------
       !
       IF( ln_timing )   CALL timing_start('trc_dmp')
       !
-      IF( l_trdtrc )   CALL wrk_alloc( jpi, jpj, jpk, ztrtrd )   ! temporary save of trends
+      IF( l_trdtrc )   ALLOCATE( ztrtrd(jpi,jpj,jpk) )   ! temporary save of trends
       !
       IF( nb_trcdta > 0 ) THEN  ! Initialisation of tracer from a file that may also be used for damping
          !
-         CALL wrk_alloc( jpi, jpj, jpk, ztrcdta )    ! Memory allocation
+         ALLOCATE( ztrcdta(jpi,jpj,jpk) )    ! Memory allocation
          !                                                          ! ===========
          DO jn = 1, jptra                                           ! tracer loop
@@ -150,8 +150,8 @@
          END DO                                                     ! tracer loop
          !                                                          ! ===========
-         CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta )
-      ENDIF
-      !
-      IF( l_trdtrc )  CALL wrk_dealloc( jpi, jpj, jpk, ztrtrd )
+         DEALLOCATE( ztrcdta )
+      ENDIF
+      !
+      IF( l_trdtrc )  DEALLOCATE( ztrtrd )
       !                                          ! print mean trends (used for debugging)
       IF( ln_ctl ) THEN
@@ -352,5 +352,5 @@
          IF(lwp)  WRITE(numout,*)
          !
-         CALL wrk_alloc( jpi, jpj, jpk, ztrcdta )   ! Memory allocation
+         ALLOCATE( ztrcdta(jpi,jpj,jpk) )   ! Memory allocation
          !
          DO jn = 1, jptra
@@ -370,5 +370,5 @@
              ENDIF
           ENDDO
-          CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta )
+          DEALLOCATE( ztrcdta )
       ENDIF
       !
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90	(revision 9125)
@@ -70,5 +70,5 @@
       REAL(wp)           :: zdep
       CHARACTER (len=22) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:,:)   ::   zahu, zahv
+      REAL(wp), DIMENSION(jpi,jpj,jpk)   ::   zahu, zahv
       REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   ztrtrd
       !!----------------------------------------------------------------------
@@ -77,9 +77,8 @@
       !
       IF( l_trdtrc )  THEN
-         CALL wrk_alloc( jpi,jpj,jpk,jptra,   ztrtrd )
+         ALLOCATE( ztrtrd(jpi,jpj,jpk,jptra) )
          ztrtrd(:,:,:,:)  = tra(:,:,:,:)
       ENDIF
       !                                  !* set the lateral diffusivity coef. for passive tracer      
-      CALL wrk_alloc( jpi,jpj,jpk,   zahu, zahv )
       zahu(:,:,:) = rldf * ahtu(:,:,:) 
       zahv(:,:,:) = rldf * ahtv(:,:,:)
@@ -113,5 +112,5 @@
            CALL trd_tra( kt, 'TRC', jn, jptra_ldf, ztrtrd(:,:,:,jn) )
         END DO
-        CALL wrk_dealloc( jpi, jpj, jpk, jptra, ztrtrd )
+        DEALLOCATE( ztrtrd )
       ENDIF
       !                
@@ -121,6 +120,4 @@
          CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' )
       ENDIF
-      !
-      CALL wrk_dealloc( jpi,jpj,jpk,   zahu, zahv )
       !
       IF( ln_timing )   CALL timing_stop('trc_ldf')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90	(revision 9125)
@@ -139,5 +139,5 @@
       REAL(wp) :: ztrcorb, ztrmasb   ! temporary scalars
       REAL(wp) :: zcoef, ztrcorn, ztrmasn   !    "         "
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztrtrdb, ztrtrdn   ! workspace arrays
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrtrdb, ztrtrdn   ! workspace arrays
       REAL(wp) :: zs2rdt
       LOGICAL ::   lldebug = .FALSE.
@@ -145,5 +145,5 @@
 
  
-      IF( l_trdtrc )  CALL wrk_alloc( jpi, jpj, jpk, ztrtrdb, ztrtrdn )
+      IF( l_trdtrc )  ALLOCATE( ztrtrdb(jpi,jpj,jpk), ztrtrdn(jpi,jpj,jpk) )
       
       IF( PRESENT( cpreserv )  ) THEN   !  total tracer concentration is preserved 
@@ -226,5 +226,5 @@
       ENDIF
 
-      IF( l_trdtrc )  CALL wrk_dealloc( jpi, jpj, jpk, ztrtrdb, ztrtrdn )
+      IF( l_trdtrc )  DEALLOCATE( ztrtrdb, ztrtrdn )
 
    END SUBROUTINE trc_rad_sms
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 9125)
@@ -64,6 +64,6 @@
       REAL(wp) ::   zftra, zcd, zdtra, ztfx, ztra   !   -      -
       CHARACTER (len=22) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zsfx
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztrtrd
+      REAL(wp), DIMENSION(jpi,jpj)   ::   zsfx
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrtrd
       !!---------------------------------------------------------------------
       !
@@ -71,6 +71,5 @@
       !
       ! Allocate temporary workspace
-                      CALL wrk_alloc( jpi,jpj,       zsfx   )
-      IF( l_trdtrc )  CALL wrk_alloc( jpi,jpj,jpk,   ztrtrd )
+      IF( l_trdtrc )  ALLOCATE( ztrtrd(jpi,jpj,jpk) )
       !
       zrtrn = 1.e-15_wp
@@ -179,6 +178,5 @@
                                            CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' )
       ENDIF
-                      CALL wrk_dealloc( jpi,jpj,       zsfx   )
-      IF( l_trdtrc )  CALL wrk_dealloc( jpi,jpj,jpk,   ztrtrd )
+      IF( l_trdtrc )  DEALLOCATE( ztrtrd )
       !
       IF( ln_timing )   CALL timing_stop('trc_sbc')
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 9125)
@@ -31,5 +31,4 @@
    USE prtctl            ! print control
    USE sms_pisces        ! PISCES bio-model
-   USE wrk_nemo          ! Memory allocation
 
    IMPLICIT NONE
@@ -97,8 +96,6 @@
       !
       INTEGER ::   ji, jj, jk, isum
-      REAL(wp), POINTER, DIMENSION(:,:) :: zvlmsk
-      !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, zvlmsk )
+      REAL(wp), DIMENSION(jpi,jpj) :: zvlmsk
+      !!----------------------------------------------------------------------
 
       ! I. Definition of control surface and integration weights
@@ -182,6 +179,4 @@
             tmltrd_trc(:,:,ktrd,kjn) = tmltrd_trc(:,:,ktrd,kjn) + ptrc_trdmxl(:,:,1) * wkx_trc(:,:,1)  ! non penetrative
       END SELECT
-      !
-      CALL wrk_dealloc( jpi, jpj, zvlmsk )
       !
    END SUBROUTINE trd_mxl_trc_zint
@@ -241,21 +236,18 @@
       REAL(wp) ::   zavt, zfn, zfn2
       !
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztmltot             ! d(trc)/dt over the anlysis window (incl. Asselin)
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztmlres             ! residual = dh/dt entrainment term
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztmlatf             ! for storage only
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztmlrad             ! for storage only (for trb<0 corr in trcrad)
-      !
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztmltot2            ! -+
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztmlres2            !  | working arrays to diagnose the trends
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztmltrdm2           !  | associated with the time meaned ML
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztmlatf2            !  | passive tracers
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztmlrad2            !  | (-> for trb<0 corr in trcrad)
+      REAL(wp), DIMENSION(jpi,jpj,jptra) ::   ztmltot             ! d(trc)/dt over the anlysis window (incl. Asselin)
+      REAL(wp), DIMENSION(jpi,jpj,jptra) ::   ztmlres             ! residual = dh/dt entrainment term
+      REAL(wp), DIMENSION(jpi,jpj,jptra) ::   ztmlatf             ! for storage only
+      REAL(wp), DIMENSION(jpi,jpj,jptra) ::   ztmlrad             ! for storage only (for trb<0 corr in trcrad)
+      !
+      REAL(wp), DIMENSION(jpi,jpj,jptra) ::   ztmltot2            ! -+
+      REAL(wp), DIMENSION(jpi,jpj,jptra) ::   ztmlres2            !  | working arrays to diagnose the trends
+      REAL(wp), DIMENSION(jpi,jpj,jptra) ::   ztmltrdm2           !  | associated with the time meaned ML
+      REAL(wp), DIMENSION(jpi,jpj,jptra) ::   ztmlatf2            !  | passive tracers
+      REAL(wp), DIMENSION(jpi,jpj,jptra) ::   ztmlrad2            !  | (-> for trb<0 corr in trcrad)
       !
       CHARACTER (LEN=10) ::   clvar
       !!----------------------------------------------------------------------
 
-      ! Set-up pointers into sub-arrays of workspaces
-      CALL wrk_alloc( jpi, jpj, jptra, ztmltot , ztmlres , ztmlatf , ztmlrad             )
-      CALL wrk_alloc( jpi, jpj, jptra, ztmltot2, ztmlres2, ztmlatf2, ztmlrad2, ztmltrdm2 )
 
       IF( nn_dttrc  /= 1  )   CALL ctl_stop( " Be careful, trends diags never validated " )
@@ -734,7 +726,4 @@
 
       IF( lrst_trc )   CALL trd_mxl_trc_rst_write( kt )  ! this must be after the array swap above (III.3)
-
-      CALL wrk_dealloc( jpi, jpj, jptra, ztmltot , ztmlres , ztmlatf , ztmlrad             )
-      CALL wrk_dealloc( jpi, jpj, jptra, ztmltot2, ztmlres2, ztmlatf2, ztmlrad2, ztmltrdm2 )
       !
    END SUBROUTINE trd_mxl_trc
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90	(revision 9125)
@@ -19,5 +19,4 @@
 
    USE in_out_manager                           !* IO manager *
-   USE wrk_nemo                                 !* Memory Allocation *
    USE timing                                   !* Timing * 
    USE lib_mpp                                  !* MPP library                         
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/prtctl_trc.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/prtctl_trc.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/prtctl_trc.F90	(revision 9125)
@@ -68,8 +68,7 @@
       CHARACTER (len=20), ALLOCATABLE, DIMENSION(:) ::   cl
       CHARACTER (len=10) ::   cl2
-      REAL(wp), POINTER, DIMENSION(:,:,:)  :: zmask, ztab3d 
-      !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, jpk, zmask, ztab3d )
+      REAL(wp), DIMENSION(jpi,jpj,jpk)  :: zmask, ztab3d 
+      !!----------------------------------------------------------------------
+
       ALLOCATE( cl(jptra) )
       !                                      ! Arrays, scalars initialization 
@@ -148,5 +147,4 @@
       END DO
       !
-      CALL wrk_dealloc( jpi, jpj, jpk, zmask, ztab3d )
       DEALLOCATE( cl )
       !
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcsub.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 9124)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 9125)
@@ -467,11 +467,9 @@
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
       REAL(wp) ::   zcoefu, zcoefv, zcoeff, z2dt, z1_2dt, z1_rau0   ! local scalars
-      REAL(wp), POINTER, DIMENSION(:,:) :: zhdiv
+      REAL(wp), DIMENSION(jpi,jpj) :: zhdiv
       !!---------------------------------------------------------------------
       !
       IF( ln_timing )   CALL timing_start('trc_sub_ssh')
       !
-      ! Allocate temporary workspace
-      CALL wrk_alloc( jpi,jpj,   zhdiv )
 
       IF( kt == nittrc000 ) THEN
@@ -527,6 +525,4 @@
          IF( ln_bdy ) wn(:,:,jk) = wn(:,:,jk) * bdytmask(:,:)
       END DO
-      !
-      CALL wrk_dealloc( jpi,jpj,   zhdiv )
       !
       IF( ln_timing )   CALL timing_stop('trc_sub_ssh')
