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 2378)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 2379)
@@ -160,4 +160,5 @@
       REAL(wp) ::   zacr, zdzmin, zhmax    ! par_CONFIG_Rxx.h90
       REAL(wp) ::   zrefdep                ! depth of the reference level (~10m)
+      REAL(wp) ::   za2, zkth2, zacr2      ! Values for optional double tanh function set from parameters 
       !!----------------------------------------------------------------------
 
@@ -166,4 +167,5 @@
        zkth = ppkth       ;   zacr = ppacr
        zdzmin = ppdzmin   ;   zhmax = pphmax
+       zkth2 = ppkth2     ;   zacr2 = ppacr2   ! optional (ldbletanh=T) double tanh parameters
 
       ! If ppa1 and ppa0 and ppsur are et to pp_to_be_computed
@@ -181,4 +183,5 @@
       ELSE
          za1 = ppa1 ;       za0 = ppa0 ;          zsur = ppsur
+         za2 = ppa2                            ! optional (ldbletanh=T) double tanh parameter
       ENDIF
 
@@ -203,4 +206,9 @@
             WRITE(numout,*) '                 zkth = ', zkth
             WRITE(numout,*) '                 zacr = ', zacr
+            IF( ldbletanh ) THEN
+               WRITE(numout,*) ' (Double tanh    za2  = ', za2
+               WRITE(numout,*) '  parameters)    zkth2= ', zkth2
+               WRITE(numout,*) '                 zacr2= ', zacr2
+            ENDIF
          ENDIF
       ENDIF
@@ -220,20 +228,36 @@
          END DO
       ELSE                                ! Madec & Imbard 1996 function
-         DO jk = 1, jpk
-            zw = FLOAT( jk )
-            zt = FLOAT( jk ) + 0.5
-            gdepw_0(jk) = ( zsur + za0 * zw + za1 * zacr * LOG ( COSH( (zw-zkth) / zacr ) )  )
-            gdept_0(jk) = ( zsur + za0 * zt + za1 * zacr * LOG ( COSH( (zt-zkth) / zacr ) )  )
-            e3w_0  (jk) =          za0      + za1        * TANH(       (zw-zkth) / zacr   )
-            e3t_0  (jk) =          za0      + za1        * TANH(       (zt-zkth) / zacr   )
-         END DO
+         IF( .NOT. ldbletanh ) THEN
+            DO jk = 1, jpk
+               zw = FLOAT( jk )
+               zt = FLOAT( jk ) + 0.5
+               gdepw_0(jk) = ( zsur + za0 * zw + za1 * zacr * LOG ( COSH( (zw-zkth) / zacr ) )  )
+               gdept_0(jk) = ( zsur + za0 * zt + za1 * zacr * LOG ( COSH( (zt-zkth) / zacr ) )  )
+               e3w_0  (jk) =          za0      + za1        * TANH(       (zw-zkth) / zacr   )
+               e3t_0  (jk) =          za0      + za1        * TANH(       (zt-zkth) / zacr   )
+            END DO
+         ELSE
+            DO jk = 1, jpk
+               zw = FLOAT( jk )
+               zt = FLOAT( jk ) + 0.5
+               ! Double tanh function
+               gdepw_0(jk) = ( zsur + za0 * zw + za1 * zacr * LOG ( COSH( (zw-zkth) / zacr ) )    &
+     &                                         + za2 * zacr2* LOG ( COSH( (zw-zkth2)/zacr2 ) )  )
+               gdept_0(jk) = ( zsur + za0 * zt + za1 * zacr * LOG ( COSH( (zt-zkth) / zacr ) )    &
+     &                                         + za2 * zacr2* LOG ( COSH( (zt-zkth2)/zacr2 ) )  )
+               e3w_0  (jk) =          za0      + za1        * TANH(       (zw-zkth) / zacr   )    &
+     &                                         + za2        * TANH(       (zw-zkth2)/zacr2   )
+               e3t_0  (jk) =          za0      + za1        * TANH(       (zt-zkth) / zacr   )    &
+     &                                         + za2        * TANH(       (zt-zkth2)/zacr2   )
+            END DO
+         ENDIF
          gdepw_0(1) = 0.e0                     ! force first w-level to be exactly at zero
       ENDIF
 
 !!gm BUG in s-coordinate this does not work!
-      ! deepest/shallowest W level Above/Bellow ~10m
+      ! deepest/shallowest W level Above/Below ~10m
       zrefdep = 10. - ( 0.1*MINVAL(e3w_0) )                          ! ref. depth with tolerance (10% of minimum layer thickness)
