Index: branches/UKMO/dev_r5518_GO6_under_ice_relax_dr_hook/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_under_ice_relax_dr_hook/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 11643)
+++ branches/UKMO/dev_r5518_GO6_under_ice_relax_dr_hook/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 11738)
@@ -45,4 +45,7 @@
    USE timing            ! Timing
 
+   USE yomhook, ONLY: lhook, dr_hook
+   USE parkind1, ONLY: jprb, jpim
+
    IMPLICIT NONE
    PRIVATE
@@ -103,4 +106,12 @@
       !
       NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco, ln_isfcav
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='DOM_ZGR'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!----------------------------------------------------------------------
       !
@@ -173,4 +184,5 @@
       IF( nn_timing == 1 )  CALL timing_stop('dom_zgr')
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE dom_zgr
 
@@ -203,4 +215,12 @@
       REAL(wp) ::   zrefdep                ! depth of the reference level (~10m)
       REAL(wp) ::   za2, zkth2, zacr2      ! Values for optional double tanh function set from parameters 
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='ZGR_Z'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!----------------------------------------------------------------------
       !
@@ -346,4 +366,5 @@
       IF( nn_timing == 1 )  CALL timing_stop('zgr_z')
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE zgr_z
 
@@ -388,4 +409,12 @@
       INTEGER , ALLOCATABLE, DIMENSION(:,:) ::   idta   ! global domain integer data
       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdta   ! global domain scalar data
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='ZGR_BAT'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!----------------------------------------------------------------------
       !
@@ -600,4 +629,5 @@
       IF( nn_timing == 1 )  CALL timing_stop('zgr_bat')
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE zgr_bat
 
@@ -615,4 +645,12 @@
       !!----------------------------------------------------------------------
       INTEGER ::   ii0, ii1, ij0, ij1   ! temporary integers
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='ZGR_BAT_ZOOM'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!----------------------------------------------------------------------
       !
@@ -652,4 +690,5 @@
       ENDIF
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE zgr_bat_zoom
 
@@ -681,4 +720,12 @@
       INTEGER ::   icompt, ibtest, ikmax         ! temporary integers
       REAL(wp), POINTER, DIMENSION(:,:) ::  zbathy
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='ZGR_BAT_CTL'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
 
       !!----------------------------------------------------------------------
@@ -791,4 +838,5 @@
       IF( nn_timing == 1 )  CALL timing_stop('zgr_bat_ctl')
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE zgr_bat_ctl
 
@@ -809,4 +857,12 @@
       INTEGER ::   ji, jj   ! dummy loop indices
       REAL(wp), POINTER, DIMENSION(:,:) ::  zmbk
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='ZGR_BOT_LEVEL'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!----------------------------------------------------------------------
       !
@@ -836,4 +892,5 @@
       IF( nn_timing == 1 )  CALL timing_stop('zgr_bot_level')
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE zgr_bot_level
 
@@ -853,4 +910,12 @@
       INTEGER ::   ji, jj   ! dummy loop indices
       REAL(wp), POINTER, DIMENSION(:,:) ::  zmik
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='ZGR_TOP_LEVEL'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!----------------------------------------------------------------------
       !
@@ -882,4 +947,5 @@
       IF( nn_timing == 1 )  CALL timing_stop('zgr_top_level')
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE zgr_top_level
 
@@ -893,4 +959,12 @@
       !!----------------------------------------------------------------------
       INTEGER  ::   jk
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='ZGR_ZCO'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!----------------------------------------------------------------------
       !
@@ -912,4 +986,5 @@
       IF( nn_timing == 1 )  CALL timing_stop('zgr_zco')
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE zgr_zco
 
@@ -970,4 +1045,12 @@
       REAL(wp) ::   zrefdep          ! temporary scalar
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  zprt
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='ZGR_ZPS'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!---------------------------------------------------------------------
       !
@@ -1252,4 +1335,5 @@
       IF( nn_timing == 1 )  CALL timing_stop('zgr_zps')
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE zgr_zps
 
@@ -1282,4 +1366,12 @@
       REAL(wp), POINTER, DIMENSION(:,:)   ::   zrisfdep, zbathy, zmask   ! 2D workspace (ISH)
       INTEGER , POINTER, DIMENSION(:,:)   ::   zmbathy, zmisfdep         ! 2D workspace (ISH)
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='ZGR_ISF'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!---------------------------------------------------------------------
       !
