Index: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 11035)
+++ branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 11101)
@@ -151,5 +151,5 @@
      READ  ( numnam_cfg, namdct, IOSTAT = ios, ERR = 902 )
 902  IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdct in configuration namelist', lwp )
-     IF(lwm) WRITE ( numond, namdct )
+     IF(lwm .AND. nprint >2) WRITE ( numond, namdct )
 
      IF( lwp ) THEN
@@ -185,5 +185,7 @@
      transports_3d(:,:,:,:)=0.0 
      transports_2d(:,:,:)  =0.0 
-
+     !
+     IF(lwp .AND. lflush) CALL flush(numout)
+     !
      IF( nn_timing == 1 )   CALL timing_stop('dia_dct_init')
      !
@@ -301,5 +303,7 @@
         CALL wrk_dealloc( nb_sec_max,nb_type_class,nb_class_max , zsum  )
      ENDIF    
-
+     !
+     IF(lwp .AND. lflush) CALL flush(numout)
+     !
      IF( nn_timing == 1 )   CALL timing_stop('dia_dct')
      !
@@ -503,5 +507,7 @@
  
      nb_sec = jsec-1   !number of section read in the file
-
+     !
+     IF(lwp .AND. lflush) CALL flush(numout)
+ 
      CALL wrk_dealloc( nb_point_max, directemp )
      !
Index: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 11035)
+++ branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 11101)
@@ -95,5 +95,5 @@
       READ  ( numnam_cfg, nam_diaharm, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diaharm in configuration namelist', lwp )
-      IF(lwm) WRITE ( numond, nam_diaharm )
+      IF(lwm .AND. nprint > 2) WRITE ( numond, nam_diaharm )
       !
       IF(lwp) THEN
@@ -160,4 +160,6 @@
       ALLOCATE( ana_temp(jpi,jpj,2*nb_ana,3) )
       ana_temp(:,:,:,:) = 0._wp
+ 
+      IF(lwp .AND. lflush) CALL flush(numout)
 
    END SUBROUTINE dia_harm_init
@@ -231,7 +233,10 @@
       CALL wrk_alloc( jpi , jpj , jpmax_harmo , 2 , ana_amp )
 
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'anharmo_end: kt=nitend_han: Perform harmonic analysis'
-      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
+      IF(lwp) THEN
+        WRITE(numout,*)
+        WRITE(numout,*) 'anharmo_end: kt=nitend_han: Perform harmonic analysis'
+        WRITE(numout,*) '~~~~~~~~~~~~'
+        IF(lflush) CALL flush(numout)
+      ENDIF
 
       ztime_ini = nit000_han*rdt                 ! Initial time in seconds at the beginning of analysis
@@ -400,4 +405,5 @@
 #endif
       IF(lwp) WRITE(numout,*) '  '
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       ! A) Elevation
Index: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 11035)
+++ branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 11101)
@@ -361,5 +361,5 @@
       READ  ( numnam_cfg, namhsb, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namhsb in configuration namelist', lwp )
-      IF(lwm) WRITE ( numond, namhsb )
+      IF(lwm .AND. nprint > 2) WRITE ( numond, namhsb )
 
       !
Index: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90	(revision 11035)
+++ branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90	(revision 11101)
@@ -131,4 +131,5 @@
          IF(lwp) WRITE(numout,*) '~~~~~~~ '
          IF(lwp) WRITE(numout,*)
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 11035)
+++ branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 11101)
@@ -469,5 +469,5 @@
       READ  ( numnam_cfg, namptr, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist', lwp )
-      IF(lwm) WRITE ( numond, namptr )
+      IF(lwm .AND. nprint > 2) WRITE ( numond, namptr )
 
       IF(lwp) THEN                     ! Control print
@@ -478,4 +478,5 @@
          WRITE(numout,*) '      Poleward heat & salt transport (T) or not (F)      ln_diaptr  = ', ln_diaptr
          WRITE(numout,*) '      Global (F) or glo/Atl/Pac/Ind/Indo-Pac basins      ln_subbas  = ', ln_subbas
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 11035)
+++ branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 11101)
@@ -462,5 +462,4 @@
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
       !!
-      LOGICAL ::   ll_print = .FALSE.                        ! =T print and flush numout
       CHARACTER (len=40) ::   clhstnam, clop, clmx           ! local names
       INTEGER  ::   inum = 11                                ! temporary logical unit
@@ -489,8 +488,4 @@
       ! -----------------
 
-      ! local variable for debugging
-      ll_print = .FALSE.
-      ll_print = ll_print .AND. lwp
-
       ! Define frequency of output and means
       zdt = rdt
@@ -532,5 +527,5 @@
          IF(lwp)WRITE(numout,*) ' indexes of zoom = ', iimi, iima, ijmi, ijma,   &
                                  ' limit storage in depth = ', ipk
-
+       
          ! WRITE root name in date.file for use by postpro
          IF(lwp) THEN
@@ -806,7 +801,9 @@
          CALL histend( nid_W, snc4chunks=snc4set )
 
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'End of NetCDF Initialization'
-         IF(ll_print) CALL FLUSH(numout )
+         IF(lwp) THEN
+            WRITE(numout,*)
+            WRITE(numout,*) 'End of NetCDF Initialization'
+            IF(lflush) CALL flush(numout)
+         ENDIF
 
       ENDIF
@@ -987,4 +984,6 @@
       !
       IF( nn_timing == 1 )   CALL timing_stop('dia_wri')
+      !
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
    END SUBROUTINE dia_wri