-      nlb10 = MINLOC( gdepw_0, mask = gdepw_0 > zrefdep, dim = 1 )   ! shallowest W level Bellow ~10m
-      nla10 = nlb10 - 1                                              ! deepest    W level Above  ~10m
+      nlb10 = MINLOC( gdepw_0, mask = gdepw_0 > zrefdep, dim = 1 )   ! shallowest W level Below ~10m
+      nla10 = nlb10 - 1                                              ! deepest    W level Above ~10m
 !!gm end bug
 
@@ -746,4 +770,5 @@
       INTEGER  ::   ji, jj, jk       ! dummy loop indices
       INTEGER  ::   ik, it           ! temporary integers
+      INTEGER  ::   nlbelow          ! temporary integer
       LOGICAL  ::   ll_print         ! Allow  control print for debugging
       REAL(wp) ::   ze3tp , ze3wp    ! Last ocean level thickness at T- and W-points
@@ -751,4 +776,5 @@
       REAL(wp) ::   zmax, zmin       ! Maximum and minimum depth
       REAL(wp) ::   zdiff            ! temporary scalar
+      REAL(wp) ::   zrefdep          ! temporary scalar
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zprt   ! 3D workspace
       !!---------------------------------------------------------------------
@@ -772,5 +798,9 @@
       ! ===================
       zmax = gdepw_0(jpk) + e3t_0(jpk)     ! maximum depth (i.e. the last ocean level thickness <= 2*e3t_0(jpkm1) )
-      zmin = gdepw_0(4)                    ! minimum depth = 3 levels
+
+      zrefdep = 25.
+      nlbelow = MINLOC( gdepw_0, mask = gdepw_0 > zrefdep, dim = 1 )   ! shallowest W level Below zrefdep
+      IF(lwp) write(numout,*) 'Minimum depth level selected: ', nlbelow
+      zmin = gdepw_0(nlbelow)              ! minimum depth = nlbelow-1 levels
 
       mbathy(:,:) = jpkm1                  ! initialize mbathy to the maximum ocean level available
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_EEL_R2.h90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_EEL_R2.h90	(revision 2378)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_EEL_R2.h90	(revision 2379)
@@ -94,3 +94,9 @@
       &     ppdzmin = pp_not_used           ,  &  !: (meters) vertical thickness of the top layer
       &     pphmax  = pp_not_used                 !: (meters) Maximum depth of the ocean gdepw(jpk)
+   LOGICAL,  PARAMETER ::        &
+      &     ldbletanh = .FALSE.                   !: Use/do not use double tanf function for vertical coordinates
+   REAL(wp), PARAMETER ::        &
+      &     ppa2    = pp_not_used           ,  &  !: Double tanh function parameters
+      &     ppkth2  = pp_not_used           ,  &  !:
+      &     ppacr2  = pp_not_used                 !:
    !!---------------------------------------------------------------------
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_EEL_R5.h90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_EEL_R5.h90	(revision 2378)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_EEL_R5.h90	(revision 2379)
@@ -94,3 +94,9 @@
       &     ppdzmin = pp_not_used           ,  &  !: (meters) vertical thickness of the top layer
       &     pphmax  = pp_not_used                 !: (meters) Maximum depth of the ocean gdepw(jpk)
+   LOGICAL,  PARAMETER ::        &
+      &     ldbletanh = .FALSE.                   !: Use/do not use double tanf function for vertical coordinates
+   REAL(wp), PARAMETER ::        &
+      &     ppa2    = pp_not_used           ,  &  !: Double tanh function parameters
+      &     ppkth2  = pp_not_used           ,  &  !:
+      &     ppacr2  = pp_not_used                 !:
    !!---------------------------------------------------------------------
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_EEL_R6.h90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_EEL_R6.h90	(revision 2378)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_EEL_R6.h90	(revision 2379)
@@ -94,3 +94,9 @@
       &     ppdzmin = pp_not_used           ,  &  !: (meters) vertical thickness of the top layer
       &     pphmax  = pp_not_used                 !: (meters) Maximum depth of the ocean gdepw(jpk)
+   LOGICAL,  PARAMETER ::        &
+      &     ldbletanh = .FALSE.                   !: Use/do not use double tanf function for vertical coordinates
+   REAL(wp), PARAMETER ::        &
+      &     ppa2    = pp_not_used           ,  &  !: Double tanh function parameters
+      &     ppkth2  = pp_not_used           ,  &  !:
+      &     ppacr2  = pp_not_used                 !:
    !!---------------------------------------------------------------------
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_GYRE.h90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_GYRE.h90	(revision 2378)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_GYRE.h90	(revision 2379)
@@ -98,4 +98,10 @@
       &     pphmax  = pp_not_used         !: (meters): maximum depth of the ocean
       !                             !            depth of the last "w" level
