Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limadv_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limadv_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limadv_2.F90	(revision 2633)
@@ -58,5 +58,5 @@
       !! Reference:  Prather, 1986, JGR, 91, D6. 6671-6681.
       !!--------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zf0  => wrk_2d_11 , zfx   => wrk_2d_12 , zfy    => wrk_2d_13 , zbet => wrk_2d_14   ! 2D workspace
       USE wrk_nemo, ONLY:   zfm  => wrk_2d_15 , zfxx  => wrk_2d_16 , zfyy   => wrk_2d_17 , zfxy => wrk_2d_18   !  -      -
@@ -77,5 +77,5 @@
       !---------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
+      IF( wrk_in_use(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
          CALL ctl_stop( 'lim_adv_x_2 : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -224,5 +224,5 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
+      IF( wrk_not_released(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
          CALL ctl_stop( 'lim_adv_x_2 : failed to release workspace arrays.' )
       END IF
@@ -245,5 +245,5 @@
       !! Reference:  Prather, 1986, JGR, 91, D6. 6671-6681.
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zf0  => wrk_2d_11 , zfx   => wrk_2d_12 , zfy    => wrk_2d_13 , zbet => wrk_2d_14   ! 2D workspace
       USE wrk_nemo, ONLY:   zfm  => wrk_2d_15 , zfxx  => wrk_2d_16 , zfyy   => wrk_2d_17 , zfxy => wrk_2d_18   !  -      -
@@ -264,5 +264,5 @@
       !---------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
+      IF(wrk_in_use(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
          CALL ctl_stop( 'lim_adv_y_2 : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -414,5 +414,5 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
+      IF( wrk_not_released(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
         CALL ctl_stop( 'lim_adv_y_2 : failed to release workspace arrays.' )
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limdyn_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limdyn_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limdyn_2.F90	(revision 2633)
@@ -58,5 +58,5 @@
       !!              - treatment of the case if no ice dynamic
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   wrk_1d_1, wrk_1d_2
       USE wrk_nemo, ONLY:   zu_io => wrk_2d_1, zv_io => wrk_2d_2  ! ice-ocean velocity
@@ -71,5 +71,5 @@
       !!---------------------------------------------------------------------
 
-      IF(  .NOT. wrk_use(1, 1,2)  .OR.  .NOT. wrk_use(2, 1,2)  ) THEN
+      IF(  wrk_in_use(1, 1,2)  .OR.  wrk_in_use(2, 1,2)  ) THEN
          CALL ctl_stop( 'lim_dyn_2 : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -210,5 +210,5 @@
       IF(ln_ctl)   CALL prt_ctl(tab2d_1=ust2s , clinfo1=' lim_dyn  : ust2s :')
       !
-      IF( (.NOT. wrk_release(1, 1,2)) .OR. (.NOT. wrk_release(2, 1,2)) )THEN
+      IF( wrk_not_released(1, 1,2) .OR. wrk_not_released(2, 1,2) )THEN
          CALL ctl_stop('lim_dyn_2 : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limhdf_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limhdf_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limhdf_2.F90	(revision 2633)
@@ -51,5 +51,5 @@
       !! ** Action  :    update ptab with the diffusive contribution
       !!-------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zflu => wrk_2d_11, zdiv  => wrk_2d_13, zrlx  => wrk_2d_15 
       USE wrk_nemo, ONLY:   zflv => wrk_2d_12, zdiv0 => wrk_2d_14, ztab0 => wrk_2d_16
@@ -63,5 +63,5 @@
       !!-------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 11,12,13,14,15,16) ) THEN
+      IF( wrk_in_use(2, 11,12,13,14,15,16) ) THEN
          CALL ctl_stop( 'lim_hdf_2 : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -149,5 +149,5 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(2, 11,12,13,14,15,16) ) THEN
+      IF( wrk_not_released(2, 11,12,13,14,15,16) ) THEN
          CALL ctl_stop( 'lim_hdf_2 : failed to release workspace arrays.' )   ;   RETURN
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limmsh_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limmsh_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limmsh_2.F90	(revision 2633)
@@ -45,5 +45,5 @@
       !! ** Refer.  : Deleersnijder et al. Ocean Modelling 100, 7-10 
       !!--------------------------------------------------------------------- 
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zd2d1 => wrk_2d_1, zd1d2 => wrk_2d_2
       INTEGER :: ji, jj      ! dummy loop indices
@@ -56,5 +56,5 @@
       !!---------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2))THEN
+      IF(wrk_in_use(2, 1,2))THEN
          CALL ctl_stop('lim_msh_2 : requested workspace arrays unavailable.')
          RETURN
@@ -281,5 +281,5 @@
       area(:,:) = e1t(:,:) * e2t(:,:)
       !
-      IF(.NOT. wrk_release(2, 1,2))THEN
+      IF(wrk_not_released(2, 1,2))THEN
          CALL ctl_stop('lim_msh_2 : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limrhg_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limrhg_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limrhg_2.F90	(revision 2633)
@@ -92,5 +92,5 @@
       !!              at I-point
       !!-------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zfrld => wrk_2d_1, zmass => wrk_2d_2, zcorl => wrk_2d_3
       USE wrk_nemo, ONLY: za1ct => wrk_2d_4, za2ct => wrk_2d_5, zresr => wrk_2d_6
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 2633)
@@ -102,5 +102,5 @@
       !!              Tartinville et al. 2001 Ocean Modelling, 3, 95-108.
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_release, wrk_use
+      USE wrk_nemo, ONLY: wrk_not_released, wrk_in_use
       USE wrk_nemo, ONLY: zqnsoce => wrk_2d_1 ! 2D workspace
       USE wrk_nemo, ONLY: wrk_3d_4, wrk_3d_5
@@ -116,5 +116,5 @@
       !!---------------------------------------------------------------------
      
-      IF( (.NOT. wrk_use(2, 1)) .OR. (.NOT. wrk_use(3, 4,5)) )THEN
+      IF( wrk_in_use(2, 1) .OR. wrk_in_use(3, 4,5) )THEN
          CALL ctl_stop('lim_sbc_flx_2 : requested workspace arrays unavailable.')
          RETURN
@@ -253,5 +253,5 @@
       ENDIF 
       !
-      IF( (.NOT. wrk_release(2, 1)) .OR. (.NOT. wrk_release(3, 4,5)) )THEN
+      IF( wrk_not_released(2, 1) .OR. wrk_not_released(3, 4,5) )THEN
          CALL ctl_stop('lim_sbc_flx_2 : failed to release workspace arrays.')
       END IF
@@ -286,5 +286,5 @@
       !!              - taum       : modulus of the surface ocean stress (T-point) updated with ice-ocean fluxes
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztio_u => wrk_2d_1, ztio_v => wrk_2d_2     ! ocean stress below sea-ice
       INTEGER ,                     INTENT(in) ::   kt               ! ocean time-step index
@@ -297,5 +297,5 @@
       !!---------------------------------------------------------------------
       !
-      IF(.NOT. wrk_use(2, 1,2))THEN
+      IF(wrk_in_use(2, 1,2))THEN
          CALL ctl_stop('lim_sbc_tau_2 : requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -413,5 +413,5 @@
          &                       tab2d_2=vtau, clinfo2=' vtau    : '        , mask2=vmask )
       !  
-      IF(.NOT. wrk_release(2, 1,2) )   CALL ctl_stop('lim_sbc_tau_2 : failed to release workspace arrays.')
+      IF(wrk_not_released(2, 1,2) )   CALL ctl_stop('lim_sbc_tau_2 : failed to release workspace arrays.')
       !
    END SUBROUTINE lim_sbc_tau_2
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90	(revision 2633)
@@ -75,5 +75,5 @@
       !! References :   Goosse et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztmp    => wrk_2d_1, & ! 2D workspace
                           zqlbsbq => wrk_2d_2, & ! link with lead energy budget qldif
@@ -116,6 +116,6 @@
       !!-------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(2, 1,2,3,4,5,6,7,8,9,10)) .OR.  &
-          (.NOT. wrk_use(3, 4))   ) THEN
+      IF( wrk_in_use(2, 1,2,3,4,5,6,7,8,9,10) .OR.  &
+          wrk_in_use(3, 4)   ) THEN
          CALL ctl_stop('lim_thd_2 : requested workspace arrays unavailable')
          RETURN
@@ -521,6 +521,6 @@
       ENDIF
        !
-      IF( (.NOT. wrk_release(2, 1,2,3,4,5,6,7,8,9,10)) .OR.  &
-          (.NOT. wrk_release(3, 4))   ) THEN
+      IF( wrk_not_released(2, 1,2,3,4,5,6,7,8,9,10) .OR.  &
+          wrk_not_released(3, 4)   ) THEN
          CALL ctl_stop('lim_thd_2 : failed to release workspace arrays')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limthd_lac_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limthd_lac_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limthd_lac_2.F90	(revision 2633)
@@ -68,5 +68,5 @@
       !!   2.0  !  02-08 (C. Ethe, G. Madec)  F90, mpp
       !!-------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: wrk_1d_1, wrk_1d_2, wrk_1d_3, wrk_1d_4, wrk_1d_5, wrk_1d_6
       USE in_out_manager, ONLY: ctl_stop
@@ -106,5 +106,5 @@
       !!---------------------------------------------------------------------      
                
-      IF(.NOT. wrk_use(1, 1,2,3,4,5,6))THEN
+      IF(wrk_in_use(1, 1,2,3,4,5,6))THEN
          CALL ctl_stop('lim_thd_lac_2 : requestead workspace arrays unavailable.')
          RETURN
@@ -235,5 +235,5 @@
       END DO
       
-      IF(.NOT. wrk_release(1, 1,2,3,4,5,6))THEN
+      IF(wrk_not_released(1, 1,2,3,4,5,6))THEN
          CALL ctl_stop('lim_thd_lac_2 : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limthd_zdf_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limthd_zdf_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limthd_zdf_2.F90	(revision 2633)
@@ -69,5 +69,5 @@
       !!              Fichefet T. and M. Maqueda 1999, Clim. Dyn, 15(4), 251-268  
       !!------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: wrk_1d_1,  wrk_1d_2,  wrk_1d_3,  wrk_1d_4,  wrk_1d_5 
       USE wrk_nemo, ONLY: wrk_1d_6,  wrk_1d_7,  wrk_1d_8,  wrk_1d_9,  wrk_1d_10
@@ -169,7 +169,7 @@
        !!----------------------------------------------------------------------
 
-       IF(.NOT. wrk_use(1, 1,  2, 3, 4, 5, 6, 7, 8, 9,10, &
-                           11,12,13,14,15,16,17,18,19,20, &
-                           21,22,23,24,25,26,27))THEN
+       IF(wrk_in_use(1, 1,  2, 3, 4, 5, 6, 7, 8, 9,10, &
+                        11,12,13,14,15,16,17,18,19,20, &
+                        21,22,23,24,25,26,27))THEN
           CALL ctl_stop('lim_thd_zdf_2 : requested workspace arrays unavailable.')
           RETURN
@@ -808,7 +808,7 @@
        END DO
        ! 
-       IF(.NOT. wrk_release(1, 1,  2, 3, 4, 5, 6, 7, 8, 9,10, &
-                               11,12,13,14,15,16,17,18,19,20, &
-                               21,22,23,24,25,26,27))THEN
+       IF(wrk_not_released(1, 1,  2, 3, 4, 5, 6, 7, 8, 9,10, &
+                              11,12,13,14,15,16,17,18,19,20, &
+                              21,22,23,24,25,26,27))THEN
           CALL ctl_stop('lim_thd_zdf_2 : failed to release workspace arrays.')
        END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limtrp_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limtrp_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limtrp_2.F90	(revision 2633)
@@ -63,5 +63,5 @@
       !! ** action :
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zui_u  => wrk_2d_1, zvi_v => wrk_2d_2, zsm  => wrk_2d_3
       USE wrk_nemo, ONLY: zs0ice => wrk_2d_4, zs0sn => wrk_2d_5, zs0a => wrk_2d_6
@@ -79,5 +79,5 @@
       !---------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2,3,4,5,6,7,8,9,10))THEN
+      IF(wrk_in_use(2, 1,2,3,4,5,6,7,8,9,10))THEN
          CALL ctl_stop('lim_trp_2 : requested workspace arrays unavailable.')
          RETURN
@@ -274,5 +274,5 @@
       ENDIF
       !
-      IF(.NOT. wrk_release(2, 1,2,3,4,5,6,7,8,9,10))THEN
+      IF(wrk_not_released(2, 1,2,3,4,5,6,7,8,9,10))THEN
          CALL ctl_stop('lim_trp_2 : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90	(revision 2633)
@@ -103,5 +103,5 @@
       !!      of a day
       !!-------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zfield => wrk_2d_1
       !!
@@ -115,5 +115,5 @@
       !!-------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1))THEN
+      IF(wrk_in_use(2, 1))THEN
          CALL ctl_stop('lim_wri_2 : requested workspace array unavailable.')
          RETURN
@@ -211,5 +211,5 @@
       IF( ( nn_fsbc * niter ) >= nitend )   CALL histclo( nice ) 
 
-      IF(.NOT. wrk_release(2, 1))THEN
+      IF(wrk_not_released(2, 1))THEN
          CALL ctl_stop('lim_wri_2 : failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limadv.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limadv.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limadv.F90	(revision 2633)
@@ -55,5 +55,5 @@
       !! Reference:  Prather, 1986, JGR, 91, D6. 6671-6681.
       !!--------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zf0  => wrk_2d_11 , zfx   => wrk_2d_12 , zfy    => wrk_2d_13 , zbet => wrk_2d_14   ! 2D workspace
       USE wrk_nemo, ONLY:   zfm  => wrk_2d_15 , zfxx  => wrk_2d_16 , zfyy   => wrk_2d_17 , zfxy => wrk_2d_18   !  -      -
@@ -74,5 +74,5 @@
       !---------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
+      IF( wrk_in_use(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
          CALL ctl_stop( 'lim_adv_x : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -223,5 +223,5 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
+      IF( wrk_not_released(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
          CALL ctl_stop( 'lim_adv_x : failed to release workspace arrays.' )
       END IF
@@ -244,5 +244,5 @@
       !! Reference:  Prather, 1986, JGR, 91, D6. 6671-6681.
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zf0  => wrk_2d_11 , zfx   => wrk_2d_12 , zfy    => wrk_2d_13 , zbet => wrk_2d_14   ! 2D workspace
       USE wrk_nemo, ONLY:   zfm  => wrk_2d_15 , zfxx  => wrk_2d_16 , zfyy   => wrk_2d_17 , zfxy => wrk_2d_18   !  -      -
@@ -263,5 +263,5 @@
       !---------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
+      IF(wrk_in_use(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
          CALL ctl_stop( 'lim_adv_y : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -413,5 +413,5 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
+      IF( wrk_not_released(2, 11,12,13,14,15,16,17,18,19,20,21) ) THEN
          CALL ctl_stop( 'lim_adv_y : failed to release workspace arrays.' )
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90	(revision 2633)
@@ -55,5 +55,5 @@
       !!              - treatment of the case if no ice dynamic
       !!------------------------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   wrk_1d_1, wrk_1d_2
       USE wrk_nemo, ONLY:   zu_io => wrk_2d_1, zv_io => wrk_2d_2  ! ice-ocean velocity
@@ -68,5 +68,5 @@
       !!---------------------------------------------------------------------
 
-      IF(  .NOT. wrk_use(1, 1,2)  .OR.  .NOT. wrk_use(2, 1,2)  ) THEN
+      IF(  wrk_in_use(1, 1,2)  .OR.  wrk_in_use(2, 1,2)  ) THEN
          CALL ctl_stop( 'lim_dyn : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -212,5 +212,5 @@
       ENDIF
       !
-      IF(  .NOT. wrk_release(1, 1,2)  .OR.  .NOT. wrk_release(2, 1,2)  ) THEN
+      IF(  wrk_not_released(1, 1,2)  .OR.  wrk_not_released(2, 1,2)  ) THEN
          CALL ctl_stop( 'lim_dyn : failed to release workspace arrays.' )
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limhdf.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limhdf.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limhdf.F90	(revision 2633)
@@ -50,5 +50,5 @@
       !! ** Action  :    update ptab with the diffusive contribution
       !!-------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zflu => wrk_2d_11, zdiv  => wrk_2d_13, zrlx  => wrk_2d_15 
       USE wrk_nemo, ONLY:   zflv => wrk_2d_12, zdiv0 => wrk_2d_14, ztab0 => wrk_2d_16
@@ -62,5 +62,5 @@
       !!-------------------------------------------------------------------
       
-      IF( .NOT. wrk_use(2, 11,12,13,14,15,16) ) THEN
+      IF( wrk_in_use(2, 11,12,13,14,15,16) ) THEN
          CALL ctl_stop( 'lim_hdf: ERROR: requested workspace arrays unavailable' )   ;   RETURN
       END IF
@@ -146,5 +146,5 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(2, 11,12,13,14,15,16) ) THEN
+      IF( wrk_not_released(2, 11,12,13,14,15,16) ) THEN
          CALL ctl_stop( 'lim_hdf : failed to release workspace arrays.' )   ;   RETURN
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90	(revision 2633)
@@ -61,5 +61,5 @@
       !!                or from arbitrary sea-ice conditions
       !!-------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   wrk_1d_1, wrk_1d_2, wrk_1d_3, wrk_1d_4
       USE wrk_nemo, ONLY:   zidto => wrk_2d_1   ! ice indicator
@@ -72,5 +72,5 @@
       !--------------------------------------------------------------------
 
-      IF(  .NOT. wrk_use(1, 1,2)  ) THEN
+      IF(  wrk_in_use(1, 1,2)  ) THEN
          CALL ctl_stop( 'lim_istate : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -516,5 +516,5 @@
       CALL lbc_lnk( fsbbq  , 'T', 1. )
       !
-      IF(  .NOT. wrk_release(1, 1,2)  ) THEN
+      IF(  wrk_not_released(1, 1,2)  ) THEN
          CALL ctl_stop( 'lim_istate : failed to release workspace arrays.' )
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 2633)
@@ -148,5 +148,5 @@
       !!-----------------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 1,2,3,4,5,6,7,8) ) THEN
+      IF( wrk_in_use(2, 1,2,3,4,5,6,7,8) ) THEN
          CALL ctl_stop(' : requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -494,5 +494,5 @@
       END DO
 
-      IF( .NOT. wrk_release(2, 1,2,3,4,5,6,7,8) )   CALL ctl_stop( 'lim_itd_me : failed to release workspace arrays.' )
+      IF( wrk_not_released(2, 1,2,3,4,5,6,7,8) )   CALL ctl_stop( 'lim_itd_me : failed to release workspace arrays.' )
       !
    END SUBROUTINE lim_itd_me
@@ -524,5 +524,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 1) ) THEN
+      IF( wrk_in_use(2, 1) ) THEN
          CALL ctl_stop('lim_itd_me_icestrength : requested workspace array unavailable.')   ;   RETURN
       END IF
@@ -681,5 +681,5 @@
       CALL lbc_lnk( strength, 'T', 1. )
 
-      IF(.NOT. wrk_release(2, 1))THEN
+      IF(wrk_not_released(2, 1))THEN
          CALL ctl_stop('lim_itd_me_icestrength : failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 2633)
@@ -91,5 +91,5 @@
       !! ** purpose  :   output of sea-ice variable in a netcdf file
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   z2d  => wrk_2d_1   ! 2D workspace
       !
@@ -102,5 +102,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 1) ) THEN
+      IF( wrk_in_use(2, 1) ) THEN
          CALL ctl_stop( 'lim_rst_write : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -294,5 +294,5 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(2, 1) ) THEN
+      IF( wrk_not_released(2, 1) ) THEN
          CALL ctl_stop( 'lim_rst_write : failed to release workspace arrays.' )
       END IF
@@ -307,5 +307,5 @@
       !! ** purpose  :   read of sea-ice variable restart in a netcdf file
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   z2d  => wrk_2d_1   ! 2D workspace
       !
@@ -320,5 +320,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 1) ) THEN
+      IF( wrk_in_use(2, 1) ) THEN
          CALL ctl_stop( 'lim_rst_read : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -571,5 +571,5 @@
       CALL iom_close( numrir )
       !
-      IF( .NOT. wrk_release(2, 1) ) THEN
+      IF( wrk_not_released(2, 1) ) THEN
          CALL ctl_stop( 'lim_rst_read : failed to release workspace arrays.' )
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90	(revision 2633)
@@ -96,5 +96,5 @@
       !!              Tartinville et al. 2001 Ocean Modelling, 3, 95-108.
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_release, wrk_use
+      USE wrk_nemo, ONLY:   wrk_not_released, wrk_in_use
       USE wrk_nemo, ONLY:   zfcm1 => wrk_2d_1 , zfcm2 => wrk_2d_2   ! 2D workspace
       USE wrk_nemo, ONLY:   wrk_3d_4, wrk_3d_5                      ! 3D workspace
@@ -111,5 +111,5 @@
       !!---------------------------------------------------------------------
 
-      IF( .NOT.wrk_use(2, 1,2) .OR. .NOT.wrk_use(3, 4,5) ) THEN
+      IF( wrk_in_use(2, 1,2) .OR. wrk_in_use(3, 4,5) ) THEN
          CALL ctl_stop( 'lim_sbc_flx : requested workspace arrays unavailable.' )   ;   RETURN
       ENDIF
@@ -300,5 +300,5 @@
       ENDIF
       !
-      IF(  .NOT. wrk_release(2, 1,2)  .OR.  .NOT. wrk_release(3, 4,5)  ) THEN
+      IF(  wrk_not_released(2, 1,2)  .OR.  wrk_not_released(3, 4,5)  ) THEN
          CALL ctl_stop( 'lim_sbc_flx : failed to release workspace arrays.' )
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 2633)
@@ -81,5 +81,5 @@
       !! ** References : H. Goosse et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zqlbsbq => wrk_2d_1   ! 2D workspace
       !
@@ -94,5 +94,5 @@
       !!-------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 1) ) THEN
+      IF( wrk_in_use(2, 1) ) THEN
          CALL ctl_stop( 'lim_thd : requested workspace arrays unavailable' )   ;   RETURN
       ENDIF
@@ -458,5 +458,5 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(2, 1) )   CALL ctl_stop( 'lim_thd : failed to release workspace arrays' )
+      IF( wrk_not_released(2, 1) )   CALL ctl_stop( 'lim_thd : failed to release workspace arrays' )
       !
    END SUBROUTINE lim_thd
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90	(revision 2633)
@@ -102,5 +102,5 @@
       !!------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22) ) THEN
+      IF( wrk_in_use(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22) ) THEN
          CALL ctl_stop('lim_thd_dh : requestead workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -699,5 +699,5 @@
       END DO !ji
       !
-      IF( .NOT. wrk_release(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21) )   &
+      IF( wrk_not_released(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21) )   &
          &     CALL ctl_stop('lim_thd_dh : failed to release workspace arrays.')
       !
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90	(revision 2633)
@@ -121,5 +121,5 @@
       !!-------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(1, 1,2,3,4,5,6,7,8) ) THEN
+      IF( wrk_in_use(1, 1,2,3,4,5,6,7,8) ) THEN
          CALL ctl_stop('lim_thd_dh : requestead workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -687,5 +687,5 @@
       END DO !jk
       !
-      IF( .NOT. wrk_release(1, 1,2,3,4,5,6,7,8) )   CALL ctl_stop( 'lim_thd_ent : failed to release workspace arrays.' )
+      IF( wrk_not_released(1, 1,2,3,4,5,6,7,8) )   CALL ctl_stop( 'lim_thd_ent : failed to release workspace arrays.' )
       !
    END SUBROUTINE lim_thd_ent
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90	(revision 2633)
@@ -110,6 +110,6 @@
       !!-----------------------------------------------------------------------!
 
-      IF(  .NOT. wrk_use(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14) .AND.   &
-         & .NOT. wrk_use(2, 1,2,3,4,5,6,7,8)                        ) THEN
+      IF(  wrk_in_use(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14) .OR.   &
+         & wrk_in_use(2, 1,2,3,4,5,6,7,8)                        ) THEN
          CALL ctl_stop('lim_thd_dh : requestead workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -689,6 +689,6 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14) .AND.     &
-         &.NOT. wrk_release(2, 1,2,3,4,5,6,7,8)                        )   &
+      IF( wrk_not_released(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14) .OR.     &
+         &wrk_not_released(2, 1,2,3,4,5,6,7,8)                       )   &
          &      CALL ctl_stop( 'lim_thd_lac : failed to release workspace arrays.' )
       !
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90	(revision 2633)
@@ -59,5 +59,5 @@
       !!---------------------------------------------------------------------
 
-      IF(  .NOT. wrk_use(1, 1,2,3)  ) THEN
+      IF(  wrk_in_use(1, 1,2,3)  ) THEN
          CALL ctl_stop('lim_thd_dh : requestead workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -237,5 +237,5 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(1, 1,2,3) )   CALL ctl_stop( 'lim_thd_lac : failed to release workspace arrays.' )
+      IF( wrk_not_released(1, 1,2,3) )   CALL ctl_stop( 'lim_thd_lac : failed to release workspace arrays.' )
       !
    END SUBROUTINE lim_thd_sal
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90	(revision 2633)
@@ -62,5 +62,5 @@
       !! ** action :
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zs0at => wrk_2d_1 , zsm => wrk_2d_2 , zs0ow  => wrk_2d_3      ! 2D workspace
       USE wrk_nemo, ONLY:   wrk_3d_1, wrk_3d_2, wrk_3d_3, wrk_3d_4, wrk_3d_5, wrk_3d_6    ! 3D workspace
@@ -80,5 +80,5 @@
       !!---------------------------------------------------------------------
 
-      IF( .NOT.wrk_use( 2, 1,2,3,4,5 ) ) THEN
+      IF( wrk_in_use( 2, 1,2,3,4,5 ) ) THEN
          CALL ctl_stop( 'lim_trp : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -463,5 +463,5 @@
       ENDIF
       !
-      IF( .NOT.wrk_release( 2, 1,2,3,4,5 ) )   CALL ctl_stop('lim_trp_2 : failed to release workspace arrays.')
+      IF( wrk_not_released( 2, 1,2,3,4,5 ) )   CALL ctl_stop('lim_trp_2 : failed to release workspace arrays.')
       !
    END SUBROUTINE lim_trp
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90	(revision 2633)
@@ -304,5 +304,5 @@
       !!------------------------------------------------------------------
 
-      IF( .NOT.wrk_use( 2, 1,2 ) ) THEN
+      IF( wrk_in_use( 2, 1,2 ) ) THEN
          CALL ctl_stop( 'lim_var_salprof : requested workspace arrays unavailable.' )   ;   RETURN
       END IF
@@ -388,5 +388,5 @@
       ENDIF ! num_sal
       !
-      IF( .NOT.wrk_release( 2, 1,2 ) )   CALL ctl_stop('lim_var_salprof : failed to release workspace arrays.')
+      IF( wrk_not_released( 2, 1,2 ) )   CALL ctl_stop('lim_var_salprof : failed to release workspace arrays.')
       !
    END SUBROUTINE lim_var_salprof
@@ -441,5 +441,5 @@
       !!---------------------------------------------------------------------
 
-      IF(  .NOT. wrk_use(1, 1)  ) THEN
+      IF(  wrk_in_use(1, 1)  ) THEN
          CALL ctl_stop('lim_var_salprof1d : requestead workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -510,5 +510,5 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(1, 1) )   CALL ctl_stop( 'lim_var_salprof1d : failed to release workspace arrays.' )
+      IF( wrk_not_released(1, 1) )   CALL ctl_stop( 'lim_var_salprof1d : failed to release workspace arrays.' )
       !
    END SUBROUTINE lim_var_salprof1d
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 2633)
@@ -70,5 +70,5 @@
       !!  modif : 03/06/98
       !!-------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_release, wrk_use
+      USE wrk_nemo, ONLY: wrk_not_released, wrk_in_use
       USE wrk_nemo, ONLY: zfield => wrk_2d_1             ! 2D workspace
       USE wrk_nemo, ONLY: wrk_3d_1, wrk_3D_2, wrk_3d_3   ! 3D workspace
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 2633)
@@ -65,5 +65,5 @@
       !! ** Purpose :   compute and output some AR5 diagnostics
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zarea_ssh => wrk_2d_1, zbotpres => wrk_2d_2
       USE wrk_nemo, ONLY: zrhd => wrk_3d_1, zrhop => wrk_3d_2
@@ -76,7 +76,7 @@
       !!--------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(2, 1,2)) .OR. &
-          (.NOT. wrk_use(3, 1,2)) .OR. &
-          (.NOT. wrk_use(4, 1)) )THEN
+      IF( wrk_in_use(2, 1,2) .OR. &
+          wrk_in_use(3, 1,2) .OR. &
+          wrk_in_use(4, 1) )THEN
          CALL ctl_stop('dia_ar5: requested workspace arrays unavailable')   ;   RETURN
       END IF
@@ -160,7 +160,7 @@
       CALL iom_put( 'saltot' , zsal  )
       !
-      IF( (.NOT. wrk_release(2, 1,2)) .OR. &
-          (.NOT. wrk_release(3, 1,2)) .OR. &
-          (.NOT. wrk_release(4, 1)) )THEN
+      IF( wrk_not_released(2, 1,2) .OR. &
+          wrk_not_released(3, 1,2) .OR. &
+          wrk_not_released(4, 1) )THEN
          CALL ctl_stop('dia_ar5: failed to release workspace arrays')
       END IF
@@ -175,5 +175,5 @@
       !! ** Purpose :   initialization for AR5 diagnostic computation
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: wrk_4d_1
       !!
@@ -185,5 +185,5 @@
       !!----------------------------------------------------------------------
       !
-      IF(.NOT. wrk_use(4, 1))THEN
+      IF(wrk_in_use(4, 1))THEN
          CALL ctl_stop('dia_ar5_init: requested workspace array unavailable.')   ;   RETURN
       END IF
@@ -223,5 +223,5 @@
       ENDIF
       !
-      IF(.NOT. wrk_release(4, 1))THEN
+      IF(wrk_not_released(4, 1))THEN
          CALL ctl_stop('dia_ar5_init: failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 2633)
@@ -210,5 +210,5 @@
       !!----------------------------------------------------------------------
 #if defined key_mpp_mpi
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zwork => wrk_1d_1
 #endif
@@ -228,5 +228,5 @@
       !
 #if defined key_mpp_mpi
-      IF( .not. wrk_use(1, 1) ) THEN
+      IF( wrk_in_use(1, 1) ) THEN
          CALL ctl_stop('ptr_vjk: ERROR - requested workspace array is unavailable')   ;   RETURN
       END IF
@@ -265,5 +265,5 @@
       !
 #if defined key_mpp_mpi
-      IF(.NOT. wrk_release(1, 1) )   CALL ctl_stop('ptr_vjk: ERROR - failed to release workspace array')
+      IF(wrk_not_released(1, 1) )   CALL ctl_stop('ptr_vjk: ERROR - failed to release workspace array')
 #endif
       !
@@ -282,5 +282,5 @@
       !!----------------------------------------------------------------------
 #if defined key_mpp_mpi
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zwork => wrk_1d_1
 #endif
@@ -299,5 +299,5 @@
       !
 #if defined key_mpp_mpi
-      IF(.NOT. wrk_use(1, 1))THEN
+      IF(wrk_in_use(1, 1))THEN
          CALL ctl_stop('ptr_tjk: requested workspace array unavailable.')
          RETURN
@@ -324,5 +324,5 @@
       !
 #if defined key_mpp_mpi
-      IF( .NOT. wrk_release(1, 1) )   CALL ctl_stop('ptr_tjk: failed to release workspace array.')
+      IF( wrk_not_released(1, 1) )   CALL ctl_stop('ptr_tjk: failed to release workspace array.')
 #endif
       !    
@@ -532,5 +532,5 @@
       !! ** Method  :   NetCDF file
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zphi => wrk_1d_1, zfoo => wrk_1d_2
       USE wrk_nemo, ONLY: z_1  => wrk_2d_1
@@ -551,5 +551,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.not. wrk_use(1, 1,2)) .OR. (.not. wrk_use(2, 1)) )THEN
+      IF( wrk_in_use(1, 1,2) .OR. wrk_in_use(2, 1) )THEN
          CALL ctl_stop('dia_ptr_wri: ERROR: requested workspace arrays unavailable')   ;   RETURN
       END IF
@@ -867,5 +867,5 @@
       ENDIF
       !
-      IF( .not. wrk_release(1, 1,2) .OR. (.not. wrk_release(2, 1)) )   &
+      IF( wrk_not_released(1, 1,2) .OR. wrk_not_released(2, 1) )   &
          CALL ctl_stop('dia_ptr_wri: failed to release workspace arrays')
       !
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 2633)
@@ -117,5 +117,5 @@
       !!----------------------------------------------------------------------
       USE oce, ONLY :   z3d => ta   ! use ta as 3D workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: z2d => wrk_2d_1
       !!
@@ -126,5 +126,5 @@
       !!----------------------------------------------------------------------
       ! 
-      IF( .not. wrk_use(2, 1))THEN
+      IF( wrk_in_use(2, 1))THEN
          CALL ctl_stop('dia_wri: ERROR - requested 2D workspace unavailable.')
          RETURN
@@ -200,5 +200,5 @@
       ENDIF
       !
-      IF( .not. wrk_release(2, 1))THEN
+      IF( wrk_not_released(2, 1))THEN
          CALL ctl_stop('dia_wri: ERROR - failed to release 2D workspace.')
          RETURN
@@ -224,5 +224,5 @@
       !!      Each nwrite time step, output the instantaneous or mean fields
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zw2d => wrk_2d_1
       !!
@@ -236,5 +236,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( .not. wrk_use(2, 1))THEN
+      IF( wrk_in_use(2, 1))THEN
          CALL ctl_stop('dia_wri: ERROR - requested 2D workspace unavailable.')
          RETURN
@@ -608,5 +608,5 @@
       ENDIF
       !
-      IF( .not. wrk_release(2, 1))THEN
+      IF( wrk_not_released(2, 1))THEN
          CALL ctl_stop('dia_wri: ERROR - failed to release 2D workspace.')
          RETURN
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 2633)
@@ -131,5 +131,5 @@
       !!               tmask_i  : interior ocean mask
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release, iwrk_use, iwrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, iwrk_in_use, iwrk_not_released
       USE wrk_nemo, ONLY: zwf => wrk_2d_1
       USE wrk_nemo, ONLY: imsk => iwrk_2d_1
@@ -142,5 +142,5 @@
       !!---------------------------------------------------------------------
       
-      IF( (.not. wrk_use(2,1)) .OR. (.not. iwrk_use(2,1)) )THEN
+      IF( wrk_in_use(2,1) .OR. iwrk_in_use(2,1) )THEN
          CALL ctl_stop('dom_msk: ERROR: requested workspace arrays unavailable.')
          RETURN
@@ -443,5 +443,5 @@
       ENDIF
       !
-      IF( (.not. wrk_release(2,1)) .OR. (.not. iwrk_release(2,1)) )THEN
+      IF( wrk_not_released(2,1) .OR. iwrk_not_released(2,1) )THEN
          CALL ctl_stop('dom_msk: ERROR: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domngb.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domngb.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domngb.F90	(revision 2633)
@@ -37,5 +37,5 @@
       !!----------------------------------------------------------------------
       USE in_out_manager, ONLY: ctl_stop
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zglam => wrk_2d_2, &
                           zgphi => wrk_2d_3, &
@@ -52,5 +52,5 @@
       !!--------------------------------------------------------------------
 
-      IF(.not. wrk_use(2, 2, 3, 4, 5))THEN
+      IF(wrk_in_use(2, 2, 3, 4, 5))THEN
          CALL ctl_stop('dom_ngb: Requested workspaces already in use.')
       END IF
@@ -81,5 +81,5 @@
       ENDIF
 
-      IF(.not. wrk_release(2, 2,3,4,5))THEN
+      IF(wrk_not_released(2, 2,3,4,5))THEN
          CALL ctl_stop('dom_ngb: error releasing workspaces.')
       ENDIF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 2633)
@@ -65,5 +65,5 @@
       !!               ssh over the whole water column (scale factors)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zs_t   => wrk_2d_1, zs_u_1 => wrk_2d_2
       USE wrk_nemo, ONLY:   zs_v_1 => wrk_2d_3
@@ -74,5 +74,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(2, 1,2,3))THEN
+      IF(wrk_in_use(2, 1,2,3))THEN
          CALL ctl_stop('dom_vvl: ERROR - requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -190,5 +190,5 @@
       fse3v_b(:,:,:) = fse3v_b(:,:,:) + fse3v_0(:,:,:)
       !
-      IF(.not. wrk_release(2, 1,2,3))THEN
+      IF(wrk_not_released(2, 1,2,3))THEN
          CALL ctl_stop('dom_vvl: ERROR - failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domwri.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domwri.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domwri.F90	(revision 2633)
@@ -63,5 +63,5 @@
       !!                                   masks, depth and vertical scale factors
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zprt  => wrk_2d_1, zprw  => wrk_2d_2
       USE wrk_nemo, ONLY: zdepu => wrk_3d_1, zdepv => wrk_3d_2
@@ -80,5 +80,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.not. wrk_use(2, 1,2)) .OR. (.not. wrk_use(3, 1,2)) )THEN
+      IF( wrk_in_use(2, 1,2) .OR. wrk_in_use(3, 1,2) )THEN
          CALL ctl_stop('dom_wri: ERROR - requested workspace arrays unavailable.')
          RETURN
