Index: /NEMO/trunk/tests/SAS_BIPER/EXPREF/1_namelist_cfg
===================================================================
--- /NEMO/trunk/tests/SAS_BIPER/EXPREF/1_namelist_cfg	(revision 9762)
+++ /NEMO/trunk/tests/SAS_BIPER/EXPREF/1_namelist_cfg	(revision 9763)
@@ -22,4 +22,5 @@
    rn_dx       =    1000.   ! horizontal resolution in meters
    rn_dy       =    1000.   ! horizontal resolution in meters
+   rn_ppgphi0  =     70.    ! Reference latitude [degrees]
 /
 !-----------------------------------------------------------------------
Index: /NEMO/trunk/tests/SAS_BIPER/EXPREF/namelist_cfg
===================================================================
--- /NEMO/trunk/tests/SAS_BIPER/EXPREF/namelist_cfg	(revision 9762)
+++ /NEMO/trunk/tests/SAS_BIPER/EXPREF/namelist_cfg	(revision 9763)
@@ -22,4 +22,5 @@
    rn_dx       =    3000.   ! horizontal resolution in meters
    rn_dy       =    3000.   ! horizontal resolution in meters
+   rn_ppgphi0  =     70.    ! Reference latitude [degrees]
 /
 !-----------------------------------------------------------------------
Index: /NEMO/trunk/tests/SAS_BIPER/MY_SRC/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/tests/SAS_BIPER/MY_SRC/usrdef_hgr.F90	(revision 9762)
+++ /NEMO/trunk/tests/SAS_BIPER/MY_SRC/usrdef_hgr.F90	(revision 9763)
@@ -16,6 +16,6 @@
    USE par_oce         ! ocean space and time domain
    USE phycst          ! physical constants
-   USE usrdef_nam, ONLY: rn_dx, rn_dy   ! horizontal resolution in meters
-   !
+   USE usrdef_nam, ONLY: rn_dx, rn_dy, rn_ppgphi0   ! horizontal resolution in meters
+   !                                                  and reference latitude
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! MPP library
@@ -64,6 +64,5 @@
       INTEGER  ::   ji, jj   ! dummy loop indices
       REAL(wp) ::   zphi0, zlam0, zbeta, zf0
-      REAL(wp) ::   zti, zui, zvi, zfi   ! local scalars
-      REAL(wp) ::   ztj, zuj, zvj, zfj   !   -      -
+      REAL(wp) ::   zti, zui, ztj, zvj   ! local scalars
       !!-------------------------------------------------------------------------------
       !
@@ -75,6 +74,4 @@
 
       !                          ==========
-!clem      zlam0 = 0._wp
-!clem      zphi0 = 0._wp
       zlam0 = -(jpiglo-1)/2 * 1.e-3 * rn_dx
       zphi0 = -(jpjglo-1)/2 * 1.e-3 * rn_dy
