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 10744)
+++ /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 10745)
@@ -99,4 +99,24 @@
    !!----------------------------------------------------------------------
    LOGICAL ::   ln_ctl       !: run control for debugging
+   TYPE :: sn_ctl                !: optional use structure for finer control over output selection
+      LOGICAL :: l_config  = .FALSE.  !: activate/deactivate finer control
+                                      !  Note if l_config is True then ln_ctl is ignored.
+                                      !  Otherwise setting ln_ctl True is equivalent to setting
+                                      !  all the following logicals in this structure True
+      LOGICAL :: l_runstat = .FALSE.  !: Produce/do not produce run.stat file (T/F)
+      LOGICAL :: l_trcstat = .FALSE.  !: Produce/do not produce tracer.stat file (T/F)
+      LOGICAL :: l_oceout  = .FALSE.  !: Produce all ocean.outputs    (T) or just one (F)
+      LOGICAL :: l_layout  = .FALSE.  !: Produce all layout.dat files (T) or just one (F)
+      LOGICAL :: l_mppout  = .FALSE.  !: Produce/do not produce mpp.output_XXXX files (T/F)
+      LOGICAL :: l_mpptop  = .FALSE.  !: Produce/do not produce mpp.top.output_XXXX files (T/F)
+                                      !  Optional subsetting of processor report files
+                                      !  Default settings of 0/1000000/1 should ensure all areas report.
+                                      !  Set to a more restrictive range to select specific areas
+      INTEGER :: procmin   = 0        !: Minimum narea to output
+      INTEGER :: procmax   = 1000000  !: Maximum narea to output
+      INTEGER :: procincr  = 1        !: narea increment to output
+      INTEGER :: ptimincr  = 1        !: timestep increment to output (time.step and run.stat)
+   END TYPE
+   TYPE(sn_ctl) :: sn_cfctl     !: run control structure for selective output
    INTEGER ::   nn_timing    !: run control for timing
    INTEGER ::   nn_print     !: level of print (0 no print)
@@ -109,5 +129,4 @@
    INTEGER ::   nn_bench     !: benchmark parameter (0/1)
    INTEGER ::   nn_bit_cmp   =    0    !: bit reproducibility  (0/1)
-
    !                                          
    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/SOL/solver.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SOL/solver.F90	(revision 10744)
+++ /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SOL/solver.F90	(revision 10745)
@@ -59,5 +59,5 @@
       !
 
-      IF(lwp) THEN                  !* open elliptic solver statistics file (only on the printing processors)
+      IF(lwp .AND. ln_ctl .OR. sn_cfctl%l_runstat) THEN  !* open elliptic solver statistics file (only on the printing processors)
          CALL ctl_opn( numsol, 'solver.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
       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 10744)
+++ /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 10745)
@@ -248,5 +248,5 @@
       CHARACTER(len=80), DIMENSION(16) ::   cltxt
       !
-      NAMELIST/namctl/ ln_ctl  , nn_print, nn_ictls, nn_ictle,   &
+      NAMELIST/namctl/ ln_ctl  ,sn_cfctl, nn_print, nn_ictls, nn_ictle,   &
          &             nn_isplt, nn_jsplt, nn_jctls, nn_jctle,   &
          &             nn_bench, nn_timing
@@ -326,4 +326,16 @@
 #endif
       narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 )
+
+      IF( sn_cfctl%l_config ) THEN
+         ! Activate finer control of report outputs
+         ! optionally switch off output from selected areas (note this only
+         ! applies to output which does not involve global communications)
+         IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax  ) .OR. &
+           & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) )    &
+           &   CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. )
+      ELSE
+         ! Use ln_ctl to turn on or off all options.
+         CALL nemo_set_cfctl( sn_cfctl, ln_ctl, .TRUE. )
+      ENDIF
 
       lwm = (narea == 1)                                    ! control of output namelists
@@ -520,4 +532,15 @@
          WRITE(numout,*) '   Namelist namctl'
          WRITE(numout,*) '      run control (for debugging)     ln_ctl     = ', ln_ctl
