Index: trunk/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 2733)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 3294)
@@ -16,4 +16,5 @@
    !!----------------------------------------------------------------------
    !! * Modules used   
+   USE wrk_nemo                 ! Memory Allocation
    USE par_kind                 ! Precision variables
    USE in_out_manager           ! I/O manager
@@ -1011,15 +1012,14 @@
          & rday                         
       USE oce, ONLY : &                 ! Ocean dynamics and tracers variables
-         & tn,  &             
-         & sn,  &
+         & tsn,  &             
          & un, vn,  &
          & sshn
-#if defined key_ice_lim
+#if defined  key_lim3
       USE ice, ONLY : &                     ! LIM Ice model variables
          & frld
 #endif
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-#if ! defined key_ice_lim
-      USE wrk_nemo, ONLY: frld => wrk_2d_1
+#if defined key_lim2
+      USE ice_2, ONLY : &                     ! LIM Ice model variables
+         & frld
 #endif
       IMPLICIT NONE
@@ -1035,11 +1035,11 @@
       INTEGER :: jveloset               ! velocity profile data loop variable
       INTEGER :: jvar                   ! Variable number    
+#if ! defined key_lim2 && ! defined key_lim3
+      REAL(wp), POINTER, DIMENSION(:,:) :: frld   
+#endif
       CHARACTER(LEN=20) :: datestr=" ",timestr=" "
  
-#if ! defined key_ice_lim
-      IF(wrk_in_use(2, 1))THEN
-         CALL ctl_stop('dia_obs : requested workspace array unavailable.')
-         RETURN
-      END IF
+#if ! defined key_lim2 && ! defined key_lim3
+      CALL wrk_alloc(jpi,jpj,frld) 
 #endif
 
@@ -1055,5 +1055,5 @@
       ! No LIM => frld == 0.0_wp
       !-----------------------------------------------------------------------
-#if ! defined key_ice_lim
+#if ! defined key_lim2 && ! defined key_lim3
       frld(:,:) = 0.0_wp
 #endif
@@ -1066,11 +1066,13 @@
          DO jprofset = 1, nprofsets
             IF ( ld_enact(jprofset) ) THEN