@@ -88,6 +85,4 @@
          zphi0 = ( 0.5_wp - ( Agrif_parent(jpjglo) - 1 ) / 2 ) * 1.e-3 * Agrif_irhoy() * rn_dy  &
             &  + ( Agrif_Iy() + nbghostcells - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dy * 1.e-3
-         rn_dx = Agrif_Parent(rn_dx)/Agrif_Rhox()
-         rn_dy = Agrif_Parent(rn_dy)/Agrif_Rhoy()          
       ENDIF
 #endif         
@@ -95,18 +90,16 @@
       DO jj = 1, jpj
          DO ji = 1, jpi
-            zti = FLOAT( ji - 1 + nimpp - 1 )         ;   ztj = FLOAT( jj - 1 + njmpp - 1 )
-            zui = FLOAT( ji - 1 + nimpp - 1 ) + 0.5   ;   zuj = FLOAT( jj - 1 + njmpp - 1 )
-            zvi = FLOAT( ji - 1 + nimpp - 1 )         ;   zvj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5
-            zfi = FLOAT( ji - 1 + nimpp - 1 ) + 0.5   ;   zfj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5
+            zti = FLOAT( ji - 1 + nimpp - 1 )          ;  ztj = FLOAT( jj - 1 + njmpp - 1 )
+            zui = FLOAT( ji - 1 + nimpp - 1 ) + 0.5_wp ;  zvj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5_wp
 
-            plamt(ji,jj) = zlam0 + rn_dx * 1.e-5 * zti
-            plamu(ji,jj) = zlam0 + rn_dx * 1.e-5 * zui
-            plamv(ji,jj) = zlam0 + rn_dx * 1.e-5 * zvi
-            plamf(ji,jj) = zlam0 + rn_dx * 1.e-5 * zfi
+            plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 * zti
+            plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * zui
+            plamv(ji,jj) = plamt(ji,jj) 
+            plamf(ji,jj) = plamu(ji,jj) 
    
-            pphit(ji,jj) = zphi0 + rn_dy * 1.e-5 * ztj
-            pphiu(ji,jj) = zphi0 + rn_dy * 1.e-5 * zuj
-            pphiv(ji,jj) = zphi0 + rn_dy * 1.e-5 * zvj
-            pphif(ji,jj) = zphi0 + rn_dy * 1.e-5 * zfj
+            pphit(ji,jj) = zphi0 + rn_dy * 1.e-3 * ztj
+            pphiv(ji,jj) = zphi0 + rn_dy * 1.e-3 * zvj
+            pphiu(ji,jj) = pphit(ji,jj) 
+            pphif(ji,jj) = pphiv(ji,jj) 
          END DO
       END DO
@@ -115,31 +108,33 @@
          !                              ======
 !! ==> EITHER 1) variable scale factors
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               !!pe1t(ji,jj) = rn_dx * EXP( -0.8/REAL(jpiglo**2) * (mi0(ji)-REAL(jpiglo+1)*0.5)**2 )  ! gaussian shape
-               !!pe2t(ji,jj) = rn_dy * EXP( -0.8/REAL(jpjglo**2) * (mj0(jj)-REAL(jpjglo+1)*0.5)**2 )  ! gaussian shape
-               pe1t(ji,jj) = rn_dx * ( 1. -0.1 * ABS(REAL(mi0(ji))-REAL(jpiglo+1)*0.5) / (1.-REAL(jpiglo+1)*0.5) ) ! linear shape
-               pe2t(ji,jj) = rn_dy * ( 1. -0.1 * ABS(REAL(mj0(jj))-REAL(jpjglo+1)*0.5) / (1.-REAL(jpjglo+1)*0.5) ) ! linear shape
-            END DO
-         END DO
-#if defined key_agrif 
-         IF( .NOT. Agrif_Root() ) THEN ! only works if the zoom is positioned at the center of the parent grid
-            DO jj = 1, jpj
-               DO ji = 1, jpi
-                  pe1t(ji,jj) = rn_dx * ( 1. -0.1 * ABS(REAL(mi0(ji))-REAL(jpiglo+1)*0.5) / (1.-REAL(jpiglo+1)*0.5)  &
-                     &                            * REAL(jpiglo) / REAL(Agrif_Parent(jpiglo) * Agrif_Rhox()) )       ! factor to match parent grid
-                  pe2t(ji,jj) = rn_dy * ( 1. -0.1 * ABS(REAL(mj0(jj))-REAL(jpjglo+1)*0.5) / (1.-REAL(jpjglo+1)*0.5)  &
-                     &                            * REAL(jpjglo) / REAL(Agrif_Parent(jpjglo) * Agrif_Rhoy()) )       ! factor to match parent grid
-               END DO
-            END DO
-         ENDIF
-#endif
+!! clem: This can be used with a 1proc simulation but I think it breaks repro when >1procs are used      
+!!         DO jj = 1, jpj
+!!            DO ji = 1, jpi
+!!               !!pe1t(ji,jj) = rn_dx * EXP( -0.8/REAL(jpiglo**2) * (mi0(ji)-REAL(jpiglo+1)*0.5)**2 )  ! gaussian shape
+!!               !!pe2t(ji,jj) = rn_dy * EXP( -0.8/REAL(jpjglo**2) * (mj0(jj)-REAL(jpjglo+1)*0.5)**2 )  ! gaussian shape
+!!               pe1t(ji,jj) = rn_dx * ( 1. -0.1 * ABS(REAL(mi0(ji))-REAL(jpiglo+1)*0.5) / (1.-REAL(jpiglo+1)*0.5) ) ! linear shape
+!!               pe2t(ji,jj) = rn_dy * ( 1. -0.1 * ABS(REAL(mj0(jj))-REAL(jpjglo+1)*0.5) / (1.-REAL(jpjglo+1)*0.5) ) ! linear shape
+!!            END DO
+!!         END DO
+!!#if defined key_agrif 
+!!         IF( .NOT. Agrif_Root() ) THEN ! only works if the zoom is positioned at the center of the parent grid
+!!            DO jj = 1, jpj
+!!               DO ji = 1, jpi
+!!                  pe1t(ji,jj) = rn_dx * ( 1. -0.1 * ABS(REAL(mi0(ji))-REAL(jpiglo+1)*0.5) / (1.-REAL(jpiglo+1)*0.5)  &
+!!                     &                            * REAL(jpiglo) / REAL(Agrif_Parent(jpiglo) * Agrif_Rhox()) )       ! factor to match parent grid
+!!                  pe2t(ji,jj) = rn_dy * ( 1. -0.1 * ABS(REAL(mj0(jj))-REAL(jpjglo+1)*0.5) / (1.-REAL(jpjglo+1)*0.5)  &
+!!                     &                            * REAL(jpjglo) / REAL(Agrif_Parent(jpjglo) * Agrif_Rhoy()) )       ! factor to match parent grid
+!!               END DO
+!!            END DO
+!!         ENDIF
+!!#endif
 !! ==> OR 2) constant scale factors
