Index: trunk/NEMO/OFF_SRC/DOM/domrea.F90
===================================================================
--- trunk/NEMO/OFF_SRC/DOM/domrea.F90	(revision 361)
+++ trunk/NEMO/OFF_SRC/DOM/domrea.F90	(revision 382)
@@ -91,5 +91,5 @@
          inum4                      ! 'mesh_zgr.nc'  file
       INTEGER  ::   itime           !  output from restini ???
-      REAL(wp) ::   zdate0, zdepwp, ze3tp, ze3wp
+      REAL(wp) ::   zdate0, zdt
       REAL(wp), DIMENSION(jpidta,jpjdta) ::   &
          zta       ! dummy array for bathymetry 
@@ -112,4 +112,5 @@
 
       llog  = .FALSE.
+
       CALL ymds2ju( 0, 1, 1, 0.e0, zdate0 )    ! calendar initialization
 
@@ -128,5 +129,5 @@
             CALL restini( clnam0, jpidta   , jpjdta   , glamt, gphit,  &   ! create 'mesh_mask.nc' file
             &             jpk   , gdept , trim(clnam0)        ,  &   ! in unit inum0
-            &             itime , zdate0, rdt   , inum0, domain_id=nidom )
+            &             itime , zdate0, zdt   , inum0, domain_id=nidom )
             inum2 = inum0                                            ! put all the informations
             inum3 = inum0                                            ! in unit inum0
@@ -141,8 +142,8 @@
             CALL restini( clnam1, jpidta   , jpjdta   , glamt, gphit,  &   ! create 'mesh.nc' file 
             &             jpk   , gdept , trim(clnam1)        ,  &   ! in unit inum1 
-            &             itime , zdate0, rdt   , inum1, domain_id=nidom )
+            &             itime , zdate0, zdt   , inum1, domain_id=nidom )
             CALL restini( clnam2, jpidta   , jpjdta   , glamt, gphit,  &   ! create 'mask.nc' file 
             &             jpk   , gdept , trim(clnam2)        ,  &   ! in unit inum2 
-            &             itime , zdate0, rdt   , inum2, domain_id=nidom )
+            &             itime , zdate0, zdt   , inum2, domain_id=nidom )
             inum3 = inum1                                            ! put mesh informations 
             inum4 = inum1                                            ! in unit inum1 
@@ -157,11 +158,11 @@
             CALL restini( clnam3, jpidta   , jpjdta   , glamt, gphit,  &   ! create 'mesh_hgr.nc' file
             &             jpk   , gdept , trim(clnam3)        ,  &   ! in unit inum3
-            &             itime , zdate0, rdt   , inum3, domain_id=nidom )
+            &             itime , zdate0, zdt   , inum3, domain_id=nidom )
             CALL restini( clnam4, jpidta   , jpjdta   , glamt, gphit,  &   ! create 'mesh_zgr.nc' file
             &             jpk   , gdept , trim(clnam4)        ,  &   ! in unit inum4
-            &             itime , zdate0, rdt   , inum4, domain_id=nidom )
+            &             itime , zdate0, zdt   , inum4, domain_id=nidom )
             CALL restini( clnam2, jpidta   , jpjdta   , glamt, gphit,  &   ! create 'mask.nc' file
             &             jpk   , gdept , trim(clnam2)        ,  &   ! in unit inum2
-            &             itime , zdate0, rdt   , inum2, domain_id=nidom )
+            &             itime , zdate0, zdt   , inum2, domain_id=nidom )
 
          END SELECT
@@ -200,4 +201,15 @@
            END DO
          END DO
+
+#if defined key_off_degrad
+         CALL restget( inum2, 'facvolt', jpidta, jpjdta, jpk, 0, llog, zt3a )
+         DO jk = 1, jpk
+           DO jj = 1, nlcj
+             DO ji = 1, nlci
+               facvol(ji,jj,jk) = zt3a(mig(ji),mjg(jj),jk)
+             END DO
+           END DO
+         END DO
+#endif
 
          !                                                         ! horizontal mesh (inum3)
@@ -391,41 +403,22 @@
          CALL restget( inum4, 'e3w'   , 1, 1, jpk, 0, llog, e3w   )
 
-         do jk=1,jpk
-        gdept_ps(:,:,jk) = gdept(jk)
-        gdepw_ps(:,:,jk) = gdepw(jk)
-         end do
-
-     DO jj = 1, jpj
-        DO ji = 1, jpi
-           ik = mbathy(ji,jj) 
-           ! ocean point only 
-           IF( ik > 0 ) THEN
-              ! max ocean level case
-              IF( ik == jpkm1 ) THEN
-                 zdepwp = mbathy(ji,jj)
-                 ze3tp  = mbathy(ji,jj) - gdepw(ik)
-                 ze3wp = 0.5 * e3w(ik) * ( 1. + ( ze3tp/e3t(ik) ) )
-                 gdepw_ps(ji,jj,ik+1) = zdepwp
-                 gdept_ps(ji,jj,ik  ) = gdept(ik-1) + ze3wp
-                 gdept_ps(ji,jj,ik+1) = gdept_ps(ji,jj,ik) + ze3tp
-                 ! standard case
-              ELSE
-!!alex
-                 IF( mbathy(ji,jj) <= gdepw(ik+1) ) THEN
-                    gdepw_ps(ji,jj,ik+1) = mbathy(ji,jj)
-                 ELSE
-                    gdepw_ps(ji,jj,ik+1) = gdepw(ik+1)
-                 ENDIF
-!!Alex
-!!Alex           gdepw_ps(ji,jj,ik+1) = mbathy(ji,jj)
-                 gdept_ps(ji,jj,ik  ) =  gdepw(ik) + ( gdepw_ps(ji,jj,ik+1) - gdepw(ik))   &
-                                      * ((gdept   (      ik  ) - gdepw(ik))   &
-                                      / ( gdepw   (      ik+1) - gdepw(ik)))
-                 gdept_ps(ji,jj,ik+1) = gdept_ps(ji,jj,ik) + e3t_ps  (ji,jj,ik)
-              ENDIF
-           ENDIF
-        END DO
-     END DO
-
+         DO jk=1,jpk
+            gdept_ps(:,:,jk) = gdept(jk)
+            gdepw_ps(:,:,jk) = gdepw(jk)
+         END DO
+
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               ik = mbathy(ji,jj) - 1
+               ! ocean point only 
+               IF( ik > 0 ) THEN
+                  ! max ocean level case
+                  gdepw_ps(ji,jj,ik+1) = hdepw(ji,jj)
+                  gdept_ps(ji,jj,ik  ) = hdept(ji,jj)
+                  gdept_ps(ji,jj,ik+1) = gdept_ps(ji,jj,ik) + e3t_ps(ji,jj,ik)
+               ENDIF
+            END DO
+         END DO
+         
 
 # else