@@ -261,5 +261,5 @@
       END SELECT
       !
-      IF( (.not. wrk_release(2, 1,2)) .OR. (.not. wrk_release(3, 1,2)) )THEN
+      IF( wrk_not_released(2, 1,2) .OR. wrk_not_released(3, 1,2) )THEN
          CALL ctl_stop('dom_wri: ERROR - failed to release workspace arrays.')
       END IF
@@ -278,5 +278,5 @@
       !!----------------------------------------------------------------------
       !!
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztstref => wrk_2d_1      ! array with different values for each element
      !!
@@ -289,6 +289,7 @@
       !!----------------------------------------------------------------------
 
-      IF( .not. wrk_use(2, 1) ) THEN
-         CALL ctl_stop('dom_uniq: ERROR - requested workspace array unavailable.')   ;   RETURN
+      IF( wrk_in_use(2, 1) ) THEN
+         CALL ctl_stop('dom_uniq : requested workspace array unavailable.')   ;   RETURN
+         RETURN
       END IF
 
@@ -307,4 +308,8 @@
       puniq(nldi:nlei,nldj:nlej) = REAL( COUNT( lldbl(nldi:nlei,nldj:nlej,:), dim = 3 ) , wp )
       !
+      IF( wrk_not_released(2, 1) ) THEN
+         CALL ctl_stop('dom_uniq : failed to release workspace array.')   ;   RETURN
+      END IF
+      !
    END SUBROUTINE dom_uniq
 
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 2633)
@@ -619,5 +619,5 @@
       !!              - update bathy : meter bathymetry (in meters)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zbathy => wrk_2d_1
       !!
@@ -626,5 +626,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(2, 1))THEN
+      IF(wrk_in_use(2, 1))THEN
          CALL ctl_stop('zgr_bat_ctl: ERROR: requested workspace array unavailable.')
          RETURN
@@ -733,5 +733,5 @@
       ENDIF
       !
-      IF(.not. wrk_release(2, 1))THEN
+      IF(wrk_not_released(2, 1))THEN
          CALL ctl_stop('zgr_bat_ctl: ERROR: failed to release workspace array.')
          RETURN
@@ -753,5 +753,5 @@
       !!                                     (min value = 1 over land)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zmbk => wrk_2d_1
       !!
@@ -759,5 +759,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( .not. wrk_use(2, 1))THEN
+      IF( wrk_in_use(2, 1))THEN
          CALL ctl_stop('zgr_bot_level: ERROR - requested 2D workspace unavailable.')
          RETURN
@@ -780,5 +780,5 @@
       zmbk(:,:) = REAL( mbkv(:,:), wp )   ;   CALL lbc_lnk(zmbk,'V',1.)   ;   mbkv  (:,:) = MAX( INT( zmbk(:,:) ), 1 )
       !
-      IF( .not. wrk_release(2, 1))THEN
+      IF( wrk_not_released(2, 1))THEN
          CALL ctl_stop('zgr_bot_level: ERROR - failed to release workspace array.')
          RETURN
@@ -860,5 +860,5 @@
       !!  Reference :   Pacanowsky & Gnanadesikan 1997, Mon. Wea. Rev., 126, 3248-3270.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zprt => wrk_3d_1
       !!
@@ -873,5 +873,5 @@
       !!---------------------------------------------------------------------
       ! 
-      IF( .not. wrk_use(3, 1))THEN
+      IF( wrk_in_use(3, 1))THEN
          CALL ctl_stop('zgr_zps: ERROR - requested workspace unavailable.')
          RETURN
@@ -1068,5 +1068,5 @@
       ENDIF  
       !
-      IF( .not. wrk_release(3, 1))THEN
+      IF( wrk_not_released(3, 1))THEN
          CALL ctl_stop('zgr_zps: ERROR - failed to release workspace.')
          RETURN
@@ -1159,5 +1159,5 @@
       !! Reference : Madec, Lott, Delecluse and Crepon, 1996. JPO, 26, 1393-1408.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zenv => wrk_2d_1, ztmp => wrk_2d_2, zmsk => wrk_2d_3, &
                           zri => wrk_2d_4, zrj => wrk_2d_5, zhbat => wrk_2d_6
@@ -1170,5 +1170,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(2, 1,2,3,4,5,6))THEN
+      IF(wrk_in_use(2, 1,2,3,4,5,6))THEN
          CALL ctl_stop('zgr_sco: ERROR - requested workspace arrays unavailable')
          RETURN
@@ -1616,5 +1616,5 @@
 !!gm bug    #endif
       !
-      IF(.not. wrk_release(2, 1,2,3,4,5,6))THEN
+      IF(wrk_not_released(2, 1,2,3,4,5,6))THEN
          CALL ctl_stop('zgr_sco: ERROR - failed to release workspace arrays')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 2633)
@@ -446,5 +446,5 @@
       !!                 p=integral [ rau*g dz ]
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zprn => wrk_3d_1
 
@@ -458,5 +458,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1))THEN
+      IF(wrk_in_use(3, 1))THEN
          CALL ctl_stop('istage_uvg: requested workspace array unavailable.')
          RETURN
@@ -558,5 +558,5 @@
       rotb (:,:,:) = rotn (:,:,:)       ! set the before to the now value
       !
-      IF(.NOT. wrk_release(3, 1))THEN
+      IF(wrk_not_released(3, 1))THEN
          CALL ctl_stop('istage_uvg: failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90	(revision 2633)
@@ -46,5 +46,5 @@
       !! ** Action  :   (ua,va) updated with the now vorticity term trend
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE oce     , ONLY:   zfu   => ta       ! use ta as 3D workspace
       USE oce     , ONLY:   zfv   => sa       ! use sa as 3D workspace
@@ -66,5 +66,5 @@
 
       ! Check that global workspace arrays aren't already in use
-      IF( .not. wrk_use(3, 1,2,3,4,5,6,7) ) THEN
+      IF( wrk_in_use(3, 1,2,3,4,5,6,7) ) THEN
          CALL ctl_stop('dyn_adv_cen2 : requested workspace array unavailable')   ;   RETURN
       END IF
@@ -162,5 +162,5 @@
          &                       tab3d_2=va, clinfo2=           ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      IF( .not. wrk_release(3, 1,2,3,4,5,6,7) )   CALL ctl_stop('dyn_adv_cen2 : failed to release workspace array')
+      IF( wrk_not_released(3, 1,2,3,4,5,6,7) )   CALL ctl_stop('dyn_adv_cen2 : failed to release workspace array')
       !
    END SUBROUTINE dyn_adv_cen2
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90	(revision 2633)
@@ -67,5 +67,5 @@
       !! Reference : Shchepetkin & McWilliams, 2005, Ocean Modelling. 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE oce     , ONLY:   zfu    => ta       ! ta used as 3D workspace
       USE oce     , ONLY:   zfv    => sa       ! sa used as 3D workspace
@@ -90,5 +90,5 @@
 
       ! Check that required workspace arrays are not already in use
-      IF( .not. wrk_use(3, 1,2,3,4,5,6,7) .AND. .not. wrk_use(4, 1,2,3,4) ) THEN
+      IF( wrk_in_use(3, 1,2,3,4,5,6,7) .OR. wrk_in_use(4, 1,2,3,4) ) THEN
          CALL ctl_stop('dyn_adv_ubs : requested workspace array unavailable')   ;   RETURN
       END IF
@@ -254,6 +254,6 @@
          &                       tab3d_2=va, clinfo2=           ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      IF( .not. wrk_release(3, 1,2,3,4,5,6,7) .OR. &
-          .not. wrk_release(4, 1,2,3,4)        )   CALL ctl_stop('dyn_adv_ubs : failed to release workspace array')
+      IF( wrk_not_released(3, 1,2,3,4,5,6,7) .OR. &
+          wrk_not_released(4, 1,2,3,4)        )   CALL ctl_stop('dyn_adv_ubs : failed to release workspace array')
       !
    END SUBROUTINE dyn_adv_ubs
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 2633)
@@ -76,5 +76,5 @@
       !!             - Save the trend (l_trddyn=T)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztrdu => wrk_3d_1, ztrdv => wrk_3d_2   ! 3D workspace
       !!
@@ -83,5 +83,5 @@
       !!----------------------------------------------------------------------
       !
-      IF(.NOT. wrk_use(3, 1,2) ) THEN
+      IF(wrk_in_use(3, 1,2) ) THEN
          CALL ctl_stop('dyn_hpg: requested workspace arrays are unavailable')   ;   RETURN
       END IF
@@ -111,5 +111,5 @@
          &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      IF(.NOT. wrk_release(3, 1,2) )   CALL ctl_stop('dyn_hpg: failed to release workspace arrays')
+      IF(wrk_not_released(3, 1,2) )   CALL ctl_stop('dyn_hpg: failed to release workspace arrays')
       !
    END SUBROUTINE dyn_hpg