+         WRITE(numout,*) '       finer control over o/p sn_cfctl%l_config  = ', sn_cfctl%l_config
+         WRITE(numout,*) '                              sn_cfctl%l_runstat = ', sn_cfctl%l_runstat
+         WRITE(numout,*) '                              sn_cfctl%l_trcstat = ', sn_cfctl%l_trcstat
+         WRITE(numout,*) '                              sn_cfctl%l_oceout  = ', sn_cfctl%l_oceout
+         WRITE(numout,*) '                              sn_cfctl%l_layout  = ', sn_cfctl%l_layout
+         WRITE(numout,*) '                              sn_cfctl%l_mppout  = ', sn_cfctl%l_mppout
+         WRITE(numout,*) '                              sn_cfctl%l_mpptop  = ', sn_cfctl%l_mpptop
+         WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin  
+         WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax  
+         WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr 
+         WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr 
          WRITE(numout,*) '      level of print                  nn_print   = ', nn_print
          WRITE(numout,*) '      Start i indice for SUM control  nn_ictls   = ', nn_ictls
@@ -691,4 +714,30 @@
    END SUBROUTINE nemo_alloc
 
+   SUBROUTINE nemo_set_cfctl(sn_cfctl, setto, for_all )
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE nemo_set_cfctl  ***
+      !!
+      !! ** Purpose :   Set elements of the output control structure to setto.
+      !!                for_all should be .false. unless all areas are to be
+      !!                treated identically.
+      !!
+      !! ** Method  :   Note this routine can be used to switch on/off some
+      !!                types of output for selected areas but any output types
+      !!                that involve global communications (e.g. mpp_max, glob_sum)
+      !!                should be protected from selective switching by the
+      !!                for_all argument
+      !!----------------------------------------------------------------------
+      LOGICAL :: setto, for_all
+      TYPE(sn_ctl) :: sn_cfctl
+      !!----------------------------------------------------------------------
+      IF( for_all ) THEN
+         sn_cfctl%l_runstat = setto
+         sn_cfctl%l_trcstat = setto
+      ENDIF
+      sn_cfctl%l_oceout  = setto
+      sn_cfctl%l_layout  = setto
+      sn_cfctl%l_mppout  = setto
+      sn_cfctl%l_mpptop  = setto
+   END SUBROUTINE nemo_set_cfctl
 
    SUBROUTINE nemo_partition( 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 10744)
+++ /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/stpctl.F90	(revision 10745)
@@ -61,7 +61,10 @@
                                             ! values and warn if they're out of Range
       INTEGER, DIMENSION(3) ::   ilocu      ! 
-      INTEGER, DIMENSION(2) ::   ilocs      ! 
+      INTEGER, DIMENSION(2) ::   ilocs      !
+      LOGICAL                ::   ll_wrtstp, ll_colruns, ll_wrtruns
       !!----------------------------------------------------------------------
