Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 2462)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 2463)
@@ -18,28 +18,29 @@
 
    !!----------------------------------------------------------------------
-   !!   dom_zgr         : defined the ocean vertical coordinate system
-   !!       zgr_bat     : bathymetry fields (levels and meters)
-   !!       zgr_bat_zoom: modify the bathymetry field if zoom domain
-   !!       zgr_bat_ctl : check the bathymetry files
-   !!       zgr_z       : reference z-coordinate 
-   !!       zgr_zco     : z-coordinate 
-   !!       zgr_zps     : z-coordinate with partial steps
-   !!       zgr_sco     : s-coordinate
-   !!       fssig       : sigma coordinate non-dimensional function
-   !!       dfssig      : derivative of the sigma coordinate function    !!gm  (currently missing!)
+   !!   dom_zgr          : defined the ocean vertical coordinate system
+   !!       zgr_bat      : bathymetry fields (levels and meters)
+   !!       zgr_bat_zoom : modify the bathymetry field if zoom domain
+   !!       zgr_bat_ctl  : check the bathymetry files
+   !!       zgr_bot_level: deepest ocean level for t-, u, and v-points
+   !!       zgr_z        : reference z-coordinate 
+   !!       zgr_zco      : z-coordinate 
+   !!       zgr_zps      : z-coordinate with partial steps
+   !!       zgr_sco      : s-coordinate
+   !!       fssig        : sigma coordinate non-dimensional function
+   !!       dfssig       : derivative of the sigma coordinate function    !!gm  (currently missing!)
    !!---------------------------------------------------------------------
-   USE oce              ! ocean variables
-   USE dom_oce          ! ocean domain
-   USE closea           ! closed seas
-   USE c1d              ! 1D vertical configuration
-   USE in_out_manager   ! I/O manager
-   USE iom              ! I/O library
-   USE lbclnk           ! ocean lateral boundary conditions (or mpp link)
-   USE lib_mpp          ! distributed memory computing library
+   USE oce               ! ocean variables
+   USE dom_oce           ! ocean domain
+   USE closea            ! closed seas
+   USE c1d               ! 1D vertical configuration
+   USE in_out_manager    ! I/O manager
+   USE iom               ! I/O library
+   USE lbclnk            ! ocean lateral boundary conditions (or mpp link)
+   USE lib_mpp           ! distributed memory computing library
 
    IMPLICIT NONE
    PRIVATE
 
-   PUBLIC   dom_zgr     ! called by dom_init.F90
+   PUBLIC   dom_zgr      ! called by dom_init.F90
 
    !                                       !!* Namelist namzgr_sco *
@@ -104,13 +105,20 @@
       IF( ln_sco ) ioptio = ioptio + 1
       IF( ioptio /= 1 )   CALL ctl_stop( ' none or several vertical coordinate options used' )
-
+      !
       ! Build the vertical coordinate system
       ! ------------------------------------
-                     CALL zgr_z        ! Reference z-coordinate system (always called)
-                     CALL zgr_bat      ! Bathymetry fields (levels and meters)
-      IF( ln_zco )   CALL zgr_zco      ! z-coordinate
-      IF( ln_zps )   CALL zgr_zps      ! Partial step z-coordinate
-      IF( ln_sco )   CALL zgr_sco      ! s-coordinate or hybrid z-s coordinate
-
+                          CALL zgr_z            ! Reference z-coordinate system (always called)
+                          CALL zgr_bat          ! Bathymetry fields (levels and meters)
+      IF( ln_zco      )   CALL zgr_zco          ! z-coordinate
+      IF( ln_zps      )   CALL zgr_zps          ! Partial step z-coordinate
+      IF( ln_sco      )   CALL zgr_sco          ! s-coordinate or hybrid z-s coordinate
+      !
+      ! final adjustment of mbathy & check 
+      ! -----------------------------------
+      IF( lzoom       )   CALL zgr_bat_zoom     ! correct mbathy in case of zoom subdomain
+      IF( .NOT.lk_c1d )   CALL zgr_bat_ctl      ! check bathymetry (mbathy) and suppress isoated ocean points
+                          CALL zgr_bot_level    ! deepest ocean level for t-, u- and v-points
+      !
+      !
       IF( nprint == 1 .AND. lwp )   THEN
          WRITE(numout,*) ' MIN val mbathy ', MINVAL( mbathy(:,:) ), ' MAX ', MAXVAL( mbathy(:,:) )
@@ -488,15 +496,5 @@
          END DO
       ENDIF
-      !                                               ! =============== !
-      IF( lzoom       )   CALL zgr_bat_zoom           !   Zoom domain   !
-      !                                               ! =============== !
-      !
-      !                                               ! =================== !
-      IF( .NOT.lk_c1d )   CALL zgr_bat_ctl            !   Bathymetry check  !
-      !                                               ! =================== !
-      !
-      !                                               ! ========================= !
-                          CALL zgr_bot_level          !   level of ocean bottom   !
-      !                                               ! ========================= !
+      !
    END SUBROUTINE zgr_bat
 
@@ -747,7 +745,4 @@
    END SUBROUTINE zgr_zco
 
-   !!----------------------------------------------------------------------
-   !!   Default option :                      zco, zps and/or sco available (gedp & e3 are 3D arrays)
-   !!----------------------------------------------------------------------
 
    SUBROUTINE zgr_zps
@@ -989,5 +984,5 @@
          gdep3w(:,:,jk) = gdep3w(:,:,jk-1) + e3w(:,:,jk) 
       END DO
-          
+        
       !                                               ! ================= !
       IF(lwp .AND. ll_print) THEN                     !   Control print   !
@@ -1018,11 +1013,4 @@
       ENDIF  
       !
-      !                                               ! =============== !
-      IF( lzoom )   CALL zgr_bat_zoom                 !   Zoom domain   !
-      !                                               ! =============== !
-      !
-      !                                               ! =================== !
-      IF( .NOT. lk_c1d )    CALL zgr_bat_ctl          !   Bathymetry check  !
-      !                                               ! =================== !
    END SUBROUTINE zgr_zps
 
@@ -1501,13 +1489,4 @@
          &                                                       ' MAX ', MAXVAL( mbathy(:,:) )
 
-
-      !                                               ! ===========
-      IF( lzoom )   CALL zgr_bat_zoom                 ! Zoom domain 
-      !                                               ! ===========
-      !
-      !                                               ! =================== !
-      IF( .NOT. lk_c1d )    CALL zgr_bat_ctl          !   Bathymetry check  !
-      !                                               ! =================== !
-      !
       !                                               ! =============
       IF(lwp) THEN                                    ! Control print