@@ -602,5 +602,5 @@
       USE oce, ONLY :   zhpi => ta   ! use ta as 3D workspace
       USE oce, ONLY :   zhpj => sa   ! use sa as 3D workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: drhox => wrk_3d_1  , dzx => wrk_3d_2
       USE wrk_nemo, ONLY: drhou => wrk_3d_3  , dzu => wrk_3d_4 , rho_i => wrk_3d_5
@@ -619,5 +619,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ) THEN
+      IF(wrk_in_use(3, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ) THEN
          CALL ctl_stop('dyn:hpg_djc : requested workspace arrays unavailable')   ;   RETURN
       END IF
@@ -819,5 +819,5 @@
       END DO
       !
-      IF(.NOT. wrk_release(3, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) )   &
+      IF(wrk_not_released(3, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) )   &
          CALL ctl_stop('dyn:hpg_djc : failed to release workspace arrays.')
       !
@@ -835,5 +835,5 @@
       USE oce, ONLY :   zhpi => ta   ! use ta as 3D workspace
       USE oce, ONLY :   zhpj => sa   ! use sa as 3D workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zdistr  => wrk_2d_1 , zsina   => wrk_2d_2 , zcosa  => wrk_2d_3
       USE wrk_nemo, ONLY: zhpiorg => wrk_3d_1 , zhpirot => wrk_3d_2
@@ -849,6 +849,6 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 1,2,3) .OR.      &
-          .NOT. wrk_use(3, 1,2,3,4,5,6,7,8) ) THEN
+      IF( wrk_in_use(2, 1,2,3) .OR.      &
+          wrk_in_use(3, 1,2,3,4,5,6,7,8) ) THEN
          CALL ctl_stop('dyn:hpg_rot : requested workspace arrays unavailable')   ;   RETURN
       END IF
@@ -1009,6 +1009,6 @@
       END DO
       !
-      IF( .NOT. wrk_release(2, 1,2,3)  .OR.     &
-          .NOT. wrk_release(3, 1,2,3,4,5,6,7,8) )   CALL ctl_stop('dyn:hpg_rot : failed to release workspace arrays')
+      IF( wrk_not_released(2, 1,2,3)  .OR.     &
+          wrk_not_released(3, 1,2,3,4,5,6,7,8) )   CALL ctl_stop('dyn:hpg_rot : failed to release workspace arrays')
       !
    END SUBROUTINE hpg_rot
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 2633)
@@ -51,5 +51,5 @@
       !!             - save this trends (l_trddyn=T) for post-processing
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE oce     , ONLY:   ztrdu => ta       , ztrdv => sa   ! (ta,sa) used as 3D workspace   
       USE wrk_nemo, ONLY:   zhke  => wrk_3d_1                 ! 3D workspace
@@ -61,5 +61,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3,1) ) THEN
+      IF(wrk_in_use(3,1) ) THEN
          CALL ctl_stop('dyn_key: requested workspace array is unavailable.')   ;   RETURN
       ENDIF
@@ -135,5 +135,5 @@
          &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      IF(.NOT. wrk_release(3, 1) )   CALL ctl_stop('dyn_key: failed to release workspace array')
+      IF(wrk_not_released(3, 1) )   CALL ctl_stop('dyn_key: failed to release workspace array')
       !
    END SUBROUTINE dyn_keg
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90	(revision 2633)
@@ -52,5 +52,5 @@
       !! ** Purpose :   compute the lateral ocean dynamics physics.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztrdu => wrk_3d_1, ztrdv => wrk_3d_2
       !!
@@ -58,5 +58,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1,2))THEN
+      IF(wrk_in_use(3, 1,2))THEN
          CALL ctl_stop('dyn_ldf: requested workspace arrays unavailable.')
          RETURN
@@ -112,5 +112,5 @@
          &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      IF(.NOT. wrk_release(3, 1,2))THEN
+      IF(wrk_not_released(3, 1,2))THEN
          CALL ctl_stop('dyn_ldf: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90	(revision 2633)
@@ -75,5 +75,5 @@
       !!               mixing trend.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zcu => wrk_2d_1, zcv => wrk_2d_2   ! 3D workspace
       USE wrk_nemo, ONLY: zuf => wrk_3d_1, zut => wrk_3d_2   ! 3D workspace
@@ -86,5 +86,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 1,2) .OR. .NOT. wrk_use(3, 1,2,3,4) ) THEN
+      IF( wrk_in_use(2, 1,2) .OR. wrk_in_use(3, 1,2,3,4) ) THEN
          CALL ctl_stop('dyn_ldf_bilap : requested workspace arrays unavailable')   ;   RETURN
       ENDIF
@@ -208,6 +208,6 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-      IF( .NOT. wrk_release(2, 1,2)      .OR.   &
-          .NOT. wrk_release(3, 1,2,3,4) )   CALL ctl_stop('dyn_ldf_bilap : failed to release workspace arrays')
+      IF( wrk_not_released(2, 1,2)      .OR.   &
+          wrk_not_released(3, 1,2,3,4) )   CALL ctl_stop('dyn_ldf_bilap : failed to release workspace arrays')
       !
    END SUBROUTINE dyn_ldf_bilap
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90	(revision 2633)
@@ -86,5 +86,5 @@
       !!              - save the trend in (zwk3,zwk4) ('key_trddyn')
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zwk1 => wrk_3d_1 , zwk2 => wrk_3d_2   ! 3D workspace
       USE oce     , ONLY:   zwk3 => ta       , zwk4 => sa         ! ta, sa used as 3D workspace   
@@ -95,5 +95,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(3, 1,2) ) THEN
+      IF( wrk_in_use(3, 1,2) ) THEN
          CALL ctl_stop('dyn_ldf_bilapg: requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -131,5 +131,5 @@
       END DO
       !
-      IF( .NOT. wrk_release(3, 1,2) )   CALL ctl_stop('dyn_ldf_bilapg: failed to release workspace arrays')
+      IF( wrk_not_released(3, 1,2) )   CALL ctl_stop('dyn_ldf_bilapg: failed to release workspace arrays')
       !
    END SUBROUTINE dyn_ldf_bilapg
@@ -177,5 +177,5 @@
       !!      'key_trddyn' defined: the trend is saved for diagnostics.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ziut => wrk_2d_1, zjuf => wrk_2d_2, zjvt => wrk_2d_3
       USE wrk_nemo, ONLY: zivf => wrk_2d_4, zdku => wrk_2d_5, zdk1u => wrk_2d_6
@@ -196,5 +196,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 1,2,3,4,5,6,7,8) ) THEN
+      IF( wrk_in_use(2, 1,2,3,4,5,6,7,8) ) THEN
          CALL ctl_stop('dyn:ldfguv : requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -454,5 +454,5 @@
       !                                                ! ===============
 
-      IF(.NOT. wrk_release(2, 1,2,3,4,5,6,7,8))THEN
+      IF(wrk_not_released(2, 1,2,3,4,5,6,7,8))THEN
          CALL ctl_stop('dyn:ldfguv : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90	(revision 2633)
@@ -106,5 +106,5 @@
       !!      of the rotated operator in dynzdf module
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   ziut  => wrk_2d_1 , zjuf  => wrk_2d_2 , zjvt => wrk_2d_3    ! 2D workspace
       USE wrk_nemo, ONLY:   zivf  => wrk_2d_4 , zdku  => wrk_2d_5 , zdkv => wrk_2d_6    ! 2D workspace
@@ -120,5 +120,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 1,2,3,4,5,6,7,8) ) THEN
+      IF( wrk_in_use(2, 1,2,3,4,5,6,7,8) ) THEN
          CALL ctl_stop('dyn_ldf_iso: requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -429,5 +429,5 @@
       !                                                ! ===============
 
-      IF( .NOT. wrk_release(2, 1,2,3,4,5,6,7,8))THEN
+      IF( wrk_not_released(2, 1,2,3,4,5,6,7,8))THEN
          CALL ctl_stop('dyn_ldf_iso: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 2633)
@@ -93,5 +93,5 @@
       USE oce, ONLY :   ze3u_f => ta   ! use ta as 3D workspace
       USE oce, ONLY :   ze3v_f => sa   ! use sa as 3D workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zs_t => wrk_2d_1, zs_u_1 => wrk_2d_2, &
                           zs_v_1 => wrk_2d_3
@@ -110,5 +110,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2,3))THEN
+      IF(wrk_in_use(2, 1,2,3))THEN
          CALL ctl_stop('dyn_nxt: requested workspace arrays unavailable.')
          RETURN
@@ -325,5 +325,5 @@
          &                       tab3d_2=vn, clinfo2=' Vn: '       , mask2=vmask )
       ! 
-      IF(.NOT. wrk_release(2, 1,2,3))THEN
+      IF(wrk_not_released(2, 1,2,3))THEN
          CALL ctl_stop('dyn_nxt: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 2633)
@@ -73,5 +73,5 @@
       !!        of the physical meaning of the results. 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztrdu => wrk_3d_4, ztrdv => wrk_3d_5
       !!
@@ -83,5 +83,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 4,5))THEN
+      IF(wrk_in_use(3, 4,5))THEN
          CALL ctl_stop('dyn_spg: requested workspace arrays unavailable.')
          RETURN
@@ -154,5 +154,5 @@
          &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      IF(.NOT. wrk_release(3, 4,5))THEN
+      IF(wrk_not_released(3, 4,5))THEN
          CALL ctl_stop('dyn_spg: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 2633)
@@ -111,5 +111,5 @@
       !! References : Griffies et al., (2003): A technical guide to MOM4. NOAA/GFDL
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zhdiv => wrk_2d_1, zsshb_e => wrk_2d_2
       USE wrk_nemo, ONLY: zbfru => wrk_2d_3  , zbfrv => wrk_2d_4 
@@ -132,5 +132,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2,  1, 2, 3, 4, 5, 6, 7, 8, 9,10,         &
+      IF(wrk_in_use(2,  1, 2, 3, 4, 5, 6, 7, 8, 9,10,         &
                           11,12,13,14,15,16,17,18,19,20,21 ) ) THEN
          CALL ctl_stop( 'dyn_spg_ts: requested workspace arrays unavailable.' )   ;   RETURN
@@ -569,5 +569,5 @@
       !
       !
-      IF(.NOT. wrk_release(2,  1, 2, 3, 4, 5, 6, 7, 8, 9,10,         &
+      IF(wrk_not_released(2,  1, 2, 3, 4, 5, 6, 7, 8, 9,10,         &
                               11,12,13,14,15,16,17,18,19,20,21))THEN
          CALL ctl_stop('dyn_spg_ts: failed to release workspace arrays.')
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 2633)
@@ -204,5 +204,5 @@
       !! References : Sadourny, r., 1975, j. atmos. sciences, 32, 680-689.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zwx => wrk_2d_1, zwy => wrk_2d_2, zwz => wrk_2d_3
       !!
@@ -218,5 +218,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2,3))THEN
+      IF(wrk_in_use(2, 1,2,3))THEN
          CALL ctl_stop('dyn:vor_ene: requested workspace arrays unavailable.')
          RETURN
@@ -286,5 +286,5 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-      IF(.NOT. wrk_release(2, 1,2,3))THEN
+      IF(wrk_not_released(2, 1,2,3))THEN
          CALL ctl_stop('dyn:vor_ene: failed to release workspace arrays.')
       END IF
@@ -324,5 +324,5 @@
       !! References : Sadourny, r., 1975, j. atmos. sciences, 32, 680-689.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zwx => wrk_2d_4, zwy => wrk_2d_5, &
                           zwz => wrk_2d_6, zww => wrk_2d_7
@@ -335,5 +335,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 4,5,6,7))THEN
+      IF(wrk_in_use(2, 4,5,6,7))THEN
          CALL ctl_stop('dyn:vor_mix: requested workspace arrays unavailable.')
          RETURN
@@ -410,5 +410,5 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-      IF(.NOT. wrk_release(2, 4,5,6,7))THEN
+      IF(wrk_not_released(2, 4,5,6,7))THEN
          CALL ctl_stop('dyn:vor_mix: failed to release workspace arrays.')
       END IF
@@ -443,5 +443,5 @@
       !! References : Sadourny, r., 1975, j. atmos. sciences, 32, 680-689.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zwx => wrk_2d_4, zwy => wrk_2d_5, zwz => wrk_2d_6
       !!
@@ -456,5 +456,5 @@
       !!----------------------------------------------------------------------
       
-      IF(.NOT. wrk_use(2, 4,5,6))THEN
+      IF(wrk_in_use(2, 4,5,6))THEN
          CALL ctl_stop('dyn:vor_ens : requested workspace arrays unavailable.')
          RETURN
@@ -532,5 +532,5 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-      IF(.NOT. wrk_release(2, 4,5,6))THEN
+      IF(wrk_not_released(2, 4,5,6))THEN
          CALL ctl_stop('dyn:vor_ens : failed to release workspace arrays.')
       END IF
@@ -558,5 +558,5 @@
       !! References : Arakawa and Lamb 1980, Mon. Wea. Rev., 109, 18-36
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zwx  => wrk_2d_1 , zwy  => wrk_2d_2 ,  zwz => wrk_2d_3 
       USE wrk_nemo, ONLY:   ztnw => wrk_2d_4 , ztne => wrk_2d_5 
@@ -580,5 +580,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2,3,4,5,6,7) .AND. .NOT. wrk_use(3, 1) ) THEN
+      IF(wrk_in_use(2, 1,2,3,4,5,6,7) .OR. wrk_in_use(3, 1) ) THEN
          CALL ctl_stop('dyn:vor_een : requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -681,6 +681,6 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-      IF(.NOT. wrk_release(2, 1,2,3,4,5,6,7) .AND.   &
-         .NOT. wrk_release(3, 1)  )   CALL ctl_stop('dyn:vor_een : failed to release workspace arrays')
+      IF(wrk_not_released(2, 1,2,3,4,5,6,7) .OR.   &
+         wrk_not_released(3, 1)  )   CALL ctl_stop('dyn:vor_een : failed to release workspace arrays')
       !
    END SUBROUTINE vor_een
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 2633)
@@ -56,5 +56,5 @@
       USE oce, ONLY:   zwuw => ta   ! use ta as 3D workspace
       USE oce, ONLY:   zwvw => sa   ! use sa as 3D workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zww => wrk_2d_1
       USE wrk_nemo, ONLY: ztrdu => wrk_3d_1, ztrdv => wrk_3d_2
@@ -66,6 +66,6 @@
       !!----------------------------------------------------------------------
       
-      IF( (.NOT. wrk_use(2, 1))  .OR.    &
-          (.NOT. wrk_use(3, 1,2)) )THEN
+      IF( wrk_in_use(2, 1)  .OR.    &
+          wrk_in_use(3, 1,2) )THEN
          CALL ctl_stop('dyn_zad: requested workspace arrays unavailable.')
          RETURN
@@ -126,6 +126,6 @@
          &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      IF( (.NOT. wrk_release(2, 1))  .OR.    &
-          (.NOT. wrk_release(3, 1,2)) )THEN
+      IF( wrk_not_released(2, 1)  .OR.    &
+          wrk_not_released(3, 1,2) )THEN
          CALL ctl_stop('dyn_zad: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 2633)
@@ -52,5 +52,5 @@
       !! ** Purpose :   compute the vertical ocean dynamics physics.
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztrdu => wrk_3d_1, ztrdv => wrk_3d_2
       !!
@@ -58,5 +58,5 @@
       !!---------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1,2))THEN
+      IF(wrk_in_use(3, 1,2))THEN
          CALL ctl_stop('dyn_zdf: requested workspace arrays unavailable.')
          RETURN
@@ -95,5 +95,5 @@
             &                    tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      IF(.NOT. wrk_release(3, 1,2))THEN
+      IF(wrk_not_released(3, 1,2))THEN
          CALL ctl_stop('dyn_zdf: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 2633)
@@ -52,7 +52,7 @@
       !! ** Action : - Update (ua,va) with the vertical diffusive trend
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE oce     , ONLY :  zwx => ta       , zwy => sa         ! (ta,sa) used as 3D workspace
-      USE wrk_nemo, ONLY:   zwz => wrk_3d_1 , zww => wrk_3d_1   ! 3D workspace
+      USE wrk_nemo, ONLY:   zwz => wrk_3d_1 , zww => wrk_3d_2   ! 3D workspace
       !
       INTEGER , INTENT(in) ::   kt     ! ocean time-step index
@@ -62,4 +62,9 @@
       REAL(wp) ::   zrau0r, zlavmr, zua, zva                 ! temporary scalars
       !!----------------------------------------------------------------------
+
+      IF( wrk_in_use(3, 1,2) )THEN
+         CALL ctl_stop('dyn_zdf_exp : requested workspace arrays unavailable.')
+         RETURN
+      END IF
 
       IF( kt == nit000 .AND. lwp ) THEN
@@ -114,4 +119,8 @@
       END DO                           ! End of time splitting
       !
+      IF( wrk_not_released(3, 1,2) )THEN
+         CALL ctl_stop('dyn_zdf_exp : failed to release workspace arrays.')
+      END IF
+      !
    END SUBROUTINE dyn_zdf_exp
 
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 2633)
@@ -56,5 +56,5 @@
       USE oce, ONLY :  zwd   => ta      ! use ta as workspace
       USE oce, ONLY :  zws   => sa      ! use sa as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zwi => wrk_3d_3 ! workspace
       !!
@@ -67,5 +67,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 3))THEN
+      IF(wrk_in_use(3, 3))THEN
          CALL ctl_stop('dyn_zdf_imp : requested workspace array unavailable.')
          RETURN
@@ -259,5 +259,5 @@
       END DO
       !
-      IF(.NOT. wrk_release(3, 3))THEN
+      IF(wrk_not_released(3, 3))THEN
          CALL ctl_stop('dyn_zdf_imp : failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 2633)
@@ -76,5 +76,5 @@
       !!----------------------------------------------------------------------
       USE oce, ONLY :   z3d => ta   ! use ta as 3D workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zhdiv => wrk_2d_1, z2d => wrk_2d_2
       !!
@@ -86,5 +86,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2))THEN
+      IF(wrk_in_use(2, 1,2))THEN
          CALL ctl_stop('ssh_wzv: requested workspace arrays unavailable.')
          RETURN
@@ -244,5 +244,5 @@
       IF(ln_ctl)   CALL prt_ctl( tab2d_1=ssha, clinfo1=' ssha  - : ', mask1=tmask, ovlap=1 )
       !
-      IF(.NOT. wrk_release(2, 1,2))THEN
+      IF(wrk_not_released(2, 1,2))THEN
          CALL ctl_stop('ssh_wzv: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90	(revision 2633)
@@ -78,5 +78,5 @@
       !!   9.0  !  05-07  (C. Talandier) original code
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztab2d_1 => wrk_2d_1, ztab2d_2 => wrk_2d_2
       USE wrk_nemo, ONLY:   zmask1 => wrk_3d_1,   zmask2 => wrk_3d_2, &
@@ -101,5 +101,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(2, 1,2)) .OR. (.NOT. wrk_use(3, 1,2,3,4)) )THEN
+      IF( wrk_in_use(2, 1,2) .OR. wrk_in_use(3, 1,2,3,4) )THEN
          CALL ctl_stop('prt_ctl : requested workspace arrays unavailable.')
          RETURN
@@ -213,5 +213,5 @@
       ENDDO
 
-      IF( (.NOT. wrk_release(2, 1,2)) .OR. (.NOT. wrk_release(3, 1,2,3,4)) )THEN
+      IF( wrk_not_released(2, 1,2) .OR. wrk_not_released(3, 1,2,3,4) )THEN
          CALL ctl_stop('prt_ctl : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 2633)
@@ -1726,5 +1726,5 @@
       !!
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   ztab => wrk_2d_1
       !
@@ -1746,5 +1746,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1) ) THEN
+      IF(wrk_in_use(2, 1) ) THEN
          WRITE(kumout, cform_err)
          WRITE(kumout,*) 'mppobc : requested workspace array unavailable'
@@ -1901,5 +1901,5 @@
       END DO
       !
-      IF(.NOT. wrk_release(2, 1) ) THEN
+      IF(wrk_not_released(2, 1) ) THEN
          WRITE(kumout, cform_err)
          WRITE(kumout,*) 'mppobc : failed to release workspace array'
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c2d.h90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c2d.h90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c2d.h90	(revision 2633)
@@ -145,5 +145,5 @@
       !! * Modules used
       USE ldftra_oce, ONLY : aht0
-      USE wrk_nemo, ONLY: iwrk_use, iwrk_release
+      USE wrk_nemo, ONLY: iwrk_in_use, iwrk_not_released
       USE wrk_nemo, ONLY: icof => iwrk_2d_1
       !! * Arguments
@@ -162,5 +162,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. iwrk_use(2, 1))THEN
+      IF( iwrk_in_use(2, 1) )THEN
          CALL ctl_stop('ldf_dyn_c2d_orca: ERROR: requested workspace array is unavailable.')
          RETURN
@@ -293,5 +293,5 @@
       ENDIF
 
-      IF(.not. iwrk_release(2, 1))THEN
+      IF( iwrk_not_released(2, 1) )THEN
          CALL ctl_stop('ldf_dyn_c2d_orca: ERROR: failed to release workspace array.')
       END IF
@@ -316,5 +316,5 @@
       !! * Modules used
       USE ldftra_oce, ONLY : aht0
-      USE wrk_nemo, ONLY: iwrk_use, iwrk_release
+      USE wrk_nemo, ONLY: iwrk_in_use, iwrk_not_released
       USE wrk_nemo, ONLY: icof => iwrk_2d_1
 
@@ -334,5 +334,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. iwrk_use(2, 1))THEN
+      IF( iwrk_in_use(2, 1) )THEN
          CALL ctl_stop('ldf_dyn_c2d_orca_R1: ERROR: requested workspace array is unavailable.')
          RETURN
@@ -472,5 +472,5 @@
       ENDIF
 
-      IF(.not. iwrk_release(2, 1))THEN
+      IF( iwrk_not_released(2, 1) )THEN
          CALL ctl_stop('ldf_dyn_c2d_orca_R1: ERROR: failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90	(revision 2633)
@@ -27,5 +27,5 @@
       !!----------------------------------------------------------------------
       USE ldftra_oce, ONLY : aht0
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zcoef => wrk_1d_2
       !!
@@ -44,5 +44,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(1,2))THEN
+      IF(wrk_in_use(1,2))THEN
          CALL ctl_stop('ldf_dyn_c3d: ERROR: requested workspace array unavailable.')
          RETURN
@@ -188,5 +188,5 @@
       ENDIF
 
-      IF(.not. wrk_release(1,2))THEN
+      IF(wrk_not_released(1,2))THEN
          CALL ctl_stop('ldf_dyn_c3d: ERROR: failed to release workspace array.')
       END IF
@@ -204,5 +204,5 @@
       !!----------------------------------------------------------------------
       USE ldftra_oce, ONLY : aht0
-      USE wrk_nemo, ONLY: wrk_use, wrk_release, iwrk_use, iwrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, iwrk_in_use, iwrk_not_released
       USE wrk_nemo, ONLY:  icof => iwrk_2d_1
       USE wrk_nemo, ONLY: zahm0 =>  wrk_2d_1
