Index: /branches/UKMO/dev_r8600_closea_rewrite/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90
===================================================================
--- /branches/UKMO/dev_r8600_closea_rewrite/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90	(revision 9154)
+++ /branches/UKMO/dev_r8600_closea_rewrite/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90	(revision 9155)
@@ -1,5 +1,5 @@
 MODULE closea
    !!======================================================================
-   !!                   ***  MODULE  usrdef_closea  ***
+   !!                   ***  MODULE  closea  ***
    !!
    !! User define : specific treatments associated with closed seas
@@ -30,5 +30,4 @@
    USE lib_mpp         ! MPP library
    USE timing
-   USE wrk_nemo        ! Memory allocation
 
    IMPLICIT NONE
@@ -95,5 +94,5 @@
       INTEGER ::   id      ! netcdf variable ID
 
-      REAL(wp), POINTER, DIMENSION(:,:) :: zdata_in ! temporary real array for input
+      REAL(wp), DIMENSION(jpi,jpj) :: zdata_in ! temporary real array for input
       !!----------------------------------------------------------------------
       !
@@ -102,6 +101,4 @@
       IF(lwp) WRITE(numout,*)'~~~~~~~'
       !
-      CALL wrk_alloc( jpi,jpj, zdata_in)
-      ! 
       ! read the closed seas masks (if they exist) from domain_cfg file
       ! ---------------------------------------------------------------
@@ -179,6 +176,4 @@
       CALL iom_close( inum )
       !
-      CALL wrk_dealloc(jpi,jpj, zdata_in)
-      !
    END SUBROUTINE dom_clo
 
@@ -202,15 +197,12 @@
       REAL(wp), PARAMETER ::   rsmall = 1.e-20_wp    ! Closed sea correction epsilon
       REAL(wp)            ::   zfwf_total, zcoef, zcoef1         ! 
-      REAL(wp), POINTER, DIMENSION(:)   ::   zfwf, zfwfr, zfwfe     ! freshwater fluxes over closed seas
-      REAL(wp), POINTER, DIMENSION(:,:) ::   ztmp2d   ! 2D workspace
+      REAL(wp), DIMENSION(jncs)    ::   zfwf      !:
+      REAL(wp), DIMENSION(jncsr+1) ::   zfwfr     !: freshwater fluxes over closed seas
+      REAL(wp), DIMENSION(jncse+1) ::   zfwfe     !: 
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztmp2d   ! 2D workspace
       !!----------------------------------------------------------------------
       !
       IF( nn_timing == 1 )  CALL timing_start('sbc_clo')
       !
-      CALL wrk_alloc( jncs, zfwf )
-      ! jncsr and jncse can be zero so add 1 to avoid allocating zero-length arrays
-      CALL wrk_alloc( jncsr+1, zfwfr )
-      CALL wrk_alloc( jncse+1, zfwfe )
-      CALL wrk_alloc( jpi,jpj, ztmp2d )
       !                                                   !------------------! 
       IF( kt == nit000 ) THEN                             !  Initialisation  !
@@ -395,9 +387,4 @@
       CALL lbc_lnk( emp , 'T', 1._wp )
       !
-      CALL wrk_dealloc( jncs   , zfwf )
-      CALL wrk_dealloc( jncsr+1  , zfwfr )
-      CALL wrk_dealloc( jncse+1  , zfwfe )
-      CALL wrk_dealloc( jpi,jpj, ztmp2d )
-      !
       IF( nn_timing == 1 )  CALL timing_stop('sbc_clo')
       !
@@ -449,6 +436,6 @@
       INTEGER, DIMENSION(:,:), INTENT(inout) ::   k_top, k_bot   ! ocean first and last level indices
       INTEGER                           :: inum, id
-      INTEGER,  POINTER, DIMENSION(:,:) :: closea_mask ! closea_mask field
-      REAL(wp), POINTER, DIMENSION(:,:) :: zdata_in ! temporary real array for input
+      INTEGER,  DIMENSION(jpi,jpj) :: closea_mask ! closea_mask field
+      REAL(wp), DIMENSION(jpi,jpj) :: zdata_in ! temporary real array for input
       !!----------------------------------------------------------------------
       !
@@ -464,6 +451,4 @@
       IF( id > 0 ) THEN
          IF( lwp ) WRITE(numout,*) 'Suppressing closed seas in bathymetry based on closea_mask field,'
-         CALL wrk_alloc( jpi,jpj, zdata_in)
-         CALL wrk_alloc( jpi,jpj, closea_mask)
          CALL iom_get ( inum, jpdom_data, 'closea_mask', zdata_in )
          closea_mask(:,:) = NINT(zdata_in(:,:))
@@ -472,6 +457,4 @@
             k_bot(:,:) = 0   
          ENDWHERE
-         CALL wrk_dealloc( jpi,jpj, zdata_in)
-         CALL wrk_dealloc( jpi,jpj, closea_mask)
       ELSE
          IF( lwp ) WRITE(numout,*) 'No closea_mask field found in domain_cfg file. No suppression of closed seas.'