-               CALL obs_pro_opt( prodatqc(jprofset),                          &
-                  &              kstp, jpi, jpj, jpk, nit000, idaystp, tn, sn,&
-                  &              gdept_0, tmask, n1dint, n2dint,              &
+               CALL obs_pro_opt( prodatqc(jprofset),                     &
+                  &              kstp, jpi, jpj, jpk, nit000, idaystp,   &
+                  &              tsn(:,:,:,jp_tem), tsn(:,:,:,jp_sal),   &
+                  &              gdept_0, tmask, n1dint, n2dint,         &
                   &              kdailyavtypes = endailyavtypes )
             ELSE
-               CALL obs_pro_opt( prodatqc(jprofset),                          &
-                  &              kstp, jpi, jpj, jpk, nit000, idaystp, tn, sn,&
+               CALL obs_pro_opt( prodatqc(jprofset),                     &
+                  &              kstp, jpi, jpj, jpk, nit000, idaystp,   &
+                  &              tsn(:,:,:,jp_tem), tsn(:,:,:,jp_sal),   &
                   &              gdept_0, tmask, n1dint, n2dint               )
             ENDIF
@@ -1091,5 +1093,5 @@
          DO jsstset = 1, nsstsets
             CALL obs_sst_opt( sstdatqc(jsstset),                 &
-               &              kstp, jpi, jpj, nit000, tn(:,:,1), &
+               &              kstp, jpi, jpj, nit000, tsn(:,:,1,jp_tem), &
                &              tmask(:,:,1), n2dint )
          END DO
@@ -1101,5 +1103,5 @@
       ENDIF
 
-#if defined key_ice_lim
+#if defined key_lim2 || defined key_lim3
       IF ( ln_seaice ) THEN
          DO jseaiceset = 1, nseaicesets
@@ -1121,8 +1123,6 @@
       ENDIF
 
-#if ! defined key_ice_lim
-      IF(wrk_not_released(2, 1))THEN
-         CALL ctl_stop('dia_obs : failed to release workspace array.')
-      END IF
+#if ! defined key_lim2 && ! defined key_lim3
+      CALL wrk_dealloc(jpi,jpj,frld) 
 #endif
 
Index: trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90	(revision 2733)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90	(revision 3294)
@@ -10,4 +10,5 @@
    !!---------------------------------------------------------------------
    !! * Modules used
+   USE wrk_nemo        ! Memory Allocation
    USE par_kind        ! Precision variables
    USE dom_oce         ! Domain variables
@@ -105,6 +106,4 @@
       !!        !  08-02  (K. Mogensen)  Original code
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY: wrk_3d_1
       !!
       !! * Arguments
@@ -122,15 +121,10 @@
          & pgval            ! Stencil at each point
       !! * Local declarations
-      REAL(KIND=wp), POINTER, DIMENSION(:,:,:) :: &
-         & zval
+      REAL(KIND=wp), POINTER, DIMENSION(:,:,:) ::   zval
       REAL(KIND=wp), DIMENSION(kptsi,kptsj,1,kobs) ::&
          & zgval 
 
       ! Check workspace array and set-up pointer
-      IF(wrk_in_use(3, 1))THEN
-         CALL ctl_stop('obs_int_comm_2d : requested workspace array unavailable.')
-         RETURN
-      END IF
-      zval => wrk_3d_1(:,:,1:1)
+      CALL wrk_alloc(jpi,jpj,1,zval) 
 
       ! Set up local "3D" buffer
@@ -156,7 +150,5 @@
 
       ! 'Release' workspace array back to pool
-      IF(wrk_not_released(3, 1))THEN
-         CALL ctl_stop('obs_int_comm_2d : failed to release workspace array.')
-      END IF
+      CALL wrk_dealloc(jpi,jpj,1,zval) 
 
    END SUBROUTINE obs_int_comm_2d
Index: trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_altbias.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_altbias.F90	(revision 2733)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_altbias.F90	(revision 3294)
@@ -33,4 +33,5 @@
    USE obs_utils               ! Various observation tools
    USE obs_inter_sup
+   USE wrk_nemo                ! Memory Allocation
 
    IMPLICIT NONE
@@ -67,6 +68,4 @@
       !! * Modules used
       USE iom
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY: z_altbias => wrk_2d_1   ! Array to store the alt bias values
       !
       !! * Arguments
@@ -102,4 +101,5 @@
          & zglam, &
          & zgphi
+      REAL(wp), POINTER, DIMENSION(:,:) ::   z_altbias
       REAL(wp) :: zlam
       REAL(wp) :: zphi
@@ -109,8 +109,5 @@
       INTEGER :: numaltbias
 
-      IF(wrk_in_use(2, 1))THEN
-         CALL ctl_stop('obs_rea_altbias : requested workspace array unavailable.')
-         RETURN
-      END IF
+      CALL wrk_alloc(jpi,jpj,z_altbias) 
 
       IF(lwp)WRITE(numout,*) 
@@ -211,7 +208,5 @@
       END DO
 
-      IF(wrk_not_released(2, 1))THEN
-         CALL ctl_stop('obs_rea_altbias : failed to release workspace array.')
-      END IF
+      CALL wrk_dealloc(jpi,jpj,z_altbias) 
 
    END SUBROUTINE obs_rea_altbias
Index: trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90	(revision 2733)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90	(revision 3294)
@@ -12,4 +12,5 @@
    !!   obs_offset_mdt : Remove the offset between the model MDT and the used one
    !!----------------------------------------------------------------------
+   USE wrk_nemo         ! Memory Allocation
    USE par_kind         ! Precision variables
    USE par_oce          ! Domain parameters
@@ -56,7 +57,4 @@
       !!----------------------------------------------------------------------
       USE iom
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   z_mdt   => wrk_2d_1   ! Array to store the MDT values
-      USE wrk_nemo, ONLY:   mdtmask => wrk_2d_2   ! Array to store the mask for the MDT
       !
       INTEGER                          , INTENT(IN)    ::   kslano    ! Number of SLA Products
@@ -79,11 +77,11 @@
       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   zmask, zmdtl, zglam, zgphi
       INTEGER , DIMENSION(:,:,:), ALLOCATABLE ::   igrdi, igrdj
+      !
+      REAL(wp), POINTER, DIMENSION(:,:) ::  z_mdt, mdtmask
          
       REAL(wp) :: zlam, zphi, zfill, zinfill    ! local scalar
       !!----------------------------------------------------------------------
 
-      IF( wrk_in_use(2, 1,2) ) THEN
-         CALL ctl_stop('obs_rea_mdt : requested workspace array unavailable')   ;   RETURN
-      ENDIF
+      CALL wrk_alloc(jpi,jpj,z_mdt,mdtmask) 
 
       IF(lwp)WRITE(numout,*) 
@@ -172,5 +170,5 @@
       END DO
 
-      IF( wrk_not_released(2, 1,2) )   CALL ctl_stop('obs_rea_mdt: failed to release workspace arrays')
+      CALL wrk_dealloc(jpi,jpj,z_mdt,mdtmask) 
       !
    END SUBROUTINE obs_rea_mdt
@@ -190,7 +188,4 @@
       !! ** Action  : 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   zpromsk => wrk_2d_3
-      !
       REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) ::   mdt     ! MDT used on the model grid
       REAL(wp)                    , INTENT(in   ) ::   zfill 
@@ -198,10 +193,9 @@
       INTEGER  :: ji, jj
       REAL(wp) :: zdxdy, zarea, zeta1, zeta2, zcorr_mdt, zcorr_bcketa, zcorr     ! local scalar
+      REAL(wp), POINTER, DIMENSION(:,:) :: zpromsk
       CHARACTER(LEN=14), PARAMETER ::   cpname = 'obs_offset_mdt'
       !!----------------------------------------------------------------------
 
-      IF( wrk_in_use(2, 3) ) THEN
-         CALL ctl_stop('obs_offset_mdt: requested workspace array unavailable')   ;   RETURN
-      ENDIF
+      CALL wrk_alloc( jpi,jpj, zpromsk )
 
       !  Initialize the local mask, for domain projection 
@@ -265,5 +259,5 @@
       IF ( nmsshc == 2 ) WRITE(numout,*) '           User defined MSSH correction' 
 
-      IF( wrk_not_released(2, 3) )   CALL ctl_stop('obs_offset_mdt: failed to release workspace array')
+      CALL wrk_dealloc( jpi,jpj, zpromsk )
       !
    END SUBROUTINE obs_offset_mdt
Index: trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_rot_vel.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_rot_vel.F90	(revision 2733)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/OBS/obs_rot_vel.F90	(revision 3294)
@@ -9,4 +9,5 @@
    !!----------------------------------------------------------------------
    !! * Modules used   
+   USE wrk_nemo                 ! Memory Allocation
    USE par_kind                 ! Precision variables
    USE par_oce                  ! Ocean parameters
@@ -55,7 +56,4 @@
       !!----------------------------------------------------------------------
       !! * Modules used
-      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released   
-      USE wrk_nemo, ONLY: zsingu => wrk_2d_1, zcosgu => wrk_2d_2, &
-                          zsingv => wrk_2d_3, zcosgv => wrk_2d_4
       !! * Arguments
       TYPE(obs_prof), INTENT(INOUT) :: profdata    ! Profile data to be read
@@ -85,4 +83,5 @@
       REAL(wp) :: zcos
       REAL(wp), DIMENSION(1) :: zobsmask
+      REAL(wp), POINTER, DIMENSION(:,:) :: zsingu,zcosgu,zsingv,zcosgv
       INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: &
          & igrdiu, &
@@ -93,8 +92,5 @@
       INTEGER :: jk
 
-      IF(wrk_in_use(2, 1,2,3,4))THEN
-         CALL ctl_stop('obs_rotvel : requested workspace arrays unavailable.')
-         RETURN
-      END IF
+      CALL wrk_alloc(jpi,jpj,zsingu,zcosgu,zsingv,zcosgv) 
 
       !-----------------------------------------------------------------------
@@ -229,7 +225,5 @@
          & )
 
-      IF(wrk_not_released(2, 1,2,3,4))THEN
-         CALL ctl_stop('obs_rotvel : failed to release workspace arrays.')
-      END IF
+      CALL wrk_dealloc(jpi,jpj,zsingu,zcosgu,zsingv,zcosgv) 
 
    END SUBROUTINE obs_rotvel
