Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 10774)
@@ -1092,14 +1092,15 @@
        sn_cfctl%procincr  = 1       ! Increment for optional subsetting of areas [default:1]
        sn_cfctl%ptimincr  = 1      ! Timestep increment for writing time step progress info/solver.stat file
-   nn_print    =    0      !  level of print (0 no extra print)
-   nn_ictls    =    0      !  start i indice of control sum (use to compare mono versus
-   nn_ictle    =    0      !  end   i indice of control sum        multi processor runs
-   nn_jctls    =    0      !  start j indice of control               over a subdomain)
-   nn_jctle    =    0      !  end   j indice of control
-   nn_isplt    =    1      !  number of processors in i-direction
-   nn_jsplt    =    1      !  number of processors in j-direction
-   nn_bench    =    0      !  Bench mode (1/0): CAUTION use zero except for bench
-                           !     (no physical validity of the results)
-   nn_timing   =    0      !  timing by routine activated (=1) creates timing.output file, or not (=0)
+   nn_print    =    0       !  level of print (0 no extra print)
+   ln_flush    =    .FALSE. !  flust numout after each print
+   nn_ictls    =    0       !  start i indice of control sum (use to compare mono versus
+   nn_ictle    =    0       !  end   i indice of control sum        multi processor runs
+   nn_jctls    =    0       !  start j indice of control               over a subdomain)
+   nn_jctle    =    0       !  end   j indice of control
+   nn_isplt    =    1       !  number of processors in i-direction
+   nn_jsplt    =    1       !  number of processors in j-direction
+   nn_bench    =    0       !  Bench mode (1/0): CAUTION use zero except for bench
+                            !     (no physical validity of the results)
+   nn_timing   =    0       !  timing by routine activated (=1) creates timing.output file, or not (=0)
 /
 !-----------------------------------------------------------------------
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90	(revision 10774)
@@ -767,4 +767,6 @@
             &                    TRIM( c_asmbal ) // ' at timestep = ', kt
       ENDIF
+
+      IF(lwp .AND. lflush) CALL flush(numout)
                                  
    END SUBROUTINE asm_bgc_bal_wri
@@ -1140,4 +1142,5 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
    END SUBROUTINE phyto2d_asm_inc
 
@@ -1327,4 +1330,5 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
    END SUBROUTINE phyto3d_asm_inc
 
@@ -1598,4 +1602,5 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
    END SUBROUTINE pco2_asm_inc
 
@@ -1821,4 +1826,6 @@
 #endif      
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+
    END SUBROUTINE ph_asm_inc
 
@@ -2186,4 +2193,5 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
    END SUBROUTINE bgc3d_asm_inc
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90	(revision 10774)
@@ -183,4 +183,5 @@
       ENDIF
       !                    
+      IF(lwp .AND. lflush) CALL flush(numout)
    END SUBROUTINE asm_bkg_wri
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 10774)
@@ -207,4 +207,5 @@
          WRITE(numout,*) '      Choice of MLD for BGC assimilation                  mld_choice_bgc = ', mld_choice_bgc
          WRITE(numout,*) '      Maximum absolute chlorophyll increment (<=0 = off)    rn_maxchlinc = ', rn_maxchlinc
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -242,4 +243,5 @@
          WRITE(numout,*) '       iitiaustr_date = ', iitiaustr_date
          WRITE(numout,*) '       iitiaufin_date = ', iitiaufin_date
+         IF(lflush) CALL flush(numout)
       ENDIF
       
@@ -369,4 +371,5 @@
              WRITE(numout,*) '         Time-integrated weight = ', ztotwgt
              WRITE(numout,*) '         ==================================='
+             IF(lflush) CALL flush(numout)
           ENDIF
          
@@ -590,4 +593,6 @@
       ENDIF
       !
+      IF(lflush) CALL flush(numout)
+
    END SUBROUTINE asm_inc_init
 
@@ -735,4 +740,5 @@
                WRITE(numout,*) 'tra_asm_inc : Tracer IAU at time step = ', kt,' with IAU weight = ', wgtiau(it)
                WRITE(numout,*) '~~~~~~~~~~~~'
+               IF(lflush) CALL flush(numout)
             ENDIF
 
@@ -864,4 +870,5 @@
                   &  kt,' with IAU weight = ', wgtiau(it)
                WRITE(numout,*) '~~~~~~~~~~~~'
+               IF(lflush) CALL flush(numout)
             ENDIF
 
@@ -940,4 +947,5 @@
                   &  kt,' with IAU weight = ', wgtiau(it)
                WRITE(numout,*) '~~~~~~~~~~~~'
+               IF(lflush) CALL flush(numout)
             ENDIF
 
@@ -1030,4 +1038,5 @@
                   &  kt,' with IAU weight = ', wgtiau(it)
                WRITE(numout,*) '~~~~~~~~~~~~'
+               IF(lflush) CALL flush(numout)
             ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/bias.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/bias.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/bias.F90	(revision 10774)
@@ -320,4 +320,5 @@
          
          WRITE(numout,*) '     time step is    = ',rdt,'you choose to write pcbias at nn_bias_itwrt  = ',nn_bias_itwrt,'and end of iau is rday/rdt=',rday/rdt 
+         IF(lflush) call flush(numout)
       ENDIF
       IF( .NOT. ln_bias ) RETURN
@@ -561,5 +562,6 @@
          ENDWHERE   
       ENDIF 
-
+      
+      IF(lwp .AND. lflush) call flush(numout)
 
    END SUBROUTINE bias_init
@@ -895,5 +897,5 @@
             ENDIF
       ENDIF
-
+      IF(lwp .AND. lflush) call flush(numout)
    END SUBROUTINE tra_bias
 
@@ -971,4 +973,6 @@
             &          rhd_pc, gru_pc , grv_pc  )
       ENDIF
+
+      IF(lwp .AND. lflush) call flush(numout)
 
    END SUBROUTINE dyn_bias
@@ -1005,4 +1009,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) call flush(numout)
+
    END SUBROUTINE bias_opn
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 10774)
@@ -894,4 +894,6 @@
       ENDDO ! ib_bdy 
 
+      IF(lwp .AND. lflush) CALL flush(numout)
+
       IF( nn_timing == 1 ) CALL timing_stop('bdy_dta_init')
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 10774)
@@ -110,7 +110,10 @@
       IF( nn_timing == 1 ) CALL timing_start('bdy_init')
 
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'bdy_init : initialization of open boundaries'
-      IF(lwp) WRITE(numout,*) '~~~~~~~~'
+      IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) 'bdy_init : initialization of open boundaries'
+         WRITE(numout,*) '~~~~~~~~'
+         IF(lflush) CALL flush(numout)
+      ENDIF
       !
 
@@ -1348,4 +1351,6 @@
       ENDIF
 
+      IF(lwp .AND. lflush) CALL flush(numout)
+
       CALL wrk_dealloc(jpi,jpj,zfmask) 
 
@@ -1722,4 +1727,6 @@
       IF ((itest==0).AND.(lwp)) WRITE(numout,*) 'NO open boundary corner found'
       !
+      IF(lwp. AND. lflush) CALL flush(numout)
+      !
       ! Other tests TBD: 
       ! segments completly on land
@@ -1757,4 +1764,5 @@
          IF(lwp) WRITE(numout,*) ' ==========  have different open bdy schemes'                                                  
          IF(lwp) WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
          nstop = nstop + 1
       ENDIF
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 10774)
@@ -99,4 +99,5 @@
          IF(lwp) WRITE(numout,*) 'bdytide_init : initialization of tidal harmonic forcing at open boundaries'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -120,16 +121,17 @@
             IF(lwm .AND. nprint > 2) WRITE ( numond, nambdy_tide )
             !                                               ! Parameter control and print
-            IF(lwp) WRITE(numout,*) '  '
-            IF(lwp) WRITE(numout,*) '          Namelist nambdy_tide : tidal harmonic forcing at open boundaries'
-            IF(lwp) WRITE(numout,*) '             read tidal data in 2d files: ', ln_bdytide_2ddta
-            IF(lwp) WRITE(numout,*) '             assume complex conjugate   : ', ln_bdytide_conj
-            IF(lwp) WRITE(numout,*) '             Number of tidal components to read: ', nb_harmo
-            IF(lwp) THEN 
-                    WRITE(numout,*) '             Tidal components: ' 
+            IF(lwp) THEN
+               WRITE(numout,*) '  '
+               WRITE(numout,*) '          Namelist nambdy_tide : tidal harmonic forcing at open boundaries'
+               WRITE(numout,*) '             read tidal data in 2d files: ', ln_bdytide_2ddta
+               WRITE(numout,*) '             assume complex conjugate   : ', ln_bdytide_conj
+               WRITE(numout,*) '             Number of tidal components to read: ', nb_harmo
+               WRITE(numout,*) '             Tidal components: ' 
                DO itide = 1, nb_harmo
                   WRITE(numout,*)  '                 ', Wave(ntide(itide))%cname_tide 
                END DO
-            ENDIF 
-            IF(lwp) WRITE(numout,*) ' '
+               WRITE(numout,*) ' '
+               IF(lflush) CALL flush(numout)
+            ENDIF
 
             ! Allocate space for tidal harmonics data - get size from OBC data arrays
@@ -333,4 +335,5 @@
            WRITE(numout,*) 'bdytide_update : (re)Initialization of the tidal bdy forcing at kt=',kt
            WRITE(numout,*) '~~~~~~~~~~~~~~ '
+           IF(lflush) CALL flush(numout)
         ENDIF
         !
@@ -448,4 +451,5 @@
                WRITE(numout,*) 'bdy_tide_dta : Refresh nodal factors for tidal open bdy data at kt=',kt
                WRITE(numout,*) '~~~~~~~~~~~~~~ '
+               IF(lflush) CALL flush(numout)
                ENDIF
                !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 10774)
@@ -87,4 +87,5 @@
          IF(lwp) WRITE(numout,*)'bdy_vol : Correction of velocities along unstructured OBC'
          IF(lwp) WRITE(numout,*)'~~~~~~~'
+         IF(lflush) CALL flush(numout)
       END IF 
 
@@ -164,4 +165,5 @@
          IF(lwp) WRITE(numout,*)'          correction velocity zubtpecor =', zubtpecor , '(m/s)'
          IF(lwp) WRITE(numout,*)'          cumulated transport ztranst   =', ztranst   , '(m3/s)'
+         IF(lflush) CALL flush(numout)
       END IF 
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90	(revision 10774)
@@ -100,4 +100,5 @@
          WRITE(numout,*) '      Damping file name               cn_resto  = ', cn_resto
          WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -128,4 +129,6 @@
          CALL iom_close( imask )
       ENDIF
+      !
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
    END SUBROUTINE dyn_dmp_init
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 10774)
@@ -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_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 10774)
@@ -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_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90	(revision 10774)
@@ -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_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 10774)
@@ -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_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 10774)
@@ -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
@@ -808,5 +803,5 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) 'End of NetCDF Initialization'
-         IF(ll_print) CALL FLUSH(numout )
+         IF(lwp .AND. lflush) CALL flush(numout)
 
       ENDIF
@@ -987,4 +982,6 @@
       !
       IF( nn_timing == 1 )   CALL timing_stop('dia_wri')
+      !
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
    END SUBROUTINE dia_wri
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90	(revision 10774)
@@ -78,4 +78,5 @@
       IF(lwp) WRITE(numout,*)'dom_clo : closed seas '
       IF(lwp) WRITE(numout,*)'~~~~~~~'
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       ! initial values
@@ -403,4 +404,6 @@
       CALL lbc_lnk( emp , 'T', 1._wp )
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
       IF( nn_timing == 1 )  CALL timing_stop('sbc_clo')
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 10774)
@@ -130,4 +130,5 @@
       IF(lwp) WRITE(numout,'(a,i6,a,i2,a,i2,a,i8,a,i8)')' =======>> 1/2 time step before the start of the run DATE Y/M/D = ',   &
            &                   nyear, '/', nmonth, '/', nday, '  nsec_day:', nsec_day, '  nsec_week:', nsec_week
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       ! Up to now, calendar parameters are related to the end of previous run (nit000-1)
@@ -253,8 +254,11 @@
          CALL ymds2ju( nyear, 01, 01, 0.0, fjulstartyear )
          !
-         IF(lwp .AND. nprint > 0) WRITE(numout,'(a,i8,a,i4.4,a,i2.2,a,i2.2,a,i3.3)') '======>> time-step =', kt,   &
+         IF(lwp .AND. nprint > 0) THEN
+             WRITE(numout,'(a,i8,a,i4.4,a,i2.2,a,i2.2,a,i3.3)') '======>> time-step =', kt,   &
               &   '      New day, DATE Y/M/D = ', nyear, '/', nmonth, '/', nday, '      nday_year = ', nday_year
-         IF(lwp .AND. nprint > 0) WRITE(numout,'(a,i8,a,i7,a,i5)') '         nsec_year = ', nsec_year,   &
+             WRITE(numout,'(a,i8,a,i7,a,i5)') '         nsec_year = ', nsec_year,   &
               &   '   nsec_month = ', nsec_month, '   nsec_day = ', nsec_day, '   nsec_week = ', nsec_week
+             IF(lflush) CALL flush(numout)
+         ENDIF
       ENDIF
 
@@ -321,5 +325,6 @@
                CASE ( 2 )   ;   WRITE(numout,*) ' nrstdt = 2 : calendar parameters read in restart'
                END SELECT
-               WRITE(numout,*)
+               WRITE(numout,*) ' '
+               IF(lflush) CALL flush(numout)
             ENDIF
             ! Control of date
@@ -353,4 +358,5 @@
             WRITE(numout,*) '   number of elapsed days since the begining of run : ', adatrj
             WRITE(numout,*)
+            IF(lflush) CALL flush(numout)
          ENDIF
          !
@@ -361,4 +367,5 @@
             WRITE(numout,*) 'rst_write : write oce restart file  kt =', kt
             WRITE(numout,*) '~~~~~~~'
+            IF(lflush) CALL flush(numout)
          ENDIF
          ! calendar control
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 10774)
@@ -79,4 +79,5 @@
          WRITE(numout,*) 'dom_init : domain initialization'
          WRITE(numout,*) '~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -193,4 +194,5 @@
          WRITE(numout,*) '      overwrite an existing file      ln_clobber = ', ln_clobber
          WRITE(numout,*) '      NetCDF chunksize (bytes)        nn_chunksz = ', nn_chunksz
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -293,4 +295,5 @@
          WRITE(numout,*) '                                      ppkth2            = ', ppkth2
          WRITE(numout,*) '                                      ppacr2            = ', ppacr2
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -319,4 +322,5 @@
          WRITE(numout,*) '   Namelist namcla'
          WRITE(numout,*) '      cross land advection                 nn_cla    = ', nn_cla
+         IF(lflush) CALL flush(numout)
       ENDIF
       IF ( nn_cla .EQ. 1 ) THEN
@@ -346,4 +350,5 @@
          WRITE(numout,*) '      number of chunks in k-dimension      nn_nchunks_k   = ', nn_nchunks_k
          WRITE(numout,*) '      apply netcdf4/hdf5 chunking & compression ln_nc4zip = ', ln_nc4zip
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -406,4 +411,5 @@
          WRITE(numout,"(14x,'e2t maxi: ',1f10.2,' at i = ',i5,' j= ',i5)") ze2max, iima2, ijma2
          WRITE(numout,"(14x,'e2t mini: ',1f10.2,' at i = ',i5,' j= ',i5)") ze2min, iimi2, ijmi2
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -467,4 +473,5 @@
          WRITE(numout,*) 'dom_stiff : maximum grid stiffness ratio: ', zrxmax
          WRITE(numout,*) '~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domcfg.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domcfg.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domcfg.F90	(revision 10774)
@@ -56,4 +56,5 @@
          IF( jperio == 5 )   WRITE(numout,*) '      jperio= 5, north fold with F-point pivot'
          IF( jperio == 6 )   WRITE(numout,*) '      jperio= 6, cyclic east-west and north fold with F-point pivot'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -136,4 +137,5 @@
          WRITE(numout,*) '             ending index'
          WRITE(numout,25)              (mj1(jj),jj = 1,jpjdta)
+         IF(lflush) CALL flush(numout)
       ENDIF
  25   FORMAT( 100(10x,19i4,/) )
@@ -195,4 +197,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
    END SUBROUTINE dom_glo
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 10774)
@@ -600,4 +600,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
       IF( nn_timing == 1 )  CALL timing_stop('dom_hgr')
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 10774)
@@ -562,4 +562,6 @@
       CALL wrk_dealloc( jpi, jpj, zwf  )
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
       IF( nn_timing == 1 )  CALL timing_stop('dom_msk')
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90	(revision 10774)
@@ -105,4 +105,6 @@
 
       END SELECT