@@ -1758,4 +1850,5 @@
       IF( nn_timing == 1 )  CALL timing_stop('zgr_isf')
       
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE
 
@@ -1816,4 +1909,12 @@
       NAMELIST/namzgr_sco/ln_s_sh94, ln_s_sf12, ln_sigcrit, rn_sbot_min, rn_sbot_max, rn_hc, rn_rmax,rn_theta, &
                            rn_thetb, rn_bb, rn_alpha, rn_efold, rn_zs, rn_zb_a, rn_zb_b
+                           INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+                           INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+                           REAL(KIND=jprb)               :: zhook_handle
+
+                           CHARACTER(LEN=*), PARAMETER :: RoutineName='ZGR_SCO'
+
+                           IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
      !!----------------------------------------------------------------------
       !
@@ -2240,4 +2341,5 @@
       IF( nn_timing == 1 )  CALL timing_stop('zgr_sco')
       !
+                           IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE zgr_sco
 
@@ -2261,4 +2363,12 @@
       REAL(wp), POINTER, DIMENSION(:,:,:) :: z_gsigw3, z_gsigt3, z_gsi3w3
       REAL(wp), POINTER, DIMENSION(:,:,:) :: z_esigt3, z_esigw3, z_esigtu3, z_esigtv3, z_esigtf3, z_esigwu3, z_esigwv3           
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='S_SH94'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
 
       CALL wrk_alloc( jpi, jpj, jpk, z_gsigw3, z_gsigt3, z_gsi3w3                                      )
@@ -2339,4 +2449,5 @@
       CALL wrk_dealloc( jpi, jpj, jpk, z_esigt3, z_esigw3, z_esigtu3, z_esigtv3, z_esigtf3, z_esigwu3, z_esigwv3 )
 
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE s_sh94
 
@@ -2365,4 +2476,12 @@
       REAL(wp), POINTER, DIMENSION(:,:,:) :: z_gsigw3, z_gsigt3, z_gsi3w3
       REAL(wp), POINTER, DIMENSION(:,:,:) :: z_esigt3, z_esigw3, z_esigtu3, z_esigtv3, z_esigtf3, z_esigwu3, z_esigwv3           
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='S_SF12'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
 
       !
@@ -2476,4 +2595,5 @@
       CALL wrk_dealloc( jpi, jpj, jpk, z_esigt3, z_esigw3, z_esigtu3, z_esigtv3, z_esigtf3, z_esigwu3, z_esigwv3 )
 
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE s_sf12
 
@@ -2495,4 +2615,12 @@
       REAL(wp), POINTER, DIMENSION(:) :: z_gsigw, z_gsigt, z_gsi3w
       REAL(wp), POINTER, DIMENSION(:) :: z_esigt, z_esigw
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='S_TANH'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
 
       CALL wrk_alloc( jpk, z_gsigw, z_gsigt, z_gsi3w                                      )
@@ -2550,4 +2678,5 @@
       CALL wrk_dealloc( jpk, z_esigt, z_esigw                                               )
 
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE s_tanh
 
@@ -2565,4 +2694,12 @@
       REAL(wp), INTENT(in) ::   pk   ! continuous "k" coordinate
       REAL(wp)             ::   pf   ! sigma value
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='FSSIG'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!----------------------------------------------------------------------
       !
@@ -2573,4 +2710,5 @@
          & / ( 2._wp * SINH( rn_theta ) )
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END FUNCTION fssig
 
@@ -2590,4 +2728,12 @@
       REAL(wp), INTENT(in) ::   pbb   ! Stretching coefficient
       REAL(wp)             ::   pf1   ! sigma value
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='FSSIG1'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!----------------------------------------------------------------------
       !
@@ -2600,4 +2746,5 @@
       ENDIF
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END FUNCTION fssig1
 
@@ -2629,4 +2776,12 @@
       REAL(wp)                ::   za,zb,zx       ! local variables
       integer                 ::   jk
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='FGAMMA'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       !!----------------------------------------------------------------------
       !
@@ -2652,4 +2807,5 @@
 
       !
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END FUNCTION fgamma
 