+   LOGICAL,  PARAMETER ::        &
+      &     ldbletanh = .FALSE.                   !: Use/do not use double tanf function for vertical coordinates
+   REAL(wp), PARAMETER ::        &
+      &     ppa2    = pp_not_used           ,  &  !: Double tanh function parameters
+      &     ppkth2  = pp_not_used           ,  &  !:
+      &     ppacr2  = pp_not_used                 !:
 
    !!---------------------------------------------------------------------
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R025.h90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R025.h90	(revision 2378)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R025.h90	(revision 2379)
@@ -24,5 +24,9 @@
       jpidta  = 1442,        &  !: first horizontal dimension > or = to jpi
       jpjdta  = 1021,        &  !: second                     > or = to jpj
+#if key_orca_r025==75
+      jpkdta  = 75 ,         &  !: number of levels           > or = to jpk
+#else
       jpkdta  = 46 ,         &  !: number of levels           > or = to jpk
+#endif
       ! total domain matrix size
       jpiglo  = jpidta,      &  !: first  dimension of global domain --> i
@@ -68,22 +72,56 @@
    !!  Coefficients associated with the vertical coordinate system
 
+#if key_orca_r025==75
    REAL(wp), PARAMETER  ::       &
-      &     ppsur = pp_to_be_computed ,  &  !: Computed in domzgr, set ppdzmin and pphmax below
-      &     ppa0  = pp_to_be_computed ,  &  !:    "           "
-      &     ppa1  = pp_to_be_computed ,  &  !:    "           "
-      !
-      &     ppkth =  23.563_wp        ,  &  !: (non dimensional): gives the approximate
-      !                                     !: layer number above which  stretching will
-      !                                     !: be maximum. Usually of order jpk/2.
-      &     ppacr =    9.00000000000_wp     !: (non dimensional): stretching factor
-      !                                     !: for the grid. The highest zacr, the smallest
-      !                                     !: the stretching.
-
+      &     ppsur =  -3958.951371276829_wp  ,  &  !: ORCA r025 coefficients
+      &     ppa0  =   103.9530096000000_wp  ,  &  !: (75 levels case)
+      &     ppa1  =   2.415951269000000_wp  ,  &  !:
+      &     ppkth =   15.35101370000000_wp  ,  &  !: (non dimensional): gives the approximate
+      !                                           !: layer number above which  stretching will
+      !                                           !: be maximum. Usually of order jpk/2.
+      &     ppacr =       7.00000000000_wp        !: (non dimensional): stretching factor
+      !                                           !: for the grid. The higher zacr, the smaller
+      !                                           !: the stretching.
    !!
-   !!  If both ppa0 ppa1 and ppsur are specified to 0, then
+   !!  If both ppa0 ppa1 and ppsur are specified to pp_to_be_computed, then
    !!  they are computed from ppdzmin, pphmax , ppkth, ppacr in dom_zgr
    !!