@@ -225,6 +225,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.not. iwrk_use(2,1)) .OR. (.not. wrk_use(2,1)) .OR. &
-          (.not. wrk_use(1,1)))THEN
+      IF( iwrk_in_use(2,1) .OR. wrk_in_use(2,1) .OR. wrk_in_use(1,1) )THEN
          CALL ctl_stop('ldf_dyn_c3d_orca: ERROR: requested workspace arrays are unavailable.')
          RETURN
@@ -474,6 +473,6 @@
       ENDIF
 
-      IF( (.not. iwrk_release(2,1)) .OR. (.not. wrk_release(2,1)) .OR. &
-          (.not. wrk_release(1,1)))THEN
+      IF( iwrk_not_released(2,1) .OR. wrk_not_released(2,1) .OR. &
+           wrk_not_released(1,1) )THEN
          CALL ctl_stop('ldf_dyn_c3d_orca: ERROR: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfeiv.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfeiv.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfeiv.F90	(revision 2633)
@@ -53,5 +53,5 @@
       !!             - wslpi, wslpj : i- and j-slopes of neutral surfaces at w-points. 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zn  => wrk_2d_1, zah   => wrk_2d_2, &
                           zhw => wrk_2d_3, zross => wrk_2d_4
@@ -63,5 +63,5 @@
       !!----------------------------------------------------------------------
       
-      IF(.not. wrk_use(2, 1,2,3,4))THEN
+      IF(wrk_in_use(2, 1,2,3,4))THEN
          CALL ctl_stop('ldf_eiv: ERROR: requested workspace arrays are unavailable.')
          RETURN
@@ -244,5 +244,5 @@
       CALL iom_put( "aht2d_eiv", aeiw )   ! EIV lateral eddy diffusivity
       !  
-      IF(.not. wrk_release(2, 1,2,3,4))THEN
+      IF(wrk_not_released(2, 1,2,3,4))THEN
          CALL ctl_stop('ldf_eiv: ERROR: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 2633)
@@ -119,5 +119,5 @@
       USE oce , zww   => ta   ! use ta as workspace
       USE oce , zwz   => sa   ! use sa as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zdzr => wrk_3d_1
       !!
@@ -135,5 +135,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1) ) THEN
+      IF(wrk_in_use(3, 1) ) THEN
          CALL ctl_stop('ldf_slp: requested workspace arrays are unavailable')   ;   RETURN
       END IF
@@ -382,5 +382,5 @@
       ENDIF
       !
-      IF(.not. wrk_release(3, 1))THEN
+      IF(wrk_not_released(3, 1))THEN
          CALL ctl_stop('ldf_slp: ERROR: failed to release workspace arrays.')
       END IF
@@ -407,5 +407,5 @@
       USE oce,   zdjt  => ta   ! use ta as workspace
       USE oce,   zdjs  => sa   ! use sa as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zdkt   => wrk_3d_2, zdks  => wrk_3d_3, &
                           zalpha => wrk_3d_4, zbeta => wrk_3d_5    ! alpha, beta at T points, at depth fsgdept
@@ -423,5 +423,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.not. wrk_use(3, 2,3,4,5)) .OR. (.not. wrk_use(2, 1)) )THEN
+      IF( (wrk_in_use(3, 2,3,4,5)) .OR. (wrk_in_use(2, 1)) )THEN
          CALL ctl_stop('ldf_slp_grif: ERROR: requested workspace arrays are unavailable.')   ;   RETURN
       END IF
@@ -607,6 +607,6 @@
       CALL lbc_lnk( wslp2, 'W', 1. )      ! lateral boundary confition on wslp2 only   ==>>> gm : necessary ? to be checked
       !
-      IF(.NOT. wrk_release(3, 2,3,4,5) .OR.   &
-         .NOT. wrk_release(2, 1)        )   CALL ctl_stop('ldf_slp_grif: ERROR: failed to release workspace arrays.')
+      IF(wrk_not_released(3, 2,3,4,5) .OR.   &
+         wrk_not_released(2, 1)        )   CALL ctl_stop('ldf_slp_grif: ERROR: failed to release workspace arrays.')
       !
    END SUBROUTINE ldf_slp_grif
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 2633)
@@ -1026,5 +1026,5 @@
          & frld
 #endif
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
 #if ! defined key_ice_lim
       USE wrk_nemo, ONLY: frld => wrk_2d_1
@@ -1045,5 +1045,5 @@
  
 #if ! defined key_ice_lim
-      IF(.NOT. wrk_use(2, 1))THEN
+      IF(wrk_in_use(2, 1))THEN
          CALL ctl_stop('dia_obs : requested workspace array unavailable.')
          RETURN
@@ -1129,5 +1129,5 @@
 
 #if ! defined key_ice_lim
-      IF(.NOT. wrk_release(2, 1))THEN
+      IF(wrk_not_released(2, 1))THEN
          CALL ctl_stop('dia_obs : failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90	(revision 2633)
@@ -105,5 +105,5 @@
       !!        !  08-02  (K. Mogensen)  Original code
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: wrk_3d_1
       !!
@@ -128,5 +128,5 @@
 
       ! Check workspace array and set-up pointer
-      IF(.NOT. wrk_use(3, 1))THEN
+      IF(wrk_in_use(3, 1))THEN
          CALL ctl_stop('obs_int_comm_2d : requested workspace array unavailable.')
          RETURN
@@ -156,5 +156,5 @@
 
       ! 'Release' workspace array back to pool
-      IF(.NOT. wrk_release(3, 1))THEN
+      IF(wrk_not_released(3, 1))THEN
          CALL ctl_stop('obs_int_comm_2d : failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_altbias.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_altbias.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_altbias.F90	(revision 2633)
@@ -67,5 +67,5 @@
       !! * Modules used
       USE iom
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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
       !
@@ -109,5 +109,5 @@
       INTEGER :: numaltbias
 
-      IF(.NOT. wrk_use(2, 1))THEN
+      IF(wrk_in_use(2, 1))THEN
          CALL ctl_stop('obs_rea_altbias : requested workspace array unavailable.')
          RETURN
@@ -211,5 +211,5 @@
       END DO
 
-      IF(.NOT. wrk_release(2, 1))THEN
+      IF(wrk_not_released(2, 1))THEN
          CALL ctl_stop('obs_rea_altbias : failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90	(revision 2633)
@@ -81,5 +81,5 @@
       !! * Modules used
       USE iom
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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
                         mdtmask => wrk_2d_2    ! Array to store the mask for the MDT
@@ -131,5 +131,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2))THEN
+      IF(wrk_in_use(2, 1,2))THEN
          CALL ctl_stop('obs_rea_mdt : requested workspace array unavailable.')
          RETURN
@@ -240,5 +240,5 @@
       END DO
 
-      IF(.NOT. wrk_release(2, 1,2))THEN
+      IF(wrk_not_released(2, 1,2))THEN
          CALL ctl_stop('obs_rea_mdt : failed to release workspace arrays.')
       END IF
@@ -266,5 +266,5 @@
       !!----------------------------------------------------------------------
       !! * Modules used
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zpromsk => wrk_2d_3
       !!
@@ -288,5 +288,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 3))THEN
+      IF(wrk_in_use(2, 3))THEN
          CALL ctl_stop('obs_offset_mdt : requested workspace array unavailable.')
          RETURN
@@ -358,5 +358,5 @@
 
 
-      IF(.NOT. wrk_release(2, 3))THEN
+      IF(wrk_not_released(2, 3))THEN
          CALL ctl_stop('obs_offset_mdt : failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_rot_vel.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_rot_vel.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBS/obs_rot_vel.F90	(revision 2633)
@@ -55,5 +55,5 @@
       !!----------------------------------------------------------------------
       !! * Modules used
-      USE wrk_nemo, ONLY: wrk_use, wrk_release   
+      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
@@ -93,5 +93,5 @@
       INTEGER :: jk
 
-      IF(.NOT. wrk_use(2, 1,2,3,4))THEN
+      IF(wrk_in_use(2, 1,2,3,4))THEN
          CALL ctl_stop('obs_rotvel : requested workspace arrays unavailable.')
          RETURN
@@ -229,5 +229,5 @@
          & )
 
-      IF(.NOT. wrk_release(2, 1,2,3,4))THEN
+      IF(wrk_not_released(2, 1,2,3,4))THEN
          CALL ctl_stop('obs_rotvel : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90	(revision 2633)
@@ -64,5 +64,5 @@
       !! References :   Shine and Hendersson-Sellers 1985, JGR, 90(D1), 2243-2250.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release, llwrk_use, llwrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, llwrk_in_use, llwrk_not_released
       USE wrk_nemo, ONLY: wrk_3d_6, wrk_3d_7    ! 3D workspace
       !!
@@ -90,5 +90,5 @@
       ijpl = SIZE( pt_ice, 3 )                     ! number of ice categories
 
-      IF( (.not. llwrk_use(3,1)) .OR. (.not. wrk_use(3, 6,7)) ) THEN
+      IF( llwrk_in_use(3,1) .OR. wrk_in_use(3, 6,7) ) THEN
          CALL ctl_stop('albedo_ice: requested workspace arrays are unavailable')   ;   RETURN
       ENDIF
@@ -172,5 +172,5 @@
       pa_ice_os(:,:,:) = pa_ice_cs(:,:,:) + rn_cloud       ! Oberhuber correction
       !
-      IF( .not. wrk_release(3, 6,7) )   CALL ctl_stop('albedo_ice: failed to release workspace arrays')
+      IF( wrk_not_released(3, 6,7) )   CALL ctl_stop('albedo_ice: failed to release workspace arrays')
       !
    END SUBROUTINE albedo_ice
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis4.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis4.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis4.F90	(revision 2633)
@@ -110,5 +110,5 @@
       !! ** Method  :   OASIS4 MPI communication 
       !!--------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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
@@ -146,5 +146,5 @@
       !!--------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(3, 1,2) .OR. .NOT. wrk_use(2, 1,2) )THEN
+      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
@@ -321,6 +321,6 @@
       IF ( nerror /= PRISM_Success )   CALL prism_abort ( ncomp_id, 'cpl_prism_define', 'Failure in prism_enddef')
       
-      IF( .not. wrk_release(3, 1,2) .OR.   &
-          .not. wrk_release(2, 1,2)   )   CALL ctl_stop('cpl_prism_define: failed to release workspace arrays')
+      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')
       !
    END SUBROUTINE cpl_prism_define
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 2633)
@@ -587,5 +587,5 @@
       !! ** Purpose :   Vector fields may need to be rotated onto the local grid direction
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: utmp => wrk_2d_4, vtmp => wrk_2d_5      ! 2D workspace
       !!
@@ -600,5 +600,5 @@
       !!---------------------------------------------------------------------
 
-      IF(.not. wrk_use(2, 4,5) ) THEN
+      IF(wrk_in_use(2, 4,5) ) THEN
          CALL ctl_stop('fld_rot: ERROR: requested workspace arrays are unavailable.')   ;   RETURN
       END IF
@@ -637,5 +637,5 @@
        END DO
       !
-      IF(.not. wrk_release(2, 4,5) )    CALL ctl_stop('fld_rot: ERROR: failed to release workspace arrays.')
+      IF(wrk_not_released(2, 4,5) )    CALL ctl_stop('fld_rot: ERROR: failed to release workspace arrays.')
       !
    END SUBROUTINE fld_rot
@@ -804,5 +804,5 @@
       !!                file, restructuring as required
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release, iwrk_use, iwrk_release
+      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
       USE wrk_nemo, ONLY: data_src => iwrk_2d_1
@@ -820,5 +820,5 @@
       !!----------------------------------------------------------------------
       !
-      IF(  .NOT. wrk_use(2, 1)  .OR.  .NOT. iwrk_use(2,1)  ) THEN
+      IF(  wrk_in_use(2, 1)  .OR.  iwrk_in_use(2,1) ) THEN
          CALL ctl_stop('fld_weights: requested workspace arrays are unavailable.')   ;   RETURN
       END IF
@@ -934,6 +934,6 @@
       ENDIF
 
-      IF( .NOT. wrk_release(2, 1) .OR.    &
-          .NOT.iwrk_release(2, 1)   )   CALL ctl_stop('fld_weights: failed to release workspace arrays')
+      IF( wrk_not_released(2, 1) .OR.    &
+          iwrk_not_released(2, 1)   )   CALL ctl_stop('fld_weights: failed to release workspace arrays')
       !
    END SUBROUTINE fld_weight
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 2633)
@@ -210,5 +210,5 @@
       !!  ** Nota    :   sf has to be a dummy argument for AGRIF on NEC
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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
@@ -232,5 +232,5 @@
       !!---------------------------------------------------------------------
 
-      IF(.not. wrk_use(3, 1,2,3))THEN
+      IF(wrk_in_use(3, 1,2,3))THEN
          CALL ctl_stop('blk_oce_clio: requested workspace arrays are unavailable.')
          RETURN
@@ -386,5 +386,5 @@
       ENDIF
 
-      IF(.not. wrk_release(3, 1,2,3))THEN
+      IF(wrk_not_released(3, 1,2,3))THEN
          CALL ctl_stop('blk_oce_clio: failed to release workspace arrays.')
       END IF
@@ -420,5 +420,5 @@
       !!
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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
@@ -457,5 +457,5 @@
       !!---------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(2, 1,2,3,4)) .OR. (.NOT. wrk_use(3, 1,2)) )THEN
+      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
@@ -637,5 +637,5 @@
       ENDIF
 
-      IF( (.NOT. wrk_release(2, 1,2,3,4)) .OR. (.NOT. wrk_release(3, 1,2)) )THEN
+      IF( (wrk_not_released(2, 1,2,3,4)) .OR. (wrk_not_released(3, 1,2)) )THEN
          CALL ctl_stop('blk_ice_clio: failed to release workspace arrays.')
       END IF
@@ -654,5 +654,5 @@
       !!               - also initialise sbudyko and stauc once for all 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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 
@@ -679,5 +679,5 @@
       !!---------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2,3,4,5,6))THEN
+      IF(wrk_in_use(2, 1,2,3,4,5,6))THEN
          CALL ctl_stop('blk_clio_qsr_oce: requested workspace arrays unavailable.')
          RETURN
@@ -796,5 +796,5 @@
       END DO
 
-      IF(.NOT. wrk_release(2, 1,2,3,4,5,6))THEN
+      IF(wrk_not_released(2, 1,2,3,4,5,6))THEN
          CALL ctl_stop('blk_clio_qsr_oce: failed to release workspace arrays.')
       END IF
@@ -813,5 +813,5 @@
       !!               - also initialise sbudyko and stauc once for all 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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
@@ -839,5 +839,5 @@
       !!---------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2,3,4,5,6))THEN
+      IF(wrk_in_use(2, 1,2,3,4,5,6))THEN
          CALL ctl_stop('blk_clio_qsr_ice: requested workspace arrays unavailable.')
          RETURN
@@ -945,5 +945,5 @@
       END DO
       !
-      IF(.NOT. wrk_release(2, 1,2,3,4,5,6))THEN
+      IF(wrk_not_released(2, 1,2,3,4,5,6))THEN
          CALL ctl_stop('blk_clio_qsr_ice: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 2633)
@@ -208,5 +208,5 @@
       !!  ** Nota  :   sf has to be a dummy argument for AGRIF on NEC
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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
@@ -230,5 +230,5 @@
       !!---------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2,3,4,5,6,7,8,9,10,11,12,13))THEN
+      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
@@ -383,5 +383,5 @@
       ENDIF
       !
-      IF(.NOT. wrk_release(2, 1,2,3,4,5,6,7,8,9,10,11,12,13))THEN
+      IF(wrk_not_released(2, 1,2,3,4,5,6,7,8,9,10,11,12,13))THEN
          CALL ctl_stop('blk_oce_core: failed to release workspace arrays.')
       END IF
@@ -407,5 +407,5 @@
       !! caution : the net upward water flux has with mm/day unit
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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
@@ -447,5 +447,5 @@
 
       ! Set-up access to workspace arrays
-      IF( (.NOT. wrk_use(2, 1)) .OR. (.NOT. wrk_use(3, 4,5,6,7)) )THEN
+      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
@@ -608,5 +608,5 @@
       ENDIF
 
-      IF( (.NOT. wrk_release(2, 1)) .OR. (.NOT. wrk_release(3, 4,5,6,7)) )THEN
+      IF( wrk_not_released(2, 1) .OR. wrk_not_released(3, 4,5,6,7) )THEN
          CALL ctl_stop('blk_ice_core: failed to release workspace arrays.')
       END IF
@@ -635,5 +635,5 @@
       !!   9.0  !  05-08  (L. Brodeau) Rewriting and optimization
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release, iwrk_use, iwrk_release
+      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]
@@ -675,9 +675,9 @@
       !!----------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(2, 14,15,16,17,18,       &
-                         19,20,21,22,23,24,       &
-                         25,26,27,28,29,30,       &
-                         31,32))             .OR. &
-          (.NOT. iwrk_use(2, 1)) )THEN
+      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
@@ -743,9 +743,9 @@
       END DO
       !!
-      IF( (.NOT. wrk_release(2, 14,15,16,17,18,       &
-                             19,20,21,22,23,24,       &
-                             25,26,27,28,29,30,       &
-                             31,32))             .OR. &
-          (.NOT. iwrk_release(2, 1)) )THEN
+      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) )THEN
          CALL ctl_stop('TURB_CORE_1Z: failed to release workspace arrays.')
       END IF
@@ -772,5 +772,5 @@
       !!   9.0  !  06-12  (L. Brodeau) Original code for 2Z
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release, iwrk_use, iwrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, iwrk_in_use, iwrk_not_released
       USE wrk_nemo, ONLY: dU10 => wrk_2d_1        ! dU                             [m/s]
       USE wrk_nemo, ONLY: dT => wrk_2d_2          ! air/sea temperature difference   [K]
@@ -816,6 +816,6 @@
       !!  * Start
 
-      IF( (.NOT. wrk_use(2, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21)) .OR. &
-          (.NOT. iwrk_use(2, 1)) )THEN
+      IF( wrk_in_use(2, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21) .OR. &
+          iwrk_in_use(2, 1) )THEN
          CALL ctl_stop('TURB_CORE_2Z: requested workspace arrays unavailable.')
          RETURN
@@ -895,6 +895,6 @@
       END DO
       !!
-      IF( (.NOT. wrk_release(2, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21)) .OR. &
-          (.NOT. iwrk_release(2, 1)) )THEN
+      IF( wrk_not_released(2, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21) .OR. &
+          iwrk_not_released(2, 1) )THEN
          CALL ctl_stop('TURB_CORE_2Z: requested workspace arrays unavailable.')
       END IF
@@ -905,5 +905,5 @@
     FUNCTION psi_m(zta)   !! Psis, L & Y eq. (8c), (8d), (8e)
       !-------------------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:     X2 => wrk_2d_33
       USE wrk_nemo, ONLY:     X  => wrk_2d_34
@@ -916,5 +916,5 @@
       !-------------------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 33,34,35))THEN
+      IF(wrk_in_use(2, 33,34,35))THEN
          CALL ctl_stop('psi_m: requested workspace arrays unavailable.')
          RETURN
@@ -926,5 +926,5 @@
            & + (1. - stabit)*(2*log((1. + X)/2) + log((1. + X2)/2) - 2*atan(X) + pi/2)  ! Unstable 
 
-      IF(.NOT. wrk_release(2, 33,34,35))THEN
+      IF(wrk_not_released(2, 33,34,35))THEN
          CALL ctl_stop('psi_m: failed to release workspace arrays.')
          RETURN
@@ -936,5 +936,5 @@
     FUNCTION psi_h(zta)    !! Psis, L & Y eq. (8c), (8d), (8e)
       !-------------------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:     X2 => wrk_2d_33
       USE wrk_nemo, ONLY:     X  => wrk_2d_34
@@ -946,5 +946,5 @@
       !-------------------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 33,34,35))THEN
+      IF(wrk_in_use(2, 33,34,35))THEN
          CALL ctl_stop('psi_h: requested workspace arrays unavailable.')
          RETURN
@@ -956,5 +956,5 @@
            & + (1. - stabit)*(2.*log( (1. + X2)/2. ))                 ! Unstable
 
-      IF(.NOT. wrk_release(2, 33,34,35))THEN
+      IF(wrk_not_released(2, 33,34,35))THEN
          CALL ctl_stop('psi_h: failed to release workspace arrays.')
          RETURN
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 2633)
@@ -206,5 +206,5 @@
       !!              * initialise the OASIS coupler
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zacs => wrk_2d_1, zaos => wrk_2d_2 ! clear & overcast sky albedos
       !!
@@ -223,5 +223,5 @@
       !!---------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2,1,2) ) THEN
+      IF(wrk_in_use(2,1,2) ) THEN
          CALL ctl_stop('sbc_cpl_init: requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -563,5 +563,5 @@
          &   CALL ctl_stop( 'sbc_cpl_init: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' )
 
-      IF(.not. wrk_release(2,1,2))THEN
+      IF(wrk_not_released(2,1,2))THEN
          CALL ctl_stop('sbc_cpl_init: failed to release workspace arrays.')
       END IF
@@ -612,5 +612,5 @@
       !!                        emp = emps   evap. - precip. (- runoffs) (- calving) ('ocean only case)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztx => wrk_2d_1, zty => wrk_2d_2
       !!
@@ -629,5 +629,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(2, 1,2))THEN
+      IF(wrk_in_use(2, 1,2))THEN
          CALL ctl_stop('sbc_cpl_rcv: requested workspace arrays unavailable.')
          RETURN
@@ -820,5 +820,5 @@
       ENDIF
       !
-      IF(.not. wrk_release(2, 1,2))THEN
+      IF(wrk_not_released(2, 1,2))THEN
          CALL ctl_stop('sbc_cpl_rcv: failed to release workspace arrays.')
       END IF
@@ -860,5 +860,5 @@
       !! ** Action  :   return ptau_i, ptau_j, the stress over the ice at cp_ice_msh point
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztx => wrk_2d_1, zty => wrk_2d_2
       !!
@@ -870,5 +870,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(2,1,2))THEN
+      IF(wrk_in_use(2,1,2))THEN
          CALL ctl_stop('sbc_cpl_ice_tau: requested workspace arrays unavailable.')
          RETURN
@@ -1041,5 +1041,5 @@
       ENDIF
       !   
-      IF(.not. wrk_release(2,1,2))THEN
+      IF(wrk_not_released(2,1,2))THEN
          CALL ctl_stop('sbc_cpl_ice_tau: failed to release workspace arrays.')
       END IF
@@ -1093,5 +1093,5 @@
       !!                   sprecip             solid precipitation over the ocean  
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zcptn => wrk_2d_1  ! rcp * tn(:,:,1)
       USE wrk_nemo, ONLY: ztmp  => wrk_2d_2  ! temporary array
@@ -1118,5 +1118,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.not. wrk_use(2,1,2,3)) .OR. (.not. wrk_use(3,1)) )THEN
+      IF( wrk_in_use(2,1,2,3) .OR. wrk_in_use(3,1) )THEN
          CALL ctl_stop('sbc_cpl_ice_flx: requested workspace arrays unavailable.')
          RETURN