+      
+      IF(lwp .AND. lflush) CALL flush(numout)
 
    END SUBROUTINE dom_stp
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 10774)
@@ -133,4 +133,5 @@
       IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated'
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       ! choose vertical coordinate (z_star, z_tilde or layer)
@@ -292,4 +293,5 @@
          IF(lwp) WRITE(numout,*) 'dom_vvl_sf_nxt : compute after scale factors'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -525,4 +527,5 @@
          IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
          IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ssha))) =', z_tmax
+         IF(lflush) CALL flush(numout)
       END IF
 
@@ -593,4 +596,5 @@
          IF(lwp) WRITE(numout,*) 'dom_vvl_sf_swp : - time filter and swap of scale factors'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~   - interpolate scale factors and compute depths for next time step'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -866,4 +870,6 @@
                neuler = 0
             ENDIF
+            !
+            IF(lwp .AND. lflush) CALL flush(numout)
             !                             ! ----------- !
             IF( ln_vvl_zstar ) THEN       ! z_star case !
@@ -1008,4 +1014,5 @@
          ! IF(       ln_vvl_kepe ) WRITE(numout,*) '              kinetic to potential energy transfer : option used'
          ! IF( .NOT. ln_vvl_kepe ) WRITE(numout,*) '              kinetic to potential energy transfer : option not used'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domwri.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domwri.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domwri.F90	(revision 10774)
@@ -90,4 +90,5 @@
       IF(lwp) WRITE(numout,*) 'dom_wri : create NetCDF mesh and mask information file(s)'
       IF(lwp) WRITE(numout,*) '~~~~~~~'
+      IF(lwp .AND. lflush) CALL flush(numout)
       
       clnam0 = 'mesh_mask'  ! filename (mesh and mask informations)
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 10774)
@@ -170,4 +170,6 @@
             &                   ' w ',   MAXVAL( e3w_0(:,:,:) )
       ENDIF
+      !
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       IF( nn_timing == 1 )  CALL timing_stop('dom_zgr')
@@ -265,4 +267,5 @@
             ENDIF
          ENDIF
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -338,4 +341,5 @@
          WRITE(numout, "(9x,' level  gdept_1d  gdepw_1d  e3t_1d   e3w_1d  ')" )
          WRITE(numout, "(10x, i4, 4f9.2)" ) ( jk, gdept_1d(jk), gdepw_1d(jk), e3t_1d(jk), e3w_1d(jk), jk = 1, jpk )
+         IF(lflush) CALL flush(numout)
       ENDIF
       DO jk = 1, jpk                      ! control positivity
@@ -598,4 +602,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
       IF( nn_timing == 1 )  CALL timing_stop('zgr_bat')
       !
@@ -651,4 +657,6 @@
          !
       ENDIF
+      !
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
    END SUBROUTINE zgr_bat_zoom
@@ -789,4 +797,6 @@
       CALL wrk_dealloc( jpi, jpj, zbathy )
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
       IF( nn_timing == 1 )  CALL timing_stop('zgr_bat_ctl')
       !
@@ -818,4 +828,5 @@
       IF(lwp) WRITE(numout,*) '    zgr_bot_level : ocean bottom k-index of T-, U-, V- and W-levels '
       IF(lwp) WRITE(numout,*) '    ~~~~~~~~~~~~~'
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       mbkt(:,:) = MAX( mbathy(:,:) , 1 )    ! bottom k-index of T-level (=1 over land)
@@ -862,4 +873,5 @@
       IF(lwp) WRITE(numout,*) '    zgr_top_level : ocean top k-index of T-, U-, V- and W-levels '
       IF(lwp) WRITE(numout,*) '    ~~~~~~~~~~~~~'
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       mikt(:,:) = MAX( misfdep(:,:) , 1 )    ! top k-index of T-level (=1)
@@ -1246,4 +1258,5 @@
          WRITE(numout,*)
          WRITE(numout,*) 'domzgr gdep3w(mbathy)'   ;   CALL prihre(zprt(:,:,6),jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
+         IF(lflush) CALL flush(numout)
       ENDIF  
       !
@@ -1273,5 +1286,4 @@
       INTEGER  ::   id, jd, nprocd
       INTEGER  ::   icompt, ibtest, ibtestim1, ibtestip1, ibtestjm1, ibtestjp1   ! (ISF)
-      LOGICAL  ::   ll_print         ! Allow  control print for debugging
       REAL(wp) ::   ze3tp , ze3wp    ! Last ocean level thickness at T- and W-points
       REAL(wp) ::   zdepwp, zdepth   ! Ajusted ocean depth to avoid too small e3t
@@ -1753,4 +1765,6 @@
       ENDIF 
 
+      IF(lwp .AND. lflush) CALL flush(numout)
+
       CALL wrk_dealloc( jpi, jpj, zmask, zbathy, zrisfdep )
       CALL wrk_dealloc( jpi, jpj, zmisfdep, zmbathy )
@@ -1855,4 +1869,5 @@
          WRITE(numout,*) '        Offset for Zb                                rn_zb_b       = ',rn_zb_b
          WRITE(numout,*) '        Bottom cell (Zb) (m) = H*rn_zb_a + rn_zb_b'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -2236,4 +2251,6 @@
       END DO
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
       CALL wrk_dealloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat , ztmpi1, ztmpi2, ztmpj1, ztmpj2 )
       !
@@ -2547,4 +2564,6 @@
       END DO
 
+      IF(lwp .AND. lflush) CALL flush(numout)
+
       CALL wrk_dealloc( jpk, z_gsigw, z_gsigt, z_gsi3w                                      )
       CALL wrk_dealloc( jpk, z_esigt, z_esigw                                               )
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90	(revision 10774)
@@ -93,4 +93,5 @@
             WRITE(numout,*) '   T & S data not used'
          ENDIF
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -216,4 +217,5 @@
             WRITE(numout,*)
             WRITE(numout,*) 'dta_tsd: interpolates T & S data onto the s- or mixed s-z-coordinate mesh'
+            IF(lflush) CALL flush(numout)
          ENDIF
          !
@@ -294,4 +296,5 @@
          CALL prihre( ptsd(:,:,jpkm1,jp_sal), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
          WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -299,4 +302,5 @@
          !                                              (data used only for initialisation)
          IF(lwp) WRITE(numout,*) 'dta_tsd: deallocte T & S arrays as they are only use to initialize the run'
+         IF(lwp .AND. lflush) CALL flush(numout)
                                         DEALLOCATE( sf_tsd(jp_tem)%fnow )     ! T arrays in the structure
          IF( sf_tsd(jp_tem)%ln_tint )   DEALLOCATE( sf_tsd(jp_tem)%fdta )
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 10774)
@@ -79,4 +79,5 @@
       IF(lwp) WRITE(numout,*) 'istate_ini : Initialization of the dynamics and tracers'
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~'
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       CALL dta_tsd_init                       ! Initialisation of T & S input data
@@ -209,4 +210,5 @@
       IF(lwp) WRITE(numout,*) 'istate_t_s : Philander s initial temperature profile'
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~   and constant salinity (',zsal,' psu)'
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       DO jk = 1, jpk
@@ -359,4 +361,6 @@
             !
       END SELECT
+      !
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
    END SUBROUTINE istate_eel
@@ -443,4 +447,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
    END SUBROUTINE istate_gyre
 
@@ -566,4 +572,6 @@
       CALL wrk_dealloc( jpi, jpj, jpk, zprn)
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
    END SUBROUTINE istate_uvg
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90	(revision 10774)
@@ -207,4 +207,5 @@
          WRITE(numout,*)
          WRITE(numout,*) '          smallest real computer value       rsmall = ', rsmall
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90	(revision 10774)
@@ -104,4 +104,5 @@
          IF(lwp) WRITE(numout,*) 'div_cur : horizontal velocity divergence and relative vorticity'
          IF(lwp) WRITE(numout,*) '~~~~~~~   NOT optimal for auto-tasking case'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -285,4 +286,5 @@
          IF(lwp) WRITE(numout,*) 'div_cur : horizontal velocity divergence and'
          IF(lwp) WRITE(numout,*) '~~~~~~~   relative vorticity'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv.F90	(revision 10774)
@@ -152,4 +152,5 @@
          IF( nadv ==  3 )   WRITE(numout,*) '         flux form   : UBS       scheme is used'
          IF( nadv == -1 )   WRITE(numout,*) '         esopa test: use all advection formulation'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90	(revision 10774)
@@ -66,4 +66,5 @@
          WRITE(numout,*) 'dyn_adv_cen2 : 2nd order flux form momentum advection'
          WRITE(numout,*) '~~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90	(revision 10774)
@@ -90,4 +90,5 @@
          IF(lwp) WRITE(numout,*) 'dyn_adv_ubs : UBS flux form momentum advection'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 10774)
@@ -136,4 +136,5 @@
          IF(lwp) THEN 
          WRITE(numout,*) " ! restore original density"
+         IF(lflush) CALL flush(numout)
          ENDIF
          rhd(:,:,:) = z_rhd_st(:,:,:)     ! restore original density
@@ -190,4 +191,5 @@
          WRITE(numout,*) '      s-coord. (Pressure Jacobian: Cubic polynomial)    ln_hpg_prj    = ', ln_hpg_prj
          WRITE(numout,*) '      time stepping: centered (F) or semi-implicit (T)  ln_dynhpg_imp = ', ln_dynhpg_imp
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -260,4 +262,5 @@
          IF(lwp) WRITE(numout,*) 'dyn:hpg_zco : hydrostatic pressure gradient trend'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   z-coordinate case '
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -325,4 +328,5 @@
          IF(lwp) WRITE(numout,*) 'dyn:hpg_zps : hydrostatic pressure gradient trend'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   z-coordinate with partial steps - vector optimization'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -423,4 +427,5 @@
          IF(lwp) WRITE(numout,*) 'dyn:hpg_sco : hydrostatic pressure gradient trend'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   s-coordinate case, OPA original scheme used'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -514,4 +519,5 @@
          IF(lwp) WRITE(numout,*) 'dyn:hpg_isf : hydrostatic pressure gradient trend for ice shelf'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   s-coordinate case, OPA original scheme used'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -768,4 +774,5 @@
          IF(lwp) WRITE(numout,*) 'dyn:hpg_djc : hydrostatic pressure gradient trend'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   s-coordinate case, density Jacobian with cubic polynomial scheme'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -1001,4 +1008,5 @@
          IF(lwp) WRITE(numout,*) 'dyn:hpg_prj : hydrostatic pressure gradient trend'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   s-coordinate case, cubic spline pressure Jacobian'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 10774)
@@ -88,4 +88,5 @@
          IF(lwp) WRITE(numout,*) 'dyn_keg : kinetic energy gradient trend, scheme number=', kscheme
          IF(lwp) WRITE(numout,*) '~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90	(revision 10774)
@@ -100,4 +100,5 @@
             IF(lwp) WRITE(numout,*) 'dyn_ldf : no lateral diffusion on momentum setup'
             IF(lwp) WRITE(numout,*) '~~~~~~~ '
+            IF(lflush) CALL flush(numout)
          ENDIF
       END SELECT
@@ -139,4 +140,5 @@
          WRITE(numout,*) '          horizontal (geopotential)   ln_dynldf_hor   = ', ln_dynldf_hor
          WRITE(numout,*) '          iso-neutral                 ln_dynldf_iso   = ', ln_dynldf_iso
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -229,4 +231,5 @@
          IF( nldf ==  4 )   WRITE(numout,*) '              laplacian and bilaplacian operators'
          IF( nldf ==  5 )   WRITE(numout,*) '              rotated laplacian and bilaplacian operators'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90	(revision 10774)
@@ -90,4 +90,5 @@
          WRITE(numout,*) 'dyn_ldf_bilap : iso-level bilaplacian operator'
          WRITE(numout,*) '~~~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90	(revision 10774)
@@ -98,4 +98,5 @@
          IF(lwp) WRITE(numout,*) 'dyn_ldf_bilapg : horizontal biharmonic operator in s-coordinate'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
          !                                      ! allocate dyn_ldf_bilapg arrays
          IF( dyn_ldf_bilapg_alloc() /= 0 )   CALL ctl_stop('STOP', 'dyn_ldf_bilapg: failed to allocate arrays')
@@ -123,4 +124,5 @@
             IF(lwp) WRITE(numout,*) ' max slop: u', SQRT( MAXVAL(uslp*uslp)), ' v ', SQRT(MAXVAL(vslp)),  &
                &                             ' wi', sqrt(MAXVAL(wslpi))     , ' wj', sqrt(MAXVAL(wslpj))
+            IF(lwp .AND. lflush) CALL flush(numout)
          endif
 !!end
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90	(revision 10774)
@@ -127,4 +127,5 @@
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   s-coordinate horizontal diffusive operator'
          !                                      ! allocate dyn_ldf_bilap arrays
+         IF(lflush) CALL flush(numout)
          IF( dyn_ldf_iso_alloc() /= 0 )   CALL ctl_stop('STOP', 'dyn_ldf_iso: failed to allocate arrays')
       ENDIF
@@ -151,4 +152,5 @@
             IF(lwp) WRITE(numout,*) ' max slop: u', SQRT( MAXVAL(uslp*uslp)), ' v ', SQRT(MAXVAL(vslp)),  &
                &                             ' wi', sqrt(MAXVAL(wslpi))     , ' wj', sqrt(MAXVAL(wslpj))
+            IF(lwp .AND. lflush) CALL flush(numout)
          endif
 !!end
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap.F90	(revision 10774)
@@ -70,4 +70,5 @@
          IF(lwp) WRITE(numout,*) 'dyn_ldf : iso-level harmonic (laplacian) operator'
          IF(lwp) WRITE(numout,*) '~~~~~~~ '
+         IF(lflush) CALL flush(numout)
       ENDIF
       !                                                ! ===============
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90	(revision 10774)
@@ -145,4 +145,5 @@
             WRITE(numout,*)
          ENDIF
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -304,7 +305,9 @@
       CALL lbc_lnk( zunep, 'U', -1.0_wp )
       CALL lbc_lnk( zvnep, 'V', -1.0_wp )
-      WRITE(numout,*) '      zunep: min, max       = ', unemin,unemax
-      WRITE(numout,*) '      zvnep: min, max       = ', vnemin,vnemax
-      WRITE(numout,*)
+      IF(lwp .AND. nprint > 0) THEN
+         WRITE(numout,*) '      zunep: min, max       = ', unemin,unemax
+         WRITE(numout,*) '      zvnep: min, max       = ', vnemin,vnemax
+         WRITE(numout,*)
+      ENDIF
 
       !!  Compute, once and for all, the horizontal divergence (zhdivnep)
@@ -328,7 +331,11 @@
          END DO
       END DO
-      WRITE(numout,*) '   zhdivnep: min, max       = ', zhdivmin,zhdivmax
-      WRITE(numout,*) '   zmrotnep: min, max       = ', zmrotmin,zmrotmax
-      WRITE(numout,*)
+
+      IF(lwp .AND. nprint > 0) THEN
+         WRITE(numout,*) '   zhdivnep: min, max       = ', zhdivmin,zhdivmax
+         WRITE(numout,*) '   zmrotnep: min, max       = ', zmrotmin,zmrotmax
+         WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
+      ENDIF
 
 !!    Deallocate temporary workspace arrays, which are all local to
@@ -384,4 +391,5 @@
       IF(lwp) WRITE(numout,*) 'horizontal velocity divergence and'
       IF(lwp) WRITE(numout,*) 'relative vorticity of Neptune flow'
+      IF(lwp .AND. lflush) CALL flush(numout)
 #if defined key_noslip_accurate
    !!----------------------------------------------------------------------
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 10774)
@@ -119,4 +119,5 @@
          IF(lwp) WRITE(numout,*) 'dyn_nxt : time stepping'
          IF(lwp) WRITE(numout,*) '~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 10774)
@@ -231,4 +231,5 @@
          WRITE(numout,*) '     Free surface with time splitting       lk_dynspg_ts  = ', lk_dynspg_ts
          WRITE(numout,*) '     Filtered free surface cst volume       lk_dynspg_flt = ', lk_dynspg_flt
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -266,4 +267,5 @@
          IF( nspg ==  1 )   WRITE(numout,*) '     free surface with time splitting scheme'
          IF( nspg ==  2 )   WRITE(numout,*) '     filtered free surface'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 10774)
