Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90	(revision 3152)
@@ -10,4 +10,5 @@
    USE in_out_manager   ! I/O manager
    USE lib_mpp          ! distributed memory computing
+   USE wrk_nemo_2       ! work arrays
 
    IMPLICIT NONE
@@ -74,9 +75,4 @@
       !!                    clinfo3 : additional information 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   ztab2d_1 => wrk_2d_30 , ztab2d_2 => wrk_2d_31
-      USE wrk_nemo, ONLY:   zmask1   => wrk_3d_11 , zmask2   => wrk_3d_12 
-      USE wrk_nemo, ONLY:   ztab3d_1 => wrk_3d_13 , ztab3d_2 => wrk_3d_14
-      !
       REAL(wp), DIMENSION(:,:)  , INTENT(in), OPTIONAL ::   tab2d_1
       REAL(wp), DIMENSION(:,:,:), INTENT(in), OPTIONAL ::   tab3d_1
@@ -94,9 +90,10 @@
       INTEGER ::   overlap, jn, sind, eind, kdir,j_id
       REAL(wp) :: zsum1, zsum2, zvctl1, zvctl2
-      !!----------------------------------------------------------------------
-
-      IF( wrk_in_use(2, 30,31) .OR. wrk_in_use(3, 11,12,13,14) ) THEN
-         CALL ctl_stop('prt_ctl : requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+      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 )
 
       ! Arrays, scalars initialization 
@@ -205,6 +202,6 @@
       ENDDO
 
-      IF( wrk_not_released(2, 30,31)     .OR.   &
-          wrk_not_released(3, 11,12,13,14) )   CALL ctl_stop('prt_ctl: failed to release workspace arrays')
+      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
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90	(revision 3152)
@@ -19,4 +19,5 @@
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! MPP library
+   USE wrk_nemo_2      ! work arrays
 
    IMPLICIT NONE
@@ -65,7 +66,4 @@
       !! References :   Shine and Hendersson-Sellers 1985, JGR, 90(D1), 2243-2250.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   wrk_3d_6 , wrk_3d_7    ! 3D workspace
-      !!
       REAL(wp), INTENT(in   ), DIMENSION(:,:,:) ::   pt_ice      !  ice surface temperature (Kelvin)
       REAL(wp), INTENT(in   ), DIMENSION(:,:,:) ::   ph_ice      !  sea-ice thickness
@@ -91,10 +89,5 @@
       ijpl = SIZE( pt_ice, 3 )                     ! number of ice categories
 
-      IF( wrk_in_use(3, 6,7) ) THEN
-         CALL ctl_stop('albedo_ice: requested workspace arrays are unavailable')   ;   RETURN
-      ENDIF
-      ! Associate pointers with sub-arrays of workspace arrays
-      zalbfz  =>   wrk_3d_6(:,:,1:ijpl)
-      zficeth =>   wrk_3d_7(:,:,1:ijpl)
+      CALL wrk_alloc( jpi,jpj,ijpl, zalbfz, zficeth )
 
       IF( albd_init == 0 )   CALL albedo_init      ! initialization 
@@ -173,5 +166,5 @@
       pa_ice_os(:,:,:) = pa_ice_cs(:,:,:) + rn_cloud       ! Oberhuber correction
       !
-      IF( wrk_not_released(3, 6,7) )   CALL ctl_stop('albedo_ice: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj,ijpl, zalbfz, zficeth )
       !
    END SUBROUTINE albedo_ice
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis4.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis4.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis4.F90	(revision 3152)
@@ -32,4 +32,5 @@
    USE lbclnk           ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp          ! MPP library
+   USE wrk_nemo_2       ! work arrays
 
    IMPLICIT NONE
@@ -111,8 +112,4 @@
       !! ** Method  :   OASIS4 MPI communication 
       !!--------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY: zclo => wrk_3d_1, zcla => wrk_3d_2
-      USE wrk_nemo, ONLY: zlon => wrk_2d_1, zlat => wrk_2d_2
-      !
       INTEGER, INTENT(in) :: krcv, ksnd     ! Number of received and sent coupling fields
       !
@@ -145,9 +142,10 @@
       TYPE(PRISM_Time_struct)    :: tmpdate
       INTEGER                    :: idate_incr      ! date increment
-      !!--------------------------------------------------------------------
-
-      IF( wrk_in_use(3, 1,2) .OR. wrk_in_use(2, 1,2) )THEN
-         CALL ctl_stop('cpl_prism_define: ERROR: requested workspace arrays are unavailable.')   ;   RETURN
-      ENDIF
+      REAL(wp), POINTER, DIMENSION(:,:)   ::   zlon, zlat
+      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zclo, zcla
+      !!--------------------------------------------------------------------
+      
+      CALL wrk_alloc( jpi,jpj, zlon, zlat )
+      CALL wrk_alloc( jpi,jpj,jpk, zclo, zcla )
 
       IF(lwp) WRITE(numout,*)
@@ -322,6 +320,6 @@
       IF ( nerror /= PRISM_Success )   CALL prism_abort ( ncomp_id, 'cpl_prism_define', 'Failure in prism_enddef')
       
-      IF( wrk_not_released(3, 1,2) .OR.   &
-          wrk_not_released(2, 1,2)   )   CALL ctl_stop('cpl_prism_define: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, zlon, zlat )
+      CALL wrk_dealloc( jpi,jpj,jpk, zclo, zcla )
       !
    END SUBROUTINE cpl_prism_define
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 3152)
@@ -20,4 +20,5 @@
    USE geo2ocean       ! for vector rotation on to model grid
    USE lib_mpp         ! MPP library
+   USE wrk_nemo_2      ! work arrays
    USE ioipsl, ONLY :   ymds2ju, ju2ymds   ! for calendar
 
@@ -704,20 +705,16 @@
       !! ** Purpose :   Vector fields may need to be rotated onto the local grid direction
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY: utmp => wrk_2d_24, vtmp => wrk_2d_25      ! 2D workspace
-      !!
       INTEGER  , INTENT(in   )               ::   kt        ! ocean time step
       TYPE(FLD), INTENT(inout), DIMENSION(:) ::   sd        ! input field related variables
       !!
-      INTEGER                      ::   ju, jv, jk   ! loop indices
-      INTEGER                      ::   imf          ! size of the structure sd
-      INTEGER                      ::   ill          ! character length
-      INTEGER                      ::   iv           ! indice of V component
-      CHARACTER (LEN=100)          ::   clcomp       ! dummy weight name
-      !!---------------------------------------------------------------------
-
-      IF(wrk_in_use(2, 24,25) ) THEN
-         CALL ctl_stop('fld_rot: ERROR: requested workspace arrays are unavailable.')   ;   RETURN
-      END IF
+      INTEGER                           ::   ju, jv, jk   ! loop indices
+      INTEGER                           ::   imf          ! size of the structure sd
+      INTEGER                           ::   ill          ! character length
+      INTEGER                           ::   iv           ! indice of V component
+      REAL(wp), POINTER, DIMENSION(:,:) ::   utmp, vtmp   ! temporary arrays for vector rotation
+      CHARACTER (LEN=100)               ::   clcomp       ! dummy weight name
+      !!---------------------------------------------------------------------
+
+      CALL wrk_alloc( jpi,jpj, utmp, vtmp )
 
       !! (sga: following code should be modified so that pairs arent searched for each time
@@ -754,5 +751,5 @@
        END DO
       !
-      IF(wrk_not_released(2, 24,25) )    CALL ctl_stop('fld_rot: ERROR: failed to release workspace arrays.')
+      CALL wrk_dealloc( jpi,jpj, utmp, vtmp )
       !
    END SUBROUTINE fld_rot
@@ -921,23 +918,20 @@
       !!                file, restructuring as required
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released, iwrk_in_use, iwrk_not_released
-      USE wrk_nemo, ONLY:   data_tmp =>  wrk_2d_1     ! 2D real    workspace
-      USE wrk_nemo, ONLY:   data_src => iwrk_2d_1     ! 2D integer workspace
-      !!
       TYPE( FLD ), INTENT(in) ::   sd   ! field with name of weights file
       !!
-      INTEGER                ::   jn            ! dummy loop indices
-      INTEGER                ::   inum          ! temporary logical unit
-      INTEGER                ::   id            ! temporary variable id
-      INTEGER                ::   ipk           ! temporary vertical dimension
-      CHARACTER (len=5)      ::   aname
-      INTEGER , DIMENSION(3) ::   ddims
-      LOGICAL                ::   cyclical
-      INTEGER                ::   zwrap      ! local integer
-      !!----------------------------------------------------------------------
-      !
-      IF(  wrk_in_use(2, 1)  .OR.  iwrk_in_use(2,1) ) THEN
-         CALL ctl_stop('fld_weight: requested workspace arrays are unavailable')   ;   RETURN
-      ENDIF
+      INTEGER                           ::   jn            ! dummy loop indices
+      INTEGER                           ::   inum          ! temporary logical unit
+      INTEGER                           ::   id            ! temporary variable id
+      INTEGER                           ::   ipk           ! temporary vertical dimension
+      CHARACTER (len=5)                 ::   aname
+      INTEGER , DIMENSION(3)            ::   ddims
+      INTEGER , POINTER, DIMENSION(:,:) ::   data_src
+      REAL(wp), POINTER, DIMENSION(:,:) ::   data_tmp
+      LOGICAL                           ::   cyclical
+      INTEGER                           ::   zwrap      ! local integer
+      !!----------------------------------------------------------------------
+      !
+      CALL wrk_alloc( jpi,jpj, data_src )   ! integer
+      CALL wrk_alloc( jpi,jpj, data_tmp )
       !
       IF( nxt_wgt > tot_wgts ) THEN
@@ -1051,6 +1045,6 @@
       ENDIF
 
-      IF(  wrk_not_released(2, 1) .OR.    &
-          iwrk_not_released(2, 1)  )   CALL ctl_stop('fld_weight: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, data_src )   ! integer
+      CALL wrk_dealloc( jpi,jpj, data_tmp )
       !
    END SUBROUTINE fld_weight
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 3152)
@@ -27,4 +27,5 @@
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distribued memory computing library
+   USE wrk_nemo_2      ! work arrays
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
 
@@ -207,9 +208,4 @@
       !!  ** Nota    :   sf has to be a dummy argument for AGRIF on NEC
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY: zqlw => wrk_2d_1  ! long-wave heat flux over ocean
-      USE wrk_nemo, ONLY: zqla => wrk_2d_2  ! latent heat flux over ocean
-      USE wrk_nemo, ONLY: zqsb => wrk_2d_3  ! sensible heat flux over ocean
-      !!
       TYPE(fld), INTENT(in), DIMENSION(:)       ::   sf    ! input data
       REAL(wp) , INTENT(in), DIMENSION(jpi,jpj) ::   pst   ! surface temperature                      [Celcius]
@@ -227,9 +223,10 @@
       REAL(wp) ::   zrhoa, zev, zes, zeso, zqatm, zevsqr        !    -         -
       REAL(wp) ::   ztx2, zty2                                  !    -         -
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zqlw        ! long-wave heat flux over ocean
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zqla        ! latent heat flux over ocean
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zqsb        ! sensible heat flux over ocean
       !!---------------------------------------------------------------------
 
-      IF( wrk_in_use(3, 1,2,3) ) THEN
-         CALL ctl_stop('blk_oce_clio: requested workspace arrays are unavailable')   ;   RETURN
-      ENDIF
+      CALL wrk_alloc( jpi,jpj, zqlw, zqla, zqsb )
 
       zpatm = 101000._wp      ! atmospheric pressure  (assumed constant here)
@@ -382,5 +379,5 @@
       ENDIF
 
-      IF( wrk_not_released(3, 1,2,3) )   CALL ctl_stop('blk_oce_clio: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, zqlw, zqla, zqsb )
       !
    END SUBROUTINE blk_oce_clio
@@ -414,11 +411,4 @@
       !!
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   ztatm  => wrk_2d_1   ! Tair in Kelvin
-      USE wrk_nemo, ONLY:   zqatm  => wrk_2d_2   ! specific humidity
-      USE wrk_nemo, ONLY:   zevsqr => wrk_2d_3   ! vapour pressure square-root
-      USE wrk_nemo, ONLY:   zrhoa  => wrk_2d_4   ! air density
-      USE wrk_nemo, ONLY:   wrk_3d_1 , wrk_3d_2
-      !!
       REAL(wp), INTENT(in   ), DIMENSION(:,:,:)   ::   pst      ! ice surface temperature                   [Kelvin]
       REAL(wp), INTENT(in   ), DIMENSION(:,:,:)   ::   palb_cs  ! ice albedo (clear    sky) (alb_ice_cs)         [%]
@@ -448,15 +438,13 @@
       REAL(wp) ::   ztice3, zticemb, zticemb2, zdqlw, zdqsb     !    -         -
       !!
+      REAL(wp), DIMENSION(:,:)  , POINTER ::   ztatm   ! Tair in Kelvin
+      REAL(wp), DIMENSION(:,:)  , POINTER ::   zqatm   ! specific humidity
+      REAL(wp), DIMENSION(:,:)  , POINTER ::   zevsqr  ! vapour pressure square-root
+      REAL(wp), DIMENSION(:,:)  , POINTER ::   zrhoa   ! air density
       REAL(wp), DIMENSION(:,:,:), POINTER ::   z_qlw, z_qsb
       !!---------------------------------------------------------------------
 
-      IF(  wrk_in_use(2, 1,2,3,4)  .OR.  wrk_in_use(3, 1,2)  ) THEN
-         CALL ctl_stop('blk_ice_clio: requested workspace arrays are unavailable')   ;   RETURN
-      ELSE IF(pdim > jpk)THEN
-         CALL ctl_stop('blk_ice_clio: too many ice levels to use wrk_nemo 3D workspaces.')
-         RETURN
-      END IF
-      z_qlw => wrk_3d_1(:,:,1:pdim)
-      z_qsb => wrk_3d_2(:,:,1:pdim)
+      CALL wrk_alloc( jpi,jpj, ztatm, zqatm, zevsqr, zrhoa )
+      CALL wrk_alloc( jpi,jpj,pdim, z_qlw, z_qsb )
 
       ijpl  = pdim                           ! number of ice categories
@@ -634,6 +622,6 @@
       ENDIF
 
-      IF( wrk_not_released(2, 1,2,3,4)  .OR.   &
-          wrk_not_released(3, 1,2)      )   CALL ctl_stop('blk_ice_clio: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, ztatm, zqatm, zevsqr, zrhoa )
+      CALL wrk_dealloc( jpi,jpj,pdim, z_qlw, z_qsb )
       !
    END SUBROUTINE blk_ice_clio
@@ -650,9 +638,4 @@
       !!               - also initialise sbudyko and stauc once for all 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   zev   => wrk_2d_1                  ! vapour pressure
-      USE wrk_nemo, ONLY:   zdlha => wrk_2d_2 , zlsrise => wrk_2d_3 , zlsset => wrk_2d_4 
-      USE wrk_nemo, ONLY:   zps   => wrk_2d_5 , zpc     => wrk_2d_6   ! sin/cos of latitude per sin/cos of solar declination 
-      !!
       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj)     ::   pqsr_oce    ! shortwave radiation  over the ocean
       !!
@@ -673,9 +656,11 @@
       REAL(wp) ::   zxday, zdist, zcoef, zcoef1      !
       REAL(wp) ::   zes
+      
+      REAL(wp), DIMENSION(:,:), POINTER ::   zev          ! vapour pressure
+      REAL(wp), DIMENSION(:,:), POINTER ::   zdlha, zlsrise, zlsset     ! 2D workspace
+      REAL(wp), DIMENSION(:,:), POINTER ::   zps, zpc   ! sine (cosine) of latitude per sine (cosine) of solar declination 
       !!---------------------------------------------------------------------
 
-      IF( wrk_in_use(2, 1,2,3,4,5,6) ) THEN
-         CALL ctl_stop('blk_clio_qsr_oce: requested workspace arrays unavailable')   ;   RETURN
-      END IF
+      CALL wrk_alloc( jpi,jpj, zev, zdlha, zlsrise, zlsset, zps, zpc )
 
       IF( lbulk_init ) THEN             !   Initilization at first time step only
@@ -791,5 +776,5 @@
       END DO
 
-      IF( wrk_not_released(2, 1,2,3,4,5,6) )   CALL ctl_stop('blk_clio_qsr_oce: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, zev, zdlha, zlsrise, zlsset, zps, zpc )
       !
    END SUBROUTINE blk_clio_qsr_oce
@@ -806,11 +791,4 @@
       !!               - also initialise sbudyko and stauc once for all 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   zev     => wrk_2d_1     ! vapour pressure
-      USE wrk_nemo, ONLY:   zdlha   => wrk_2d_2     ! 2D workspace
-      USE wrk_nemo, ONLY:   zlsrise => wrk_2d_3     ! 2D workspace
-      USE wrk_nemo, ONLY:   zlsset  => wrk_2d_4     ! 2D workspace
-      USE wrk_nemo, ONLY:   zps     => wrk_2d_5 , zpc => wrk_2d_6   ! sin/cos of latitude per sin/cos of solar declination 
-      !!
       REAL(wp), INTENT(in   ), DIMENSION(:,:,:) ::   pa_ice_cs   ! albedo of ice under clear sky
       REAL(wp), INTENT(in   ), DIMENSION(:,:,:) ::   pa_ice_os   ! albedo of ice under overcast sky
@@ -830,9 +808,11 @@
       REAL(wp) ::   zxday, zdist, zcoef, zcoef1   !    -         -
       REAL(wp) ::   zqsr_ice_cs, zqsr_ice_os      !    -         -
-      !!---------------------------------------------------------------------
-
-      IF( wrk_in_use(2, 1,2,3,4,5,6) ) THEN
-         CALL ctl_stop('blk_clio_qsr_ice: requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+
+      REAL(wp), DIMENSION(:,:), POINTER ::   zev                      ! vapour pressure
+      REAL(wp), DIMENSION(:,:), POINTER ::   zdlha, zlsrise, zlsset   ! 2D workspace
+      REAL(wp), DIMENSION(:,:), POINTER ::   zps, zpc   ! sine (cosine) of latitude per sine (cosine) of solar declination 
+       !!---------------------------------------------------------------------
+
+      CALL wrk_alloc( jpi,jpj, zev, zdlha, zlsrise, zlsset, zps, zpc )
 
       ijpl = SIZE(pqsr_ice, 3 )      ! number of ice categories
@@ -937,5 +917,5 @@
       END DO
       !
-      IF( wrk_not_released(2, 1,2,3,4,5,6) )   CALL ctl_stop('blk_clio_qsr_ice: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, zev, zdlha, zlsrise, zlsset, zps, zpc )
       !
    END SUBROUTINE blk_clio_qsr_ice
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 3152)
@@ -33,4 +33,5 @@
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distribued memory computing library
+   USE wrk_nemo_2      ! work arrays
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE prtctl          ! Print control
@@ -223,16 +224,4 @@
       !!  ** Nota  :   sf has to be a dummy argument for AGRIF on NEC
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   zwnd_i => wrk_2d_1  , zwnd_j => wrk_2d_2      ! wind speed components at T-point
-      USE wrk_nemo, ONLY:   zqsatw => wrk_2d_3           ! specific humidity at pst
-      USE wrk_nemo, ONLY:   zqlw   => wrk_2d_4  , zqsb   => wrk_2d_5      ! long wave and sensible heat fluxes
-      USE wrk_nemo, ONLY:   zqla   => wrk_2d_6  , zevap  => wrk_2d_7      ! latent heat fluxes and evaporation
-      USE wrk_nemo, ONLY:   Cd     => wrk_2d_8           ! transfer coefficient for momentum      (tau)
-      USE wrk_nemo, ONLY:   Ch     => wrk_2d_9           ! transfer coefficient for sensible heat (Q_sens)
-      USE wrk_nemo, ONLY:   Ce     => wrk_2d_10          ! transfer coefficient for evaporation   (Q_lat)
-      USE wrk_nemo, ONLY:   zst    => wrk_2d_11          ! surface temperature in Kelvin
-      USE wrk_nemo, ONLY:   zt_zu  => wrk_2d_12          ! air temperature at wind speed height
-      USE wrk_nemo, ONLY:   zq_zu  => wrk_2d_13          ! air spec. hum.  at wind speed height
-      !
       TYPE(fld), INTENT(in), DIMENSION(:)   ::   sf    ! input data
       REAL(wp) , INTENT(in), DIMENSION(:,:) ::   pst   ! surface temperature                      [Celcius]
@@ -242,9 +231,18 @@
       INTEGER  ::   ji, jj               ! dummy loop indices
       REAL(wp) ::   zcoef_qsatw, zztmp   ! local variable
+      REAL(wp), DIMENSION(:,:), POINTER ::   zwnd_i, zwnd_j    ! wind speed components at T-point
+      REAL(wp), DIMENSION(:,:), POINTER ::   zqsatw            ! specific humidity at pst
+      REAL(wp), DIMENSION(:,:), POINTER ::   zqlw, zqsb        ! long wave and sensible heat fluxes
+      REAL(wp), DIMENSION(:,:), POINTER ::   zqla, zevap       ! latent heat fluxes and evaporation
+      REAL(wp), DIMENSION(:,:), POINTER ::   Cd                ! transfer coefficient for momentum      (tau)
+      REAL(wp), DIMENSION(:,:), POINTER ::   Ch                ! transfer coefficient for sensible heat (Q_sens)
+      REAL(wp), DIMENSION(:,:), POINTER ::   Ce                ! tansfert coefficient for evaporation   (Q_lat)
+      REAL(wp), DIMENSION(:,:), POINTER ::   zst               ! surface temperature in Kelvin
+      REAL(wp), DIMENSION(:,:), POINTER ::   zt_zu             ! air temperature at wind speed height
+      REAL(wp), DIMENSION(:,:), POINTER ::   zq_zu             ! air spec. hum.  at wind speed height
       !!---------------------------------------------------------------------
 
-      IF( wrk_in_use(2, 1,2,3,4,5,6,7,8,9,10,11,12,13) ) THEN
-         CALL ctl_stop('blk_oce_core: requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+      CALL wrk_alloc( jpi,jpj, zwnd_i, zwnd_j, zqsatw, zqlw, zqsb, zqla, zevap )
+      CALL wrk_alloc( jpi,jpj, Cd, Ch, Ce, zst, zt_zu, zq_zu )
       !
       ! local scalars ( place there for vector optimisation purposes)
@@ -396,6 +394,6 @@
       ENDIF
       !
-      IF( wrk_not_released(2, 1,2,3,4,5,6,7,8,9,10,11,12,13) )   &
-          CALL ctl_stop('blk_oce_core: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, zwnd_i, zwnd_j, zqsatw, zqlw, zqsb, zqla, zevap )
+      CALL wrk_dealloc( jpi,jpj, Cd, Ch, Ce, zst, zt_zu, zq_zu )
       !
    END SUBROUTINE blk_oce_core
@@ -419,8 +417,4 @@
       !! caution : the net upward water flux has with mm/day unit
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   z_wnds_t => wrk_2d_1                ! wind speed ( = | U10m - U_ice | ) at T-point
-      USE wrk_nemo, ONLY:   wrk_3d_4 , wrk_3d_5 , wrk_3d_6 , wrk_3d_7
-      !!
       REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   pst      ! ice surface temperature (>0, =rt0 over land) [Kelvin]
       REAL(wp), DIMENSION(:,:)  , INTENT(in   ) ::   pui      ! ice surface velocity (i- and i- components      [m/s]
@@ -450,4 +444,5 @@
       REAL(wp) ::             zwndi_t , zwndj_t                  ! relative wind components at T-point
       !!
+      REAL(wp), DIMENSION(:,:)  , POINTER ::   z_wnds_t          ! wind speed ( = | U10m - U_ice | ) at T-point
       REAL(wp), DIMENSION(:,:,:), POINTER ::   z_qlw             ! long wave heat flux over ice
       REAL(wp), DIMENSION(:,:,:), POINTER ::   z_qsb             ! sensible  heat flux over ice
@@ -456,18 +451,8 @@
       !!---------------------------------------------------------------------
 
+      CALL wrk_alloc( jpi,jpj, z_wnds_t )
+      CALL wrk_alloc( jpi,jpj,pdim, z_qlw, z_qsb, z_dqlw, z_dqsb ) 
+
       ijpl  = pdim                            ! number of ice categories
-
-      ! Set-up access to workspace arrays
-      IF( wrk_in_use(2, 1) .OR. wrk_in_use(3, 4,5,6,7) ) THEN
-         CALL ctl_stop('blk_ice_core: requested workspace arrays unavailable')   ;   RETURN
-      ELSE IF(ijpl > jpk) THEN
-         CALL ctl_stop('blk_ice_core: no. of ice categories > jpk so wrk_nemo 3D workspaces cannot be used.')
-         RETURN
-      END IF
-      ! Set-up pointers to sub-arrays of workspaces
-      z_qlw  => wrk_3d_4(:,:,1:ijpl)
-      z_qsb  => wrk_3d_5(:,:,1:ijpl)
-      z_dqlw => wrk_3d_6(:,:,1:ijpl)
-      z_dqsb => wrk_3d_7(:,:,1:ijpl)
 
       ! local scalars ( place there for vector optimisation purposes)
@@ -622,6 +607,6 @@
       ENDIF
 
-      IF( wrk_not_released(2, 1)       .OR.   &
-          wrk_not_released(3, 4,5,6,7) )   CALL ctl_stop('blk_ice_core: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, z_wnds_t )
+      CALL wrk_dealloc( jpi,jpj,pdim, z_qlw, z_qsb, z_dqlw, z_dqsb ) 
       !
    END SUBROUTINE blk_ice_core
@@ -644,24 +629,4 @@
       !! References :   Large & Yeager, 2004 : ???
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, iwrk_in_use, iwrk_not_released
-      USE wrk_nemo, ONLY: dU10 => wrk_2d_14        ! dU                             [m/s]
-      USE wrk_nemo, ONLY: dT => wrk_2d_15          ! air/sea temperature difference   [K]
-      USE wrk_nemo, ONLY: dq => wrk_2d_16          ! air/sea humidity difference      [K]
-      USE wrk_nemo, ONLY: Cd_n10 => wrk_2d_17      ! 10m neutral drag coefficient
-      USE wrk_nemo, ONLY: Ce_n10 => wrk_2d_18      ! 10m neutral latent coefficient
-      USE wrk_nemo, ONLY: Ch_n10 => wrk_2d_19      ! 10m neutral sensible coefficient
-      USE wrk_nemo, ONLY: sqrt_Cd_n10 => wrk_2d_20 ! root square of Cd_n10
-      USE wrk_nemo, ONLY: sqrt_Cd => wrk_2d_21     ! root square of Cd
-      USE wrk_nemo, ONLY: T_vpot => wrk_2d_22      ! virtual potential temperature    [K]
-      USE wrk_nemo, ONLY: T_star => wrk_2d_23      ! turbulent scale of tem. fluct.
-      USE wrk_nemo, ONLY: q_star => wrk_2d_24      ! turbulent humidity of temp. fluct.
-      USE wrk_nemo, ONLY: U_star => wrk_2d_25      ! turb. scale of velocity fluct.
-      USE wrk_nemo, ONLY: L => wrk_2d_26           ! Monin-Obukov length              [m]
-      USE wrk_nemo, ONLY: zeta => wrk_2d_27        ! stability parameter at height zu
-      USE wrk_nemo, ONLY: U_n10 => wrk_2d_28       ! neutral wind velocity at 10m     [m]
-      USE wrk_nemo, ONLY: xlogt  => wrk_2d_29,    xct => wrk_2d_30,   &
-                          zpsi_h => wrk_2d_31, zpsi_m => wrk_2d_32
-      USE wrk_nemo, ONLY: stab => iwrk_2d_1      ! 1st guess stability test integer
-      !
       REAL(wp)                , INTENT(in   ) ::   zu      ! altitude of wind measurement       [m]
       REAL(wp), DIMENSION(:,:), INTENT(in   ) ::   sst     ! sea surface temperature         [Kelvin]
@@ -678,12 +643,28 @@
       REAL(wp), PARAMETER ::   grav   = 9.8   ! gravity                       
       REAL(wp), PARAMETER ::   kappa  = 0.4   ! von Karman s constant
+
+      REAL(wp), DIMENSION(:,:), POINTER  ::   dU10          ! dU                                   [m/s]
+      REAL(wp), DIMENSION(:,:), POINTER  ::   dT            ! air/sea temperature differeence      [K]
+      REAL(wp), DIMENSION(:,:), POINTER  ::   dq            ! air/sea humidity difference          [K]
+      REAL(wp), DIMENSION(:,:), POINTER  ::   Cd_n10        ! 10m neutral drag coefficient
+      REAL(wp), DIMENSION(:,:), POINTER  ::   Ce_n10        ! 10m neutral latent coefficient
+      REAL(wp), DIMENSION(:,:), POINTER  ::   Ch_n10        ! 10m neutral sensible coefficient
+      REAL(wp), DIMENSION(:,:), POINTER  ::   sqrt_Cd_n10   ! root square of Cd_n10
+      REAL(wp), DIMENSION(:,:), POINTER  ::   sqrt_Cd       ! root square of Cd
+      REAL(wp), DIMENSION(:,:), POINTER  ::   T_vpot        ! virtual potential temperature        [K]
+      REAL(wp), DIMENSION(:,:), POINTER  ::   T_star        ! turbulent scale of tem. fluct.
+      REAL(wp), DIMENSION(:,:), POINTER  ::   q_star        ! turbulent humidity of temp. fluct.
+      REAL(wp), DIMENSION(:,:), POINTER  ::   U_star        ! turb. scale of velocity fluct.
+      REAL(wp), DIMENSION(:,:), POINTER  ::   L             ! Monin-Obukov length                  [m]
+      REAL(wp), DIMENSION(:,:), POINTER  ::   zeta          ! stability parameter at height zu
+      REAL(wp), DIMENSION(:,:), POINTER  ::   U_n10         ! neutral wind velocity at 10m         [m]   
+      REAL(wp), DIMENSION(:,:), POINTER  ::   xlogt, xct, zpsi_h, zpsi_m
+      
+      INTEGER , DIMENSION(:,:), POINTER  ::   stab          ! 1st guess stability test integer
       !!----------------------------------------------------------------------
 
-      IF(  wrk_in_use(2,             14,15,16,17,18,19,        &
-                         20,21,22,23,24,25,26,27,28,29,        &
-                         30,31,32)                      .OR.   &
-          iwrk_in_use(2, 1)                               ) THEN
-         CALL ctl_stop('TURB_CORE_1Z: requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+      CALL wrk_alloc( jpi,jpj, stab )   ! integer
+      CALL wrk_alloc( jpi,jpj, dU10, dT, dq, Cd_n10, Ce_n10, Ch_n10, sqrt_Cd_n10, sqrt_Cd, L )
+      CALL wrk_alloc( jpi,jpj, T_vpot, T_star, q_star, U_star, zeta, U_n10, xlogt, xct, zpsi_h, zpsi_m )
 
       !! * Start
@@ -755,9 +736,7 @@
       END DO
       !!
-      IF( wrk_not_released(2,             14,15,16,17,18,19,          &
-         &                    20,21,22,23,24,25,26,27,28,29,          &
-         &                    30,31,32                      )   .OR.  &      
-         iwrk_not_released(2, 1)                                  )   &
-         CALL ctl_stop('TURB_CORE_1Z: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, stab )   ! integer
+      CALL wrk_dealloc( jpi,jpj, dU10, dT, dq, Cd_n10, Ce_n10, Ch_n10, sqrt_Cd_n10, sqrt_Cd, L )
+      CALL wrk_dealloc( jpi,jpj, T_vpot, T_star, q_star, U_star, zeta, U_n10, xlogt, xct, zpsi_h, zpsi_m )
       !
     END SUBROUTINE TURB_CORE_1Z
@@ -779,54 +758,47 @@
       !! References :   Large & Yeager, 2004 : ???
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, iwrk_in_use, iwrk_not_released
-      USE wrk_nemo, ONLY: dU10 => wrk_2d_14        ! dU                             [m/s]
-      USE wrk_nemo, ONLY: dT => wrk_2d_15          ! air/sea temperature difference   [K]
-      USE wrk_nemo, ONLY: dq => wrk_2d_16          ! air/sea humidity difference      [K]
-      USE wrk_nemo, ONLY: Cd_n10 => wrk_2d_17      ! 10m neutral drag coefficient
-      USE wrk_nemo, ONLY: Ce_n10 => wrk_2d_18      ! 10m neutral latent coefficient
-      USE wrk_nemo, ONLY: Ch_n10 => wrk_2d_19      ! 10m neutral sensible coefficient
-      USE wrk_nemo, ONLY: sqrt_Cd_n10 => wrk_2d_20 ! root square of Cd_n10
-      USE wrk_nemo, ONLY: sqrt_Cd => wrk_2d_21     ! root square of Cd
-      USE wrk_nemo, ONLY: T_vpot => wrk_2d_22      ! virtual potential temperature    [K]
-      USE wrk_nemo, ONLY: T_star => wrk_2d_23     ! turbulent scale of tem. fluct.
-      USE wrk_nemo, ONLY: q_star => wrk_2d_24     ! turbulent humidity of temp. fluct.
-      USE wrk_nemo, ONLY: U_star => wrk_2d_25     ! turb. scale of velocity fluct.
-      USE wrk_nemo, ONLY: L => wrk_2d_26          ! Monin-Obukov length              [m]
-      USE wrk_nemo, ONLY: zeta_u => wrk_2d_27     ! stability parameter at height zu
-      USE wrk_nemo, ONLY: zeta_t => wrk_2d_28     ! stability parameter at height zt
-      USE wrk_nemo, ONLY: U_n10 => wrk_2d_29      ! neutral wind velocity at 10m     [m]
-      USE wrk_nemo, ONLY: xlogt => wrk_2d_30, xct => wrk_2d_31, zpsi_hu => wrk_2d_32, zpsi_ht => wrk_2d_33, zpsi_m => wrk_2d_34
-      USE wrk_nemo, ONLY: stab => iwrk_2d_1      ! 1st guess stability test integer
-      !!
-      REAL(wp), INTENT(in)   :: &
-         zt,      &     ! height for T_zt and q_zt                   [m]
-         zu             ! height for dU                              [m]
-      REAL(wp), INTENT(in), DIMENSION(jpi,jpj) ::  &
-         sst,      &     ! sea surface temperature              [Kelvin]
-         T_zt,     &     ! potential air temperature            [Kelvin]
-         q_sat,    &     ! sea surface specific humidity         [kg/kg]
-         q_zt,     &     ! specific air humidity                 [kg/kg]
-         dU              ! relative wind module |U(zu)-U(0)|       [m/s]
-      REAL(wp), INTENT(out), DIMENSION(jpi,jpj)  ::  &
-         Cd,       &     ! transfer coefficient for momentum         (tau)
-         Ch,       &     ! transfer coefficient for sensible heat (Q_sens)
-         Ce,       &     ! transfert coefficient for evaporation   (Q_lat)
-         T_zu,     &     ! air temp. shifted at zu                     [K]
-         q_zu            ! spec. hum.  shifted at zu               [kg/kg]
+      REAL(wp), INTENT(in   )                     ::   zt       ! height for T_zt and q_zt                   [m]
+      REAL(wp), INTENT(in   )                     ::   zu       ! height for dU                              [m]
+      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   sst      ! sea surface temperature              [Kelvin]
+      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   T_zt     ! potential air temperature            [Kelvin]
+      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   q_sat    ! sea surface specific humidity         [kg/kg]
+      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   q_zt     ! specific air humidity                 [kg/kg]
+      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   dU       ! relative wind module |U(zu)-U(0)|       [m/s]
+      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   Cd       ! transfer coefficient for momentum         (tau)
+      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   Ch       ! transfer coefficient for sensible heat (Q_sens)
+      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   Ce       ! transfert coefficient for evaporation   (Q_lat)
+      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   T_zu     ! air temp. shifted at zu                     [K]
+      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   q_zu     ! spec. hum.  shifted at zu               [kg/kg]
 
       INTEGER :: j_itt
-      INTEGER, PARAMETER :: nb_itt = 3   ! number of itterations
-      REAL(wp), PARAMETER ::                        &
-         grav   = 9.8,      &  ! gravity                       
-         kappa  = 0.4          ! von Karman's constant
+      INTEGER , PARAMETER :: nb_itt = 3              ! number of itterations
+      REAL(wp), PARAMETER ::   grav   = 9.8          ! gravity                       
+      REAL(wp), PARAMETER ::   kappa  = 0.4          ! von Karman's constant
+      
+      REAL(wp), DIMENSION(:,:), POINTER ::   dU10          ! dU                                [m/s]
+      REAL(wp), DIMENSION(:,:), POINTER ::   dT            ! air/sea temperature differeence   [K]
+      REAL(wp), DIMENSION(:,:), POINTER ::   dq            ! air/sea humidity difference       [K]
+      REAL(wp), DIMENSION(:,:), POINTER ::   Cd_n10        ! 10m neutral drag coefficient
+      REAL(wp), DIMENSION(:,:), POINTER ::   Ce_n10        ! 10m neutral latent coefficient
+      REAL(wp), DIMENSION(:,:), POINTER ::   Ch_n10        ! 10m neutral sensible coefficient
+      REAL(wp), DIMENSION(:,:), POINTER ::   sqrt_Cd_n10   ! root square of Cd_n10
+      REAL(wp), DIMENSION(:,:), POINTER ::   sqrt_Cd       ! root square of Cd
+      REAL(wp), DIMENSION(:,:), POINTER ::   T_vpot        ! virtual potential temperature        [K]
+      REAL(wp), DIMENSION(:,:), POINTER ::   T_star        ! turbulent scale of tem. fluct.
+      REAL(wp), DIMENSION(:,:), POINTER ::   q_star        ! turbulent humidity of temp. fluct.
+      REAL(wp), DIMENSION(:,:), POINTER ::   U_star        ! turb. scale of velocity fluct.
+      REAL(wp), DIMENSION(:,:), POINTER ::   L             ! Monin-Obukov length                  [m]
+      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 ::   U_n10         ! neutral wind velocity at 10m        [m]
+      REAL(wp), DIMENSION(:,:), POINTER ::   xlogt, xct, zpsi_hu, zpsi_ht, zpsi_m
+
+      INTEGER , DIMENSION(:,:), POINTER ::   stab          ! 1st stability test integer
       !!----------------------------------------------------------------------
-      !!  * Start
-
-      IF(  wrk_in_use(2,             14,15,16,17,18,19,        &
-                         20,21,22,23,24,25,26,27,28,29,        &         
-                         30,31,32,33,34)                .OR.   &
-          iwrk_in_use(2, 1)                               ) THEN
-         CALL ctl_stop('TURB_CORE_2Z: requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+
+      CALL wrk_alloc( jpi,jpj, dU10, dT, dq, Cd_n10, Ce_n10, Ch_n10, sqrt_Cd_n10, sqrt_Cd, L )
+      CALL wrk_alloc( jpi,jpj, T_vpot, T_star, q_star, U_star, zeta_u, zeta_t, U_n10 )
+      CALL wrk_alloc( jpi,jpj, xlogt, xct, zpsi_hu, zpsi_ht, zpsi_m )
+      CALL wrk_alloc( jpi,jpj, stab )   ! interger
 
       !! Initial air/sea differences
@@ -910,9 +882,8 @@
       END DO
       !!
-     IF( wrk_not_released(2,              14,15,16,17,18,19,          &
-         &                    20,21,22,23,24,25,26,27,28,29,          &
-         &                    30,31,32,33,34                )   .OR.  &  
-         iwrk_not_released(2, 1)                                  )   &
-         CALL ctl_stop('TURB_CORE_2Z: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, dU10, dT, dq, Cd_n10, Ce_n10, Ch_n10, sqrt_Cd_n10, sqrt_Cd, L )
+      CALL wrk_dealloc( jpi,jpj, T_vpot, T_star, q_star, U_star, zeta_u, zeta_t, U_n10 )
+      CALL wrk_dealloc( jpi,jpj, xlogt, xct, zpsi_hu, zpsi_ht, zpsi_m )
+      CALL wrk_dealloc( jpi,jpj, stab )   ! interger
       !
     END SUBROUTINE TURB_CORE_2Z
@@ -921,18 +892,12 @@
     FUNCTION psi_m(zta)   !! Psis, L & Y eq. (8c), (8d), (8e)
       !-------------------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:     X2 => wrk_2d_35
-      USE wrk_nemo, ONLY:     X  => wrk_2d_36
-      USE wrk_nemo, ONLY: stabit => wrk_2d_37
-      !!
       REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: zta
 
       REAL(wp), PARAMETER :: pi = 3.141592653589793_wp
       REAL(wp), DIMENSION(jpi,jpj)             :: psi_m
+      REAL(wp), DIMENSION(:,:), POINTER        :: X2, X, stabit
       !-------------------------------------------------------------------------------
 
-      IF( wrk_in_use(2, 35,36,37) ) THEN
-         CALL ctl_stop('psi_m: requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+      CALL wrk_alloc( jpi,jpj, X2, X, stabit )
 
       X2 = sqrt(abs(1. - 16.*zta))  ;  X2 = max(X2 , 1.0) ;  X  = sqrt(X2)
@@ -941,5 +906,5 @@
          &    + (1. - stabit)*(2*log((1. + X)/2) + log((1. + X2)/2) - 2*atan(X) + pi/2)  ! Unstable 
 
-      IF( wrk_not_released(2, 35,36,37) )   CALL ctl_stop('psi_m: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, X2, X, stabit )
       !
     END FUNCTION psi_m
@@ -948,17 +913,11 @@
     FUNCTION psi_h( zta )    !! Psis, L & Y eq. (8c), (8d), (8e)
       !-------------------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:     X2 => wrk_2d_35
-      USE wrk_nemo, ONLY:     X  => wrk_2d_36
-      USE wrk_nemo, ONLY: stabit => wrk_2d_37
-      !
       REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   zta
       !
       REAL(wp), DIMENSION(jpi,jpj)             ::   psi_h
+      REAL(wp), DIMENSION(:,:), POINTER        :: X2, X, stabit
       !-------------------------------------------------------------------------------
 
-      IF( wrk_in_use(2, 35,36,37) ) THEN
-         CALL ctl_stop('psi_h: requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+      CALL wrk_alloc( jpi,jpj, X2, X, stabit )
 
       X2 = sqrt(abs(1. - 16.*zta))  ;  X2 = max(X2 , 1.) ;  X  = sqrt(X2)
@@ -967,5 +926,5 @@
          &    + (1. - stabit)*(2.*log( (1. + X2)/2. ))                 ! Unstable
 
-      IF( wrk_not_released(2, 35,36,37) )   CALL ctl_stop('psi_h: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, X2, X, stabit )
       !
     END FUNCTION psi_h
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 3152)
@@ -20,4 +20,5 @@
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distribued memory computing library
+   USE wrk_nemo_2      ! work arrays
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE prtctl          ! Print control
@@ -283,19 +284,5 @@
       !!
       !!----------------------------------------------------------------------
-      !!
-
       USE sbcblk_core, ONLY: turb_core_2z ! For wave coupling and Tair/rh from 2 to 10m
-      USE wrk_nemo, ONLY:  wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:  rspeed     => wrk_2d_1
-      USE wrk_nemo, ONLY:  sh10now    => wrk_2d_2
-      USE wrk_nemo, ONLY:  t10now     => wrk_2d_3
-      USE wrk_nemo, ONLY:  cdx        => wrk_2d_4   ! --- drag coeff.
-      USE wrk_nemo, ONLY:  ce         => wrk_2d_5   ! --- turbulent exchange coefficients
-      USE wrk_nemo, ONLY:  shms       => wrk_2d_6
-      USE wrk_nemo, ONLY:  rhom       => wrk_2d_7
-      USE wrk_nemo, ONLY:  sstk       => wrk_2d_8
-      USE wrk_nemo, ONLY:  ch         => wrk_2d_10
-      USE wrk_nemo, ONLY:  rel_windu  => wrk_2d_11
-      USE wrk_nemo, ONLY:  rel_windv  => wrk_2d_12
 
       REAL(wp), INTENT(in   ) :: hour
@@ -310,4 +297,6 @@
       REAL(wp)  :: esre, cseep
 
+      REAL(wp), DIMENSION (:,:), POINTER ::   rspeed, sh10now, t10now, cdx, ce, shms
+      REAL(wp), DIMENSION (:,:), POINTER ::   rhom, sstk, ch, rel_windu, rel_windv
       !!----------------------------------------------------------------------
       !!     coefficients ( in MKS )  :
@@ -336,8 +325,6 @@
       INTEGER :: kku                        !index varing with wind speed
 
-      ! Set-up access to workspace arrays
-      IF( wrk_in_use(2, 1,2,3,4,5,6,7,8,10,11,12) ) THEN
-         CALL ctl_stop('blk_mfs: requested workspace arrays unavailable')   ;   RETURN
-      END IF
+      CALL wrk_alloc( jpi,jpj, rspeed, sh10now, t10now, cdx, ce, shms )
+      CALL wrk_alloc( jpi,jpj, rhom, sstk, ch, rel_windu, rel_windv )
 
       !!----------------------------------------------------------------------
@@ -501,8 +488,6 @@
        tauy(:,:)= rhom(:,:) * cdx(:,:) * rspeed(:,:) * rel_windv(:,:)
 
-
-      IF( wrk_not_released(2, 1,2,3,4,5,6,7,8,10,11,12) )    &
-         CALL ctl_stop('fluxes_mfs: failed to release workspace arrays')
-
+      CALL wrk_dealloc( jpi,jpj, rspeed, sh10now, t10now, cdx, ce, shms )
+      CALL wrk_dealloc( jpi,jpj, rhom, sstk, ch, rel_windu, rel_windv )
 
    END SUBROUTINE fluxes_mfs
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 3152)
@@ -47,4 +47,5 @@
    USE iom             ! NetCDF library
    USE lib_mpp         ! distribued memory computing library
+   USE wrk_nemo_2      ! work arrays
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
 #if defined key_cpl_carbon_cycle
@@ -217,10 +218,8 @@
       !!              * initialise the OASIS coupler
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   zacs => wrk_2d_3 , zaos => wrk_2d_4   ! clear & overcast sky albedos
-      !!
       INTEGER, INTENT(in) ::   k_ice    ! ice management in the sbc (=0/1/2/3)
       !!
       INTEGER ::   jn   ! dummy loop index
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zacs, zaos
       !!
       NAMELIST/namsbc_cpl/  sn_snd_temp, sn_snd_alb   , sn_snd_thick, sn_snd_crt   , sn_snd_co2,   &
@@ -229,7 +228,5 @@
       !!---------------------------------------------------------------------
 
-      IF( wrk_in_use(2, 3,4) ) THEN
-         CALL ctl_stop('sbc_cpl_init: requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+      CALL wrk_alloc( jpi,jpj, zacs, zaos )
 
       ! ================================ !
@@ -618,5 +615,5 @@
          &   CALL ctl_stop( 'sbc_cpl_init: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' )
 
-      IF( wrk_not_released(2, 3,4) )   CALL ctl_stop('sbc_cpl_init: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, zacs, zaos )
       !
    END SUBROUTINE sbc_cpl_init
@@ -665,7 +662,4 @@
       !!                        emp = emps   evap. - precip. (- runoffs) (- calving) ('ocean only case)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   ztx => wrk_2d_1 , zty => wrk_2d_2
-      !!
       INTEGER, INTENT(in) ::   kt       ! ocean model time step index
       INTEGER, INTENT(in) ::   k_fsbc   ! frequency of sbc (-> ice model) computation 
@@ -680,9 +674,8 @@
       REAL(wp) ::   zcdrag = 1.5e-3        ! drag coefficient
       REAL(wp) ::   zzx, zzy               ! temporary variables
-      !!----------------------------------------------------------------------
-
-      IF( wrk_in_use(2, 1,2) ) THEN
-         CALL ctl_stop('sbc_cpl_rcv: requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+      REAL(wp), POINTER, DIMENSION(:,:) ::   ztx, zty 
+      !!----------------------------------------------------------------------
+
+      CALL wrk_alloc( jpi,jpj, ztx, zty )
 
       IF( kt == nit000 )   CALL sbc_cpl_init( k_ice )          ! initialisation
@@ -867,5 +860,5 @@
       ENDIF
       !
-      IF( wrk_not_released(2, 1,2) )   CALL ctl_stop('sbc_cpl_rcv: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, ztx, zty )
       !
    END SUBROUTINE sbc_cpl_rcv
@@ -905,7 +898,4 @@
       !! ** Action  :   return ptau_i, ptau_j, the stress over the ice at cp_ice_msh point
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   ztx => wrk_2d_1 , zty => wrk_2d_2
-      !!
       REAL(wp), INTENT(out), DIMENSION(:,:) ::   p_taui   ! i- & j-components of atmos-ice stress [N/m2]
       REAL(wp), INTENT(out), DIMENSION(:,:) ::   p_tauj   ! at I-point (B-grid) or U & V-point (C-grid)
@@ -913,9 +903,8 @@
       INTEGER ::   ji, jj                          ! dummy loop indices
       INTEGER ::   itx                             ! index of taux over ice
-      !!----------------------------------------------------------------------
-
-      IF( wrk_in_use(2, 1,2) ) THEN
-         CALL ctl_stop('sbc_cpl_ice_tau: requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+      REAL(wp), POINTER, DIMENSION(:,:) ::   ztx, zty 
+      !!----------------------------------------------------------------------
+      
+      CALL wrk_alloc( jpi,jpj, ztx, zty )
 
       IF( srcv(jpr_itx1)%laction ) THEN   ;   itx =  jpr_itx1   
@@ -1079,5 +1068,5 @@
       ENDIF
       !   
-      IF( wrk_not_released(2, 1,2) )   CALL ctl_stop('sbc_cpl_ice_tau: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, ztx, zty )
       !
    END SUBROUTINE sbc_cpl_ice_tau
@@ -1124,9 +1113,4 @@
       !!                   sprecip             solid precipitation over the ocean  
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   zcptn  => wrk_2d_2   ! rcp * tsn(:,:,1,jp_tem)
-      USE wrk_nemo, ONLY:   ztmp   => wrk_2d_3   ! temporary array
-      USE wrk_nemo, ONLY:   zicefr => wrk_2d_4   ! ice fraction 
-      !!
       REAL(wp), INTENT(in   ), DIMENSION(:,:)   ::   p_frld     ! lead fraction                [0 to 1]
       ! optional arguments, used only in 'mixed oce-ice' case
@@ -1136,9 +1120,8 @@
       !
       INTEGER ::   jl   ! dummy loop index
-      !!----------------------------------------------------------------------
-
-      IF( wrk_in_use(2, 2,3,4) ) THEN
-         CALL ctl_stop('sbc_cpl_ice_flx: requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zcptn, ztmp, zicefr
+      !!----------------------------------------------------------------------
+
+      CALL wrk_alloc( jpi,jpj, zcptn, ztmp, zicefr )
 
       zicefr(:,:) = 1.- p_frld(:,:)
@@ -1316,5 +1299,5 @@
       END SELECT
 
-      IF( wrk_not_released(2, 2,3,4) ) CALL ctl_stop('sbc_cpl_ice_flx: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, zcptn, ztmp, zicefr )
       !
    END SUBROUTINE sbc_cpl_ice_flx
@@ -1330,20 +1313,14 @@
       !!              all the needed fields (as defined in sbc_cpl_init)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   zfr_l => wrk_2d_1   ! 1. - fr_i(:,:)
-      USE wrk_nemo, ONLY:   ztmp1 => wrk_2d_2 , ztmp2 => wrk_2d_3
-      USE wrk_nemo, ONLY:   ztmp3 => wrk_3d_1 , ztmp4 => wrk_3d_2
-      USE wrk_nemo, ONLY:   zotx1 => wrk_2d_4 , zoty1 => wrk_2d_5 , zotz1 => wrk_2d_6
-      USE wrk_nemo, ONLY:   zitx1 => wrk_2d_7 , zity1 => wrk_2d_8 , zitz1 => wrk_2d_9
-      !
       INTEGER, INTENT(in) ::   kt
       !
       INTEGER ::   ji, jj, jl   ! dummy loop indices
       INTEGER ::   isec, info   ! local integer
-      !!----------------------------------------------------------------------
-
-      IF( wrk_in_use(2, 1,2,3,4,5,6,7,8,9) .OR. wrk_in_use(3, 1,2)  ) THEN
-         CALL ctl_stop('sbc_cpl_snd: requested workspace arrays are unavailable')   ;   RETURN
-      ENDIF
+      REAL(wp), POINTER, DIMENSION(:,:)   ::   ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1
+      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztmp3, ztmp4   
+      !!----------------------------------------------------------------------
+
+      CALL wrk_alloc( jpi,jpj, zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 )
+      CALL wrk_alloc( jpi,jpj,jpl, ztmp3, ztmp4 )
 
       isec = ( kt - nit000 ) * NINT(rdttra(1))        ! date of exchanges
@@ -1565,5 +1542,6 @@
       ENDIF
       !
-      IF( wrk_not_released(2, 1,2,3,4,5,6,7,8,9) .OR. wrk_not_released(3, 1,2) )   CALL ctl_stop('sbc_cpl_snd: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 )
+      CALL wrk_dealloc( jpi,jpj,jpl, ztmp3, ztmp4 )
       !
    END SUBROUTINE sbc_cpl_snd
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 3152)
@@ -22,4 +22,5 @@
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distribued memory computing library
+   USE wrk_nemo_2      ! work arrays
    USE lbclnk          ! ocean lateral boundary conditions
    USE lib_fortran
@@ -58,9 +59,4 @@
       !!                   & spread out over erp area depending its sign
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   ztmsk_neg      => wrk_2d_1 , ztmsk_pos => wrk_2d_2
-      USE wrk_nemo, ONLY:   ztmsk_tospread => wrk_2d_3
-      USE wrk_nemo, ONLY:   z_wgt          => wrk_2d_4 , zerp_cor  => wrk_2d_5
-      !
       INTEGER, INTENT( in ) ::   kt       ! ocean time-step index
       INTEGER, INTENT( in ) ::   kn_fsbc  ! 
@@ -70,9 +66,8 @@
       REAL(wp) ::   z_fwf, z_fwf_nsrf, zsum_fwf, zsum_erp   ! local scalars
       REAL(wp) ::   zsurf_neg, zsurf_pos, zsurf_tospread    !   -      -
+      REAL(wp), POINTER, DIMENSION(:,:) ::   ztmsk_neg, ztmsk_pos, ztmsk_tospread, z_wgt, zerp_cor
       !!----------------------------------------------------------------------
       !
-      IF( wrk_in_use(2, 1,2,3,4,5) ) THEN
-         CALL ctl_stop('sbc_fwb: requested workspace arrays are unavailable')   ;   RETURN
-      ENDIF
+      CALL wrk_alloc( jpi,jpj, ztmsk_neg, ztmsk_pos, ztmsk_tospread, z_wgt, zerp_cor )
       !
       IF( kt == nit000 ) THEN
@@ -195,5 +190,5 @@
       END SELECT
       !
-      IF( wrk_not_released(2, 1,2,3,4,5) )   CALL ctl_stop('sbc_fwb: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, ztmsk_neg, ztmsk_pos, ztmsk_tospread, z_wgt, zerp_cor )
       !
    END SUBROUTINE sbc_fwb
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 3152)
@@ -18,4 +18,5 @@
    USE lib_mpp         ! distributed memory computing library
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+   USE wrk_nemo_2      ! work arrays
    USE daymod          ! calendar
    USE fldread         ! read input fields
@@ -178,28 +179,22 @@
      CALL lbc_lnk ( fr_iv , 'V', 1. )
 
-
    END SUBROUTINE cice_sbc_init
 
+   
    SUBROUTINE cice_sbc_in (kt, nsbc)
       !!---------------------------------------------------------------------
       !!                    ***  ROUTINE cice_sbc_in  ***
       !! ** Purpose: Set coupling fields and pass to CICE
-      !!
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   wrk_2d_1, wrk_3d_1                    ! Workspace
-      !!
-      INTEGER, INTENT( in  ) ::   kt   ! ocean time step
-      INTEGER, INTENT( in  ) ::   nsbc ! surface forcing type
-      !!---------------------------------------------------------------------
-     INTEGER  ::   ji, jj, jpl                   ! dummy loop indices
-
-     REAL(wp), DIMENSION(:,:), POINTER :: ztmp
-     REAL(wp), DIMENSION(:,:,:), POINTER :: ztmpn
-
-     IF( wrk_in_use(2, 1) .OR. wrk_in_use(3, 1)  ) THEN
-        CALL ctl_stop('cice_sbc_in: requested workspace arrays are unavailable')   ;   RETURN
-     ENDIF
-     ztmp => wrk_2d_1(:,:)
-     ztmpn => wrk_3d_1(:,:,1:ncat)
+      !!---------------------------------------------------------------------
+      INTEGER, INTENT(in   ) ::   kt   ! ocean time step
+      INTEGER, INTENT(in   ) ::   nsbc ! surface forcing type
+
+      INTEGER  ::   ji, jj, jpl                   ! dummy loop indices      
+      REAL(wp), DIMENSION(:,:), POINTER :: ztmp
+      REAL(wp), DIMENSION(:,:,:), POINTER :: ztmpn
+      !!---------------------------------------------------------------------
+
+      CALL wrk_alloc( jpi,jpj, ztmp )
+      CALL wrk_alloc( jpi,jpj,ncat, ztmpn )
 
      IF( kt == nit000 )  THEN
@@ -368,33 +363,28 @@
      CALL nemo2cice(ztmp,vocn,'F', -1. )
 
-     IF( wrk_not_released(2, 1) .OR. wrk_not_released(3, 1)  )   CALL ctl_stop('cice_sbc_in: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, ztmp )
+      CALL wrk_dealloc( jpi,jpj,ncat, ztmpn )
      !
    END SUBROUTINE cice_sbc_in
 
+
    SUBROUTINE cice_sbc_out (kt,nsbc)
       !!---------------------------------------------------------------------
       !!                    ***  ROUTINE cice_sbc_out  ***
       !! ** Purpose: Get fields from CICE and set surface fields for NEMO
-      !!
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   wrk_2d_1                         ! 2D workspace
-      !!
+      !!---------------------------------------------------------------------
       INTEGER, INTENT( in  ) ::   kt   ! ocean time step
       INTEGER, INTENT( in  ) ::   nsbc ! surface forcing type
-      !!---------------------------------------------------------------------
-
-     INTEGER  ::   ji, jj, jpl                 ! dummy loop indices
-
-     REAL(wp), DIMENSION(:,:), POINTER :: ztmp
-
-     IF( kt == nit000 )  THEN
+      
+      INTEGER  ::   ji, jj, jpl                 ! dummy loop indices
+      REAL(wp), DIMENSION(:,:), POINTER :: ztmp
+      !!---------------------------------------------------------------------
+
+      CALL wrk_alloc( jpi,jpj, ztmp )
+      
+      IF( kt == nit000 )  THEN
          IF(lwp) WRITE(numout,*)'cice_sbc_out'
-     ENDIF
-
-     IF( wrk_in_use(2, 1) ) THEN
-        CALL ctl_stop('cice_sbc_out: requested workspace arrays are unavailable')   ;   RETURN
-     ENDIF
-     ztmp => wrk_2d_1(:,:)
-
+      ENDIF
+      
 ! x comp of ocean-ice stress 
      CALL cice2nemo(strocnx,ztmp,'F', -1. )
@@ -532,7 +522,8 @@
 ! Release work space
 
-     IF( wrk_not_released(2, 1) )   CALL ctl_stop('cice_sbc_out: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj, ztmp )
      !
    END SUBROUTINE cice_sbc_out
+
 
 #if defined key_oasis3 || defined key_oasis4
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 3152)
@@ -50,4 +50,5 @@
    USE lbclnk          ! lateral boundary condition - MPP link
    USE lib_mpp         ! MPP library
+   USE wrk_nemo_2      ! work arrays
    USE iom             ! I/O manager library
    USE in_out_manager  ! I/O manager
@@ -89,7 +90,4 @@
       !!                utau, vtau, taum, wndm, qns , qsr, emp , emps
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   wrk_3d_1, wrk_3d_2   ! for albedo of ice under overcast/clear sky
-      !!
       INTEGER, INTENT(in) ::   kt      ! ocean time step
       INTEGER, INTENT(in) ::   kblk    ! type of bulk (=3 CLIO, =4 CORE)
@@ -100,8 +98,5 @@
       !!----------------------------------------------------------------------
 
-      IF( wrk_in_use(3, 1,2) ) THEN
-         CALL ctl_stop( 'sbc_ice_lim: requested workspace arrays are unavailable' )   ;   RETURN
-      ENDIF
-      zalb_ice_os => wrk_3d_1(:,:,1:jpl)   ;    zalb_ice_cs => wrk_3d_2(:,:,1:jpl)
+      CALL wrk_alloc( jpi,jpj,jpl, zalb_ice_os, zalb_ice_cs )
 
       IF( kt == nit000 ) THEN
@@ -253,5 +248,5 @@
 !!gm   remark, the ocean-ice stress is not saved in ice diag call above .....  find a solution!!!
       !
-      IF( wrk_not_released(3, 1,2) )   CALL ctl_stop( 'sbc_ice_lim: failed to release workspace arrays' )
+      CALL wrk_dealloc( jpi,jpj,jpl, zalb_ice_os, zalb_ice_cs )
       !
    END SUBROUTINE sbc_ice_lim
Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 3151)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 3152)
@@ -44,4 +44,5 @@
    USE lbclnk           ! lateral boundary condition - MPP link
    USE lib_mpp          ! MPP library
+   USE wrk_nemo_2       ! work arrays
    USE iom              ! I/O manager library
    USE in_out_manager   ! I/O manager
@@ -83,12 +84,8 @@
       !!                utau, vtau, taum, wndm, qns , qsr, emp , emps
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   wrk_3d_1 , wrk_3d_2 , wrk_3d_3   ! 3D workspace
-      !!
       INTEGER, INTENT(in) ::   kt      ! ocean time step
       INTEGER, INTENT(in) ::   ksbc    ! type of sbc ( =3 CLIO bulk ; =4 CORE bulk ; =5 coupled )
       !!
       INTEGER  ::   ji, jj   ! dummy loop indices
-      ! Pointers into workspaces contained in the wrk_nemo module
       REAL(wp), DIMENSION(:,:,:), POINTER :: zalb_ice_os   ! albedo of the ice under overcast sky
       REAL(wp), DIMENSION(:,:,:), POINTER :: zalb_ice_cs   ! albedo of ice under clear sky
@@ -96,11 +93,5 @@
       !!----------------------------------------------------------------------
 
-      IF( wrk_in_use(3, 1,2,3) ) THEN
-         CALL ctl_stop('sbc_ice_lim_2: requested workspace arrays are unavailable')   ;   RETURN
-      ENDIF
-      ! Use pointers to access only sub-arrays of workspaces
-      zalb_ice_os => wrk_3d_1(:,:,1:1)
-      zalb_ice_cs => wrk_3d_2(:,:,1:1)
-      zsist       => wrk_3d_3(:,:,1:1)
+      CALL wrk_alloc( jpi,jpj,1, zalb_ice_os, zalb_ice_cs, zsist )
 
       IF( kt == nit000 ) THEN
@@ -230,5 +221,5 @@
       IF( ln_limdyn    )   CALL lim_sbc_tau_2( kt, ub(:,:,1), vb(:,:,1) )  ! using before instantaneous surf. currents
       !
-      IF( wrk_not_released(3, 1,2,3) )   CALL ctl_stop('sbc_ice_lim_2: failed to release workspace arrays')
+      CALL wrk_dealloc( jpi,jpj,1, zalb_ice_os, zalb_ice_cs, zsist )
       !
    END SUBROUTINE sbc_ice_lim_2