@@ -1240,5 +1240,5 @@
       END SELECT
 
-      IF( (.not. wrk_release(2,1,2,3)) .OR. (.not. wrk_release(3,1)) )THEN
+      IF( wrk_not_released(2,1,2,3) .OR. wrk_not_released(3,1) )THEN
          CALL ctl_stop('sbc_cpl_ice_flx: failed to release workspace arrays.')
       END IF
@@ -1256,5 +1256,5 @@
       !!              all the needed fields (as defined in sbc_cpl_init)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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
@@ -1268,5 +1268,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2,3,4,5,6,7,8,9))THEN
+      IF(wrk_in_use(2, 1,2,3,4,5,6,7,8,9))THEN
          CALL ctl_stop('sbc_cpl_snd: requested workspace arrays are unavailable.');
          RETURN
@@ -1445,5 +1445,5 @@
       ENDIF
    !
-      IF(.NOT. wrk_release(2, 1,2,3,4,5,6,7,8,9))THEN
+      IF(wrk_not_released(2, 1,2,3,4,5,6,7,8,9))THEN
          CALL ctl_stop('sbc_cpl_snd: failed to release workspace arrays.');
          RETURN
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 2633)
@@ -58,5 +58,5 @@
       !!                   & spread out over erp area depending its sign
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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
@@ -73,5 +73,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( .NOT. wrk_use(2, 1,2,3,4,5) ) THEN
+      IF( wrk_in_use(2, 1,2,3,4,5) ) THEN
          CALL ctl_stop('sbc_fwb: requested workspace arrays are unavailable')   ;   RETURN
       END IF
@@ -196,5 +196,5 @@
       END SELECT
       !
-      IF( .NOT. wrk_release(2, 1,2,3,4,5) )   CALL ctl_stop('sbc_fwb: failed to release workspace arrays')
+      IF( wrk_not_released(2, 1,2,3,4,5) )   CALL ctl_stop('sbc_fwb: failed to release workspace arrays')
       !
    END SUBROUTINE sbc_fwb
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 2633)
@@ -89,5 +89,5 @@
       !!                utau, vtau, taum, wndm, qns , qsr, emp , emps
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zalb_ice_os => wrk_3d_1 ! albedo of the ice under overcast sky
       USE wrk_nemo, ONLY: zalb_ice_cs => wrk_3d_2 ! albedo of ice under clear sky
@@ -100,5 +100,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(3, 1,2) ) THEN
+      IF( wrk_in_use(3, 1,2) ) THEN
          CALL ctl_stop( 'sbc_ice_lim: requested workspace arrays are unavailable.' )   ;   RETURN
       ENDIF
@@ -252,5 +252,5 @@
 !!gm   remark, the ocean-ice stress is not saved in ice diag call above .....  find a solution!!!
       !
-      IF( .NOT. wrk_release(3, 1,2) )   CALL ctl_stop( 'sbc_ice_lim: failed to release workspace arrays.' )
+      IF( wrk_not_released(3, 1,2) )   CALL ctl_stop( 'sbc_ice_lim: failed to release workspace arrays.' )
       !
    END SUBROUTINE sbc_ice_lim
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 2633)
@@ -83,5 +83,5 @@
       !!                utau, vtau, taum, wndm, qns , qsr, emp , emps
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      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
       !!
@@ -96,5 +96,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1,2,3) ) THEN
+      IF(wrk_in_use(3, 1,2,3) ) THEN
          CALL ctl_stop('sbc_ice_lim_2: requested workspace arrays are unavailable.')   ;   RETURN
       END IF
@@ -228,5 +228,5 @@
       IF( ln_limdyn    )   CALL lim_sbc_tau_2( kt, ub(:,:,1), vb(:,:,1) )  ! using before instantaneous surf. currents
       !
-      IF(.NOT. wrk_release(3, 1,2,3) )   CALL ctl_stop('sbc_ice_lim_2: failed to release workspace arrays')
+      IF(wrk_not_released(3, 1,2,3) )   CALL ctl_stop('sbc_ice_lim_2: failed to release workspace arrays')
       !
    END SUBROUTINE sbc_ice_lim_2
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SOL/solpcg.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SOL/solpcg.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SOL/solpcg.F90	(revision 2633)
@@ -83,5 +83,5 @@
       !!        !  08-01  (R. Benshila) mpp optimization
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zgcr => wrk_2d_1
       !!
@@ -96,5 +96,5 @@
       !!----------------------------------------------------------------------
       
-      IF( .not. wrk_use(2, 1) )THEN
+      IF( wrk_in_use(2, 1) )THEN
          CALL ctl_stop('sol_pcg: requested workspace array is unavailable')
          RETURN
@@ -217,5 +217,5 @@
      
       ! 
-      IF( .not. wrk_release(2, 1) )THEN
+      IF( wrk_not_released(2, 1) )THEN
          CALL ctl_stop('sol_pcg: failed to release workspace array')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SOL/solsor.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SOL/solsor.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SOL/solsor.F90	(revision 2633)
@@ -58,5 +58,5 @@
       !!                Beare and Stevens 1997 Ann. Geophysicae 15, 1369-1377
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztab => wrk_2d_1
       !!
@@ -70,5 +70,5 @@
       !!----------------------------------------------------------------------
       
-      IF( .not. wrk_use(2, 1) )THEN
+      IF( wrk_in_use(2, 1) )THEN
          CALL ctl_stop('sol_sor: requested workspace array is unavailable')
          RETURN
@@ -171,5 +171,5 @@
       CALL lbc_lnk_e( gcx, c_solver_pt, 1. )    ! boundary conditions
       ! 
-      IF( .not. wrk_release(2, 1) )THEN
+      IF( wrk_not_released(2, 1) )THEN
          CALL ctl_stop('sol_sor: failed to release workspace array')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90	(revision 2633)
@@ -107,5 +107,5 @@
       !! References :   Jackett and McDougall, J. Atmos. Ocean. Tech., 1994
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zws => wrk_3d_1 ! temporary workspace
       !!
@@ -123,5 +123,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1))THEN
+      IF(wrk_in_use(3, 1))THEN
          CALL ctl_stop('eos_insitu : requested workspace array unavailable.')
          RETURN
@@ -191,5 +191,5 @@
       IF(ln_ctl)   CALL prt_ctl( tab3d_1=prd, clinfo1=' eos  : ', ovlap=1, kdim=jpk )
       !
-      IF(.NOT. wrk_release(3, 1))THEN
+      IF(wrk_not_released(3, 1))THEN
          CALL ctl_stop('eos_insitu : failed to release workspace array.')
       END IF
@@ -244,5 +244,5 @@
       !!                Brown and Campana, Mon. Weather Rev., 1978
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zws => wrk_3d_1 ! 3D workspace
       !!
@@ -257,5 +257,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1))THEN
+      IF(wrk_in_use(3, 1))THEN
          CALL ctl_stop('eos_insitu_pot: requested workspace array unavailable.')
          RETURN
@@ -330,5 +330,5 @@
       IF(ln_ctl)   CALL prt_ctl( tab3d_1=prd, clinfo1=' eos-p: ', tab3d_2=prhop, clinfo2=' pot : ', ovlap=1, kdim=jpk )
       !
-      IF(.NOT. wrk_release(3, 1))THEN
+      IF(wrk_not_released(3, 1))THEN
          CALL ctl_stop('eos_insitu_pot: failed to release workspace array.')
       END IF
@@ -373,5 +373,5 @@
       !! References :   Jackett and McDougall, J. Atmos. Ocean. Tech., 1994
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zws => wrk_2d_5 ! 2D workspace
       !!
@@ -386,5 +386,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 5))THEN
+      IF(wrk_in_use(2, 5))THEN
          CALL ctl_stop('eos_insitu_2d: requested workspace array unavailable.')
          RETURN
@@ -463,5 +463,5 @@
       IF(ln_ctl)   CALL prt_ctl( tab2d_1=prd, clinfo1=' eos2d: ' )
       !
-      IF(.NOT. wrk_release(2, 5))THEN
+      IF(wrk_not_released(2, 5))THEN
          CALL ctl_stop('eos_insitu_2d: failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 2633)
@@ -61,5 +61,5 @@
       !! ** Method  : - Update (ua,va) with the advection term following nadv
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zun => wrk_3d_1, zvn => wrk_3d_2, zwn => wrk_3d_3   ! 3D workspace
       !
@@ -69,5 +69,5 @@
       !!----------------------------------------------------------------------
       !
-      IF(.not. wrk_use(3, 1,2,3) ) THEN
+      IF(wrk_in_use(3, 1,2,3) ) THEN
          CALL ctl_stop('tra_adv: requested workspace arrays unavailable')   ;   RETURN
       END IF
@@ -131,5 +131,5 @@
          &                       tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
       !
-      IF(.not. wrk_release(3,1,2,3) )   CALL ctl_stop('tra_adv: failed to release workspace arrays')
+      IF(wrk_not_released(3,1,2,3) )   CALL ctl_stop('tra_adv: failed to release workspace arrays')
       !
    END SUBROUTINE tra_adv
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 2633)
@@ -111,5 +111,5 @@
       USE oce         , zwx => ua   ! use ua as workspace
       USE oce         , zwy => va   ! use va as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztfreez => wrk_2d_1
       USE wrk_nemo, ONLY: zwz => wrk_3d_1, zind => wrk_3d_2
@@ -134,5 +134,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .not. wrk_use(2, 1) .OR. .not. wrk_use(3, 1,2) ) THEN
+      IF( wrk_in_use(2, 1) .OR. wrk_in_use(3, 1,2) ) THEN
          CALL ctl_stop('tra_adv_cen2: ERROR: requested workspace arrays unavailable')   ;   RETURN
       END IF
@@ -278,5 +278,5 @@
       ENDIF
       !
-      IF( (.not. wrk_release(2, 1)) .OR. (.not. wrk_release(3, 1,2)))THEN
+      IF( wrk_not_released(2, 1) .OR. wrk_not_released(3, 1,2) )THEN
          CALL ctl_stop('tra_adv_cen2: ERROR: failed to release workspace arrays')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90	(revision 2633)
@@ -64,5 +64,5 @@
       !! ** Action  : - add to p.n the eiv component
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zu_eiv => wrk_2d_1, zv_eiv => wrk_2d_2, &
                           zw_eiv => wrk_2d_3
@@ -85,7 +85,7 @@
 
 # if defined key_diaeiv 
-      IF(.not. wrk_use(2, 1,2,3,4))THEN
+      IF(wrk_in_use(2, 1,2,3,4))THEN
 #else
-      IF(.not. wrk_use(2, 1,2,3))THEN
+      IF(wrk_in_use(2, 1,2,3))THEN
 #endif
          CALL ctl_stop('tra_adv_eiv: ERROR: requested workspace arrays are unavailable.')
@@ -194,7 +194,7 @@
       ! 
 # if defined key_diaeiv 
-      IF(.not. wrk_release(2, 1,2,3,4))THEN
+      IF(wrk_not_released(2, 1,2,3,4))THEN
 #else
-      IF(.not. wrk_release(2, 1,2,3))THEN
+      IF(wrk_not_released(2, 1,2,3))THEN
 #endif
          CALL ctl_stop('tra_adv_eiv: ERROR: failed to release workspace arrays.')
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 2633)
@@ -63,5 +63,5 @@
       USE oce         , zwx => ua   ! use ua as workspace
       USE oce         , zwy => va   ! use va as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zslpx => wrk_3d_1, zslpy => wrk_3d_2
       !!
@@ -81,5 +81,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .not. wrk_use(3, 1,2) )THEN
+      IF( wrk_in_use(3, 1,2) )THEN
          CALL ctl_stop('tra_adv_muscl: ERROR: requested workspace arrays unavailable')
          RETURN
@@ -255,5 +255,5 @@
       ENDDO
       !
-      IF( .not. wrk_release(3, 1,2) )THEN
+      IF( wrk_not_released(3, 1,2) )THEN
          CALL ctl_stop('tra_adv_muscl: ERROR: requested workspace arrays unavailable')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 2633)
@@ -61,5 +61,5 @@
       USE oce         , zwx => ua   ! use ua as workspace
       USE oce         , zwy => va   ! use va as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zslpx => wrk_3d_1, zslpy => wrk_3d_2
       !!
@@ -79,5 +79,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(3, 1,2))THEN
+      IF(wrk_in_use(3, 1,2))THEN
          CALL ctl_stop('tra_adv_muscl2: ERROR: requested workspace arrays are unavailable')
          RETURN
@@ -288,5 +288,5 @@
       END DO
       !
-      IF(.not. wrk_release(3, 1,2))THEN
+      IF(wrk_not_released(3, 1,2))THEN
          CALL ctl_stop('tra_adv_muscl2: ERROR: failed to release workspace arrays')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 2633)
@@ -116,5 +116,5 @@
       !!----------------------------------------------------------------------
       USE oce         , zwx => ua   ! use ua as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zfu => wrk_3d_1, zfc => wrk_3d_2, zfd => wrk_3d_3
       !!
@@ -132,5 +132,5 @@
       !----------------------------------------------------------------------
       !
-      IF(.not. wrk_use(3, 1,2,3))THEN
+      IF(wrk_in_use(3, 1,2,3))THEN
          CALL ctl_stop('tra_adv_qck_i: ERROR: requested workspace arrays unavailable')
          RETURN
@@ -230,5 +230,5 @@
       END DO
       !
-      IF(.not. wrk_release(3, 1,2,3))THEN
+      IF(wrk_not_released(3, 1,2,3))THEN
          CALL ctl_stop('tra_adv_qck_i: ERROR: failed to release workspace arrays')
       END IF
@@ -243,5 +243,5 @@
       !!----------------------------------------------------------------------
       USE oce         , zwy => ua   ! use ua as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zfu => wrk_3d_1, zfc => wrk_3d_2, zfd => wrk_3d_3
       !!
@@ -259,5 +259,5 @@
       !----------------------------------------------------------------------
       !
-      IF(.not. wrk_use(3, 1,2,3))THEN
+      IF(wrk_in_use(3, 1,2,3))THEN
          CALL ctl_stop('tra_adv_qck_j: ERROR: requested workspace arrays unavailable')
          RETURN
@@ -364,5 +364,5 @@
       END DO
       !
-      IF(.not. wrk_release(3, 1,2,3))THEN
+      IF(wrk_not_released(3, 1,2,3))THEN
          CALL ctl_stop('tra_adv_qck_j: ERROR: failed to release workspace arrays')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 2633)
@@ -68,5 +68,5 @@
       USE oce         , zwx => ua   ! use ua as workspace
       USE oce         , zwy => va   ! use va as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zwi => wrk_3d_6, zwz => wrk_3d_7
       !!
@@ -87,5 +87,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(3, 6,7))THEN
+      IF(wrk_in_use(3, 6,7))THEN
          CALL ctl_stop('tra_adv_tvd: ERROR: requested workspace arrays unavailable')
          RETURN
@@ -248,5 +248,5 @@
       END IF
       !
-      IF(.not. wrk_release(3, 6,7))THEN
+      IF(wrk_not_released(3, 6,7))THEN
          CALL ctl_stop('tra_adv_tvd: ERROR: failed to release workspace arrays')
       END IF
@@ -268,5 +268,5 @@
       !!       in-space based differencing for fluid
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zbetup => wrk_3d_8, zbetdo => wrk_3d_9, &
                           zbup => wrk_3d_10, zbdo => wrk_3d_11
@@ -282,5 +282,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(3, 8,9,10,11))THEN
+      IF(wrk_in_use(3, 8,9,10,11))THEN
          CALL ctl_stop('nonosc: ERROR: requested workspace array unavailable')
          RETURN
@@ -365,5 +365,5 @@
       CALL lbc_lnk( paa, 'U', -1. )   ;   CALL lbc_lnk( pbb, 'V', -1. )   ! lateral boundary condition (changed sign)
       !
-      IF(.not. wrk_release(3, 8,9,10,11))THEN
+      IF(wrk_not_released(3, 8,9,10,11))THEN
          CALL ctl_stop('nonosc: ERROR: failed to release workspace arrays')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 2633)
@@ -75,5 +75,5 @@
       USE oce         , zwx => ua   ! use ua as workspace
       USE oce         , zwy => va   ! use va as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztu  => wrk_3d_1, ztv  => wrk_3d_2, &
                           zltu => wrk_3d_3, zltv => wrk_3d_4, &
@@ -97,5 +97,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .not. wrk_use(3, 1,2,3,4,5,6) )THEN
+      IF( wrk_in_use(3, 1,2,3,4,5,6) )THEN
          CALL ctl_stop('tra_adv_ubs: ERROR: requested workspace arrays unavailable')
          RETURN
@@ -273,5 +273,5 @@
       ENDDO
       !
-      IF( .not. wrk_release(3, 1,2,3,4,5,6) )THEN
+      IF( wrk_not_released(3, 1,2,3,4,5,6) )THEN
          CALL ctl_stop('tra_adv_ubs: ERROR: failed to release workspace arrays')
       END IF
@@ -293,5 +293,5 @@
       !!       in-space based differencing for fluid
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zbetup => wrk_3d_1, zbetdo => wrk_3d_2
       !!
@@ -306,5 +306,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .not. wrk_use(3, 1,2) )THEN
+      IF( wrk_in_use(3, 1,2) )THEN
          CALL ctl_stop('nonosc_z: ERROR: requested workspace arrays unavailable')
          RETURN
@@ -381,5 +381,5 @@
       END DO
       !
-      IF( .not. wrk_release(3, 1,2) )THEN
+      IF( wrk_not_released(3, 1,2) )THEN
          CALL ctl_stop('nonosc_z: ERROR: failed to release workspace arrays')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 2633)
@@ -169,5 +169,5 @@
       !!              Campin, J.-M., and H. Goosse, 1999, Tellus, 412-430.
       !!----------------------------------------------------------------------  
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zptb => wrk_2d_1
       !
@@ -181,5 +181,5 @@
       !!----------------------------------------------------------------------
       !
-      IF(.not. wrk_use(2,1) ) THEN
+      IF(wrk_in_use(2,1) ) THEN
          CALL ctl_stop('tra_bbl_dif: ERROR: requested workspace array unavailable')   ;   RETURN
       ENDIF
@@ -218,5 +218,5 @@
       END DO                                                ! end tracer
       !                                                     ! ===========
-      IF(.not. wrk_release(2,1) )   CALL ctl_stop('tra_bbl_dif: failed to release workspace array')
+      IF(wrk_not_released(2,1) )   CALL ctl_stop('tra_bbl_dif: failed to release workspace array')
       !
    END SUBROUTINE tra_bbl_dif
@@ -338,5 +338,5 @@
       !!              Campin, J.-M., and H. Goosse, 1999, Tellus, 412-430.
       !!----------------------------------------------------------------------  
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zub => wrk_2d_1 , ztb => wrk_2d_2                      ! 2D workspace
       USE wrk_nemo, ONLY:   zvb => wrk_2d_3 , zsb => wrk_2d_4 , zdep => wrk_2d_5
@@ -385,5 +385,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(2, 1,2,3,4,5) ) THEN
+      IF(wrk_in_use(2, 1,2,3,4,5) ) THEN
          CALL ctl_stop('bbl: requested workspace arrays unavailable')   ;   RETURN
       ENDIF
@@ -525,5 +525,5 @@
       ENDIF
       !
-      IF(.not. wrk_release(2, 1,2,3,4,5) )   CALL ctl_stop('bbl: failed to release workspace arrays')
+      IF(wrk_not_released(2, 1,2,3,4,5) )   CALL ctl_stop('bbl: failed to release workspace arrays')
       !
    END SUBROUTINE bbl
@@ -539,5 +539,5 @@
       !!              called by nemo_init at the first timestep (nit000)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zmbk => wrk_2d_1       ! 2D workspace
       INTEGER ::   ji, jj               ! dummy loop indices
@@ -547,5 +547,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(2,1) ) THEN
+      IF(wrk_in_use(2,1) ) THEN
          CALL ctl_stop('tra_bbl_init: requested workspace array unavailable')   ;   RETURN
       ENDIF
@@ -635,5 +635,5 @@
       ENDIF
       !
-      IF(.not. wrk_release(2,1))THEN
+      IF(wrk_not_released(2,1))THEN
          CALL ctl_stop('tra_bbl_init: ERROR: failed to release workspace array')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90	(revision 2633)
@@ -327,5 +327,5 @@
       USE iom
       USE ioipsl
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   zhfac => wrk_1d_1, zmrs => wrk_2d_1 , zdct  => wrk_3d_1   ! 1D, 2D, 3D workspace
       !!
@@ -347,6 +347,6 @@
       !!----------------------------------------------------------------------
 
-      IF( .not. wrk_use(1, 1) .OR. .not. wrk_use(2, 1)  .OR.   &
-          .not. wrk_use(3, 1)   )THEN
+      IF( wrk_in_use(1, 1) .OR. wrk_in_use(2, 1)  .OR.   &
+          wrk_in_use(3, 1)   )THEN
          CALL ctl_stop('dtacof: requested workspace arrays unavailable')   ;   RETURN
       ENDIF
@@ -543,6 +543,6 @@
       ENDIF
       !
-      IF( .not. wrk_release(1, 1) .OR. .not. wrk_release(2, 1) .OR. &
-          .not. wrk_release(3, 1) )   CALL ctl_stop('dtacof: failed to release workspace arrays')
+      IF( wrk_not_released(1, 1) .OR. wrk_not_released(2, 1) .OR. &
+          wrk_not_released(3, 1) )   CALL ctl_stop('dtacof: failed to release workspace arrays')
       !
    END SUBROUTINE dtacof
@@ -570,5 +570,5 @@
       !!----------------------------------------------------------------------
       USE ioipsl      ! IOipsl librairy
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release, llwrk_use, llwrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released, llwrk_in_use, llwrk_not_released
       USE wrk_nemo, ONLY:   zxc => wrk_1d_1, zyc  => wrk_1d_2, zzc => wrk_1d_3, zdis => wrk_1d_4
       USE wrk_nemo, ONLY:   llcotu => llwrk_2d_1, llcotv => llwrk_2d_2 , llcotf => llwrk_2d_3
@@ -586,6 +586,6 @@
       !!----------------------------------------------------------------------
 
-      IF( .not. llwrk_use(2, 1,2,3)  .OR. .not. wrk_use(2, 1,2,3,4)  .OR.   &
-          .not.   wrk_use(1, 1,2,3,4)  )THEN
+      IF( llwrk_in_use(2, 1,2,3) .OR. wrk_in_use(2, 1,2,3,4) .OR.   &
+          wrk_in_use(1, 1,2,3,4)  )THEN
          CALL ctl_stop('cofdis: ERROR: requested workspace arrays unavailable')   ;   RETURN
       END IF
@@ -741,7 +741,7 @@
       CALL restclo( icot )
       !