@@ -75,4 +75,5 @@
          !
          IF( lk_vvl .AND. lwp ) WRITE(numout,*) '              lk_vvl=T : spg is included in dynhpg'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 10774)
@@ -120,4 +120,5 @@
          IF(lwp) WRITE(numout,*) 'dyn_spg_flt : surface pressure gradient trend'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   (free surface constant volume case)'
+         IF(lwp .AND. lflush) CALL flush(numout)
        
          ! set to zero free surface specific arrays
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 10774)
@@ -195,4 +195,5 @@
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~   free surface with time splitting'
          IF(lwp) WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
          !
          IF (neuler==0) ll_init=.TRUE.
@@ -1161,4 +1162,5 @@
       IF(lwp) WRITE(numout,*) '     Barotropic time step [s] is :', rdtbt
       IF(lwp) WRITE(numout,*) '     Maximum Courant number is   :', zcmax
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       IF ((.NOT.ln_bt_av).AND.(.NOT.ln_bt_fw)) THEN
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 10774)
@@ -234,4 +234,5 @@
          IF(lwp) WRITE(numout,*) 'dyn:vor_ene : vorticity term: energy conserving scheme'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -346,4 +347,5 @@
          IF(lwp) WRITE(numout,*) 'dyn:vor_mix : vorticity term: mixed energy/enstrophy conserving scheme'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -463,4 +465,5 @@
          IF(lwp) WRITE(numout,*) 'dyn:vor_ens : vorticity term: enstrophy conserving scheme'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -587,4 +590,5 @@
          IF(lwp) WRITE(numout,*) 'dyn:vor_een : vorticity term: energy and enstrophy conserving scheme'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
 #if ! defined key_vvl
          IF( .NOT.ALLOCATED(ze3f) ) THEN
@@ -743,4 +747,5 @@
          WRITE(numout,*) '           enstrophy and energy conserving scheme     ln_dynvor_een = ', ln_dynvor_een
          WRITE(numout,*) '           enstrophy and energy conserving scheme (old) ln_dynvor_een_old= ', ln_dynvor_een_old
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -798,4 +803,5 @@
          IF( nvor ==  3 )   WRITE(numout,*) '         vorticity scheme : energy and enstrophy conserving scheme'
          IF( nvor == -1 )   WRITE(numout,*) '         esopa test: use all lateral physics options'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 10774)
@@ -74,4 +74,5 @@
          IF(lwp)WRITE(numout,*)
          IF(lwp)WRITE(numout,*) 'dyn_zad : arakawa advection scheme'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -188,4 +189,5 @@
          IF(lwp)WRITE(numout,*)
          IF(lwp)WRITE(numout,*) 'dyn_zad_zts : arakawa advection scheme with sub-timesteps'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 10774)
@@ -136,4 +136,5 @@
          IF( nzdf ==  0 )   WRITE(numout,*) '              Explicit time-splitting scheme'
          IF( nzdf ==  1 )   WRITE(numout,*) '              Implicit (euler backward) scheme'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 10774)
@@ -73,4 +73,5 @@
          WRITE(numout,*) 'dyn_zdf_exp : vertical momentum diffusion - explicit operator'
          WRITE(numout,*) '~~~~~~~~~~~ '
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 10774)
@@ -81,4 +81,5 @@
          IF(lwp) WRITE(numout,*) 'dyn_zdf_imp : vertical momentum diffusion implicit operator'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ '
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
          IF( lk_vvl ) THEN   ;    r_vvl = 1._wp       ! Variable volume indicator
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 10774)
@@ -87,4 +87,5 @@
          IF(lwp) WRITE(numout,*) 'ssh_nxt : after sea surface height'
          IF(lwp) WRITE(numout,*) '~~~~~~~ '
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
       ENDIF
@@ -184,4 +185,5 @@
          IF(lwp) WRITE(numout,*) 'wzv : now vertical velocity '
          IF(lwp) WRITE(numout,*) '~~~~~ '
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
          wn(:,:,jpk) = 0._wp                  ! bottom boundary condition: w=0 (set once for all)
@@ -265,4 +267,5 @@
          IF(lwp) WRITE(numout,*) 'ssh_swp : Asselin time filter and swap of sea surface height'
          IF(lwp) WRITE(numout,*) '~~~~~~~ '
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90	(revision 10774)
@@ -65,4 +65,5 @@
       IF(lwp) WRITE(numout,*) '~~~~~~~~'
       IF(lwp) WRITE(numout,*) '           jpnfl = ',jpnfl
+      IF(lwp .AND. lflush) CALL flush(numout)
       
       !-------------------------!
@@ -72,4 +73,5 @@
 
          IF(lwp) WRITE(numout,*) '        float restart file read'
+         IF(lwp .AND. lflush) CALL flush(numout)
          
          ! open the restart file 
@@ -93,4 +95,5 @@
 
             IF(lwp) WRITE(numout,*) '        add new floats'
+            IF(lwp .AND. lflush) CALL flush(numout)
 
             IF( ln_ariane )THEN  !Add new floats with ariane convention
@@ -148,5 +151,6 @@
       DO jfl = kfl_start,kfl_end
          READ(inum,*) flxx(jfl),flyy(jfl),flzz(jfl), nisobfl(jfl),ngrpfl(jfl),itrash
-         if(lwp)write(numout,*)'read:',jfl,flxx(jfl),flyy(jfl),flzz(jfl), nisobfl(jfl),ngrpfl(jfl),itrash ; call flush(numout)
+         if(lwp)write(numout,*)'read:',jfl,flxx(jfl),flyy(jfl),flzz(jfl), nisobfl(jfl),ngrpfl(jfl),itrash
+         IF(lwp .AND. lflush) CALL flush(numout)
       END DO
       CLOSE(inum)
@@ -275,4 +279,5 @@
                IF(lwp) WRITE(numout,*)'geographical position',flxx(jfl),flyy(jfl),flzz(jfl)
                IF(lwp) WRITE(numout,*)'index position',tpifl(jfl),tpjfl(jfl),tpkfl(jfl)
+               IF(lwp .AND. lflush) CALL flush(numout)
             ENDIF
          END DO
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 10774)
@@ -129,5 +129,7 @@
    INTEGER ::   nn_bench     !: benchmark parameter (0/1)
    INTEGER ::   nn_bit_cmp   =    0    !: bit reproducibility  (0/1)
+   LOGICAL ::   ln_flush     !: namelist flush numout after write statement
    !                                          
+   LOGICAL ::   lflush       !: flush numout after write statement
    INTEGER ::   nprint, nictls, nictle, njctls, njctle, isplt, jsplt, nbench    !: OLD namelist names
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90	(revision 10774)
@@ -84,5 +84,8 @@
          !                 ! =============
          IF( ldwrt ) THEN  ! ... in write mode
-            IF(lwp .AND. nprint > 0) WRITE(numout,*) TRIM(clinfo)//' open existing file: '//TRIM(cdname)//' in WRITE mode'
+            IF(lwp .AND. nprint > 0) THEN
+               WRITE(numout,*) TRIM(clinfo)//' open existing file: '//TRIM(cdname)//' in WRITE mode'
+               IF(lflush) CALL flush(numout)
+            ENDIF
             IF( snc4set%luse ) THEN
                CALL iom_nf90_check(NF90_OPEN( TRIM(cdname), NF90_WRITE  , if90id ), clinfo)
@@ -92,5 +95,8 @@
             CALL iom_nf90_check(NF90_SET_FILL( if90id, NF90_NOFILL, idmy                          ), clinfo)
          ELSE              ! ... in read mode
-            IF(lwp .AND. nprint > 0) WRITE(numout,*) TRIM(clinfo)//' open existing file: '//TRIM(cdname)//' in READ mode'
+            IF(lwp .AND. nprint > 0) THEN
+               WRITE(numout,*) TRIM(clinfo)//' open existing file: '//TRIM(cdname)//' in READ mode'
+               IF(lflush) CALL flush(numout)
+            ENDIF
             CALL iom_nf90_check(NF90_OPEN( TRIM(cdname), NF90_NOWRITE, if90id, chunksize = ichunk ), clinfo)
          ENDIF
@@ -103,5 +109,8 @@
                cdname = TRIM(cltmp)
             ENDIF
-            IF(lwp .AND. nprint > 0) WRITE(numout,*) TRIM(clinfo)//' create new file: '//TRIM(cdname)//' in WRITE mode'
+            IF(lwp .AND. nprint > 0) THEN
+               WRITE(numout,*) TRIM(clinfo)//' create new file: '//TRIM(cdname)//' in WRITE mode'
+               IF(lflush) CALL flush(numout)
+            ENDIF
 
             IF( llclobber ) THEN   ;   imode = IOR( NF90_64BIT_OFFSET, NF90_CLOBBER   )
@@ -109,5 +118,8 @@
             ENDIF
             IF( snc4set%luse ) THEN
-               IF(lwp .AND. nprint > 0) WRITE(numout,*) TRIM(clinfo)//' creating file: '//TRIM(cdname)//' in hdf5 (netcdf4) mode'
+               IF(lwp .AND. nprint > 0) THEN
+                  WRITE(numout,*) TRIM(clinfo)//' creating file: '//TRIM(cdname)//' in hdf5 (netcdf4) mode'
+                  IF(lflush) CALL flush(numout)
+               ENDIF
                CALL GET_NF90_SYMBOL("NF90_HDF5", ihdf5)
                IF( llclobber ) THEN   ;   imode = IOR(ihdf5, NF90_CLOBBER)
@@ -158,5 +170,8 @@
         &                                               len  = iom_file(kiomid)%lenuld ), clinfo )
          ENDIF
-         IF(lwp .AND. nprint > 0) WRITE(numout,*) '                   ---> '//TRIM(cdname)//' OK'
+         IF(lwp .AND. nprint > 0) THEN
+            WRITE(numout,*) '                   ---> '//TRIM(cdname)//' OK'
+            IF(lflush) CALL flush(numout)
+         ENDIF
       ELSE
          kiomid = 0               ! return error flag
@@ -431,5 +446,8 @@
          ! trick: defined to 0 to say that dimension variables are defined but not yet written
          iom_file(kiomid)%dimsz(1, 1)  = 0   
-         IF(lwp .AND. nprint > 1) WRITE(numout,*) TRIM(clinfo)//' define dimension variables done'
+         IF(lwp .AND. nprint > 1) THEN
+            WRITE(numout,*) TRIM(clinfo)//' define dimension variables done'
+            IF(lflush) CALL flush(numout)
+         ENDIF
       ENDIF
       ! define the data if it is not already done
@@ -500,5 +518,8 @@
             IF(lwp .AND. nprint > 1) WRITE(numout,*) TRIM(clinfo)//' chunked ok. Chunks sizes: ', ichunksz
          ENDIF
-         IF(lwp .AND. nprint > 1) WRITE(numout,*) TRIM(clinfo)//' defined ok'
+         IF(lwp .AND. nprint > 1) THEN
+            WRITE(numout,*) TRIM(clinfo)//' defined ok'
+            IF(lflush) CALL flush(numout)
+         ENDIF
       ELSE
          idvar = kvid
@@ -543,5 +564,8 @@
                CALL iom_nf90_check(NF90_INQUIRE_DIMENSION( if90id, 3, len = iom_file(kiomid)%dimsz(1,3) ), clinfo)
                iom_file(kiomid)%dimsz(1  , 4) = 1   ! unlimited dimension
-               IF(lwp .AND. nprint > 1) WRITE(numout,*) TRIM(clinfo)//' write dimension variables done'
+               IF(lwp .AND. nprint > 1) THEN
+                 WRITE(numout,*) TRIM(clinfo)//' write dimension variables done'
+                 IF(lflush) CALL flush(numout)
+               ENDIF
             ENDIF
          ENDIF
@@ -561,5 +585,8 @@
          IF( iom_file(kiomid)%luld(idvar) )   iom_file(kiomid)%dimsz(iom_file(kiomid)%ndims(idvar), idvar)    &
                &                            = iom_file(kiomid)%dimsz(iom_file(kiomid)%ndims(idvar), idvar) + 1
-         IF(lwp .AND. nprint > 0) WRITE(numout,*) TRIM(clinfo)//' written ok'
+         IF(lwp .AND. nprint > 0) THEN
+           WRITE(numout,*) TRIM(clinfo)//' written ok'
+           IF(lflush) CALL flush(numout)
+         ENDIF
       ENDIF
       !     
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90	(revision 10774)
@@ -369,4 +369,5 @@
          WRITE(j_id,*)
          WRITE(j_id,*)
+         IF(lflush) CALL flush(j_id)
 
 9000     FORMAT(a41,i4.4,a14)
@@ -515,4 +516,5 @@
       IF(lwp) WRITE(numout,*)' sum ilcitl(1,j) = ', zjdom, ' jpjglo = ', jpjglo
       IF(lwp) WRITE(numout,*)
+      IF(lwp .AND. lflush) CALL flush(numout)
       
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 10774)
@@ -116,4 +116,5 @@
                   ENDIF
                ENDIF
+               IF(lflush) CALL flush(numout)
             ENDIF
             !
@@ -211,4 +212,5 @@
             IF ( snc4set%luse )      WRITE(numout,*) 'rst_read : configured with NetCDF4 support'
             WRITE(numout,*) '~~~~~~~~'
+            IF(lflush) CALL flush(numout)
          ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LBC/cla.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LBC/cla.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LBC/cla.F90	(revision 10774)
@@ -83,4 +83,5 @@
          IF(lwp) WRITE(numout,*) 'div_cla : cross land advection on hdiv '
          IF(lwp) WRITE(numout,*) '~~~~~~~~'
+         IF(lflush) CALL flush(numout) 
          !
          IF( nbab == 1 )   CALL cla_bab_el_mandeb('ini')    ! Bab el Mandeb ( Red Sea - Indian ocean )
@@ -120,4 +121,5 @@
          IF(lwp) WRITE(numout,*) 'tra_cla : cross land advection on tracers '
          IF(lwp) WRITE(numout,*) '~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -147,4 +149,5 @@
          IF(lwp) WRITE(numout,*) 'cla_dynspg : cross land advection on (ua,va) '
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -181,4 +184,5 @@
       IF(lwp) WRITE(numout,*) 'cla_init : cross land advection initialisation '
       IF(lwp) WRITE(numout,*) '~~~~~~~~~'
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       !                           ! Allocate arrays for this module
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90	(revision 10774)
@@ -73,4 +73,5 @@
          WRITE(numout,*) '         nimpp  = ', nimpp
          WRITE(numout,*) '         njmpp  = ', njmpp
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -137,4 +138,5 @@
       IF(lwp) WRITE(numout,*) 'mpp_init : Message Passing MPI'
       IF(lwp) WRITE(numout,*) '~~~~~~~~'
+      IF(lflush) CALL flush(numout)
 
 
@@ -287,4 +289,5 @@
       IF(lwp) WRITE(numout,*)' sum ilcit(1,j)=', zjdom, ' jpjglo=', jpjglo
       IF(lwp) WRITE(numout,*)
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       IF(lwp .AND. nprint>1) THEN
@@ -305,4 +308,6 @@
             il1 = il1+ifreq
          END DO
+         IF(lflush) CALL flush(numout)
+      ENDIF
  9200     FORMAT('     ***',20('*************',a3))
  9203     FORMAT('     *     ',20('         *   ',a3))
@@ -310,5 +315,4 @@
  9202     FORMAT(' ',i3,' *  ',20(i3,'  x',i3,'   *   '))
  9204     FORMAT('     *  ',20('      ',i3,'   *   '))
-      ENDIF
 
       ! 5. From global to local
@@ -447,4 +451,5 @@
          WRITE(numout,*) ' jprecj = ', jprecj , ' npnw   = ', npnw
          WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -456,4 +461,5 @@
          CALL mpp_ini_north
          IF(lwp) WRITE(numout,*) ' mpp_init : North fold boundary prepared for jpni >1'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -511,4 +517,5 @@
           WRITE(numout,*) '                    ihals = ', ihals(1), ihals(2)
           WRITE(numout,*) '                    ihale = ', ihale(1), ihale(2)
+          IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90	(revision 10774)
@@ -93,4 +93,5 @@
       IF(lwp)WRITE(numout,*) '~~~~~~~~'
       IF(lwp)WRITE(numout,*) ' '
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       IF( jpni*jpnj < jpnij ) CALL ctl_stop( ' jpnij > jpni x jpnj impossible' )
@@ -184,4 +185,5 @@
       IF(lwp) WRITE(numout,*) ' sum ilcj(1,j)=',zjdom,' jpjglo=',jpjglo
       IF(lwp) WRITE(numout,*)
