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 2620)
+++ 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