-!!         pe1t(:,:) = rn_dx
-!!         pe2t(:,:) = rn_dy
+         pe1t(:,:) = rn_dx
+         pe2t(:,:) = rn_dy
+!! ==> END
          
-         pe1u(:,:) = pe1t(:,:)      ;      pe2u(:,:) = pe2t(:,:)
-         pe1v(:,:) = pe1t(:,:)      ;      pe2v(:,:) = pe2t(:,:)
-         pe1f(:,:) = pe1t(:,:)      ;      pe2f(:,:) = pe2t(:,:)
+      pe1u(:,:) = pe1t(:,:)      ;      pe2u(:,:) = pe2t(:,:)
+      pe1v(:,:) = pe1t(:,:)      ;      pe2v(:,:) = pe2t(:,:)
+      pe1f(:,:) = pe1t(:,:)      ;      pe2f(:,:) = pe2t(:,:)
 
       !                             ! NO reduction of grid size in some straits 
@@ -152,10 +147,8 @@
       kff = 1                       !  indicate not to compute Coriolis parameter afterward
       !
-!!jerome      zbeta = 2._wp * omega * COS( rad * rn_ppgphi0 ) / ra
-!!      zf0   = 2._wp * omega * SIN( rad * rn_ppgphi0 )
-!!      pff_f(:,:) = zf0 + zbeta * pphif(:,:) * 1.e+3
-!!jerome      pff_t(:,:) = zf0 + zbeta * pphit(:,:) * 1.e+3
-      pff_f(:,:) = 0._wp            ! here No earth rotation: f=0
-      pff_t(:,:) = 0._wp
+      zbeta = 2._wp * omega * COS( rad * rn_ppgphi0 ) / ra
+      zf0   = 2._wp * omega * SIN( rad * rn_ppgphi0 )
+      pff_f(:,:) = zf0 + zbeta * pphif(:,:) * 1.e+3
+      pff_t(:,:) = zf0 + zbeta * pphit(:,:) * 1.e+3
       !
    END SUBROUTINE usr_def_hgr
Index: /NEMO/trunk/tests/SAS_BIPER/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/trunk/tests/SAS_BIPER/MY_SRC/usrdef_nam.F90	(revision 9762)
+++ /NEMO/trunk/tests/SAS_BIPER/MY_SRC/usrdef_nam.F90	(revision 9763)
@@ -15,5 +15,4 @@
    !!----------------------------------------------------------------------
    USE dom_oce  , ONLY: nimpp , njmpp            ! i- & j-indices of the local domain