+      IF(lwp .AND. lflush) CALL flush(numout)
 
 
@@ -364,4 +366,5 @@
             il1 = il1+ifreq
          END DO
+         IF(lflush) CALL flush(numout)
  9400     FORMAT('     ***',20('*************',a3))
  9403     FORMAT('     *     ',20('         *   ',a3))
@@ -572,4 +575,5 @@
          WRITE(numout,*) ' jprecj = ', jprecj , ' npnw   = ', npnw
          WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -581,4 +585,5 @@
          CALL mpp_ini_north
          IF(lwp) WRITE(numout,*) ' mpp_init2 : North fold boundary prepared for jpni >1'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 10774)
@@ -159,5 +159,6 @@
      nkahm_smag = 1
 #endif
-
+      !
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
    END SUBROUTINE ldf_dyn_init
@@ -210,4 +211,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
    END SUBROUTINE ldf_zpf_1d
 
@@ -252,4 +255,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
    END SUBROUTINE ldf_zpf_1d_3d
 
@@ -293,4 +298,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
    END SUBROUTINE ldf_zpf_3d
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c2d.h90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c2d.h90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c2d.h90	(revision 10774)
@@ -41,4 +41,5 @@
       IF(lwp) WRITE(numout,*) 'ldf_dyn_c2d : 2d lateral eddy viscosity coefficient'
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       ! harmonic operator (ahm1, ahm2) : ( T- and F- points) (used for laplacian operators
@@ -85,4 +86,5 @@
             CALL prihre(ahm2,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
          ENDIF
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -119,4 +121,5 @@
             CALL prihre(ahm4,jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
          ENDIF
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !
@@ -160,4 +163,5 @@
       IF(lwp) WRITE(numout,*) '~~~~~~  --'
       IF(lwp) WRITE(numout,*) '        orca ocean configuration'
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       IF( cp_cfg == "orca" .AND. cp_cfz == "antarctic" ) THEN
@@ -316,4 +320,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
       CALL wrk_dealloc( jpi   , jpj   , icof  )
       !
@@ -358,4 +364,5 @@
       IF(lwp) WRITE(numout,*) '~~~~~~  --'
       IF(lwp) WRITE(numout,*) '        orca_r1 configuration'
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       IF( cp_cfg == "orca" .AND. cp_cfz == "antarctic" ) THEN
@@ -519,4 +526,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
       CALL wrk_dealloc( jpi   , jpj   , icof  )
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90	(revision 10774)
@@ -179,4 +179,6 @@
          ENDIF
       ENDIF
+      !
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       CALL wrk_dealloc( jpk, zcoef )
@@ -432,4 +434,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
       CALL wrk_dealloc( jpi   , jpj   , icof  )
       CALL wrk_dealloc( jpk   ,         zcoef )
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_smag.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_smag.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_smag.F90	(revision 10774)
@@ -106,8 +106,9 @@
 
 
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'ldf_dyn_smag : 3D lateral eddy viscosity coefficient'
-      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
-     
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'ldf_dyn_smag : 3D lateral eddy viscosity coefficient'
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
+
       ENDIF
       
@@ -174,9 +175,14 @@
             ahm1(:,:,jpk) = ahm1(:,:,jpkm1)
             ahm2(:,:,jpk) = ahm2(:,:,jpkm1)
-            IF(lwp.and.kt==nit000) WRITE(numout,'(36x," ahm ", 7x)')
+            IF(lwp.and.kt==nit000) THEN
+               WRITE(numout,'(36x," ahm ", 7x)') 
+               IF(lflush) CALL flush(numout)
+            ENDIF
+         IF(lwp.and.kt==nit000) THEN
             DO jk = 1, jpk
-
-               IF(lwp.and.kt==nit000) WRITE(numout,'(30x,E10.2,8x,i3)') ahm1(jpi/2,jpj/2,jk), jk
+               WRITE(numout,'(30x,E10.2,8x,i3)') ahm1(jpi/2,jpj/2,jk), jk
             END DO
+            IF(lflush) CALL flush(numout)
+         ENDIF
       CALL lbc_lnk( ahm1, 'T', 1. )   ! Lateral boundary conditions on ( ahtt )
       CALL lbc_lnk( ahm2, 'F', 1. )   ! Lateral boundary conditions on ( ahtt )
@@ -245,10 +251,11 @@
             ahm4(:,:,jpk) = ahm4(:,:,jpkm1)
 
-      DO jk = 1, jpk
-      IF(  kt == nit000 ) THEN
-
-               IF(lwp) WRITE(numout,'(30x,E10.2,8x,i3)') ahm3(jpi/2,jpj/2,jk), jk
+      IF(  kt == nit000 .AND. lwp) THEN
+         DO jk = 1, jpk
+               WRITE(numout,'(30x,E10.2,8x,i3)') ahm3(jpi/2,jpj/2,jk), jk
+               IF(lflush) CALL flush(numout)
+         END DO
       ENDIF   
-      END DO
+
       CALL lbc_lnk( ahm3, 'U', 1. )   ! Lateral boundary conditions
       CALL lbc_lnk( ahm4, 'V', 1. )
@@ -269,5 +276,8 @@
       IF( lk_mpp )   CALL mpp_max( zdeltat )                 ! max over the global domain
       !
-      IF( MOD( kt, nwrite ) == 1 .AND. lwp )   WRITE(numout,*) ' ==>> time-step= ',kt,'dynlap:  abs(ahm) max: ', zdeltat
+      IF( MOD( kt, nwrite ) == 1 .AND. lwp )  THEN
+         WRITE(numout,*) ' ==>> time-step= ',kt,'dynlap:  abs(ahm) max: ', zdeltat
+         IF(lflush) CALL flush(numout)
+      ENDIF
     ENDIF
     If(ln_dynldf_bilap)THEN
@@ -282,5 +292,8 @@
       IF( lk_mpp )   CALL mpp_max( zdeltat )                 ! max over the global domain
       !
-      IF( MOD( kt, nwrite ) == 1 .AND. lwp )   WRITE(numout,*) ' ==>> time-step= ',kt,'dyn_bilap abs(ahm) max: ', zdeltat
+      IF( MOD( kt, nwrite ) == 1 .AND. lwp )  THEN
+         WRITE(numout,*) ' ==>> time-step= ',kt,'dyn_bilap abs(ahm) max: ', zdeltat
+         IF(lflush) CALL flush(numout)
+      ENDIF
       !
    ENDIF
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 10774)
@@ -414,4 +414,5 @@
          IF(lwp) THEN 
             WRITE(numout,*) '          Horizontal mixing in s-coordinate: slope = slope of s-surfaces' 
+            IF(lflush) CALL flush(numout)
          ENDIF 
 
@@ -451,4 +452,5 @@
             IF(lwp) WRITE(numout,*) ' max slop: u',SQRT( MAXVAL(uslp*uslp)), ' v ', SQRT(MAXVAL(vslp)),  & 
                &                             ' wi', sqrt(MAXVAL(wslpi)), ' wj', sqrt(MAXVAL(wslpj)) 
+            IF(lwp .AND. lflush) CALL flush(numout)
          endif 
   
@@ -842,4 +844,5 @@
          WRITE(numout,*) 'ldf_slp_init : direction of lateral mixing'
          WRITE(numout,*) '~~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -865,4 +868,5 @@
          IF(ln_sco .AND.  (ln_traldf_hor .OR. ln_dynldf_hor )) THEN
             IF(lwp)   WRITE(numout,*) '          Horizontal mixing in s-coordinate: slope = slope of s-surfaces'
+            IF(lwp .AND. lflush) CALL flush(numout)
 
             ! geopotential diffusion in s-coordinates on tracers and/or momentum
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 10774)
@@ -175,5 +175,6 @@
         IF(lwp.and.ln_traldf_bilap) CALL ctl_stop(' SMAGORINSKY + BILAPLACIAN - UNSTABLE OR NON_CONSERVATIVE' )
 #endif
-
+      !
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
    END SUBROUTINE ldf_tra_init
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_c2d.h90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_c2d.h90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_c2d.h90	(revision 10774)
@@ -36,8 +36,10 @@
          IF(lwp) WRITE(numout,*) ' ldf_tra_c2d : 2D eddy diffusivity and eddy'
          IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~   --  induced velocity coefficients'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ELSE
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) ' ldf_tra2d : 2D eddy diffusivity coefficient'
          IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~   --'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -75,4 +77,5 @@
             IF(lwp) WRITE(numout,*) '               Constant values used for eddy diffusivity coefficients'
             IF(lwp) WRITE(numout,*) '               Variation lat/lon only for eddy induced velocity coefficients'
+            IF(lwp .AND. lflush) CALL flush(numout)
          ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_c3d.h90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_c3d.h90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_c3d.h90	(revision 10774)
@@ -46,5 +46,5 @@
          IF(lwp) WRITE(numout,*) '               Coefficients set to constant'
       ENDIF
-
+   
 
       ! biharmonic operator   (T-point)
@@ -121,3 +121,6 @@
 
 # endif
+
+   IF(lwp .AND. lflush) CALL flush(numout)
+
    END SUBROUTINE ldf_tra_c3d
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_smag.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_smag.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_smag.F90	(revision 10774)
@@ -99,4 +99,5 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*)
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -108,6 +109,9 @@
       ahtt(:,:,:) = rn_aht_0
        IF( ln_traldf_bilap ) THEN
-        IF( lwp .AND. kt == nit000) WRITE(numout,* )'ldf_tra_smag :no bilaplacian Smagorinsky diffusivity'
-        IF( lwp .AND. kt == nit000) WRITE(numout,* )'ldf_tra_smag :bilaplacian diffusivity set to constant'  
+        IF( lwp .AND. kt == nit000) THEN
+          WRITE(numout,* )'ldf_tra_smag :no bilaplacian Smagorinsky diffusivity'
+          WRITE(numout,* )'ldf_tra_smag :bilaplacian diffusivity set to constant'  
+          IF(lflush) CALL flush(numout)
+        ENDIF
        ENDIF
 
@@ -190,4 +194,5 @@
          CALL prihre( ahtw(:,:,1), jpi, jpj, 1, jpi, 1,   &
             &                                1, jpj, 1, 1.e-1, numout )
+         IF(lflush) CALL flush(numout)
       ENDIF
 ENDIF
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90	(revision 10774)
@@ -269,4 +269,5 @@
          WRITE(numout,*) '      choose the albedo parameterization                  nn_ice_alb = ', nn_ice_alb
          WRITE(numout,*) '      albedo of bare puddled ice                          rn_albice  = ', rn_albice
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90	(revision 10774)
@@ -183,4 +183,5 @@
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~'
       IF(lwp) WRITE(numout,*)
+      IF(lflush) CALL flush(numout)
 
       ncplmodel = kcplmodel
@@ -235,4 +236,5 @@
          WRITE(numout,*) ' multiexchg: nldi, nlei, nimpp =', nldi, nlei, nimpp
          WRITE(numout,*) ' multiexchg: nldj, nlej, njmpp =', nldj, nlej, njmpp
+         IF(lflush) CALL flush(numout)
       ENDIF
       
@@ -313,6 +315,9 @@
                      CALL oasis_abort ( ssnd(ji)%nid(jc,jm), 'cpl_define', 'Failure in oasis_def_var' )
                   ENDIF
-                  IF( ln_ctl .AND. ssnd(ji)%nid(jc,jm) /= -1 ) WRITE(numout,*) "variable defined in the namcouple"
-                  IF( ln_ctl .AND. ssnd(ji)%nid(jc,jm) == -1 ) WRITE(numout,*) "variable NOT defined in the namcouple"
+                  IF( ln_ctl) THEN 
+                     IF(ssnd(ji)%nid(jc,jm) /= -1 ) WRITE(numout,*) "variable defined in the namcouple"
+                     IF(ssnd(ji)%nid(jc,jm) == -1 ) WRITE(numout,*) "variable NOT defined in the namcouple"
+                     IF(lflush) CALL flush(numout)
+                  ENDIF
                END DO
             END DO
@@ -351,6 +356,8 @@
                   END IF
 #endif
-                  IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_In
-                  flush(numout)
+                  IF( ln_ctl ) THEN
+                    WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_In
+                    IF(lflush) CALL flush(numout)
+                  ENDIF
 
                   ! Define 0D (Greenland or Antarctic ice mass) or 1D (river outflow) coupling fields
@@ -394,7 +401,9 @@
                      CALL oasis_abort ( srcv(ji)%nid(jc,jm), 'cpl_define', 'Failure in oasis_def_var' )
                   ENDIF
-                  IF( ln_ctl .AND. srcv(ji)%nid(jc,jm) /= -1 ) WRITE(numout,*) "variable defined in the namcouple"
-                  IF( ln_ctl .AND. srcv(ji)%nid(jc,jm) == -1 ) WRITE(numout,*) "variable NOT defined in the namcouple"
-
+                  IF(ln_ctl) THEN
+                    IF(srcv(ji)%nid(jc,jm) /= -1 ) WRITE(numout,*) "variable defined in the namcouple"
+                    IF(srcv(ji)%nid(jc,jm) == -1 ) WRITE(numout,*) "variable NOT defined in the namcouple"
+                    IF(lflush) CALL flush(numout)
+                  ENDIF
                END DO
             END DO
@@ -447,4 +456,5 @@
                      WRITE(numout,*) '     -     Sum value is ', SUM(pdata(:,:,jc))
                      WRITE(numout,*) '****************'
+                     IF(lflush) CALL flush(numout)
                   ENDIF
                ENDIF
@@ -491,5 +501,8 @@
                 &        kinfo == OASIS_RecvOut .OR. kinfo == OASIS_FromRestOut
                
-               IF ( ln_ctl )   WRITE(numout,*) "llaction, kinfo, kstep, ivarid: " , llaction, kinfo, kstep, srcv(kid)%nid(jc,jm)
+               IF ( ln_ctl )   THEN
+                  WRITE(numout,*) "llaction, kinfo, kstep, ivarid: " , llaction, kinfo, kstep, srcv(kid)%nid(jc,jm)
+                  IF(lflush) CALL flush(numout)
+               ENDIF
                
                IF ( llaction ) THEN
@@ -513,4 +526,5 @@
                      WRITE(numout,*) '     -     Sum value is ', SUM(pdata(:,:,jc))
                      WRITE(numout,*) '****************'
+                     IF(lflush) CALL flush(numout)
                   ENDIF
 
@@ -603,4 +617,5 @@
                      WRITE(numout,*) '     - Start of data is ', pdata(1:number_to_print)
                      WRITE(numout,*) '****************'
+                     IF(lflush) CALL flush(numout)
                   ENDIF
                   
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_rnf_1d.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_rnf_1d.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_rnf_1d.F90	(revision 10774)
@@ -70,4 +70,5 @@
       IF(lwp) WRITE(numout,*) 'cpl_rnf_1d_init : initialization of river runoff coupling'
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
+      IF(lwp .AND. lflush) CALL flush(numout)
       
       REWIND(numnam_cfg)
@@ -87,4 +88,5 @@
       IF(lwp) WRITE(numout,*) '             Print river information = ',ln_print_river_info
       IF(lwp) WRITE(numout,*) ' '
+      IF(lwp .AND. lflush) CALL flush(numout)
       
       ! Assign space for river numbers
@@ -109,6 +111,7 @@
       
       ! Print out the largest river number
-      IF ( ln_print_river_info ) THEN
+      IF ( ln_print_river_info .AND. lwp) THEN
          WRITE(numout,*) 'Maximum river number in input file = ',max_river
+         IF(lflush) CALL flush(numout)
       END IF
       
@@ -137,6 +140,7 @@
       rivers%river_area(:) = REAL(rivers%river_area_c(:),wp)
       
-      IF ( ln_print_river_info ) THEN
+      IF ( ln_print_river_info .AND. lwp) THEN
         WRITE(numout,*) 'Area of rivers 1 to 10 are ',rivers%river_area(1:10)
+        IF(lflush) CALL flush(numout)
       END IF
       
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 10774)
@@ -281,4 +281,5 @@
                      & sd(jf)%nrec_b(1), sd(jf)%nrec_a(1), REAL(sd(jf)%nrec_b(2),wp)/rday, REAL(sd(jf)%nrec_a(2),wp)/rday
                   WRITE(numout, *) 'it_offset is : ',it_offset
+                  IF(lflush) CALL flush(numout)
                ENDIF
                ! temporal interpolation weights
@@ -293,4 +294,5 @@
                   WRITE(numout, clfmt) TRIM(sd(jf)%clvar), kt, REAL(isecsbc,wp)/rday, nyear, nmonth, nday,    &
                      &                 sd(jf)%nrec_a(1), REAL(sd(jf)%nrec_b(2),wp)/rday, REAL(sd(jf)%nrec_a(2),wp)/rday