-   REAL(wp), PARAMETER ::        &
-      &     ppdzmin = 6._wp           ,  &  !: (meters) vertical thickness of the top layer
-      &     pphmax  = 5750._wp              !: (meters) Maximum depth of the ocean gdepw(jpk)
+   REAL(wp), PARAMETER ::                      &
+      &     ppdzmin = pp_not_used           ,  &  !: (meters) vertical thickness of the top layer
+      &     pphmax  = pp_not_used                 !: (meters) Maximum depth of the ocean gdepw(jpk)
+   !!
+   LOGICAL,  PARAMETER ::                      &
+      &     ldbletanh = .TRUE.                    !: Use/do not use double tanf function for vertical coordinates
+   REAL(wp), PARAMETER ::                      &
+      &     ppa2  =   100.7609285000000_wp  ,  &  !: Double tanh function parameters
+      &     ppkth2=   48.02989372000000_wp  ,  &  !:
+      &     ppacr2=    13.00000000000_wp          !:
+      !
+#else
+   REAL(wp), PARAMETER  ::       &
+      &     ppsur = pp_to_be_computed ,        &  !: Computed in domzgr, set ppdzmin and pphmax below
+      &     ppa0  = pp_to_be_computed ,        &  !:    "           "
+      &     ppa1  = pp_to_be_computed ,        &  !:    "           "
+      !
+      &     ppkth =  23.563_wp        ,        &  !: (non dimensional): gives the approximate
+      !                                           !: layer number above which  stretching will
+      !                                           !: be maximum. Usually of order jpk/2.
+      &     ppacr =   9.00000000000_wp            !: (non dimensional): stretching factor
+      !                                           !: for the grid. The highest zacr, the smallest
+      !                                           !: the stretching.
+   !!
+   !!  If both ppa0 ppa1 and ppsur are specified to pp_to_be_computed, then
+   !!  they are computed from ppdzmin, pphmax , ppkth, ppacr in dom_zgr
+   !!
+   REAL(wp), PARAMETER ::                      &
+      &     ppdzmin = 6._wp           ,        &  !: (meters) vertical thickness of the top layer
+      &     pphmax  = 5750._wp                    !: (meters) Maximum depth of the ocean gdepw(jpk)
+   !!
+   LOGICAL,  PARAMETER ::                      &
+      &     ldbletanh = .FALSE.                   !: Use/do not use double tanf function for vertical coordinates
+   REAL(wp), PARAMETER ::                      &
+      &     ppa2    = pp_not_used           ,  &  !: Double tanh function parameters
+      &     ppkth2  = pp_not_used           ,  &  !:
+      &     ppacr2  = pp_not_used                 !:
+#endif
    !!---------------------------------------------------------------------
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R05.h90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R05.h90	(revision 2378)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R05.h90	(revision 2379)
@@ -131,3 +131,9 @@
       &     ppdzmin = pp_not_used           ,  &  !: (meters) vertical thickness of the top layer
       &     pphmax  = pp_not_used                 !: (meters) Maximum depth of the ocean gdepw(jpk)
+   LOGICAL,  PARAMETER ::        &
+      &     ldbletanh = .FALSE.                   !: Use/do not use double tanf function for vertical coordinates
+   REAL(wp), PARAMETER ::        &
+      &     ppa2    = pp_not_used           ,  &  !: Double tanh function parameters
+      &     ppkth2  = pp_not_used           ,  &  !:
+      &     ppacr2  = pp_not_used                 !:
    !!---------------------------------------------------------------------
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R2.h90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R2.h90	(revision 2378)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R2.h90	(revision 2379)
@@ -158,3 +158,9 @@
       &     ppdzmin = pp_not_used           ,  &  !: (meters) vertical thickness of the top layer
       &     pphmax  = pp_not_used                 !: (meters) Maximum depth of the ocean gdepw(jpk)
+   LOGICAL,  PARAMETER ::        &
+      &     ldbletanh = .FALSE.                   !: Use/do not use double tanf function for vertical coordinates
+   REAL(wp), PARAMETER ::        &
+      &     ppa2    = pp_not_used           ,  &  !: Double tanh function parameters
+      &     ppkth2  = pp_not_used           ,  &  !:
+      &     ppacr2  = pp_not_used                 !:
    !!---------------------------------------------------------------------
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R4.h90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R4.h90	(revision 2378)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_ORCA_R4.h90	(revision 2379)
@@ -87,3 +87,9 @@
       &     ppdzmin = pp_not_used           ,  &  !: (meters) vertical thickness of the top layer
       &     pphmax  = pp_not_used                 !: (meters) Maximum depth of the ocean gdepw(jpk)
+   LOGICAL,  PARAMETER ::        &
+      &     ldbletanh = .FALSE.                   !: Use/do not use double tanf function for vertical coordinates
+   REAL(wp), PARAMETER ::        &
+      &     ppa2    = pp_not_used           ,  &  !: Double tanh function parameters
+      &     ppkth2  = pp_not_used           ,  &  !:
+      &     ppacr2  = pp_not_used                 !:
    !!---------------------------------------------------------------------
Index: /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_POMME_R025.h90
===================================================================
--- /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_POMME_R025.h90	(revision 2378)
+++ /branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/par_POMME_R025.h90	(revision 2379)
@@ -97,3 +97,9 @@
       &     ppdzmin = 6._wp           ,  &  !: (meters) vertical thickness of the top layer
       &     pphmax  = 5750._wp              !: (meters) Maximum depth of the ocean gdepw(jpk)
+   LOGICAL,  PARAMETER ::        &
+      &     ldbletanh = .FALSE.             !: Use/do not use double tanf function for vertical coordinates
+   REAL(wp), PARAMETER ::        &
+      &     ppa2    = pp_not_used     ,  &  !: Double tanh function parameters
+      &     ppkth2  = pp_not_used     ,  &  !:
+      &     ppacr2  = pp_not_used           !:
    !!---------------------------------------------------------------------
