Index: branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_hgr.F90
===================================================================
--- branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_hgr.F90	(revision 6895)
+++ branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_hgr.F90	(revision 6900)
@@ -2,20 +2,23 @@
    !!==============================================================================
    !!                       ***  MODULE usrdef_hgr   ***
-   !! User defined module: used like example to define domain, init, sbc, ...
+   !!
+   !!                     ===  OVERFLOW configuration  ===
+   !!
+   !! User defined : horizontal mesh   
    !!==============================================================================
-   !! History :  NEMO ! 2016-03  (S. Flavoni) 
+   !! History :  NEMO  ! 2016-08  (S. Flavoni, G. Madec)  Original code
    !!----------------------------------------------------------------------
 
    !!----------------------------------------------------------------------
-   !!   usr_def_hgr   : initialize the horizontal mesh 
+   !!   usr_def_hgr    : initialize the horizontal mesh for OVERFLOW configuration
    !!----------------------------------------------------------------------
-   USE dom_oce  , ONLY: nimpp, njmpp       ! ocean space and time domain
-   USE par_oce        ! ocean space and time domain
-   USE phycst         ! physical constants
-   USE usrdef_nam     !
+   USE dom_oce  ,  ONLY: nimpp, njmpp       ! ocean space and time domain
+   USE par_oce         ! ocean space and time domain
+   USE phycst          ! physical constants
+   USE usrdef_nam, ONLY: rn_dx   ! horizontal resolution in meters
    !
-   USE in_out_manager ! I/O manager
-   USE lib_mpp        ! MPP library
-   USE timing         ! Timing
+   USE in_out_manager  ! I/O manager
+   USE lib_mpp         ! MPP library
+   USE timing          ! Timing
    
    IMPLICIT NONE
@@ -43,9 +46,6 @@
       !!
       !! ** Method  :   set all intent(out) argument to a proper value
-      !!
-      !!                Here OVERFLOW configuration :
-      !!           periodic domain (north/south) over an overflow bathymetry
-      !!          - on a beta-plane
-      !!          - with NO Coriolis 
+      !!                OVERFLOW configuration : uniform grid spacing (1km)
+      !!                without Coriolis force (f=0)
       !!
       !! ** Action  : - define longitude & latitude of t-, u-, v- and f-points (in degrees) 
@@ -63,66 +63,45 @@
       REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1e2u, pe1e2v               ! u- & v-surfaces (if reduction in strait)   [m2]
       !
-      INTEGER  ::   ji, jj               ! dummy loop indices
-      REAL(wp) ::   zlam1, zlam0, zcos_alpha, zim1 , zjm1 , ze1  , ze1deg, zf0 ! local scalars
-      REAL(wp) ::   zphi1, zphi0, zsin_alpha, zim05, zjm05, zbeta, znorme      !   -      -
+      INTEGER  ::   ji, jj   ! dummy loop indices
+      REAL(wp) ::   zfact      ! local scalars
       !!-------------------------------------------------------------------------------
       !
       IF( nn_timing == 1 )  CALL timing_start('usr_def_hgr')
       !
-      !     !==  beta-plane with regular grid-spacing and rotated domain ==!  (OVERFLOW configuration)
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) 'usr_def_hgr : OVERFLOW configuration bassin'
+      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   uniform 1km grid spacing WITHOUT Coriolis force (f=0)'
       !
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'usr_def_hgr : OVERFLOW configuration bassin on beta-plane with NO Coriolis)'
-      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
-      !
-      !
-      !                       !==  grid point position  ==!
-      !                       !==  f-plane with regular grid-spacing  ==!
-      !
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' OVERFLOW f-plane with regular grid-spacing'
-      !
-      ! Position coordinates 
-      !                          ==========
+      !                       !==  grid point position  ==!   (in kilometers)
+      zfact = rn_dx * 1.e-3         ! conversion in km
       DO jj = 1, jpj
-         DO ji = 1, jpi
-            ! glamt(i,j) longitude at T-point
-            pglamt(ji,jj) = - 0.5 + ( REAL( ji - 1 + nimpp - 1 )       )
-            ! glamu(i,j) longitude at U-point
-            pglamu(ji,jj) = - 0.5 + ( REAL( ji - 1 + nimpp - 1 ) + 0.5 )
-            ! glamv(i,j) longitude at V-point
+         DO ji = 1, jpi             ! longitude
+            pglamt(ji,jj) = zfact * (  - 0.5 + ( REAL( ji-1 + nimpp-1 )       , wp )  )
+            pglamu(ji,jj) = zfact * (  - 0.5 + ( REAL( ji-1 + nimpp-1 ) + 0.5 , wp )  )
             pglamv(ji,jj) = pglamt(ji,jj)
-            ! glamf(i,j) longitude at F-point
             pglamf(ji,jj) = pglamu(ji,jj)
-            !
-            !gphit(i,j) latitude at T-point
-            pgphit(ji,jj) = - 0.5 + ( REAL( jj - 1 + njmpp - 1 )       )
-            !gphiu(i,j) latitude at U-point
+            !                       ! latitude
+            pgphit(ji,jj) = zfact * (  - 0.5 + ( REAL( jj-1 + njmpp-1 )       , wp )  )
             pgphiu(ji,jj) = pgphit(ji,jj)
-            !gphiv(i,j) latitude at V-point
-            pgphiv(ji,jj) = - 0.5 + ( REAL( jj - 1 + njmpp - 1 ) + 0.5 )
-            !gphif(i,j) latitude at F-point
+            pgphiv(ji,jj) = zfact * (  - 0.5 + ( REAL( jj-1 + njmpp-1 ) + 0.5 , wp )  )
             pgphif(ji,jj) = pgphiv(ji,jj)
          END DO
       END DO
       !
-      ! Horizontal scale factors (in meters)
-      !                              ======
-      pe1t(:,:) = 1000      ;      pe2t(:,:) = 1000
-      pe1u(:,:) = 1000      ;      pe2u(:,:) = 1000
-      pe1v(:,:) = 1000      ;      pe2v(:,:) = 1000
-      pe1f(:,:) = 1000      ;      pe2f(:,:) = 1000
+      !                       !==  Horizontal scale factors  ==!   (in meters) 
+      pe1t(:,:) = rn_dx   ;   pe2t(:,:) = rn_dx
+      pe1u(:,:) = rn_dx   ;   pe2u(:,:) = rn_dx
+      pe1v(:,:) = rn_dx   ;   pe2v(:,:) = rn_dx
+      pe1f(:,:) = rn_dx   ;   pe2f(:,:) = rn_dx
       !
-      !                                         ! NO reduction of grid size in some straits 
-      ke1e2u_v = 0                              !    ==>> u_ & v_surfaces will be computed in dom_ghr routine
+      !                             ! NO reduction of grid size in some straits 
+      ke1e2u_v = 0                  !    ==>> u_ & v_surfaces will be computed in dom_ghr routine
       !
       !
       !                       !==  Coriolis parameter  ==!
-      kff = 1                                            !  indicate not to compute ff afterward
+      kff = 1                       !  indicate not to compute Coriolis parameter afterward
       !
-      pff_f(:,:) = 0
-      pff_t(:,:) = 0
-      !
-      IF(lwp) WRITE(numout,*) '                           beta-plane used. beta = ', zbeta, ' 1/(s.m)'
+      pff_f(:,:) = 0._wp            ! here No earth rotation: f=0
+      pff_t(:,:) = 0._wp
       !
       IF( nn_timing == 1 )  CALL timing_stop('usr_def_hgr')