+                  IF(lflush) CALL flush(numout)
                ENDIF
             ENDIF
@@ -414,5 +416,7 @@
 
          clfmt = "('fld_init : time-interpolation for ', a, ' read previous record = ', i6, ' at time = ', f7.2, ' days')"
-         IF(lwp .AND. nprint > 0) WRITE(numout, clfmt) TRIM(sdjf%clvar), sdjf%nrec_a(1), REAL(sdjf%nrec_a(2),wp)/rday
+         IF(lwp .AND. nprint > 0) THEN
+            WRITE(numout, clfmt) TRIM(sdjf%clvar), sdjf%nrec_a(1), REAL(sdjf%nrec_a(2),wp)/rday
+         ENDIF
 
       ENDIF
@@ -708,4 +712,5 @@
       IF(lwp) WRITE(numout,*) 'Dim size for ',TRIM(clvar),' is ', ilendta
       IF(lwp) WRITE(numout,*) 'Number of levels for ',TRIM(clvar),' is ', ipk
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       SELECT CASE( ipk )
@@ -779,6 +784,9 @@
                      END DO
                      sd(ju)%rotn(jn) = .TRUE.               ! vector was rotated 
-                     IF( lwp .AND. kt == nit000 )   WRITE(numout,*)   &
+                     IF( lwp .AND. kt == nit000 )   THEN
+                       WRITE(numout,*)   &
                         &   'fld_read: vector pair ('//TRIM(sd(ju)%clvar)//', '//TRIM(sd(iv)%clvar)//') rotated on to model grid'
+                        IF(lflush) CALL flush(numout)
+                     ENDIF
                   ENDIF
                ENDIF
@@ -941,6 +949,6 @@
                &                          ' data type: '      ,       sdf(jf)%cltype      ,   &
                &                          ' land/sea mask:'   , TRIM( sdf(jf)%lsmname    )
-            IF(nprint > 4) call flush(numout)
          END DO
+         IF(lflush) CALL flush(numout)
       ENDIF
       
@@ -1019,4 +1027,7 @@
             ENDIF
          END DO
+ 
+        IF(lflush) CALL flush(numout)
+
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 10774)
@@ -99,4 +99,5 @@
             WRITE(numout,*) '   Namelist namsbc_apr : Atmospheric PRessure as extrenal forcing'
             WRITE(numout,*) '      ref. pressure: global mean Patm (T) or a constant (F)  ln_ref_apr = ', ln_ref_apr
+            IF(lflush) CALL flush(numout)
          ENDIF
          !
@@ -114,4 +115,7 @@
             IF(lwp) WRITE(numout,*) '         Inverse barometer added to OBC ssh data'
          ENDIF
+         
+         IF(lwp .AND. lflush) CALL flush(numout)
+
          IF( ( ln_apr_obc ) .AND. .NOT. lk_dynspg_ts )   &
             CALL ctl_stop( 'sbc_apr: use inverse barometer ssh at open boundary ONLY possible with time-splitting' )
@@ -152,4 +156,7 @@
             ssh_ibb(:,:) = ssh_ib(:,:)
          ENDIF
+  
+         IF(lwp .AND. lflush) CALL flush(numout)
+
       ENDIF
       !                                         ! ---------------------------------------- !
@@ -159,4 +166,5 @@
          IF(lwp) WRITE(numout,*) 'sbc_apr : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp
          IF(lwp) WRITE(numout,*) '~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
          IF(nn_timing == 2)  CALL timing_start('iom_rstput')
          CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib )
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 10774)
@@ -331,4 +331,5 @@
       ENDIF
 
+      IF(lwp .AND. lflush) CALL flush(numout)
       !                                   ! allocate sbccpl arrays
       !IF( sbc_cpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_cpl_alloc : unable to allocate arrays' )
@@ -480,4 +481,5 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '   runoffs received from oasis -> force ln_rnf = ', ln_rnf
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !
@@ -630,4 +632,5 @@
             WRITE(numout,*)'                  wind stress module'
             WRITE(numout,*)
+            IF(lflush) CALL flush(numout)
          ENDIF
       ENDIF
@@ -677,4 +680,5 @@
             WRITE(numout,*)'               fraction of solar net radiation absorbed in the first ocean level'
             WRITE(numout,*)
+            IF(lflush) CALL flush(numout)
          ENDIF
       ENDIF
@@ -907,4 +911,5 @@
             WRITE(numout,*)'               fraction of solar net radiation absorbed in the first ocean level'
             WRITE(numout,*)
+            IF(lflush) CALL flush(numout)
          ENDIF
       ENDIF
@@ -947,4 +952,5 @@
             WRITE(numout,*)'                  wind stress U,V components'
             WRITE(numout,*)'                  wind stress module'
+            IF(lflush) CALL flush(numout)
          ENDIF
       ENDIF
@@ -1471,4 +1477,5 @@
          IF(lwp) WRITE(numout,*) 'Greenland icesheet mass rate of change (kg/s) is ', greenland_icesheet_mass_rate_of_change
          IF(lwp) WRITE(numout,*) 'Greenland icesheet seconds lapsed since last change is ', greenland_icesheet_timelapsed
+         IF(lwp .AND. lflush) CALL flush(numout)
       ELSE IF ( nn_coupled_iceshelf_fluxes == 2 ) THEN
          greenland_icesheet_mass_rate_of_change = rn_greenland_total_fw_flux
@@ -1518,4 +1525,5 @@
          IF(lwp) WRITE(numout,*) 'Antarctica icesheet mass rate of change (kg/s) is ', antarctica_icesheet_mass_rate_of_change
          IF(lwp) WRITE(numout,*) 'Antarctica icesheet seconds lapsed since last change is ', antarctica_icesheet_timelapsed
+         IF(lwp .AND. lflush) CALL flush(numout)
       ELSE IF ( nn_coupled_iceshelf_fluxes == 2 ) THEN
          antarctica_icesheet_mass_rate_of_change = rn_antarctica_total_fw_flux
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90	(revision 10774)
@@ -99,4 +99,5 @@
             WRITE(numout,*) '~~~~~~~'
             WRITE(numout,*)
+            IF(lflush) CALL flush(numout)
          ENDIF
          ! allocate sbcdcy arrays
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 10774)
@@ -159,5 +159,5 @@
          CALL lbc_lnk( taum(:,:), 'T', 1. )   ;   CALL lbc_lnk( wndm(:,:), 'T', 1. )
 
-         IF( nitend-nit000 <= 100 .AND. lwp ) THEN                ! control print (if less than 100 time-step asked)
+         IF( nprint > 2 .AND. lwp ) THEN                ! control print (if less than 100 time-step asked)
             WRITE(numout,*) 
             WRITE(numout,*) '        read daily momentum, heat and freshwater fluxes OK'
@@ -170,5 +170,5 @@
                CALL prihre( sf(jf)%fnow, jpi, jpj, 1, jpi, 20, 1, jpj, 10, zfact, numout )
             END DO
-            CALL FLUSH(numout)
+            IF(lflush) CALL flush(numout)
          ENDIF
          !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 10774)
@@ -86,4 +86,5 @@
             IF( kn_fwb == 2 )   WRITE(numout,*) '          adjusted from previous year budget'
             IF( kn_fwb == 3 )   WRITE(numout,*) '          fwf set to zero and spread out over erp area'
+            IF(lflush) CALL flush(numout)
          ENDIF
          !
@@ -127,4 +128,5 @@
             IF(lwp)WRITE(numout,*)'          year = ',iyear-1, ' freshwater budget read       = ', a_fwb
             IF(lwp)WRITE(numout,*)'          year = ',iyear-2, ' freshwater budget read       = ', a_fwb_b
+            IF(lwp .AND. lflush) CALL flush(numout)
          ENDIF   
          !                                         ! Update fwfold if new year start
@@ -201,4 +203,5 @@
                WRITE(numout,*)'   MIN(zerp_cor) = ', MINVAL(zerp_cor) 
                WRITE(numout,*)'   MAX(zerp_cor) = ', MAXVAL(zerp_cor) 
+               IF(lflush) CALL flush(numout)
             ENDIF
          ENDIF
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 10774)
@@ -182,5 +182,8 @@
       CALL wrk_alloc( jpi,jpj, ztmp1, ztmp2 )
       !
-      IF(lwp .AND. nprint>1) WRITE(numout,*)'cice_sbc_init'
+      IF(lwp .AND. nprint>1) THEN
+        WRITE(numout,*)'cice_sbc_init'
+        IF(lflush) CALL flush(numout)
+      ENDIF
 
       ji_off = INT ( (jpiglo - nx_global) / 2 )
@@ -342,5 +345,8 @@
 
       IF( kt == nit000 )  THEN
-         IF(lwp .AND. nprint>1) WRITE(numout,*)'cice_sbc_in'
+         IF(lwp .AND. nprint>1) THEN
+           WRITE(numout,*)'cice_sbc_in'
+           IF(lflush) CALL flush(numout)
+         ENDIF
       ENDIF
 
@@ -583,5 +589,8 @@
       
       IF( kt == nit000 )  THEN
-         IF(lwp .AND. nprint>1) WRITE(numout,*)'cice_sbc_out'
+         IF(lwp .AND. nprint>1) THEN
+           WRITE(numout,*)'cice_sbc_out'
+           IF(lflush) CALL flush(numout)
+         ENDIF
       ENDIF
       
@@ -820,5 +829,8 @@
       !!---------------------------------------------------------------------
 
-      IF(lwp .AND. nprint > 1) WRITE(numout,*)'cice_sbc_final'
+      IF(lwp .AND. nprint > 1) THEN
+        WRITE(numout,*)'cice_sbc_final'
+        IF(lflush) CALL flush(numout)
+      ENDIF
 
       CALL CICE_Finalize
@@ -943,5 +955,5 @@
          WRITE(numout,*) 
          WRITE(numout,*) '        read forcing fluxes for CICE OK'
-         CALL FLUSH(numout)
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90	(revision 10774)
@@ -124,4 +124,5 @@
          IF ( lwp ) WRITE(numout,*) '        nn_gammablk = ', nn_gammablk 
          IF ( lwp ) WRITE(numout,*) '        rn_tfri2    = ', rn_tfri2 
+         IF(lwp .AND. lflush) CALL flush(numout)
          IF (ln_divisf) THEN       ! keep it in the namelist ??? used true anyway as for runoff ? (PM)
             rdivisf = 1._wp
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 10774)
@@ -99,4 +99,5 @@
          WRITE(numout,*) 'sbc_init : surface boundary condition setting'
          WRITE(numout,*) '~~~~~~~~ '
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -160,4 +161,6 @@
       END SELECT
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
       IF ( nn_components /= jp_iam_nemo .AND. .NOT. lk_oasis )   &
          &      CALL ctl_stop( 'STOP', 'sbc_init : OPA-SAS coupled via OASIS, but key_oasis3 disabled' )
@@ -264,4 +267,5 @@
          IF( nn_components/= jp_iam_nemo )  &
             &                       WRITE(numout,*) '              + OASIS coupled SAS'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -283,4 +287,5 @@
             WRITE(numout,*)"   OPA-SAS coupled via OASIS : nn_fsbc re-defined from OASIS namcouple ", nn_fsbc
             WRITE(numout,*)
+            IF(lflush) CALL flush(numout)
          ENDIF
       ENDIF
@@ -421,5 +426,8 @@
          IF( ln_rstart .AND.    &                               !* Restart: read in restart file
             & iom_varid( numror, 'utau_b', ldstop = .FALSE. ) > 0 ) THEN 
-            IF(lwp .AND. nprint > 0) WRITE(numout,*) '          nit000-1 surface forcing fields red in the restart file'
+            IF(lwp .AND. nprint > 0) THEN
+               WRITE(numout,*) '          nit000-1 surface forcing fields red in the restart file'
+               IF(lflush) CALL flush(numout)
+            ENDIF
             IF(nn_timing == 2)  CALL timing_start('iom_rstget')
             CALL iom_get( numror, jpdom_autoglo, 'utau_b', utau_b )   ! before i-stress  (U-point)
@@ -453,4 +461,5 @@
             &                    'at it= ', kt,' date= ', ndastp
             WRITE(numout,*) '~~~~'
+            IF(lflush) CALL flush(numout)
          ENDIF
          IF(nn_timing == 2)  CALL timing_start('iom_rstput')
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 10774)
@@ -159,4 +159,7 @@
             rnf_tsc_b(:,:,:) = rnf_tsc(:,:,:)
          ENDIF
+ 
+         IF(lwp .AND. lflush) CALL flush(numout)
+
       ENDIF
       !                                                ! ---------------------------------------- !
@@ -168,4 +171,5 @@
             &                    'at it= ', kt,' date= ', ndastp
             WRITE(numout,*) '~~~~'
+            IF(lflush) CALL flush(numout)
          ENDIF
          IF(nn_timing == 2)  CALL timing_start('iom_rstput')
@@ -296,4 +300,5 @@
          WRITE(numout,*) '      depth of river mouth additional mixing     rn_hrnf      = ', rn_hrnf
          WRITE(numout,*) '      multiplicative factor for runoff           rn_rfact     = ', rn_rfact
+         IF(lflush) CALL flush(numout)
       ENDIF
       !                                   ! ==================
@@ -305,4 +310,5 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          runoffs inflow read in a file'
+         IF(lwp .AND. lflush) CALL flush(numout)
          IF( ierror > 0 ) THEN
             CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN
@@ -316,4 +322,5 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          runoffs temperatures read in a file'
+         IF(lwp .AND. lflush) CALL flush(numout)
          ALLOCATE( sf_t_rnf(1), STAT=ierror  )
          IF( ierror > 0 ) THEN
@@ -328,4 +335,5 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          runoffs salinities read in a file'
+         IF(lwp .AND. lflush) CALL flush(numout)
          ALLOCATE( sf_s_rnf(1), STAT=ierror  )
          IF( ierror > 0 ) THEN
@@ -340,4 +348,5 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          runoffs depth read in a file'
+         IF(lwp .AND. lflush) CALL flush(numout)
          rn_dep_file = TRIM( cn_dir )//TRIM( sn_dep_rnf%clname )
          IF( .NOT. sn_dep_rnf%ln_clim ) THEN   ;   WRITE(rn_dep_file, '(a,"_y",i4)' ) TRIM( rn_dep_file ), nyear    ! add year 
@@ -380,4 +389,5 @@
          IF(lwp) WRITE(numout,*) '    depth over which runoffs is spread                        rn_dep_max = ', rn_dep_max
          IF(lwp) WRITE(numout,*) '     create (=1) a runoff depth file or not (=0)      nn_rnf_depth_file  = ', nn_rnf_depth_file
+         IF(lwp .AND. lflush) CALL flush(numout)
 
          CALL iom_open( TRIM( sn_rnf%clname ), inum )    !  open runoff file
@@ -433,4 +443,5 @@
          IF( nn_rnf_depth_file == 1 ) THEN      !  save  output nb levels for runoff
             IF(lwp) WRITE(numout,*) '              create runoff depht file'
+            IF(lwp .AND. lflush) CALL flush(numout)
             CALL iom_open  ( TRIM( sn_dep_rnf%clname ), inum, ldwrt = .TRUE., kiolib = jprstlib )
             CALL iom_rstput( 0, 0, inum, 'rodepth', h_rnf )
@@ -470,4 +481,5 @@
          IF(lwp) WRITE(numout,*) '             - set to zero SSS damping       (if ln_ssr=T)'
          IF(lwp) WRITE(numout,*) '             - mixed upstream-centered       (if ln_traadv_cen2=T)'
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
          CALL rnf_mouth                             ! set river mouth mask
@@ -476,4 +488,5 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          No specific treatment at river mouths'
+         IF(lwp .AND. lflush) CALL flush(numout)
          rnfmsk  (:,:) = 0._wp
          rnfmsk_z(:)   = 0._wp
@@ -511,4 +524,5 @@
       IF(lwp) WRITE(numout,*) 'rnf_mouth : river mouth mask'
       IF(lwp) WRITE(numout,*) '~~~~~~~~~ '
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       cl_rnfile = TRIM( cn_dir )//TRIM( sn_cnf%clname )
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 10774)
@@ -92,4 +92,5 @@
             IF(lwp) WRITE(numout,*)
             IF(lwp) WRITE(numout,*) '~~~~~~~   mean fields initialised to instantaneous values'
+            IF(lwp .AND. lflush) CALL flush(numout)
             zcoef = REAL( nn_fsbc - 1, wp )
             ssu_m(:,:) = zcoef * ub(:,:,1)