-      IF( .not. llwrk_release(2, 1,2,3)   .OR. &
-          .not.   wrk_release(2, 1,2,3,4) .OR. & 
-          .not.   wrk_release(1, 1,2,3,4)  )   CALL ctl_stop('cofdis: failed to release workspace arrays')
+      IF( llwrk_not_released(2, 1,2,3)  .OR. &
+           wrk_not_released(2, 1,2,3,4) .OR. & 
+           wrk_not_released(1, 1,2,3,4)  )   CALL ctl_stop('cofdis: failed to release workspace arrays')
       !
    END SUBROUTINE cofdis
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90	(revision 2633)
@@ -237,5 +237,5 @@
       !! ** Purpose :   initializations of 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zt_ref => wrk_3d_1, ztb => wrk_3d_2, zavt => wrk_3d_3   ! 3D workspaces
       USE wrk_nemo, ONLY: zs_ref => wrk_3d_4, zsb => wrk_3d_5                     ! 3D workspaces
@@ -251,5 +251,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1,2,3,4,5) ) THEN
+      IF(wrk_in_use(3, 1,2,3,4,5) ) THEN
          CALL ctl_stop('ldf_ano : requested workspace arrays unavailable')   ;   RETURN
       ENDIF
@@ -320,5 +320,5 @@
       avt(:,:,:)        = zavt(:,:,:)
       !
-      IF(.NOT. wrk_release(3, 1,2,3,4,5) )   CALL ctl_stop('ldf_ano : failed to release workspace arrays')
+      IF(wrk_not_released(3, 1,2,3,4,5) )   CALL ctl_stop('ldf_ano : failed to release workspace arrays')
       !
    END SUBROUTINE ldf_ano
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilap.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilap.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilap.F90	(revision 2633)
@@ -75,5 +75,5 @@
       USE oce         , ztu => ua   ! use ua as workspace
       USE oce         , ztv => va   ! use va as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zeeu => wrk_2d_1, zeev => wrk_2d_2, zlt => wrk_2d_3
       !!
@@ -89,5 +89,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2,3))THEN
+      IF(wrk_in_use(2, 1,2,3))THEN
          CALL ctl_stop('tra_ldf_bilap: requested workspace arrays unavailable.')
          RETURN
@@ -166,5 +166,5 @@
       END DO                                              ! tracer loop
       !                                                   ! ===========
-      IF(.NOT. wrk_release(2, 1,2,3))THEN
+      IF(wrk_not_released(2, 1,2,3))THEN
          CALL ctl_stop('tra_ldf_bilap: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90	(revision 2633)
@@ -65,5 +65,5 @@
       !!               biharmonic mixing trend.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: wk1 => wrk_4d_1, wk2 => wrk_4d_2
       INTEGER         , INTENT(in   )                      ::   kt       ! ocean time-step index
@@ -76,5 +76,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(4, 1,2))THEN
+      IF(wrk_in_use(4, 1,2))THEN
          CALL ctl_stop('tra_ldf_bilapg : requested workspace arrays unavailable.')
          RETURN
@@ -114,5 +114,5 @@
       END DO
       !
-      IF(.NOT. wrk_release(4, 1,2))THEN
+      IF(wrk_not_released(4, 1,2))THEN
          CALL ctl_stop('tra_ldf_bilapg : failed to release workspace arrays.')
       END IF
@@ -160,5 +160,5 @@
       !!----------------------------------------------------------------------
       USE oce         , zftv => ua     ! use ua as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release, wrk_use_xz, wrk_release_xz
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, wrk_in_use_xz, wrk_not_released_xz
       USE wrk_nemo, ONLY: zftu => wrk_2d_1,  zdkt => wrk_2d_2, zdk1t => wrk_2d_3
       USE wrk_nemo, ONLY: zftw => wrk_xz_1, zdit => wrk_xz_2, &
@@ -182,5 +182,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(2, 1,2,3)) .OR. (.NOT. wrk_use_xz(1,2,3,4)) )THEN
+      IF( wrk_in_use(2, 1,2,3) .OR. wrk_in_use_xz(1,2,3,4) )THEN
          CALL ctl_stop('ldfght : requested workspace arrays unavailable.')
          RETURN
@@ -337,5 +337,5 @@
       END DO
       !
-      IF( (.NOT. wrk_release(2, 1,2,3)) .OR. (.NOT. wrk_release_xz(1,2,3,4)) )THEN
+      IF( wrk_not_released(2, 1,2,3) .OR. wrk_not_released_xz(1,2,3,4) )THEN
          CALL ctl_stop('ldfght : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 2633)
@@ -92,5 +92,5 @@
       USE oce         , zftu => ua   ! use ua as workspace
       USE oce         , zftv => va   ! use va as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zdkt => wrk_2d_1, zdk1t => wrk_2d_2   ! 2D workspace
       USE wrk_nemo, ONLY: zdit => wrk_3d_1, zdjt => wrk_3d_2, ztfw => wrk_3d_3   ! 3D workspace
@@ -114,6 +114,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(3, 1,2,3)) .OR. &
-          (.NOT. wrk_use(2, 1,2,3)) )THEN
+      IF( wrk_in_use(3, 1,2,3) .OR. wrk_in_use(2, 1,2,3) )THEN
           CALL ctl_stop('tra_ldf_iso : requested workspace array unavailable.')
           RETURN
@@ -295,6 +294,6 @@
       END DO
       !
-      IF( (.NOT. wrk_release(3, 1,2,3)) .OR.  &
-          (.NOT. wrk_release(2, 1,2,3)) )THEN
+      IF( wrk_not_released(3, 1,2,3) .OR.  &
+          wrk_not_released(2, 1,2,3) )THEN
           CALL ctl_stop('tra_ldf_iso : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90	(revision 2633)
@@ -88,5 +88,5 @@
       !! ** Action :   Update pta arrays with the before rotated diffusion
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY:   wrk_use, wrk_release
+      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE oce     , ONLY:   zftu => ua       , zftv => va            ! (ua,va) used as 3D workspace
       USE wrk_nemo, ONLY:   zdit => wrk_3d_1 , zdjt => wrk_3d_2 , ztfw => wrk_3d_3   ! 3D workspace
@@ -117,5 +117,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(3, 1,2,3) .OR. .NOT. wrk_use(2, 1) ) THEN
+      IF( wrk_in_use(3, 1,2,3) .OR. wrk_in_use(2, 1) ) THEN
          CALL ctl_stop('tra_ldf_iso_grif : requested workspace arrays unavailable.')   ;   RETURN
       ENDIF
@@ -347,5 +347,5 @@
       END DO
       !
-      IF( (.NOT. wrk_release(3, 1,2,3,4)) .OR. (.NOT. wrk_release(2, 1)))THEN
+      IF( wrk_not_released(3, 1,2,3,4) .OR. wrk_not_released(2, 1) )THEN
          CALL ctl_stop('tra_ldf_iso_grif : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90	(revision 2633)
@@ -55,5 +55,5 @@
       !! References : Madec, et al., 1991, JPO, 21, 9, 1349-1371.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release, wrk_use_xz, wrk_release_xz
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, wrk_in_use_xz, wrk_not_released_xz
       USE wrk_nemo, ONLY: ztrdt => wrk_3d_1, ztrds => wrk_3d_2, zrhop => wrk_3d_3
       USE wrk_nemo, ONLY: zwx => wrk_xz_1, zwy => wrk_xz_2, zwz => wrk_xz_3
@@ -71,5 +71,5 @@
       ! Strictly 1 and 2 3D workspaces only needed if(l_trdtra) but it doesn't 
       ! cost us anything and makes code simpler.
-      IF( (.NOT. wrk_use(3, 1,2,3)) .OR. (.NOT. wrk_use_xz(1,2,3)) )THEN
+      IF( wrk_in_use(3, 1,2,3) .OR. wrk_in_use_xz(1,2,3) )THEN
          CALL ctl_stop('tra_npc: requested workspace arrays unavailable.')
          RETURN
@@ -217,5 +217,5 @@
       ENDIF
       !
-      IF( (.NOT. wrk_release(3, 1,2,3))  .OR. (.NOT. wrk_release_xz(1,2,3)))THEN
+      IF( wrk_not_released(3, 1,2,3)  .OR. wrk_not_released_xz(1,2,3) )THEN
          CALL ctl_stop('tra_npc: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 2633)
@@ -90,5 +90,5 @@
       !!              Lengaigne et al. 2007, Clim. Dyn., V28, 5, 503-516.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zekb => wrk_2d_1, zekg => wrk_2d_2, zekr => wrk_2d_3
       USE wrk_nemo, ONLY: ze0 => wrk_3d_1, ze1 => wrk_3d_2, ze2 => wrk_3d_3
@@ -106,5 +106,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(3, 1,2,3,4,5)) .OR. (.NOT. wrk_use(2, 1,2,3)) )THEN
+      IF( wrk_in_use(3, 1,2,3,4,5) .OR. wrk_in_use(2, 1,2,3) )THEN
          CALL ctl_stop('tra_qsr : requested workspace arrays unavailable.')
          RETURN
@@ -290,6 +290,6 @@
       IF(ln_ctl)   CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' qsr  - Ta: ', mask1=tmask, clinfo3='tra-ta' )
       !
-      IF( (.NOT. wrk_release(3, 1,2,3,4,5)) .OR. &
-          (.NOT. wrk_release(2, 1,2,3)) )THEN
+      IF( wrk_not_released(3, 1,2,3,4,5) .OR. &
+          wrk_not_released(2, 1,2,3) )THEN
          CALL ctl_stop('tra_qsr : failed to release workspace arrays.')
       END IF
@@ -315,5 +315,5 @@
       !! Reference : Jerlov, N. G., 1968 Optical Oceanography, Elsevier, 194pp.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zekb => wrk_2d_1, zekg => wrk_2d_2, zekr => wrk_2d_3
       USE wrk_nemo, ONLY: ze0 => wrk_3d_1, ze1 => wrk_3d_2, ze2 => wrk_3d_3
@@ -333,5 +333,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(2, 1,2,3)) .OR. (.NOT. wrk_use(3, 1,2,3,4,5)) )THEN
+      IF( wrk_in_use(2, 1,2,3) .OR. wrk_in_use(3, 1,2,3,4,5) )THEN
          CALL ctl_stop('tra_qsr_init: requested workspace arrays unavailable.')
          RETURN
@@ -510,6 +510,6 @@
       ENDIF
       !
-      IF( (.NOT. wrk_release(2, 1,2,3)) .OR.   &
-          (.NOT. wrk_release(3, 1,2,3,4,5)) )THEN
+      IF( wrk_not_released(2, 1,2,3) .OR.   &
+          wrk_not_released(3, 1,2,3,4,5) )THEN
          CALL ctl_stop('tra_qsr_init: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90	(revision 2633)
@@ -73,5 +73,5 @@
       !! ** Action : - after tracer fields pta
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zwx => wrk_3d_1, zwy => wrk_3d_2     ! 3D workspace
       !!
@@ -89,5 +89,5 @@
       !!---------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1,2))THEN
+      IF(wrk_in_use(3, 1,2))THEN
          CALL ctl_stop('tra_zdf_exp : requested workspace arrays unavailable.')
          RETURN
@@ -165,5 +165,5 @@
       END DO
       !
-      IF(.NOT. wrk_release(3, 1,2))THEN
+      IF(wrk_not_released(3, 1,2))THEN
          CALL ctl_stop('tra_zdf_exp : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90	(revision 2633)
@@ -91,5 +91,5 @@
       USE oce    , ONLY :   zwd   => ua   ! ua used as workspace
       USE oce    , ONLY :   zws   => va   ! va  -          -
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zwi => wrk_3d_1, zwt => wrk_3d_2  ! workspace arrays
       !! 
@@ -106,5 +106,5 @@
       !!---------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1,2))THEN
+      IF(wrk_in_use(3, 1,2))THEN
          CALL ctl_stop('tra_zdf_imp : requested workspace arrays unavailable.')
          RETURN
@@ -308,5 +308,5 @@
       END DO
       !
-      IF(.NOT. wrk_release(3, 1,2))THEN
+      IF(wrk_not_released(3, 1,2))THEN
          CALL ctl_stop('tra_zdf_imp : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/zpshde.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/zpshde.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/zpshde.F90	(revision 2633)
@@ -80,5 +80,5 @@
       !!              - pgru, pgrv: horizontal gradient of rho (if present) at u- & v-points 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zri => wrk_2d_1, zrj => wrk_2d_2   ! interpolated value of rd
       USE wrk_nemo, ONLY: zhi => wrk_2d_3, zhj => wrk_2d_4   ! depth of interpolation for eos2d
@@ -98,5 +98,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(2, 1,2,3,4)) .OR. (.NOT. wrk_use(3, 1,2)) )THEN
+      IF( wrk_in_use(2, 1,2,3,4) .OR. wrk_in_use(3, 1,2) )THEN
          CALL ctl_stop('zps_hde: requested workspace arrays unavailable.')
          RETURN
@@ -214,5 +214,5 @@
       END IF
       !
-      IF( (.NOT. wrk_release(2, 1,2,3,4)) .OR. (.NOT. wrk_release(3, 1,2)) )THEN
+      IF( wrk_not_released(2, 1,2,3,4) .OR. wrk_not_released(3, 1,2) )THEN
          CALL ctl_stop('zps_hde: failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90	(revision 2633)
@@ -344,5 +344,5 @@
       !! ** Purpose :  write dynamic trends in ocean.output 
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zkepe => wrk_3d_1, zkx => wrk_3d_2, &
                           zky => wrk_3d_3, zkz => wrk_3d_4
@@ -353,5 +353,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1,2,3,4))THEN
+      IF(wrk_in_use(3, 1,2,3,4))THEN
          CALL ctl_stop('trd_dwr : requested workspace arrays unavailable.')
          RETURN
@@ -550,5 +550,5 @@
       ENDIF
       !
-      IF(.NOT. wrk_release(3, 1,2,3,4))THEN
+      IF(wrk_not_released(3, 1,2,3,4))THEN
          CALL ctl_stop('trd_dwr : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdmld.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdmld.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdmld.F90	(revision 2633)
@@ -93,5 +93,5 @@
       !!            surface and the control surface is called "mixed-layer"
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zvlmsk => wrk_2d_1
       !
@@ -104,5 +104,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1) ) THEN
+      IF(wrk_in_use(2, 1) ) THEN
          CALL ctl_stop('trd_mld_zint : requested workspace arrays unavailable')   ;   RETURN
       ENDIF
@@ -195,5 +195,5 @@
       END SELECT
       !
-      IF(.NOT. wrk_release(2, 1) )   CALL ctl_stop('trd_mld_zint : failed to release workspace arrays')
+      IF(wrk_not_released(2, 1) )   CALL ctl_stop('trd_mld_zint : failed to release workspace arrays')
       !
    END SUBROUTINE trd_mld_zint
@@ -247,5 +247,5 @@
       !!       - See NEMO documentation (in preparation)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztmltot => wrk_2d_1,  zsmltot => wrk_2d_2 ! dT/dt over the anlysis window (including Asselin)
       USE wrk_nemo, ONLY: ztmlres => wrk_2d_3,  zsmlres => wrk_2d_4 ! residual = dh/dt entrainment term
@@ -269,6 +269,6 @@
       
       ! Check that the workspace arrays are all OK to be used
-      IF( .NOT. wrk_use(2, 1,2,3,4,5,6,7,8,9,10,11,12,13,14)  .OR. &
-          .NOT. wrk_use(3, 1,2)                                 ) THEN
+      IF( wrk_in_use(2, 1,2,3,4,5,6,7,8,9,10,11,12,13,14)  .OR. &
+          wrk_in_use(3, 1,2)                                 ) THEN
          CALL ctl_stop('trd_mld : requested workspace arrays unavailable')   ;   RETURN
       ELSE IF(jpltrd > jpk) THEN
@@ -740,6 +740,6 @@
       IF( lrst_oce )   CALL trd_mld_rst_write( kt ) 
 
-      IF( .NOT. wrk_release(2, 1,2,3,4,5,6,7,8,9,10,11,12,13,14)  .OR. &
-          .NOT. wrk_release(3, 1,2)                                )   &
+      IF( wrk_not_released(2, 1,2,3,4,5,6,7,8,9,10,11,12,13,14)  .OR. &
+          wrk_not_released(3, 1,2)                                )   &
           CALL ctl_stop('trd_mld : failed to release workspace arrays.')
       !
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdmod.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdmod.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdmod.F90	(revision 2633)
@@ -51,5 +51,5 @@
       !!              integral constraints
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztswu => wrk_2d_1,  &
                           ztswv => wrk_2d_2,  &
@@ -68,5 +68,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.not. wrk_use(2, 1,2,3,4,5,6))THEN
+      IF(wrk_in_use(2, 1,2,3,4,5,6))THEN
          CALL ctl_warn('trd_mod: Requested workspace arrays already in use.')   ;   RETURN
       END IF
@@ -226,5 +226,5 @@
       ENDIF
       !
-      IF( .not. wrk_release(2, 1,2,3,4,5,6) )   CALL ctl_warn('trd_mod: Failed to release workspace arrays.')
+      IF( wrk_not_released(2, 1,2,3,4,5,6) )   CALL ctl_warn('trd_mod: Failed to release workspace arrays.')
       !
    END SUBROUTINE trd_mod
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90	(revision 2633)
@@ -60,5 +60,5 @@
       !!        nn_ctls > 1  : use fixed level surface jk = nn_ctls
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztrds => wrk_3d_1
       INTEGER                         , INTENT(in)           ::  kt      ! time step
@@ -71,5 +71,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1) ) THEN
+      IF(wrk_in_use(3, 1) ) THEN
          CALL ctl_stop('trd_tra: requested workspace array unavailable.')   ;   RETURN
       ENDIF
@@ -136,5 +136,5 @@
       ENDIF
       !
-      IF(.NOT. wrk_release(3, 1) )   CALL ctl_stop('trd_tra: failed to release workspace array.')
+      IF(wrk_not_released(3, 1) )   CALL ctl_stop('trd_tra: failed to release workspace array.')
       !
    END SUBROUTINE trd_tra
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 2633)
@@ -108,5 +108,5 @@
       !!      trends output in netCDF format using ioipsl
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zudpvor => wrk_2d_1, &   ! total cmulative trends
                           zvdpvor => wrk_2d_2
@@ -120,5 +120,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2))THEN
+      IF(wrk_in_use(2, 1,2))THEN
          CALL ctl_stop('trd_vor_zint_2d : requested workspace arrays unavailable.')
          RETURN
@@ -172,5 +172,5 @@
       ENDIF
       !
-      IF(.NOT. wrk_release(2, 1,2))THEN
+      IF(wrk_not_released(2, 1,2))THEN
          CALL ctl_stop('trd_vor_zint_2d : failed to release workspace arrays.')
       END IF
@@ -206,5 +206,5 @@
       !!      trends output in netCDF format using ioipsl
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zubet   => wrk_2d_1,   zvbet => wrk_2d_2   ! Beta.V 
       USE wrk_nemo, ONLY: zudpvor => wrk_2d_3, zvdpvor => wrk_2d_4   ! total cmulative trends
@@ -217,5 +217,5 @@
       !!----------------------------------------------------------------------
      
-      IF(.NOT. wrk_use(2, 1,2,3,4))THEN
+      IF(wrk_in_use(2, 1,2,3,4))THEN
          CALL ctl_stop('trd_vor_zint_3d : requested workspace arrays unavailable.')
          RETURN
@@ -284,5 +284,5 @@
       ENDIF
       !
-      IF(.NOT. wrk_release(2, 1,2,3,4))THEN
+      IF(wrk_not_released(2, 1,2,3,4))THEN
          CALL ctl_stop('trd_vor_zint_3d : failed to release workspace arrays.')
       END IF
@@ -298,5 +298,5 @@
       !!               and make outputs (NetCDF or DIMG format)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zun => wrk_2d_1, zvn => wrk_2d_2 ! 2D workspace
       !!
@@ -308,5 +308,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1,2))THEN
+      IF(wrk_in_use(2, 1,2))THEN
          CALL ctl_stop('trd_vor : requested workspace arrays unavailable.')
          RETURN
@@ -478,5 +478,5 @@
       IF( kt == nitend )   CALL histclo( nidvor )
       !
-      IF(.NOT. wrk_release(2, 1,2) )   CALL ctl_stop('trd_vor : failed to release workspace arrays')
+      IF(wrk_not_released(2, 1,2) )   CALL ctl_stop('trd_vor : failed to release workspace arrays')
       !
    END SUBROUTINE trd_vor
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 2633)
@@ -89,5 +89,5 @@
       !! References :   Merryfield et al., JPO, 29, 1124-1142, 1999.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zmsks  => wrk_2d_1,  &
                           zmskf  => wrk_2d_2,  &
@@ -104,5 +104,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 1,2,3,4,5) ) THEN
+      IF( wrk_in_use(2, 1,2,3,4,5) ) THEN
          CALL ctl_stop('zdf_ddm: Requested workspace arrays already in use.')   ;   RETURN
       END IF
@@ -198,5 +198,5 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(2, 1,2,3,4,5) )   CALL ctl_stop('zdf_ddm: Release of workspace arrays failed')
+      IF( wrk_not_released(2, 1,2,3,4,5) )   CALL ctl_stop('zdf_ddm: Release of workspace arrays failed')
       !
    END SUBROUTINE zdf_ddm
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 2633)
@@ -134,5 +134,5 @@
       USE oce,     z_elem_c  =>   ta   ! use ta as workspace
       USE oce,     psi       =>   sa   ! use sa as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zdep  => wrk_2d_1
       USE wrk_nemo, ONLY: zflxs => wrk_2d_2     ! Turbulence fluxed induced by internal waves 
@@ -153,5 +153,5 @@
       !!--------------------------------------------------------------------
 