-   USE dom_oce  , ONLY: ln_zco, ln_zps, ln_sco   ! flag of type of coordinate
    USE par_oce        ! ocean space and time domain
    USE phycst         ! physical constants
@@ -28,7 +27,8 @@
    PUBLIC   usr_def_nam   ! called by nemogcm.F90
 
-   !                              !!* namusr_def namelist *!!
-   REAL(wp), PUBLIC ::   rn_dx     ! resolution in meters defining the horizontal domain size
-   REAL(wp), PUBLIC ::   rn_dy     ! resolution in meters defining the horizontal domain size
+   !                               !!* namusr_def namelist *!!
+   REAL(wp), PUBLIC ::   rn_dx      ! resolution in meters defining the horizontal domain size
+   REAL(wp), PUBLIC ::   rn_dy      ! resolution in meters defining the horizontal domain size
+   REAL(wp), PUBLIC ::   rn_ppgphi0 ! reference latitude for beta-plane 
 
    !!----------------------------------------------------------------------
@@ -58,6 +58,7 @@
       !
       INTEGER ::   ios, ii   ! Local integer
+      REAL(wp)::   zlx, zly  ! Local scalars
       !!
-      NAMELIST/namusr_def/ ln_zco, rn_dx, rn_dy
+      NAMELIST/namusr_def/ ln_zco, rn_dx, rn_dy, rn_ppgphi0
       !!----------------------------------------------------------------------
       !
@@ -67,4 +68,13 @@
       READ  ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namusr_def in configuration namelist', .TRUE. )
+      !
+#if defined key_agrif 
+      ! Domain parameters are taken from parent:
+      IF( .NOT. Agrif_Root() ) THEN
+         rn_dx = Agrif_Parent(rn_dx)/Agrif_Rhox()
+         rn_dy = Agrif_Parent(rn_dy)/Agrif_Rhoy()
+         rn_ppgphi0 = Agrif_Parent(rn_ppgphi0)
+      ENDIF
+#endif
       !
       WRITE( ldnam(:), namusr_def )
@@ -84,4 +94,8 @@
       kpk = 1
       !
+!!      zlx = (kpi-2)*rn_dx*1.e-3
+!!      zly = (kpj-2)*rn_dy*1.e-3
+      zlx = kpi*rn_dx*1.e-3
+      zly = kpj*rn_dy*1.e-3
       !                             ! control print
       WRITE(ldtxt(ii),*) '   '                                                                          ;   ii = ii + 1
@@ -89,11 +103,9 @@
       WRITE(ldtxt(ii),*) '~~~~~~~~~~~ '                                                                 ;   ii = ii + 1
       WRITE(ldtxt(ii),*) '   Namelist namusr_def : SAS_BIPER test case'                                 ;   ii = ii + 1
-      WRITE(ldtxt(ii),*) '      type of vertical coordinate : '                                         ;   ii = ii + 1
-      WRITE(ldtxt(ii),*) '         z-coordinate flag                     ln_zco = ', ln_zco             ;   ii = ii + 1
-      WRITE(ldtxt(ii),*) '         z-partial-step coordinate flag        ln_zps = ', ln_zps             ;   ii = ii + 1
-      WRITE(ldtxt(ii),*) '         s-coordinate flag                     ln_sco = ', ln_sco             ;   ii = ii + 1
       WRITE(ldtxt(ii),*) '      horizontal resolution                    rn_dx  = ', rn_dx, ' meters'   ;   ii = ii + 1
       WRITE(ldtxt(ii),*) '      horizontal resolution                    rn_dy  = ', rn_dy, ' meters'   ;   ii = ii + 1
       WRITE(ldtxt(ii),*) '      SAS_BIPER domain = 300 km x 300Km x 1 grid-point '                      ;   ii = ii + 1
+      WRITE(ldtxt(ii),*) '         LX [km]: ', zlx                                                      ;   ii = ii + 1
+      WRITE(ldtxt(ii),*) '         LY [km]: ', zly                                                      ;   ii = ii + 1
       WRITE(ldtxt(ii),*) '         resulting global domain size :        jpiglo = ', kpi                ;   ii = ii + 1
       WRITE(ldtxt(ii),*) '                                               jpjglo = ', kpj                ;   ii = ii + 1