@@ -156,4 +157,5 @@
                &                    'at it= ', kt,' date= ', ndastp
             IF(lwp) WRITE(numout,*) '~~~~~~~'
+            IF(lwp .AND. lflush) CALL flush(numout)
             zf_sbc = REAL( nn_fsbc, wp )
             IF(nn_timing == 2)  CALL timing_start('iom_rstput')
@@ -257,4 +259,6 @@
       ENDIF
       !
+      IF(lwp .AND. lflush) CALL flush(numout)
+      !
    END SUBROUTINE sbc_ssm_init
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 10774)
@@ -189,4 +189,5 @@
          WRITE(numout,*) '      flag to bound erp term                 ln_sssr_bnd = ', ln_sssr_bnd
          WRITE(numout,*) '      ABS(Max./Min.) erp threshold           rn_sssr_bnd = ', rn_sssr_bnd, ' mm/day'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 10774)
@@ -71,4 +71,5 @@
                WRITE(numout,*) Wave(ntide(jk))%cname_tide, utide(jk), ftide(jk), v0tide(jk), omega_tide(jk)
             END DO
+            IF(lflush) CALL flush(numout)
          ENDIF
          !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 10774)
@@ -60,4 +60,5 @@
           WRITE(numout,*) 'tide_init : Initialization of the tidal components'
           WRITE(numout,*) '~~~~~~~~~ '
+          IF(lflush) CALL flush(numout)
        ENDIF
        !
@@ -90,4 +91,5 @@
           WRITE(numout,*) '                                     ln_tide_ramp = ', ln_tide_ramp 
           WRITE(numout,*) '                                     rdttideramp  = ', rdttideramp
+          IF(lflush) CALL flush(numout)
        ENDIF
        IF( ln_tide_ramp.AND.((nitend-nit000+1)*rdt/rday < rdttideramp) )   &
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SOL/solver.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SOL/solver.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SOL/solver.F90	(revision 10774)
@@ -86,4 +86,5 @@
          WRITE(numout,*) '      optimal coefficient of sor         rn_sor     = ', rn_sor
          WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
       ENDIF
       eps = rn_eps
@@ -100,4 +101,5 @@
       CASE ( 1 )                          ! preconditioned conjugate gradient solver
          IF(lwp) WRITE(numout,*) '   a preconditioned conjugate gradient solver is used'
+         IF(lwp .AND. lflush) CALL flush(numout)
          IF( jpr2di /= 0 .AND. jpr2dj /= 0 )   CALL ctl_stop( ' jpr2di and jpr2dj should be equal to zero' )
          !
@@ -105,4 +107,5 @@
          IF(lwp) WRITE(numout,*) '   a successive-over-relaxation solver with extra outer halo is used'
          IF(lwp) WRITE(numout,*) '   with jpr2di =', jpr2di, ' and  jpr2dj =', jpr2dj
+         IF(lwp .AND. lflush) CALL flush(numout)
          IF( .NOT. lk_mpp .AND. jpr2di /= 0 .AND. jpr2dj /= 0 ) THEN
              CALL ctl_stop( 'jpr2di and jpr2dj are not equal to zero',   &
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90	(revision 10774)
@@ -1258,4 +1258,5 @@
             WRITE(numout,*) '             model does not use Conservative Temperature'
          ENDIF
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -1272,4 +1273,5 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          use of TEOS-10 equation of state (cons. temp. and abs. salinity)'
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
          rdeltaS = 32._wp
@@ -1462,4 +1464,5 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          use of EOS-80 equation of state (pot. temp. and pract. salinity)'
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
          rdeltaS = 20._wp
@@ -1662,4 +1665,5 @@
             WRITE(numout,*) '             2nd cabbel. coef.     rn_nu      = ', rn_nu
             WRITE(numout,*) '               Caution: rn_beta0=0 incompatible with ddm parameterization '
+            IF(lflush) CALL flush(numout)
          ENDIF
          !
@@ -1681,4 +1685,5 @@
       IF(lwp) WRITE(numout,*) '          rau0 * rcp                       rau0_rcp = ', rau0_rcp
       IF(lwp) WRITE(numout,*) '          1. / ( rau0 * rcp )           r1_rau0_rcp = ', r1_rau0_rcp
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
    END SUBROUTINE eos_init
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 10774)
@@ -223,4 +223,5 @@
          WRITE(numout,*) '      upstream scheme within muscl   ln_traadv_msc_ups = ', ln_traadv_msc_ups
          WRITE(numout,*) '      TVD advection scheme with zts  ln_traadv_tvd_zts = ', ln_traadv_tvd_zts
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -260,4 +261,5 @@
          IF( nadv ==  7 )   WRITE(numout,*) '         TVD ZTS   scheme is used'
          IF( nadv == -1 )   WRITE(numout,*) '         esopa test: use all advection scheme'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 10774)
@@ -139,4 +139,5 @@
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~ '
          IF(lwp) WRITE(numout,*)
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
          IF( .NOT. ALLOCATED( upsmsk ) )  THEN
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90	(revision 10774)
@@ -97,4 +97,5 @@
          IF(lwp) WRITE(numout,*) 'tra_adv_eiv : eddy induced advection on ', cdtype,' :'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   add to velocity fields the eiv component'
+         IF(lwp .AND. lflush) CALL flush(numout)
 # if defined key_diaeiv 
          IF( cdtype == 'TRA') THEN
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90	(revision 10774)
@@ -306,4 +306,5 @@
          WRITE(numout,*) '      =1 no MLE in case of convection ; =0 always MLE              nn_conv   = ', nn_conv
          WRITE(numout,*) '      Density difference used to define ML for FK              rn_rho_c_mle  = ', rn_rho_c_mle
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -317,4 +318,7 @@
             WRITE(numout,*) '   Mixed Layer Eddy parametrisation NOT used'
          ENDIF
+
+         IF(lflush) CALL flush(numout)
+
       ENDIF
       !
@@ -325,4 +329,5 @@
          IF(lwp) WRITE(numout,*) '      ML buoyancy criteria = ', rb_c, ' m/s2 '
          IF(lwp) WRITE(numout,*) '      associated ML density criteria defined in zdfmxl = ', rho_c, 'kg/m3'
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
          IF( nn_mle == 0 ) THEN           ! MLE array allocation & initialisation
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 10774)
@@ -99,4 +99,5 @@
          IF(lwp) WRITE(numout,*) '~~~~~~~'
          IF(lwp) WRITE(numout,*)
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
          !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 10774)
@@ -84,4 +84,5 @@
          IF(lwp) WRITE(numout,*) 'tra_adv_muscl2 : MUSCL2 advection scheme on ', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 10774)
@@ -101,4 +101,5 @@
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
          IF(lwp) WRITE(numout,*)
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       l_trd = .FALSE.
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 10774)
@@ -102,4 +102,5 @@
          IF(lwp) WRITE(numout,*) 'tra_adv_tvd : TVD advection scheme on ', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
       ENDIF
@@ -383,4 +384,5 @@
          IF(lwp) WRITE(numout,*) 'tra_adv_tvd_zts : TVD ZTS advection scheme on ', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 10774)
@@ -101,4 +101,5 @@
          IF(lwp) WRITE(numout,*) 'tra_adv_ubs :  horizontal UBS advection scheme on ', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90	(revision 10774)
@@ -158,4 +158,5 @@
          WRITE(numout,*) '      Constant geothermal flux value               rn_geoflx_cst = ', rn_geoflx_cst
          WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -196,4 +197,5 @@
          IF(lwp) WRITE(numout,*) '      *** no geothermal heat flux'
       ENDIF
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
    END SUBROUTINE tra_bbc_init
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 10774)
@@ -358,4 +358,5 @@
          IF(lwp)  WRITE(numout,*) 'trabbl:bbl : Compute bbl velocities and diffusive coefficients in ', cdtype
          IF(lwp)  WRITE(numout,*) '~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !                                        !* bottom variables (T, S, alpha, beta, depth, velocity)
@@ -530,4 +531,5 @@
          WRITE(numout,*) '          diffusive bbl coefficient           rn_ahtbbl  = ', rn_ahtbbl, ' m2/s'
          WRITE(numout,*) '          advective bbl coefficient           rn_gambbl  = ', rn_gambbl, ' s'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -538,4 +540,5 @@
          IF( nn_bbl_adv == 1 )    WRITE(numout,*) '       * Advective BBL using upper velocity'
          IF( nn_bbl_adv == 2 )    WRITE(numout,*) '       * Advective BBL using velocity = F( delta rho)'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90	(revision 10774)
@@ -214,4 +214,5 @@
          WRITE(numout,*) '      Damping file name               cn_resto  = ', cn_resto
          WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -227,4 +228,5 @@
          CASE ( 2 )  ; IF(lwp) WRITE(numout,*) '   no tracer damping in the mixed layer'
          END SELECT
+         IF(lwp .AND. lflush) CALL flush(numout)
 
          !TG: Initialisation of dtatsd - Would it be better to have dmpdta routine
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90	(revision 10774)
@@ -159,4 +159,5 @@
          WRITE(numout,*) '   see ldf_tra_init report for lateral mixing parameters'
          WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -227,4 +228,5 @@
       IF( lk_esopa ) THEN
          IF(lwp) WRITE(numout,*) '          esopa control: use all lateral physics options'
+         IF(lwp .AND. lflush) CALL flush(numout)
          nldf = -1
       ENDIF
@@ -238,4 +240,5 @@
          IF( nldf ==  2 )   WRITE(numout,*) '          bilaplacian operator'
          IF( nldf ==  3 )   WRITE(numout,*) '          Rotated bilaplacian'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -278,4 +281,5 @@
          WRITE(numout,*) 'tra:ldf_ano : lateral diffusion acting on anomalies'
          WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -292,4 +296,5 @@
       zs_ref(:,:,:) = 35.0 * tmask(:,:,:)
       IF(lwp) WRITE(numout,*) '              homogeneous ocean T = ', zt0, ' S = ',zs0
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       ! Initialisation of gtui/gtvi in case of no cavity
@@ -359,4 +364,5 @@
          WRITE(numout,*) 'tra:ldf_ano : lateral diffusion acting on the full fields'
          WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
    END SUBROUTINE ldf_ano
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilap.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilap.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilap.F90	(revision 10774)
@@ -102,4 +102,5 @@
          IF(lwp) WRITE(numout,*) 'tra_ldf_bilap : iso-level biharmonic operator on ', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !                                                          ! ===========
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90	(revision 10774)
@@ -88,4 +88,5 @@
          IF(lwp) WRITE(numout,*) 'tra_ldf_bilapg : horizontal biharmonic operator in s-coordinate on ', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 10774)
@@ -137,4 +137,5 @@
          IF(lwp) WRITE(numout,*) 'tra_ldf_iso : rotated laplacian diffusion operator on ', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90	(revision 10774)
@@ -128,4 +128,5 @@
          IF(lwp) WRITE(numout,*) 'tra_ldf_iso_grif : rotated laplacian diffusion operator on ', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
          ALLOCATE( ah_wslp2(jpi,jpj,jpk) , zdkt3d(jpi,jpj,0:1), STAT=ierr )
          IF( lk_mpp   )   CALL mpp_sum ( ierr )
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90	(revision 10774)
@@ -85,4 +85,5 @@
          IF(lwp) WRITE(numout,*) 'tra_ldf_lap : iso-level laplacian diffusion on ', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ '
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90	(revision 10774)
@@ -164,4 +164,5 @@
                               END DO
                               WRITE(numout,*)
+                              IF(lflush) CALL flush(numout)
                            ENDIF
                            
@@ -169,5 +170,8 @@
                            IF( jiter == 1 )   inpcc = inpcc + 1 
 
-                           IF( lp_monitor_point )   WRITE(numout, *) 'Negative N2 at ikp =',ikp,' for layer #', ilayer
+                           IF( lp_monitor_point )   THEN
+                              WRITE(numout, *) 'Negative N2 at ikp =',ikp,' for layer #', ilayer
+                              IF(lflush) CALL flush(numout)
+                           ENDIF
 
                            !! ikup is the uppermost point where mixing will start:
@@ -223,4 +227,5 @@
                               WRITE(numout,*) '  => Mean Alfa  in that portion =', zalfa
                               WRITE(numout,*) '  => Mean Beta  in that portion =', zbeta
+                              IF(lflush) CALL flush(numout)
                            ENDIF
 
@@ -285,4 +290,5 @@
                            END DO
                            WRITE(numout,*)
+                           IF(lflush) CALL flush(numout)
                         ENDIF
                         !
@@ -323,4 +329,5 @@
             WRITE(numout,*) 'Exiting tra_npc , kt = ',kt,', => numb. of statically instable water-columns: ', inpcc
             WRITE(numout,*)
+            IF(lflush) CALL flush(numout)
          ENDIF
          !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 10774)
@@ -105,4 +105,5 @@
          IF(lwp) WRITE(numout,*) 'tra_nxt : achieve the time stepping by Asselin filter and array swap'
          IF(lwp) WRITE(numout,*) '~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
          rbcp = 0.25_wp * (1._wp + atfp) * (1._wp + atfp) * ( 1._wp - atfp)      ! Brown & Campana parameter for semi-implicit hpg
@@ -243,4 +244,5 @@
          IF(lwp) WRITE(numout,*) 'tra_nxt_fix : time stepping', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !
@@ -317,4 +319,5 @@
          IF(lwp) WRITE(numout,*) 'tra_nxt_vvl : time stepping', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 10774)
@@ -119,4 +119,5 @@
          IF(lwp) WRITE(numout,*) 'tra_qsr : penetration of the surface solar radiation'
          IF(lwp) WRITE(numout,*) '~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
          IF( .NOT.ln_traqsr )   RETURN
       ENDIF
@@ -135,5 +136,8 @@
          IF( ln_rstart .AND.    &                    ! Restart: read in restart file
               & iom_varid( numror, 'qsr_hc_b', ldstop = .FALSE. ) > 0 ) THEN
-            IF(lwp .AND. nprint >0) WRITE(numout,*) '          nit000-1 qsr tracer content forcing field red in the restart file'
+            IF(lwp .AND. nprint >0) THEN
+               WRITE(numout,*) '          nit000-1 qsr tracer content forcing field red in the restart file'
+               IF(lflush) CALL flush(numout)
+            ENDIF
             zfact = 0.5e0
             CALL iom_get( numror, jpdom_autoglo, 'qsr_hc_b', qsr_hc_b )   ! before heat content trend due to Qsr flux
@@ -369,4 +373,5 @@
             &                    'at it= ', kt,' date= ', ndastp
             WRITE(numout,*) '~~~~'
+            IF(lflush) CALL flush(numout)
          ENDIF
          IF(nn_timing == 2)  CALL timing_start('iom_rstput') 
@@ -456,4 +461,5 @@
          WRITE(numout,*) '      RGB & 2 bands: shortess depth of extinction  rn_si0 = ', rn_si0
          WRITE(numout,*) '      2 bands: longest depth of extinction         rn_si1 = ', rn_si1
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -487,4 +493,5 @@
             IF( nqsr ==  4 )   WRITE(numout,*) '         2 bands light penetration'
             IF( nqsr ==  5 )   WRITE(numout,*) '         bio-model light penetration'
+            IF(lflush) CALL flush(numout)
          ENDIF
          !
@@ -569,4 +576,6 @@
             ENDIF
             !
+            IF(lwp .AND. lflush) CALL flush(numout)
+            !
          ENDIF
             !                             ! ---------------------------------- !
@@ -578,9 +587,11 @@
             IF(lwp) THEN
                WRITE(numout,*)
-            IF(lwp) WRITE(numout,*) '        level of light extinction = ', nksr, ' ref depth = ', gdepw_1d(nksr+1), ' m'
+               WRITE(numout,*) '        level of light extinction = ', nksr, ' ref depth = ', gdepw_1d(nksr+1), ' m'
+               IF(lflush) CALL flush(numout)
             ENDIF
             !
             IF( lk_vvl ) THEN                   ! variable volume
                IF(lwp) WRITE(numout,*) '        key_vvl: light distribution will be computed at each time step'
+               IF(lwp .AND. lflush) CALL flush(numout)
             ELSE                                ! constant volume: computes one for all
                zz0 =        rn_abs   * r1_rau0_rcp
@@ -606,4 +617,5 @@
             WRITE(numout,*) 'tra_qsr_init : NO solar flux penetration'
             WRITE(numout,*) '~~~~~~~~~~~~'
