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')