-      IF(  .NOT. wrk_use(2, 1,2,3)  .OR.  .NOT. wrk_use(3, 1,2,3,4,5)  ) THEN
+      IF(  wrk_in_use(2, 1,2,3)  .OR.  wrk_in_use(3, 1,2,3,4,5)  ) THEN
          CALL ctl_stop('zdf_gls: requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -882,6 +882,6 @@
       ENDIF
       !
-      IF( .NOT. wrk_release(2, 1,2,3)     .OR. &
-          .NOT. wrk_release(3, 1,2,3,4,5)  )   CALL ctl_stop('zdf_gls: failed to release workspace arrays')
+      IF( wrk_not_released(2, 1,2,3)     .OR. &
+          wrk_not_released(3, 1,2,3,4,5)  )   CALL ctl_stop('zdf_gls: failed to release workspace arrays')
       !
    END SUBROUTINE zdf_gls
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90	(revision 2633)
@@ -214,5 +214,5 @@
       USE oce     , zdiffut => ta   ! temp. array for diffusivities use sa as workspace
 #endif
-      USE wrk_nemo, ONLY: wrk_use, wrk_release, wrk_use_xz, wrk_release_xz
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, wrk_in_use_xz, wrk_not_released_xz
       USE wrk_nemo, ONLY: zBo    => wrk_2d_1, &  ! Surface buoyancy forcing,
                           zBosol => wrk_2d_2, &  ! friction velocity
@@ -274,7 +274,7 @@
       !!--------------------------------------------------------------------
      
-      IF( .NOT. wrk_use(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14) .OR. &
-          .NOT. wrk_use(2, 1,2,3,4,5,6,7,8,9,10,11)          .OR. &
-          .NOT. wrk_use_xz(1,2,3)                              ) THEN
+      IF( wrk_in_use(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14) .OR. &
+          wrk_in_use(2, 1,2,3,4,5,6,7,8,9,10,11)          .OR. &
+          wrk_in_use_xz(1,2,3)                              ) THEN
          CALL ctl_stop('zdf_kpp : requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -1234,7 +1234,7 @@
          ENDIF
 
-      IF( .NOT. wrk_release(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14) .OR. &
-          .NOT. wrk_release(2, 1,2,3,4,5,6,7,8,9,10,11)          .OR. &
-          .NOT. wrk_release_xz(1,2,3)  )   CALL ctl_stop('zdf_kpp : failed to release workspace arrays.')
+      IF( wrk_not_released(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14) .OR. &
+          wrk_not_released(2, 1,2,3,4,5,6,7,8,9,10,11)          .OR. &
+          wrk_not_released_xz(1,2,3)  )   CALL ctl_stop('zdf_kpp : failed to release workspace arrays.')
       !
    END SUBROUTINE zdf_kpp
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90	(revision 2633)
@@ -63,5 +63,5 @@
       !! ** Action  :   nmln, hmld, hmlp, hmlpt
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: iwrk_use, iwrk_release
+      USE wrk_nemo, ONLY: iwrk_in_use, iwrk_not_released
       USE wrk_nemo, ONLY: imld => iwrk_2d_1    ! 2D workspace
       !!
@@ -74,5 +74,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. iwrk_use(2,1) )THEN
+      IF( iwrk_in_use(2,1) )THEN
          CALL ctl_stop('zdf_mxl : requested workspace array unavailable.')   ;   RETURN
       END IF
@@ -112,5 +112,5 @@
       IF(ln_ctl)   CALL prt_ctl( tab2d_1=REAL(nmln,wp), clinfo1=' nmln : ', tab2d_2=hmlp, clinfo2=' hmlp : ', ovlap=1 )
       !
-      IF( .NOT. iwrk_release(2,1) )   CALL ctl_stop('zdf_mxl : failed to release workspace array')
+      IF( iwrk_not_released(2,1) )   CALL ctl_stop('zdf_mxl : failed to release workspace array')
       !
    END SUBROUTINE zdf_mxl
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 2633)
@@ -88,5 +88,5 @@
       !! References : Pacanowski & Philander 1981, JPO, 1441-1451.
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zwx => wrk_2d_1
       !!
@@ -97,5 +97,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1) ) THEN
+      IF(wrk_in_use(2, 1) ) THEN
          CALL ctl_stop('zdf_ric : requested workspace array unavailable')   ;   RETURN
       END IF
@@ -150,5 +150,5 @@
       CALL lbc_lnk( avmu, 'U', 1. )   ;   CALL lbc_lnk( avmv, 'V', 1. )
       !
-      IF(.NOT. wrk_release(2, 1) )   CALL ctl_stop('zdf_ric : failed to release workspace array')
+      IF(wrk_not_released(2, 1) )   CALL ctl_stop('zdf_ric : failed to release workspace array')
       !
    END SUBROUTINE zdf_ric
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 2633)
@@ -192,5 +192,5 @@
       USE oce,   zd_up  =>   va   ! use va as workspace
       USE oce,   zd_lw  =>   ta   ! use ta as workspace
-      USE wrk_nemo, ONLY: wrk_use, wrk_release, iwrk_use, iwrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, iwrk_in_use, iwrk_not_released
       USE wrk_nemo, ONLY: imlc => iwrk_2d_1 ! 2D INTEGER workspace
       USE wrk_nemo, ONLY: zhlc => wrk_2d_1  ! 2D REAL workspace
@@ -211,7 +211,7 @@
       !!--------------------------------------------------------------------
       !
-      IF( .NOT. iwrk_use(2, 1) .OR. &
-          .NOT.  wrk_use(2, 1) .OR. &
-          .NOT.  wrk_use(3, 1)   )THEN
+      IF( iwrk_in_use(2, 1) .OR. &
+           wrk_in_use(2, 1) .OR. &
+           wrk_in_use(3, 1)   )THEN
          CALL ctl_stop('tke_tke : requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -430,7 +430,7 @@
       CALL lbc_lnk( en, 'W', 1. )      ! Lateral boundary conditions (sign unchanged)
       !
-      IF( .NOT. iwrk_release(2 ,1) .OR.   &
-          .NOT.  wrk_release(2, 1) .OR.   &
-          .NOT.  wrk_release(3, 1)  )   CALL ctl_stop( 'tke_tke : failed to release workspace arrays' )
+      IF( iwrk_not_released(2 ,1) .OR.   &
+           wrk_not_released(2, 1) .OR.   &
+           wrk_not_released(3, 1)  )   CALL ctl_stop( 'tke_tke : failed to release workspace arrays' )
       !
    END SUBROUTINE tke_tke
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 2633)
@@ -24,5 +24,5 @@
    USE in_out_manager  ! I/O manager
    USE iom             ! I/O Manager
-   USE wrk_nemo, ONLY: wrk_use, wrk_release
+   USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
 
    IMPLICIT NONE
@@ -111,5 +111,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1))THEN
+      IF(wrk_in_use(2, 1))THEN
          CALL ctl_stop('zdf_tmx : requested workspace array unavailable.')   ;   RETURN
       END IF
@@ -175,5 +175,5 @@
       IF(ln_ctl)   CALL prt_ctl(tab3d_1=zav_tide , clinfo1=' tmx - av_tide: ', tab3d_2=avt, clinfo2=' avt: ', ovlap=1, kdim=jpk)
       !
-      IF(.NOT. wrk_release(2, 1))THEN
+      IF(wrk_not_released(2, 1))THEN
          CALL ctl_stop('zdf_tmx : failed to release workspace array.')
       END IF
@@ -215,5 +215,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( (.NOT. wrk_use(2, 2,3,4,5)) .OR. (.NOT. wrk_use(3, 1,2,3,4,5)) )THEN
+      IF( wrk_in_use(2, 2,3,4,5) .OR. wrk_in_use(3, 1,2,3,4,5) )THEN
          CALL ctl_stop('tmx_itf : requested workspace arrays unavailable.')
          RETURN
@@ -303,6 +303,6 @@
       END DO
       !
-      IF( (.NOT. wrk_release(2, 2,3,4,5)) .OR. &
-          (.NOT. wrk_release(3, 1,2,3,4,5)) )THEN
+      IF( wrk_not_released(2, 2,3,4,5) .OR. &
+          wrk_not_released(3, 1,2,3,4,5) )THEN
          CALL ctl_stop('tmx_itf : failed to release workspace arrays.')
       END IF
@@ -361,5 +361,5 @@
       !!----------------------------------------------------------------------
 
-      IF( .NOT. wrk_use(2, 1,2,3,4,5)  .OR.  .NOT. wrk_use(3, 1)  ) THEN
+      IF( wrk_in_use(2, 1,2,3,4,5)  .OR.  wrk_in_use(3, 1)  ) THEN
          CALL ctl_stop('zdf_tmx_init : requested workspace arrays unavailable.')   ;   RETURN
       END IF
@@ -525,6 +525,6 @@
       ENDIF
       !
-      IF(.NOT. wrk_release(2, 1,2,3,4,5) .OR.   &
-         .NOT. wrk_release(3, 1)          )   CALL ctl_stop( 'zdf_tmx_init : failed to release workspace arrays' )
+      IF(wrk_not_released(2, 1,2,3,4,5) .OR.   &
+         wrk_not_released(3, 1)          )   CALL ctl_stop( 'zdf_tmx_init : failed to release workspace arrays' )
       !
    END SUBROUTINE zdf_tmx_init
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90	(revision 2633)
@@ -13,6 +13,6 @@
 
    PUBLIC wrk_alloc   ! routine called in nemogcm module (nemo_init routine)
-   PUBLIC wrk_use,     llwrk_use,     iwrk_use,     wrk_use_xz
-   PUBLIC wrk_release, llwrk_release, iwrk_release, wrk_release_xz
+   PUBLIC wrk_in_use, llwrk_in_use, iwrk_in_use, wrk_in_use_xz
+   PUBLIC wrk_not_released, llwrk_not_released, iwrk_not_released, wrk_not_released_xz
 
    INTEGER, PARAMETER :: num_1d_wrkspaces  = 27   ! No. of 1D workspace arrays ( MAX(jpi*jpj,jpi*jpk,jpj*jpk) )
@@ -190,12 +190,12 @@
 
 
-   FUNCTION wrk_use( kdim,    index1,  index2,  index3,  index4,    &
-      &              index5,  index6,  index7,  index8,  index9,    &
-      &              index10, index11, index12, index13, index14,   &
-      &              index15, index16, index17, index18, index19,   &
-      &              index20, index21, index22, index23, index24,   &
-      &              index25, index26, index27)
-      !!----------------------------------------------------------------------
-      !!                   ***  FUNCTION wrk_use  ***
+   FUNCTION wrk_in_use( kdim,    index1,  index2,  index3,  index4,    &
+      &                 index5,  index6,  index7,  index8,  index9,    &
+      &                 index10, index11, index12, index13, index14,   &
+      &                 index15, index16, index17, index18, index19,   &
+      &                 index20, index21, index22, index23, index24,   &
+      &                 index25, index26, index27)
+      !!----------------------------------------------------------------------
+      !!                   ***  FUNCTION wrk_in_use  ***
       !!
       !! ** Purpose :   Request a set of KIND(wp) workspaces to use. Returns 
@@ -210,21 +210,21 @@
       INTEGER, OPTIONAL, INTENT(in) ::   index21, index22, index23, index24, index25, index26, index27
       !
-      LOGICAL ::   wrk_use      ! Return value
+      LOGICAL ::   wrk_in_use      ! Return value
       INTEGER ::   iarg, iptr   ! local integer
       !!----------------------------------------------------------------------
 
-      wrk_use = .TRUE.
+      wrk_in_use = .TRUE.
       iptr    = index1
       iarg    = 1
       
-      DO WHILE( wrk_use .AND. iarg <= max_num_wrkspaces )
+      DO WHILE( wrk_in_use .AND. iarg <= max_num_wrkspaces )
          !
          IF( kdim == 1 ) THEN
             IF( iptr > num_1d_wrkspaces ) THEN
-               CALL wrk_stop('wrk_use - more 1D workspace arrays requested than defined in wrk_nemo module')
-               wrk_use = .FALSE.
+               CALL wrk_stop('wrk_in_use - more 1D workspace arrays requested than defined in wrk_nemo module')
+               wrk_in_use = .FALSE.
                EXIT
             ELSEIF( in_use_1d(iptr) ) THEN
-               wrk_use = .FALSE.
+               wrk_in_use = .FALSE.
                CALL print_in_use_list(1, REAL_TYPE, in_use_1d)
             ENDIF
@@ -233,9 +233,9 @@
          ELSEIF( kdim == 2 ) THEN
             IF( iptr > num_2d_wrkspaces ) THEN
-               CALL wrk_stop('wrk_use - more 2D workspace arrays requested than defined in wrk_nemo module')
-               wrk_use = .FALSE.
+               CALL wrk_stop('wrk_in_use - more 2D workspace arrays requested than defined in wrk_nemo module')
+               wrk_in_use = .FALSE.
                EXIT
             ELSEIF( in_use_2d(iptr) ) THEN
-               wrk_use = .FALSE.
+               wrk_in_use = .FALSE.
                CALL print_in_use_list(2, REAL_TYPE, in_use_2d)
             ENDIF
@@ -244,9 +244,9 @@
          ELSEIF( kdim == 3 ) THEN
             IF( iptr > num_3d_wrkspaces ) THEN
-               CALL wrk_stop( 'wrk_use - more 3D workspace arrays requested than defined in wrk_nemo module' )
-               wrk_use = .FALSE.
+               CALL wrk_stop( 'wrk_in_use - more 3D workspace arrays requested than defined in wrk_nemo module' )
+               wrk_in_use = .FALSE.
                EXIT
             ELSEIF( in_use_3d(iptr) ) THEN
-               wrk_use = .FALSE.
+               wrk_in_use = .FALSE.
                CALL print_in_use_list(3, REAL_TYPE, in_use_3d)
             ENDIF
@@ -255,9 +255,9 @@
          ELSEIF( kdim == 4 ) THEN
             IF(iptr > num_4d_wrkspaces)THEN
-               CALL wrk_stop( 'wrk_use - more 4D workspace arrays requested than defined in wrk_nemo module' )
-               wrk_use = .FALSE.
+               CALL wrk_stop( 'wrk_in_use - more 4D workspace arrays requested than defined in wrk_nemo module' )
+               wrk_in_use = .FALSE.
                EXIT
             ELSEIF( in_use_4d(iptr) ) THEN
-               wrk_use = .FALSE.
+               wrk_in_use = .FALSE.
                CALL print_in_use_list( 4, REAL_TYPE, in_use_4d )
             ENDIF
@@ -266,6 +266,6 @@
             !
          ELSE 
-            IF(llwp) WRITE(kumout,*) 'wrk_use: unsupported value of kdim = ',kdim
-            CALL wrk_stop( 'wrk_use: unrecognised value for number of dimensions' )
+            IF(llwp) WRITE(kumout,*) 'wrk_in_use: unsupported value of kdim = ',kdim
+            CALL wrk_stop( 'wrk_in_use: unrecognised value for number of dimensions' )
          END IF
 
@@ -280,5 +280,5 @@
             EXIT
          ELSEIF( iarg == -99 ) THEN
-            CALL wrk_stop( 'wrk_use : caught unexpected argument count - BUG' )
+            CALL wrk_stop( 'wrk_in_use : caught unexpected argument count - BUG' )
             EXIT
          END IF
@@ -286,11 +286,11 @@
       END DO ! end of DO WHILE()
       !
-    END FUNCTION wrk_use
-
-
-   FUNCTION llwrk_use( kdim,   index1, index2, index3, index4,   &
-      &                index5, index6, index7, index8, index9)
-      !!----------------------------------------------------------------------
-      !!                   ***  FUNCTION llwrk_use  ***
+    END FUNCTION wrk_in_use
+
+
+   FUNCTION llwrk_in_use( kdim,   index1, index2, index3, index4,   &
+      &                   index5, index6, index7, index8, index9)
+      !!----------------------------------------------------------------------
+      !!                   ***  FUNCTION llwrk_in_use  ***
       !!
       !! ** Purpose :   Request a set of LOGICAL workspaces to use. Returns 
@@ -303,21 +303,21 @@
       INTEGER, OPTIONAL, INTENT(in) :: index2, index3, index4, index5, index6, index7, index8, index9
       !
-      LOGICAL ::   llwrk_use     ! Return value
+      LOGICAL ::   llwrk_in_use  ! Return value
       INTEGER ::   iarg, iptr    ! local integers
       !!----------------------------------------------------------------------
       !
-      llwrk_use = .TRUE.
+      llwrk_in_use = .TRUE.
       iptr      = index1
       iarg      = 1
       !
-      DO WHILE( llwrk_use .AND. iarg <= max_num_wrkspaces )
+      DO WHILE( llwrk_in_use .AND. iarg <= max_num_wrkspaces )
          !
          IF( kdim == 2 ) THEN
             IF(iptr > num_2d_lwrkspaces)THEN
-               CALL wrk_stop('llwrk_use - more 2D workspace arrays requested than defined in wrk_nemo module')
-               llwrk_use = .FALSE.
+               CALL wrk_stop('llwrk_in_use - more 2D workspace arrays requested than defined in wrk_nemo module')
+               llwrk_in_use = .FALSE.
                EXIT
             ELSE IF( in_use_2dll(iptr) )THEN
-               llwrk_use = .FALSE.
+               llwrk_in_use = .FALSE.
                CALL print_in_use_list(2, REAL_TYPE, in_use_2d)
             END IF
@@ -327,9 +327,9 @@
             !
             IF(iptr > num_3d_lwrkspaces)THEN
-               CALL wrk_stop('llwrk_use - more 3D workspace arrays requested than defined in wrk_nemo module')
-               llwrk_use = .FALSE.
+               CALL wrk_stop('llwrk_in_use - more 3D workspace arrays requested than defined in wrk_nemo module')
+               llwrk_in_use = .FALSE.
                EXIT
             ELSE IF( in_use_3dll(iptr) )THEN
-               llwrk_use = .FALSE.
+               llwrk_in_use = .FALSE.
                CALL print_in_use_list(3, REAL_TYPE, in_use_3d)
             END IF
@@ -337,6 +337,6 @@
             in_use_3dll(iptr) = .TRUE.
          ELSE 
-            IF(llwp) WRITE(kumout,*) 'llwrk_use: unsupported value of kdim = ',kdim
-            CALL wrk_stop('llwrk_use: unrecognised value for number of dimensions')
+            IF(llwp) WRITE(kumout,*) 'llwrk_in_use: unsupported value of kdim = ',kdim
+            CALL wrk_stop('llwrk_in_use: unrecognised value for number of dimensions')
          END IF
 
@@ -347,17 +347,17 @@
             EXIT
          ELSEIF( iarg == -99 ) THEN
-            CALL wrk_stop( 'llwrk_use - ERROR, caught unexpected argument count - BUG' )
-            EXIT
-         ENDIF
-         !
-      END DO ! while(llwrk_use .AND. iarg <= max_num_wrkspaces)
-      !
-   END FUNCTION llwrk_use
-
-
-   FUNCTION iwrk_use( kdim, index1, index2, index3, index4,   &
-      &                     index5, index6, index7 )
-      !!----------------------------------------------------------------------
-      !!                   ***  FUNCTION iwrk_use  ***
+            CALL wrk_stop( 'llwrk_in_use - ERROR, caught unexpected argument count - BUG' )
+            EXIT
+         ENDIF
+         !
+      END DO ! while(llwrk_in_use .AND. iarg <= max_num_wrkspaces)
+      !
+   END FUNCTION llwrk_in_use
+
+
+   FUNCTION iwrk_in_use( kdim, index1, index2, index3, index4,   &
+      &                        index5, index6, index7 )
+      !!----------------------------------------------------------------------
+      !!                   ***  FUNCTION iwrk_in_use  ***
       !!
       !! ** Purpose :   Request a set of INTEGER workspaces to use. Returns 
@@ -370,20 +370,20 @@
       INTEGER, OPTIONAL, INTENT(in) ::   index2, index3, index4, index5, index6, index7
       !
-      LOGICAL             :: iwrk_use    ! Return value
+      LOGICAL             :: iwrk_in_use    ! Return value
       INTEGER :: iarg, iptr
       !!----------------------------------------------------------------------
 
-      iwrk_use = .TRUE.
+      iwrk_in_use = .TRUE.
       iptr     = index1
       iarg     = 1
       
-      DO WHILE( iwrk_use .AND. iarg <= max_num_wrkspaces )
+      DO WHILE( iwrk_in_use .AND. iarg <= max_num_wrkspaces )
          !
          IF( kdim == 2 ) THEN
             IF( iptr > num_2d_wrkspaces ) THEN
-               CALL wrk_stop( 'wrk_use - more 2D workspace arrays requested than defined in wrk_nemo module' )
-               iwrk_use = .FALSE.
+               CALL wrk_stop( 'wrk_in_use - more 2D workspace arrays requested than defined in wrk_nemo module' )
+               iwrk_in_use = .FALSE.
             ELSEIF( in_use_2di(iptr) ) THEN
-               iwrk_use = .FALSE.
+               iwrk_in_use = .FALSE.
                CALL print_in_use_list( 2, INTEGER_TYPE, in_use_2di )
             END IF
@@ -391,6 +391,6 @@
             !
          ELSE
-            IF(llwp) WRITE(kumout,*) 'iwrk_use: unsupported value of kdim = ',kdim
-            CALL wrk_stop('iwrk_use: unsupported value for number of dimensions')
+            IF(llwp) WRITE(kumout,*) 'iwrk_in_use: unsupported value of kdim = ',kdim
+            CALL wrk_stop('iwrk_in_use: unsupported value for number of dimensions')
          END IF
 
@@ -424,5 +424,5 @@
             EXIT
          CASE DEFAULT
-            CALL wrk_stop( 'iwrk_use : caught unexpected argument count - BUG' )
+            CALL wrk_stop( 'iwrk_in_use : caught unexpected argument count - BUG' )
             EXIT
          END SELECT
@@ -430,11 +430,11 @@
       END DO ! end of DO WHILE()
       !
-    END FUNCTION iwrk_use
-
-
-   FUNCTION wrk_use_xz( index1, index2, index3, index4,   &
-      &                 index5, index6, index7, index8, index9 )
-      !!----------------------------------------------------------------------
-      !!                   ***  FUNCTION wrk_use_xz  ***
+    END FUNCTION iwrk_in_use
+
+
+   FUNCTION wrk_in_use_xz( index1, index2, index3, index4,   &
+      &                    index5, index6, index7, index8, index9 )
+      !!----------------------------------------------------------------------
+      !!                   ***  FUNCTION wrk_in_use_xz  ***
       !!
       !! ** Purpose :   Request a set of 2D, xz (jpi,jpk) workspaces to use. 
@@ -447,20 +447,20 @@
       INTEGER, OPTIONAL, INTENT(in) :: index2, index3, index4, index5, index6, index7, index8, index9
       ! Local variables
-      LOGICAL ::   wrk_use_xz   ! Return value
-      INTEGER ::   iarg, iptr   ! local integer
-      !!----------------------------------------------------------------------
-
-      wrk_use_xz = .TRUE.
+      LOGICAL ::   wrk_in_use_xz   ! Return value
+      INTEGER ::   iarg, iptr      ! local integer
+      !!----------------------------------------------------------------------
+
+      wrk_in_use_xz = .TRUE.
       iptr       = index1
       iarg       = 1
        
-      DO WHILE( wrk_use_xz .AND. iarg <= max_num_wrkspaces )
+      DO WHILE( wrk_in_use_xz .AND. iarg <= max_num_wrkspaces )
          !
          IF(iptr > num_xz_wrkspaces)THEN
-            CALL wrk_stop('wrk_use_xz - more 2D xz workspace arrays requested than defined in wrk_nemo module')
-            wrk_use_xz = .FALSE.
+            CALL wrk_stop('wrk_in_use_xz - more 2D xz workspace arrays requested than defined in wrk_nemo module')
+            wrk_in_use_xz = .FALSE.
             EXIT
          ELSE IF( in_use_xz(iptr) )THEN
-            wrk_use_xz = .FALSE.
+            wrk_in_use_xz = .FALSE.
             CALL print_in_use_list(2, REAL_TYPE, in_use_xz) !ARPDBG - bug
          END IF
@@ -474,24 +474,24 @@
             EXIT
          ELSEIF( iarg == -99 ) THEN
-            CALL wrk_stop( 'wrk_use_xz : caught unexpected argument count - BUG' )   ;   EXIT
+            CALL wrk_stop( 'wrk_in_use_xz : caught unexpected argument count - BUG' )   ;   EXIT
          END IF
          !