+            IF(lflush) CALL flush(numout)
          ENDIF
       ENDIF
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 10774)
@@ -133,4 +133,5 @@
          IF(lwp) WRITE(numout,*) 'tra_sbc : TRAcer Surface Boundary Condition'
          IF(lwp) WRITE(numout,*) '~~~~~~~ '
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -157,4 +158,5 @@
               & iom_varid( numror, 'sbc_hc_b', ldstop = .FALSE. ) > 0 ) THEN
             IF(lwp) WRITE(numout,*) '          nit000-1 surface tracer content forcing fields red in the restart file'
+            IF(lwp .AND. lflush) CALL flush(numout)
             zfact = 0.5_wp
             CALL iom_get( numror, jpdom_autoglo, 'sbc_hc_b', sbc_tsc_b(:,:,jp_tem) )   ! before heat content sbc trend
@@ -214,4 +216,5 @@
             &                    'at it= ', kt,' date= ', ndastp
             WRITE(numout,*) '~~~~'
+            IF(lflush) CALL flush(numout)
          ENDIF
          IF(nn_timing == 2)  CALL timing_start('iom_rstput')
@@ -262,4 +265,5 @@
                &                    'at it= ', kt,' date= ', ndastp
                 WRITE(numout,*) '~~~~'
+                IF(lflush) CALL flush(numout)
             ENDIF
             IF(nn_timing == 2)  CALL timing_start('iom_rstput')
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 10774)
@@ -163,4 +163,5 @@
          IF( nzdf ==  0 )   WRITE(numout,*) '              Explicit time-splitting scheme'
          IF( nzdf ==  1 )   WRITE(numout,*) '              Implicit (euler backward) scheme'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90	(revision 10774)
@@ -100,4 +100,5 @@
          IF(lwp) WRITE(numout,*) 'tra_zdf_exp : explicit vertical mixing on ', cdtype
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90	(revision 10774)
@@ -99,4 +99,5 @@
          IF(lwp)WRITE(numout,*) 'tra_zdf_imp : implicit vertical mixing on ', cdtype
          IF(lwp)WRITE(numout,*) '~~~~~~~~~~~ '
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
          IF( lk_vvl ) THEN   ;    r_vvl = 1._wp       ! Variable volume indicator
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdglo.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdglo.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdglo.F90	(revision 10774)
@@ -285,4 +285,5 @@
             WRITE (numout,9513) umo(jpdyn_tau) / tvolu, vmo(jpdyn_tau) / tvolv
             IF( ln_bfrimp )   WRITE (numout,9514) umo(jpdyn_bfri) / tvolu, vmo(jpdyn_bfri) / tvolv
+            IF(lflush) CALL flush(numout)
          ENDIF
 
@@ -324,4 +325,5 @@
             WRITE (numout,9533) hke(jpdyn_tau) / tvolt
             IF( ln_bfrimp )   WRITE (numout,9534) hke(jpdyn_bfri) / tvolt
+            IF(lflush) CALL flush(numout)
          ENDIF
 
@@ -356,4 +358,5 @@
             WRITE (numout,*)
             WRITE (numout,*)
+            IF(lflush) CALL flush(numout)
          ENDIF
 
@@ -424,4 +427,5 @@
             &                   (  smo(jptra_xad) + smo(jptra_yad) + smo(jptra_zad) + smo(jptra_ldf) + smo(jptra_zdf)   &
             &                    + smo(jptra_npc) + smo(jptra_dmp)                   + smo(jptra_nsr) ) / tvolt
+            IF(lflush) CALL flush(numout)
          ENDIF
 
@@ -459,4 +463,5 @@
             &                   (  s2(jptra_xad) + s2(jptra_yad) + s2(jptra_zad) + s2(jptra_ldf) + s2(jptra_zdf)   &
             &                    + s2(jptra_npc) + s2(jptra_dmp)                  + s2(jptra_nsr) ) / tvolt
+            IF(lflush) CALL flush(numout)
          ENDIF
 
@@ -491,4 +496,5 @@
             WRITE (numout,9448)   t2(jptra_zdf)/tvolt,   s2(jptra_zdf)/tvolt
             WRITE (numout,9449)   t2(jptra_npc)/tvolt,   s2(jptra_npc)/tvolt
+            IF(lflush) CALL flush(numout)
          ENDIF
 
@@ -524,4 +530,5 @@
          WRITE(numout,*) 'trd_glo_init : integral constraints properties trends'
          WRITE(numout,*) '~~~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -534,4 +541,5 @@
 
       IF(lwp) WRITE(numout,*) '                total ocean volume at T-point   tvolt = ',tvolt
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       ! Initialization of potential to kinetic energy conversion
@@ -557,4 +565,5 @@
          WRITE(numout,*) '                total ocean volume at U-point   tvolu = ',tvolu
          WRITE(numout,*) '                total ocean volume at V-point   tvolv = ',tvolv
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdini.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdini.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdini.F90	(revision 10774)
@@ -71,4 +71,5 @@
          !
          WRITE(numout,*) '      frequency of trends diagnostics (glo)     nn_trd      = ', nn_trd
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90	(revision 10774)
@@ -287,4 +287,5 @@
          WRITE(numout,*) 'trd_ken_init : 3D Kinetic Energy trends'
          WRITE(numout,*) '~~~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !                           ! allocate box volume arrays
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90	(revision 10774)
@@ -393,4 +393,5 @@
          IF( ln_ctl ) THEN
             WRITE(numout,*) '             we reach kt == nit000 + 1 = ', nit000+1
+            IF(lflush) CALL flush(numout)
             CALL prt_ctl(tab2d_1=tmlbb   , clinfo1=' tmlbb   -   : ', mask1=tmask, ovlap=1)
             CALL prt_ctl(tab2d_1=tmlbn   , clinfo1=' tmlbn   -   : ', mask1=tmask, ovlap=1)
@@ -403,4 +404,5 @@
          IF( ln_trdmxl_instant ) THEN
             WRITE(numout,*) '             restart from kt == nit000 = ', nit000
+            IF(lflush) CALL flush(numout)
             CALL prt_ctl(tab2d_1=tmlbb   , clinfo1=' tmlbb   -   : ', mask1=tmask, ovlap=1)
             CALL prt_ctl(tab2d_1=tmlbn   , clinfo1=' tmlbn   -   : ', mask1=tmask, ovlap=1)
@@ -408,4 +410,5 @@
          ELSE
             WRITE(numout,*) '             restart from kt == nit000 = ', nit000
+            IF(lflush) CALL flush(numout)
             CALL prt_ctl(tab2d_1=tmlbn          , clinfo1=' tmlbn           -  : ', mask1=tmask, ovlap=1)
             CALL prt_ctl(tab2d_1=hmxlbn         , clinfo1=' hmxlbn          -  : ', mask1=tmask, ovlap=1)
@@ -633,4 +636,5 @@
             WRITE(numout,*) '          TRA zsmlres (jpi/2,jpj/2) : ', zsmlres (jpi/2,jpj/2)
             WRITE(numout,*) '          TRA zsmlres2(jpi/2,jpj/2) : ', zsmlres2(jpi/2,jpj/2)
+            IF(lflush) CALL flush(numout)
             !
          END IF
@@ -778,4 +782,5 @@
          WRITE(numout,*) '      unit conversion factor                     rn_ucf             = ', rn_ucf
          WRITE(numout,*) '      criteria to compute the MLD                rn_rho_c           = ', rn_rho_c
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90	(revision 10774)
@@ -69,4 +69,5 @@
             ELSE                          ;   WRITE(numout,*) '             kt = '             , kt,' date= ', ndastp
             ENDIF
+            IF(lflush) CALL flush(numout)
          ENDIF
 
@@ -79,4 +80,5 @@
          WRITE(numout,*) '~~~~~~~~~~'
          WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
       ENDIF
       IF(nn_timing == 2)  CALL timing_start('iom_rstput')
@@ -145,4 +147,5 @@
          WRITE(numout,*) ' trd_mxl_rst_read : read the NetCDF mixed layer trend restart file'
          WRITE(numout,*) ' ~~~~~~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90	(revision 10774)
@@ -144,4 +144,5 @@
          WRITE(numout,*) 'trd_pen_init : 3D Potential ENergy trends'
          WRITE(numout,*) '~~~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !                           ! allocate box volume arrays
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 10774)
@@ -209,5 +209,5 @@
       IF( ndebug /= 0 ) THEN
          IF(lwp) WRITE(numout,*) ' debuging trd_vor_zint: I done'
-         CALL FLUSH(numout)
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !
@@ -305,5 +305,5 @@
       IF( ndebug /= 0 ) THEN
          IF(lwp) WRITE(numout,*) ' debuging trd_vor_zint: I done'
-         CALL FLUSH(numout)
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
       !
@@ -434,4 +434,5 @@
             WRITE(numout,*) 'trd_vor : write trends in the NetCDF file at kt = ', kt
             WRITE(numout,*) '~~~~~~~  '
+            IF(lflush) CALL flush(numout)
          ENDIF
  
@@ -452,5 +453,5 @@
          IF( ndebug /= 0 ) THEN
             WRITE(numout,*) ' debuging trd_vor: III.4 done'
-            CALL FLUSH(numout)
+            IF(lwp .AND. lflush) CALL flush(numout)
          ENDIF
          !
@@ -497,4 +498,5 @@
          WRITE(numout,*) '               ##########################################################################'
          WRITE(numout,*) ' '
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -510,5 +512,5 @@
       IF( ndebug /= 0 ) THEN
          WRITE(numout,*) ' debuging trd_vor_init: I. done'
-         CALL FLUSH(numout)
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -533,4 +535,5 @@
 
       IF(lwp) WRITE(numout,*) '               netCDF initialization'
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       ! II.2 Compute julian date from starting date of the run
@@ -542,4 +545,5 @@
          &                   ' YEAR ', nyear,' MONTH '      , nmonth,   &
          &                   ' DAY ' , nday, 'Julian day : ', zjulian
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       ! II.3 Define the T grid trend file (nidvor)
@@ -547,4 +551,5 @@
       CALL dia_nam( clhstnam, nn_trd, 'vort' )                  ! filename
       IF(lwp) WRITE(numout,*) ' Name of NETCDF file ', clhstnam
+      IF(lwp .AND. lflush) CALL flush(numout)
       CALL histbeg( clhstnam, jpi, glamf, jpj, gphif,1, jpi,   &  ! Horizontal grid : glamt and gphit
          &          1, jpj, nit000-1, zjulian, rdt, nh_t, nidvor, domain_id=nidom, snc4chunks=snc4set )
@@ -582,5 +587,5 @@
       IF( ndebug /= 0 ) THEN
          WRITE(numout,*) ' debuging trd_vor_init: II. done'
-         CALL FLUSH(numout)
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 10774)
@@ -105,4 +105,5 @@
          WRITE(numout,*) 'zdf_bfr : Set bottom friction coefficient (non-linear case)'
          WRITE(numout,*) '~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -262,4 +263,5 @@
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~'
       IF(lwp) WRITE(numout,*) '   Namelist nam_bfr : set bottom friction parameters'
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       SELECT CASE (nn_bfr)
@@ -399,4 +401,5 @@
       !
       IF(lwp) WRITE(numout,*) '      implicit bottom friction switch                ln_bfrimp  = ', ln_bfrimp
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       !                              ! Make sure ln_zdfexp=.false. when use implicit bfr
@@ -430,4 +433,5 @@
                    WRITE(numout,*) 'BFR ', narea, nimpp+ji, njmpp+jj, ikbu
                    WRITE(numout,*) 'BFR ', ABS( bfrcoef2d(ji,jj) ), zfru
+                   IF(lflush) CALL flush(numout)
                 ENDIF
                 ictu = ictu + 1
@@ -437,4 +441,5 @@
                      WRITE(numout,*) 'BFR ', narea, nimpp+ji, njmpp+jj, ikbv
                      WRITE(numout,*) 'BFR ', bfrcoef2d(ji,jj), zfrv
+                     IF(lflush) CALL flush(numout)
                  ENDIF
                  ictv = ictv + 1
@@ -452,4 +457,5 @@
                       WRITE(numout,*) 'TFR ', narea, nimpp+ji, njmpp+jj, ikbu
                       WRITE(numout,*) 'TFR ', ABS( tfrcoef2d(ji,jj) ), zfru
+                      IF(lflush) CALL flush(numout)
                    ENDIF
                    ictu = ictu + 1
@@ -459,4 +465,5 @@
                       WRITE(numout,*) 'TFR ', narea, nimpp+ji, njmpp+jj, ikbv
                       WRITE(numout,*) 'TFR ', tfrcoef2d(ji,jj), zfrv
+                      IF(lflush) CALL flush(numout)
                    ENDIF
                    ictv = ictv + 1
@@ -483,4 +490,5 @@
          IF ( ln_isfcav ) WRITE(numout,*) ' Top friction coefficient now ranges from: ', zmintfr, ' to ', zmaxtfr
          WRITE(numout,*) ' Bottom/Top friction coefficient will be reduced where necessary'
+         IF(lflush) CALL flush(numout)
       ENDIF
       ENDIF
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 10774)
@@ -255,4 +255,5 @@
          WRITE(numout,*) '      maximum avs for dd mixing      rn_avts   = ', rn_avts
          WRITE(numout,*) '      heat/salt buoyancy flux ratio  rn_hsbfr  = ', rn_hsbfr
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90	(revision 10774)
@@ -69,4 +69,5 @@
          IF(lwp) WRITE(numout,*) '~~~~~~~ '
          IF(lwp) WRITE(numout,*)
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 10774)
@@ -903,4 +903,5 @@
          WRITE(numout,*) '      Surface roughness (m)                         rn_hsro        = ', rn_hsro
          WRITE(numout,*) '      Bottom roughness (m) (nambfr namelist)        rn_bfrz0       = ', rn_bfrz0
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -990,5 +991,6 @@
          !
       END SELECT
-
+      !
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       SELECT CASE ( nn_stab_func )     !* set the parameters of the stability functions
@@ -1066,5 +1068,6 @@
          !
       END SELECT
-    
+      !
+      IF(lwp .AND. lflush) CALL flush(numout) 
       !                                !* Set Schmidt number for psi diffusion in the wave breaking case
       !                                     ! See Eq. (13) of Carniel et al, OM, 30, 225-239, 2009
@@ -1118,4 +1121,5 @@
          WRITE(numout,*) 'rl_sf   = ',rl_sf
          WRITE(numout,*)
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -1194,4 +1198,5 @@
             ELSE                        
                IF(lwp) WRITE(numout,*) ' ===>>>> : previous run without gls scheme, en and mxln computed by iterative loop'
+               IF(lwp .AND. lflush) CALL flush(numout)
                en  (:,:,:) = rn_emin
                mxln(:,:,:) = 0.05        
@@ -1204,4 +1209,5 @@
          ELSE                                   !* Start from rest
             IF(lwp) WRITE(numout,*) ' ===>>>> : Initialisation of en and mxln by background values'
+            IF(lwp .AND. lflush) CALL flush(numout)
             en  (:,:,:) = rn_emin
             mxln(:,:,:) = 0.05       
@@ -1211,4 +1217,5 @@
          !                                   ! -------------------
          IF(lwp) WRITE(numout,*) '---- gls-rst ----'
+         IF(lwp .AND. lflush) CALL flush(numout)
          IF(nn_timing == 2)  CALL timing_start('iom_rstput')
          CALL iom_rstput( kt, nitrst, numrow, 'en'   , en     ) 
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 10774)
@@ -83,4 +83,5 @@
          WRITE(numout,*) '      npc call  frequency                 nn_npc    = ', nn_npc
          WRITE(numout,*) '      npc print frequency                 nn_npcp   = ', nn_npcp
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -154,5 +155,6 @@
          CALL ctl_stop( ' except for TKE, GLS or KPP physics, a convection scheme is',   &
          &              ' required: ln_zdfevd or ln_zdfnpc logicals' )
-
+      !
+      IF(lwp .AND. lflush) CALL flush(numout)
       !                               !* Background eddy viscosity and diffusivity profil
       IF( nn_avb == 0 ) THEN                ! Define avmb, avtb from namelist parameter
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90	(revision 10774)
@@ -1214,4 +1214,5 @@
          IF(lwp) WRITE(numout,*) 'tra_kpp : KPP non-local tracer fluxes'
          IF(lwp) WRITE(numout,*) '~~~~~~~   '
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -1286,4 +1287,5 @@
          IF(lwp) WRITE(numout,*) 'trc_kpp : KPP non-local tracer fluxes'
          IF(lwp) WRITE(numout,*) '~~~~~~~   '
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -1384,4 +1386,5 @@
          WRITE(numout,*) '     max. mix. in interior convec.                 rn_difcon   = ', rn_difcon
          WRITE(numout,*) '     horizontal average flag                       nn_ave      = ', nn_ave
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -1410,4 +1413,6 @@
          ENDIF
       ENDIF
