Index: branches/UKMO/dev_r5518_GO6_under_ice_relax_dr_hook/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_under_ice_relax_dr_hook/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 11643)
+++ branches/UKMO/dev_r5518_GO6_under_ice_relax_dr_hook/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 11738)
@@ -48,4 +48,7 @@
   USE wrk_nemo        ! working arrays
 
+  USE yomhook, ONLY: lhook, dr_hook
+  USE parkind1, ONLY: jprb, jpim
+
   IMPLICIT NONE
   PRIVATE
@@ -121,4 +124,12 @@
      !!---------------------------------------------------------------------- 
      INTEGER :: ierr(2) 
+     INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+     INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+     REAL(KIND=jprb)               :: zhook_handle
+
+     CHARACTER(LEN=*), PARAMETER :: RoutineName='DIADCT_ALLOC'
+
+     IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
      !!---------------------------------------------------------------------- 
 
@@ -129,4 +140,5 @@
      IF( diadct_alloc /= 0 )   CALL ctl_warn('diadct_alloc: failed to allocate arrays') 
  
+     IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
   END FUNCTION diadct_alloc 
 
@@ -141,4 +153,12 @@
      NAMELIST/namdct/nn_dct,nn_dctwri,nn_secdebug
      INTEGER  ::   ios                 ! Local integer output status for namelist read
+     INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+     INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+     REAL(KIND=jprb)               :: zhook_handle
+
+     CHARACTER(LEN=*), PARAMETER :: RoutineName='DIA_DCT_INIT'
+
+     IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
 
      IF( nn_timing == 1 )   CALL timing_start('dia_dct_init')
@@ -188,4 +208,5 @@
      IF( nn_timing == 1 )   CALL timing_stop('dia_dct_init')
      !
+     IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
   END SUBROUTINE dia_dct_init
  
@@ -220,4 +241,12 @@
      REAL(wp), POINTER, DIMENSION(:)    :: zwork !   "  
      REAL(wp), POINTER, DIMENSION(:,:,:):: zsum  !   "
+     INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+     INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+     REAL(KIND=jprb)               :: zhook_handle
+
+     CHARACTER(LEN=*), PARAMETER :: RoutineName='DIA_DCT'
+
+     IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
 
      !!---------------------------------------------------------------------    
@@ -304,4 +333,5 @@
      IF( nn_timing == 1 )   CALL timing_stop('dia_dct')
      !
+     IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
   END SUBROUTINE dia_dct
 
@@ -331,4 +361,12 @@
      LOGICAL :: llbon                                       ,&!local logical
                 lldebug                                       !debug the section
+                INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+                INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+                REAL(KIND=jprb)               :: zhook_handle
+
+                CHARACTER(LEN=*), PARAMETER :: RoutineName='READSEC'
+
+                IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
      !!-------------------------------------------------------------------------------------
      CALL wrk_alloc( nb_point_max, directemp )
@@ -506,4 +544,5 @@
      CALL wrk_dealloc( nb_point_max, directemp )
      !
+                IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
   END SUBROUTINE readsec
 
@@ -526,4 +565,12 @@
                 itest         ,& !indice value of the side of the domain 
                                  !where points could be redundant
+                                 INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+                                 INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+                                 REAL(KIND=jprb)               :: zhook_handle
+
+                                 CHARACTER(LEN=*), PARAMETER :: RoutineName='REMOVEPOINTS'
+
+                                 IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
                 isgn          ,& ! isgn= 1 : scan listpoint from start to end
                                  ! isgn=-1 : scan listpoint from end to start 
@@ -586,4 +633,5 @@
      CALL wrk_dealloc(    nb_point_max, idirec )
      CALL wrk_dealloc( 2, nb_point_max, icoord )
+                                 IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
   END SUBROUTINE removepoints
 
@@ -622,4 +670,12 @@
 
      TYPE(POINT_SECTION) :: k
+     INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+     INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+     REAL(KIND=jprb)               :: zhook_handle
+
+     CHARACTER(LEN=*), PARAMETER :: RoutineName='TRANSPORT'
+
+     IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
      !!--------------------------------------------------------
 
@@ -807,4 +863,5 @@
      ENDIF !end of sec%nb_point =0 case
      !
+     IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
   END SUBROUTINE transport
   
@@ -835,4 +892,12 @@
      INTEGER  :: jk,jseg,jclass                        ! dummy variables for looping on level/segment/classes  
      REAL(wp) :: ztn, zsn, zrhoi, zrhop, zsshn, zfsdep ! temperature/salinity/ssh/potential density /depth at u/v point 
+     INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+     INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+     REAL(KIND=jprb)               :: zhook_handle
+
+     CHARACTER(LEN=*), PARAMETER :: RoutineName='DIA_DCT_SUM'
+
+     IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
      !!------------------------------------------------------------- 
  
@@ -999,4 +1064,5 @@
      ENDIF !end of sec%nb_point =0 case 
  
+     IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
   END SUBROUTINE dia_dct_sum 
   
@@ -1030,4 +1096,12 @@
      !
      REAL(wp), POINTER, DIMENSION(:):: zsumclasses ! 1D workspace 
+     INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+     INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+     REAL(KIND=jprb)               :: zhook_handle
+
+     CHARACTER(LEN=*), PARAMETER :: RoutineName='DIA_DCT_WRI'
+
+     IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
      !!------------------------------------------------------------- 
      CALL wrk_alloc(nb_type_class , zsumclasses )  
@@ -1144,4 +1218,5 @@
 
      CALL wrk_dealloc(nb_type_class , zsumclasses )  
+     IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
   END SUBROUTINE dia_dct_wri
 
@@ -1218,4 +1293,12 @@
   REAL(wp):: zdep1,zdep2                                       ! differences of depth
   REAL(wp):: zmsk                                              ! mask value
+  INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+  INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+  REAL(KIND=jprb)               :: zhook_handle
+
+  CHARACTER(LEN=*), PARAMETER :: RoutineName='INTERP'
+
+  IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
   !!----------------------------------------------------------------------
 
@@ -1290,4 +1373,5 @@
 
 
+  IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
   END FUNCTION interp
 
@@ -1302,12 +1386,36 @@
 
    SUBROUTINE dia_dct_init          ! Dummy routine
+   USE yomhook, ONLY: lhook, dr_hook
+   USE parkind1, ONLY: jprb, jpim
+
    IMPLICIT NONE
+   INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+   INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+   REAL(KIND=jprb)               :: zhook_handle
+
+   CHARACTER(LEN=*), PARAMETER :: RoutineName='DIA_DCT_INIT'
+
+   IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       WRITE(*,*) 'dia_dct_init: You should not have seen this print! error?'
+   IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE dia_dct_init
 
    SUBROUTINE dia_dct( kt )         ! Dummy routine
+   USE yomhook, ONLY: lhook, dr_hook
+   USE parkind1, ONLY: jprb, jpim
+
    IMPLICIT NONE
       INTEGER, INTENT( in ) :: kt   ! ocean time-step index
+      INTEGER(KIND=jpim), PARAMETER :: zhook_in = 0
+      INTEGER(KIND=jpim), PARAMETER :: zhook_out = 1
+      REAL(KIND=jprb)               :: zhook_handle
+
+      CHARACTER(LEN=*), PARAMETER :: RoutineName='DIA_DCT'
+
+      IF (lhook) CALL dr_hook(RoutineName,zhook_in,zhook_handle)
+
       WRITE(*,*) 'dia_dct: You should not have seen this print! error?', kt
+      IF (lhook) CALL dr_hook(RoutineName,zhook_out,zhook_handle)
    END SUBROUTINE dia_dct
 #endif