-
+      ll_wrtstp  = ( MOD( kt, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend )
+      ll_colruns = ll_wrtstp .AND. ( ln_ctl .OR. sn_cfctl%l_runstat )
+      ll_wrtruns = ll_colruns .AND. lwm
       IF( kt == nit000 .AND. lwp ) THEN
          WRITE(numout,*)
@@ -74,9 +77,12 @@
             clfname = 'time.step'
          ENDIF
-         CALL ctl_opn( numstp, TRIM(clfname), 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
-      ENDIF
-
-      IF(lwp) WRITE ( numstp, '(1x, i8)' )   kt      !* save the current time step in numstp
-      IF(lwp) REWIND( numstp )                       !  --------------------------
+         IF( lwm ) &
+     &    CALL ctl_opn( numstp, TRIM(clfname), 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
+      ENDIF
+
+      IF(lwp .AND. ll_wrtstp) THEN
+         WRITE ( numstp, '(1x, i8)' )   kt      !* save the current time step in numstp
+         REWIND( numstp )                       !  --------------------------
+      ENDIF
 
       !                                              !* Test maximum of velocity (zonal only)
@@ -93,5 +99,5 @@
       IF( lk_mpp )   CALL mpp_max( zumax )                 ! max over the global domain
       !
-      IF( MOD( kt, nwrite ) == 1 .AND. lwp )   WRITE(numout,*) ' ==>> time-step= ',kt,' abs(U) max: ', zumax
+      IF( ll_colruns )   WRITE(numout,*) ' ==>> time-step= ',kt,' abs(U) max: ', zumax
       !
       IF( zumax > 20.e0 ) THEN
@@ -212,5 +218,5 @@
       IF( lk_dynspg_flt ) THEN      ! elliptic solver statistics (if required)
          !
-         IF(lwp) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps       ! Solver
+         IF(ll_wrtruns) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps       ! Solver
          !
          IF( kindic < 0 .AND. zsmin > 0.e0 .AND. zumax <= 20.e0 ) THEN   ! create a abort file if problem found 
@@ -226,12 +232,14 @@
          !
       ELSE                                   !* ssh statistics (and others...)
-         IF( kt == nit000 .AND. lwp ) THEN   ! open ssh statistics file (put in solver.stat file)
+         IF( kt == nit000 .AND. lwp .AND. ln_ctl .OR. sn_cfctl%l_runstat) THEN   ! open ssh statistics file (put in solver.stat file)
             CALL ctl_opn( numsol, 'solver.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
          ENDIF
          !
-         zssh2 = SUM( sshn(:,:) * sshn(:,:) * tmask_i(:,:) )
-         IF( lk_mpp )   CALL mpp_sum( zssh2 )      ! sum over the global domain
-         !
-         IF(lwp) WRITE(numsol,9300) kt, zssh2, zumax, zsmin      ! ssh statistics
+         IF( ll_wrtruns ) THEN
+            zssh2 = SUM( sshn(:,:) * sshn(:,:) * tmask_i(:,:) )
+            IF( lk_mpp )   CALL mpp_sum( zssh2 )      ! sum over the global domain
+         !
+            WRITE(numsol,9300) kt, zssh2, zumax, zsmin      ! ssh statistics
+         ENDIF
          !
       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 10744)
+++ /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90	(revision 10745)
@@ -188,5 +188,5 @@
          zchl = zrgb(1,jc)
          irgb = NINT( 41 + 20.* LOG10( zchl ) + 1.e-15 )
-         IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  irgb = ', irgb
+         IF(lwp .AND. nprint >= 1 ) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  irgb = ', irgb
          IF( irgb /= jc ) THEN
             IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  Chl class = ', irgb
Index: /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 10744)
+++ /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 10745)
@@ -123,15 +123,13 @@
       CALL trc_ice_ini                                 ! Tracers in sea ice
 
-      IF( ln_ctl ) THEN
-         !
-         IF (narea == 1) THEN  
-            ! The tracer.stat file only contains global tracer sum values, if 
-            ! it contains anything at all. Hence it only needs to be opened 
-            ! and written to on the master PE, not on all PEs.  
-            CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE','FORMATTED',  & 
-                          'SEQUENTIAL', -1, numout, lwp , narea ) 
-         ENDIF  
-         !
-      ENDIF
+      !
+      IF (lwm .AND. sn_cfctl%l_trcstat) THEN  
+         ! The tracer.stat file only contains global tracer sum values, if 
+         ! it contains anything at all. Hence it only needs to be opened 
+         ! and written to on the master PE, not on all PEs.  
+         CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE','FORMATTED',  & 
+                       'SEQUENTIAL', -1, numout, lwp , narea ) 
+      ENDIF  
+      !
 
       IF( ln_trcdta ) THEN
Index: /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/TOP_SRC/trcstp.F90	(revision 10744)
+++ /branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/TOP_SRC/trcstp.F90	(revision 10745)
@@ -62,4 +62,5 @@
       INTEGER               ::  jk, jn  ! dummy loop indices
       REAL(wp)              ::  ztrai
+      LOGICAL ::   ll_trcstat ! local logical
       CHARACTER (len=25)    ::  charout 
       !!-------------------------------------------------------------------
@@ -67,4 +68,6 @@
       IF( nn_timing == 1 )   CALL timing_start('trc_stp')
       !
+      ll_trcstat  = ( ln_ctl .OR. sn_cfctl%l_trcstat ) .AND. &
+     &              ( ( MOD( kt, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) )
       IF( kt == nittrc000 .AND. lk_trdmxl_trc )  CALL trd_mxl_trc_init    ! trends: Mixed-layer
       !
@@ -120,5 +123,5 @@
       ENDIF
       !
-      IF (ln_ctl) THEN 
+      IF (ll_trcstat) THEN 
          ! The following code is very expensive since it involves multiple 
          ! reproducible global sums over all tracer fields and is potentially  
