Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90	(revision 9266)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90	(revision 9267)
@@ -511,4 +511,5 @@
       !
       IF( numstp          /= -1 )   CLOSE( numstp          )   ! time-step file      
+      IF( numrun          /= -1 )   CLOSE( numrun          )   ! run statistics file
       IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist
       IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist
Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/stpctl.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/stpctl.F90	(revision 9266)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/stpctl.F90	(revision 9267)
@@ -11,4 +11,5 @@
    !!            2.0  ! 2009-07  (G. Madec)  Add statistic for time-spliting
    !!            3.5  ! 2012-03  (S. Alderson)
+   !!            4.0  ! 2017-04  (G. Madec)  regroup global communications
    !!----------------------------------------------------------------------
 
@@ -18,4 +19,6 @@
    USE oce             ! ocean dynamics and tracers variables
    USE dom_oce         ! ocean space and time domain variables 
+   USE ice      , ONLY : vt_i, u_ice, tm_i
+   !
    USE in_out_manager  ! I/O manager
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
@@ -27,5 +30,5 @@
    PUBLIC stp_ctl           ! routine called by step.F90
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 4.0 , NEMO Consortium (2017)
    !! $Id$
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
@@ -43,9 +46,12 @@
       !!              - Print it each 50 time steps
       !!
-      !! ** Actions :   'time.step' file containing the last ocean time-step
+      !! ** Actions :   "time.step" file = last ocean time-step
+      !!                "run.stat"  file = run statistics
       !!                
       !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   kt         ! ocean time-step index
-      INTEGER, INTENT( inout ) ::   kindic  ! indicator of solver convergence
+      INTEGER, INTENT( in    ) ::   kt       ! ocean time-step index
+      INTEGER, INTENT( inout ) ::   kindic   ! indicator of solver convergence
+      !!
+      REAL(wp), DIMENSION(3) ::   zmax
       !!----------------------------------------------------------------------
 
@@ -54,11 +60,32 @@
          WRITE(numout,*) 'stp_ctl : time-stepping control'
          WRITE(numout,*) '~~~~~~~'
-         ! open time.step file
+         !                                ! open time.step file
          CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
+         !                                ! open run.stat file
+         CALL ctl_opn( numrun, 'run.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
+      ENDIF
+      !
+      IF(lwp) THEN                        !==  current time step  ==!   ("time.step" file)
+         WRITE ( numstp, '(1x, i8)' )   kt
+         REWIND( numstp )
+      ENDIF
+      !                                   !==  test of extrema  ==!
+      zmax(1) = MAXVAL(      vt_i (:,:) )                                           ! max ice thickness
+      zmax(2) = MAXVAL( ABS( u_ice(:,:) ) )                                         ! max ice velocity (zonal only)
+      zmax(3) = MAXVAL(     -tm_i (:,:)+273.15_wp , mask = ssmask(:,:) == 1._wp )   ! min ice temperature
+      !
+      IF( lk_mpp ) THEN
+         CALL mpp_max_multiple( zmax(:), 3 )    ! max over the global domain
+      ENDIF
+      !
+      IF( MOD( kt, nwrite ) == 1 .AND. lwp ) THEN
+         WRITE(numout,*) ' ==>> time-step= ', kt, ' vt_i max: ',  zmax(1), ' |u_ice| max: ', zmax(2), ' tm_i min: ', -zmax(3)
       ENDIF
 
-      IF(lwp) WRITE ( numstp, '(1x, i8)' )   kt      !* save the current time step in numstp
-      IF(lwp) REWIND( numstp )                       !  --------------------------
-
+      !                                            !==  run statistics  ==!   ("run.stat" file)
+      IF(lwp) WRITE(numrun,9400) kt, zmax(1), zmax(2), -zmax(3)
+      !
+9400  FORMAT(' it :', i8, '    vt_i_max: ', e16.10, ' |u_ice|_max: ',e16.10,' tm_i_min: ',e16.10)
+      !
    END SUBROUTINE stp_ctl
 
