Index: NEMO/releases/release-4.0/src/OCE/C1D/step_c1d.F90
===================================================================
--- NEMO/releases/release-4.0/src/OCE/C1D/step_c1d.F90	(revision 11095)
+++ NEMO/releases/release-4.0/src/OCE/C1D/step_c1d.F90	(revision 11096)
@@ -86,5 +86,5 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                          CALL dia_wri( kstp )       ! ocean model: outputs
-      IF( ln_diahth  )   CALL dia_hth( kstp )       ! Thermocline depth (20°C)
+      IF( ll_diahth  )   CALL dia_hth( kstp )       ! Thermocline depth (20°C)
 
 
Index: NEMO/releases/release-4.0/src/OCE/DIA/diahth.F90
===================================================================
--- NEMO/releases/release-4.0/src/OCE/DIA/diahth.F90	(revision 11095)
+++ NEMO/releases/release-4.0/src/OCE/DIA/diahth.F90	(revision 11096)
@@ -30,5 +30,5 @@
    PUBLIC   dia_hth_init  ! routine called by nemogcm.F90
 
-   LOGICAL, PUBLIC ::   ln_diahth   !: Compute further diagnostics of ML and thermocline depth
+   LOGICAL, PUBLIC ::   ll_diahth   !: Compute further diagnostics of ML and thermocline depth
 
    !!----------------------------------------------------------------------
@@ -89,5 +89,5 @@
      REAL(wp), DIMENSION(jpi,jpj) ::   zhtc3   !: heat content of first 300 m                    [W]
 
-     IF (iom_use("mlddzt").OR.iom_use("mldr0_3").OR.iom_use("mldr0_1")) THEN
+     IF (iom_use("mlddzt") .OR. iom_use("mldr0_3") .OR. iom_use("mldr0_1")) THEN
         ! ------------------------------------------------------------- !
         ! thermocline depth: strongest vertical gradient of temperature !
@@ -147,6 +147,6 @@
      ENDIF
 
-     IF (iom_use("mld_dt02").OR.iom_use("topthdep").OR.iom_use("mldr10_3").OR. &
-          & iom_use("pycndep").OR.iom_use("tinv").OR.iom_use("depti")) THEN
+     IF (iom_use("mld_dt02") .OR. iom_use("topthdep") .OR. iom_use("mldr10_3") .OR.  &
+          & iom_use("pycndep") .OR. iom_use("tinv") .OR. iom_use("depti")) THEN
         DO jj = 1, jpj
            DO ji = 1, jpi
@@ -223,5 +223,5 @@
      ENDIF
 
-     IF(iom_use("20d").OR.iom_use("28d")) THEN
+     IF(iom_use("20d") .OR. iom_use("28d")) THEN
         ! ----------------------------------- !
         ! search deepest level above 20C/28C  !
@@ -318,9 +318,5 @@
       !! ** Purpose: Initialization for ML and thermocline depths
       !!
-      !! ** Action : Read namelist flag to permit or not extra Ml depths and thermocline depths
-      !!---------------------------------------------------------------------------
-      INTEGER ::   ierror, ios   ! local integer
-      !!
-      NAMELIST/namhth/ ln_diahth
+      !! ** Action : If any upper ocean diagnostic required by xml file, set in dia_hth
       !!---------------------------------------------------------------------------
        !
@@ -330,15 +326,10 @@
          WRITE(numout,*) '~~~~~~~~~~~~ '
       ENDIF
-      REWIND( numnam_ref )              ! Namelist namhth in reference namelist
-      READ  ( numnam_ref, namhth, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namhth in reference namelist', lwp )
-      REWIND( numnam_cfg )              ! Namelist namhth in configuration namelist
-      READ  ( numnam_cfg, namhth, IOSTAT = ios, ERR = 902 )
-902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namhth in configuration namelist', lwp )
-      IF(lwm) WRITE( numond, namhth )
-
+      ll_diahth = iom_use("mlddzt") .OR. iom_use("mldr0_3") .OR. iom_use("mldr0_1") .OR.  &
+           & iom_use("mld_dt02") .OR. iom_use("topthdep") .OR. iom_use("mldr10_3") .OR.  &
+           & iom_use("pycndep") .OR. iom_use("tinv") .OR. iom_use("depti"). OR. &
+           & iom_use("20d") .OR. iom_use("28d") .OR. iom_use("hc300")
       IF(lwp) THEN
-         WRITE(numout,*) '   Namelist  namhth :'
-         WRITE(numout,*) '      check the heat and salt budgets (T) or not (F)       ln_diahth = ', ln_diahth
+         WRITE(numout,*) '   output upper ocean diagnostics (T) or not (F)       ll_diahth = ', ll_diahth
       ENDIF
       !
Index: NEMO/releases/release-4.0/src/OCE/step.F90
===================================================================
--- NEMO/releases/release-4.0/src/OCE/step.F90	(revision 11095)
+++ NEMO/releases/release-4.0/src/OCE/step.F90	(revision 11096)
@@ -214,5 +214,5 @@
       IF( lk_floats  )   CALL flo_stp( kstp )         ! drifting Floats
       IF( ln_diacfl  )   CALL dia_cfl( kstp )         ! Courant number diagnostics
-      IF( ln_diahth  )   CALL dia_hth( kstp )         ! Thermocline depth (20 degres isotherm depth)
+      IF( ll_diahth  )   CALL dia_hth( kstp )         ! Thermocline depth (20 degres isotherm depth)
       IF( lk_diadct  )   CALL dia_dct( kstp )         ! Transports
                          CALL dia_ar5( kstp )         ! ar5 diag
