Index: trunk/NEMO/OFF_SRC/DOM/domrea.F90
===================================================================
--- trunk/NEMO/OFF_SRC/DOM/domrea.F90	(revision 1640)
+++ trunk/NEMO/OFF_SRC/DOM/domrea.F90	(revision 1641)
@@ -191,25 +191,7 @@
          ENDDO
 
-         ! Vertical coordinates and scales factors
-         !
-         CALL iom_get( inum4, jpdom_unknown, 'gdept_0', gdept_0 ) ! depth
-         CALL iom_get( inum4, jpdom_unknown, 'gdepw_0', gdepw_0 )
-         CALL iom_get( inum4, jpdom_unknown, 'e3t_0'  , e3t_0   )
-         CALL iom_get( inum4, jpdom_unknown, 'e3w_0'  , e3w_0   )
-
 #if ! defined key_zco
 
-         CALL iom_get( inum4, jpdom_data, 'e3t', e3t ) ! scale factors
-         CALL iom_get( inum4, jpdom_data, 'e3u', e3u )
-         CALL iom_get( inum4, jpdom_data, 'e3v', e3v )
-         CALL iom_get( inum4, jpdom_data, 'e3w', e3w )
- 
-         DO jk = 1,jpk
-            gdept(:,:,jk) = gdept_0(jk)
-            gdepw(:,:,jk) = gdepw_0(jk)
-         END DO
-         
          IF( ln_sco ) THEN                                         ! s-coordinate
-
             CALL iom_get( inum4, jpdom_data, 'hbatt', hbatt )
             CALL iom_get( inum4, jpdom_data, 'hbatu', hbatu )
@@ -223,13 +205,41 @@
             CALL iom_get( inum4, jpdom_unknown, 'esigw', esigw )
 
+            CALL iom_get( inum4, jpdom_data, 'e3t', e3t ) ! scale factors
+            CALL iom_get( inum4, jpdom_data, 'e3u', e3u )
+            CALL iom_get( inum4, jpdom_data, 'e3v', e3v )
+            CALL iom_get( inum4, jpdom_data, 'e3w', e3w )
+
+            CALL iom_get( inum4, jpdom_unknown, 'gdept_0', gdept_0 ) ! depth
+            CALL iom_get( inum4, jpdom_unknown, 'gdepw_0', gdepw_0 )
          ENDIF
+
+ 
+         DO jk = 1,jpk
+            gdept(:,:,jk) = gdept_0(jk)
+            gdepw(:,:,jk) = gdepw_0(jk)
+         END DO
+         
 
          IF( ln_zps ) THEN   
                                       ! z-coordinate - partial steps
-            CALL iom_get( inum4, jpdom_data, 'hdept', hdept )   ! depth
-            CALL iom_get( inum4, jpdom_data, 'hdepw', hdepw )
+            IF( nmsh <= 6 ) THEN                                   !    ! 3D vertical scale factors
+              CALL iom_get( inum4, jpdom_data, 'e3t', e3t ) ! scale factors
+              CALL iom_get( inum4, jpdom_data, 'e3u', e3u )
+              CALL iom_get( inum4, jpdom_data, 'e3v', e3v )
+              CALL iom_get( inum4, jpdom_data, 'e3w', e3w )
+            ELSE                                                   !    ! 2D bottom scale factors
+              CALL iom_get( inum4, jpdom_data, 'e3t_ps', e3tp )
+              CALL iom_get( inum4, jpdom_data, 'e3w_ps', e3wp )
+            END IF
+
+            IF( nmsh <= 3 ) THEN                                   !    ! 3D depth
+              CALL iom_get( inum4, jpdom_data, 'gdept', gdept ) ! scale factors
+              CALL iom_get( inum4, jpdom_data, 'gdepw', gdepw )
+            ELSE                                                   !    ! 2D bottom depth
+              CALL iom_get( inum4, jpdom_data, 'hdept', hdept )   ! depth
+              CALL iom_get( inum4, jpdom_data, 'hdepw', hdepw )
          
-            DO jj = 1, jpj
-               DO ji = 1, jpi
+              DO jj = 1, jpj
+                DO ji = 1, jpi
                   ik = mbathy(ji,jj) - 1
                   ! ocean point only 
@@ -240,10 +250,23 @@
                      gdept(ji,jj,ik+1) = gdept(ji,jj,ik) + e3t(ji,jj,ik)
                   ENDIF
-               END DO
-            END DO
+                END DO
+              END DO
+            ENDIF
 
          ENDIF
-            
+         ! Vertical coordinates and scales factors
+         CALL iom_get( inum4, jpdom_unknown, 'gdept_0', gdept_0 ) ! depth
+         CALL iom_get( inum4, jpdom_unknown, 'gdepw_0', gdepw_0 )
+         CALL iom_get( inum4, jpdom_unknown, 'e3t_0'  , e3t_0   )
+         CALL iom_get( inum4, jpdom_unknown, 'e3w_0'  , e3w_0   )
 # endif
+         IF( ln_zco ) THEN
+           ! Vertical coordinates and scales factors
+           CALL iom_get( inum4, jpdom_unknown, 'gdept_0', gdept_0 ) ! depth
+           CALL iom_get( inum4, jpdom_unknown, 'gdepw_0', gdepw_0 )
+           CALL iom_get( inum4, jpdom_unknown, 'e3t_0'  , e3t_0   )
+           CALL iom_get( inum4, jpdom_unknown, 'e3w_0'  , e3w_0   )
+         ENDIF
+
 
       ! Control printing : Grid informations (if not restart)