+    
+      IF(lwp .AND. lflush) CALL flush(numout)
       
 
@@ -1421,4 +1426,5 @@
          WRITE(numout,*) '     Constant value for unreso. turbul. velocity shear Vtc = ', Vtc
          WRITE(numout,*) '     Non-dimensional coef. for nonlocal transport      rcg = ', rcg
+         IF(lflush) CALL flush(numout)
        ENDIF
 
@@ -1438,4 +1444,5 @@
          IF(lwp) WRITE(numout,*) '          no horizontal average on avt, avmu, avmv'
          IF(lwp) WRITE(numout,*) '          only in very high horizontal resolution !'
+         IF(lwp .AND. lflush) CALL flush(numout)
          ! weighting mean arrays etmean, eumean and evmean
          !           ( 1  1 )                                          ( 1 )
@@ -1464,4 +1471,5 @@
       CASE ( 1 )                ! horizontal average 
          IF(lwp) WRITE(numout,*) '          horizontal average on avt, avmu, avmv'
+         IF(lwp .AND. lflush) CALL flush(numout)
          ! weighting mean arrays etmean, eumean and evmean
          !           ( 1/2  1  1/2 )              ( 1/2  1/2 )             ( 1/2  1  1/2 )
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90	(revision 10774)
@@ -108,4 +108,5 @@
          IF(lwp) WRITE(numout,*) 'zdf_mxl : mixed layer depth'
          IF(lwp) WRITE(numout,*) '~~~~~~~ '
+         IF(lflush) CALL flush(numout)
          !                             ! allocate zdfmxl arrays
          IF( zdf_mxl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'zdf_mxl : unable to allocate arrays' )
@@ -396,7 +397,11 @@
             END DO
          END DO
-         WRITE(numout,*) 'zthick_0(jk =',jk,') =',zthick_0(2,2)
-         WRITE(numout,*) 'fsdepw(jk+1 =',jk+1,') =',fsdepw(2,2,jk+1)
+         IF(lwp) THEN
+            WRITE(numout,*) 'zthick_0(jk =',jk,') =',zthick_0(2,2)
+            WRITE(numout,*) 'fsdepw(jk+1 =',jk+1,') =',fsdepw(2,2,jk+1)
+         ENDIF
       END DO
+      
+      IF(lflush) CALL flush(numout)
 
       ! Surface boundary condition
@@ -429,5 +434,6 @@
       END DO
 
-      WRITE(numout,*) 'htc_mld(after) =',htc_mld(2,2)
+      IF(lwp) WRITE(numout,*) 'htc_mld(after) =',htc_mld(2,2)
+      IF(lwp .AND. lflush) CALL flush(numout)
 
       ! Convert to heat content
@@ -491,4 +497,5 @@
             END DO
             WRITE(numout,*) '===================================================================='
+            IF(lflush) CALL flush(numout)
          ENDIF
       ENDIF
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 10774)
@@ -276,4 +276,5 @@
          WRITE(numout,*) '      Vertical eddy Visc. in the ML  rn_wvmix  = ', rn_wvmix
          WRITE(numout,*) '      Use the MLD parameterization   ln_mldw   = ', ln_mldw
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 10774)
@@ -797,4 +797,5 @@
          WRITE(numout,*) 'zdf_tke_init :  New tidal mixing case: force rn_emin = 1.e-10 and rmxl_min = 1.e-3 '
          WRITE(numout,*) '~~~~~~~~~~~~'
+         IF(lflush) CALL flush(numout)
       ENDIF
 # else
@@ -825,4 +826,5 @@
          WRITE(numout,*)
          WRITE(numout,*) '      critical Richardson nb with your parameters  ri_cri = ', ri_cri
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -838,4 +840,5 @@
       IF( ln_mxl0 ) THEN
          IF(lwp) WRITE(numout,*) '   use a surface mixing length = F(stress) :   set rn_mxl0 = rmxl_min'
+         IF(lwp .AND. lflush) CALL flush(numout)
          rn_mxl0 = rmxl_min
       ENDIF
@@ -949,4 +952,5 @@
            ELSE                                     ! No TKE array found: initialisation
               IF(lwp) WRITE(numout,*) ' ===>>>> : previous run without tke scheme, en computed by iterative loop'
+              IF(lwp .AND. lflush) CALL flush(numout)
               en (:,:,:) = rn_emin * tmask(:,:,:)
               CALL tke_avn                               ! recompute avt, avm, avmu, avmv and dissl (approximation)
@@ -971,5 +975,8 @@
      ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN   ! Create restart file
         !                                   ! -------------------
-        IF(lwp .AND. nprint > 0) WRITE(numout,*) '---- tke-rst ----'
+        IF(lwp .AND. nprint > 0) THEN
+           WRITE(numout,*) '---- tke-rst ----'
+           IF(lflush) CALL flush(numout)
+        ENDIF
         IF(nn_timing == 2)  CALL timing_start('iom_rstput')
         CALL iom_rstput( kt, nitrst, numrow, 'en'   , en     )
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 10774)
@@ -156,4 +156,5 @@
          IF(lwp) WRITE(numout,*) 
          IF(lwp) WRITE(numout,*) '          N Total power consumption by av_tide    : ztpc = ', ztpc * 1.e-12 ,'TW'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
        
@@ -310,4 +311,5 @@
          ztpc= rau0 * ztpc / ( rn_me * rn_tfe_itf )
          IF(lwp) WRITE(numout,*) '          N Total power consumption by zavt_itf: ztpc = ', ztpc * 1.e-12 ,'TW'
+         IF(lwp .AND. lflush) CALL flush(numout)
       ENDIF
 
@@ -401,4 +403,5 @@
          WRITE(numout,*) '      ITF specific parameterisation         = ', ln_tmx_itf
          WRITE(numout,*) '      ITF tidal dissipation efficiency      = ', rn_tfe_itf
+         IF(lflush) CALL flush(numout)
       ENDIF
 
@@ -468,4 +471,5 @@
          WRITE(numout,*) 
          WRITE(numout,*) '          Total power consumption of the tidally driven part of Kz : ztpc = ', ztpc * 1.e-12 ,'TW'
+         IF(lflush) CALL flush(numout)
 
 
@@ -497,4 +501,5 @@
          END DO
          WRITE(numout,*) '          Min de zkz ', ztpc, ' Max = ', maxval(zkz(:,:) )
+         IF(lflush) CALL flush(numout)
 
          DO jk = 2, jpkm1
@@ -516,4 +521,5 @@
          ztpc= rau0 * 1/(rn_tfe * rn_me) * ztpc
          WRITE(numout,*) '          2 Total power consumption of the tidally driven part of Kz : ztpc = ', ztpc * 1.e-12 ,'TW'
+         IF(lflush) CALL flush(numout)
 
          DO jk = 1, jpk
@@ -528,4 +534,5 @@
             WRITE(numout,*) '            N2 min - jk= ', jk,'   ', ze_z * 1.e4,' cm2/s min= ',ztpc*1.e4,   &
                &       'max= ', MAXVAL(zav_tide(:,:,jk) )*1.e4, ' cm2/s'
+            IF(lflush) CALL flush(numout)
          END DO
 
@@ -533,4 +540,6 @@
          WRITE(numout,*) 
          WRITE(numout,*) '          Initial profile of tidal vertical mixing'
+         IF(lflush) CALL flush(numout)
+
          DO jk = 1, jpk
             DO jj = 1,jpj
@@ -543,4 +552,5 @@
             WRITE(numout,*) '                jk= ', jk,'   ', ze_z * 1.e4,' cm2/s'
          END DO
+         IF(lflush) CALL flush(numout)
          DO jk = 1, jpk
             zkz(:,:) = az_tmx(:,:,jk) /rn_n2min
@@ -551,4 +561,5 @@
                &       'max= ', MAXVAL(zkz)*1.e4, ' cm2/s'
          END DO
+         IF(lflush) CALL flush(numout)
          !
       ENDIF
@@ -862,4 +873,5 @@
             WRITE(numout,*)
             WRITE(numout,*) '      Total power consumption by av_wave: ztpc =  ', ztpc * 1.e-12_wp, 'TW'
+            IF(lflush) CALL flush(numout)
          ENDIF
       ENDIF
@@ -983,4 +995,5 @@
          WRITE(numout,*) '      Variable (T) or constant (F) mixing efficiency            = ', ln_mevar
          WRITE(numout,*) '      Differential internal wave-driven mixing (T) or not (F)   = ', ln_tsdiff
+         IF(lflush) CALL flush(numout)
       ENDIF
       
@@ -995,4 +1008,5 @@
          WRITE(numout,*) '   Force the background value applied to avm & avt in TKE to be everywhere ',   &
             &               'the viscous molecular value & a very small diffusive value, resp.'
+         IF(lflush) CALL flush(numout)
       ENDIF
       
@@ -1042,4 +1056,5 @@
          WRITE(numout,*) '      Pycnocline-intensifed wave-breaking energy: ', zpyc * 1.e-12_wp, 'TW'
          WRITE(numout,*) '      Critical slope wave-breaking energy:        ', zcri * 1.e-12_wp, 'TW'
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 10774)
@@ -250,5 +250,5 @@
       NAMELIST/namctl/ ln_ctl  ,sn_cfctl, nn_print, nn_ictls, nn_ictle,   &
          &             nn_isplt, nn_jsplt, nn_jctls, nn_jctle,   &
-         &             nn_bench, nn_timing
+         &             nn_bench, nn_timing, ln_flush
       NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, &
          &             jpizoom, jpjzoom, jperio, ln_use_jattr
@@ -296,4 +296,5 @@
 #endif
       nprint    = nn_print          ! convert DOCTOR namelist names into OLD names
+      lflush    = ln_flush          ! convert namelist variable to model variable
       !do it here because output.namelist.dyn is opened before nprint was set earlier
       !
@@ -405,4 +406,5 @@
          END DO
          WRITE(numout,cform_aaa)                                         ! Flag AAAAAAA
+         IF(lflush) CALL flush(numout)
          !
       ENDIF
@@ -510,4 +512,5 @@
       IF( lk_asminc     )   CALL asm_inc_init   ! Initialize assimilation increments
       IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler
+      IF(lwp .AND. lflush) CALL flush(numout)
       
       IF (nstop > 0) THEN
@@ -546,4 +549,5 @@
          WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr 
          WRITE(numout,*) '      level of print                  nn_print   = ', nn_print
+         WRITE(numout,*) '      flush numout/stat               ln_flush   = ', ln_flush
          WRITE(numout,*) '      Start i indice for SUM control  nn_ictls   = ', nn_ictls
          WRITE(numout,*) '      End i indice for SUM control    nn_ictle   = ', nn_ictle
@@ -554,4 +558,5 @@
          WRITE(numout,*) '      benchmark parameter (0/1)       nn_bench   = ', nn_bench
          WRITE(numout,*) '      timing activated    (0/1)       nn_timing  = ', nn_timing
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -581,4 +586,5 @@
          WRITE(numout,*) '      lateral cond. type (between 0 and 6) jperio = ', jperio   
          WRITE(numout,*) '      use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr
+         IF(lflush) CALL flush(numout)
       ENDIF
       !                             ! Parameter control
@@ -596,4 +602,5 @@
          IF(lwp) WRITE(numout,*)'          - The total number of processors over which the'
          IF(lwp) WRITE(numout,*)'            print control will be done is ijsplt : ', ijsplt
+         IF(lwp .AND. lflush) CALL flush(numout)
          !
          !                              ! indices used for the SUM control
@@ -767,4 +774,5 @@
          WRITE (numout, *) 'WARNING: factorisation of number of PEs failed'
          WRITE (numout, *) '       : using grid of ',num_pes,' x 1'
+         IF(lflush) CALL flush(numout)
          jpnj = 1
          jpni = num_pes
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/stpctl.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/stpctl.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/stpctl.F90	(revision 10774)
@@ -71,4 +71,5 @@
          WRITE(numout,*) 'stp_ctl : time-stepping control'
          WRITE(numout,*) '~~~~~~~'
+         IF(lflush) CALL flush(numout)
          ! open time.step file with special treatment for SAS
          IF ( nn_components == jp_iam_sas ) THEN
@@ -99,5 +100,8 @@
       IF( lk_mpp )   CALL mpp_max( zumax )                 ! max over the global domain
       !
-      IF( ll_colruns )   WRITE(numout,*) ' ==>> time-step= ',kt,' abs(U) max: ', zumax
+      IF( ll_colruns )   THEN
+         WRITE(numout,*) ' ==>> time-step= ',kt,' abs(U) max: ', zumax
+         IF(lflush) CALL flush(numout)
+      ENDIF
       !
       IF( zumax > 20.e0 ) THEN
@@ -117,4 +121,5 @@
             WRITE(numout,*)
             WRITE(numout,*) '          output of last fields in numwso'
+            IF(lflush) CALL flush(numout)
          ENDIF
          kindic = -3
@@ -133,5 +138,8 @@
       IF( lk_mpp )   CALL mpp_min( zsmin )                ! min over the global domain
       !
-      IF( MOD( kt, nwrite ) == 1 .AND. lwp )   WRITE(numout,*) ' ==>> time-step= ',kt,' SSS min:', zsmin
+      IF( MOD( kt, nwrite ) == 1 .AND. lwp )   THEN
+         WRITE(numout,*) ' ==>> time-step= ',kt,' SSS min:', zsmin
+         IF(lflush) CALL flush(numout)
+      ENDIF
       !
       IF( zsmin < 0.) THEN 
@@ -188,4 +196,5 @@
             WRITE(numout,9600) kt, ztmax, ii, ij
             WRITE(numout,*) 'stp_ctl:tracer anomaly: ***** END OF WARNING *****'
+            IF(lflush) CALL flush(numout)
          ENDIF
       ENDIF
@@ -205,4 +214,5 @@
             WRITE(numout,9700) kt, ztmin, ii, ij
             WRITE(numout,*) 'stp_ctl:tracer anomaly: ***** END OF WARNING *****'
+            IF(lflush) CALL flush(numout)
          ENDIF
       ENDIF
@@ -218,5 +228,8 @@
       IF( lk_dynspg_flt ) THEN      ! elliptic solver statistics (if required)
          !
-         IF(ll_wrtruns) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps       ! Solver
+         IF(ll_wrtruns) THEN
+            WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps       ! Solver
+            IF(lflush) CALL flush(numsol)
+         ENDIF
          !
          IF( kindic < 0 .AND. zsmin > 0.e0 .AND. zumax <= 20.e0 ) THEN   ! create a abort file if problem found 
@@ -228,4 +241,5 @@
                WRITE(numout,*) ' stpctl: output of last fields'
                WRITE(numout,*) ' ======  '
+               IF(lflush) CALL flush(numout)
             ENDIF
          ENDIF
@@ -241,4 +255,5 @@
          !
             WRITE(numsol,9300) kt, zssh2, zumax, zsmin      ! ssh statistics
+            IF(lflush) CALL flush(numsol)
          ENDIF
          !
Index: branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90	(revision 10770)
+++ branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90	(revision 10774)
@@ -115,4 +115,5 @@
          WRITE(numout,*) 'trc_oce_rgb : Initialisation of the optical look-up table'
          WRITE(numout,*) '~~~~~~~~~~~ '
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -184,4 +185,5 @@
       r_si2 = 1.e0 / zrgb(2, 1)        ! blue with the smallest chlorophyll concentration)
       IF(lwp) WRITE(numout,*) '      RGB longest depth of extinction    r_si2 = ', r_si2
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
       DO jc = 1, 61                         ! check
@@ -222,4 +224,5 @@
          WRITE(numout,*) ' ~~~~~~~~~~~~~~~~'
          WRITE(numout,*) 
+         IF(lflush) CALL flush(numout)
       ENDIF
       !
@@ -229,4 +232,5 @@
          irgb = NINT( 41 + 20.* LOG10( zchl ) + 1.e-15 )   
          IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  irgb = ', irgb  
+         IF(lwp .AND. lflush) CALL flush(numout)
          IF( irgb /= jc ) THEN  
             IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  Chl class = ', irgb
@@ -238,4 +242,5 @@
       r_si2 = 1.e0 / prgb(1, 1)      ! blue with the smallest chlorophyll concentration)
       IF(lwp) WRITE(numout,*) '      RGB longest depth of extinction    r_si2 = ', r_si2
+      IF(lwp .AND. lflush) CALL flush(numout)
       !
    END SUBROUTINE trc_oce_rgb_read