-      END DO ! while(wrk_use_xz .AND. iarg <= max_num_wrkspaces)
-      !
-   END FUNCTION wrk_use_xz
-
-
-   FUNCTION wrk_release( kdim,    index1,  index2,  index3,  index4,  &
-      &                  index5,  index6,  index7,  index8,  index9,  &
-      &                  index10, index11, index12, index13, index14, &
-      &                  index15, index16, index17, index18, index19, &
-      &                  index20, index21, index22, index23, index24, &
-      &                  index25, index26, index27)
-      !!----------------------------------------------------------------------
-      !!                 ***  FUNCTION wrk_release  ***
+      END DO ! while(wrk_in_use_xz .AND. iarg <= max_num_wrkspaces)
+      !
+   END FUNCTION wrk_in_use_xz
+
+
+   FUNCTION wrk_not_released( kdim,    index1,  index2,  index3,  index4,  &
+      &                       index5,  index6,  index7,  index8,  index9,  &
+      &                       index10, index11, index12, index13, index14, &
+      &                       index15, index16, index17, index18, index19, &
+      &                       index20, index21, index22, index23, index24, &
+      &                       index25, index26, index27)
+      !!----------------------------------------------------------------------
+      !!                 ***  FUNCTION wrk_not_released  ***
       !!
       !! ** Purpose :   Flag that the specified workspace arrays are no-longer in use.
       !!----------------------------------------------------------------------
-      LOGICAL             :: wrk_release ! Return value
+      LOGICAL             :: wrk_not_released ! Return value
       INTEGER, INTENT(in) :: kdim             ! Dimensionality of workspace(s)
       INTEGER, INTENT(in) :: index1           ! Index of 1st workspace to release
@@ -503,5 +503,5 @@
       !!----------------------------------------------------------------------
 
-      wrk_release = .TRUE.
+      wrk_not_released = .TRUE.
       iptr = index1
       iarg = 1
@@ -511,6 +511,6 @@
          IF( kdim == 1 ) THEN
             IF( iptr > num_1d_wrkspaces ) THEN
-               CALL wrk_stop( 'wrk_release : attempt to release a non-existent 1D workspace array' )
-               wrk_release = .FALSE.
+               CALL wrk_stop( 'wrk_not_released : attempt to release a non-existent 1D workspace array' )
+               wrk_not_released = .FALSE.
             ELSE
                in_use_1d(iptr) = .FALSE.
@@ -519,6 +519,6 @@
          ELSE IF(kdim == 2)THEN
             IF( iptr > num_2d_wrkspaces ) THEN
-               CALL wrk_stop( 'wrk_release : attempt to release a non-existent 2D workspace array' )
-               wrk_release = .FALSE.
+               CALL wrk_stop( 'wrk_not_released : attempt to release a non-existent 2D workspace array' )
+               wrk_not_released = .FALSE.
             ENDIF
             in_use_2d(iptr) = .FALSE.
@@ -526,6 +526,6 @@
          ELSEIF( kdim == 3 ) THEN
             IF( iptr > num_3d_wrkspaces ) THEN
-               CALL wrk_stop('wrk_release : attempt to release a non-existent 3D workspace array')
-               wrk_release = .FALSE.
+               CALL wrk_stop('wrk_not_released : attempt to release a non-existent 3D workspace array')
+               wrk_not_released = .FALSE.
             END IF
             in_use_3d(iptr) = .FALSE.
@@ -533,12 +533,12 @@
           ELSEIF( kdim == 4 ) THEN
             IF(iptr > num_4d_wrkspaces)THEN
-               CALL wrk_stop('wrk_release - ERROR - attempt to release a non-existent 4D workspace array')
-               wrk_release = .FALSE.
+               CALL wrk_stop('wrk_not_released - ERROR - attempt to release a non-existent 4D workspace array')
+               wrk_not_released = .FALSE.
             END IF
             in_use_4d(iptr) = .FALSE.
             !
          ELSE 
-            IF(llwp) WRITE(kumout,*) 'wrk_release: unsupported value of kdim = ',kdim
-            CALL wrk_stop('wrk_release: unrecognised value for number of dimensions')
+            IF(llwp) WRITE(kumout,*) 'wrk_not_released: unsupported value of kdim = ',kdim
+            CALL wrk_stop('wrk_not_released: unrecognised value for number of dimensions')
          ENDIF
          
@@ -555,16 +555,16 @@
             EXIT
          ELSEIF( iarg == -99 ) THEN
-             CALL wrk_stop('wrk_release - caught unexpected argument count - BUG')   ;   EXIT
+             CALL wrk_stop('wrk_not_released - caught unexpected argument count - BUG')   ;   EXIT
          END IF
          !
       END DO ! end of DO WHILE()
       !
-   END FUNCTION wrk_release
-
-
-   FUNCTION llwrk_release( kdim, index1, index2, index3, index4, index5,   &
-      &                          index6, index7, index8, index9 )
-      !!----------------------------------------------------------------------
-      !!                 ***  FUNCTION wrk_release  ***
+   END FUNCTION wrk_not_released
+
+
+   FUNCTION llwrk_not_released( kdim, index1, index2, index3, index4, index5,   &
+      &                               index6, index7, index8, index9 )
+      !!----------------------------------------------------------------------
+      !!                 ***  FUNCTION wrk_not_released  ***
       !!----------------------------------------------------------------------
       INTEGER          , INTENT(in) ::   kdim             ! Dimensionality of workspace(s)
@@ -572,9 +572,9 @@
       INTEGER, OPTIONAL, INTENT(in) ::   index2, index3, index4, index5, index6, index7, index8, index9
       !
-      LOGICAL ::   llwrk_release   ! Return value
-      INTEGER ::   iarg, iptr      ! local integer
-      !!----------------------------------------------------------------------
-      !
-      llwrk_release = .TRUE.
+      LOGICAL ::   llwrk_not_released   ! Return value
+      INTEGER ::   iarg, iptr           ! local integer
+      !!----------------------------------------------------------------------
+      !
+      llwrk_not_released = .TRUE.
       iptr = index1
       iarg = 1
@@ -585,6 +585,6 @@
             !
             IF( iptr > num_2d_lwrkspaces ) THEN
-               CALL wrk_stop( 'llwrk_release : attempt to release a non-existent 2D workspace array' )
-               llwrk_release = .FALSE.
+               CALL wrk_stop( 'llwrk_not_released : attempt to release a non-existent 2D workspace array' )
+               llwrk_not_released = .FALSE.
                EXIT
             ENDIF
@@ -593,6 +593,6 @@
          ELSEIF( kdim == 3 ) THEN
             IF( iptr > num_3d_lwrkspaces ) THEN
-               CALL wrk_stop('llwrk_release : attempt to release a non-existent 3D workspace array')
-               llwrk_release = .FALSE.
+               CALL wrk_stop('llwrk_not_released : attempt to release a non-existent 3D workspace array')
+               llwrk_not_released = .FALSE.
                EXIT
             ENDIF
@@ -600,6 +600,6 @@
             !
          ELSE 
-            IF(llwp) WRITE(kumout,*) 'llwrk_release: unsupported value of kdim = ', kdim
-            CALL wrk_stop( 'llwrk_release : unrecognised value for number of dimensions' )
+            IF(llwp) WRITE(kumout,*) 'llwrk_not_released: unsupported value of kdim = ', kdim
+            CALL wrk_stop( 'llwrk_not_released : unrecognised value for number of dimensions' )
          END IF
          !
@@ -611,16 +611,16 @@
              EXIT
          ELSEIF( iarg == -99 ) THEN
-            CALL wrk_stop( 'llwrk_release : caught unexpected argument count - BUG' )   ;   EXIT
+            CALL wrk_stop( 'llwrk_not_released : caught unexpected argument count - BUG' )   ;   EXIT
          ENDIF
          !
       END DO ! while (iarg <= max_num_wrkspaces)
       !
-   END FUNCTION llwrk_release
-
-
-   FUNCTION iwrk_release( kdim, index1, index2, index3, index4,   &
-      &                         index5, index6, index7 )
-      !!----------------------------------------------------------------------
-      !!                 ***  FUNCTION iwrk_release  ***
+   END FUNCTION llwrk_not_released
+
+
+   FUNCTION iwrk_not_released( kdim, index1, index2, index3, index4,   &
+      &                              index5, index6, index7 )
+      !!----------------------------------------------------------------------
+      !!                 ***  FUNCTION iwrk_not_released  ***
       !!
       !! ** Purpose :   Flag that the specified INTEGER workspace arrays are
@@ -631,9 +631,9 @@
       INTEGER, OPTIONAL, INTENT(in) :: index2, index3, index4, index5, index6, index7
       !
-      LOGICAL :: iwrk_release   ! Return value
-      INTEGER :: iarg, iptr     ! local integer
-      !!----------------------------------------------------------------------
-      !
-      iwrk_release = .TRUE.
+      LOGICAL :: iwrk_not_released   ! Return value
+      INTEGER :: iarg, iptr          ! local integer
+      !!----------------------------------------------------------------------
+      !
+      iwrk_not_released = .TRUE.
       iptr         = index1
       iarg         = 1
@@ -643,11 +643,11 @@
          IF( kdim == 2 ) THEN
             IF( iptr > num_2d_iwrkspaces ) THEN
-               CALL wrk_stop('iwrk_release : attempt to release a non-existant 2D workspace array')
-               iwrk_release = .FALSE.
+               CALL wrk_stop('iwrk_not_released : attempt to release a non-existant 2D workspace array')
+               iwrk_not_released = .FALSE.
             ENDIF
             in_use_2di(iptr) = .FALSE.
          ELSE 
-            IF(llwp) WRITE(kumout,*) 'iwrk_release: unsupported value of kdim = ',kdim
-            CALL wrk_stop('iwrk_release: unsupported value for number of dimensions')
+            IF(llwp) WRITE(kumout,*) 'iwrk_not_released: unsupported value of kdim = ',kdim
+            CALL wrk_stop('iwrk_not_released: unsupported value for number of dimensions')
          ENDIF
          !
@@ -681,5 +681,5 @@
             EXIT
          CASE DEFAULT
-            CALL wrk_stop( 'iwrk_release : caught unexpected argument count - BUG' )
+            CALL wrk_stop( 'iwrk_not_released : caught unexpected argument count - BUG' )
             EXIT
          END SELECT
@@ -687,11 +687,11 @@
       END DO ! end of DO WHILE()
       !
-   END FUNCTION iwrk_release
-
-
-   FUNCTION wrk_release_xz( index1, index2, index3, index4, index5,   &
-      &                     index6, index7, index8, index9 )
-      !!----------------------------------------------------------------------
-      !!                 ***  FUNCTION wrk_release_xz  ***
+   END FUNCTION iwrk_not_released
+
+
+   FUNCTION wrk_not_released_xz( index1, index2, index3, index4, index5,   &
+      &                          index6, index7, index8, index9 )
+      !!----------------------------------------------------------------------
+      !!                 ***  FUNCTION wrk_not_released_xz  ***
       !!
       !!----------------------------------------------------------------------
@@ -699,9 +699,9 @@
       INTEGER, OPTIONAL, INTENT(in) :: index2, index3, index4, index5, index6, index7, index8, index9
       !
-      LOGICAL ::   wrk_release_xz   ! Return value
-      INTEGER ::   iarg, iptr       ! local integer
-      !!----------------------------------------------------------------------
-      !
-      wrk_release_xz = .TRUE.
+      LOGICAL ::   wrk_not_released_xz   ! Return value
+      INTEGER ::   iarg, iptr            ! local integer
+      !!----------------------------------------------------------------------
+      !
+      wrk_not_released_xz = .TRUE.
       iptr           = index1
       iarg           = 1
@@ -710,6 +710,6 @@
          !
          IF( iptr > num_xz_wrkspaces ) THEN
-            CALL wrk_stop('wrk_release_xz : attempt to release a non-existant 2D xz workspace array')
-            wrk_release_xz = .FALSE.
+            CALL wrk_stop('wrk_not_released_xz : attempt to release a non-existant 2D xz workspace array')
+            wrk_not_released_xz = .FALSE.
             EXIT
          ENDIF
@@ -723,5 +723,5 @@
             EXIT
          ELSEIF( iarg == -99 ) THEN
-            CALL wrk_stop('wrk_release_xz : caught unexpected argument count - BUG')
+            CALL wrk_stop('wrk_not_released_xz : caught unexpected argument count - BUG')
             EXIT
          END IF
@@ -729,5 +729,5 @@
       END DO ! while (iarg <= max_num_wrkspaces)
       !
-   END FUNCTION wrk_release_xz
+   END FUNCTION wrk_not_released_xz
 
 
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 2633)
@@ -114,5 +114,5 @@
      !!
      !!----------------------------------------------------------------------
-     USE wrk_nemo, ONLY: wrk_use, wrk_release
+     USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
      USE wrk_nemo, ONLY: zatmbc14 => wrk_2d_1
      USE wrk_nemo, ONLY:     zw3d => wrk_3d_1
@@ -146,5 +146,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(2, 1)) .OR. (.NOT. wrk_use(3, 1)) )THEN
+      IF( wrk_in_use(2, 1) .OR. wrk_in_use(3, 1) )THEN
          CALL ctl_stop('trc_sms_c14b : requested workspace arrays unavailable.')
          RETURN
@@ -331,5 +331,5 @@
       END IF
 
-      IF( (.NOT. wrk_release(2, 1)) .OR. (.NOT. wrk_release(3, 1)) )THEN
+      IF( wrk_not_released(2, 1) .OR. wrk_not_released(3, 1) )THEN
          CALL ctl_stop('trc_sms_c14b : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 2633)
@@ -95,5 +95,5 @@
       !!                CFC concentration in pico-mol/m3
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztrcfc => wrk_3d_1        ! use for CFC sms trend
       !!
@@ -115,5 +115,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1))THEN
+      IF(wrk_in_use(3, 1))THEN
          CALL ctl_stop('trc_sms_cfc : requested workspace array unavailable.')
          RETURN
@@ -218,5 +218,5 @@
       END IF
 
-      IF(.NOT. wrk_release(3, 1))THEN
+      IF(wrk_not_released(3, 1))THEN
          CALL ctl_stop('trc_sms_cfc : failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcbio.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcbio.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcbio.F90	(revision 2633)
@@ -60,5 +60,5 @@
       !!              for passive tracers are saved for futher diagnostics.
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use,  wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use,  wrk_not_released
       USE wrk_nemo, ONLY: wrk_3d_2, wrk_4d_1
       !!
@@ -86,5 +86,5 @@
 
 #if defined key_diatrc && defined key_iomput
-      IF( (.NOT. wrk_use(3, 2)) .OR. (.NOT. wrk_use(4, 1)) )THEN
+      IF( wrk_in_use(3, 2) .OR. wrk_in_use(4, 1) )THEN
          CALL ctl_stop('trc_bio : requested workspace arrays unavailable.')
          RETURN
@@ -500,5 +500,5 @@
       !
 #if defined key_diatrc && defined key_iomput
-      IF( (.NOT. wrk_release(3, 2)) .OR. (.NOT. wrk_release(4, 1)) )THEN
+      IF( wrk_not_released(3, 2) .OR. wrk_not_released(4, 1) )THEN
          CALL ctl_stop('trc_bio : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcini_lobster.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcini_lobster.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcini_lobster.F90	(revision 2633)
@@ -43,5 +43,5 @@
       !! ** purpose :   specific initialisation for LOBSTER bio-model
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zrro => wrk_2d_1, zdm0 => wrk_3d_1
       !!
@@ -50,5 +50,5 @@
       !!----------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(2, 1)) .OR. (.NOT. wrk_use(3, 1)) )THEN
+      IF( wrk_in_use(2, 1) .OR. wrk_in_use(3, 1) )THEN
          CALL ctl_stop('trc_ini_lobster : requested workspace arrays unavailable.')
          RETURN
@@ -259,5 +259,5 @@
       IF(lwp) WRITE(numout,*) ' '
 
-      IF( (.NOT. wrk_release(2, 1)) .OR. (.NOT. wrk_release(3, 1)) )THEN
+      IF( wrk_not_released(2, 1) .OR. wrk_not_released(3, 1) )THEN
          CALL ctl_stop('trc_ini_lobster : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcopt.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcopt.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcopt.F90	(revision 2633)
@@ -52,5 +52,5 @@
       !!                xze    ???
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zpar100 => wrk_2d_1, & ! irradiance at euphotic layer depth
                           zpar0m  => wrk_2d_2    ! irradiance just below the surface
@@ -68,5 +68,5 @@
       !!---------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(2, 1,2)) .OR. (.NOT. wrk_use(3, 2,3)) )THEN
+      IF( (wrk_in_use(2, 1,2)) .OR. (wrk_in_use(3, 2,3)) )THEN
          CALL ctl_stop('trc_opt : requested workspace arrays unavailable.')
          RETURN
@@ -138,5 +138,5 @@
       ENDIF
       !
-      IF( (.NOT. wrk_release(2, 1,2)) .OR. (.NOT. wrk_release(3, 2,3)) )THEN
+      IF( (wrk_not_released(2, 1,2)) .OR. (wrk_not_released(3, 2,3)) )THEN
          CALL ctl_stop('trc_opt : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcsed.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcsed.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcsed.F90	(revision 2633)
@@ -56,5 +56,5 @@
       !!              trend of passive tracers is saved for futher diagnostics.
       !!---------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zwork => wrk_3d_2
       USE wrk_nemo, ONLY: zw2d  => wrk_2d_1 ! only used (if defined 
@@ -69,5 +69,5 @@
       !!---------------------------------------------------------------------
 
-      IF( (.NOT. wrk_use(3,2)) .OR. (.NOT. wrk_use(2,1)) )THEN
+      IF( (wrk_in_use(3,2)) .OR. (wrk_in_use(2,1)) )THEN
          CALL ctl_stop('trc_sed : requested workspace arrays unavailable.')
          RETURN
@@ -150,5 +150,5 @@
       ENDIF
 
-      IF( (.NOT. wrk_release(3,2)) .OR. (.NOT. wrk_release(2,1)) )THEN
+      IF( (wrk_not_released(3,2)) .OR. (wrk_not_released(2,1)) )THEN
          CALL ctl_stop('trc_sed : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcsms_lobster.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcsms_lobster.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/LOBSTER/trcsms_lobster.F90	(revision 2633)
@@ -46,5 +46,5 @@
       !! ** Method  : - ???
       !! --------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: ztrlob => wrk_3d_1   ! used for lobster sms trends
       !!
@@ -53,5 +53,5 @@
       !! --------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3,1))THEN
+      IF(wrk_in_use(3,1))THEN
          CALL ctl_stop('trc_sms_lobster : requested workspace array unavailable.')
          RETURN
@@ -72,5 +72,5 @@
       IF( lk_trdmld_trc )  CALL trd_mld_bio( kt )   ! trends: Mixed-layer
 
-      IF(.NOT. wrk_release(3,1))THEN
+      IF(wrk_not_released(3,1))THEN
          CALL ctl_stop('trc_sms_lobster : failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90	(revision 2633)
@@ -74,5 +74,5 @@
       !! ** Method  : - Update the tracer with the advection term following nadv
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zun => wrk_3d_1, zvn => wrk_3d_2, &
                           zwn => wrk_3d_3   ! effective velocity
@@ -84,5 +84,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1,2,3))THEN
+      IF(wrk_in_use(3, 1,2,3))THEN
          CALL ctl_stop('trc_adv : requested workspace arrays unavailable.')
          RETURN
@@ -150,5 +150,5 @@
       END IF
       !
-      IF(.NOT. wrk_release(3, 1,2,3))THEN
+      IF(wrk_not_released(3, 1,2,3))THEN
          CALL ctl_stop('trc_adv : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 2633)
@@ -60,5 +60,5 @@
       !!
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, zemps => wrk_2d_1
       !! * Arguments
@@ -72,5 +72,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1))THEN
+      IF(wrk_in_use(2, 1))THEN
          CALL ctl_stop('trc_sbc: requested workspace array unavailable.')
          RETURN
@@ -126,5 +126,5 @@
       ENDIF
 
-      IF(.NOT. wrk_release(2, 1))THEN
+      IF(wrk_not_released(2, 1))THEN
          CALL ctl_stop('trc_sbc: failed to release workspace array.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/TRP/trdmld_trc.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/TRP/trdmld_trc.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/TRP/trdmld_trc.F90	(revision 2633)
@@ -116,5 +116,5 @@
       !!            surface and the control surface is called "mixed-layer"
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zvlmsk => wrk_2d_1
       !!
@@ -125,5 +125,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1))THEN
+      IF(wrk_in_use(2, 1))THEN
          CALL ctl_stop('trd_mld_trc_zint : requested workspace array unavailable.')
          RETURN
@@ -213,5 +213,5 @@
       END SELECT
 
-      IF(.NOT. wrk_release(2, 1))THEN
+      IF(wrk_not_released(2, 1))THEN
          CALL ctl_stop('trd_mld_trc_zint : failed to release workspace array.')
       END IF
@@ -237,5 +237,5 @@
       !!            surface and the control surface is called "mixed-layer"
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zvlmsk => wrk_2d_1
       !!
@@ -247,5 +247,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(2, 1))THEN
+      IF(wrk_in_use(2, 1))THEN
          CALL ctl_stop('trd_mld_bio_zint : requested workspace array unavailable.')
          RETURN
@@ -332,5 +332,5 @@
       END DO
 
-      IF(.NOT. wrk_release(2, 1))THEN
+      IF(wrk_not_released(2, 1))THEN
          CALL ctl_stop('trd_mld_bio_zint : failed to release workspace array.')
       END IF
@@ -387,5 +387,5 @@
       !!       - See NEMO documentation (in preparation)
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, wrk_3d_1, wrk_3d_2, wrk_3d_3, wrk_3d_4, &
                     wrk_3d_5, wrk_3d_6, wrk_3d_7, wrk_3d_8, &
@@ -414,5 +414,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1,2,3,4,5,6,7,8,9))THEN
+      IF(wrk_in_use(3, 1,2,3,4,5,6,7,8,9))THEN
          CALL ctl_stop('trd_mld_trc : requested workspace arrays unavailable.')
          RETURN
@@ -916,5 +916,5 @@
       IF( lrst_trc )   CALL trd_mld_trc_rst_write( kt )  ! this must be after the array swap above (III.3)
 
-      IF(.NOT. wrk_release(3, 1,2,3,4,5,6,7,8,9))THEN
+      IF(wrk_not_released(3, 1,2,3,4,5,6,7,8,9))THEN
          CALL ctl_stop('trd_mld_trc : failed to release workspace arrays.')
       END IF
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/prtctl_trc.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/prtctl_trc.F90	(revision 2632)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/prtctl_trc.F90	(revision 2633)
@@ -62,5 +62,5 @@
       !!                it must looks like: CALL prt_ctl( mask=tmask ).
       !!----------------------------------------------------------------------
-      USE wrk_nemo, ONLY: wrk_use, wrk_release
+      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY: zmask => wrk_3d_1, ztab3d => wrk_3d_2
       !!
@@ -78,5 +78,5 @@
       !!----------------------------------------------------------------------
 
-      IF(.NOT. wrk_use(3, 1,2))THEN
+      IF(wrk_in_use(3, 1,2))THEN
          CALL ctl_stop('prt_ctl_trc : requested workspace arrays unavailable.')
          RETURN
@@ -158,5 +158,5 @@
       END DO
       !
-      IF(.NOT. wrk_release(3, 1,2))THEN
+      IF(wrk_not_released(3, 1,2))THEN
          CALL ctl_stop('prt_ctl_trc : failed to release workspace arrays.')
       END IF
